| The rapid development of the Internet has provided convenience in all aspects of society.Flying is the preferred solution for many people to travel remotely.It is obvious that the convenience provided by the Internet in travel.Online ticket purchase,rebooking,and cancel operations have flooded our lives.The Air Ticket Division in Qunar is in charge of the airline ticket business.Users can purchase tickets through Qunar.As a third-party platform.The tickets purchased by Qunar are actually purchased from the official websites of airlines.If the passenger needs to change or cancel the ticket in an unexpected situation,the user will usually call the company’s operations staff,and the operations staff will cancel or change the ticket on the official website of each airline.Taking into account that skilled operations staff need at least one minute to complete a user’s cancel/change operation,so an automatic cancellations and changes system for air tickets was born.Since the company has not obtained the interface of cancel and change air tickets from various airline companies,the automatic cancellations and changes system for air tickets relies on a web crawler to realize automation.The development language of the automatic cancellations and changes system for air tickets is Java,and the development tools include IntelliJ IDEA and Fiddler.The system is mainly divided into two parts,one is the master system part,and the other is the grab code part.The automatic cancellations and changes system for air tickets is a post-sale system,so the data source is from the pre-sale system.After the pre-sale system purchased the ticket successfully.if there is a cancel or change request,it will construct parameters and send a Qmq message.The automatic cancellations and changes system will monitor Qmq message in real time.If the monitored messages meet the requirements,the messages will be inserted into the database.The scheduler will query the tasks from the database and process the grab codes of different bussiness lines and airlines.Finally,different process will be performed according to the status of the order.In the above process,the role of the master system part is to listen to the message,store the message,process different parts of the grab code according to different states in the message,and handle the response according to different results of the grabbing code.The grab code part mainly constructs requests according to the operations on official website of different airline to realize cancel/change operation.The automatic cancellations and changes system for air tickets uses a web crawler to automate the cancel/change operations for air tickets,greatly reducing the working time of the operations staff and improving the efficiency of the cancel and change operation.It reduces management costs of company. |