Flight passenger statistical data updating method and related device
By receiving flight passenger change messages and determining event types and performing corresponding statistical operations, the problem of repeated calculations when calculating flight passenger statistics in real time is solved, saving computing resources and avoiding insufficient computing performance.
Patent Information
- Application Number
- PCT/CN2024/135017
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-30
- Filing Date
- 2024-11-27
- Publication Date
- 2025-06-05
AI Technical Summary
In the prior art, real-time calculation of flight passenger statistics will result in repeated calculations, wasting system computing resources.
By receiving flight passenger change messages, determine the message event type and perform corresponding statistical operations. For flight event types, call the preset statistics module to update the data in the statistics table; for passenger event types, write the flight number to the storage area, and call the statistics module to update the data after the preset conditions are met.
By reducing duplicate calculations, saving computing resources and avoiding insufficient computing performance problems caused by large-scale update events during peak periods.
Smart Images

Figure CN2024135017_05062025_PF_FP_ABST
Abstract
Description
Flight passenger statistics updating method and related equipment
[0001] This disclosure claims priority to the Chinese patent application filed with the China Patent Office on November 30, 2023, with application number 202311629628.3 and application name “Method for Updating Flight Passenger Statistical Data and Related Equipment,” the entire contents of which are incorporated by reference into this disclosure. Technical Field
[0002] The present disclosure relates to the field of computer technology, and in particular to a method for updating flight passenger statistics data and related equipment. Background Art
[0003] Currently, in order to facilitate airlines to provide various types of services to passengers, it is necessary to count the passengers on flights. In the existing technology, passenger statistics are performed using real-time calculations. However, the real-time statistics method will result in many repeated calculations, wasting system computing resources. Summary of the Invention
[0004] The technical problem to be solved by this disclosure is to provide a method and related equipment for updating flight passenger statistics data, which can save computing resources. The specific solution is as follows:
[0005] A method for updating flight passenger statistics data, comprising:
[0006] When a flight passenger change message is received, determining an event type of the flight passenger change message, where the event type is one of a flight event type and a passenger event type;
[0007] If the event type of the flight passenger change message is a flight event type, a first statistical operation or a second statistical operation is performed; wherein the first statistical operation includes: calling a preset statistical module according to the flight number contained in the flight passenger change message, so that the statistical module updates the statistical data in a preset statistical table based on the flight passenger data corresponding to the flight number; the second statistical operation includes: writing the flight number in the flight passenger change message into a preset first storage area, and if it is detected that the flight number stored in the first storage area meets a preset first statistical condition, calling the statistical module according to the flight number in the first storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the first storage area;
[0008] When the event type of the flight passenger change message is a passenger event type, the flight number in the flight passenger change message is written into a preset second storage area. When it is detected that the flight number stored in the second storage area meets a preset second statistical condition, the statistical module is called according to the flight number in the second storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the second storage area.
[0009] A device for updating flight passenger statistical data, comprising:
[0010] a determining unit, configured to, upon receiving a flight passenger change message, determine an event type of the flight passenger change message, the event type being one of a flight event type and a passenger event type;
[0011] a first execution unit configured to execute a first statistical operation or a second statistical operation; wherein the first statistical operation comprises: calling a preset statistical module according to the flight number included in the flight passenger change message, so that the statistical module updates statistical data in a preset statistical table based on flight passenger data corresponding to the flight number; and the second statistical operation comprises: writing the flight number in the flight passenger change message into a preset first storage area, and upon detecting that the flight number stored in the first storage area meets a preset first statistical condition, calling the statistical module according to the flight number in the first storage area, so that the statistical module updates statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the first storage area;
[0012] The second execution unit is configured to write the flight number in the flight passenger change message into a preset storage area when the event type of the flight passenger change message is a passenger event type; and upon detecting that the flight number stored in the storage area meets a preset statistical condition, call the statistical update module according to the flight number in the storage area, so that the statistical update module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the storage area.
[0013] A system for updating flight passenger statistics data, comprising:
[0014] Message processing module and statistics module;
[0015] The statistical module is used to update the statistical data in the preset statistical table according to the flight passenger data corresponding to the flight number;
[0016] The message processing module is used to execute the above-mentioned method for updating flight passenger statistical data.
[0017] A storage medium includes storage instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned method for updating flight passenger statistical data.
[0018] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to implement the above-mentioned method for updating flight passenger statistics.
[0019] Based on the above-mentioned scheme, the present disclosure provides a method and device for updating flight passenger statistical data, a storage medium and an electronic device, the method comprising: when a flight passenger change message is received, determining the event type of the flight passenger change message, the event type being one of a flight event type and a passenger event type; when the event type of the flight passenger change message is a flight event type, performing a first statistical operation or a second statistical operation; wherein the first statistical operation comprises: calling a preset statistical module according to the flight number contained in the flight passenger change message, so that the statistical module updates the statistical data in a preset statistical table based on the flight passenger data corresponding to the flight number; the second statistical operation comprises: writing the flight number in the flight passenger change message into a preset first storage area If it is detected that the flight number stored in the first storage area meets a preset first statistical condition, the statistical module is called based on the flight number in the first storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the first storage area. If the event type of the flight passenger change message is a passenger event type, the flight number in the flight passenger change message is written to a preset second storage area. If it is detected that the flight number stored in the second storage area meets a preset second statistical condition, the statistical module is called based on the flight number in the second storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the second storage area. Because passenger events with the same flight number are often short-lived and concentrated, in this solution, for multiple different passenger events with the same flight number, the statistical module can be called once to update the statistical data of all passengers on the flight, thereby saving computing resources and avoiding the problem of insufficient computing performance caused by large-scale update events during peak periods. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0021] FIG1 is a flow chart of a method for updating flight passenger statistics data provided by the present disclosure;
[0022] FIG2 is a flowchart of a process for determining an event type of a flight passenger change message provided by the present disclosure;
[0023] FIG3 is an example diagram of an update process of flight passenger statistics data provided by the present disclosure;
[0024] FIG4 is a flow chart of a process for updating flight passenger statistics data provided by the present disclosure;
[0025] FIG5 is a schematic structural diagram of a device for updating flight passenger statistics data provided by the present disclosure;
[0026] FIG6 is a schematic structural diagram of another device for updating flight passenger statistics data provided by the present disclosure;
[0027] FIG7 is a schematic structural diagram of a system for updating flight passenger statistics data provided by the present disclosure;
[0028] FIG8 is a schematic structural diagram of an electronic device provided by the present disclosure. DETAILED DESCRIPTION
[0029] The following will be combined with the accompanying drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present disclosure.
[0030] In this application, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0031] The present disclosure provides a method for updating flight passenger statistics data. The method can be applied to electronic devices, which can be various types of computer devices. Power station equipment can be deployed with a message processing module. The method flow chart of the method is shown in FIG1 and specifically includes:
[0032] S101: When a flight passenger change message is received, an event type of the flight passenger change message is determined, where the event type is one of a flight event type and a passenger event type.
[0033] In this embodiment, a preset message queue may be monitored to receive flight passenger change messages in the message queue.
[0034] Optionally, a flight passenger change message of a flight event type may be generated when a flight model is changed, a flight is initialized, or a flight is closed; a flight passenger change message of a passenger event type may be generated when a passenger checks in or boards the plane.
[0035] Optionally, the flight passenger change message may include a flight number.
[0036] In some embodiments, when a flight passenger change message is received, the reception time corresponding to the flight number in the preset statistical table can be updated so that the reception time is consistent with the current time.
[0037] S102: When the event type of the flight passenger change message is a flight event type, perform a first statistical operation or a second statistical operation; wherein the first statistical operation includes: calling a preset statistical module according to the flight number contained in the flight passenger change message, so that the statistical module updates the statistical data in a preset statistical table based on the flight passenger data corresponding to the flight number; the second statistical operation includes: writing the flight number in the flight passenger change message into a preset first storage area, and when it is detected that the flight number stored in the first storage area meets a preset first statistical condition, calling the statistical module according to the flight number in the first storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the first storage area.
[0038] In this embodiment, the flight number can be obtained from the flight passenger change message, a service call request can be generated based on the flight number, and the service call request can be sent to the statistical module to call the statistical module to obtain the flight passenger data corresponding to the flight number, and the acquisition time of the flight passenger data can be determined. Statistical calculations are performed based on the flight passenger data corresponding to the flight number to obtain statistical calculation results; and the statistical calculation results are used to update the statistical data in the statistical table.
[0039] Optionally, after updating the statistical data in the statistical table, the calculation time corresponding to the flight number recorded in the preset status table may be updated so that the calculation time of the flight number recorded in the status table is consistent with the acquisition time.
[0040] In one embodiment provided by the present disclosure, based on the above-mentioned implementation process, optionally, the process of detecting that the flight number stored in the first storage area meets the preset statistical condition includes: detecting whether the preset first statistical time has arrived; and when the preset first statistical time has arrived, determining that the flight number stored in the second storage area meets the preset first statistical condition.
[0041] S103: When the event type of the flight passenger change message is a passenger event type, the flight number in the flight passenger change message is written into a preset second storage area. When it is detected that the flight number stored in the second storage area meets a preset statistical condition, the statistical module is called according to the flight number in the second storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the second storage area.
[0042] In this embodiment, the flight number can be obtained from the flight passenger change message, and it is determined whether the number of flight numbers recorded in the second storage area is greater than a preset threshold. If not, the flight number in the flight passenger change message can be stored in the second storage area, and it is detected whether the flight number in the second storage area meets the preset statistical conditions. When the flight number in the second storage area meets the preset statistical conditions, a service call request is generated according to the flight number in the second storage area, and the service call request is sent to the statistical module to call the statistical module to obtain flight passenger data corresponding to the flight number, and determine the acquisition time of the flight passenger data, perform statistical calculations based on the flight passenger data corresponding to the flight number, and obtain statistical calculation results; and use the statistical calculation results to update the statistical data in the statistical table.
[0043] Optionally, after updating the statistical data in the statistical table, the calculation time corresponding to the flight number recorded in the preset status table may be updated so that the calculation time of the flight number recorded in the status table is consistent with the acquisition time.
[0044] In this embodiment, the first storage area and the second storage area may be the same or different storage areas; the first storage area and the second storage area may be preset process caches, the process cache may be a hash table, and only one record is saved for the same flight number. The hash table may be pre-processed with AB blocks. In some embodiments, the first storage area and the second storage area may also be databases.
[0045] Optionally, flight passenger data corresponding to the flight number can be obtained from the first database, the statistical table can be stored in the second database, and the status table can be stored in the third database; the first database, the second database and the third database can be the same database or different databases.
[0046] By applying the method provided by the embodiments of the present disclosure, computing resources can be saved and the problem of insufficient computing performance caused by large-scale update events during peak periods can be avoided.
[0047] In an embodiment provided by the present disclosure, based on the above implementation process, optionally, the process of determining the event type of the flight passenger change message includes:
[0048] Obtaining the event identifier in the flight passenger change message;
[0049] The event type of the flight passenger change message is determined according to the event identifier.
[0050] In this embodiment, a preset configuration file can be obtained and queried according to the event identifier to determine the event type corresponding to the event identifier, and the event type corresponding to the event identifier is used as the event type of the flight passenger change message.
[0051] In an embodiment provided by the present disclosure, based on the above implementation process, optionally, determining the event type of the flight passenger change message, as shown in FIG2 , includes:
[0052] S201: Determine the current time.
[0053] In this embodiment, the current time may be the time when the flight passenger change message is received.
[0054] S202: updating a preset status table according to the current time and the flight number included in the flight passenger change message, so that the reception time corresponding to the flight number recorded in the status table is consistent with the current time.
[0055] In this embodiment, it is possible to first determine whether a record corresponding to the flight number exists in the status table. If not, a record corresponding to the flight number is generated and the reception time corresponding to the flight number is set to the current time. If so, the reception time corresponding to the flight number recorded in the status table is set to be consistent with the current time.
[0056] Optionally, the status table records the flight number, the receiving time corresponding to the flight number, and the calculation time. The calculation time in the statistics table may be the time for the statistics module to calculate the flight passenger data corresponding to the flight number.
[0057] S203: After updating the status table, determining the event type of the flight passenger change message.
[0058] In an embodiment provided by the present disclosure, based on the above implementation process, optionally, after updating the preset status table, the method further includes:
[0059] When the preset compensation calculation time is reached, it is determined whether the flight number included in the flight passenger change message meets the preset compensation statistics condition according to the reception time.
[0060] In this embodiment, if the time difference between the reception time and the compensation calculation time is greater than a preset timeout parameter, and the calculation time corresponding to the flight number does not exist in the statistics table, or the calculation time corresponding to the flight number recorded in the statistics table is before the reception time, then the flight number is determined to meet the compensation statistics conditions. The statistics module can be re-invoked based on the flight number, causing the statistics module to update the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number. This can avoid the omission of statistical data due to service anomalies.
[0061] In an embodiment provided by the present disclosure, based on the above implementation process, optionally, the process of detecting that the flight number stored in the second storage area meets a preset first statistical condition includes:
[0062] Check whether the preset statistical time has been reached;
[0063] When the preset statistical time has arrived, it is determined that the flight number stored in the second storage area meets the preset first statistical condition.
[0064] In this embodiment, the statistics module may be called at preset time intervals using the flight numbers stored in the second storage area.
[0065] The method provided in the embodiments of the present disclosure can be applied to various scenarios. The following is an example of application to a departure system DCS.
[0066] As shown in Figure 3, the update process of flight passenger statistical data can be divided into three stages, namely the message processing stage, the statistical calculation stage and the compensation check stage. As shown in Figure 4, in the message processing stage, the flight passenger message queue is monitored. When new messages such as flight change events and passenger change events are received, the statistical status table data in the database is updated, and then after internal processing, the statistical calculation stage is carried out; in the statistical calculation stage, after receiving the service call request, the statistical module reads the database, obtains the original data of the flight passengers, calculates the statistical data, and updates the statistical table data and the statistical status table data in the database; in the compensation check stage, the timer can be used to periodically trigger the inspection of the data in the statistical status table in the database. If flight information that has not been calculated successfully is found, the statistical calculation module is called again to trigger the statistical calculation.
[0067] Corresponding to the method described in FIG1 , an embodiment of the present disclosure further provides a device for updating flight passenger statistics data, which is used to implement the method described in FIG1 . The device for updating flight passenger statistics data provided in the embodiment of the present disclosure can be applied to an electronic device, and its structural diagram is shown in FIG5 , specifically comprising:
[0068] A determining unit 501 is configured to, upon receiving a flight passenger change message, determine an event type of the flight passenger change message, where the event type is one of a flight event type and a passenger event type;
[0069] The first execution unit 502 is configured to execute a first statistical operation or a second statistical operation; wherein the first statistical operation includes: calling a preset statistical module according to the flight number included in the flight passenger change message, so that the statistical module updates the statistical data in a preset statistical table based on the flight passenger data corresponding to the flight number; and the second statistical operation includes: writing the flight number in the flight passenger change message into a preset first storage area, and upon detecting that the flight number stored in the first storage area meets a preset first statistical condition, calling the statistical module according to the flight number in the first storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the first storage area;
[0070] The second execution unit 503 is used to write the flight number in the flight passenger change message into a preset second storage area when the event type of the flight passenger change message is a passenger event type; and when it is detected that the flight number stored in the second storage area meets a preset second statistical condition, call the statistical update module according to the flight number in the second storage area, so that the statistical update module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the second storage area.
[0071] In an embodiment provided by the present disclosure, based on the above solution, specifically, the second execution unit includes:
[0072] A detection unit, used to detect whether a preset statistical time has been reached;
[0073] The determining unit is configured to determine, when a preset statistical time has arrived, whether the flight number stored in the second storage area satisfies a preset second statistical condition.
[0074] In an embodiment provided by the present disclosure, based on the above solution, specifically, the determining unit 501 includes:
[0075] An acquisition subunit, configured to acquire an event identifier in the flight passenger change message;
[0076] The first determining subunit is configured to determine the event type of the flight passenger change message according to the event identifier.
[0077] In an embodiment provided by the present disclosure, based on the above solution, specifically, the determining unit 501 includes:
[0078] A second determining subunit, configured to determine the current time;
[0079] an updating subunit, configured to update a preset status table according to the current time and the flight number included in the flight passenger change message, so that the reception time corresponding to the flight number recorded in the status table is consistent with the current time;
[0080] The third determining subunit is configured to determine the event type of the flight passenger change message after updating the status table.
[0081] In one embodiment provided by the present disclosure, based on the above solution, specifically, as shown in FIG6 , the apparatus for updating flight passenger statistics data further includes:
[0082] The compensation calculation unit 504 is configured to determine, when a preset compensation calculation time is reached, whether the flight number included in the flight passenger change message meets a preset compensation statistical condition according to the reception time.
[0083] Optionally, the compensation calculation unit can be triggered by an external timer. The compensation calculation unit can be a process independent of other units. If an abnormality occurs in other units, the execution of the compensation calculation unit will not be affected.
[0084] The specific principles and execution processes of the various units and modules in the device for updating flight passenger statistical data disclosed in the above-mentioned embodiment of the present invention are the same as those of the method for updating flight passenger statistical data disclosed in the above-mentioned embodiment of the present invention. Please refer to the corresponding parts of the method for updating flight passenger statistical data provided in the above-mentioned embodiment of the present invention, and will not be repeated here.
[0085] The present disclosure also provides a system for updating flight passenger statistics data, the structure of which is shown in FIG7 , and specifically includes:
[0086] Message processing module 701 and statistics module 702;
[0087] The statistical module 701 is used to update the statistical data in the preset statistical table according to the flight passenger data corresponding to the flight number;
[0088] The message processing module 702 is used to execute the above-mentioned method for updating flight passenger statistics data.
[0089] The present disclosure also provides a storage medium including stored instructions. When the instructions are executed, the device containing the storage medium is controlled to execute the above-mentioned method for updating flight passenger statistics data. The method specifically includes:
[0090] If the event type of the flight passenger change message is a flight event type, a first statistical operation or a second statistical operation is performed; wherein the first statistical operation includes: calling a preset statistical module according to the flight number contained in the flight passenger change message, so that the statistical module updates the statistical data in a preset statistical table based on the flight passenger data corresponding to the flight number; the second statistical operation includes: writing the flight number in the flight passenger change message into a preset first storage area, and if it is detected that the flight number stored in the first storage area meets a preset first statistical condition, calling the statistical module according to the flight number in the first storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the first storage area;
[0091] When the event type of the flight passenger change message is a passenger event type, the flight number in the flight passenger change message is written into a preset second storage area. When it is detected that the flight number stored in the second storage area meets a preset second statistical condition, the statistical module is called according to the flight number in the second storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the second storage area.
[0092] In the above method, optionally, determining the event type of the flight passenger change message includes:
[0093] Obtaining the event identifier in the flight passenger change message;
[0094] The event type of the flight passenger change message is determined according to the event identifier.
[0095] Optionally, the above method determines the event type of the flight passenger change message, including:
[0096] Determine the current time;
[0097] updating a preset status table according to the current time and the flight number included in the flight passenger change message so that the reception time corresponding to the flight number recorded in the status table is consistent with the current time;
[0098] After the status table is updated, the event type of the flight passenger change message is determined.
[0099] The above method, optionally, after updating the preset status table, further includes:
[0100] When the preset compensation calculation time is reached, it is determined whether the flight number included in the flight passenger change message meets the preset compensation statistics condition according to the reception time.
[0101] Optionally, in the above method, the process of detecting that the flight numbers stored in the second storage area meet a preset second statistical condition includes:
[0102] Check whether the preset statistical time has been reached;
[0103] When the preset statistical time has arrived, it is determined that the flight number stored in the second storage area meets the preset second statistical condition.
[0104] The present disclosure also provides an electronic device, as shown in FIG8 . The electronic device includes a memory 801 and one or more instructions 802 . The one or more instructions 802 are stored in the memory 801 and are configured to be executed by one or more processors 803 to perform the following operations:
[0105] When a flight passenger change message is received, determining an event type of the flight passenger change message, where the event type is one of a flight event type and a passenger event type;
[0106] If the event type of the flight passenger change message is a flight event type, a first statistical operation or a second statistical operation is performed; wherein the first statistical operation includes: calling a preset statistical module according to the flight number contained in the flight passenger change message, so that the statistical module updates the statistical data in a preset statistical table based on the flight passenger data corresponding to the flight number; the second statistical operation includes: writing the flight number in the flight passenger change message into a preset first storage area, and if it is detected that the flight number stored in the first storage area meets a preset first statistical condition, calling the statistical module according to the flight number in the first storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the first storage area;
[0107] When the event type of the flight passenger change message is a passenger event type, the flight number in the flight passenger change message is written into a preset second storage area. When it is detected that the flight number stored in the second storage area meets a preset second statistical condition, the statistical module is called according to the flight number in the second storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the second storage area.
[0108] According to one or more embodiments of the present disclosure, the embodiment of FIG1 provides a method for updating flight passenger statistics data, the method comprising:
[0109] When a flight passenger change message is received, determining an event type of the flight passenger change message, where the event type is one of a flight event type and a passenger event type;
[0110] If the event type of the flight passenger change message is a flight event type, a first statistical operation or a second statistical operation is performed; wherein the first statistical operation includes: calling a preset statistical module according to the flight number contained in the flight passenger change message, so that the statistical module updates the statistical data in a preset statistical table based on the flight passenger data corresponding to the flight number; the second statistical operation includes: writing the flight number in the flight passenger change message into a preset first storage area, and if it is detected that the flight number stored in the first storage area meets a preset first statistical condition, calling the statistical module according to the flight number in the first storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the first storage area;
[0111] When the event type of the flight passenger change message is a passenger event type, the flight number in the flight passenger change message is written into a preset second storage area. When it is detected that the flight number stored in the second storage area meets a preset second statistical condition, the statistical module is called according to the flight number in the second storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the second storage area.
[0112] In the above method, optionally, determining the event type of the flight passenger change message includes:
[0113] Obtaining the event identifier in the flight passenger change message;
[0114] The event type of the flight passenger change message is determined according to the event identifier.
[0115] Optionally, the above method determines the event type of the flight passenger change message, including:
[0116] Determine the current time;
[0117] updating a preset status table according to the current time and the flight number included in the flight passenger change message so that the reception time corresponding to the flight number recorded in the status table is consistent with the current time;
[0118] After the status table is updated, the event type of the flight passenger change message is determined.
[0119] The above method, optionally, after updating the preset status table, further includes:
[0120] When the preset compensation calculation time is reached, it is determined whether the flight number included in the flight passenger change message meets the preset compensation statistics condition according to the reception time.
[0121] Optionally, in the above method, the process of detecting that the flight numbers stored in the second storage area meet a preset statistical condition includes:
[0122] Check whether the preset statistical time has been reached;
[0123] When the preset statistical time has arrived, it is determined whether the flight number stored in the second storage area meets the preset statistical condition.
[0124] According to one or more embodiments of the present disclosure, the embodiment of FIG5 provides a device for updating flight passenger statistics data, the device comprising:
[0125] a determining unit, configured to, upon receiving a flight passenger change message, determine an event type of the flight passenger change message, the event type being one of a flight event type and a passenger event type;
[0126] a first execution unit configured to execute a first statistical operation or a second statistical operation; wherein the first statistical operation comprises: calling a preset statistical module according to the flight number included in the flight passenger change message, so that the statistical module updates statistical data in a preset statistical table based on flight passenger data corresponding to the flight number; and the second statistical operation comprises: writing the flight number in the flight passenger change message into a preset first storage area, and upon detecting that the flight number stored in the first storage area meets a preset first statistical condition, calling the statistical module according to the flight number in the first storage area, so that the statistical module updates statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the first storage area;
[0127] The second execution unit is configured to write the flight number in the flight passenger change message into a preset storage area when the event type of the flight passenger change message is a passenger event type; and upon detecting that the flight number stored in the storage area meets a preset statistical condition, call the statistical update module according to the flight number in the storage area, so that the statistical update module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the storage area.
[0128] In the above device, optionally, the second execution unit includes:
[0129] A detection unit, used to detect whether a preset statistical time has been reached;
[0130] The determining unit is configured to determine, when a preset statistical time has arrived, whether the flight number stored in the second storage area satisfies a preset second statistical condition.
[0131] In the above device, optionally, the determining unit includes:
[0132] An acquisition subunit, configured to acquire an event identifier in the flight passenger change message;
[0133] The first determining subunit is configured to determine the event type of the flight passenger change message according to the event identifier.
[0134] The above-mentioned device, optionally, the determining unit includes:
[0135] A second determining subunit, configured to determine the current time;
[0136] an updating subunit, configured to update a preset status table according to the current time and the flight number included in the flight passenger change message, so that the reception time corresponding to the flight number recorded in the status table is consistent with the current time;
[0137] The third determining subunit is configured to determine the event type of the flight passenger change message after updating the status table.
[0138] Optionally, the device for updating flight passenger statistics data of the above device further includes:
[0139] The compensation calculation unit is configured to determine, when a preset compensation calculation time is reached, whether the flight number included in the flight passenger change message meets a preset compensation statistical condition based on the reception time.
[0140] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similarities between the various embodiments can be referred to in conjunction with each other. For device embodiments, since they are generally similar to method embodiments, their description is relatively simple, and for relevant details, reference can be made to the description of the method embodiments.
[0141] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0142] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0143] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that the present disclosure can be implemented by means of software plus a necessary general-purpose hardware platform. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present disclosure or certain parts of the embodiments.
[0144] The above is a detailed introduction to a method for updating flight passenger statistics data provided by the present disclosure. Specific examples are used herein to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method and core ideas of the present disclosure. At the same time, for those skilled in the art, according to the ideas of the present disclosure, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present disclosure. Industrial Applicability
[0145] The present disclosure provides a method and device for updating flight passenger statistical data, a storage medium and an electronic device, the method comprising: when a flight passenger change message is received, determining the event type of the flight passenger change message, the event type being one of a flight event type and a passenger event type; when the event type of the flight passenger change message is a flight event type, performing a first statistical operation or a second statistical operation; wherein the first statistical operation comprises: calling a preset statistical module according to the flight number contained in the flight passenger change message, so that the statistical module updates the statistical data in a preset statistical table based on the flight passenger data corresponding to the flight number; the second statistical operation comprises: writing the flight number in the flight passenger change message into a preset first storage area, and If it is detected that the flight number stored in the first storage area meets a preset first statistical condition, the statistical module is called based on the flight number in the first storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the first storage area. If the event type of the flight passenger change message is a passenger event type, the flight number in the flight passenger change message is written to a preset second storage area. If it is detected that the flight number stored in the second storage area meets a preset second statistical condition, the statistical module is called based on the flight number in the second storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the second storage area. Because passenger events with the same flight number are often short-lived and concentrated, in this solution, for multiple different passenger events with the same flight number, the statistical module can be called once to update the statistical data of all passengers on the flight, thereby saving computing resources and avoiding the problem of insufficient computing performance caused by large-scale update events during peak periods.
Claims
1. A method for updating flight passenger statistics data, comprising: When a flight passenger change message is received, determining an event type of the flight passenger change message, where the event type is one of a flight event type and a passenger event type; In the case where the event type of the flight passenger change message is a flight event type, a first statistical operation or a second statistical operation is performed; wherein the first statistical operation includes: calling a preset statistical module according to the flight number contained in the flight passenger change message, so that the statistical module updates the statistical data in a preset statistical table based on the flight passenger data corresponding to the flight number; the second statistical operation includes: writing the flight number in the flight passenger change message into a preset first storage area, and in the case where it is detected that the flight number stored in the first storage area meets a preset first statistical condition, calling the statistical module according to the flight number in the first storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the first storage area; In a case where the event type of the flight passenger change message is a passenger event type, the flight number in the flight passenger change message is written into a preset second storage area, and in a case where it is detected that the flight number stored in the second storage area meets a preset second statistical condition, the statistical module is called according to the flight number in the second storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the second storage area.
2. The method according to claim 1, wherein: The determining the event type of the flight passenger change message includes: Obtaining the event identifier in the flight passenger change message; The event type of the flight passenger change message is determined according to the event identifier.
3. The method according to claim 1, wherein: Determine the event type of the flight passenger change message, including: Determine the current time; According to the current time and the flight number included in the flight passenger change message, a preset status table is updated so that the receiving time corresponding to the flight number recorded in the status table is consistent with the current time; After the status table is updated, the event type of the flight passenger change message is determined.
4. The method according to claim 3, wherein: After the updating of the preset status table, the method further includes: When the preset compensation calculation time is reached, it is determined whether the flight number included in the flight passenger change message meets the preset compensation statistical condition according to the receiving time.
5. The method according to claim 1, wherein: The process of detecting that the flight number stored in the second storage area meets the preset second statistical condition includes: Check whether the preset statistical time has been reached; When the preset statistical time has arrived, it is determined that the flight number stored in the second storage area meets the preset second statistical condition.
6. A device for updating flight passenger statistics data, comprising: a determining unit, configured to determine, when receiving a flight passenger change message, an event type of the flight passenger change message, wherein the event type is one of a flight event type and a passenger event type; A first execution unit is used to execute a first statistical operation or a second statistical operation; wherein the first statistical operation includes: calling a preset statistical module according to the flight number included in the flight passenger change message, so that the statistical module updates the statistical data in a preset statistical table based on the flight passenger data corresponding to the flight number; the second statistical operation includes: writing the flight number in the flight passenger change message into a preset first storage area, and when it is detected that the flight number stored in the first storage area meets a preset first statistical condition, calling the statistical module according to the flight number in the first storage area, so that the statistical module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the first storage area; The second execution unit is used to write the flight number in the flight passenger change message into a preset storage area when the event type of the flight passenger change message is a passenger event type, and call the statistical update module according to the flight number in the storage area when it is detected that the flight number stored in the storage area meets the preset statistical condition, so that the statistical update module updates the statistical data in the preset statistical table based on the flight passenger data corresponding to the flight number in the storage area.
7. The device according to claim 6, wherein: The second execution unit includes: A detection unit, used to detect whether a preset statistical time has been reached; The determination unit is used to determine whether the flight number stored in the storage area meets the preset statistical condition when the preset statistical time has arrived.
8. A system for updating flight passenger statistics, wherein: include: Message processing module and statistics module; The statistical module is used to update the statistical data in the preset statistical table according to the flight passenger data corresponding to the flight number; The message processing module is used to execute the method for updating flight passenger statistical data as described in any one of claims 1 to 5.
9. A storage medium, wherein: The storage medium includes storage instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the method for updating flight passenger statistical data according to any one of claims 1 to 5.
10. An electronic device, wherein: The system comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the method for updating flight passenger statistics data as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for generating flight records of passengers
CN103413361A
Departure flight data updating method and related equipment
CN113486031A
Off-line boarding data processing method and device, storage medium and electronic equipment
CN114301901A
Flight data updating method and system, electronic equipment and storage medium
CN116186059A
Flight passenger statistical data updating method and related equipment
CN117667959A