CN116186059A - Flight data updating method, system, electronic device and storage medium - Google Patents

Flight data updating method, system, electronic device and storage medium Download PDF

Info

Publication number
CN116186059A
CN116186059A CN202310443559.0A CN202310443559A CN116186059A CN 116186059 A CN116186059 A CN 116186059A CN 202310443559 A CN202310443559 A CN 202310443559A CN 116186059 A CN116186059 A CN 116186059A
Authority
CN
China
Prior art keywords
flight
database
data
identification
updated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310443559.0A
Other languages
Chinese (zh)
Other versions
CN116186059B (en
Inventor
张扬
周杨
黄昕远
吴亮平
卿波
王娟
方锐
梁科
袁俐
张伟
唐政江
李颖
袁堃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Minhang Chengdu Information Technology Co ltd
Original Assignee
Minhang Chengdu Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Minhang Chengdu Information Technology Co ltd filed Critical Minhang Chengdu Information Technology Co ltd
Priority to CN202310443559.0A priority Critical patent/CN116186059B/en
Publication of CN116186059A publication Critical patent/CN116186059A/en
Application granted granted Critical
Publication of CN116186059B publication Critical patent/CN116186059B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2315Optimistic concurrency control
    • G06F16/2322Optimistic concurrency control using timestamps
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2358Change logging, detection, and notification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the technical field of data processing, in particular to a flight data updating method, a flight data updating system, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a first preset number of changed flight identifications from a first database after duplicate removal according to a first preset time interval to obtain updated flight identifications; storing the updated flight identification in a change table and a second database; acquiring a second preset number of updated flight identifications from a second database after duplicate removal according to a second preset time interval to obtain a target flight identification; acquiring flight data corresponding to each updated flight identifier in the change table from the flight database, and updating the flight data into the cache database; and sending the target flight data corresponding to the target flight identification in the cache database to a flight data page for display. By means of the method, the data of the flight data page can be updated, and the updating efficiency and the timeliness of the flight data are improved.

Description

Flight data updating method, system, electronic device and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a flight data updating method, a flight data updating system, an electronic device, and a storage medium.
Background
At present, each aviation public will display the flight data of all flights in each flight data page, when the flight data is changed, the latest flight data is obtained by multi-table inquiry from the database, and the latest flight data is displayed in the flight data page so as to update the flight data in the flight data page.
However, the number of tables in the database and the data in the tables is very large and takes a long time, so that the method of directly inquiring the latest flight data in the plurality of tables in the database is low in efficiency and the timeliness of updating the obtained flight data is not high.
Disclosure of Invention
In view of the foregoing, an object of the present application is to provide a method, a system, an electronic device, and a storage medium for updating flight data, which can update data of a flight data page, and improve update efficiency and timeliness of flight data.
In a first aspect, an embodiment of the present application provides a method for updating flight data, where the method for updating flight data includes:
acquiring a change flight identification of a change of flight data; storing the changed flight identification in a first database; and performing duplicate removal on all the changed flight identifications stored in the first database;
Acquiring a first preset number of changed flight identifications from a first database after duplicate removal according to a first preset time interval to obtain updated flight identifications; storing the updated flight identification in a change table and a second database; and performing deduplication on all updated flight identifications stored in the second database;
acquiring a second preset number of updated flight identifications from a second database after duplicate removal according to a second preset time interval to obtain a target flight identification; acquiring flight data corresponding to each updated flight identifier in the change table from a flight database; updating the flight data into a cache database;
and sending the target flight data corresponding to the target flight identification in the cache database to a flight data page for display so as to update the flight data in the flight data page.
In one possible implementation, deduplicating all the changed flight identifications stored in the first database, or deduplicating all the updated flight identifications stored in the second database, includes:
determining the changed flight identification or updated flight identification stored in the first database or the second database for a plurality of times as repeated changed flight identification or repeated updated flight identification;
And deleting all data except the data corresponding to the newly stored repeated changing flight identification or the repeated updating flight identification from all data corresponding to the repeated changing flight identification or the repeated updating flight identification in the first database or the second database.
In one possible embodiment, the method further comprises:
acquiring a change data type corresponding to the change flight identification;
acquiring the flight data corresponding to each updated flight identifier in the change table from the flight database, wherein the flight data comprises:
and acquiring the flight data corresponding to each updated flight identification from the flight data table corresponding to the change data type corresponding to each updated flight identification in the change table in the flight database.
In one possible embodiment, the method further comprises:
and deleting the data in the preset time before the current time in the change table according to the third preset time interval.
In one possible implementation, storing the updated flight identification in a second database includes:
and assembling each updated flight identifier into a message, and sequentially sending the message corresponding to each updated flight identifier to the second database so that the second database stores each updated flight identifier.
In one possible embodiment, the method further comprises:
and storing all flight data in the flight database into a cache database at a preset time point.
In a second aspect, an embodiment of the present application further provides a system for updating flight data, where the system for updating flight data includes:
the acquisition service module is used for acquiring a changed flight identifier of the changed flight data; storing the changed flight identification in a first database; and performing duplicate removal on all the changed flight identifications stored in the first database; acquiring a first preset number of changed flight identifications from a first database after duplicate removal according to a first preset time interval to obtain updated flight identifications; storing the updated flight identification in a change table and a second database; and performing deduplication on all updated flight identifications stored in the second database;
the updating service module is used for acquiring a second preset number of updating flight identifiers from the second database after the duplication removal according to a second preset time interval to obtain target flight identifiers; acquiring flight data corresponding to each updated flight identifier in the change table from a flight database; updating the flight data into a cache database; and sending the target flight data corresponding to the target flight identification in the cache database to a flight data page for display so as to update the flight data in the flight data page.
In a possible implementation manner, the obtaining service module is specifically configured to determine, as the repeatedly changed flight identifier or the repeatedly updated flight identifier, a changed flight identifier or an updated flight identifier stored in the first database or the second database for multiple times; and deleting all data except the data corresponding to the newly stored repeated changing flight identification or the repeated updating flight identification from all data corresponding to the repeated changing flight identification or the repeated updating flight identification in the first database or the second database.
In a possible implementation manner, the obtaining service module is further configured to obtain a change data type corresponding to the change flight identifier;
the update service module is further configured to obtain, from a flight data table in the flight database corresponding to the change data type corresponding to each update flight identifier in the change table, flight data corresponding to each update flight identifier.
In a possible implementation manner, the service acquisition module is further configured to:
and deleting the data in the preset time before the current time in the change table according to the third preset time interval.
In a possible implementation manner, the service acquisition module is further configured to:
And assembling each updated flight identifier into a message, and sequentially sending the message corresponding to each updated flight identifier to the second database so that the second database stores each updated flight identifier.
In a possible implementation manner, the update service module is further configured to store all flight data in the flight database into the cache database at a preset time point.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a storage medium, and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium in communication over the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the method for updating flight data as in any of the first aspects.
In a fourth aspect, embodiments of the present application also provide a computer readable storage medium having a computer program stored thereon, which when executed by a processor performs the steps of the method for updating flight data according to any of the first aspects.
The embodiment of the application provides a flight data updating method, a flight data updating system, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a change flight identification of a change of flight data; storing the changed flight identification into a first database; and performing duplicate removal on all the changed flight identifications stored in the first database; acquiring a first preset number of changed flight identifications from a first database after duplicate removal according to a first preset time interval to obtain updated flight identifications; storing the updated flight identification in a change table and a second database; and performing deduplication on all updated flight identifications stored in the second database; acquiring a second preset number of updated flight identifications from a second database after duplicate removal according to a second preset time interval to obtain a target flight identification; acquiring flight data corresponding to each updated flight identifier in the change table from a flight database; storing the flight data into a cache database; and sending the target flight data corresponding to the target flight identification in the cache database to a flight data page for display so as to update the flight data in the flight data page. According to a first preset time interval, acquiring a change flight identification of a first preset number of flight data to be changed from a first database after duplicate removal, and storing the change flight identification into a change table and a second database; acquiring a second preset number of updated flight identifications from a second database after duplicate removal according to a second preset time interval to obtain a target flight identification; then, acquiring flight data corresponding to each updated flight identifier in the change table from a flight database, and storing the flight data in a cache database; and sending the target flight data corresponding to the target flight identification in the cache database to a flight data page for display so as to update the flight data in the flight data page, thereby improving the updating efficiency and the timeliness of the flight data.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a flowchart of a method for updating flight data according to an embodiment of the present application;
FIG. 2 is a flowchart of another method for updating flight data according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an update system of flight data according to an embodiment of the present application;
fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the accompanying drawings in the present application are only for the purpose of illustration and description, and are not intended to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this application, illustrates operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to the flow diagrams and one or more operations may be removed from the flow diagrams as directed by those skilled in the art.
In addition, the described embodiments are only some, but not all, of the embodiments of the present application. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
In order to enable one skilled in the art to use the present disclosure, the following embodiments are presented in connection with a specific application scenario "data processing technology". It will be apparent to those having ordinary skill in the art that the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present application. Although the present application is described primarily in the context of "data processing technology," it should be understood that this is but one exemplary embodiment.
It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features stated hereinafter, but not to exclude the addition of other features.
The following describes in detail a flight data updating method provided in the embodiment of the present application.
Referring to fig. 1, a flow chart of a flight data updating method provided in an embodiment of the present application is shown, where a specific implementation process of the flight data updating method is as follows:
s101, acquiring a change flight identification of a change of flight data; storing the changed flight identification into a first database; and de-duplicating all the changed flight identifications stored in the first database.
S102, acquiring a first preset number of changed flight identifications from a first database after duplicate removal according to a first preset time interval to obtain updated flight identifications; storing the updated flight identification in a change table and a second database; and deduplicating all updated flight identifications stored in the second database.
S103, acquiring a second preset number of updated flight identifications from a second database after duplicate removal according to a second preset time interval to obtain a target flight identification; acquiring flight data corresponding to each updated flight identifier in the change table from a flight database; and updates the flight data to the cache database.
And S104, sending the target flight data corresponding to the target flight identification in the cache database to a flight data page for display so as to update the flight data in the flight data page.
The embodiment of the application provides a flight data updating method, which comprises the following steps: acquiring a change flight identification of a change of flight data; storing the changed flight identification into a first database; and performing duplicate removal on all the changed flight identifications stored in the first database; acquiring a first preset number of changed flight identifications from a first database after duplicate removal according to a first preset time interval to obtain updated flight identifications; storing the updated flight identification in a change table and a second database; and performing deduplication on all updated flight identifications stored in the second database; acquiring a second preset number of updated flight identifications from a second database after duplicate removal according to a second preset time interval to obtain a target flight identification; acquiring flight data corresponding to each updated flight identifier in the change table from a flight database; updating the flight data into a cache database; and sending the target flight data corresponding to the target flight identification in the cache database to a flight data page for display so as to update the flight data in the flight data page. According to a first preset time interval, acquiring a change flight identification of a first preset number of flight data to be changed from a first database after duplicate removal, and storing the change flight identification into a change table and a second database; acquiring a second preset number of updated flight identifications from a second database after duplicate removal according to a second preset time interval to obtain a target flight identification; then, acquiring flight data corresponding to each updated flight identifier in the change table from the flight database, and updating the flight data into the cache database; and sending the target flight data corresponding to the target flight identification in the cache database to a flight data page for display so as to update the flight data in the flight data page, thereby improving the updating efficiency and the timeliness of the flight data.
Exemplary steps of embodiments of the present application are described below:
s101, acquiring a change flight identification of a change of flight data; storing the changed flight identification in a first database; and de-duplicating all the changed flight identifications stored in the first database.
In the embodiment of the application, when the scheduling system for scheduling the flight guarantee service, the APP for processing the flight data, the flight data platform or the front-end user changes the flight data, the changing flight identifier of the change of the flight data is obtained. The flight data is classified into flight basic attribute data and flight guarantee service data. The flight basic attribute data comprises a plane number, a plane position, a departure time and the like. The flight guarantee service data comprise flight guarantee node information such as arrival of passenger ladder vehicles and arrival of refueling vehicles. The first database is used for storing the identification of the changed flights with the changed flight data and the storage time corresponding to the changed flight identifications, and each changed flight corresponds to a unique changed flight identification.
Performing deduplication on all the changed flight identifications stored in the first database, including: determining the changed flight identification stored in the first database for a plurality of times as repeated changed flight identification; and deleting all data except the data corresponding to the newly stored repeated changing flight identification from all data corresponding to the repeated changing flight identification in the first database. Here, for the change flight identifier stored in the first database for a plurality of times, the data with the latest storage time in the plurality of pieces of data corresponding to the change flight identifier stored in the first database for a plurality of times is reserved, and all data except the data with the latest storage time in the plurality of pieces of data corresponding to the change flight identifier stored in the first database is deleted.
Here, in a short time, multiple changes may occur to the same change flight identifier, and in the embodiment of the present application, it is only necessary to know that the change flight identifier is changed, and it is not necessary to store the change flight identifier repeatedly, so that update efficiency of flight data is improved.
Optionally, a change data type corresponding to the change flight identifier is obtained.
In the embodiment of the application, when the data of the flight data is changed, the changed data type corresponding to the changed flight identifier can be obtained in addition to the changed flight identifier; the acquired change data types comprise a flight basic attribute data type and a flight guarantee service data type; when the change is of the flight basic attribute data in the flight data, changing the type of the change data corresponding to the flight identification into the type of the flight basic attribute data; when the flight guarantee service data are changed, the type of the change data corresponding to the change flight identification is the type of the flight guarantee service data.
In addition, the embodiment of the application can also acquire the content such as the changing time corresponding to the changing flight identification, and the like, and the content is specific to the actual situation.
S102, acquiring a first preset number of changed flight identifications from a first database after duplicate removal according to a first preset time interval to obtain updated flight identifications; storing the updated flight identification in a change table and a second database; and deduplicating all updated flight identifications stored in the second database.
In the embodiment of the application, according to a first preset time interval, a first preset number of changed flight identifications are taken out from a first database after duplicate removal, so that updated flight identifications are obtained; storing the updated flight identification into a change table; here, in the embodiment of the present application, all the changed flight identifiers in the first database after duplicate removal are not obtained at one time, because the changed flight identifiers in the first database are many, if the changed flight identifiers are taken out at one time, a jam occurs in a flight data page.
Wherein, the change table stores all updated flight identifications which are changed and not updated yet;
specifically, storing the updated flight identification in the second database includes: and assembling each updated flight identifier into a message, and sequentially sending the message corresponding to each updated flight identifier to the second database so that the second database stores each updated flight identifier.
In the embodiment of the application, each updated flight identifier is assembled into a message, and the updated flight identifiers are sequentially sent to the second database through the message middleware according to the first-in first-out principle, so that the second database stores each updated flight identifier and the storage time corresponding to the updated flight identifier. Here, according to the embodiment of the application, according to the first-in first-out principle, the problem of data loss caused by too many updated flight identifiers can be avoided by adopting the message form, and if the API calling mode is adopted, the data loss is caused.
Specifically, deduplicating all updated flight identifications stored in the second database, including: determining the updated flight identification stored in the second database for a plurality of times as repeated updated flight identification; and deleting all data except the data corresponding to the latest stored or repeatedly updated flight identification in all data corresponding to the repeatedly updated flight identification in the second database. Here, for the update flight identifier stored in the second database for multiple times, the data with the latest storage time in the multiple pieces of data corresponding to the update flight identifier stored in the second database is reserved, and all the data except the data with the latest storage time in the multiple pieces of data corresponding to the update flight identifier stored in the second database is deleted. The second database includes data a, data b, and data c, for example; wherein, the update flight identification corresponding to the data a is X, the update flight identification corresponding to the data b is X, and the update flight identification corresponding to the data c is Y; it is easy to know that the updated flight identifier stored for many times in the second database is X, the storage time of the data a is 2s, and the storage time of the data b is 5s, the data b is reserved, and the data a is deleted.
Here, in this embodiment, a first preset number of changed flight identifiers are taken out from the first database after the duplication removal according to a first preset time interval, and the updated flight identifiers stored in the second database may not be taken out at the same time due to a network reason, so that the situation that the same updated flight identifiers are stored repeatedly still exists in the second database, and therefore, the duplication removal needs to be performed for the second time, and further, the update efficiency of the flight data is improved.
Further, the retrieved modified flight identification in the first database is deleted.
Optionally, deleting the data in the preset time period before the current time in the change table according to the third preset time interval.
In the embodiment of the application, the updated flight identification in the preset time before the current time is deleted at intervals, so that the updated flight identification in the change table can be guaranteed to be always up to date, fewer updated flight identifications are stored, and further the updating efficiency of the flight data is improved.
S103, acquiring a second preset number of updated flight identifications from a second database after duplicate removal according to a second preset time interval to obtain a target flight identification; acquiring flight data corresponding to each updated flight identifier in the change table from a flight database; and updates the flight data to the cache database.
In the embodiment of the application, according to a second preset time interval, a second preset number of updated flight identifications are taken out from a second database after duplication removal to obtain a target flight identification; the target flight identification is the flight identification which needs to update the flight data, and the number of the extracted target flight identifications is high in updating efficiency without causing updating congestion. And acquiring flight data corresponding to each updated flight identifier in the change table from a flight database, wherein the flight data is the flight data after multi-table query integration, and each flight identifier corresponds to one piece of flight data. The latest flight data is stored in the flight database, and the flight data corresponding to each updated flight identification in the change table in the flight database is updated in the cache database. And replacing the historical flight data corresponding to the updated flight identification in the cache database with the flight data corresponding to the updated flight identification obtained from the flight database.
Here, the method and the device sequentially obtain the first preset number of changed flight identifications from the first database after the duplication removal according to the first preset time interval, and then obtain the second preset number of updated flight identifications from the second database after the duplication removal according to the second preset time interval to obtain the final target flight identifications. If fewer target flight identifications are obtained only through one-time acquisition, the database storing the unoccupied changed flight identifications can be crashed due to excessive storage data.
Further, the retrieved modified flight identification in the second database is deleted.
Optionally, if the type of change data corresponding to the change flight identifier is obtained, obtaining the flight data corresponding to each update flight identifier in the change table from the flight database includes: and acquiring the flight data corresponding to each updated flight identification from the flight data table corresponding to the change data type corresponding to each updated flight identification in the change table in the flight database.
And S104, sending the target flight data corresponding to the target flight identification in the cache database to a flight data page for display so as to update the flight data in the flight data page.
In the embodiment of the application, when the flight data page of the front end is refreshed, the embodiment of the application only needs to send the changed flight data to the flight data display page, namely, the target flight data corresponding to the target flight identification in the cache database is sent to the flight data page for display; and the flight data page is updated according to the flight identification in the flight data.
Further, the changing flight identification or the updating flight identification stored in the first database or the second database for a plurality of times is determined to be the repeated changing flight identification or the repeated updating flight identification; and deleting all data except the data corresponding to the newly stored repeated changing flight identification or the repeated updating flight identification from all data corresponding to the repeated changing flight identification or the repeated updating flight identification in the first database or the second database.
In the embodiment of the application, the changing flight identification stored in the first database for a plurality of times is determined as the repeated changing flight identification; deleting all data except the data corresponding to the newly stored repeated changing flight identification from all data corresponding to the repeated changing flight identification in the first database; determining the updated flight identification stored in the second database for a plurality of times as repeated updated flight identification; and deleting all data except the data corresponding to the latest stored or repeatedly updated flight identification in all data corresponding to the repeatedly updated flight identification in the second database. The specific implementation of this step is described with reference to steps S101 and S102.
Optionally, at a preset time point, storing all flight data in the flight database into the cache database.
In this embodiment of the present application, at a preset time point, the embodiment automatically stores all the latest flight data in the flight database into the cache database.
Referring to fig. 2, a flowchart of another method for updating flight data according to the embodiment of the present application is shown, and the repetition of steps S201 to S205 and steps S101 to S104 is not repeated, and the following description describes exemplary steps of the embodiment of the present application:
S201, acquiring a change flight identification of a change of flight data and a corresponding change data type; storing the changed flight identification in a first database; and de-duplicating all the changed flight identifications stored in the first database.
S202, acquiring a first preset number of changed flight identifiers from a first database after duplicate removal according to a first preset time interval to obtain updated flight identifiers; storing the updated flight identification in a change table and a second database; and deduplicating all updated flight identifications stored in the second database.
S203, acquiring a second preset number of updated flight identifiers from a second database after duplicate removal according to a second preset time interval to obtain a target flight identifier; acquiring flight data corresponding to each updated flight identification from a flight data table corresponding to the change data type corresponding to each updated flight identification in the change table in the flight database; and updates the flight data to the cache database.
In the embodiment of the present application, the types of the change data are different, and the flight data tables in which the data change occurs in the flight database are also different. If the type of the change data corresponding to the updated flight identification is the type of the flight guarantee service data, acquiring the flight data corresponding to each updated flight identification from a flight data table corresponding to the type of the flight guarantee service data corresponding to each updated flight identification in a change table in a flight database; and if the type of the change data corresponding to the updated flight identification is the type of the flight basic attribute data, acquiring the flight data corresponding to each updated flight identification from a flight data table corresponding to the type of the flight basic attribute data corresponding to each updated flight identification in the change table in the flight database.
S204, sending the target flight data corresponding to the target flight identification in the cache database to the flight data page for display so as to update the flight data in the flight data page.
The embodiment of the application provides another method for updating the flight data, which can acquire data from different flight data tables according to different changed data types, so that the updating efficiency of the flight data is improved.
Based on the same inventive concept, the embodiment of the present application further provides a flight data updating system corresponding to the flight data updating method, and since the principle of solving the problem by the system in the embodiment of the present application is similar to that of the flight data updating method in the embodiment of the present application, the implementation of the system can refer to the implementation of the method, and the repetition is omitted.
Referring to fig. 3, an update system for flight data according to an embodiment of the present application includes:
the acquisition service module 301 is configured to acquire an altered flight identifier for which flight data is altered; storing the changed flight identification into a first database; and performing duplicate removal on all the changed flight identifications stored in the first database; acquiring a first preset number of changed flight identifications from a first database after duplicate removal according to a first preset time interval to obtain updated flight identifications; storing the updated flight identification in a change table and a second database; and performing deduplication on all updated flight identifications stored in the second database;
Specifically, the acquisition service module 301 includes a flight attribute acquisition service, a first database, a second database, and a message middleware. The flight attribute acquisition service is used for acquiring a change flight identifier of the change of the flight basic attribute data through the flight basic attribute data interface and acquiring a change flight identifier of the change of the flight guarantee service data through the flight guarantee service data interface. The altering operation may include adding, deleting, and modifying; and storing the changed flight identification into a first database through an underlying message sending method.
Specifically, the obtaining service module 301 is configured to deduplicate all the changed flight identifiers stored in the first database.
Specifically, the flight attribute obtaining service is configured to obtain a first preset number of changed flight identifiers from a first database after duplicate removal according to a first preset time interval, so as to obtain updated flight identifiers; storing the updated flight identification into a change table; and assembling the updated flight identification into a message and sending the message to the message middleware.
Specifically, the message middleware is configured to send the updated flight identifier to the second database according to a first-in first-out principle, so that the second database stores the updated flight identifier.
The acquisition service module 301 is further configured to deduplicate all updated flight identifiers stored in the second database.
The message middleware in the embodiment may be RabbitMq, and the first database and the second database may be Reris.
The update service module 302 is configured to obtain a second preset number of update flight identifiers from the second database after duplicate removal according to a second preset time interval, so as to obtain a target flight identifier; acquiring flight data corresponding to each updated flight identifier in the change table from a flight database; updating the flight data into a cache database; and sending the target flight data corresponding to the target flight identification in the cache database to a flight data page for display so as to update the flight data in the flight data page.
Specifically, the update service module 302 includes a flight data update service, a view display module, and a message push service;
the flight data updating service is used for acquiring a second preset number of updated flight identifications from the second database after the duplication removal according to a second preset time interval to obtain a target flight identification; acquiring flight data corresponding to each updated flight identifier in the change table from a flight database; updating the flight data into a cache database;
The VIEW display module is used for assembling the target flight data corresponding to the target flight identification in the cache database into a VIEW VIEW object, and sending the VIEW VIEW object to the message pushing service through the Query channel;
the message push service is used to broadcast the assembled VIEW objects to the flight data pages of the online users.
The flight data page is displayed to update the flight data in the flight data page.
In a possible implementation manner, the obtaining service module 301 is specifically configured to determine, as the repeatedly changed flight identifier or the repeatedly updated flight identifier, a changed flight identifier or an updated flight identifier stored in the first database or the second database for multiple times; and deleting all data except the data corresponding to the newly stored repeated changing flight identification or the repeated updating flight identification from all data corresponding to the repeated changing flight identification or the repeated updating flight identification in the first database or the second database.
In a possible implementation manner, the flight attribute obtaining service in the obtaining service module 301 is further configured to obtain a change data type corresponding to the change flight identifier;
the flight data update service in the update service module 302 is further configured to obtain the flight data corresponding to each update flight identifier from the flight data table corresponding to the change data type corresponding to each update flight identifier in the change table in the flight database.
In one possible implementation, the flight attribute acquisition service in the acquisition service module 301 is further configured to:
and deleting the data in the preset time before the current time in the change table according to the third preset time interval.
In one possible implementation, the message middleware in the service module 301 is further configured to:
and assembling each updated flight identifier into a message, and sequentially sending the message corresponding to each updated flight identifier to the second database so that the second database stores each updated flight identifier.
In a possible implementation manner, the flight data update service in the update service module 302 is further configured to store all the flight data in the flight database into the cache database at a preset time point.
Optionally, the flight data update service in the update service module 302 is further configured to store all flight data in the flight database into the cache database when the flight data update service is started.
The embodiment of the application provides a flight data updating system which can update the data of a flight data page and improve the updating efficiency and the timeliness of the flight data.
As shown in fig. 4, an electronic device 400 provided in an embodiment of the present application includes: the flight data updating method comprises the steps of a processor 401, a memory 402 and a bus, wherein the memory 402 stores machine-readable instructions executable by the processor 401, and when the electronic device runs, the processor 401 and the memory 402 are communicated through the bus, and the processor 401 executes the machine-readable instructions to execute the steps of the flight data updating method.
Specifically, the memory 402 and the processor 401 can be general-purpose memories and processors, and are not particularly limited herein, and the above-described flight data updating method can be performed when the processor 401 runs a computer program stored in the memory 402.
Corresponding to the above flight data updating method, the embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, and when the computer program is executed by the processor, the steps of the flight data updating method are performed.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the method embodiments, which are not described in detail in this application. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, and the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, and for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, indirect coupling or communication connection of devices or modules, electrical, mechanical, or other form.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the information processing method described in the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes or substitutions are covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. The method for updating the flight data is characterized by comprising the following steps:
acquiring a change flight identification of a change of flight data; storing the changed flight identification in a first database; and performing duplicate removal on all the changed flight identifications stored in the first database;
acquiring a first preset number of changed flight identifications from a first database after duplicate removal according to a first preset time interval to obtain updated flight identifications; storing the updated flight identification in a change table and a second database; and performing deduplication on all updated flight identifications stored in the second database;
acquiring a second preset number of updated flight identifications from a second database after duplicate removal according to a second preset time interval to obtain a target flight identification; acquiring flight data corresponding to each updated flight identifier in the change table from a flight database; updating the flight data into a cache database;
And sending the target flight data corresponding to the target flight identification in the cache database to a flight data page for display so as to update the flight data in the flight data page.
2. The method for updating flight data according to claim 1, wherein the step of deduplicating all the changed flight identifications stored in the first database or the step of deduplicating all the updated flight identifications stored in the second database comprises:
determining the changed flight identification or updated flight identification stored in the first database or the second database for a plurality of times as repeated changed flight identification or repeated updated flight identification;
and deleting all data except the data corresponding to the newly stored repeated changing flight identification or the repeated updating flight identification in all data corresponding to the repeated changing flight identification or the repeated updating flight identification in the first database or the second database.
3. The method for updating flight data of claim 2, wherein the method further comprises:
acquiring a change data type corresponding to the change flight identification;
The obtaining the flight data corresponding to each updated flight identifier in the change table from the flight database comprises the following steps:
and acquiring the flight data corresponding to each updated flight identifier from a flight data table corresponding to the change data type corresponding to each updated flight identifier in the change table in the flight database.
4. A method of updating flight data according to any one of claims 1 to 3, wherein the method further comprises:
and deleting the data in the preset time before the current time in the change table according to a third preset time interval.
5. The method of updating flight data according to claim 2, wherein storing the updated flight identification in a second database comprises:
and assembling each updated flight identifier into a message, and sequentially sending the message corresponding to each updated flight identifier to the second database so that the second database stores each updated flight identifier.
6. The method for updating flight data of claim 4, further comprising:
and when a preset time point is reached, storing all flight data in the flight database into the cache database.
7. A flight data updating system, characterized in that the flight data updating system comprises:
the acquisition service module is used for acquiring a changed flight identifier of the changed flight data; storing the changed flight identification in a first database; and performing duplicate removal on all the changed flight identifications stored in the first database; acquiring a first preset number of changed flight identifications from a first database after duplicate removal according to a first preset time interval to obtain updated flight identifications; storing the updated flight identification in a change table and a second database; and performing deduplication on all updated flight identifications stored in the second database;
the updating service module is used for acquiring a second preset number of updating flight identifiers from the second database after the duplication removal according to a second preset time interval to obtain target flight identifiers; acquiring flight data corresponding to each updated flight identifier in the change table from a flight database; updating the flight data into a cache database; and sending the target flight data corresponding to the target flight identification in the cache database to a flight data page for display so as to update the flight data in the flight data page.
8. The flight data updating system according to claim 7, wherein the acquisition service module is specifically configured to:
determining the changed flight identification or updated flight identification stored in the first database or the second database for a plurality of times as repeated changed flight identification or repeated updated flight identification;
and deleting all data except the data corresponding to the newly stored repeated changing flight identification or the repeated updating flight identification in all data corresponding to the repeated changing flight identification or the repeated updating flight identification in the first database or the second database.
9. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is running, the processor executing the machine-readable instructions to perform the steps of the flight data updating method of any one of claims 1 to 6.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the flight data updating method according to any one of claims 1 to 6.
CN202310443559.0A 2023-04-24 2023-04-24 Flight data updating method, system, electronic device and storage medium Active CN116186059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310443559.0A CN116186059B (en) 2023-04-24 2023-04-24 Flight data updating method, system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310443559.0A CN116186059B (en) 2023-04-24 2023-04-24 Flight data updating method, system, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN116186059A true CN116186059A (en) 2023-05-30
CN116186059B CN116186059B (en) 2023-06-30

Family

ID=86452437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310443559.0A Active CN116186059B (en) 2023-04-24 2023-04-24 Flight data updating method, system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN116186059B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030187851A1 (en) * 2002-04-01 2003-10-02 Diane Fay System and method for caching and utilizing flight availability data
US20070250517A1 (en) * 2006-04-20 2007-10-25 Bestgen Robert J Method and Apparatus for Autonomically Maintaining Latent Auxiliary Database Structures for Use in Executing Database Queries
US20080167909A1 (en) * 2007-01-05 2008-07-10 De Marcken Carl Updating a database of travel information
CN101527085A (en) * 2009-04-21 2009-09-09 中国民航大学 Flight information instant informing device and processing method thereof
CN105630982A (en) * 2015-12-25 2016-06-01 中国民航信息网络股份有限公司 Flight data caching method and system
CN107291920A (en) * 2017-06-28 2017-10-24 南京途牛科技有限公司 A kind of air ticket query caching method
CN112053127A (en) * 2020-09-01 2020-12-08 中国工商银行股份有限公司 Processing method, device, computer system and storage medium for change application
WO2021169272A1 (en) * 2020-02-27 2021-09-02 平安科技(深圳)有限公司 Database table changing method and apparatus, computer device, and storage medium
CN113836162A (en) * 2021-11-16 2021-12-24 湖北省楚建易网络科技有限公司 Method and device for service decoupling and automatic updating of multi-level cache
CN114022335A (en) * 2022-01-10 2022-02-08 中航信移动科技有限公司 Electronic identity authentication method and device based on dynamic timeliness and electronic equipment
CN114297183A (en) * 2021-12-27 2022-04-08 中国民航信息网络股份有限公司 Data processing method and device for additional service
CN114385655A (en) * 2022-01-13 2022-04-22 中国东方航空股份有限公司 Method for providing flight inquiry service and flight inquiry system
CN114780564A (en) * 2022-04-21 2022-07-22 京东科技控股股份有限公司 Data processing method, data processing apparatus, electronic device, and storage medium
CN115757495A (en) * 2022-11-21 2023-03-07 中国平安财产保险股份有限公司 Cache data processing method and device, computer equipment and storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030187851A1 (en) * 2002-04-01 2003-10-02 Diane Fay System and method for caching and utilizing flight availability data
US20070250517A1 (en) * 2006-04-20 2007-10-25 Bestgen Robert J Method and Apparatus for Autonomically Maintaining Latent Auxiliary Database Structures for Use in Executing Database Queries
US20080167909A1 (en) * 2007-01-05 2008-07-10 De Marcken Carl Updating a database of travel information
CN101527085A (en) * 2009-04-21 2009-09-09 中国民航大学 Flight information instant informing device and processing method thereof
CN105630982A (en) * 2015-12-25 2016-06-01 中国民航信息网络股份有限公司 Flight data caching method and system
CN107291920A (en) * 2017-06-28 2017-10-24 南京途牛科技有限公司 A kind of air ticket query caching method
WO2021169272A1 (en) * 2020-02-27 2021-09-02 平安科技(深圳)有限公司 Database table changing method and apparatus, computer device, and storage medium
CN112053127A (en) * 2020-09-01 2020-12-08 中国工商银行股份有限公司 Processing method, device, computer system and storage medium for change application
CN113836162A (en) * 2021-11-16 2021-12-24 湖北省楚建易网络科技有限公司 Method and device for service decoupling and automatic updating of multi-level cache
CN114297183A (en) * 2021-12-27 2022-04-08 中国民航信息网络股份有限公司 Data processing method and device for additional service
CN114022335A (en) * 2022-01-10 2022-02-08 中航信移动科技有限公司 Electronic identity authentication method and device based on dynamic timeliness and electronic equipment
CN114385655A (en) * 2022-01-13 2022-04-22 中国东方航空股份有限公司 Method for providing flight inquiry service and flight inquiry system
CN114780564A (en) * 2022-04-21 2022-07-22 京东科技控股股份有限公司 Data processing method, data processing apparatus, electronic device, and storage medium
CN115757495A (en) * 2022-11-21 2023-03-07 中国平安财产保险股份有限公司 Cache data processing method and device, computer equipment and storage medium

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
JORGE GONZÁLEZ: "Updating multiple database records (with independent data) in a single query", pages 1 - 5, Retrieved from the Internet <URL:https://jorgeglz.io/blog/sql-mass-updating/> *
MICROSOFT CORP: "Incremental refresh and real-time data for datasets", pages 1 - 5, Retrieved from the Internet <URL:https://learn.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-overview> *
一十 等: "频繁变化的数据如何有效的缓存?", pages 1 - 3, Retrieved from the Internet <URL:https://www.zhihu.com/question/22414215> *
姚韵: "航空公司不正常航班管理和调度算法研究", 中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑, no. 6, pages 1 - 138 *
张潇霄 等: "浅谈数据库触发器在机场航显系统中的应用", 电脑知识与技术, no. 19, pages 175 - 177 *
携程技术: "干货 | 数据库压力降低90%,携程机票订单缓存系统实践", pages 1 - 2, Retrieved from the Internet <URL:https://blog.csdn.net/ctrip_tech/article/details/107703728> *

Also Published As

Publication number Publication date
CN116186059B (en) 2023-06-30

Similar Documents

Publication Publication Date Title
CN110321387B (en) Data synchronization method, equipment and terminal equipment
US9792340B2 (en) Identifying data items
CN106933836B (en) Data storage method and system based on sub-tables
CN107977396B (en) Method and device for updating data table of KeyValue database
CN111666326B (en) ETL scheduling method and device
CN105373595B (en) data self-classification storage method and terminal
CN110427551B (en) Information pushing method and device, electronic equipment and computer readable medium
CN106709042B (en) Index updating method and equipment
CN116186059B (en) Flight data updating method, system, electronic device and storage medium
CN117009453B (en) Method and system for inquiring customer group list of customers in real time through digital marketing
CN103595960A (en) Interesting information monitoring and pushing method and device
CN113761052A (en) Database synchronization method and device
CN111459987A (en) Cache updating method and device
CN107070987B (en) Data acquisition method and system for distributed object storage system
CN115661852A (en) Map segmentation method, map segmentation device, computer-readable storage medium and processor
CN114443910A (en) Data storage method, searching device and electronic equipment
CN105550347B (en) Data processing method and device
CN111953722B (en) Synchronization method and device for terminal address book
CN111209071A (en) Information configuration method, device, server and storage medium
CN112948517A (en) Area position calibration method and device and electronic equipment
CN111177162A (en) Data synchronization method and device
CN110782380A (en) Aeroderivative information management method, aeroderivative information management device and storage medium
CN110851456B (en) Information processing method, electronic equipment and storage medium
CN108206933B (en) Video data acquisition method and device based on video cloud storage system
CN114253745B (en) Message deduplication processing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant