Order information query method and device, storage medium and electronic equipment
By receiving and verifying user query requests in the civil aviation passenger order data query system, and using RTA services and backup databases to ensure data synchronization, the problem of failure of the host system synchronization has been solved, resulting in users being unable to obtain order information, and query efficiency and reliability are improved.
Patent Information
- Application Number
- CN202411782625.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-04
AI Technical Summary
Due to the failure of the host system to synchronize data to other databases, users cannot obtain order information, and the existing technology has not yet proposed an effective solution.
By receiving the target query request from the target user, the validity of the request is verified and a request message containing preset characters is generated. Send the request message to the host system, use the RTA service to quickly read the data in the host system, and obtain the query results of the target query request. At the same time, read the log data of the host system, obtain data change information, and synchronize it to the backup database to ensure that when the host system synchronization fails, query results are obtained through the backup database.
This avoids the problem of failing to respond to user query requests due to failure of the host system synchronization, improves the efficiency of users querying order information, and improves the reliability of airlines in responding to user query.
Smart Images

Figure CN119759944A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method, device, storage medium and electronic device for querying order information. Background Art
[0002] Civil aviation passenger order data (Passenger Name Record, hereinafter referred to as PNR data) is the core data of the civil aviation information system and the basis of civil aviation business operations. In the civil aviation passenger reservation system, passenger reservation records will exist in the form of PNR. Each PNR corresponds to a unique six-digit code. Airline sales personnel and airline agent sales personnel can index and view PNR records through PNR codes.
[0003] Civil Aviation Passenger Agent Order Data (CRS PNR for short) is the PNR data in the Civil Aviation Passenger Reservation System through the agent of the airline. Like the Civil Aviation Passenger Order Data, Civil Aviation Passenger Agent Order Data also exists in the form of PNR. Each PNR corresponds to a unique six-digit code. The airline agent can index the PNR record and view the record through the PNR code.
[0004] Currently, there is only one source of civil aviation passenger order data, which is obtained by reading an open database. However, the open database is not synchronized in real time. The open system needs to receive the data change log, obtain the host data change by reading the log, and then update the synchronized data. During the data synchronization process, if the open system does not receive the host data change log in time or the data synchronization times out, it will affect the accuracy of the passenger order data query, affect the user's real-time transaction business processing, and cause economic losses to agents and airlines.
[0005] With regard to the problem in the related art that when querying user order information, the user cannot obtain the order information due to the failure of the host system to synchronize data with other databases, no effective solution has been proposed yet. Summary of the invention
[0006] The main purpose of the present application is to provide a method, device, storage medium and electronic device for querying order information, so as to solve the problem in the related art that when querying user order information, the user cannot obtain order information due to the failure of the host system to synchronize data with other databases.
[0007] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for querying order information is provided, the method comprising: receiving a target query request of a target user, and verifying the target query request to obtain a verification result; when the verification result is a passed verification, generating a request message, wherein a preset position in the request message contains preset characters; sending the request message to a host system, wherein the host system is used to store the user's order information, the host system deploys a target service, and the target service is used to obtain the user's order information according to the request message; receiving the target message data returned by the host system, and performing format conversion on the target message data to obtain a first query result of the target query request.
[0008] Furthermore, the target message data returned by the host system is received, and the format of the target message data is converted to obtain the first query result of the target query request, including: receiving the target message data by calling the target service, wherein the target message data at least includes: a binary file; obtaining identification information of the binary file, and determining the identification information of the target user based on the identification information; parsing the binary file according to preset field information, and determining the order information of the target user based on the parsing result and the identification information of the target user, wherein the parsing result includes the order information corresponding to each preset field; converting the order information of the target user into a preset data structure to obtain the first query result.
[0009] Furthermore, the order information of the target user is converted into a preset data structure to obtain the first query result, including: generating a preset data node corresponding to each preset field based on the preset field information; converting the order information corresponding to each preset field according to the preset data node corresponding to each preset field to obtain a target data node corresponding to each preset field; generating the first query result based on the target data node corresponding to each preset field and the preset data structure.
[0010] Furthermore, after sending the request message to the host system, the method also includes: reading log data of the host system; when the log data indicates that there is a data change in the host system, obtaining the change data of the host system through a target network terminal, wherein the target network terminal is a terminal for accessing data by directly connecting to the host system; synchronizing the change data of the host system to a backup database; in the backup database, querying the data required for the target query request, and performing data conversion to obtain a second query result.
[0011] Furthermore, after sending the request message to the host system, the method also includes: receiving first data at intervals of a preset time period, wherein the first data at least includes: data stored in the host system and change data of the host system within the preset time period; sending the first data to a query database, wherein the query database is a system for querying received query requests; in the query database, querying the data required for the target query request, and performing data conversion to obtain a third query result.
[0012] Further, when the verification result is that the verification is passed, the method also includes: determining the query information of the target query request, wherein the query information includes at least one of the following: query type, query range, data source; determining the target query method based on the query information, wherein the target query method includes at least one of the following: a first query method, a second query method and a third query method, wherein the first query method is to receive the message data returned by the host system, and perform format conversion on the message data to obtain a first query result of the target query request; the second query method is to query the data required for the target query request in the backup database, and perform data conversion to obtain a second query result; the third query method is to query the data required for the target query request in the query database, and perform data conversion to obtain a third query result; query the target query request according to the target query method to obtain the query result of the target query request.
[0013] Furthermore, after the verification result is that the verification is passed, the method also includes: when it is detected that the query database fails to receive the first data, querying the data required for the target query request through the backup database, and performing data conversion to obtain the second query result; or; receiving the target message data returned by the host system, and performing format conversion on the target message data to obtain the first query result.
[0014] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a device for querying order information is provided, and the device includes: a verification unit, which is used to receive a target query request of a target user, and verify the target query request to obtain a verification result; a generation unit, which is used to generate a request message when the verification result is a passed verification, wherein a preset position in the request message contains preset characters; a first sending unit, which is used to send the request message to a host system, wherein the host system is used to store the user's order information, and the host system deploys a target service, and the target service is used to obtain the user's order information according to the request message; a first conversion unit, which is used to receive the target message data returned by the host system, and convert the format of the target message data to obtain a first query result of the target query request.
[0015] Furthermore, the first conversion unit includes: a calling subunit, used to receive the target message data by calling the target service, wherein the target message data includes at least: a binary file; a determining subunit, used to obtain identification information of the binary file, and determine the identification information of the target user based on the identification information; a parsing subunit, used to parse the binary file based on preset field information, and determine the order information of the target user based on the parsing result and the identification information of the target user, wherein the parsing result includes the order information corresponding to each preset field; a conversion subunit, used to convert the order information of the target user into a preset data structure to obtain the first query result.
[0016] Furthermore, the conversion subunit includes: a first generation module, used to generate a preset data node corresponding to each preset field based on the preset field information; a conversion module, used to convert the order information corresponding to each preset field according to the preset data node corresponding to each preset field, and obtain the target data node corresponding to each preset field; a second generation module, used to generate the first query result based on the target data node corresponding to each preset field and the preset data structure.
[0017] Furthermore, the device also includes: a reading unit, used to read the log data of the host system after sending the request message to the host system; an acquisition unit, used to acquire the change data of the host system through a target network terminal when the log data indicates that there is a data change in the host system, wherein the target network terminal is a terminal that accesses data by directly connecting to the host system; a synchronization unit, used to synchronize the change data of the host system to a backup database; a first query unit, used to query the data required for the target query request in the backup database, and perform data conversion to obtain a second query result.
[0018] Furthermore, the device also includes: a receiving unit, used to receive first data at intervals of a preset time period after sending the request message to the host system, wherein the first data at least includes: data stored in the host system and change data of the host system within the preset time period; a second sending unit, used to send the first data to a query database, wherein the query database is a system for querying received query requests; a second query unit, used to query the query database for data required for the target query request, and perform data conversion to obtain a third query result.
[0019] Further, the device also includes: a first determination unit, used to determine the query information of the target query request when the verification result is a passed verification, wherein the query information includes at least one of the following: query type, query range, data source; a second determination unit, used to determine the target query method based on the query information, wherein the target query method includes at least one of the following: a first query method, a second query method and a third query method, wherein the first query method is to receive the message data returned by the host system, and perform format conversion on the message data to obtain a first query result of the target query request; the second query method is to query the data required for the target query request in the backup database, and perform data conversion to obtain a second query result; the third query method is to query the data required for the target query request in the query database, and perform data conversion to obtain a third query result; a third query unit, used to query the target query request according to the target query method to obtain the query result of the target query request.
[0020] Further, the device also includes: a fourth query unit, which is used to query the data required for the target query request through the backup database and perform data conversion to obtain the second query result when the verification result is a passed verification and it is detected that the query database fails to receive the first data; or; a second conversion unit, which is used to receive the target message data returned by the host system and perform format conversion on the target message data to obtain the first query result.
[0021] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a computer program product is provided, including a computer program, which, when executed by a processor, implements any one of the above-mentioned methods for querying order information, and which, when executed by a processor, implements the steps of the method for querying order information described in each embodiment of the present application.
[0022] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes stored computer instructions, wherein when the computer instructions are executed by a processor, any one of the above-mentioned order information query methods is implemented.
[0023] In order to achieve the above-mentioned purpose, according to one aspect of the present application, an electronic device is provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned methods for querying order information.
[0024] Through this application, the following steps are adopted: receiving a target query request of a target user, and verifying the target query request to obtain a verification result; if the verification result is that the verification is passed, generating a request message, wherein the preset position in the request message contains a preset character; sending the request message to a host system, wherein the host system is used to store the user's order information, and the host system deploys a target service, and the target service is used to obtain the user's order information according to the request message; receiving the target message data returned by the host system, and format conversion of the target message data to obtain the first query result of the target query request, which solves the problem that when querying the user's order information in the related art, the user cannot obtain the order information due to the failure of the host system to synchronize data with other databases. By verifying the target query request, generating a request message of the target query request, and sending the request message to the RTA service of the host system, the data stored in the host system can be quickly read through the RTA service according to the request message to obtain the query result of the target query request, avoiding the problem of being unable to respond to the user's query request due to the failure of the host system synchronization, improving the efficiency of the user's query order information, and improving the reliability of the airline's response to the user's query. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0026] Figure 1 is a flowchart of a method for querying order information provided in Example 1 of the present application;
[0027] Figure 2 This is a schematic diagram of an optional order information query method provided in Example 1 of the present application. Figure 1 ;
[0028] Figure 3This is a schematic diagram of an optional order information query method provided in Example 1 of the present application. Figure 2 ;
[0029] Figure 4 This is a schematic diagram of an optional order information query method provided in Example 1 of the present application. Figure 3 ;
[0030] Figure 5 This is a schematic diagram of an optional order information query method provided in Example 1 of the present application. Figure 4 ;
[0031] Figure 6 This is a schematic diagram of an optional order information query method provided in Example 1 of the present application. Figure 5 ;
[0032] Figure 7 is a schematic diagram of a device for querying order information provided in Embodiment 2 of the present application;
[0033] Figure 8 It is a schematic diagram of an electronic device for querying order information provided according to Embodiment 5 of the present application. DETAILED DESCRIPTION
[0034] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0035] It should be noted that the user information (including but not limited to user device information, user personal information, collected data, used data, generated data, processed data, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, collected information, used information, generated information, processed information, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of relevant countries and regions, necessary confidentiality measures are taken, and public order and good morals are not violated, and corresponding operation portals are provided for users to choose to authorize or refuse. For example, an interface is set between this system and relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0036] It should be noted that this application provides users with corresponding operation entrances for them to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.
[0037] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0038] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0039] Embodiment 1
[0040] The present application is described below in conjunction with preferred implementation steps. Figure 1 is a flowchart of a method for querying order information provided in Example 1 of the present application. Figure 1 As shown, the method comprises the following steps:
[0041] Step S101, receiving a target query request from a target user, and verifying the target query request to obtain a verification result.
[0042] The method for querying order information provided in the first embodiment of the present application is applied to the order query system of the airline. After receiving the query request initiated by the user, the order query system performs a query, obtains the query result and returns it to the user. Since the PNR data of the airline is processed by the host system and synchronously updated to the open database system, the query is performed through the open database system when querying the data. Therefore, if the synchronization of the data processed by the host system fails, the user query will fail, resulting in economic losses to the user or the airline. The method for querying order information provided in the first embodiment of the present application is used to build multiple query links, so that when the query link of the current system fails, it can quickly switch to other links for order query according to the multiple query links, ensuring that the user query is not interrupted, improving the reliability and stability of the airline's query service, and improving the accuracy of the user's query results.
[0043] In the first embodiment, in order to improve the efficiency of user query, it is necessary to parse the request content in the target query request after receiving the target query request of the target user, so as to verify the target query request according to the request content, and execute the target query request if the verification passes. For example, since the query result can only provide the flight information of the current airline and the flight information of the authorized airline, it is possible to verify whether the data requested in the target query request belongs to the relevant data of the preset airline according to the login account of the target user and the conditions of the target query request.
[0044] Step S102: if the verification result is that the verification is passed, a request message is generated, wherein a preset position in the request message contains a preset character.
[0045] In the first embodiment, in order to improve the efficiency of user query, it is necessary to generate a request message according to the target query request, and the request message is message data starting with a preset character. For example, the message data can be started with the preset character "RTA", and the query conditions and query parameters in the target query request are added thereto to obtain the above request message.
[0046] Step S103, sending the request message to the host system, wherein the host system is used to store the user's order information, the host system deploys the target service, and the target service is used to obtain the user's order information according to the request message.
[0047] In the first embodiment of the present invention, in order to improve the efficiency of user query, it is necessary to send a request message to the host system, and obtain the order information that the target user needs to query in the target query request by calling the real-time analysis service (Real-Time Analytics, i.e. the above-mentioned target service, hereinafter referred to as RTA service) deployed in the host system.
[0048] The above-mentioned host system refers to the system in the airline that processes PNR data or other business processes, and provides support for other equipment or services of the airline. In the host system, especially in the database, RTA service refers to a service that can process and analyze large amounts of data in real time, with the advantages of low latency, high throughput, and data integration.
[0049] Step S104: receiving the target message data returned by the host system, and performing format conversion on the target message data to obtain a first query result of the target query request.
[0050] In the first embodiment, after receiving the target message data returned by the host system, the target message data needs to be formatted into a preset format to obtain the above-mentioned first query result, and the first query result is returned to the target user to complete the target query request.
[0051] In an optional embodiment, the process of the airline responding to the user's target query request can be as follows: Figure 2 As shown, the airline's order query system receives a request from an upstream user (e.g., an airline user, an airline agent user, or an airline internal staff member, etc.), parses the request content of the target query request through the order query system, and verifies it according to the user's login account and the request conditions. After the verification is passed, the order query system generates a request message according to the target query request, and sends the request message to the airline's host system. After receiving the request message, the host system obtains the message data corresponding to the target query request by calling the RTA service, and converts the message data into a preset data format to obtain the above-mentioned first query result, and returns the first query result to the target user.
[0052] In summary, the query method for order information provided in the first embodiment of the present application receives the target query request of the target user, verifies the target query request, and obtains the verification result; when the verification result is that the verification is passed, a request message is generated, wherein the preset position in the request message contains preset characters; the request message is sent to the host system, wherein the host system is used to store the user's order information, the host system deploys the target service, and the target service is used to obtain the user's order information according to the request message; the target message data returned by the host system is received, and the target message data is formatted to obtain the first query result of the target query request, which solves the problem that when querying the user's order information in the related technology, the user cannot obtain the order information due to the failure of the host system to synchronize data with other databases. By verifying the target query request, generating a request message of the target query request, and sending the request message to the RTA service of the host system, the data stored in the host system can be quickly read through the RTA service according to the request message to obtain the query result of the target query request, avoiding the problem of being unable to respond to the user's query request due to the failure of the host system synchronization, improving the efficiency of the user's query order information, and improving the reliability of the airline's response to the user's query.
[0053] Optionally, in the order information query method provided in the first embodiment of the present application, target message data returned by the host system is received, and the target message data is formatted to obtain a first query result of the target query request, including: receiving the target message data by calling the target service, wherein the target message data at least includes: a binary file; obtaining identification information of the binary file, and determining the identification information of the target user based on the identification information; parsing the binary file based on preset field information, and determining the order information of the target user based on the parsing result and the identification information of the target user, wherein the parsing result includes the order information corresponding to each preset field; converting the order information of the target user into a preset data structure to obtain a first query result.
[0054] In an optional embodiment, the process of generating the first query result according to the received host system can be as follows: Figure 3 As shown. The data processing module of the order query system receives the message replied by the host, which contains a binary file of the passenger order information (PNR for short), that is, the target message data mentioned above. After receiving the binary PNR data file, the key value of the binary file (that is, the identification information mentioned above) is converted into the number of the passenger order information, that is, the identification information of the target user mentioned above. According to the field definition information of the passenger order information of the host system, the entire content of the order information of the target user is parsed to obtain the parsing result, wherein the parsing result includes at least the passenger name item, flight segment item, special service item, remarks item, other information item, fare information item and other information. According to the identification information of the target user and the parsing result of the target user's order information, the binary file containing the target user's order information is determined. Finally, the binary file containing the target user's order information is sent to the data conversion module of the order query system, and the binary file is converted into a preset data structure by the data conversion module to obtain the above-mentioned first query result.
[0055] Optionally, in the order information query method provided in Example 1 of the present application, the order information of the target user is converted into a preset data structure to obtain a first query result, including: generating a preset data node corresponding to each preset field based on the preset field information; converting the order information corresponding to each preset field according to the preset data node corresponding to each preset field to obtain a target data node corresponding to each preset field; and generating the first query result based on the target data node corresponding to each preset field and the preset data structure.
[0056] In an optional embodiment, the process of converting the order information of the target user into the first query result can be as follows: Figure 4As shown. The data conversion module of the order query system generates a CBR data node corresponding to each field information for each preset field information, converts the order information of the target user in the binary file according to each CBR data node, and forms CBR order data (i.e., the preset data structure mentioned above) with an entry organization structure based on passengers as the dimension according to the converted CBR data nodes, and obtains the above-mentioned first query result.
[0057] A CBR data node is the attribute information of a passenger in a CBR (Case-Based Reasoning, hereinafter referred to as CBR) system, or a specific data structure used to describe the characteristics or other information of a passenger. The entry organization structure in a CBR system usually refers to a complete passenger order information, which includes a variety of information about the passenger, such as name, itinerary, contact information, and operation history.
[0058] By building CBR data nodes and entry organizational structures based on passengers' PNR information, data can be efficiently stored, retrieved, and processed, thereby improving the efficiency of user data query.
[0059] Optionally, in the order information query method provided in Example 1 of the present application, after sending the request message to the host system, the above method also includes: reading the log data of the host system; when the log data indicates that there is a data change in the host system, obtaining the change data of the host system through the target network terminal, wherein the target network terminal is a terminal that accesses data by directly connecting to the host system; synchronizing the change data of the host system to a backup database; in the backup database, querying the data required for the target query request, and performing data conversion to obtain a second query result.
[0060] In the first embodiment, in addition to directly querying data from the host system through the RTA service, it is also possible to synchronize incremental data to a backup database and perform data query through the backup database, thereby eliminating the need to directly access the host system and improving the data security of the host system.
[0061] In an optional embodiment, the log data of the host system is read after a preset time (for example, 3 hours, 6 hours, 12 hours, etc., which is not specifically limited in the first embodiment), and whether the data in the host system has changed is determined based on the log data. In the case where it is determined that there is a change in the data in the host system, the host system change data is obtained through the host direct reading tool (Application Network Terminal, referred to as ANT, i.e. the above-mentioned target network terminal), wherein the target network terminal is a terminal that accesses data by directly connecting to the host system, and synchronizes the host system change data to the backup database. After receiving the target query request, the target query request is forwarded to the backup database, and the data required for the target query request is queried through the backup database, and converted into a preset data format to obtain a second query result.
[0062] Optionally, in the order information query method provided in Example 1 of the present application, after sending the request message to the host system, the method further includes: receiving first data at intervals of a preset time period, wherein the first data at least includes: data stored in the host system, and change data of the host system within the preset time period; sending the first data to a query database, wherein the query database is a system for querying received query requests; in the query database, querying the data required for the target query request, and performing data conversion to obtain a third query result.
[0063] In this first embodiment, in addition to directly querying data from the host system through the RTA service and synchronizing incremental data to the backup database through the host direct reading tool, the full data can also be synchronized to the query database of the open system and a method of querying data can be used to query the database.
[0064] In an optional embodiment, after every preset time (for example, 3 hours, 6 hours, 12 hours, etc., which may be different from the preset time for synchronization to the backup database, and is not specifically limited in this embodiment 1), a binary file of all passenger order information of the host system is obtained, including all data stored in the host system and the change data of the host system within the preset time period, and pushed to the query database of the open system. After receiving the target query request, the target query request is forwarded to the query database, and the data required for the target query request is queried through the query database, and converted into a preset data format to obtain a third query result.
[0065] Optionally, in the query method for order information provided in Example 1 of the present application, when the verification result is that the verification is passed, the above method also includes: determining the query information of the target query request, wherein the query information includes at least one of the following: query type, query range, data source; determining the target query method based on the query information, wherein the target query method includes at least one of the following: a first query method, a second query method and a third query method, wherein the first query method is to receive the message data returned by the host system, and format the message data to obtain a first query result of the target query request; the second query method is to query the data required for the target query request in the backup database, and perform data conversion to obtain the second query result; the third query method is to query the data required for the target query request in the query database, and perform data conversion to obtain the third query result; query the target query request according to the target query method to obtain the query result of the target query request.
[0066] In the first embodiment, in order to improve the reliability of user queries, after receiving the target query request, the accuracy requirements and timeliness requirements of the target query request can be analyzed, so as to select the optimal link from the three query links for query and obtain the query results, thereby achieving the effect of improving user satisfaction.
[0067] In an optional embodiment, the query type, query scope and data source of the target query request can be determined to determine the target query method. Exemplarily, if the target query request requires a high timeliness, the first query method can be used for querying, that is, the RTA service is used to directly access the host system for querying; if the target query request requires a general timeliness but a high accuracy, the third query method can be used for querying, that is, querying by querying the database.
[0068] In an optional embodiment, the schematic diagram of the three query links can be as follows: Figure 5 As shown. The first query method mentioned above is to call the RTA service deployed in the host system to query, and convert the message data returned by the host system into a CBR data node and entry organization structure to obtain the first query result. The second query method is to query the data required for the target query request through the backup database and convert it into the second query result. The third query method is to query the data required for the target query request through the backup database and convert it into the third query result.
[0069] Optionally, in the order information query method provided in Example 1 of the present application, after the verification result is verification passed, the above method also includes: when it is detected that the query database fails to receive the first data, querying the data required for the target query request through the backup database, and performing data conversion to obtain a second query result; or; receiving the target message data returned by the host system, and performing format conversion on the target message data to obtain the first query result.
[0070] In the first embodiment of the present invention, in order to avoid the problem that the host system fails to synchronize data with other databases, resulting in the user being unable to query data, when a failure to synchronize data with the query database is detected, the query result of the user's query request can be obtained through the backup database, or the order information of the target user can be returned through the RTA service and converted into a query result.
[0071] In an optional embodiment, to ensure normal query of the user, when an error occurs in any of the above three query methods, other query methods can be used to query, thereby ensuring that the user can always obtain the query result.
[0072] Optionally, in the first embodiment, the system deployment diagram of the application providing information query function to users based on the self-developed microservice platform with multiple instances can be as follows: Figure 6 As shown in the figure, the system is based on a self-developed microservice platform, supports multi-instance deployment, and uses dynamic horizontal expansion and load balancing technology to ensure high performance. It is based on the combination of relational database cluster technology and cache database technology to ensure high availability, high reliability and high performance of the system. The real application cluster is the host system mentioned above, and the data guard is the backup database mentioned above. Multiple instances are deployed in the navigation cloud computing application platform. The sentinel obtains query results by obtaining data from the memory cache database.
[0073] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0074] Embodiment 2
[0075] The second embodiment of the present application also provides a device for querying order information. It should be noted that the device for querying order information in the second embodiment of the present application can be used to execute the method for querying order information provided in the first embodiment of the present application. The device for querying order information provided in the second embodiment of the present application is introduced below.
[0076] Figure 7 Schematic diagram of a device for querying order information according to Embodiment 2 of the present application. Figure 7 As shown, the device includes: a checking unit 701, a generating unit 702, a first sending unit 703 and a first converting unit 704.
[0077] Specifically, the verification unit 701 is used to receive a target query request from a target user, and verify the target query request to obtain a verification result.
[0078] The generating unit 702 is configured to generate a request message when the verification result is that the verification is passed, wherein the preset position in the request message contains a preset character.
[0079] The first sending unit 703 is used to send the request message to the host system, wherein the host system is used to store the user's order information, the host system deploys the target service, and the target service is used to obtain the user's order information according to the request message.
[0080] The first conversion unit 704 is used to receive the target message data returned by the host system, and perform format conversion on the target message data to obtain a first query result of the target query request.
[0081] The query device for order information provided in the second embodiment of the present application receives the target query request of the target user through the verification unit 701, and verifies the target query request to obtain the verification result; the generation unit 702 generates a request message when the verification result is passed, wherein the preset position in the request message contains preset characters; the first sending unit 703 sends the request message to the host system, wherein the host system is used to store the user's order information, and the host system deploys the target service, and the target service is used to obtain the user's order information according to the request message; the first conversion unit 704 receives the target message data returned by the host system, and converts the format of the target message data to obtain the first query result of the target query request, which solves the problem in the related art that when querying the user's order information, the user cannot obtain the order information due to the failure of the host system to synchronize data with other databases. By verifying the target query request, generating a request message for the target query request, and sending the request message to the RTA service of the host system, the data stored in the host system can be quickly read through the RTA service according to the request message to obtain the query result of the target query request, thereby avoiding the problem of being unable to respond to user query requests due to synchronization failure of the host system, improving the efficiency of users querying order information, and improving the reliability of airlines responding to user queries.
[0082] Optionally, in the query device for order information provided in Example 2 of the present application, the above-mentioned first conversion unit 704 includes: a calling subunit, used to receive target message data by calling the target service, wherein the target message data at least includes: a binary file; a determination subunit, used to obtain identification information of the binary file, and determine the identification information of the target user based on the identification information; a parsing subunit, used to parse the binary file based on preset field information, and determine the order information of the target user based on the parsing result and the identification information of the target user, wherein the parsing result includes the order information corresponding to each preset field; a conversion subunit, used to convert the order information of the target user into a preset data structure to obtain a first query result.
[0083] Optionally, in the query device for order information provided in Example 2 of the present application, the above-mentioned conversion sub-unit includes: a first generation module, used to generate a preset data node corresponding to each preset field based on the preset field information; a conversion module, used to convert the order information corresponding to each preset field according to the preset data node corresponding to each preset field, and obtain the target data node corresponding to each preset field; a second generation module, used to generate a first query result based on the target data node corresponding to each preset field and the preset data structure.
[0084] Optionally, in the query device for order information provided in Example 2 of the present application, the above-mentioned device also includes: a reading unit, used to read the log data of the host system after sending the request message to the host system; an acquisition unit, used to obtain the change data of the host system through the target network terminal when the log data indicates that there is a data change in the host system, wherein the target network terminal is a terminal that accesses data by directly connecting to the host system; a synchronization unit, used to synchronize the change data of the host system to a backup database; a first query unit, used to query the data required for the target query request in the backup database, and perform data conversion to obtain a second query result.
[0085] Optionally, in the order information query device provided in Example 2 of the present application, the above-mentioned device also includes: a receiving unit, used to receive first data at every preset time period after sending the request message to the host system, wherein the first data at least includes: data stored in the host system, and change data of the host system within the preset time period; a second sending unit, used to send the first data to a query database, wherein the query database is a system for querying received query requests; a second query unit, used to query the data required for the target query request in the query database, and perform data conversion to obtain a third query result.
[0086] Optionally, in the query device for order information provided in Example 2 of the present application, the above-mentioned device also includes: a first determination unit, used to determine the query information of the target query request when the verification result is verification passed, wherein the query information includes at least one of the following: query type, query range, data source; a second determination unit, used to determine the target query method based on the query information, wherein the target query method includes at least one of the following: a first query method, a second query method and a third query method, wherein the first query method is to receive the message data returned by the host system, and format the message data to obtain a first query result of the target query request; the second query method is to query the data required for the target query request in the backup database, and perform data conversion to obtain the second query result; the third query method is to query the data required for the target query request in the query database, and perform data conversion to obtain the third query result; the third query unit is used to query the target query request according to the target query method to obtain the query result of the target query request.
[0087] Optionally, in the query device for order information provided in Example 2 of the present application, the above-mentioned device also includes: a fourth query unit, which is used to, when the verification result is a passed verification and it is detected that the query database fails to receive the first data, query the data required for the target query request through the backup database, and perform data conversion to obtain a second query result; or; a second conversion unit, which is used to receive the target message data returned by the host system, and perform format conversion on the target message data to obtain the first query result.
[0088] The order information query device includes a processor and a memory. The above-mentioned verification unit 701, generation unit 702, first sending unit 703 and first conversion unit 704 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0089] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the efficiency of users obtaining order information can be improved by adjusting kernel parameters.
[0090] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0091] Embodiment 3 of the present application provides a computer-readable storage medium on which a program is stored, and when the program is executed by a processor, a method for querying order information is implemented.
[0092] Embodiment 4 of the present application provides a processor, which is used to run a program, wherein a method for querying order information is executed when the program is running.
[0093] like Figure 8 As shown, embodiment 5 of the present application provides an electronic device, the device includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor implements the following steps when executing the program: receiving a target query request from a target user, and verifying the target query request to obtain a verification result; when the verification result is that the verification passes, generating a request message, wherein a preset position in the request message contains preset characters; sending the request message to a host system, wherein the host system is used to store the user's order information, the host system deploys a target service, and the target service is used to obtain the user's order information according to the request message; receiving the target message data returned by the host system, and converting the format of the target message data to obtain a first query result of the target query request.
[0094] When the processor executes the program, the following steps are also implemented: receiving the target message data returned by the host system, and converting the format of the target message data to obtain the first query result of the target query request, including: receiving the target message data by calling the target service, wherein the target message data at least includes: a binary file; obtaining identification information of the binary file, and determining the identification information of the target user based on the identification information; parsing the binary file based on preset field information, and determining the order information of the target user based on the parsing result and the identification information of the target user, wherein the parsing result includes the order information corresponding to each preset field; converting the order information of the target user into a preset data structure to obtain the first query result.
[0095] When the processor executes the program, the following steps are also implemented: the order information of the target user is converted into a preset data structure to obtain a first query result, including: generating a preset data node corresponding to each preset field based on the preset field information; converting the order information corresponding to each preset field according to the preset data node corresponding to each preset field to obtain a target data node corresponding to each preset field; and generating the first query result based on the target data node corresponding to each preset field and the preset data structure.
[0096] The processor also implements the following steps when executing the program: after sending the request message to the host system, the above method also includes: reading the log data of the host system; when the log data indicates that there is a data change in the host system, obtaining the change data of the host system through the target network terminal, wherein the target network terminal is a terminal that accesses data by directly connecting to the host system; synchronizing the change data of the host system to a backup database; in the backup database, querying the data required for the target query request, and performing data conversion to obtain a second query result.
[0097] When the processor executes the program, the following steps are also implemented: after sending the request message to the host system, the above method also includes: receiving first data at intervals of a preset time period, wherein the first data at least includes: data stored in the host system, and change data of the host system within the preset time period; sending the first data to a query database, wherein the query database is a system for querying received query requests; in the query database, querying the data required for the target query request, and performing data conversion to obtain a third query result.
[0098] When the processor executes the program, the following steps are also implemented: when the verification result is that the verification is passed, the above method also includes: determining the query information of the target query request, wherein the query information includes at least one of the following: query type, query range, data source; determining the target query method based on the query information, wherein the target query method includes at least one of the following: a first query method, a second query method and a third query method, wherein the first query method is to receive the message data returned by the host system, and perform format conversion on the message data to obtain the first query result of the target query request; the second query method is to query the data required for the target query request in the backup database, and perform data conversion to obtain the second query result; the third query method is to query the data required for the target query request in the query database, and perform data conversion to obtain the third query result; query the target query request according to the target query method to obtain the query result of the target query request.
[0099] When the processor executes the program, the following steps are also implemented: after the verification result is that the verification is passed, the above method also includes: when it is detected that the query database fails to receive the first data, querying the data required for the target query request through the backup database, and performing data conversion to obtain the second query result; or; receiving the target message data returned by the host system, and performing format conversion on the target message data to obtain the first query result.
[0100] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0101] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: receiving a target query request from a target user, and verifying the target query request to obtain a verification result; when the verification result is that the verification passes, generating a request message, wherein a preset position in the request message contains preset characters; sending the request message to a host system, wherein the host system is used to store the user's order information, the host system deploys a target service, and the target service is used to obtain the user's order information according to the request message; receiving the target message data returned by the host system, and converting the format of the target message data to obtain a first query result of the target query request.
[0102] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: receiving target message data returned by a host system, and converting the format of the target message data to obtain a first query result of a target query request, including: receiving target message data by calling a target service, wherein the target message data at least includes: a binary file; obtaining identification information of the binary file, and determining identification information of a target user based on the identification information; parsing the binary file based on preset field information, and determining order information of the target user based on the parsing result and the identification information of the target user, wherein the parsing result includes order information corresponding to each preset field; converting the order information of the target user into a preset data structure to obtain a first query result.
[0103] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: converting the order information of the target user into a preset data structure to obtain a first query result, including: generating a preset data node corresponding to each preset field based on the preset field information; converting the order information corresponding to each preset field according to the preset data node corresponding to each preset field to obtain a target data node corresponding to each preset field; generating the first query result based on the target data node corresponding to each preset field and the preset data structure.
[0104] When executed on a data processing device, it is also suitable for executing a program initialized with the following method steps: after sending a request message to the host system, the above method also includes: reading the log data of the host system; when the log data indicates that there is a data change in the host system, obtaining the change data of the host system through the target network terminal, wherein the target network terminal is a terminal that accesses data by directly connecting to the host system; synchronizing the change data of the host system to a backup database; in the backup database, querying the data required for the target query request, and performing data conversion to obtain a second query result.
[0105] When executed on a data processing device, it is also suitable for executing a program initialized with the following method steps: after sending a request message to the host system, the above method also includes: receiving first data at intervals of a preset time period, wherein the first data at least includes: data stored in the host system, and change data of the host system within a preset time period; sending the first data to a query database, wherein the query database is a system for querying received query requests; in the query database, querying the data required for the target query request, and performing data conversion to obtain a third query result.
[0106] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: when the verification result is that the verification is passed, the above method also includes: determining the query information of the target query request, wherein the query information includes at least one of the following: query type, query range, data source; determining the target query method based on the query information, wherein the target query method includes at least one of the following: a first query method, a second query method and a third query method, wherein the first query method is to receive the message data returned by the host system, and perform format conversion on the message data to obtain a first query result of the target query request; the second query method is to query the data required for the target query request in the backup database, and perform data conversion to obtain a second query result; the third query method is to query the data required for the target query request in the query database, and perform data conversion to obtain a third query result; query the target query request according to the target query method to obtain the query result of the target query request.
[0107] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: after the verification result is that the verification is passed, the above method also includes: when it is detected that the query database fails to receive the first data, querying the data required for the target query request through the backup database, and performing data conversion to obtain a second query result; or; receiving the target message data returned by the host system, and performing format conversion on the target message data to obtain the first query result.
[0108] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0109] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0110] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0112] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0113] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0114] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0115] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0116] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0117] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for querying order information, characterized in that: include: Receiving a target query request from a target user, and verifying the target query request to obtain a verification result; If the verification result is that the verification is passed, a request message is generated, wherein the preset position in the request message contains a preset character; Sending the request message to a host system, wherein the host system is used to store the user's order information, the host system deploys a target service, and the target service is used to obtain the user's order information according to the request message; The target message data returned by the host system is received, and the format of the target message data is converted to obtain a first query result of the target query request.
2. The method according to claim 1, characterized in that Receiving target message data returned by the host system, and performing format conversion on the target message data to obtain a first query result of the target query request, including: receiving the target message data by calling the target service, wherein the target message data at least includes: a binary file; Acquire identification information of the binary file, and determine identification information of the target user according to the identification information; Parsing the binary file according to the preset field information, and determining the order information of the target user according to the parsing result and the identification information of the target user, wherein the parsing result includes the order information corresponding to each preset field; The order information of the target user is converted into a preset data structure to obtain the first query result.
3. The method according to claim 2, characterized in that Converting the order information of the target user into a preset data structure to obtain the first query result includes: Generate a preset data node corresponding to each preset field according to the preset field information; According to the preset data nodes corresponding to each preset field, the order information corresponding to each preset field is converted to obtain the target data node corresponding to each preset field; The first query result is generated according to the target data node corresponding to each preset field and the preset data structure.
4. The method according to claim 1, characterized in that: After sending the request message to the host system, the method further includes: Reading log data of the host system; When the log data indicates that data of the host system has been changed, acquiring the changed data of the host system through a target network terminal, wherein the target network terminal is a terminal that accesses data by directly connecting to the host system; Synchronize the changed data of the host system to the backup database; In the backup database, the data required by the target query request is searched, and the data is converted to obtain a second query result.
5. The method according to claim 4, characterized in that After sending the request message to the host system, the method further includes: receiving first data at intervals of a preset time period, wherein the first data at least includes: data stored in the host system and change data of the host system within the preset time period; Sending the first data to a query database, wherein the query database is a system for querying received query requests; In the query database, the data required by the target query request is searched, and the data is converted to obtain a third query result.
6. The method according to claim 5, characterized in that When the verification result is that the verification is passed, the method further includes: Determine query information of the target query request, wherein the query information includes at least one of the following: query type, query scope, and data source; Determine a target query method according to the query information, wherein the target query method includes at least one of the following: a first query method, a second query method and a third query method, wherein the first query method is to receive the message data returned by the host system, and perform format conversion on the message data to obtain a first query result of the target query request; the second query method is to query the data required for the target query request in the backup database, and perform data conversion to obtain a second query result; the third query method is to query the data required for the target query request in the query database, and perform data conversion to obtain a third query result; The target query request is queried according to the target query method to obtain a query result of the target query request.
7. The method according to claim 5, characterized in that When the verification result is that the verification is passed, the method further includes: In the case where it is detected that the query database fails to receive the first data, querying the data required by the target query request through the backup database, and performing data conversion to obtain the second query result; or; The target message data returned by the host system is received, and the format of the target message data is converted to obtain the first query result.
8. A device for querying order information, characterized in that: include: A verification unit, configured to receive a target query request from a target user, and verify the target query request to obtain a verification result; A generating unit, configured to generate a request message when the verification result is a verification pass, wherein a preset position in the request message contains a preset character; A first sending unit is used to send the request message to a host system, wherein the host system is used to store the user's order information, the host system deploys a target service, and the target service is used to obtain the user's order information according to the request message; The first conversion unit is used to receive the target message data returned by the host system, and perform format conversion on the target message data to obtain a first query result of the target query request.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes stored computer instructions, wherein when the computer instructions are executed by a processor, the method for querying order information described in any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the order information query method described in any one of claims 1 to 7.