Civil aviation configuration data processing method and device and storage medium
By initializing and dynamically updating civil aviation configuration data, the problem of low processing efficiency of civil aviation configuration data was solved, enabling rapid acquisition and dynamic updates, and improving data processing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TRAVELSKY TECHNOLOGY LIMITED
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, the processing efficiency of civil aviation configuration data is low, mainly relying on manual processing and storage in mainframes. The data types are diverse, the structures are complex, and the changes are rapid.
The target system's cache database is initialized by acquiring the host system's raw message data, and data changes are monitored. The cache database is then updated using the data change information, enabling the storage of all configuration data and adaptive updates under dynamic data changes.
It improves the processing efficiency of civil aviation configuration data, enabling rapid acquisition and dynamic updates, and meeting the needs of data query and retrieval.
Smart Images

Figure CN121901291A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of civil aviation information technology, and more specifically, to a method, apparatus and storage medium for processing civil aviation configuration data. Background Technology
[0002] Civil aviation configuration data refers to the data used in the civil aviation passenger service system to define, control, and optimize various operational processes. This includes key information such as airlines, flights, routes, fares, seat layouts, and baggage regulations. This data ensures that every step of a flight, from planning to execution, receives precise guidance and support. The accuracy and timeliness of the configuration data directly affect the passenger's ticketing experience.
[0003] However, in the existing technology, the above configuration data is stored in a mainframe and in a file-based database. The data types are diverse, the data structures are complex, and the data changes rapidly. Currently, it mainly relies on manual processing, which results in low processing efficiency.
[0004] There is currently no effective solution to the problem of low processing efficiency of civil aviation configuration data in related technologies. Summary of the Invention
[0005] The main objective of this application is to provide a method, apparatus, and storage medium for processing civil aviation configuration data, so as to solve the problem of low processing efficiency of civil aviation configuration data in related technologies.
[0006] To achieve the above objectives, according to one aspect of this application, a method for processing civil aviation configuration data is provided. The method includes: acquiring raw message data for a host database in a host system, wherein the host database stores configuration data in the civil aviation field, and the raw message data is generated based on the configuration data; initializing a cache database in a target system using the raw message data to obtain an initialized cache database, wherein the target system is the host system to which data migration is to be performed; monitoring data changes in the host system to obtain data change information; and updating the initialized cache database based on the data change information to obtain a target cache database.
[0007] Furthermore, the cache database in the target system is initialized using the original message data. The initialized cache database includes: determining the message identifier based on the original message data; parsing the original message data when the message identifier is the first identifier to obtain multiple base data and the data type of each base data, wherein the base data is used to initialize the cache database; generating a key name identifier corresponding to each base data based on the data type to obtain multiple key name identifiers, wherein the base data and key name identifiers have a one-to-one correspondence; and writing the base data into the cache database according to the key name identifiers to achieve the initialization of the cache database, resulting in the initialized cache database.
[0008] Furthermore, based on the data type, a key name identifier is generated for each base data item, resulting in multiple key name identifiers. These include: for any base data item, determining multiple expected fields based on the preset configuration file and the data type of the base data item; using reflection to determine the current field of the base data item and matching it with multiple expected fields; if the matching result is successful, determining the key name identifier corresponding to the base data item based on the current field; if the matching result is unsuccessful, determining the key name identifier corresponding to the base data item based on a preset wildcard; and finally, a collection of key name identifiers corresponding to all base data items to obtain multiple key name identifiers.
[0009] Furthermore, monitoring data changes in the host system and obtaining data change information includes: monitoring data changes in the host system using a preset data extractor to obtain changed data in binary format, and sending the changed data to a message converter; converting the data format of the changed data using the message converter to obtain a change message; and determining the data change information based on the change message.
[0010] Furthermore, the initialized cache database is updated based on the data change information to obtain the target cache database, which includes: performing data transformation on the data change information using a key-value pair processing tool to obtain a target data object, wherein the target data object includes at least a type identifier field, an operation identifier field, and a target data field; and updating the initialized cache database based on the type identifier field, the operation identifier field, and the target data field to obtain the target cache database.
[0011] Furthermore, updating the initialized cache database based on the type identifier field, operation identifier field, and target data field includes: if the operation identifier field is data deletion, deleting the first data in the initialized cache database based on the target data field, wherein the first data is the data corresponding to the target data field; responding to the associated deletion rule of the first data, deleting the second data in the initialized cache database through cascading deletion, wherein the second data is the associated data of the first data.
[0012] To achieve the above objectives, according to another aspect of this application, a civil aviation configuration data processing apparatus is provided. The apparatus includes: a message acquisition unit, configured to acquire raw message data for a host database in a host system, wherein the host database stores configuration data in the civil aviation field, and the raw message data is generated based on the configuration data; an initialization unit, configured to initialize a cache database in a target system using the raw message data to obtain an initialized cache database, wherein the target system is the system to which the host system is to undergo data migration; a change monitoring unit, configured to monitor data changes in the host system and obtain data change information; and a data update unit, configured to update the initialized cache database based on the data change information to obtain a target cache database.
[0013] Furthermore, the initialization unit includes: an identifier determination module, used to determine the message identifier based on the original message data; a data parsing module, used to parse the original message data when the message identifier is the first identifier, to obtain multiple base data and the data type of each base data, wherein the base data is used to initialize the cache database; an identifier generation module, used to generate a key name identifier corresponding to each base data according to the data type, to obtain multiple key name identifiers, wherein the base data and the key name identifiers have a one-to-one correspondence; and a data writing module, used to write the base data into the cache database according to the key name identifiers to realize the initialization of the cache database and obtain the initialized cache database.
[0014] Furthermore, the identifier generation module includes: an expected field determination submodule, used to determine multiple expected fields for any base data based on a preset configuration file and the data type of the base data; a field matching submodule, used to determine the current field of the base data using a reflection mechanism, and to match the current field with multiple expected fields; a key name identifier submodule, used to determine the key name identifier corresponding to the base data based on the current field if the matching result is successful, and to determine the key name identifier corresponding to the base data based on a preset wildcard if the matching result is unsuccessful; and an identifier set submodule, used to collect the key name identifiers corresponding to all base data to obtain multiple key name identifiers.
[0015] Furthermore, the change monitoring unit includes: a change data acquisition module, used to monitor data changes in the host system according to a preset data extractor, to acquire change data in binary format, and send the change data to a message converter; a change data conversion module, used to convert the data format of the change data according to the message converter to obtain a change message; and a change information determination module, used to determine data change information based on the change message.
[0016] Furthermore, the data update unit includes: an object acquisition module, used to perform data transformation on the data change information according to the key-value pair processing tool to obtain a target data object, wherein the target data object includes at least a type identifier field, an operation identifier field, and a target data field; and a database update module, used to update the initialized cache database according to the type identifier field, the operation identifier field, and the target data field to obtain a target cache database.
[0017] Furthermore, the database update module includes: a data deletion submodule, used to delete the first data in the initialized cache database according to the target data field when the operation identifier field is data deletion, wherein the first data is the data corresponding to the target data field; and a cascading deletion submodule, used to delete the second data in the initialized cache database in response to the associated deletion rule of the first data, wherein the second data is the associated data of the first data.
[0018] According to another aspect of this application, a computer-readable storage medium is provided, which includes a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform any civil aviation configuration data processing method.
[0019] According to another aspect of this application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include a processing method for performing any kind of civil aviation configuration data.
[0020] According to another aspect of this application, a computer program product is provided, including computer instructions, which, when executed by a processor, implement the steps of the civil aviation configuration data processing method described above.
[0021] In this embodiment, the method involves acquiring raw message data from the host database in the host system (the host database stores configuration data in the civil aviation field), generating the raw message data based on the configuration data; initializing the cache database in the target system using the raw message data to obtain the initialized cache database, where the target system is the system to which the host system's data is to be migrated; monitoring data changes in the host system to obtain data change information; and updating the initialized cache database based on the data change information to obtain the target cache database. This method solves the technical problem of low processing efficiency for civil aviation configuration data in the prior art.
[0022] By acquiring the raw message data from the host database, rapid data retrieval is achieved. This raw message data is then used to initialize the cache database, enabling the storage of all configuration data in the cache database. The initialized cache database is then updated based on data change information. Therefore, this solution obtains the target cache database through full configuration data initialization and adaptive updates under dynamic data change scenarios, thereby improving the processing efficiency of civil aviation configuration data. Attached Figure Description
[0023] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0024] Figure 1 A hardware structure block diagram of a computer terminal for implementing a method for processing civil aviation configuration data is shown.
[0025] Figure 2 This is a flowchart of a method for processing civil aviation configuration data according to an embodiment of this application;
[0026] Figure 3 This is a schematic diagram of a civil aviation configuration data processing device provided according to an embodiment of this application;
[0027] Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] It should be noted that the information collected in this application (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of this data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding access points are provided for users to choose to authorize or refuse. For example, interfaces are set up between this system and relevant users or organizations, providing users with corresponding access points to choose to agree to or refuse automated decision-making results; if the user chooses to refuse, the process proceeds to the expert decision-making stage.
[0031] Example 1
[0032] According to an embodiment of this application, a method embodiment for processing civil aviation configuration data is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0033] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a method for processing civil aviation configuration data is shown. Figure 1As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0034] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0035] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the civil aviation configuration data processing method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned civil aviation configuration data processing method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0036] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0037] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0038] Under the aforementioned operating environment, this application provides the following: Figure 2 The method for processing civil aviation configuration data is shown. Figure 2 This is a flowchart of a method for processing civil aviation configuration data according to Embodiment 1 of this application.
[0039] Step S201: Obtain the raw message data for the host database in the host system.
[0040] It should be noted that the host database is used to store configuration data for the civil aviation sector, and the raw message data is generated based on this configuration data. The configuration data in the host database is stored as a file-based database and synchronized and transmitted as a binary data stream, resulting in poor readability. The host system is an existing data system, while the target system is the system from which data migration from the host system is to be performed.
[0041] Optionally, the system can retrieve all configuration data stored in the host database using a data retrieval script, generate binary format messages, convert the binary messages to JSON format, and use the JSON format messages as the raw message data. The raw message data is then pushed to a preset message queue according to the data retrieval script. The target system can then retrieve the raw message data by listening to the preset message queue.
[0042] Step S202: Initialize the cache database in the target system using the original message data to obtain the initialized cache database.
[0043] Optionally, the original message data can be parsed to obtain multiple base data and the data type of each base data. The base data is used to initialize the cache database. A key name identifier corresponding to each base data can be generated based on its data type, resulting in multiple key name identifiers. There is a one-to-one correspondence between the base data and the key name identifiers. The base data is then written to the cache database based on the key name identifiers to initialize the cache database.
[0044] Optionally, the initial data can be written to the cache database based on a differentiated data synchronization mechanism. For example, original data with the same data type as the initial data can be extracted from the cache database. The data content of the original data and the initial data can be compared using set operations to determine redundant data that needs to be deleted from the cache database. The initial data is then written to the cache database in batches, and the redundant data is deleted. This initialization method optimizes the data processing path, ensures business continuity, and avoids business service interruptions caused by large-scale data cleanup.
[0045] Step S203: Monitor the data changes in the host system and obtain data change information.
[0046] For example, when there are dynamic data changes in the host database of the host system, triggers can be used to monitor the data changes in the host database in real time to obtain data change information. The data change information can include the data type of the change, the time of the change, and the data content before and after the change.
[0047] Step S204: Update the initialized cache database according to the data change information to obtain the target cache database.
[0048] Optionally, data change information can include data deletion, data addition, and data modification. When the host system's host database changes due to factors such as flight schedules, the initialized cache database is updated based on the data change information, achieving adaptive updates to the initialized cache database according to data changes. Because the target cache database is a cache database, it has extremely fast read and write speeds, which is beneficial for meeting the configuration data processing needs of applications in the civil aviation field that require rapid data response, such as data querying and data retrieval.
[0049] In summary, by acquiring the raw message data from the host database, rapid data retrieval is achieved. This raw message data is then used to initialize the cache database, enabling the storage of all configuration data in the cache database. The initialized cache database is then updated based on data change information. Therefore, this solution obtains the target cache database through full configuration data initialization and adaptive updates under dynamic data change scenarios, thereby improving the processing efficiency of civil aviation configuration data.
[0050] To improve the processing efficiency of civil aviation configuration data, optionally, the cache database in the target system is initialized using the original message data. The initialized cache database includes: determining the message identifier based on the original message data; parsing the original message data if the message identifier is the first identifier to obtain multiple base data and the data type of each base data, wherein the base data is used to initialize the cache database; generating a key name identifier corresponding to each base data based on the data type to obtain multiple key name identifiers, wherein the base data and the key name identifiers have a one-to-one correspondence; and writing the base data into the cache database based on the key name identifiers to achieve the initialization of the cache database, thus obtaining the initialized cache database.
[0051] Optionally, the message identifier is used to determine the type of data processing. The first message identifier can be RECAP (used to indicate the bottom layer). If the message identifier is the first identifier, the synchronization process of the full configuration data can be started.
[0052] The system can parse the raw message data to obtain multiple backing data sets and their data types. These backing data sets are then validated using preset verification rules to ensure they conform to the rules and prevent anomalies during subsequent write operations. Backing data sets are the configuration data parsed from the raw message data used to initialize the cache database. Based on the data type, a corresponding key name identifier can be generated for each backing data set. This key name identifier serves as a unique identifier after the backing data set is written to the cache database, enabling rapid location of the backing data. Writing each backing data set and its corresponding key name identifier to the cache database yields the initialized cache database. Batch atomic writes can be used to improve data throughput. During the write process, pipelined publishing operations can be used to optimize network overhead.
[0053] In summary, by parsing the original message data under the first identifier, multiple base data and the data type of each base data are obtained, and key name identifiers are generated based on the data type, thereby realizing the initialization of the cache database and improving the processing efficiency of civil aviation configuration data.
[0054] To improve the processing efficiency of civil aviation configuration data, optionally, a key name identifier corresponding to each base data is generated based on the data type, resulting in multiple key name identifiers. This includes: for any base data, determining multiple expected fields based on a preset configuration file and the data type of the base data; using reflection to determine the current field of the base data, and matching the current field with multiple expected fields; if the matching result is successful, determining the key name identifier corresponding to the base data based on the current field; if the matching result is unsuccessful, determining the key name identifier corresponding to the base data based on a preset wildcard; and collecting all key name identifiers corresponding to all base data to obtain multiple key name identifiers.
[0055] Optionally, the preset configuration file can be a YAML (a syntax format) file used to define at least one expected field corresponding to the data type of the underlying data to be processed, thereby decoupling the business processing logic of the underlying data from hard coding. The factory pattern can be used to implement the mapping process of determining multiple expected fields based on the preset configuration file, and the factory pattern can support hot configuration updates during runtime. Reflection is a method for dynamically obtaining class information and manipulating class objects at runtime. For example, in object-oriented programming languages such as Java, reflection can be implemented by calling methods such as `Class.forName()` and `getDeclaredFields()`. The current field of the underlying data is obtained using reflection. If the current field fails to match multiple expected fields, preset wildcards (special characters used to replace missing or undesirable field values) are used to fill the field, ensuring that valid key identifiers are generated even if the data structure does not perfectly match.
[0056] For example, the default configuration file predefines three expected fields for the AIRLINE_INFO data type: airline code, airline name, and airline headquarters location. For a base data entry of the AIRLINE_INFO data type, reflection is used to retrieve the current fields of that base data. Assuming the current fields contain the airline code and airline name, but not the airline headquarters location field, the current fields are matched against multiple expected fields. The airline code (CA) and airline name (AL) match successfully, while the airline headquarters location field fails to match. For successfully matched fields, the key name portion "#CA#AL" can be directly generated using that current field. For fields that fail to match, a default wildcard is introduced (e.g., it could be "..."). The placeholder is used to obtain the final key name identifier for the base data as "#CA#AL#". This will give you a composite key string that contains both business semantics and maintains uniqueness. You can also convert the composite key string to a preset, unified key field format to obtain the key name identifier.
[0057] In summary, by taking any base data set and determining multiple expected fields based on the preset configuration file and the data type of the base data set, a reflection mechanism is used to determine the current field of the base data set and match it with multiple expected fields. If the match is successful, the key name identifier corresponding to the base data set is determined based on the current field; if the match fails, the key name identifier corresponding to the base data set is determined based on the preset wildcard. By aggregating the key name identifiers corresponding to all base data sets, multiple key name identifiers are obtained. This significantly reduces the modification costs and code redundancy caused by changes in data structure or the addition of new data types, and improves the processing efficiency of civil aviation configuration data.
[0058] To improve the processing efficiency of civil aviation configuration data, optionally, the data change status of the host system is monitored, and the data change information is obtained by: monitoring the data change status of the host system according to a preset data extractor to obtain the changed data in binary format, and sending the changed data to a message converter; converting the data format of the changed data according to the message converter to obtain a change message; and determining the data change information based on the change message.
[0059] Optionally, the preset data extractor can be a script used to monitor data changes in the host system's database. For example, the preset data extractor can be a trigger for the host database, which retrieves the changed data in binary format when data changes occur in the host database. The message converter decodes and reassembles the changed data in binary format into a JSON format message (i.e., a change message), which can be directly identified as data change information.
[0060] In summary, by monitoring data changes in the host system using a preset data extractor to obtain changed data in binary format, and sending the changed data to a message converter; the message converter then converts the data format of the changed data to obtain a change message; and based on the change message, the data change information is determined, thus improving the processing efficiency of civil aviation configuration data.
[0061] To improve the processing efficiency of civil aviation configuration data, optionally, the initialized cache database is updated based on data change information to obtain the target cache database, which includes: performing data transformation on the data change information using a key-value pair processing tool to obtain a target data object, wherein the target data object includes at least a type identifier field, an operation identifier field, and a target data field; and updating the initialized cache database based on the type identifier field, the operation identifier field, and the target data field to obtain the target cache database.
[0062] Optionally, the key-value pair processing tool can be a JSON parsing tool, and the target data object can be a Basebean (a basic data object). The target data object can include a type identifier field "type", an operation identifier field "operation", and a target data field "data". For example, if the target data object is {'type':'FLIGHT','operation': 'UPDATE','data':{'flightNo':'CA1234','departureTime':'14:30'}}, the type identifier field "FLIGHT" indicates that the data is related to flight information, and the operation identifier field "UPDATE" means that data modification is required. Therefore, the cache entry with the key "FLIGHT#CA#1234", i.e., flight information with flight number CA1234, can be found in the initialized cache database, and the departure time field of that flight information can be modified to 14:30.
[0063] In summary, by using key-value pair processing tools to transform data change information, a target data object is obtained. This target data object includes at least a type identifier field, an operation identifier field, and a target data field. The initialized cache database is then updated based on the type identifier field, operation identifier field, and target data field to obtain the target cache database. This ensures the timeliness of the configuration data in the target cache database and improves the processing efficiency of civil aviation configuration data.
[0064] To improve the processing efficiency of civil aviation configuration data, optionally, updating the initialized cache database based on the type identifier field, operation identifier field, and target data field includes: if the operation identifier field indicates data deletion, deleting the first data in the initialized cache database based on the target data field, wherein the first data is the data corresponding to the target data field; responding to the associated deletion rule of the first data, deleting the second data in the initialized cache database through cascading deletion, wherein the second data is the associated data of the first data.
[0065] Optionally, when the data identifier field indicates data deletion, the first data can be determined in the initialized cache database based on the type identifier field and the target key name in the target data field. After deleting the first data, it is also possible to check whether there are any associated deletion rules for the first data in the initialized cache database. For example, deleting flight data may require simultaneously deleting second data such as baggage rules and seat layouts related to the flight data. The associated deletion rules can be stored in the configuration file of the initialized cache database. By querying the associated deletion rules, the second data can be determined, and the second data can be deleted through cascading deletion.
[0066] In summary, by deleting the first data in the initialized cache database based on the target data field when the operation identifier field is set to data deletion, and responding to the associated deletion rule of the first data, the second data in the initialized cache database is deleted through cascading deletion. This avoids invalid data in the target database, avoids business problems caused by data update delays, and improves the processing efficiency of civil aviation configuration data.
[0067] It should be noted that the steps shown in the flowchart in 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 may be executed in a different order than that shown here.
[0068] Example 2
[0069] This application also provides a civil aviation configuration data processing apparatus. It should be noted that this civil aviation configuration data processing apparatus can be used to execute the civil aviation configuration data processing method provided in this application. The following describes the civil aviation configuration data processing apparatus provided in this application.
[0070] According to an embodiment of this application, an apparatus for implementing the above-described civil aviation configuration data processing method is also provided, such as... Figure 3 As shown, the device includes:
[0071] The message acquisition unit 301 is used to acquire raw message data for the host database in the host system, wherein the host database is used to store configuration data in the civil aviation field, and the raw message data is generated based on the configuration data.
[0072] Initialization unit 302 is used to initialize the cache database in the target system using the original message data to obtain the initialized cache database, wherein the target system is the system to be migrated from the host system.
[0073] The change monitoring unit 303 is used to monitor the data changes of the host system and obtain data change information.
[0074] The data update unit 304 is used to update the initialized cache database according to the data change information to obtain the target cache database.
[0075] The civil aviation configuration data processing apparatus provided in this application embodiment acquires raw message data from a host database in a host system through a message acquisition unit 301. The host database stores configuration data in the civil aviation field, and the raw message data is generated based on this configuration data. An initialization unit 302 initializes a cache database in a target system using the raw message data, resulting in an initialized cache database. The target system is the system to which the host system's data is to be migrated. A change monitoring unit 303 monitors data changes in the host system to obtain data change information. A data update unit 304 updates the initialized cache database based on the data change information, resulting in the target cache database. This solves the problem of low processing efficiency for civil aviation configuration data in related technologies, thereby improving the processing efficiency of civil aviation configuration data.
[0076] Optionally, in the civil aviation configuration data processing apparatus provided in this application embodiment, the initialization unit 302 includes: an identifier determination module, used to determine a message identifier based on the original message data; a data parsing module, used to parse the original message data when the message identifier is a first identifier, to obtain multiple base data and the data type of each base data, wherein the base data is used to initialize the cache database; an identifier generation module, used to generate a key name identifier corresponding to each base data based on the data type, to obtain multiple key name identifiers, wherein the base data and the key name identifiers have a one-to-one correspondence; and a data writing module, used to write the base data into the cache database based on the key name identifiers to achieve the initialization of the cache database and obtain the initialized cache database.
[0077] Optionally, in the civil aviation configuration data processing apparatus provided in this application embodiment, the identifier generation module includes: an expected field determination submodule, used to determine multiple expected fields for any base data according to a preset configuration file and the data type of the base data; a field matching submodule, used to determine the current field of the base data using a reflection mechanism, and match the current field with multiple expected fields; a key name identifier submodule, used to determine the key name identifier corresponding to the base data according to the current field if the matching result is a successful match, and to determine the key name identifier corresponding to the base data according to a preset wildcard if the matching result is a failed match; and an identifier set submodule, used to collect the key name identifiers corresponding to all base data to obtain multiple key name identifiers.
[0078] Optionally, in the civil aviation configuration data processing device provided in this application embodiment, the change monitoring unit 303 includes: a change data acquisition module, used to monitor the data change situation in the host system according to a preset data extractor, to acquire change data in binary format, and send the change data to a message converter; a change data conversion module, used to convert the data format of the change data according to the message converter to obtain a change message; and a change information determination module, used to determine the data change information according to the change message.
[0079] Optionally, in the civil aviation configuration data processing apparatus provided in this application embodiment, the data update unit 304 includes: an object acquisition module, used to perform data conversion on data change information according to a key-value pair processing tool to obtain a target data object, wherein the target data object includes at least a type identifier field, an operation identifier field, and a target data field; and a database update module, used to update the initialized cache database according to the type identifier field, the operation identifier field, and the target data field to obtain a target cache database.
[0080] Optionally, in the civil aviation configuration data processing apparatus provided in this application embodiment, the database update module includes: a data deletion submodule, used to delete the first data in the initialized cache database according to the target data field when the operation identifier field is data deletion, wherein the first data is the data corresponding to the target data field; and a cascading deletion submodule, used to delete the second data in the initialized cache database in response to the associated deletion rule of the first data, wherein the second data is the associated data of the first data.
[0081] It should be noted that the above-mentioned message acquisition unit 301, initialization unit 302, change monitoring unit 303, and data update unit 304 correspond to steps S201 to S204 in Embodiment 1. The instances and application scenarios implemented by the units and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above-mentioned modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above-mentioned modules can also be part of the device and can run in the computer terminal 10 provided in Embodiment 1.
[0082] Example 3
[0083] Embodiments of this application may provide an electronic device. Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 4 As shown, the electronic device may include: one or more ( Figure 4 (Only one is shown) processor 402, memory 404, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0084] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-described methods. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0085] The processor can invoke information and applications stored in memory via the transmission device to perform the following steps: acquiring raw message data for the host database in the host system, wherein the host database is used to store configuration data in the civil aviation field, and the raw message data is generated based on the configuration data; initializing the cache database in the target system using the raw message data to obtain the initialized cache database, wherein the target system is the system to be migrated from the host system; monitoring data changes in the host system to obtain data change information; and updating the initialized cache database based on the data change information to obtain the target cache database.
[0086] The processor can also invoke information and applications stored in the memory via the transmission device to perform the following steps: determine the message identifier based on the original message data; if the message identifier is the first identifier, parse the original message data to obtain multiple pad data and the data type of each pad data, wherein the pad data is used to initialize the cache database; generate a key name identifier corresponding to each pad data according to the data type, resulting in multiple key name identifiers, wherein the pad data and key name identifiers have a one-to-one correspondence; write the pad data into the cache database according to the key name identifiers to initialize the cache database, resulting in the initialized cache database.
[0087] The processor can also invoke information and applications stored in the memory via the transmission device to perform the following steps: for any base data, determine multiple expected fields based on a preset configuration file and the data type of the base data; use reflection to determine the current field of the base data and match the current field with multiple expected fields; if the matching result is successful, determine the key name identifier corresponding to the base data based on the current field; if the matching result is unsuccessful, determine the key name identifier corresponding to the base data based on a preset wildcard; collect all the key name identifiers corresponding to the base data to obtain multiple key name identifiers.
[0088] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: monitor the data changes in the host system according to the preset data extractor to obtain the changed data in binary format, and send the changed data to the message converter; convert the data format of the changed data according to the message converter to obtain the changed message; determine the data change information according to the changed message.
[0089] The processor can also invoke information and applications stored in the memory via a transmission device to perform the following steps: perform data transformation on the data change information according to the key-value pair processing tool to obtain a target data object, wherein the target data object includes at least a type identifier field, an operation identifier field, and a target data field; update the initialized cache database according to the type identifier field, the operation identifier field, and the target data field to obtain a target cache database.
[0090] The processor can also invoke information and applications stored in the memory via a transmission device to perform the following steps: when the operation identifier field is data deletion, delete the first data in the initialized cache database according to the target data field, wherein the first data is the data corresponding to the target data field; respond to the associated deletion rule of the first data, delete the second data in the initialized cache database by means of cascading deletion, wherein the second data is the associated data of the first data.
[0091] This application provides a solution for processing civil aviation configuration data. It involves acquiring raw message data from a host database in a host system (the host database stores civil aviation configuration data, and the raw message data is generated based on this configuration data); initializing a cache database in a target system using the raw message data to obtain an initialized cache database; monitoring data changes in the host system to obtain data change information; and updating the initialized cache database based on the data change information to obtain the target cache database. This solution addresses the technical problem of low processing efficiency for civil aviation configuration data in existing technologies.
[0092] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 4 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.
[0093] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0094] Example 4
[0095] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the civil aviation configuration data processing method provided in Embodiment 1.
[0096] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0097] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining raw message data for a host database in a host system, wherein the host database is used to store configuration data in the civil aviation field, and the raw message data is generated based on the configuration data; initializing a cache database in a target system using the raw message data to obtain an initialized cache database, wherein the target system is the system to which the host system is to be migrated; monitoring data changes in the host system to obtain data change information; and updating the initialized cache database based on the data change information to obtain a target cache database.
[0098] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: determining a message identifier based on the original message data; if the message identifier is a first identifier, parsing the original message data to obtain multiple pad data and the data type of each pad data, wherein the pad data is used to initialize the cache database; generating a key name identifier corresponding to each pad data based on the data type to obtain multiple key name identifiers, wherein the pad data and the key name identifiers have a one-to-one correspondence; writing the pad data into the cache database based on the key name identifiers to initialize the cache database and obtain the initialized cache database.
[0099] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: for any base data, determining multiple expected fields based on a preset configuration file and the data type of the base data; using a reflection mechanism to determine the current field of the base data, and matching the current field with multiple expected fields; if the matching result is successful, determining the key name identifier corresponding to the base data based on the current field; if the matching result is unsuccessful, determining the key name identifier corresponding to the base data based on a preset wildcard; and collecting all the key name identifiers corresponding to the base data to obtain multiple key name identifiers.
[0100] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: monitoring data changes in the host system according to a preset data extractor to obtain changed data in binary format, and sending the changed data to a message converter; converting the data format of the changed data according to the message converter to obtain a changed message; and determining data change information based on the changed message.
[0101] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: performing data transformation on data change information according to a key-value pair processing tool to obtain a target data object, wherein the target data object includes at least a type identifier field, an operation identifier field, and a target data field; updating the initialized cache database according to the type identifier field, the operation identifier field, and the target data field to obtain a target cache database.
[0102] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: when the operation identifier field is data deletion, deleting the first data in the initialized cache database according to the target data field, wherein the first data is the data corresponding to the target data field; in response to the associated deletion rule of the first data, deleting the second data in the initialized cache database by means of cascading deletion, wherein the second data is the associated data of the first data.
[0103] This application also provides a computer program product, which, when executed on a data processing device, is suitable for performing the steps of a method for processing civil aviation configuration data.
[0104] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0105] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0106] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0107] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0108] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0109] If the integrated unit is implemented as 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 this application, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0110] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for processing civil aviation configuration data, characterized in that, include: Obtain raw message data for the host database in the host system, wherein the host database is used to store configuration data in the civil aviation field, and the raw message data is generated based on the configuration data; The original message data is used to initialize the cache database in the target system to obtain the initialized cache database, wherein the target system is the system to be migrated from the host system; The data changes of the host system are monitored to obtain data change information; The initialized cache database is updated based on the data change information to obtain the target cache database.
2. The method according to claim 1, characterized in that, The cache database in the target system is initialized using the original message data, resulting in an initialized cache database comprising: The message identifier is determined based on the original message data; When the message identifier is the first identifier, the original message data is parsed to obtain multiple base data and the data type of each base data, wherein the base data is used to initialize the cache database; Based on the data type, generate a key name identifier corresponding to each of the base data, resulting in multiple key name identifiers, wherein the base data and the key name identifiers have a one-to-one correspondence; The base data is written into the cache database according to the key name identifier to initialize the cache database and obtain the initialized cache database.
3. The method according to claim 2, characterized in that, Based on the data type, a key name identifier is generated corresponding to each of the base data, resulting in multiple key name identifiers including: For any given set of base data, multiple expected fields are determined based on a preset configuration file and the data type of the base data; The current field of the base data is determined using a reflection mechanism, and then matched with the multiple expected fields based on the current field. If the matching result is a successful match, the key name identifier corresponding to the base data is determined based on the current field; if the matching result is a failed match, the key name identifier corresponding to the base data is determined based on the preset wildcard. By aggregating all the key name identifiers corresponding to the base data, multiple key name identifiers are obtained.
4. The method according to claim 1, characterized in that, Monitoring data changes in the host system yields data change information including: The system monitors data changes in the host system using a preset data extractor to obtain changed data in binary format and sends the changed data to a message converter. The data format of the changed data is converted according to the message converter to obtain a changed message; The data change information is determined based on the change message.
5. The method according to claim 1, characterized in that, The initialized cache database is updated based on the data change information to obtain the target cache database, which includes: The data change information is transformed using a key-value pair processing tool to obtain a target data object, wherein the target data object includes at least a type identifier field, an operation identifier field, and a target data field; The initialized cache database is updated based on the type identifier field, the operation identifier field, and the target data field to obtain the target cache database.
6. The method according to claim 5, characterized in that, Updating the initialized cache database based on the type identifier field, the operation identifier field, and the target data field includes: If the operation identifier field is data deletion, the first data in the initialized cache database is deleted according to the target data field, wherein the first data is the data corresponding to the target data field; In response to the association deletion rule of the first data, the second data in the initialized cache database is deleted through cascading deletion, wherein the second data is the associated data of the first data.
7. A processing device for civil aviation configuration data, characterized in that, include: The message acquisition unit is used to acquire raw message data for the host database in the host system, wherein the host database is used to store configuration data in the civil aviation field, and the raw message data is generated based on the configuration data; An initialization unit is used to initialize the cache database in the target system using the original message data to obtain the initialized cache database, wherein the target system is the system to be migrated from the host system; The change monitoring unit is used to monitor data changes in the host system and obtain data change information; The data update unit is used to update the initialized cache database based on the data change information to obtain the target cache database.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the civil aviation configuration data processing method according to any one of claims 1 to 6.
9. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, executes the method for processing civil aviation configuration data according to any one of claims 1 to 6.
10. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the civil aviation configuration data processing method according to any one of claims 1 to 6.