Construction Method, Device, Storage Medium and Electronic Device for Flight Information

By introducing priority lists and rule base queries in the Rete network, the problem of inefficiency of the Rete algorithm when constructing flight information is solved, and an efficient and unique information construction process is realized.

CN114330899BActive Publication Date: 2025-07-29TRAVELSKY TECHNOLOGY LIMITED
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111660497.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-07-29
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

When constructing flight information, the existing Rete algorithm has the problem of inefficient processing of large-scale information, especially when there are both commonality and opposite sex between the information, resulting in repeated construction of type nodes.

Method used

By introducing a priority list of type nodes in the Rete network, prioritize according to the node data range, determine whether there is a TypeNode that meets the conditions from the highest priority type node, and query whether there is a matching rule in the rule base. If it exists, add a preset value to the original flight information, otherwise, continue to judge or use the default value according to the priority list.

Benefits of technology

It avoids duplicate information construction, improves the processing efficiency of flight information construction, and ensures the uniqueness and efficiency of information assignment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114330899B_ABST
    Figure CN114330899B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, apparatus, storage medium, and electronic device for constructing flight information. It can obtain the original flight information; add each node data to the corresponding TypeNode in the Rete network; starting from the type node with the highest priority in the type node priority list established in advance for the first information, determine whether there is a first TypeNode in the Rete network that satisfies condition 1; if there is a first TypeNode in the Rete network, query whether there is a first rule in the rule library established in advance for the first information that satisfies condition 2 according to the node data of the first TypeNode in the Rete network; if there is a first rule, add the preset value in the first rule and the first information to the original flight information, so as to construct new flight information. The present invention can avoid repeated construction of information and has a high processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and particularly to a method, device, storage medium and electronic device for constructing flight information. Background Art

[0002] Currently, the method for constructing flight information generally constructs based on the Rete network using the Rete algorithm. However, there are certain drawbacks in using only the pure Rete algorithm. For example, for a large number of information that needs to be processed cyclically, the Rete network does not record the situation where there are both commonalities and differences among the information. This is commonly seen when constructing multiple pieces of similar information. If the types of rule matching are the same, but the matching values are different from the rule results, it will cause duplicate construction of type nodes. For those formatted information that needs to be processed in large quantities, the processing efficiency is relatively low. Summary of the Invention

[0003] In view of the above problems, the present invention provides a method, device, storage medium and electronic device for constructing flight information that overcomes or at least partially solves the above problems.

[0004] In a first aspect, a method for constructing flight information includes:

[0005] Obtaining original flight information, where the original flight information includes node data of at least one type node TypeNode in a pre-established Rete network;

[0006] Adding each piece of the node data to the corresponding TypeNode in the Rete network, where the Rete network includes a plurality of the TypeNodes, and one piece of the node data corresponds to one TypeNode;

[0007] Starting from the type node with the highest priority in a type node priority list pre-established for the first information in sequence, determining whether there is a first TypeNode in the Rete network that satisfies condition 1, where condition 1 is: the first TypeNode corresponds to the current type node in the type node priority list, and each of the type nodes in the type node priority list is sorted in sequence according to its respective node data range, and the type node with a finer divided node data range has a lower priority;

[0008] If the first TypeNode exists in the Rete network, query whether there is a first rule that meets Condition 2 in the rule base pre-established for the first information according to the node data of the first TypeNode in the Rete network, where Condition 2 is: taking the first TypeNode as a dimension, the node data range includes the node data of the first TypeNode, and the preset value for the first information is not empty;

[0009] If the first rule exists, add the preset value in the first rule and the first information to the original flight information, so as to construct a new flight information.

[0010] Combined with the first aspect, in some alternative embodiments, the method further includes:

[0011] If the first rule does not exist, start from the next type node of the current type node in the type node priority list, execute the process of determining whether there is a first TypeNode that meets Condition 1 in the Rete network and subsequent processes in the first aspect, and so on;

[0012] If new flight information is constructed according to the first rule during this period, end the process of constructing new flight information for the first information this time;

[0013] If until the determination is made according to the type node with the lowest priority in the type node priority list, and still no first rule that meets Condition 2 can be obtained, add the initial value of the preset first information and the first information to the original flight information, so as to construct a new flight information.

[0014] Combined with the first aspect, in some alternative embodiments, the method further includes:

[0015] Perform a join operation on the database table corresponding to the new flight information and the database tables corresponding to at least one other new flight information, so as to construct another new flight information, where the join operation is: an operation in a relational database that combines the records of two or more tables using the same attributes in the two or more tables.

[0016] Combined with the first aspect, in some alternative embodiments, the adding each of the node data to the corresponding TypeNode in the Rete network includes:

[0017] Respectively use each of the node data as an attribute value node and connect it to the corresponding TypeNode in the Rete network.

[0018] Second aspect, a device for constructing flight information, comprising: an original information obtaining unit, a node data adding unit, a type node judging unit, a first rule querying unit, and a flight information constructing unit;

[0019] The original information obtaining unit is configured to obtain original flight information, wherein the original flight information includes node data of at least one type node TypeNode in a pre-established Rete network;

[0020] The node data adding unit is configured to add each of the node data to the corresponding TypeNode in the Rete network, wherein the Rete network includes a plurality of the TypeNodes, and one piece of node data corresponds to one TypeNode;

[0021] The type node judging unit is configured to start from the type node with the highest priority in a type node priority list pre-established for the first information in sequence, and judge whether there is a first TypeNode in the Rete network that satisfies condition 1, wherein condition 1 is that: the first TypeNode corresponds to the current type node in the type node priority list, and each of the type nodes in the type node priority list is sorted in sequence according to its respective node data range, and the type node with a finer divided node data range has a lower priority;

[0022] The first rule querying unit is configured to, if there is the first TypeNode in the Rete network, query whether there is a first rule that satisfies condition 2 in a rule library pre-established for the first information according to the node data of the first TypeNode in the Rete network, wherein condition 2 is that: with the first TypeNode as a dimension and the node data range includes the node data of the first TypeNode and the preset value for the first information is not empty;

[0023] The flight information constructing unit is configured to, if there is the first rule, add the preset value in the first rule and the first information to the original flight information, so as to construct new flight information.

[0024] In combination with the second aspect, in some optional embodiments, the device further comprises: a continue judging unit, an end unit, and a preset processing unit;

[0025] The continue judging unit is configured to, if there is no such first rule, start from the next type node of the current type node in the type node priority list, execute the process of judging whether there is a first TypeNode in the Rete network that satisfies condition 1 in claim 1 and subsequent processes, and so on;

[0026] The ending unit is used to end the process of constructing new flight information for the first information if new flight information is constructed according to the first rule during this period.

[0027] The preset processing unit is used to add the initial value of the preset first information and the first information to the original flight information to construct new flight information if the first rule that meets condition 2 still cannot be obtained until the judgment is made according to the type node with the lowest priority in the type node priority list.

[0028] In combination with the second aspect, in some alternative embodiments, the device further includes: a join operation unit;

[0029] The join operation unit is used to perform a join operation on the database table corresponding to the new flight information and the database tables corresponding to at least one other new flight information to construct another new flight information, where the join operation is: an operation of combining the records of two or more tables using the same attributes in a relational database.

[0030] In combination with the second aspect, in some alternative embodiments, the node data adding unit includes: a node data adding subunit;

[0031] The node data adding subunit is used to connect each of the node data as an attribute value node to the corresponding TypeNode in the Rete network.

[0032] In a third aspect, a computer-readable storage medium stores a program thereon, and when the program is executed by a processor, it implements the method for constructing flight information described in any one of the above.

[0033] In a fourth aspect, an electronic device includes at least one processor, at least one memory connected to the processor, and a bus; wherein, the processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the method for constructing flight information described in any one of the above.

[0034] By means of the above technical solution, the method, device, storage medium, and electronic device for constructing flight information provided by the present invention can obtain original flight information, where the original flight information includes node data of at least one type of node TypeNode in a pre-established Rete network; add each piece of the node data to the corresponding TypeNode in the Rete network, where the Rete network includes a plurality of the TypeNodes, and one piece of the node data corresponds to one of the TypeNodes; starting from the TypeNode with the highest priority in the type node priority list established in advance for the first information in sequence, determine whether there is a first TypeNode in the Rete network that satisfies condition 1, where condition 1 is that the first TypeNode corresponds to the current type node in the type node priority list, and each of the type nodes in the type node priority list is sorted in sequence according to its respective node data range, and the type node with a finer divided node data range has a lower priority; if there is the first TypeNode in the Rete network, query whether there is a first rule in the rule base established in advance for the first information that satisfies condition 2, where condition 2 is that with the first TypeNode as a dimension and the node data range includes the node data of the first TypeNode and the preset value for the first information is not empty; if there is the first rule, add the preset value and the first information in the first rule to the original flight information, thereby constructing new flight information. It can be seen from this that the present invention can avoid repeated construction of information and has a relatively high processing efficiency.

[0035] The above description is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features, and advantages of the present invention more obvious and understandable, the specific embodiments of the present invention are specifically described below. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In combination with the drawings and with reference to the following specific embodiments, the above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the original elements and elements are not necessarily drawn to scale.

[0037] By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. And throughout the drawings, the same reference symbols are used to represent the same components. In the drawings:

[0038] Figure 1 Shows a flowchart of a method for constructing flight information provided by the present invention;

[0039] Figure 2 Shows a schematic diagram of a formatted information provided by the present invention;

[0040] Figure 3 Shows a schematic diagram of a Rete network provided by the present invention;

[0041] Figure 4 Shows a schematic diagram of the structure of a device for constructing flight information provided by the present invention;

[0042] Figure 5 Shows a schematic diagram of the structure of an electronic device provided by the present invention. Detailed implementation manners

[0043] The Rete algorithm is an efficient method for pattern matching, and all matching objects are obtained through network screening. The core idea is to construct a matching network with separate matching items and cache intermediate results at the same time, so as to obtain the advantage of processing speed by trading space for time, that is, to utilize temporal redundancy and structural similarity to improve the efficiency of system pattern matching.

[0044] The Rete algorithm performs matching by constructing a Rete network. The process of constructing a Rete network is as follows:

[0045] [1] Create a root node (the root node), which is the entry of the inference network, and there is only one root node in a network.

[0046] [2] Process the rules. The rules are generally expressed as "if... then". Take the first rule (rule 1), and take out the first pattern (pattern 1) from rule 1. The pattern is the if part of a rule.

[0047] [2.1] Check the parameter type in pattern 1. If it is a new type, add a type node TypeNode.

[0048] [2.2] Check whether the corresponding Alpha node of pattern 1 exists. If it exists, record the position of the node; if not, add pattern 1 to the network as an Alpha node. At the same time, establish an Alpha memory table according to the Alpha node.

[0049] [2.3] Repeat [2.2] until all patterns are processed to obtain all Alpha nodes and Alpha memory values.

[0050] [2.4]Combined Beta node, the left input node of Beta(2) is Alpha(1), and the right input node is Alpha(2).

[0051] [2.5]The left input node of Beta(i) is Beta(i - 1), and the right input node is Alpha(i). The memory tables of the two parent nodes are inlined into its own memory table.

[0052] [2.6]Repeat [2.5] until all Beta nodes are processed.

[0053] [2.7]Encapsulate the Then part of the action into the last node as Beta(n).

[0054] Repeat [2] until all rules are processed. The Alpha memory stores the set of facts, and the Beta memory stores tokens (tokens refer to the fact bindings that have been matched in the rules).

[0055] After the Rete network is constructed, when facts enter the network, its running process is to assert the facts to form a matching object f, and send it to the root node of the Rete network to start matching:

[0056] (1) If the type of f is the same as the type of the TypeNode after the root node, then save the fact in the alpha storage area corresponding to this TypeNode, indicating that the fact uses this type for matching. Then send f to the successor node to continue matching, otherwise end.

[0057] (2) If f is sent to an alpha node, it will be detected whether f matches the pattern corresponding to this node. If it matches, the fact will be saved in the storage area corresponding to this alpha node, and f will be passed to the successor node to continue matching, otherwise end.

[0058] (3) If f is passed to the right end of a Beta node, it will be added to the right storage area of this Beta node and matched with the Token in the left storage area. If the match is successful, f will be added to the Token, and then the Token will be passed to the next node, otherwise end.

[0059] (4) If a Token is passed to the left end of a Beta node, it will be added to the left storage area of this Beta node and matched with f in the right storage area. If the match is successful, the Token will encapsulate the matched f to form a new Token and be passed to the next node, otherwise the subsequent matching of the Token will be abandoned.

[0060] (5) If f is passed to the left end of the Beta node, encapsulate f into an f-list with only one f element as a Token, and then perform matching according to the method shown in (4).

[0061] (6) If the Token is passed to the terminal node, the rule corresponding to this root node is activated, the corresponding Activation is established, and stored in the Agenda for waiting to be triggered.

[0062] (7) If f is passed to the terminal node, encapsulate f into an f-list with only one f element as a Token, and then perform matching according to the method shown in (6).

[0063] As can be seen from the introduction of the above algorithm, the original Rete algorithm has the following two limitations:

[0064] First of all, the Rete network describes a process of one-round information construction and matching. For a large number of information that needs to be processed cyclically, there is no good way to handle the situation where there are both commonalities and differences among the information. This is common when constructing multiple pieces of information of the same type. If the types of rule matching are the same, but the matching values are different from the rule results, it will cause repeated construction of type nodes, which is less efficient for those formatted information that needs to be processed in large quantities.

[0065] Secondly, due to its general adaptability for matching, the Rete algorithm does not consider the approach when the result needs to be uniquely processed.

[0066] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0067] The term "including" and its variations used herein are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0068] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependent relationships.

[0069] It should be noted that the modifiers "one" and "multiple" mentioned in this disclosure are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise clearly specified in the context, it should be understood as "one or more".

[0070] As Figure 1 shown, the present invention provides a method for constructing flight information, including: S100, S200, S300, S400, and S500;

[0071] S100. Obtain the original flight information, where the original flight information includes node data of at least one type of node TypeNode in a pre-established Rete network;

[0072] Optionally, the original flight information referred to in the present invention may be formatted information, that is, original flight information pre-generated according to the information standards in the aviation field.

[0073] Optionally, the original flight information can be understood as capacity flight information. As Figure 2 shown in the formatted information, this information is a standard specification in the civil aviation field and is a general flight message file format that complies with the International Air Transport Association (IATA) standard. When using this method, the original flight information is pre-established existing information, which can correspondingly be understood as Figure 2 the Base set in, including: information items such as flight number, departure / arrival date, departure / arrival time and location, passing time and location, and aircraft type. These information items can respectively be used as the node data of different type nodes TypeNode in the present invention. That is, the flight number can be used as the node data of one type of node TypeNode, and the departure / arrival date can be used as the node data of another type of node TypeNode, and so on. The present invention does not limit this.

[0074] Optionally, the present invention can also construct more structured data from the original flight information as needed, such as information items like takeoff / landing time and passing airports. That is, the original flight information can be formatted into more information items according to actual business.

[0075] S200. Add each of the node data to the corresponding TypeNode in the Rete network, where the Rete network includes a plurality of the TypeNode, and one node data corresponds to one TypeNode;

[0076] Optionally, as Figure 3As shown, the present invention can use keys such as "flight number, departure airport, aircraft model, and whether it is an international flight" as the first-layer nodes of the Rete network, and the specific attribute values corresponding to "flight number, departure airport, aircraft model, and whether it is an international flight" respectively as the second-layer nodes of the Rete network. The present invention does not limit this. Of course, "flight number, departure airport, aircraft model, and whether it is an international flight" are only used as an example of an optional implementation manner to illustrate the present invention, and the present invention does not limit this. The so-called first-layer nodes are the corresponding TypeNodes in the Rete network. Adding each of the node data to the corresponding TypeNode in the Rete network can be understood as: constructing the second-layer nodes. The present invention does not limit this.

[0077] That is, in combination with Figure 1 the embodiment shown, in some optional embodiments, the S200 includes: using each of the node data as an attribute value node and connecting it to the corresponding TypeNode in the Rete network.

[0078] S300. Starting from the type node with the highest priority in the type node priority list established in advance for the first information, determine whether there is a first TypeNode in the Rete network that satisfies condition 1, where condition 1 is: the first TypeNode corresponds to the current type node in the type node priority list, and each of the type nodes in the type node priority list is sorted in sequence according to its respective node data range, and the type node with a finer divided node data range has a lower priority;

[0079] Optionally, the present invention can set the priorities of the type nodes corresponding to the flight information to be constructed subsequently, that is, construct the corresponding type node priority list in advance. For example, for the flight information "seat layout" to be constructed:

[0080] Preset type node priority list: departure airport > aircraft model > whether it is an international flight > flight number. That is, sequentially determine whether there is a "departure airport", "aircraft model", "whether it is an international flight", or "flight number" in the Rete network that satisfies condition 1. If it exists (the first-layer node name corresponds to the type node in the type node priority list and the corresponding second-layer node data is not empty), then execute the subsequent S400. If it does not exist, it means that the information that has a greater impact on constructing the "seat layout" has not been constructed in the Rete network. At this time, a default value can be taken.

[0081] That is, if there is an "origin airport" in the Rete network and its node data is not empty, then subsequently construct the "seat layout" according to the rules of the origin airport; if there is no "origin airport" or its node data is empty, then determine whether there is an "aircraft type" in the Rete network and its node data is not empty.

[0082] If there is an "aircraft type" in the Rete network and its node data is not empty, then subsequently construct the "seat layout" according to the rules of the aircraft type; if there is no "aircraft type" or its node data is empty, then continue to determine whether there is an "international flight" in the Rete network and its node data is not empty, and so on.

[0083] Optionally, by introducing a type node priority list processing node in the Rete network, the uniqueness of each information assignment can be guaranteed.

[0084] S400. If the first TypeNode exists in the Rete network, then according to the node data of the first TypeNode in the Rete network, query whether there is a first rule that satisfies condition 2 in the rule library established in advance for the first information, where condition 2 is: with the first TypeNode as the dimension and the node data range includes the node data of the first TypeNode and the preset value for the first information is not empty;

[0085] Optionally, as described above, the present invention can establish different rules in advance for different type nodes. For example, for the construction of the "seat layout", there are the following 4 rules, where A represents the "seat layout":

[0086] rA(Whether international)[1] == if: international flight == no, then: seat layout == F5Y100;

[0087] rA(Flight number)[1] == if: 0 < flight number < 200, then: seat layout == F10Y200;

[0088] rA(Aircraft type)[1] == if: aircraft type == 73A, then: seat layout == J8Y120;

[0089] rA(Aircraft type)[2] == if: aircraft type == A320, then: seat layout == J5Y100;

[0090] In addition, for the seat layout, the default value set is: layout == 0.

[0091] Taking Figure 3 the example shown Figure 3In the Rete network shown, there is an "origin airport" and its node data is not empty (PEK). However, since no rule for the origin airport has been pre-established for the construction of the "seat layout", it can be determined Figure 3 whether there is an aircraft model in Figure 3 and its node data is not empty.

[0092] Figure 3 In the Rete network shown, there is an "aircraft model" and its node data is not empty (73M). However, for the construction of the "seat layout", the pre-established rules for the aircraft model only include the rules of "aircraft model == 73A" and "aircraft model == A320", and there is no rule of "aircraft model == 73M". Therefore, it can be determined Figure 3 whether there is a "whether international flight" in Figure 3 and its node data is not empty.

[0093] Figure 3 In the Rete network shown, there is a "whether international flight" and its node data is not empty (no), and for the construction of the "seat layout", the pre-established rules for the aircraft model include the rule of "international flight == no". Then, the preset value (F5Y100) of this rule and the "seat layout" are added to the original flight information, thereby constructing new flight information.

[0094] S500. If the first rule exists, then add the preset value in the first rule and the first information to the original flight information, thereby constructing new flight information.

[0095] Optionally, taking the example and the type node priority list described above Figure 3 where origin airport > aircraft model > whether international flight > flight number as an example, if no corresponding first rule is found until the "flight number" is judged, then the default value (0) set for the seat layout and the "seat layout" can be added to the original flight information, thereby constructing new flight information.

[0096] Optionally, if the first rule does not exist and there are other type nodes in the current type node priority list that have not been judged, that is, the type node priority list has not been traversed completely, then the subsequent other type nodes in the type node priority list can be traversed continuously. That is, in combination with Figure 1 the implementation manner shown, in some alternative implementation manners, the method further includes: Step 1.1, Step 1.2, and Step 1.3;

[0097] Step 1.1. If the first rule does not exist, then start from the next type node of the current type node in the type node priority list, and execute the process of judging whether there is a first TypeNode in the Rete network that satisfies Condition 1 and the subsequent processes in Claim 1, and so on;

[0098] Step 1.2: If new flight information is constructed according to the first rule during this period, then end the process of constructing new flight information for the first information this time;

[0099] Step 1.3: If until the determination is made based on the type node with the lowest priority in the type node priority list, the first rule that meets Condition 2 still cannot be obtained, then add the initial value of the preset first information and the first information to the original flight information, thereby constructing new flight information.

[0100] Combined with Figure 1 In the illustrated embodiment, in some alternative embodiments, the method further includes: performing a join operation on the database table corresponding to the new flight information and the database tables corresponding to at least one other new flight information, thereby constructing another new flight information, where the join operation is: an operation in a relational database that combines the records of two or more tables using the same attributes in the two or more tables.

[0101] Optionally, the join operation is a very common operation in a relational database. For example, through the operation of "sql: Select * from tableA, tableB", the records of tableA and tableB are joined together. It is also possible to select some contents in set A to be joined with some contents in set B. For example, "select T1.no, T2.time, from tableA T1, tableB T2". For specific details, please refer to the description of the join operation in this field. The present invention will not describe it in detail.

[0102] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0103] Although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in a sequential order. In certain circumstances, multitasking and parallel processing may be advantageous.

[0104] Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages or combinations thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, C++, and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0105] It should be understood that the various steps recited in the method embodiments of the present disclosure may be executed in a different order and / or in parallel. In addition, the method embodiments may include additional steps and / or omit performing the steps shown. The scope of the present disclosure is not limited in this regard.

[0106] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not used to limit the scope of these messages or information.

[0107] As Figure 4 shown, the present invention provides a device for constructing flight information, including: an original information obtaining unit 100, a node data adding unit 200, a type node judging unit 300, a first rule querying unit 400, and a flight information constructing unit 500;

[0108] The original information obtaining unit 100 is configured to obtain original flight information, where the original flight information includes node data of at least one type node TypeNode in a pre-established Rete network;

[0109] The node data adding unit 200 is configured to add each of the node data to the corresponding TypeNode in the Rete network, where the Rete network includes a plurality of the TypeNodes, and one piece of node data corresponds to one TypeNode;

[0110] The type node determination unit 300 is configured to start from the type node with the highest priority in the type node priority list established in advance for the first information, and sequentially determine whether there is a first TypeNode in the Rete network that satisfies condition 1, where condition 1 is that the first TypeNode corresponds to the current type node in the type node priority list, and each of the type nodes in the type node priority list is sorted in sequence according to its respective node data range, and the type node with a larger node data range or a more finely divided node data range has a lower priority;

[0111] The first rule query unit 400 is configured to, if there is the first TypeNode in the Rete network, query whether there is a first rule in the rule library established in advance for the first information that satisfies condition 2 according to the node data of the first TypeNode in the Rete network, where condition 2 is that with the first TypeNode as the dimension, the node data range includes the node data of the first TypeNode and the preset value for the first information is not empty;

[0112] The flight information construction unit 500 is configured to, if there is the first rule, add the preset value and the first information in the first rule to the original flight information, so as to construct new flight information.

[0113] Combined with Figure 4 In some optional embodiments, based on the embodiments shown, the device further includes: a continue determination unit, an end unit, and a preset processing unit;

[0114] The continue determination unit is configured to, if there is no such first rule, start from the next type node of the current type node in the type node priority list, execute the process of determining whether there is a first TypeNode in the Rete network that satisfies condition 1 in claim 1 and subsequent processes, and so on;

[0115] The end unit is configured to, if new flight information is constructed according to the first rule during this period, end the process of constructing new flight information for the first information this time;

[0116] The preset processing unit is configured to, if until the determination is made according to the type node with the lowest priority in the type node priority list, a first rule that satisfies condition 2 still cannot be obtained, add the initial value of the preset first information and the first information to the original flight information, so as to construct new flight information.

[0117] Combined with Figure 4In the described embodiments, in some alternative embodiments, the apparatus further includes: a join operation unit;

[0118] The join operation unit is configured to perform a join operation on the database table corresponding to the new flight information and at least one other database table corresponding to new flight information, so as to construct another new flight information, where the join operation is: an operation of combining records of two or more tables using the same attributes in a relational database.

[0119] Combine Figure 4 In the described embodiments, in some alternative embodiments, the node data adding unit 200 includes: a node data adding subunit;

[0120] The node data adding subunit is configured to connect each of the node data as an attribute value node to the corresponding TypeNode in the Rete network.

[0121] The units involved in the embodiments described in the present disclosure can be implemented in software or in hardware. Among them, the name of the unit does not constitute a limitation to the unit itself in some cases. For example, the first obtaining unit can also be described as "a unit for obtaining at least two Internet protocol addresses".

[0122] The functions described above herein can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Product (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), and the like.

[0123] The present invention provides a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, the method for constructing flight information described in any one of the above is implemented.

[0124] As Figure 5 As shown, the present invention provides an electronic device 70, and the electronic device 70 includes at least one processor 701, and at least one memory 702 and a bus 703 connected to the processor 701; wherein, the processor 701 and the memory 702 complete communication with each other through the bus 703; the processor 701 is configured to call program instructions in the memory 702 to execute the method for constructing flight information described in any one of the above.

[0125] The above computer-readable medium may be included in the above electronic device; or may exist separately and not be assembled into the electronic device.

[0126] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0127] It should be noted that the computer-readable medium described above in the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. And in the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which the computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable signal medium can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

Claims

1. A method for constructing flight information, characterized in that, Including: Obtain original flight information, where the original flight information includes node data of at least one TypeNode in a pre-established Rete network; Add each piece of the node data to the corresponding TypeNode in the Rete network, where the Rete network includes multiple TypeNodes, and one piece of node data corresponds to one TypeNode; Starting from the TypeNode with the highest priority in the type node priority list pre-established for the first information in sequence, determine whether there is a first TypeNode in the Rete network that satisfies Condition 1, where Condition 1 is: the first TypeNode corresponds to the current TypeNode in the type node priority list, and each of the TypeNodes in the type node priority list is sorted in sequence according to its respective node data range, and the TypeNode with a finer divided node data range has a lower priority; If there is the first TypeNode in the Rete network, query whether there is a first rule in the rule library pre-established for the first information that satisfies Condition 2 according to the node data of the first TypeNode in the Rete network, where Condition 2 is: with the first TypeNode as the dimension and the node data range includes the node data of the first TypeNode and the preset value for the first information is not empty; If there is the first rule, add the preset value in the first rule and the first information to the original flight information, thereby constructing new flight information.

2. The method according to claim 1, wherein The method further includes: If there is no such first rule, start from the next TypeNode after the current TypeNode in the type node priority list, execute the process of determining whether there is a first TypeNode in the Rete network that satisfies Condition 1 in Claim 1 and subsequent processes, and so on; If new flight information is constructed according to the first rule during this period, end the process of constructing new flight information for the first information this time; If until the determination is made according to the TypeNode with the lowest priority in the type node priority list, and still no first rule that satisfies Condition 2 can be obtained, add the initial value of the preset first information and the first information to the original flight information, thereby constructing new flight information.

3. The method according to claim 1, wherein The method further includes: Perform a join operation on the database table corresponding to the new flight information and the database tables corresponding to at least one other new flight information, thereby constructing another new flight information, where the join operation is: an operation in a relational database that combines the records of two or more tables using the same attributes in the two or more tables.

4. The method according to claim 1, wherein The adding each piece of the node data to the corresponding TypeNode in the Rete network includes: Respectively use each piece of the node data as an attribute value node and connect it to the corresponding TypeNode in the Rete network.

5. A construction device for flight information, characterized in that, Including: An original information acquisition unit, a node data addition unit, a type node determination unit, a first rule query unit, and a flight information construction unit; The original information acquisition unit is configured to acquire original flight information, where the original flight information includes node data of at least one TypeNode in a pre-established Rete network; The node data addition unit is configured to add each piece of the node data to the corresponding TypeNode in the Rete network, where the Rete network includes a plurality of the TypeNodes, and one piece of the node data corresponds to one of the TypeNodes; The type node determination unit is configured to start from the type node with the highest priority in a type node priority list pre-established for the first information in sequence, and determine whether there is a first TypeNode in the Rete network that satisfies condition 1, where condition 1 is that the first TypeNode corresponds to the current type node in the type node priority list, and the type nodes in the type node priority list are sorted in sequence according to their respective node data ranges, and the type node with a finer divided node data range has a lower priority; The first rule query unit is configured to, if there is the first TypeNode in the Rete network, query whether there is a first rule that satisfies condition 2 in a rule library pre-established for the first information according to the node data of the first TypeNode in the Rete network, where condition 2 is that with the first TypeNode as a dimension, the node data range includes the node data of the first TypeNode and the preset value for the first information is not empty; The flight information construction unit is configured to, if there is the first rule, add the preset value in the first rule and the first information to the original flight information, so as to construct new flight information.

6. The device according to claim 5, characterized in that The device further includes: a continue determination unit, an end unit, and a preset processing unit; The continue determination unit is configured to, if there is no such first rule, start from the next type node of the current type node in the type node priority list, execute the process of determining whether there is a first TypeNode in the Rete network that satisfies condition 1 in claim 5 and subsequent processes, and so on; The end unit is configured to, if new flight information is constructed according to the first rule during this period, end the process of constructing new flight information for the first information this time; The preset processing unit is configured to, if until the determination is made according to the type node with the lowest priority in the type node priority list, no first rule that satisfies condition 2 can still be obtained, add the initial value of the preset first information and the first information to the original flight information, so as to construct new flight information.

7. The device according to claim 5, characterized in that, The device further includes: a join operation unit; The join operation unit is used to perform a join operation on the database table corresponding to the new flight information and the database tables corresponding to at least one other new flight information, so as to construct another new flight information, where the join operation is: an operation in a relational database that combines the records of two or more tables using the same attributes in the two or more tables.

8. The device according to claim 5, characterized in that The node data adding unit includes: a node data adding subunit; The node data adding subunit is used to connect each of the node data as an attribute value node to the corresponding TypeNode in the Rete network.

9. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by a processor, it implements the method for constructing flight information as described in any one of claims 1 to 4.

10. An electronic device, characterized in that, The electronic device includes at least one processor, at least one memory connected to the processor, and a bus; wherein, the processor and the memory complete communication with each other through the bus; the processor is used to call program instructions in the memory to execute the method for constructing flight information as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Flight plan generation method and device

    CN110298604A

  • Group ticket information generation method and device

    CN110717842A