Passenger data construction method and device, storage medium and electronic equipment

By inspecting flight log files in an open environment and constructing departing passenger data based on flight information or type, the problem of data construction without relying on the departing host system is solved, achieving accurate passenger data generation and ensuring data integrity and accuracy.

CN121880294APending Publication Date: 2026-04-17TRAVELSKY TECHNOLOGY LIMITED
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TRAVELSKY TECHNOLOGY LIMITED
Filing Date
2025-12-26
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In an open environment that does not rely on departing hosts, it is difficult to construct departing passenger data, resulting in the loss of data relationships and a decrease in availability. Furthermore, manually constructed data cannot guarantee its complete accuracy, especially since electronic tickets in the civil aviation sector cannot be constructed manually.

Method used

By receiving data generation requests from the target open environment, the system checks whether the flight log file contains data packets associated with flight information. If so, it extracts the target packets to construct departing passenger data; otherwise, it constructs departing passenger data based on the flight type and generates host files and electronic ticket data.

Benefits of technology

Accurately constructing departing passenger data in an open environment independent of the departure host avoids the loss of data relationships, improves data accuracy and usability, and achieves efficient preliminary data preparation in an open environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121880294A_ABST
    Figure CN121880294A_ABST
Patent Text Reader

Abstract

The invention discloses a passenger data construction method and device, a storage medium and electronic equipment. Relates to the field of software testing. The method comprises the steps that a data generation request of a target open environment is received, and flight information is carried in the data generation request; detecting whether the flight log file contains a data message associated with the flight information; if the detection result indicates that the flight log file contains the data message associated with the flight information, extracting the data message corresponding to the flight information in the flight log file to obtain a target message, and constructing departure passenger data based on the target message; and if the detection result indicates that the flight log file does not contain the data message associated with the flight information, constructing departure passenger data based on the flight type of the flight information. According to the method and the device, the technical problem that departure passenger data is difficult to construct in an open environment independent of a departure host in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software testing, and more specifically, to a method, apparatus, storage medium, and electronic device for constructing passenger data. Background Technology

[0002] Laying the groundwork is crucial for system testing, demonstrating system operation to users, or providing user training. A system without data (e.g., a business system processing airport passenger data) cannot support related business operations. Therefore, this preliminary or foundational data, used to support initial user access, needs to be injected into the system before user use. The injected data can come from anonymized production data or be manually created based on the experience of testers or business personnel.

[0003] To create a processing environment for purely open departure operations, the required foundational data includes flight, passenger, and e-ticket information. However, creating this foundational data presents the following challenges:

[0004] First, because there is a correlation between departing passenger data (e.g., PNL messages, ADL messages, etc.) and host files and electronic tickets, manually constructing data will lead to the loss of the correlation between the data and a decrease in data availability.

[0005] Secondly, while business personnel may be familiar with the service processing logic, they may not have a complete grasp of the underlying data content when creating the foundational data manually, making it impossible to determine whether the data they create is completely correct.

[0006] This is especially true for electronic tickets in the civil aviation sector. This information is bytecode data sent from the departing host and cannot be constructed manually.

[0007] There is currently no effective solution to the above problems. Summary of the Invention

[0008] This invention provides a method, apparatus, storage medium, and electronic device for constructing passenger data, to at least solve the technical problem in the related art that it is difficult to construct departing passenger data in an open environment that does not rely on a departing host.

[0009] According to one aspect of the present invention, a method for constructing passenger data is provided, comprising: receiving a data generation request for a target open environment, wherein the target open environment includes: a test environment detached from a departure host or an environment used for business training, the data generation request carrying: flight information, and the departure host including: a host used to implement the business of a departure system; detecting whether a flight log file contains data packets associated with the flight information, and obtaining a detection result, wherein the flight log file includes: data packets containing passenger data generated by the departure host; if the detection result indicates that the flight log file contains data packets associated with the flight information, then extracting the data packets corresponding to the flight information from the flight log file to obtain a target packet, and constructing departure passenger data based on the target packet to obtain first departure passenger data; if the detection result indicates that the flight log file does not contain data packets associated with the flight information, then constructing departure passenger data based on the flight type of the flight information to obtain second departure passenger data.

[0010] Furthermore, after constructing departing passenger data based on the target message to obtain the first departing passenger data, the method further includes: constructing a host file based on the passenger type in the first departing passenger data to obtain the first host file, and generating electronic ticket data based on the first host file. The passenger type includes a first type, a second type, and a third type. The second type of passenger includes passengers requiring a preset identifier, and the third type of passenger includes passengers on connecting or shared flights. The host file includes a binary file used to store the first departing passenger data. Alternatively, after constructing departing passenger data based on the flight type in the flight information to obtain the second departing passenger data, the method further includes: constructing a host file based on the passenger type in the second departing passenger data to obtain the second host file, and generating electronic ticket data based on the second host file.

[0011] Furthermore, the departing passenger data includes at least one of the following: PNL passenger list message, ADL list addition / removal message, and the flight information includes: flight date. Based on the target message, departing passenger data is constructed to obtain first departing passenger data, including: determining the passenger type associated with the departing passenger data to be generated; constructing passenger data based on the passenger type to obtain multiple first passenger data, and replacing the data in the target message based on the multiple first passenger data and the flight date to obtain the first departing passenger data.

[0012] Further, based on the flight type of the flight information, constructing departing passenger data to obtain second departing passenger data includes: obtaining a preset message template, wherein the preset message template includes at least one of the following: a template for generating PNL messages, a template for generating ADL messages; constructing passenger data based on the passenger type and the flight type to obtain multiple second passenger data, and filling the preset message template based on the multiple second passenger data and the flight date to obtain the second departing passenger data.

[0013] Further, the flight log file is obtained through the following methods: acquiring data filtering conditions, wherein the data filtering conditions include at least one of the following: time range, log size; based on the data filtering conditions, extracting the de-identified log files from the departing host to obtain a first log file; detecting the data integrity of the first log file, obtaining a detection result, and if the detection result indicates that the data in the first log file is complete, storing the passenger data in the first log file into an initial flight file; performing data cleaning and data integration on the data in the initial flight file to obtain the flight log file.

[0014] Furthermore, the data in the initial flight file is cleaned and integrated to obtain the flight log file, including: deduplicating duplicate data packets in the initial flight file to obtain a deduplicated initial flight file; merging multiple flight segments in the deduplicated initial flight file based on the departure and arrival airports of the flight segments to obtain the flight log file.

[0015] Further, detecting whether the flight log file contains data packets associated with the flight information and obtaining a detection result includes: obtaining the directory of the flight log file to obtain a file directory, wherein the file directory includes at least: flight identifier, flight date, and flight segment identifier; matching the flight identifier and originating airport in the flight information with the file directory to obtain a matching result; if the matching result indicates that the file directory contains the flight identifier and originating airport in the flight information, determining that the detection result indicates that the flight log file contains data packets associated with the flight information; if the matching result indicates that the file directory does not contain the flight identifier and originating airport in the flight information, determining that the detection result indicates that the flight log file does not contain data packets associated with the flight information.

[0016] According to another aspect of the present invention, a data construction apparatus is also provided, comprising: a receiving unit, configured to receive a data generation request for a target open environment, wherein the target open environment includes: a test environment detached from a departing host or an environment for business training, the data generation request carrying: flight information, and the departing host including: a host for implementing the business of a departing system; a detection unit, configured to detect whether a flight log file contains a data packet associated with the flight information, and obtain a detection result, wherein the flight log file includes: a data packet containing passenger data generated by the departing host; a first construction unit, configured to, if the detection result indicates that the flight log file contains a data packet associated with the flight information, extract the data packet corresponding to the flight information from the flight log file to obtain a target packet, and construct departing passenger data based on the target packet to obtain first departing passenger data; and a second construction unit, configured to, if the detection result indicates that the flight log file does not contain a data packet associated with the flight information, construct departing passenger data based on the flight type of the flight information to obtain second departing passenger data.

[0017] Furthermore, the data construction apparatus further includes: a first processing unit, configured to, after constructing departing passenger data based on the target message to obtain first departing passenger data, further include: constructing a host file based on the passenger type in the first departing passenger data to obtain a first host file, and generating electronic ticket data based on the first host file, wherein the passenger type includes: a first type, a second type, and a third type, wherein the second type of passenger includes: passengers who need to add a preset identifier, and the third type of passenger includes: passengers on connecting or shared flights, and the host file includes: a binary file for storing the first departing passenger data; or, a second processing unit, configured to, after constructing departing passenger data based on the flight type of the flight information to obtain second departing passenger data, further include: constructing a host file based on the passenger type in the second departing passenger data to obtain a second host file, and generating electronic ticket data based on the second host file.

[0018] Furthermore, the departing passenger data includes at least one of the following: PNL passenger list message, ADL list addition / removal message, and the flight information includes: flight date. The first construction unit includes: a first determining subunit, used to determine the passenger type associated with the departing passenger data to be generated; and a first processing subunit, used to construct passenger data based on the passenger type to obtain multiple first passenger data, and to replace the data in the target message based on the multiple first passenger data and the flight date to obtain the first departing passenger data.

[0019] Further, the second construction unit includes: a first acquisition subunit, used to acquire a preset message template, wherein the preset message template includes at least one of the following: a template for generating PNL messages, a template for generating ADL messages; and a second processing subunit, which constructs passenger data based on the passenger type and the flight type to obtain multiple second passenger data, and fills the preset message template based on the multiple second passenger data and the flight date to obtain the second departing passenger data.

[0020] Further, the flight log file is obtained through the following sub-units: a second acquisition sub-unit, used to acquire data filtering conditions, wherein the data filtering conditions include at least one of the following: time range, log size; an extraction sub-unit, used to extract the de-identified log file from the departing host based on the data filtering conditions, to obtain a first log file; a third processing sub-unit, used to detect the data integrity of the first log file, obtain a detection result, and, if the detection result indicates that the data in the first log file is complete, store the passenger data in the first log file into the initial flight file; and a fourth processing sub-unit, used to perform data cleaning and data integration on the data in the initial flight file to obtain the flight log file.

[0021] Furthermore, the fourth processing subunit includes: a deduplication module, used to deduplicate duplicate data packets in the initial flight file to obtain a deduplicated initial flight file; and a merging module, used to merge multiple flight segments in the deduplicated initial flight file based on the departure airport and arrival airport of the flight segment to obtain the flight log file.

[0022] Further, the detection unit includes: a third acquisition subunit, used to acquire the directory of the flight log file to obtain a file directory, wherein the file directory includes at least: flight identifier, flight date, and flight segment identifier; a matching subunit, used to match the flight identifier and departure airport in the flight information with the file directory to obtain a matching result; a second determination subunit, used to determine, if the matching result indicates that the file directory contains the flight identifier and departure airport in the flight information, that the detection result indicates that the flight log file contains data packets associated with the flight information; and a third determination subunit, used to determine, if the matching result indicates that the file directory does not contain the flight identifier and departure airport in the flight information, that the detection result indicates that the flight log file does not contain data packets associated with the flight information.

[0023] According to another aspect of the present invention, an electronic device is also provided, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute a method for constructing passenger data of any of the above-mentioned items by executing the executable instructions.

[0024] According to another aspect of the present invention, a computer-readable storage medium is also provided, which stores a computer program, wherein the computer program controls the device where the computer-readable storage medium is located to execute the method for constructing passenger data according to any of the above-mentioned methods when it is running.

[0025] In this invention, the following method is adopted: receiving a data generation request from a target open environment, wherein the target open environment includes: a test environment disconnected from the departing host or an environment used for business training, and the data generation request carries: flight information; detecting whether the flight log file contains data packets associated with the flight information, and obtaining a detection result, wherein the flight log file includes: data packets containing passenger data generated by the departing host; if the detection result indicates that the flight log file contains data packets associated with the flight information, then extracting the data packets corresponding to the flight information from the flight log file to obtain the target packet, and constructing departing passenger data based on the target packet to obtain the first departing passenger data; if the detection result indicates that the flight log file does not contain data packets associated with the flight information, then constructing departing passenger data based on the flight type of the flight information to obtain the second departing passenger data. To address the technical problem in related technologies where it is difficult to construct departing passenger data in an open environment independent of the departure host system, this invention constructs departing passenger data in an open environment independent of the departure host. If the requested flight information is present in the flight log file, the departing passenger data is constructed based on the flight log file. If the requested flight information is not present in the flight log file, the departing passenger data is constructed based on the flight type. This avoids the problem in related technologies where it is difficult to construct departing passenger data in a purely open environment, thus achieving the technical effect of accurately constructing departing passenger data in an open environment. Attached Figure Description

[0026] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0027] Figure 1 This is a flowchart of an optional method for constructing passenger data according to an embodiment of the present invention;

[0028] Figure 2 This is a flowchart of an optional electronic ticket data construction according to an embodiment of the present invention;

[0029] Figure 3 This is a schematic diagram of an optional departing passenger data construction process according to an embodiment of the present invention;

[0030] Figure 4 This is a schematic diagram of an optional passenger data extraction process according to an embodiment of the present invention;

[0031] Figure 5 This is a schematic diagram of an optional data construction system according to an embodiment of the present invention;

[0032] Figure 6 This is a schematic diagram of an optional data construction process according to an embodiment of the present invention;

[0033] Figure 7 This is a schematic diagram of an optional data construction apparatus according to an embodiment of the present invention;

[0034] Figure 8 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0035] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0036] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0037] For ease of description, some terms or nouns involved in the various embodiments of the present invention are explained below:

[0038] Offshore host: A host used to implement the business involved in the offshore system;

[0039] The departure system is the core computer system that supports the passenger boarding process at civil airports. It consists of three core modules: passenger check-in control, flight data control, and load balancing.

[0040] Host file: A binary file used in the host to store various data.

[0041] Departing passengers: refers to passengers who depart from the airport (i.e., the origin of the flight) or transfer (to a subsequent flight). Their common characteristic is that they depart from the airport by flight, regardless of their final destination.

[0042] Pure open environment: All services in this environment no longer depend on the off-site host system and are written in high-level programming languages.

[0043] PNL message: Passenger Name List. This is an initial passenger list sent before flight departure, containing information on passengers who have checked in or made reservations. It is typically generated by the check-in system and sent to the destination airport, transit hub, or relevant authorities to prepare support services in advance (such as customs, border control, baggage handling, etc.). A PNL message is generally divided into multiple segments, each a part.

[0044] ADL message: Additions and Deletions List. This message allows modification of passenger information after receiving a PNL message.

[0045] Electronic tickets: These are paperless ticketing formats commonly used in the civil aviation industry. They replace traditional paper tickets with electronic data and record passengers' flight bookings, itineraries, and payment information.

[0046] It should be noted that the user information (including but not limited to user device information, user personal information, etc.), the collected information and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse.

[0047] Example 1

[0048] According to an embodiment of the present invention, an alternative method for constructing passenger data is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0049] Figure 1 This is a flowchart of an optional method for constructing passenger data according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0050] Step S101: Receive a data generation request for the target open environment, wherein the target open environment includes: a test environment or an environment used for business training that is disconnected from the departure host, and the data generation request carries: flight information, and the departure host includes: a host used to implement the business of the departure system.

[0051] The target open environment mentioned above can be a completely open environment, including the business system environment to be tested, or an environment used for user demonstrations or training. The data generation request mentioned above may include: flight information, such as flight identifier (e.g., flight number), flight date, departure airport information, etc.

[0052] In one alternative example, the target open environment can be not only a purely open environment, but also any environment where passenger and e-ticket information is to be fed in independently of the host. The data to be fed in is not limited to passenger data and e-ticket information.

[0053] Step S102: Detect whether the flight log file contains data packets associated with flight information and obtain the detection result. The flight log file includes data packets containing passenger data generated by the departing host.

[0054] The types of data packets mentioned above can include: PNL packets and ADL packets. In this embodiment, the detection result can be obtained by querying the flight log file to see if the data packets contain the flight identifier and the originating airport from the flight information.

[0055] Step S103: If the detection result indicates that the flight log file contains data packets associated with flight information, then extract the data packets corresponding to the flight information from the flight log file to obtain the target packet, and construct the departing passenger data based on the target packet to obtain the first departing passenger data.

[0056] If the detection result indicates that the flight log file contains data packets associated with flight information, then the data packets corresponding to the flight information can be extracted from the flight log file to obtain the target packet.

[0057] In this embodiment, passenger information, including name, identity information and contact number, can be randomly generated. The data in the target message can be replaced based on the randomly generated passenger data and the flight date in the flight information to obtain the first departing passenger data. A host file of the first departing passenger data can also be generated, and an electronic ticket can be generated based on the host file.

[0058] Step S104: If the detection result indicates that the flight log file does not contain data packets associated with flight information, then the departing passenger data is constructed based on the flight type of the flight information to obtain the second departing passenger data.

[0059] If the detection result indicates that the flight log file does not contain data packets associated with flight information, the randomly generated passenger data and flight dates from the flight information can be filled into the preset PNL / ADL message template to obtain the second departing passenger data. The host file of the second departing passenger data can also be generated, and an electronic ticket can be generated based on the host file.

[0060] Through the above steps, in this embodiment, when constructing departing passenger data in an open environment independent of the departure host, the departing passenger data is constructed based on the flight log file if the requested flight information is present in the flight log file; otherwise, it is constructed based on the flight type. This avoids the problem in related technologies where it is difficult to construct departing passenger data in a purely open environment, thus achieving the technical effect of accurately constructing departing passenger data in an open environment. It solves the technical problem in related technologies where it is difficult to construct departing passenger data and the data accuracy is low in an open environment that does not rely on the departure host system.

[0061] Optionally, in the passenger data construction method provided in the embodiments of the present invention, after constructing departing passenger data based on the target message to obtain the first departing passenger data, the method further includes: constructing a host file based on the passenger type in the first departing passenger data to obtain the first host file, and generating electronic ticket data based on the first host file. The passenger type includes: a first type, a second type, and a third type. The second type of passenger includes: passengers who need to add a preset identifier; the third type of passenger includes: passengers on connecting or shared flights; and the host file includes: a binary file used to store the first departing passenger data. Alternatively, after constructing departing passenger data based on the flight type of flight information to obtain the second departing passenger data, the method further includes: constructing a host file based on the passenger type in the second departing passenger data to obtain the second host file, and generating electronic ticket data based on the second host file.

[0062] The second type of passenger mentioned above includes passengers who need to have a preset identifier added. The preset identifier can be used to identify whether the passenger is a wheelchair user, an infant, an unaccompanied child, or an unaccompanied elderly person.

[0063] In this embodiment, for both the first departing passenger data and the second departing passenger data, passenger data (e.g., passenger identity information, e-ticket number, PNR (Passenger Name Record) number) can be replaced in the e-ticket data template to generate a host file with the corresponding e-ticket number. Finally, the content of the host file is converted into a message that can be recognized by the receiver.

[0064] Figure 2 This is a flowchart of an optional electronic ticket data construction method according to an embodiment of the present invention, such as... Figure 2 As shown, the electronic ticket data construction is mainly divided into three categories: ordinary passengers, special passengers, and multi-segment passengers. The electronic ticket data construction process includes four steps:

[0065] Step 1: Generate a host file for Type 1 passengers (e.g., regular passengers): Key information on e-tickets includes name, ID card or passport, airline, flight number, departure date, origin station, destination station, e-ticket number, and PNR number. In the host file, this key information is converted to host file-compatible content, then replaced in the corresponding positions in the template. Finally, the total file length is calculated by concatenating the information to complete the generation of the e-ticket host file.

[0066] Step 2: Generate host files for the second type of passenger (e.g., special passengers): Special passengers can use some string identifiers (corresponding to preset identifiers) in the electronic ticket to identify the type of special passenger, and these identifiers can be replaced from the template.

[0067] Step 3: Generate host files for the third type of passenger (e.g., multi-segment passengers): Multi-segment passengers' flight segment information can be fully reflected in their electronic tickets, including the origin airport, destination airport, and transit airport (in departing passenger data, the passenger information itself does not include the transit airport, but it is indicated in the PNL message, such as origin airport A, destination airport C, and if a passenger disembarks at transit airport B, the message will include an identifier for airport B). When generating the host file, the departure and arrival airports for each flight segment can be identified and concatenated. For example, if the passenger's name is zhangsan, the origin airport is PEK, the destination airport is CKG, and the transit airport is SHA, then the information for the first flight segment is PEK-SHA, and the information for the second flight segment is SHA-CKG, both of which need to be concatenated into the host file.

[0068] Step 4: Converting the host file to an e-ticket: After generating the host file, its content can be converted into a format recognizable by the e-ticket recipient. Before conversion, the generated content can be verified for integrity and validity. If the verification fails, the current file conversion will stop and be recorded, and the process will continue with the next file.

[0069] After converting e-tickets to a recognizable format, to prevent conversion errors, this recognizable format can be simultaneously converted to a structured format, such as JSON (JavaScript Object Notation, a lightweight data interchange format) or XML (Extensible Markup Language). By comparing the passenger information before and after the format conversion, the correctness of the generated e-ticket content can be determined. Any abnormally generated e-ticket information is recorded for subsequent error correction and tracking, improving the robustness of data generation.

[0070] Optionally, in the passenger data construction method provided in the embodiments of the present invention, the departing passenger data includes at least one of the following: PNL passenger list message, ADL list addition / removal message, and the flight information includes: flight date. Based on the target message, departing passenger data is constructed to obtain first departing passenger data, including: determining the passenger type associated with the departing passenger data to be generated; constructing passenger data based on the passenger type to obtain multiple first passenger data, and replacing the data in the target message based on the multiple first passenger data and the flight date to obtain the first departing passenger data.

[0071] The aforementioned departing passenger data may include, but is not limited to: PNL passenger list messages and ADL list addition / removal messages.

[0072] If the flight log file contains data packets associated with flight information, departing passenger data can be constructed based on the target packets in the flight log file. For example, passenger data can be randomly generated based on passenger type to obtain multiple first passenger data. Then, the relevant data in the target packet can be replaced based on the first passenger data to obtain the first departing passenger data. The passenger data may include, but is not limited to: passenger, name, electronic ticket number, RNR number, etc.

[0073] Figure 3 This is a schematic diagram of an optional departing passenger data construction process according to an embodiment of the present invention, such as... Figure 3 As shown, the construction of departing passenger data is divided into ordinary passenger information replacement, special passenger information replacement, and special data processing. Through these steps, the key data of the PNL message is adjusted to the final required data.

[0074] like Figure 3As shown, the data obtained from the log file (corresponding to the flight log file) (corresponding to the target message) can include: 1.1. Replacement of ordinary passenger information: The corresponding flight date in the target message can be replaced, and the ticket number and PNR number in the target message can be replaced by generating a new random electronic ticket number and PNR number. For example, if the previous flight log file collected the log for 21MAY25, and the user's data generation request is for 03JUN25, then 21MAY25 in the flight log file can be replaced with the date in the request, i.e., 03JUN25. The electronic ticket number and PNR number are then matched and searched in the original message (i.e., the target message) according to the matching rules and then replaced.

[0075] 2. Key Data Population for Special Passengers (corresponding to the second type of passenger): In addition to the information such as name, ID card number, and e-ticket number of ordinary passengers in the first step, special passengers also have corresponding special information markers. Therefore, besides passengers extracted from log data (i.e., flight log files), all constructed special passengers can have corresponding templates. For example, infant passengers generally need to be accompanied by a guardian. Therefore, in the infant template, in addition to replacing the infant's name and e-ticket number information, the infant's ticket identity information is filled with the guardian's identity information (infants themselves do not have ID card numbers). After the special passenger data is populated, it is also imported into the PNL / ADL message.

[0076] 3. Other Special Data Processing: Other special data refers to information requiring additional processing, such as the connecting flight dates of passengers on connecting or shared flights. Since the information of passengers on connecting or shared flights includes the departure dates of the associated flights (e.g., the current flight departure date is 21MAY25, and a passenger's connecting flight information shows a connecting flight date of 23MAY25), the time difference is +2 days. When replacing the departure date of this type of passenger with the front-end requested date, such as 03JUN25, the departure date of the associated flight needs to be replaced simultaneously. This can be calculated by taking the difference between the departure date and the number of days to obtain the replaced connecting flight date as 05JUN25.

[0077] By replacing the data in the original PNL / ADL messages, PNL / ADL messages are constructed in a purely open environment, avoiding the high error rate of manually constructing departing passenger data in related technologies. This achieves the technical effect of improving the accuracy of the underlying data construction in an open environment.

[0078] Optionally, in the passenger data construction method provided in the embodiments of the present invention, constructing departing passenger data based on the flight type of flight information to obtain second departing passenger data includes: obtaining a preset message template, wherein the preset message template includes at least one of the following: a template for generating PNL messages and a template for generating ADL messages; constructing passenger data based on passenger type and flight type to obtain multiple second passenger data, and filling the preset message template based on the multiple second passenger data and flight date to obtain second departing passenger data.

[0079] In this embodiment, the flight type can be determined based on flight information (such as flight number, departure and arrival airports). The flight type can be international or domestic, because different types of flights often correspond to different passenger information formats and requirements. For example, domestic flights may require ID card information, while international flights may require passport information. Therefore, the corresponding departing passenger data can be constructed based on the flight type.

[0080] The preset message template can be used to generate PNL (Passenger Name List) messages or ADL (Additions and Deletions List) messages. The message template can be predefined based on industry standards and specifications, containing the necessary fields and data structures to ensure that the generated messages meet the recipient's requirements.

[0081] In this embodiment, multiple second passenger data sets can be constructed based on flight type and passenger type (adult, child, infant, special passenger, etc.). The construction process may include randomly generating passenger identity information that meets the requirements, such as name, ID number, passport number, contact information, etc. For special passengers, such as unaccompanied minors or wheelchair passengers, special identification and service request information can also be added. Then, based on the constructed multiple second passenger data sets and the specific date of the flight (corresponding to the flight date carried in the data generation request), a preset message template can be populated. The population process includes: inserting passenger data into the corresponding fields of the template, while ensuring the correctness of the flight date, to generate an accurate PNL or ADL message, thereby obtaining the second departing passenger data, i.e., a PNL or ADL message with passenger information and flight date that meets the requirements of system testing or business training. This data can be used to simulate various passenger operations and flight statuses in the departing host to test system functions and verify data processing procedures.

[0082] like Figure 3 As shown, for data (corresponding to the target message) that cannot be obtained from the log file (corresponding to the flight log file), the following steps can be used to construct departing passenger data:

[0083] 1. Construct Passenger Key Data Template Population: If the passenger data does not come from the log file, it is the constructed second passenger data. The second passenger data may include: name, ID card or passport number, country information, randomly generated electronic ticket number and PNR number. These data can be filled into the standard passenger information template, and then the filled complete passenger information is imported into the message template. The date in the PNL / ADL message is replaced with the date of the front-end request (corresponding to the data generation request).

[0084] 2. Special Passenger Key Data Population: In addition to the information such as name, ID card number, and e-ticket number of ordinary passengers in the first step, special passengers also have corresponding special information markers. Therefore, besides passengers extracted from log data (i.e., flight log files), constructed special passengers can have corresponding templates. For example, infant passengers generally need to be accompanied by a guardian. Therefore, in the infant template, in addition to replacing the infant's name and e-ticket number information, the infant's ticket identity information is filled with the guardian's identity information (infants themselves do not have ID card numbers). After the special passenger data is populated, it is also imported into the PNL / ADL message.

[0085] 3. Other Special Data Processing: Other special data refers to information requiring additional processing, such as the connecting flight dates of passengers on connecting or shared flights. Since the information of passengers on connecting or shared flights includes the departure dates of the associated flights (e.g., the current flight departure date is 21MAY25, and a passenger's connecting flight information shows a connecting flight date of 23MAY25), the time difference is +2 days. When replacing the departure date of this type of passenger with the front-end requested date, such as 03JUN25, the departure date of the associated flight needs to be replaced simultaneously. This can be calculated by taking the difference between the departure date and the number of days to obtain the replaced connecting flight date as 05JUN25.

[0086] By constructing departure passenger data, not only can the integrity of the data be ensured, but also the dependence on the departure host system can be avoided, allowing testing and training to be carried out in an environment outside the departure host, thus improving the flexibility and efficiency of the initial data preparation.

[0087] Optionally, in the passenger data construction method provided in this embodiment of the invention, the flight log file is obtained in the following manner: obtaining data filtering conditions, wherein the data filtering conditions include at least one of the following: time range, log size; based on the data filtering conditions, extracting the de-identified log file from the departing host to obtain a first log file; detecting the data integrity of the first log file, obtaining a detection result, and storing the passenger data in the first log file into an initial flight file if the detection result indicates that the data in the first log file is complete; performing data cleaning and data integration on the data in the initial flight file to obtain the flight log file.

[0088] The flight log files can be sourced from the de-identified logs of the departure host production environment. Before use, the de-identified log content can be processed to obtain the most accurate and comprehensive passenger data possible. Specifically, the data preparation work can be divided into the following three steps:

[0089] Step 1: Coarse extraction of flight-related information: Scan the log file size within a specified time range (e.g., date range), extract the file with the largest log volume for N consecutive days (e.g., three days) as the collection target, and collect host messages related to flights and passengers from it and save them to a separate file.

[0090] Step 2: Check the integrity of flight passenger data: When synchronizing passenger data, the continuity and integrity of the data can be guaranteed. Therefore, after the data is roughly extracted, the flights with complete passenger data can be sorted out to ensure that the data will not be lost during passenger data synchronization. The sorted flight data is stored in a separate file of [Flight Number-Flight Date-Flight Segment] (corresponding to the initial flight file), such as CA181521MAY25PEKSHA.

[0091] Step 3: Deduplicat data, remove irrelevant data, and integrate flight segment information.

[0092] Optionally, in the passenger data construction method provided in the embodiments of the present invention, data cleaning and data integration are performed on the data in the initial flight file to obtain a flight log file, including: deduplicating duplicate data packets in the initial flight file to obtain a deduplicated initial flight file; merging multiple flight segments in the deduplicated initial flight file based on the departure airport and arrival airport of the flight segment to obtain a flight log file.

[0093] For example, in the collected complete flight data file CA181521MAY25PEKSHA (the initial flight file), there may be instances where the same message content appears multiple times. For instance, there may be PNL messages containing multiple identical passenger information. In such cases, deduplication is necessary, such as retrieving only the last record of the identical passenger information as valid data. Messages outside the PNL can also be removed. Finally, multi-segment flights can be integrated into complete flight data based on the departure and arrival airports. If there are two files, CA181521MAY25PEKCKG and CA181521MAY25CKGSHA, with flight segments PEKCKG and CKGSHA respectively, then the PEK-CKG-SHA segment data can be integrated from the two files into the CA181521MAY25PEK.txt file. This file contains the complete flight data CA1815 21AMY25 read during data extraction, thus obtaining the flight log file.

[0094] Optionally, in the passenger data construction method provided in this embodiment of the invention, detecting whether the flight log file contains data packets associated with flight information and obtaining a detection result includes: obtaining the directory of the flight log file to obtain a file directory, wherein the file directory includes at least: flight identifier, flight date, and flight segment identifier; matching the flight identifier and originating airport in the flight information with the file directory to obtain a matching result; if the matching result indicates that the file directory contains the flight identifier and originating airport in the flight information, determining that the detection result indicates that the flight log file contains data packets associated with flight information; if the matching result indicates that the file directory does not contain the flight identifier and originating airport in the flight information, determining that the detection result indicates that the flight log file does not contain data packets associated with flight information.

[0095] The aforementioned flight log file directory may include information such as flight identifier, flight date, and segment identifier. The flight identifier may include the flight number, which is a unique identifier for the flight. The origin airport can be the airport from which the flight departs. The segment identifier describes the origin and destination of the flight; for connecting flights, it may include multiple segments.

[0096] By comparing flight information (including flight identifier and departure airport) with information stored in a file directory, it is possible to find whether there is a data packet that matches the query criteria.

[0097] If a file matching the flight identifier and originating airport is found in the file directory, it means that the flight log file contains data packets associated with that flight. Conversely, if no file matching the flight identifier and originating airport is found in the file directory, it means that the flight log file likely does not contain data packets associated with the queried flight.

[0098] The above steps can automatically identify and detect whether the flight log file contains associated data messages for a specific flight, so as to select the method for constructing departure data in the future, thereby improving the efficiency and accuracy of the preparation.

[0099] Figure 4 This is a schematic diagram of an optional passenger data extraction process according to an embodiment of the present invention. The main function of data extraction is to obtain passenger data resources that meet the requirements from different data sources (e.g., flight log files) based on the front-end request (corresponding to the data generation request) to ensure that the passenger data is constructed completely. Figure 4 As shown, the data extraction process consists of three steps:

[0100] Step 1: Flight Information Retrieval and Confirmation (1. Receive RQL (Passenger List Request) message to retrieve flight information):

[0101] Upon receiving the RQL message from the front end requesting passenger synchronization, the system retrieves information such as flight identifier (e.g., flight number), flight date, and departure airport. Based on this information, it checks and determines the flight type and passenger information source. For example, for flight number CA1815, date 03JUN25, and departure airport PEK, a flight log file CA181521MAY25PEK.txt is found. Time is not used as a matching rule here because the actual date and the log file date are inconsistent. Therefore, the passenger data is directly obtained from the log file. Proceed to step two.

[0102] If no matching flight log file is found, the database is called to query the flight type, which is divided into domestic flights and international flights. Passengers in these two types require different identity verification procedures. Proceed to step three.

[0103] Step 2: Directly collect passenger data from flight log files (2. Directly collect passenger data from log files):

[0104] Based on flight number CA1815 and originating airport PEK, the directory of collected flight log data files is traversed. Among them, CA181521MAY25PEK.txt is matched. After matching, the PNL message content in the file is directly extracted as the basic data for construction.

[0105] Step 3: Construct corresponding random passenger data based on flight type:

[0106] If no matching flight log file is found for the flight to be collected, then query the flight type and determine the passenger identity authentication information to be constructed based on the flight type. For example, 3.1, construct random domestic flight passenger data, such as ID card number; 3.2, construct random international flight passenger data, such as passport number.

[0107] If the user's data generation request has no special requirements, the default passenger data can be constructed as 100 adults, 20 children, and 5 infants, or the user can set it according to their own needs.

[0108] This embodiment overcomes the predicament of being unable to construct passenger data, especially electronic ticket data, when disconnected from the departure host, resulting in the absence of passengers in the entire test environment or user training environment. It provides strong support for open testing of the host and achieves the technical effect of accurately constructing departure passenger data.

[0109] Example 2

[0110] Embodiment 2 of the present invention provides an optional data construction system, which can be used to execute the passenger data construction method provided in Embodiment 1 of the present invention.

[0111] Figure 5 This is a schematic diagram of an optional data construction system according to an embodiment of the present invention, such as... Figure 5 As shown, it includes:

[0112] Request receiving component: Used to listen for data processing requests (e.g., data generation requests). When passenger and e-ticket data needs to be created, the front end sends a request to the interface provided by this component. After receiving the request, the component sends the corresponding data to the data extraction component.

[0113] Data extraction component: After receiving the information from the request receiving component, it will retrieve the de-identified passenger data, flight information, and other data from the data storage component based on the flight information (e.g., flight number) in the request.

[0114] Data construction component: Constructs PNL and ADL messages containing passenger information (corresponding to the first departing passenger data / second departing passenger data), constructs host data files containing passenger information and electronic ticket information, and converts the host data files into bytecode files.

[0115] Data push component: can send the generated passenger information and electronic ticket information to the corresponding data recipient.

[0116] Passenger information generation component: It can generate random passenger information as required, including name, ID number or passport number, contact number, etc. It can also generate different passenger types, such as adults, children, infants and other special passengers, such as unaccompanied children, unaccompanied elderly, stretcher, wheelchair, etc.

[0117] Data storage component: Used to store logs and flight information retrieved from the production environment and then transferred to the test environment after being anonymized.

[0118] Data statistics component: Used to perform statistics on the constructed and pushed data.

[0119] Figure 6 This is a schematic diagram of an optional data construction process according to an embodiment of the present invention, such as... Figure 6 As shown, it includes:

[0120] Step 1: The user sends a data generation request to the request receiving component as needed. The request includes the flight number, date, and departure airport information of the data to be generated.

[0121] Step 2: After the request receiving component receives the message, it calls the data extraction component.

[0122] Step 3: The data extraction component calls the data storage component to query whether PNL and ADL messages exist under the specified flight and origin airport based on the flight number, date, and origin airport information. If they do not exist, proceed to step 4; otherwise, extract the PNL / ADL messages and send them to the data construction component, proceed to step 7.

[0123] Step 4: Call the data storage component to query the type of the flight, distinguish whether it is a domestic flight or an international flight, and send it to the data construction component.

[0124] Step 5: After receiving the flight type, the data construction component calls the passenger information generation component to generate random passenger information, including name, identity information and contact number.

[0125] Step 6: The data construction component replaces the generated random passenger information with the defined PNL / ADL message template, and proceeds to Step 7.

[0126] Step 7: The data construction component will replace the date in the request from Step 1 with the date generated from the template or extracted from the logs in the PNL / ADL message, and generate a random electronic ticket number for constructing the host electronic ticket message.

[0127] Step 8: The data push component pushes the constructed PNL / ADL message and electronic ticket message to the message receiver through the bus system.

[0128] Step 9: The data statistics component will summarize the received requests, constructed passengers and electronic tickets, constructed passenger flight days, and other data, and display the results in a visual way.

[0129] This embodiment overcomes the predicament of being unable to construct passenger data, especially electronic ticket data, when disconnected from the departure host, resulting in the absence of passengers in the entire test environment or user training environment. It provides strong support for open testing of the host and achieves the technical effect of accurately constructing departure passenger data.

[0130] Example 3

[0131] Embodiment 3 of the present invention provides an optional data construction device, wherein each implementation unit in the data construction device corresponds to each implementation step in Embodiment 1.

[0132] Figure 7 This is a schematic diagram of an optional data construction apparatus according to an embodiment of the present invention, such as... Figure 7 As shown, the data construction device includes: a receiving unit 71, a detection unit 72, a first construction unit 73, and a second construction unit 74.

[0133] The receiving unit 71 is used to receive a data generation request from a target open environment, wherein the target open environment includes: a test environment or an environment used for business training that is disconnected from the departure host; the data generation request carries: flight information; and the departure host includes: a host used to implement the business of the departure system.

[0134] The detection unit 72 is used to detect whether the flight log file contains data packets associated with flight information and obtain the detection result. The flight log file includes data packets containing passenger data generated by the departing host.

[0135] The first construction unit 73 is used to extract the data packet corresponding to the flight information in the flight log file if the detection result indicates that the flight log file contains a data packet associated with the flight information, obtain the target packet, and construct the departing passenger data based on the target packet to obtain the first departing passenger data.

[0136] The second construction unit 74 is used to construct departing passenger data based on the flight type of the flight information if the detection result indicates that the flight log file does not contain data packets associated with flight information, thereby obtaining the second departing passenger data.

[0137] In the data construction apparatus provided in this embodiment of the invention, a data generation request for a target open environment can be received by a receiving unit 71. The target open environment includes a test environment detached from the departure host or an environment used for business training. The data generation request carries flight information. The departure host includes a host used to implement the business of the departure system. A detection unit 72 detects whether the flight log file contains data packets associated with flight information and obtains a detection result. The flight log file includes data packets containing passenger data generated by the departure host. If the detection result indicates that the flight log file contains data packets associated with flight information, the first construction unit 73 extracts the data packets corresponding to the flight information from the flight log file to obtain the target packet. Departure passenger data is constructed based on the target packet to obtain the first departure passenger data. If the detection result indicates that the flight log file does not contain data packets associated with flight information, the second construction unit 74 constructs departure passenger data based on the flight type of the flight information to obtain the second departure passenger data. This invention addresses the technical problem in related technologies where it is difficult to construct departing passenger data and the data accuracy is low in an open environment that does not rely on the departing host system. In this embodiment, when constructing departing passenger data in an open environment independent of the departing host, the departing passenger data is constructed based on the flight log file if the requested flight information is contained in the flight log file, and based on the flight type if the requested flight information is not contained in the flight log file. This avoids the problem in related technologies where it is difficult to construct departing passenger data in a purely open environment, thereby achieving the technical effect of accurately constructing departing passenger data in an open environment.

[0138] Optionally, in the data construction apparatus provided in the embodiments of the present invention, the data construction apparatus further includes: a first processing unit, configured to, after constructing departing passenger data based on a target message to obtain first departing passenger data, further include: constructing a host file based on the passenger type in the first departing passenger data to obtain a first host file, and generating electronic ticket data based on the first host file, wherein the passenger type includes: a first type, a second type, and a third type, wherein the second type of passenger includes: passengers who need to add a preset identifier, the third type of passenger includes: passengers on connecting or shared flights, and the host file includes: a binary file for storing the first departing passenger data; or, a second processing unit, configured to, after constructing departing passenger data based on the flight type of flight information to obtain second departing passenger data, further include: constructing a host file based on the passenger type in the second departing passenger data to obtain a second host file, and generating electronic ticket data based on the second host file.

[0139] Optionally, in the data construction apparatus provided in this embodiment of the invention, the departing passenger data includes at least one of the following: PNL passenger list message, ADL list addition / reduction message, and the flight information includes: flight date. The first construction unit includes: a first determining subunit, used to determine the passenger type associated with the departing passenger data to be generated; and a first processing subunit, used to construct passenger data based on the passenger type, obtain multiple first passenger data, and replace the data in the target message based on the multiple first passenger data and the flight date to obtain the first departing passenger data.

[0140] Optionally, in the data construction apparatus provided in this embodiment of the invention, the second construction unit includes: a first acquisition subunit, configured to acquire a preset message template, wherein the preset message template includes at least one of the following: a template for generating PNL messages, a template for generating ADL messages; and a second processing subunit, configured to construct passenger data based on passenger type and flight type, obtain multiple second passenger data, and fill the preset message template based on the multiple second passenger data and flight date to obtain second departing passenger data.

[0141] Optionally, in the data construction apparatus provided in this embodiment of the invention, the flight log file is obtained through the following sub-units: a second acquisition sub-unit, used to acquire data filtering conditions, wherein the data filtering conditions include at least one of the following: time range, log size; an extraction sub-unit, used to extract the de-identified log file from the departing host based on the data filtering conditions, to obtain a first log file; a third processing sub-unit, used to detect the data integrity of the first log file, obtain a detection result, and, if the detection result indicates that the data in the first log file is complete, store the passenger data in the first log file into the initial flight file; and a fourth processing sub-unit, used to perform data cleaning and data integration on the data in the initial flight file to obtain the flight log file.

[0142] Optionally, in the data construction apparatus provided in this embodiment of the invention, the fourth processing subunit includes: a deduplication module, used to deduplicate duplicate data packets in the initial flight file to obtain a deduplicated initial flight file; and a merging module, used to merge multiple flight segments in the deduplicated initial flight file based on the departure airport and arrival airport of the flight segment to obtain a flight log file.

[0143] Optionally, in the data construction apparatus provided in this embodiment of the invention, the detection unit includes: a third acquisition subunit, used to acquire the directory of the flight log file to obtain a file directory, wherein the file directory includes at least: flight identifier, flight date, and flight segment identifier; a matching subunit, used to match the flight identifier and originating airport in the flight information with the file directory to obtain a matching result; a second determination subunit, used to determine that the detection result indicates that the flight log file contains data packets associated with the flight information if the matching result indicates that the file directory contains the flight identifier and originating airport in the flight information; and a third determination subunit, used to determine that the detection result indicates that the flight log file does not contain data packets associated with the flight information if the matching result indicates that the file directory does not contain the flight identifier and originating airport in the flight information.

[0144] The data construction device described above may also include a processor and a memory. The receiving unit 71, the detection unit 72, the first construction unit 73, and the second construction unit 74 described above are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize the corresponding functions.

[0145] The aforementioned processor contains a kernel that retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting kernel parameters, when constructing departing passenger data in an open environment separate from the departure host, the data is constructed based on the flight log file if the requested flight information is present. If the flight log file does not contain the requested flight information, the data is constructed based on the flight type. This avoids the problem in related technologies where it is difficult to construct departing passenger data in a purely open environment, thus achieving the technical effect of accurately constructing departing passenger data in an open environment.

[0146] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0147] According to another aspect of the present invention, an electronic device is also provided, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute a method for constructing passenger data of any of the above-mentioned items by executing the executable instructions.

[0148] According to another aspect of the present invention, a computer-readable storage medium is also provided, which stores a computer program, wherein the computer program controls the device where the computer-readable storage medium is located to execute the method for constructing passenger data according to any of the above-mentioned methods when it is running.

[0149] Figure 8 This is a schematic diagram of an electronic device according to an embodiment of the present invention, such as... Figure 8 As shown, an embodiment of the present invention provides an electronic device 80, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements a method for constructing passenger data as described above.

[0150] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0151] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0152] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0153] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0154] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0155] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0156] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for constructing passenger data, characterized in that, include: Receive a data generation request for a target open environment, wherein the target open environment includes: a test environment detached from the departure host or an environment used for business training, and the data generation request carries: flight information, and the departure host includes: a host used to implement the business of the departure system; The flight log file is checked to see if it contains data packets associated with the flight information, and the check result is obtained. The flight log file includes data packets containing passenger data generated by the departing host. If the detection result indicates that the flight log file contains a data packet associated with the flight information, then the data packet corresponding to the flight information is extracted from the flight log file to obtain the target packet, and departing passenger data is constructed based on the target packet to obtain the first departing passenger data. If the detection result indicates that the flight log file does not contain data packets associated with the flight information, then departing passenger data is constructed based on the flight type of the flight information to obtain the second departing passenger data.

2. The method for constructing passenger data according to claim 1, characterized in that, After constructing departing passenger data based on the target message to obtain the first departing passenger data, the method further includes: constructing a host file based on the passenger type in the first departing passenger data to obtain the first host file, and generating electronic ticket data based on the first host file. The passenger type includes a first type, a second type, and a third type. The second type of passenger includes passengers who need to add a preset identifier, and the third type of passenger includes passengers on connecting or shared flights. The host file includes a binary file used to store the first departing passenger data. or, After constructing departing passenger data based on the flight type of the flight information to obtain the second departing passenger data, the method further includes: constructing a host file based on the passenger type in the second departing passenger data to obtain the second host file, and generating electronic ticket data based on the second host file.

3. The method for constructing passenger data according to claim 1, characterized in that, The departing passenger data includes at least one of the following: PNL passenger list message, ADL list addition / removal message, and the flight information includes: flight date. Based on the target message, departing passenger data is constructed to obtain the first departing passenger data, including: Determine the passenger type associated with the departing passenger data to be generated; Passenger data is constructed based on the passenger type to obtain multiple first passenger data sets. Based on the multiple first passenger data sets and the flight date, the data in the target message is replaced to obtain the first departing passenger data sets.

4. The method for constructing passenger data according to claim 3, characterized in that, Based on the flight type of the aforementioned flight information, departing passenger data is constructed to obtain second departing passenger data, including: Obtain a preset message template, wherein the preset message template includes at least one of the following: a template for generating PNL messages, and a template for generating ADL messages; Based on the passenger type and the flight type, passenger data is constructed to obtain multiple second passenger data sets. Based on the multiple second passenger data sets and the flight date, the preset message template is filled to obtain the second departing passenger data sets.

5. The method for constructing passenger data according to claim 4, characterized in that, The flight log file was obtained in the following way: Obtain data filtering conditions, wherein the data filtering conditions include at least one of the following: time range, log size; Based on the data filtering criteria, the de-identified log files in the departing host are extracted to obtain the first log file; The data integrity of the first log file is checked to obtain the check result. If the check result indicates that the data in the first log file is complete, the passenger data in the first log file is stored in the initial flight file. The data in the initial flight file is cleaned and integrated to obtain the flight log file.

6. The method for constructing passenger data according to claim 5, characterized in that, The data in the initial flight file is cleaned and integrated to obtain the flight log file, which also includes: The duplicate data packets in the initial flight file are deduplicated to obtain the deduplicated initial flight file. Based on the departure and arrival airports of flight segments, multiple flight segments in the deduplicated initial flight file are merged to obtain the flight log file.

7. The method for constructing passenger data according to claim 1, characterized in that, The detection results are obtained by checking whether the flight log file contains data packets associated with the flight information, including: Obtain the directory of the flight log file to obtain the file directory, wherein the file directory includes at least: flight identifier, flight date, and flight segment identifier; The flight identifier and departure airport in the flight information are matched with the file directory to obtain the matching results; If the matching result indicates that the file directory contains the flight identifier and departure airport from the flight information, it is determined that the detection result indicates that the flight log file contains the data packet associated with the flight information; If the matching result indicates that the flight identifier and originating airport in the flight information are not present in the file directory, then the detection result indicates that the data packets associated with the flight information are not present in the flight log file.

8. A data construction apparatus, characterized in that, include: A receiving unit is used to receive a data generation request from a target open environment, wherein the target open environment includes: a test environment disconnected from the departure host or an environment used for business training, and the data generation request carries: flight information, and the departure host includes: a host used to implement the business of the departure system; The detection unit is used to detect whether the flight log file contains data packets associated with the flight information and obtain a detection result. The flight log file includes data packets containing passenger data generated by the departing host. The first construction unit is configured to, if the detection result indicates that the flight log file contains a data packet associated with the flight information, extract the data packet corresponding to the flight information from the flight log file to obtain the target packet, and construct departing passenger data based on the target packet to obtain the first departing passenger data; The second construction unit is used to construct departing passenger data based on the flight type of the flight information if the detection result indicates that the flight log file does not contain data packets associated with the flight information, thereby obtaining the second departing passenger data.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the method for constructing passenger data according to any one of claims 1 to 7.

10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method for constructing passenger data as described in any one of claims 1 to 7.