Information query method, electronic device, storage medium and program product
By analyzing and converting path strings into path arrays and using an information computing system to query target data objects, the problems of inefficiency and insufficient accuracy of traditional manual methods are solved, and efficient and accurate query of flight information in aviation business is achieved.
Patent Information
- Application Number
- CN202411843297.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-04
AI Technical Summary
In the information processing of aviation business, the traditional manual construction request and comparison result methods are inefficient and prone to errors, which cannot meet the continuity and real-time requirements of aviation business, resulting in low accuracy of information query.
By analyzing the path string in the information query instruction, converting it into a path array, and using the information computing system to query the target data object, ensuring that the information computing system can accurately and quickly locate the target data object, achieving efficient and accurate query of target flight information.
It improves the accuracy of querying target flight information, meets the continuity and real-time requirements of aviation business, reduces the consumption of system resources, and enhances the overall performance and reliability of the system.
Smart Images

Figure CN119759954A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information query, and in particular to an information query method, electronic equipment, storage medium and program product. Background Art
[0002] In the information processing of aviation business, especially in domestic ticket inquiry services, the fare inquiry system (Domestic Fare Shopping System, referred to as DShop system) is responsible for providing flight information and selection, and the fare calculation system (Domestic Fare Pricing System, referred to as DPrice system) is responsible for calculating fares based on the user's itinerary details. Since the two systems run independently, there are certain challenges in data consistency verification.
[0003] The traditional method of manually constructing requests and comparing results is inefficient and prone to errors. At the same time, the continuity and real-time nature of aviation business requires the system to be able to continuously verify freight rate information, but the manual method has time interruptions and cannot meet this requirement, which affects the accuracy of information query, resulting in low information query accuracy in related technologies.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide an information query method, an electronic device, a storage medium and a program product, so as to at least solve the technical problem of low accuracy of information query in the related art.
[0006] According to one aspect of an embodiment of the present invention, there is provided an information query method, comprising: in response to receiving an information query instruction for a target flight from an information query system, parsing a path character string in the information query instruction, wherein the path character string is used to locate a query path for target information corresponding to the target flight; converting the path character string into a path array, wherein the elements contained in the path array are used to represent a target data object, the path array is used to guide the query of the target data object, and the target data object is used to represent a data object associated with the target flight; inputting the path array into an information computing system, querying the target data object using the information computing system, and obtaining a query result for the target flight, wherein the query result is used to indicate whether the target information of the target flight has been queried.
[0007] Furthermore, the target data object is queried using the information computing system to obtain a query result of the target flight, including: using the information computing system to access multiple data objects included in the information computing system according to the path array to obtain an access result, wherein the access result is used to indicate whether the target data object is successfully accessed; in response to the access result being that the target data object is successfully accessed, determining the target information of the target flight based on the target data object, and the query result is that the target information of the target flight is queried; in response to the access result being that the target data object is not successfully accessed, determining the query result is that the target information of the target flight is not queried.
[0008] Furthermore, determining the target information of the target flight based on the target data object includes: obtaining an object access identifier of the target data object; locating a nested structure of the target data object based on the object access identifier, wherein the nested structure represents a structure for storing the target data object; locating preset target information of the target data object based on the nested structure, and determining the target information of the target flight for which the preset target information is provided.
[0009] Furthermore, before converting the path string into a path array, the method also includes: determining whether the path string satisfies a query path format condition; in response to the path string satisfying the query path format condition, converting the path string into a path array; in response to the path string not satisfying the query path format condition, outputting a first prompt message, wherein the first prompt message is used to prompt that an abnormality has occurred in the query instruction.
[0010] Further, converting the path character string into a path array includes: converting the path character string into a path array using a conversion model, wherein the conversion model is obtained by training an initial conversion model using sample flights and sample target information corresponding to the sample flights.
[0011] Furthermore, the path array also includes an array index, which is used to call other path arrays except the path array in the pre-set multiple path arrays, and the other path arrays contain target data objects. The path array is used to guide the query of the array index when it contains the array index.
[0012] Furthermore, the method further includes: in response to the query result that the target information of the target flight is not found, outputting second prompt information, wherein the second prompt information is used to prompt that the target information of the target flight is not found.
[0013] According to another aspect of an embodiment of the present invention, an information query device is also provided, including: a parsing module, used to parse a path character string in the information query instruction in response to receiving an information query instruction for a target flight from an information query system, wherein the path character string is used to locate a query path for target information corresponding to the target flight; a first conversion module, used to convert the path character string into a path array, wherein the elements contained in the path array are used to represent a target data object, the path array is used to guide the query of the target data object, and the target data object is used to represent a data object associated with the target flight; a query module, used to input the path array into an information computing system, use the information computing system to query the target data object, and obtain a query result for the target flight, wherein the query result is used to indicate whether the target information of the target flight has been queried.
[0014] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the above-mentioned information query method is executed when the program is running.
[0015] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored executable program, wherein when the executable program runs, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned information query method.
[0016] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and the computer program implements the above information query method when executed by a processor.
[0017] In an embodiment of the present invention, after receiving an information query instruction for a target flight from an information query system, the path string in the information query instruction is first parsed, and then the path string is converted into a path array, and then the path array is input into the information computing system, and the information computing system is used to query the target data object to obtain the query result of the target flight. It is easy to notice that the present application converts the path string into a path array, and then guides the information computing system to query the target data table object through the path array, thereby obtaining the target information of the target flight. The above process, through the data conversion between the path string and the path array, and the precise guidance of the information computing system by the path array, ensures that the information computing system can accurately and quickly locate the target data table object when executing the query, and realizes efficient and accurate query of the target flight information, thereby improving the query accuracy of the target flight information, and thus solving the technical problem of low information query accuracy in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0019] Figure 1 is a flow chart of an information query method according to an embodiment of the present invention;
[0020] Figure 2 is a flow chart of an optional information query method according to an embodiment of the present invention;
[0021] Figure 3 is a schematic diagram of an information query device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] According to an embodiment of the present invention, an embodiment of an information query method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0025] Figure 1 is a flow chart of an information query method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0026] Step S102, in response to receiving an information query instruction for a target flight from an information query system, parsing a path character string in the information query instruction, wherein the path character string is used to locate a query path for target information corresponding to the target flight.
[0027] The above-mentioned information query system may refer to a software system used in aviation business to retrieve aviation data such as flight information, fare information, flight schedules, etc. The types of information query systems may include but are not limited to fare query systems, flight schedule query systems, and comprehensive query systems, etc. The specific type of information query system needs to be determined based on system design and user needs, and is not limited here. The information query system can be used to respond to user query requests, provide flight information, and help users make ticket purchase decisions, etc.
[0028] The above-mentioned target flight may refer to a specific flight that the user inquires about through the information inquiry system. The role of the target flight may include but is not limited to being the core of the information inquiry instruction. The system will provide corresponding information such as fares, seat conditions, flight schedules, etc. based on the target flight specified by the user.
[0029] The above-mentioned information query instruction may refer to a command initiated by a user or a system for requesting target flight information. The types of information query instructions may include but are not limited to fare information query instructions, flight schedule query instructions, comprehensive information query instructions, etc. The specific information query instructions need to be determined based on user needs and query system functions, and are not limited here. Information query instructions can be used to guide the information query system to retrieve data according to user needs, and are a key link in the interaction between the system and the user.
[0030] The above-mentioned path string may refer to the specific location used in the information query instruction to guide the information query system to locate the target information. The data format of the path string may include but is not limited to the Extensible Markup Language (XML) format. The specific path string needs to be determined according to the data format in the actual information query system and is not limited here. The path string is the key to achieving fast and accurate data positioning. It enables the information query instruction to directly point to specific information in a complex data structure, avoiding full data traversal and improving query efficiency.
[0031] The above-mentioned target information may refer to specific data pointed to by the information query instruction, which the user or system hopes to obtain. The target information is the result of the user's query request, which may be specific data such as flight number, fare, seat status, departure time, etc.
[0032] In an optional embodiment, when receiving an information query instruction for a target flight from an information query system or a user, the system begins to parse the path string in the instruction, and guides the system to quickly and accurately locate the specific information query path corresponding to the target flight through the path string. The above process enables the system to quickly locate the required information of the target flight by responding to the path string in the information query instruction, accelerates the information query process, improves the user experience, reduces the consumption of system resources, and enhances the overall performance and reliability of the system.
[0033] Step S104, converting the path character string into a path array, wherein the elements contained in the path array are used to represent the target data object, the path array is used to guide the query of the target data object, and the target data object is used to represent the data object associated with the target flight.
[0034] The above-mentioned path array may refer to an array form generated after the path string is parsed. Each element in the path array represents a level or attribute in the target data object. The order of the elements in the path array reflects the specific path from the root node to the target data object. Thus, the path array can guide the system to access and retrieve data in a complex data structure in a predetermined order. The type and content of the path array depend on the structure of the target data object and the writing method of the path string.
[0035] In an optional embodiment, if you want to query the cost of a certain class in the flight information, you can define the array as "Flight Information", "Fee", "Class", "Class Location", "Price", specifically ["FlightInfo","Fares","Cabin",0,"Price"]: this array is used to query the price of the first class in the flight information; if you want to query the departure city information of a flight in the flight information, you can define the array as "Flight","Flight","Departure Information","City", specifically ["Flight",2,"Departure","City"]: this array is used to query the departure city information of the third flight.
[0036] The above-mentioned target data object may refer to a data structure associated with the target flight and stored in the information query system. The data type of the target data object may include but is not limited to JavaScript object notation (JSON object for short), XML node or any other data type that can store and express aviation data, which is not limited here. The type of the target data object may include but is not limited to flight basic information object, fare information object, etc. The specific target data object needs to be determined based on the stored data content, which is not limited here.
[0037] In an optional embodiment, the path string is converted into a path array, which can convert the abstract character path into a data structure that can be processed by a computer, so that the system can access and query the information in the target data object more efficiently. At the same time, the elements in the path array serve as a step guide for the query, which can help the system accurately locate the required data, while the target data object is a structure for storing specific aviation data. The combination of the two realizes fast and accurate positioning from query instructions to data extraction, thereby improving the efficiency of information query and user experience.
[0038] Step S106, input the path array into the information computing system, use the information computing system to query the target data object, and obtain the query result of the target flight, wherein the query result is used to indicate whether the target information of the target flight is queried.
[0039] The above-mentioned information computing system may refer to a system capable of parsing a path array and querying the stored aviation data based on the path. The information computing system may be used to quickly locate the target data object based on the path array and extract the required data fields therefrom, thereby providing users with accurate and timely information services.
[0040] The above-mentioned query result may refer to the data returned by the information computing system after executing the query according to the path array, which is used to indicate whether the target information of the target flight has been successfully queried, as well as the specific information content of the query. The query result types may include but are not limited to successful query results and failed query results, among which the successful query result may include specific data of the target information, such as fares, remaining number of seats, etc., and the failed query result may include error information or prompts, indicating problems in the query process, such as invalid path array, non-existence of target data, etc. The specific query result can be determined based on the actual situation and is not limited here.
[0041] In an optional embodiment, the information computing system can accurately locate and query the target information in the target data object by parsing the path array, and the query result directly reflects the execution effect of the query instruction, providing the user with the required information or error feedback. This information query mechanism based on the path array not only improves the efficiency and accuracy of data query, but also brings flexibility and reliability to the data management and information service of the aviation system.
[0042] In an embodiment of the present invention, after receiving an information query instruction for a target flight from an information query system, the path string in the information query instruction is first parsed, and then the path string is converted into a path array, and then the path array is input into the information computing system, and the information computing system is used to query the target data object to obtain the query result of the target flight. It is easy to notice that the present application converts the path string into a path array, and then guides the information computing system to query the target data table object through the path array, thereby obtaining the target information of the target flight. The above process, through the data conversion between the path string and the path array, and the precise guidance of the information computing system by the path array, ensures that the information computing system can accurately and quickly locate the target data table object when executing the query, and realizes efficient and accurate query of the target flight information, thereby improving the query accuracy of the target flight information, and thus solving the technical problem of low information query accuracy in the related technology.
[0043] Optionally, the target data object is queried using the information computing system to obtain a query result for the target flight, including: using the information computing system to access multiple data objects contained in the information computing system according to a path array to obtain an access result, wherein the access result is used to indicate whether the target data object is successfully accessed; in response to the access result being successful access to the target data object, determining the target information of the target flight based on the target data object, and the query result is that the target information of the target flight is queried; in response to the access result being unsuccessful access to the target data object, determining the query result is that the target information of the target flight is not queried.
[0044] The above-mentioned multiple data objects may refer to a set of data structures stored within the system for representing different flights, routes, services or status information, wherein each data object represents specific information of one or more flights, such as fares, seat conditions, flight schedules, etc. The data format types of the multiple data objects may include but are not limited to JSON format, XML format or any other format that can effectively store and represent data. The specific data format needs to be determined according to the data type and storage situation, and is not limited here.
[0045] The above-mentioned access result may refer to the feedback result on the access status returned by the information computing system after receiving the path array and attempting to access the target data object. The types of access results may include but are not limited to successful access, failed access, and access exception, etc. The specific access result needs to be determined based on the actual access situation and system settings, and is not limited here. The access result can be used to indicate whether the system has successfully found the target data object and can extract the required information from it.
[0046] In an optional embodiment, by applying the path array to the information computing system, the system can access the target data object among multiple data objects according to the predetermined path to obtain the access result. If the access result shows that the target data object is successfully accessed, the system further extracts the target information from the data object and returns it as the query result; if the access result shows that the target data object is not successfully accessed, the system determines that the query result is that the target information is not found, which may be caused by the non-existence of the data object, the path array error or the change of the data structure. The above process of generating corresponding access results based on different access states of the information computing system ensures the accuracy and robustness of information query, so that the system can accurately locate and extract the required information through the path array even when the data structure is complex and there are many data objects. At the same time, the access result, as the key feedback in the query process, can help the system to adjust the query strategy in time, thereby improving the query efficiency and reducing the system failure caused by data access errors.
[0047] Optionally, determining the target information of the target flight based on the target data object includes: obtaining an object access identifier of the target data object; locating a nested structure of the target data object based on the object access identifier, wherein the nested structure represents a structure for storing the target data object; locating preset target information of the target data object based on the nested structure, and determining the target information of the target flight for which the preset target information is provided.
[0048] The above-mentioned object access identifier may refer to a tag or index used to uniquely identify specific information in the target data object. The type of object access identifier may include but is not limited to a nested structure identifier, an array index identifier or a field name identifier, etc. The specific object access identifier type needs to be determined based on the structure and content of the data object, and is not limited here. The object access identifier can be used to enable the system to quickly locate a specific field or element in the data object based on the identifier, thereby achieving accurate access to and extraction of target flight target information.
[0049] The above-mentioned nested structure may refer to a structural form in which an object or array contains other objects or arrays in a data object. The types of nested structures may include but are not limited to object nesting, array nesting, etc. The specific nested structure type needs to be determined based on the data storage requirements and data complexity. The role of the nested structure may include but is not limited to allowing hierarchical and grouped storage of data, so that complex data can be represented and managed in an organized manner.
[0050] The above-mentioned preset target information may refer to specific information that is pre-set and that the system needs to search for and return. The types of preset target information may include but are not limited to preset fare information, preset seat information, preset flight schedule information, etc. The specific preset target information needs to be determined based on aviation business needs and is not limited here. The preset target information can be used to clarify the data content that the system needs to access and return.
[0051] In an optional embodiment, the system first obtains the object access identifier of the target data object, then locates the nested structure of the target data object through the object access identifier, and then accesses the internal structure of the data object layer by layer according to the query requirements of the preset target information until the target information is found and determined. This process not only improves the efficiency of data query, but also ensures the accuracy of the query results, provides users with timely and reliable information feedback, and also provides solid technical support for the automated processing of aviation business.
[0052] In an optional embodiment, the process of obtaining the fare information of the target flight based on the nested structure is as follows: first, obtain the object access identifier of the target data object, which may be an identifier composed of a specified airline code, flight number, date, etc.; then, use the object access identifier to locate the specific location in the data model. It is necessary to find the preset target information corresponding to the object access identifier in different arrays. This process may include finding the target data object that matches the object access identifier in the airline "airlines" array, finding the matching flight in its flight "flights" array, and finally finding the corresponding fare information in the flight's fare "fare" array. The above process, by traversing and matching these nested attributes, realizes the rapid acquisition of the fare information associated with the target flight.
[0053] Optionally, before converting the path string into a path array, the method also includes: determining whether the path string satisfies a query path format condition; in response to the path string satisfying the query path format condition, converting the path string into a path array; in response to the path string not satisfying the query path format condition, outputting a first prompt message, wherein the first prompt message is used to prompt that an abnormality has occurred in the query instruction.
[0054] The above-mentioned query path format conditions may refer to a set of predefined query path format rules. The types of query path conditions may include but are not limited to syntax structure check conditions, field name and index validity verification conditions, path depth restriction conditions, etc. The specific query path format conditions need to be determined based on the actual data structure and type, and are not limited here. The query path format conditions can be used to verify whether the path string conforms to the query path format defined by the system, thereby ensuring that the path string can be correctly parsed and used for data query.
[0055] The above-mentioned first prompt information may refer to feedback information output by the system to indicate that the query instruction is abnormal when the path character string does not meet the query path format conditions. The type of the first prompt information may include but is not limited to the error type of the path character string, the specific error location, and necessary correction suggestions, etc. The specific first prompt information can be determined based on the actual error type, which is not limited here. The first prompt information can be used to provide users with detailed information about the query instruction error, help users or system administrators quickly locate and correct problems, avoid invalid query attempts, etc.
[0056] In an optional embodiment, by determining whether a path string satisfies a query path format condition before converting the path string into a path array, the system can detect and prevent potential query errors in a timely manner, thereby ensuring the efficiency and accuracy of data queries. At the same time, by outputting a first prompt message, the user can intuitively understand possible problems in the query instruction and take corresponding corrective measures, thereby avoiding invalid queries and enhancing the user-friendliness and error recovery capabilities of the system.
[0057] Optionally, converting the path string into a path array includes: converting the path string into a path array using a conversion model, wherein the conversion model is obtained by training an initial conversion model using sample flights and sample target information corresponding to the sample flights.
[0058] The above-mentioned conversion model may refer to an algorithm or data structure model for parsing and converting a path string into a path array. The types of conversion models may include but are not limited to conversion models based on XML parsing libraries, conversion models based on regular expressions, and conversion models based on machine learning. The specific conversion model needs to be determined based on the data type and complexity, and is not limited here. The conversion model can be used to realize the automated and standardized conversion of path strings to path arrays, improve query efficiency and accuracy, etc.
[0059] The above-mentioned sample flights may refer to a set of flight data used to train the conversion model. The sample flights contain typical structures and contents of target information and can be used to simulate path strings in actual flight query scenarios. The types of sample flights may include but are not limited to actual flight data, sample data constructed based on aviation business rules and requirements, etc. The sample flights can be used to build and optimize the conversion model to ensure that the conversion model can accurately identify and parse path strings encountered in actual query scenarios.
[0060] The sample target information may refer to specific information such as fares, number of seats, flight time, etc. corresponding to the sample flight and which can be queried through the path string. The sample target information may be used to verify whether the path array generated by the conversion model can correctly locate and extract the target information.
[0061] The above-mentioned initial conversion model may refer to a model version pre-set in the system before training or optimizing the conversion model.
[0062] In an optional embodiment, the initial conversion model is trained using sample flight and sample target information to obtain a conversion model, so that the conversion model can be used to convert the path string into a path array in subsequent data conversion. The above data conversion method based on the conversion model can not only process the standard path string format, but also automatically learn and adapt to non-standard or complex format path strings through training, thereby improving the flexibility and user-friendliness of the system and providing a solid foundation for subsequent data query and processing.
[0063] Optionally, the path array also includes an array index, which is used to call other path arrays except the path array in the pre-set multiple path arrays. The other path arrays contain target data objects. The path array is used to guide the query array index when it contains the array index.
[0064] The above-mentioned array index may refer to a digital identifier in a path array used to specify the position of an element in an array. The types of array indexes may include but are not limited to single indexes, range indexes, and dynamic indexes. The specific array index needs to be determined based on the structure and element type of the array in the data object, and is not limited here. The array index can be used to allow query instructions to directly access specific elements in the array based on the index without traversing the entire array.
[0065] The above-mentioned other path arrays may refer to path arrays called in the path array, other than the current path array, for accessing and querying other parts of the data object.
[0066] In an optional embodiment, the path array contains array indexes and calls to other path arrays, so that query instructions can accurately access and process array elements nested in data objects, as well as information associated with other data objects. This mechanism not only improves the efficiency and accuracy of data queries, but also provides a flexible solution for processing complex data structures and query requirements, enhancing the system's data processing capabilities and the execution effect of user query instructions. By calling other path arrays and using array indexes, the information computing system can more intelligently parse and execute query instructions, thereby achieving in-depth mining and refined management of flight information.
[0067] Optionally, the method further includes: in response to the query result that the target information of the target flight is not found, outputting second prompt information, wherein the second prompt information is used to prompt that the target information of the target flight is not found.
[0068] The above-mentioned second prompt information may refer to the feedback information output by the system when the information computing system attempts to query the target flight target information according to the path array but fails to find the corresponding data. The second prompt information can be used to feedback the specific reasons for the query failure, helping users or system administrators understand why the query failed and how to correct the query instructions or data status.
[0069] In an optional embodiment, when the query result is that the target information of the target flight is not found, a second prompt message is output. The second prompt message helps the user understand the problem with the query instruction, adjust the query strategy in time, and avoid continuous invalid query attempts, thereby improving the efficiency and experience of user operations, and reducing the waste of system resources caused by frequent processing of invalid queries.
[0070] In an optional embodiment, Figure 2 is a flow chart of an optional information query method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0071] Step S202, data model definition, defines the data structure of the path string in the information query instruction through the type script TypeScript.
[0072] Step S204, query function design, the query function can be based on multiple query conditions and query the query results that meet the query conditions from the information computing system. The specific steps of the query function to perform the query include: the query function receives the query object containing multiple query conditions in the information query system, and then the query function traverses all search results, checks whether each result meets the query conditions, and finally obtains the query results that meet the query conditions.
[0073] Step S206, field mapping is implemented, and the path string is converted into a path array through field mapping. First, the path string corresponding to different query conditions needs to be determined, and then the field mapping rules of different query conditions are recorded through a configuration file or a database. Finally, a field mapping function is created to convert the path string into a path array according to the predefined field mapping rules.
[0074] Step S208, data conversion and parsing process, first reads the path string and applies the field mapping rules to convert the path string into a path array, then processes the converted path array to extract valuable information, and finally outputs the result.
[0075] According to another aspect of an embodiment of the present invention, an information query device is further provided, which can execute the information query method of the above embodiment. The specific implementation method and preferred application scenario are the same as those of the above embodiment and will not be described in detail here.
[0076] Figure 3 is a schematic diagram of an information query device according to an embodiment of the present invention. Figure 3 As shown, the device includes the following: a parsing module 302 , a first conversion module 304 , and a query module 306 .
[0077] The parsing module 302 is used to parse the path character string in the information query instruction in response to receiving the information query instruction for the target flight from the information query system, wherein the path character string is used to locate the query path of the target information corresponding to the target flight; the first conversion module 304 is used to convert the path character string into a path array, wherein the elements contained in the path array are used to represent the target data object, the path array is used to guide the query of the target data object, and the target data object is used to represent the data object associated with the target flight; the query module 306 is used to input the path array into the information computing system, use the information computing system to query the target data object, and obtain the query result of the target flight, wherein the query result is used to indicate whether the target information of the target flight is queried.
[0078] Optionally, the query module includes: an access unit, used to use the information computing system to access multiple data objects contained in the information computing system according to the path array to obtain an access result, wherein the access result is used to indicate whether the target data object is successfully accessed; a first determination unit, used to determine the target information of the target flight based on the target data object in response to the access result being that the target data object is successfully accessed, and the query result is that the target information of the target flight is queried; a second determination unit, used to determine that the query result is that the target information of the target flight is not queried in response to the access result being that the target data object is not successfully accessed.
[0079] Optionally, the first determination unit includes: an acquisition subunit, used to acquire an object access identifier of the target data object; an access subunit, used to locate a nested structure of the target data object based on the object access identifier, wherein the nested structure represents a structure for storing the target data object; a determination subunit, used to locate preset target information of the target data object based on the nested structure, and determine the target information of the target flight for which the preset target information is provided.
[0080] Optionally, before converting the path string into a path array, the device also includes: a judgment module, used to judge whether the path string satisfies the query path format condition; a second conversion module, used to convert the path string into a path array in response to the path string satisfying the query path format condition; a first output module, used to output a first prompt message in response to the path string not satisfying the query path format condition, wherein the first prompt message is used to prompt that an abnormality has occurred in the query instruction.
[0081] Optionally, the first conversion module includes: a conversion unit, used to convert the path character string into a path array using a conversion model, wherein the conversion model is obtained by training an initial conversion model using sample flights and sample target information corresponding to the sample flights.
[0082] Optionally, the path array also includes an array index, which is used to call other path arrays except the path array in the pre-set multiple path arrays. The other path arrays contain target data objects. The path array is used to guide the query array index when it contains the array index.
[0083] Optionally, the device further includes: a second output module, configured to output second prompt information in response to a query result indicating that the target information of the target flight is not found, wherein the second prompt information is used to prompt that the target information of the target flight is not found.
[0084] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present invention is executed when the program is running.
[0085] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored program. When the program is executed, a processor of a device is controlled to execute the methods of various embodiments of the present invention.
[0086] The computer storage medium in the above steps can be a medium used to store certain discontinuous physical quantities in a computer memory, and the computer storage medium mainly includes semiconductors, magnetic cores, magnetic drums, magnetic tapes, laser disks, etc. The stored program included in the computer-readable storage medium can be a set of instructions that can be recognized and executed by a computer, running on an electronic computer, and is an information tool that meets certain needs of people.
[0087] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0088] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0089] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0090] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0091] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0092] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0093] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An information query method, characterized in that: include: In response to receiving an information query instruction for a target flight from an information query system, parsing a path character string in the information query instruction, wherein the path character string is used to locate a query path for target information corresponding to the target flight; Convert the path string into a path array, wherein the elements contained in the path array are used to represent a target data object, the path array is used to guide the query of the target data object, and the target data object is used to represent a data object associated with the target flight; The path array is input into an information computing system, and the target data object is queried using the information computing system to obtain a query result of the target flight, wherein the query result is used to indicate whether the target information of the target flight is queried.
2. The information query method according to claim 1, characterized in that: Utilizing the information computing system to query the target data object to obtain the query result of the target flight includes: Using the information computing system to access multiple data objects included in the information computing system according to the path array to obtain an access result, wherein the access result is used to indicate whether the target data object is successfully accessed; In response to the access result being that the target data object is successfully accessed, determining the target information of the target flight based on the target data object, and the query result being that the target information of the target flight is queried; In response to the access result being that the target data object is not successfully accessed, it is determined that the query result is that the target information of the target flight is not found.
3. The information query method according to claim 1, characterized in that: Determining target information of the target flight based on the target data object includes: Obtaining an object access identifier of the target data object; Locating a nested structure of the target data object based on the object access identifier, wherein the nested structure represents a structure for storing the target data object; The preset target information of the target data object is located based on the nested structure, and the preset target information is determined to be the target information of the target flight.
4. The information query method according to claim 1, characterized in that: Before converting the path string into a path array, the method further includes: Determine whether the path string satisfies the query path format condition; In response to the path character string satisfying the query path format condition, converting the path character string into the path array; In response to the path character string not satisfying the query path format condition, a first prompt message is output, wherein the first prompt message is used to prompt that an abnormality occurs in the query instruction.
5. The information query method according to claim 1, characterized in that: Convert the path string to a path array, including: The path character string is converted into the path array by using a conversion model, wherein the conversion model is obtained by training an initial conversion model by using sample flights and sample target information corresponding to the sample flights.
6. The information query method according to claim 1, characterized in that: The path array also includes an array index, which is used to call other path arrays other than the path array in a plurality of pre-set path arrays, wherein the other path arrays contain the target data object, and the path array is used to guide the query of the array index when it contains the array index.
7. The information query method according to any one of claims 1 to 6, characterized in that: The method further comprises: In response to the query result that the target information of the target flight is not found, second prompt information is output, wherein the second prompt information is used to prompt that the target information of the target flight is not found.
8. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 7 when running.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.