Paging-based message comparison method and apparatus, and electronic device
The paging comparison method solves the problem of excessive memory usage of message comparison tools in large-scale airport environments, and achieves efficient data processing and resource sharing.
Patent Information
- Application Number
- CN202510815532.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-10-28
Smart Images

Figure CN120856602A_ABST
Abstract
Description
Technical Field
[0001] This disclosure belongs to the field of data processing technology, and in particular relates to a message comparison method, apparatus and electronic device based on pagination. Background Technology
[0002] As the construction of the airport open departure system progresses, the need to verify its effectiveness in replacing the airport mainframe system arises. The airport open departure system sends passenger and baggage data to downstream software, and the completeness and accuracy of this data are crucial compared to the old mainframe system. If certain key fields are missing, field values are inaccurate, or the message order for the same passenger is reversed, the final message result will be affected, potentially impacting passenger check-in, security checks, and boarding at the airport. Therefore, comparison tools are needed to verify whether the messages sent from the open departure system to downstream software, after processing and being stored in the database, are consistent in quantity, order, and specific content with the messages originating from the mainframe after the same process.
[0003] Existing comparison tools are functionally sufficient, but their performance needs improvement. Since these tools are auxiliary, they are generally not provided with dedicated server resources but are deployed on the same server as airport applications. Therefore, the memory usage of these tools must be controlled to avoid impacting the normal operation of other applications. Currently, the memory usage of these tools primarily depends on the amount of data compared in a single instance. For larger airports, the total number of messages sent by the departure system and hosts within 24 hours can reach 2 million. Assuming a single data entry (including the original message and other information) is 1000 characters long, if comparisons are performed every 24 hours, and all the data for each comparison is written to memory at once, the memory usage would reach as high as 2GB, inevitably impacting other airport applications (many airport servers only have 8GB of memory).
[0004] Therefore, how to provide a new message comparison method that can reduce the amount of memory used at the same time while achieving the comparison function is a technical problem to be solved. Summary of the Invention
[0005] Therefore, it is necessary to provide a pagination-based message comparison method, apparatus, and electronic device to address the drawback of large memory consumption in the existing message comparison process.
[0006] In a first aspect, embodiments of the present invention provide a message comparison method based on pagination, the method comprising:
[0007] Obtain open departure data and obtain host data;
[0008] In response to a message query request, the open departure data and the host data are divided into several pages based on the target page number, resulting in multiple pages of open departure data and multiple pages of host data;
[0009] Search for the messages that enable departure data on each page in reverse chronological order of message entry time; and search for the messages that enable host data on each page in reverse chronological order of the aforementioned time.
[0010] Traverse each page of open departure data in reverse chronological order, and perform a packet comparison operation between the packets of the current page of open departure data and the packets of the host data of each page:
[0011] The message that enables outbound data on the current page is compared with the message that enables host data on each page until all host data on all pages have been traversed, thus completing the message comparison process and obtaining the corresponding message comparison result.
[0012] Optionally, the message comparison operation between the message that opens outbound data for the current page and the message that opens host data for each page includes:
[0013] If the current page of open departure data is the first page of open departure data, then search for the first page of open departure data in reverse chronological order; and search for the first page of host data in reverse chronological order.
[0014] Based on the message key and message type, the message containing the data of the first page of open departure and the message containing the data of the first page of host are compared to obtain the corresponding comparison results. The message key is a string of letters and numbers composed of multiple fields in the original message. The message type includes ordinary message type and composite message type.
[0015] Search for the packets of the second page of host data in reverse chronological order.
[0016] Based on the message key and message type, the message containing the data for opening departure on the first page and the message containing the data for the host on the second page are compared to obtain the corresponding comparison results;
[0017] Following the reverse time sequence, based on the message key and message type, except for the first and second pages of host data, each page of host data is traversed and compared with the message of the first page of open departure data to obtain the corresponding comparison result.
[0018] Optionally, the method further includes:
[0019] Based on the message key and message type, the first message of the first page of open departure data and the first message of the first page of host data with the same message key are compared to obtain the corresponding comparison result.
[0020] Optionally, the step of comparing the first message of the first page of open departure data and the first message of the first page of host data with the same message key based on the message key and message type to obtain the corresponding comparison result includes:
[0021] Select the first packet with the same packet key from the host data on the first page as the current packet;
[0022] Obtain the format of the message key for the first message and the current message;
[0023] If the message comparison method used is determined to be a normal message comparison method based on the format of the message key, the following operations are performed to compare the first message and the current message:
[0024] Count the number of times the values of the child tags under the main tag are inconsistent;
[0025] Statistical analysis was performed on the number of identical and inconsistent ordinary messages.
[0026] Construct the first delay details data table for ordinary messages;
[0027] Remove the information corresponding to the messages that have been compared from the first data table containing the information of the open, off-port unique data portion and the second data table containing the information of the host unique data portion;
[0028] Store the message ID of the current message into the ID set used to store all the host message IDs that have been compared;
[0029] Remove the first message from the third data table that stores all temporarily open departure message data;
[0030] End the current message comparison process.
[0031] Optionally, the step of comparing the first message of the first page of open departure data and the first message of the first page of host data with the same message key based on the message key and message type to obtain the corresponding comparison result further includes:
[0032] Obtain the format of the message key for the first message and the current message;
[0033] If the message comparison method used is determined to be a composite message comparison method based on the format of the message key, the following operations are performed to compare the first message and the current message:
[0034] Count the number of times the values of the child tags under the main tag are inconsistent;
[0035] Statistical analysis was performed on the number of consistent and inconsistent composite messages.
[0036] Construct the second delay details data table for the composite message;
[0037] Remove the information corresponding to the completed comparison from the first data table storing the open departure-specific data portion and the second data table storing the host-specific data portion;
[0038] Store the message ID of the current message into the ID set used to store all the host message IDs that have been compared;
[0039] Remove the first message from the third data table that stores all temporarily open departure message data;
[0040] End the current message comparison process.
[0041] Optionally, after comparing the message that opens outbound data on the current page with the message that opens host data on each page, until all pages of host data have been traversed and the message comparison process is completed to obtain the corresponding message comparison result, the method further includes:
[0042] Read the comparison results;
[0043] The number of identical messages, the number of inconsistent messages, and the number of times each field is inconsistent in the comparison results are counted to obtain the statistical results.
[0044] Output the statistical results and display them in tabular form.
[0045] Optionally, before performing a packet comparison operation on the packets of the current page of open departure data and the packets of the host data of each page, the method further includes:
[0046] Obtain the time range information of the data to be queried in the message query request, as well as the message type information of the data to be queried. The message type information includes: ordinary message type information and composite message type information.
[0047] Based on the time range information and the message type information, the total number of open departure messages and the total number of host messages that meet the conditions are queried from the database. The message type information includes: ordinary message type information and composite message type information.
[0048] Based on the total number of open departure messages, the total number of host messages, memory usage, and single-line data size, the target number of pages is evaluated.
[0049] The number of messages per page for open departure is calculated based on the total number of open departure messages and the target page number; and the number of messages per page for host is calculated based on the total number of host messages and the target page number.
[0050] Secondly, embodiments of the present invention provide a pagination-based message comparison device, the device comprising:
[0051] The acquisition module is used to acquire open departure data and host data;
[0052] The pagination module is used to respond to a message query request and divide the open departure data and the host data into several pages in sequence based on the target number of pages, so as to obtain multiple pages of open departure data and multiple pages of host data.
[0053] The search module is used to sequentially search for packets of open departure data on each page in reverse chronological order of packet entry time; and to sequentially search for packets of host data on each page in reverse chronological order of the time.
[0054] The message comparison module is used to traverse each page of open departure data in reverse chronological order, and perform message comparison operations between the messages of the current page of open departure data and the messages of each page of host data.
[0055] The message that enables outbound data on the current page is compared with the message that enables host data on each page until all host data on all pages have been traversed, thus completing the message comparison process and obtaining the corresponding message comparison result.
[0056] Thirdly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of the first aspect.
[0057] Fourthly, an electronic device is provided, including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method of the first aspect.
[0058] In this embodiment of the invention, open departure data and host data are acquired; in response to a message query request, the open departure data and host data are sequentially divided into several pages based on the target page number, resulting in multiple pages of open departure data and multiple pages of host data; the messages of each page of open departure data are sequentially searched in reverse order of message entry time; the messages of each page of host data are sequentially searched in reverse order of time; each page of open departure data is traversed in reverse order of time, and a message comparison operation is performed between the messages of the current page of open departure data and the messages of each page of host data; and the messages of the current page of open departure data are compared with the messages of each page of host data until all pages of host data have been traversed, completing the message comparison process and obtaining the corresponding message comparison result. The pagination-based message comparison method provided in this embodiment of the invention divides open departure data and host data into several pages in sequence. In reverse chronological order, the messages of each page of open departure data and the messages of each page of host data are compared sequentially. In this way, only a portion of the full text of the messages and a portion of the comparison results exist in memory, which greatly improves the performance of the message comparison tool. Attached Figure Description
[0059] Exemplary embodiments of the present invention can be more fully understood by referring to the accompanying drawings. The drawings are provided to further illustrate the embodiments of the present invention and form part of the specification. They are used together with the embodiments of the present invention to explain the invention and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0060] Figure 1 This is a system architecture diagram of the pagination-based message comparison method of the present invention;
[0061] Figure 2 A flowchart illustrating a pagination-based message comparison method according to an exemplary embodiment of the present invention;
[0062] Figure 3 This is a schematic diagram of the message pagination comparison logic in this invention;
[0063] Figure 4 This is a flowchart of the pagination query and comparison process in this invention;
[0064] Figure 5 This is a flowchart illustrating the process of querying and processing the next page of open departure data in this invention;
[0065] Figure 6 This is a flowchart illustrating the process of querying and processing the next page of host data in this invention;
[0066] Figure 7 This is a flowchart illustrating the comparison between the currently open departure data page and the currently host data page in this invention.
[0067] Figure 8 This is a flowchart illustrating the one-to-one comparison of messages in this invention;
[0068] Figure 9 This is a schematic diagram of the ordinary message comparison result format (taking PNCK as an example) in this invention;
[0069] Figure 10 This is a schematic diagram of the composite message comparison result format in this invention;
[0070] Figure 11 This is a schematic diagram of the message delay details format in this invention;
[0071] Figure 12 This is a schematic diagram of the structure of a page-based message comparison device 1200 provided according to an exemplary embodiment of the present invention. Detailed Implementation
[0072] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0073] It should be noted that, unless otherwise stated, the technical or scientific terms used in this invention should have the ordinary meaning as understood by one of ordinary skill in the art.
[0074] Furthermore, the terms "first" and "second," etc., are used to distinguish different objects, not to describe a specific order. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to those processes, methods, products, or devices.
[0075] This invention provides a pagination-based message comparison method and apparatus, a computer-readable medium, and an electronic device, which will be described below with reference to the accompanying drawings.
[0076] The pagination-based message comparison method provided in this invention operates on the following principle: For each message type, several fields from the original message are used to form a message key, uniquely identifying a passenger / item of luggage / … In most cases, this message key can uniquely identify a message from an open departure / host channel, but in a few cases (such as PNCK type, where a passenger's information changes multiple times), multiple messages with the same message key may appear. Messages with the same message key from two channels are stored in a List in reverse chronological order, and each message is compared one by one according to its sequence number, with all fields to be compared being calculated, and the relative delay between the two messages being stored and processed is also calculated. Finally, the comparison results and delay results are saved separately. After the comparison is complete, the comparison results of messages from different sources for the same passenger / item / … dynamically change over time.
[0077] The pagination-based message comparison method provided in this invention effectively reduces memory usage. During the message search phase, pagination is performed, dividing open departure data and host data into several pages. Only one page of open departure data is retrieved at a time and stored in memory. Then, a page of host data is sequentially retrieved and compared with the page of open departure data. A portion of the comparison results can be immediately written to a file. This process is repeated until all open departure data is compared, at which point the remaining comparison results are written to a file. Thus, only a portion of the full message and a portion of the comparison results exist in memory at any given time, effectively reducing memory usage and significantly improving the data processing efficiency of message comparison.
[0078] like Figure 1 The diagram shown is a system architecture diagram used in the message comparison process for implementing pagination in this invention.
[0079] like Figure 1 The system architecture shown includes the following modules, and the functions of each module are described in detail below:
[0080] Configuration Management Module: By modifying the configuration, this module supports diverse data comparison business needs. In practical applications, the tool is not limited to comparing open outbound and host data; it can be extended to any business domain requiring packet comparison. This configuration management module includes: a data acquisition configuration submodule, a specific comparison logic configuration submodule, and a result storage configuration submodule.
[0081] The data acquisition configuration module is used to determine the time period for the process to start on a schedule, the data source, the criteria for filtering data (message type, message entry time, etc.), and the pagination criteria.
[0082] The specific comparison logic configuration module is used to determine the parser used for message parsing, the tags involved in the comparison, the airlines involved in the comparison, and the handling logic for special cases.
[0083] The result storage configuration module is used to determine the specific format and storage location of message comparison results and delay results.
[0084] Data Acquisition Module: Used to collect data from open departure and mainframe databases. The main data sources are open departure and mainframe databases, and the primary data types are passenger and baggage messages, depending on the data acquisition configuration.
[0085] Message pagination acquisition module: For open departure messages and host messages, the number of pages is estimated based on remaining memory, single-line data size, data volume, configuration parameters, etc.; pagination is performed based on the number of pages; after pagination, message query is performed based on the data of each page to obtain open departure messages and host messages, so as to facilitate message comparison of the above two types of messages later.
[0086] It should be noted that the page count was determined using a page count evaluation model.
[0087] The page count evaluation algorithm corresponding to the above page count evaluation model is as follows:
[0088] (Number of open outbound data rows + Number of host data rows) × Single row data size × Security factor / (Current remaining memory × Availability factor).
[0089] It should be noted that the security factor and availability factor are configured in the data acquisition settings. The security factor is set to 1.0-1.5 to reserve space for other memory overhead of the comparison tool. The availability factor is the proportion of remaining memory that can be used during the comparison process.
[0090] Message Comparison Module: After retrieving one page of messages from both channels, the module performs message comparison. This includes: message parsing submodule, message matching submodule, field comparison submodule, time comparison submodule, and data statistics submodule.
[0091] The functions of the above sub-modules are explained in detail below:
[0092] The message parsing submodule is used to select the corresponding parser for parsing based on the configuration (mainly the message type) and retain the fields that need to be compared according to the configuration.
[0093] The message matching submodule is used to extract the message key (a string of letters and numbers composed of multiple fields in the original message), classify and sort it, and then compare it one by one.
[0094] Field Comparison Submodule: Compares various fields of two messages, supporting both ordinary and composite messages.
[0095] The time comparison submodule is used to calculate the time difference between two messages.
[0096] The data statistics submodule is used to count the total number of consistent messages, inconsistent messages, and the number of times each field is inconsistent after all messages have been compared.
[0097] Data storage module: It adopts semi-structured data storage, saves the comparison results in HTML format, displays them in table form, and stores the comparison results locally.
[0098] Please refer to Figure 2 It illustrates a flowchart of a pagination-based message comparison method provided by some embodiments of the present invention, such as... Figure 2 As shown, the pagination-based message comparison method may include the following steps:
[0099] Step S201: Obtain open departure data and obtain host data.
[0100] Step S202: In response to the message query request, the open departure data and host data are divided into several pages based on the target page number, resulting in multiple pages of open departure data and multiple pages of host data.
[0101] In one example, before performing a packet comparison operation on the packets of the current page of open departure data and the packets of the host data of each page by traversing each page of open departure data in reverse chronological order, the packet comparison method based on pagination provided in this embodiment of the invention may further include the following steps:
[0102] Obtain the time range information of the data to be queried in the message query request, as well as the message type information of the data to be queried. The message type information includes: ordinary message type information and composite message type information;
[0103] Based on time range information and message type information, query the database for the total number of open departure messages and the total number of host messages that meet the conditions. The message type information includes: ordinary message type information and composite message type information.
[0104] The target number of pages is assessed based on the total number of open departure messages, the total number of host messages, memory usage, and the size of a single line of data.
[0105] The number of messages per page for open departures is calculated based on the total number of open departure messages and the target page number; and the number of messages per page for hosts is calculated based on the total number of host messages and the target page number.
[0106] It should be noted that the page count was determined using a page count evaluation model.
[0107] The page count evaluation algorithm corresponding to the above page count evaluation model is as follows:
[0108] (Number of open outbound data rows + Number of host data rows) × Single row data size × Security factor / (Current remaining memory × Availability factor).
[0109] It should be noted that the security factor and availability factor are configured in the data acquisition settings. The security factor is set to 1.0-1.5 to reserve space for other memory overhead of the comparison tool. The availability factor is the proportion of remaining memory that can be used during the comparison process.
[0110] Step S203: Search for the packets on each page of open departure data in reverse chronological order of packet entry time; and search for the packets on each page of host data in reverse chronological order of time.
[0111] Step S204: Traverse each page of open departure data in reverse chronological order, and perform a packet comparison operation between the packets of the current page of open departure data and the packets of the host data in each page:
[0112] The message that enables outbound data on the current page is compared with the message that enables host data on each page until all host data on all pages have been traversed, thus completing the message comparison process and obtaining the corresponding message comparison result.
[0113] In one example, a packet comparison operation is performed between the packet that opens outbound data for the current page and the packet that opens host data for each page, including the following steps:
[0114] If the current page of open departure data is the first page of open departure data, then search for the packets of the first page of open departure data in reverse chronological order; and search for the packets of the first page of host data in reverse chronological order.
[0115] Based on the message key and message type, the message of the first page of open departure data and the message of the first page of host data are compared to obtain the corresponding comparison results. The message key is a string of letters and numbers composed of multiple fields in the original message. The message type includes ordinary message type and composite message type.
[0116] Search for the packets containing the host data on the second page in reverse chronological order.
[0117] Based on the message key and message type, the message containing the data for opening departure on the first page and the message containing the data for host on the second page are compared to obtain the corresponding comparison results;
[0118] Following reverse chronological order, based on the message key and message type, except for the first and second pages of host data, each page of host data is traversed and compared with the messages of the first page of open departure data to obtain the corresponding comparison results.
[0119] For example, in a specific application scenario, the message key is: CZ825V-17JUN24-WXN-9.
[0120] It should be noted that the above example uses the current page of open departure data as the first page of open departure data. The packet comparison process for the second page of open departure data, and other pages of open departure data, with the host data on each page is similar and will not be repeated here. Please refer to the descriptions of the same or similar sections above.
[0121] In one example, the pagination-based message comparison method provided in this embodiment of the invention may further include the following steps:
[0122] Based on the message key and message type, the first message of the first page of open departure data and the first message of the first page of host data with the same message key are compared to obtain the corresponding comparison results.
[0123] In one example, based on the message key and message type, the first message of the first page of open departure data and the first message of the first page of host data with the same message key are compared to obtain the corresponding comparison result, including the following steps:
[0124] Select the first packet with the same packet key from the first page of host data as the current packet;
[0125] Retrieve the format of the message key for the first message and the current message;
[0126] If the message comparison method used is determined to be the normal message comparison method based on the message key format, perform the following message comparison operation on the first message and the current message:
[0127] Count the number of times the values of the child tags under the main tag are inconsistent;
[0128] Statistical analysis was performed on the number of identical and inconsistent ordinary messages.
[0129] Construct the first delay details data table for ordinary messages;
[0130] Remove the information corresponding to the messages that have been compared from the first data table containing the information of the open, off-port unique data portion and the second data table containing the information of the host unique data portion;
[0131] Store the message ID of the current message into the ID set used to store all the host message IDs that have been compared;
[0132] Remove the first message from the third data table that stores all temporary open departure message data;
[0133] End the current message comparison process.
[0134] In a specific application scenario, the message key for a regular message is:
[0135] CZ825V-17JUN24-WXN-9.
[0136] The above message comparison process is for application scenarios where the message comparison method is ordinary messages.
[0137] In one example, based on the message key and message type, the first message of the first page of open departure data and the first message of the first page of host data with the same message key are compared to obtain the corresponding comparison result. The process also includes the following steps:
[0138] Retrieve the format of the message key for the first message and the current message;
[0139] If the message comparison method used is determined to be a composite message comparison method based on the message key format, perform the following message comparison operation on the first message and the current message:
[0140] Count the number of times the values of the child tags under the main tag are inconsistent;
[0141] Statistical analysis was performed on the number of consistent and inconsistent composite messages.
[0142] Construct the second delay details data table for the composite message;
[0143] Remove the information corresponding to the messages that have been compared from the first data table containing the information of the open, off-port unique data portion and the second data table containing the information of the host unique data portion;
[0144] Store the message ID of the current message into the ID set used to store all the host message IDs that have been compared;
[0145] Remove the first message from the third data table that stores all temporary open departure message data;
[0146] End the current message comparison process.
[0147] In a specific application scenario, the message key for the composite message is: CZ825V-17JUN24.
[0148] The above message comparison process is for application scenarios where the message comparison method is composite messages.
[0149] In one example, after comparing the packet containing the current page's outbound data with the packet containing the host data of each page until all pages of host data have been traversed and the packet comparison process is completed, and the corresponding packet comparison result is obtained, the pagination-based packet comparison method provided in this embodiment of the invention may further include the following steps:
[0150] Read the comparison results;
[0151] The number of messages that match, the number of messages that do not match, and the number of times each field does not match in the comparison results are counted to obtain the statistical results.
[0152] Output the statistical results and display them in tabular form.
[0153] In a specific application scenario, a data comparison can be divided into three steps, as described below:
[0154] Step a1: Variable initialization.
[0155] Initialize all statistical data. Determine the required data time range, message type, etc., based on the configuration, and retrieve the number of messages that meet the criteria from the database. Retrieve a certain number of rows of data based on the configuration and calculate the average data size. Obtain the current remaining memory.
[0156] The page count is evaluated using a page count evaluation model.
[0157] The page count evaluation algorithm corresponding to the above page count evaluation model is as follows:
[0158] (Number of open outbound data rows + Number of host data rows) × Single row data size × Security factor / (Current remaining memory × Availability factor).
[0159] It should be noted that the security factor and availability factor are configured in the data acquisition settings. The security factor is set to 1.0-1.5 to reserve space for other memory overhead of the comparison tool. The availability factor is the proportion of remaining memory that can be used during the comparison process.
[0160] The number of packets per page for Open Departure and Host is calculated as follows: Total number of eligible Open Departure packets / Number of pages (rounded up), and Total number of eligible Host packets / Number of pages (rounded up).
[0161] Step a2: Message pagination query and comparison.
[0162] The basic comparison principle of message pagination query is as follows: First, find the first page of open departure data in reverse order of message entry time, and then find the host data of each page in turn and compare it with it; then find the second page of open departure data and compare it with the host data of each page in turn, and so on, until the last page of open departure data is compared with the last page of host data.
[0163] like Figure 3 The diagram shown illustrates the message pagination comparison logic. Figure 3 As shown, the message pagination query and comparison process, based on the basic comparison principle described above, executes multiple rounds of comparison, from the first round to the second round, up to the pth round, until the comparison of the last page of open departure data and the last page of host data is completed. In each round of comparing each page of open departure data with each page of host data, multiple comparisons are performed between the n open departure data entries and the m host data entries, starting from the first comparison, the second comparison, and so on, up to the pth comparison.
[0164] like Figure 4 The diagram shown is a flowchart of the pagination query and comparison process in this invention. Figure 4 The pagination query and comparison process shown includes the following steps:
[0165] Begin paginated query and comparison; determine if the comparison process for all open departure data is complete; if not, perform the following operations: query and process the next page of open departure data. Determine if the comparison process for all host data is complete; if not, perform the following operations: query and process the next page of host data. Compare the current open departure data page with the current host data page; if the comparison process is complete, end the above paginated query and comparison process.
[0166] like Figure 5 As shown, the process of querying and processing the next page of open departure data includes:
[0167] Start; retrieve the next page of open departure messages; process messages and filter non-compliant messages; end.
[0168] The following explanation addresses the process of querying and processing the next page of open departure data:
[0169] Some message types (such as PNCK) are further subdivided into composite messages and ordinary messages, and data comparison supports mixed comparison of composite and ordinary messages. Taking PNCK as an example, a composite message contains multiple passenger information tags, distinguished by a unique boarding number, indicating that this message contains multiple passengers; an ordinary message contains only one passenger information tag, indicating that this message contains only one passenger. To facilitate differentiation, the message key formats generated for composite and ordinary messages are different. During subsequent comparison, the format of the message key can be used to determine whether to follow the composite message comparison process or the ordinary message comparison process.
[0170] The process parses messages, filters messages with non-compliant formats, converts messages into entity class objects, and adds information such as time and sub-type (composite message / normal message). It then generates a message key based on the message fields, and stores the list of messages corresponding to this key as the value in a temporary Map. <String,List <messageentity>In the dmTempMap (as shown in Table 1), the current page is cleared after comparison, and the format is as follows. The reverse order arrangement ensures that the final open departure message and the final host message (reflecting the final state of the passenger / baggage / ... after several information changes) for the same message key (i.e., the key in Table 1, the same passenger / baggage / ...) can correspond one-to-one.
[0171]
[0172] Table 1 dmTempMap
[0173] In addition, the message ID, message key (i.e., the key in Table 2), and sub-type information of each open departure message obtained from a query are uniformly stored in a Map (singleDmIdMap). Each time an open departure message and a host message are compared, this open departure data is deleted for subsequent statistics on open departure messages that are not present in the host context. The format is shown in Table 2 below.
[0174]
[0175] Table 2 singleDmIdMap
[0176] It's worth noting that the length of critical data such as message ID and message key is negligible compared to the message length. Taking a passenger PNCK message as an example, a typical PNCK message is around 850 characters long, the message ID is less than 8 characters long, and the message key is between 19 and 22 characters long. Assuming the message is paginated into 20 pages, the total memory usage of all message IDs and message keys is less than the memory usage of a single page of a message.
[0177] like Figure 6 The diagram shown is a flowchart for querying and processing the host data for the next page. Figure 6 As shown, the process of querying and processing the next page of host data is described in detail below:
[0178] Start; retrieve the next page of host messages; process the messages, filtering out non-compliant messages; end.
[0179] The process of querying and processing the next page of host data is explained in detail below:
[0180] The message ID is an existing field in the database and is the primary key of the table. After each message comparison is completed, the host message ID is written to a Set used to store the IDs of the completed comparisons. <long>(dcsComparedIdSet). After retrieving a page of host packets, if the packet ID is already in dcsComparedIdSet before parsing, then filter that data.
[0181] Similarly, after parsing, filtering, formatting, and adding information to the host packets, the generated key is used as the key to store the converted packets in a temporary Map (dcsTempMap, as shown in Table 3). This Map is cleared after the current page comparison is complete. Likewise, the packet ID, packet key (i.e., the key in Tables 3 and 4), and sub-type information obtained from the first round of querying all host packets are stored in another Map (singleDcsIdMap, as shown in Table 4). Each time a host packet is compared with an open departure packet, the host data is deleted for subsequent statistics on packets present on the host but absent from open departure packets.
[0182]
[0183] Table 3dcsTempMap
[0184]
[0185]
[0186] Table 4 singleDcsIdMap
[0187] like Figure 7 The diagram shows a flowchart comparing the currently open departure data page with the current host data page.
[0188] As Figure 7 As shown, iterate through all message keys in dmTempMap. If dcsTempMap also contains the current message key, obtain the message list (already sorted in reverse chronological order) corresponding to the current message key in the two Maps, and compare them one by one according to the sequence number in the list.
[0189] The following is the process for comparing messages one-to-one. First, the message type is determined based on the message key format: ordinary message or composite message. The comparison process for composite messages and ordinary messages is different. For ordinary messages, it is only necessary to compare whether the values of each sub-tag under the unique main tag are the same. For composite messages, it is necessary to match the main tag one by one based on the distinctive sub-tags under the main tag, and then compare these main tags one by one.
[0190] like Figure 8 The diagram shows a flowchart for comparing messages one-to-one.
[0191] like Figure 8 As shown, if the message comparison method used is determined to be the ordinary message comparison method based on the format of the message key, the following operations are performed to compare the messages: count the number of times the values of each sub-tag under the main tag are inconsistent;
[0192] Statistical analysis was performed on the number of identical and inconsistent ordinary messages.
[0193] Construct the first delay details data table for ordinary messages;
[0194] Remove the information corresponding to the messages that have been compared from the first data table containing the information of the open, off-port unique data portion and the second data table containing the information of the host unique data portion;
[0195] The host packet IDs that have been compared are stored in the ID set used to store host packet IDs that have been compared. During the next comparison, the host packets that have been compared will be skipped.
[0196] Remove the messages that have been compared from the first page of open departure data from the third data table that stores all temporary open departure message data.
[0197] like Figure 8 As shown, if the message comparison method used is determined to be a composite message comparison method based on the format of the message key, the following operations are performed to compare the messages: match the main tags one by one;
[0198] Count the number of times the values of the child tags under the main tag are inconsistent;
[0199] Statistical analysis was performed on the number of consistent and inconsistent composite messages.
[0200] Construct the second delay details data table for the composite message;
[0201] Remove the information corresponding to the messages that have been compared from the first data table containing the information of the open, off-port unique data portion and the second data table containing the information of the host unique data portion;
[0202] The host packet IDs that have been compared are stored in the ID set used to store host packet IDs that have been compared. During the next comparison, the host packets that have been compared will be skipped.
[0203] Remove the messages that have been compared from the first page of open departure data from the third data table that stores all temporary open departure message data.
[0204] The message type is determined based on the message key format. A comparison process is then performed between composite and ordinary messages. The data formats obtained from these two types of comparisons are slightly different and are written to different files. During message comparison, the results are temporarily written to a string containing HTML tags so that they can be directly written to an HTML-formatted comparison result file later.
[0205] After completing the comparison result construction, consistency and inconsistency data statistics, and delay details construction, the packets of both parties are removed from singleDcsIdMap and singleDmIdMap, which are used to store data unique to both parties. The current host packet ID is stored in dcsComparedIdSet, which is used to store the IDs of the compared host packets. Then, the current open departure packets are removed from dmTempMap. In this way, when the open departure packets of the current page are compared with the host packets of the next page, the open departure packets that have participated in the comparison before will no longer participate in the comparison.
[0206] After comparing each page of host packets, clear dcsTempMap.
[0207] After each page of open departure messages is compared, the string is written to the result file and then cleared, and dmTempMap is cleared.
[0208] After completing the above message comparison process, perform the following operations:
[0209] Complete the construction and save of the result file.
[0210] The process of building and saving the result file is described in detail below:
[0211] Summarize the unique data from both singleDmIdMap and singleDcsIdMap and append it to the results file. Add an HTML extension to the results file and save it. The format of the results file is shown in the image below. It can be opened with Excel to filter out packets with the same packet key and analyze the dynamic changes in the comparison results.
[0212] The format of the ordinary message comparison result in this invention (taking PNCK as an example) is as follows: Figure 9 As shown, the format of the composite message comparison result in this invention is as follows: Figure 10 As shown, the message delay details format in this invention is as follows: Figure 11 As shown.
[0213] The following is an example of a pagination-based message comparison method in a specific application scenario.
[0214] The following assumes that an airport database contains the following messages that were entered and processed the day before the comparison (i.e., the OPTIME field is within the range of the day before the comparison), as shown in the table below:
[0215]
[0216]
[0217] Table 5 Message Details
[0218] The cron expression for comparison is "001**?", which means the job is to be executed once a day at 1 AM.
[0219] Based on the configuration, the time range for searching the message is first determined to be 00:00:00-23:59:59 of the day before the comparison, and then the open departure message and host message are compared.
[0220] The process of comparing departure messages and host messages is described in detail below:
[0221] Step 1: Variable Initialization. The host has a total of 1,000,000 packets within the previous day's time range, and the open outbound packets have a total of 1,000,000 packets within the previous day's time range. The average data size per line is 4000 bits, the security factor is set to 1.5, the current remaining memory is 3GB, and the availability factor is set to 0.1. Based on the page count evaluation model: Page Count = (Number of Open Outbound Data Lines + Number of Host Data Lines) × Single Line Data Size × Security Factor / (Current Remaining Memory × Availability Factor), the calculated page count is 20. Each page of both open outbound and host data contains 50,000 packets.
[0222] Step 2: Paginated query comparison.
[0223] A total of 400 rounds of comparisons were conducted.
[0224] Step 2 provides examples illustrating the comparison of the first page of the Open Departure message with the first page of the host message, the first page of the Open Departure message with the second page of the host message, the second page of the Open Departure message with the first page of the host message, and the second page of the Open Departure message with the second page of the host message. Step 2.1 provides two examples (comparing the first and second pages of the Open Departure message), while steps 2.2 and 2.3 provide four examples each.
[0225] Comparison scenario of the first page of messages for opening departure:
[0226] Step 2.1: Query and process the open departure data on the next page.
[0227] Open the departure query and find the first page of messages, retrieving 50,000 data entries. After parsing the messages, filter out non-compliant messages (set to 100), leaving 49,900 messages converted into message entity classes and placed into dmTempMap according to the message key. Assume there are currently 3 ordinary message keys (i.e....)
[0228] The keys in Table 6 are the same, all being CZ825V-17JUN24-WXN-9.
[0229]
[0230] Messages with key="CZ825V-17JUN24-WXN-9" in the first page of Table 6 (open departure message)
[0231] Imagine that there is a composite message with a message key (i.e., the key in Table 7) of CZ825V-17JUN24.
[0232]
[0233] Messages with key="CZ825V-17JUN24" in the first page of Table 7 (open departure message)
[0234] Comparison scenario of the first page message of the open departure and the first page message of the host:
[0235] Step 2.2: Query and process the host data on the next page.
[0236] The host queries the first page of packets and finds 50,000 data entries. Currently, none of the host packets have been compared, so `dcsComparedIdSet` is empty. After filtering out compared packets, there are still 50,000 packets. After parsing the packets, non-compliant packets are filtered out (set to 100), leaving 49,900 packets converted into packet entity classes. These are then placed into `dcsTempMap` according to the packet key and into `singleDcsIdMap` according to the ID. Assume that at this point, there are two ordinary packets with the same packet key (i.e., the key in Table 8): CZ825V-17JUN24-WXN-9.
[0237]
[0238]
[0239] Table 8 shows the host messages on the first page containing the message key="CZ825V-17JUN24-WXN-9".
[0240] Imagine that there is a composite message with the message key (i.e., the key in Table 9) of CZ825V-17JUN24.
[0241]
[0242] Table 9 shows the host packets with key="CZ825V-17JUN24" on the first page.
[0243] Step 2.3: Compare the currently open departure data page with the current host data page.
[0244] When iterating through dmTempMap to the message key CZ825V-17JUN24, the same message key is found in dcsTempMap. The two lists are then compared one by one in order of sequence number (OPTIME in reverse order).
[0245] Open Departure Message ID Host Message ID 20011005 10011005
[0246] Table 10 shows the messages with key="CZ825V-17JUN24" in the first page of the Open Departure Message and the first page of the Host Message.
[0247] Based on the message key format, the currently compared message is determined to be a composite message. The composite message comparison process is then executed. After the comparison is completed:
[0248] Statistical analysis of consistent and inconsistent data in composite messages;
[0249] Construct composite message delay details data, i.e., after removing the database time difference, open departure message OPTIME - host message OPTIME;
[0250] Remove the data with ID = 20011005 from singleDmIdMap, and remove the data with ID = 10011005 from singleDcsIdMap;
[0251] Add the compared host packet ID: 10011005 to dcsComparedIdSet, and remove the data with ID=20011005 from the List corresponding to CZ825V-17JUN24 in dmTempMap.
[0252] The inconsistencies appended to the above message are as follows:
[0253]
[0254] Table 11 CZ825V-17JUN24 Message Inconsistency Data
[0255] Data shows that composite message 20011005 includes a passenger with boarding number 9, while message 10011005 does not; message 10011005 includes a passenger with boarding number 10, while message 20011005 does not; both include a passenger with boarding number 11, but the BAGWGT tag value of message 20011005 is 0, while the BAGWGT tag value of message 10011005 is 9.
[0256] The details of the composite message delay appended to the above message are as follows:
[0257]
[0258] Table 12 CZ825V-17JUN24 Message Delay Details
[0259] When iterating through dmTempMap to the message key CZ825V-17JUN24-WXN-9, the same message key is found in dcsTempMap. The two lists are then compared one by one in order of sequence number (OPTIME in reverse order).
[0260]
[0261]
[0262] Based on the message key format, the message with key="CZ825V-17JUN24-WXN-9" in the first page of the Open Departure Messages and the first page of the Host Messages in Table 13 is determined to be a normal message. After the comparison is completed:
[0263] Statistical analysis of consistent and inconsistent data in ordinary messages;
[0264] Construct ordinary message delay details data, that is, after removing the database time difference, open the departure message OPTIME - host message OPTIME;
[0265] Remove the data with ID = 20011002 and ID = 20010999 from singleDmIdMap, and remove the data with ID = 10011001 and ID = 10010995 from the list corresponding to CZ825V-17JUN24-WXN-9 from singleDcsIdMap (actually, remove the first two data items from the list);
[0266] Add the compared host packet IDs 10011001 and 10010995 to dcsComparedIdSet, and remove the data with ID=20011002 and ID=20010999 from the List corresponding to CZ825V-17JUN24-WXN-9 in dmTempMap.
[0267] The inconsistencies appended to the above message are as follows:
[0268]
[0269] Table 14 CZ825V-17JUN24-WXN-9 Message Inconsistency Data
[0270] Data shows that the BAGS and BAGWGT fields in message 20011002 are different from those in message 10011001, and the BAGWGT field in message 20010999 is different from that in message 10010995.
[0271] The details of the ordinary message delay appended to the above message are as follows:
[0272]
[0273]
[0274] Table 15CZ825V-17JUN24-WXN-9 Message Delay Details
[0275] Comparison scenario of the first page of messages for opening departure and the second page of messages for the host:
[0276] Step 2.2: Query and process the host data on the next page.
[0277] The host queries the second page of messages and finds 50,000 data entries.
[0278] In the previous comparison, dcsComparedIdSet only included the IDs of the first page of packets on the host, so there were still 50,000 packets after filtering out the compared packets. After parsing the packets, non-compliant packets were filtered out (set to 100), and the remaining 49,900 packets were converted into packet entity classes and placed into dcsTempMap according to the packet key.
[0279] Imagine that there are two messages with the same message key (i.e., the key in Table 16) CZ825V-17JUN24-WXN-9.
[0280]
[0281] Table 16, page 2, host packets with key="CZ825V-17JUN24-WXN-9"
[0282] Step 2.3 Compare the currently open departure data page with the current host data page.
[0283] When iterating through dmTempMap to the message key CZ825V-17JUN24-WXN-9, a similar message key was found in dcsTempMap. The two lists were then compared one by one in sequence (OPTIME in reverse order). At this point, the data for open departure message IDs 20011002 and 20010999 in dmTempMap had already been deleted.
[0284]
[0285]
[0286] Table 17 shows the messages with key="CZ825V-17JUN24-WXN-9" in the first page of the Open Departure Messages and the second page of the Host Messages.
[0287] The messages being compared are ordinary messages. After the comparison is completed: count the data of consistent and inconsistent ordinary messages;
[0288] Construct regular message delay details data;
[0289] The inconsistencies appended to the above message are as follows:
[0290]
[0291] Table 18 shows the message inconsistency data for CZ825V-17JUN24-WXN-9. Details of the delay in ordinary messages appended to the above messages are as follows:
[0292]
[0293] Table 19 CZ825V-17JUN24-WXN-9 Message Delay Details
[0294] Comparison scenario for the second page of the message indicating departure:
[0295] Step 2.1: Query and process the open departure data on the next page.
[0296] Open the second page of departure query messages and find 50,000 data entries. After parsing the messages, filter out non-compliant messages (set to 100), and convert the remaining 49,900 messages into message entity classes, and put them into dmTempMap according to the message key.
[0297] Imagine that there are two messages with the message key (i.e., the key in Table 20) as CZ825V-17JUN24-WXN-9.
[0298]
[0299]
[0300] Table 20 Comparison scenario of open departure messages on page 2 and host messages on page 1 with key="CZ825V-17JUN24-WXN-9":
[0301] Step 2.2: Query and process the host data on the next page.
[0302] The host queries the first page of packets and finds 50,000 data entries. Assuming 10,000 packet IDs on the first page are contained in `dcsComparedIdSet` (including 10011001 and 10010995), after filtering out already compared packets, 40,000 packets remain. After parsing the packets, non-compliant packets (let's say 100) are filtered out, leaving 39,900 packets converted into packet entity classes and placed into `dcsTempMap` according to their packet keys. All packets on the first page with the key `CZ825V-17JUN24-WXN-9` have already been compared in the first round, therefore this packet key is no longer present in `dcsTempMap`.
[0303] Step 2.3: Compare the currently open departure data page with the current host data page.
[0304] When iterating through dmTempMap to the message key CZ825V-17JUN24-WXN-9, this message key does not exist in dcsTempMap. Therefore, the two open departure messages with message key CZ825V-17JUN24-WXN-9 were not compared and remain in dmTempMap.
[0305] Comparison scenario of the second page message for open departure and the second page message for the host:
[0306] Step 2.2: Query and process the host data on the next page.
[0307] The host queries the second page of packets and finds 50,000 data entries. Assuming 10,000 packet IDs from the first page are contained in `dcsComparedIdSet` (including ID 10004996), after filtering out compared packets, 40,000 packets remain. After parsing the packets, non-compliant packets (let's say 100) are filtered out, leaving 39,900 packets converted into packet entity classes and placed into `dcsTempMap` according to the packet key (i.e., the key in Table 21). After filtering, there is still one packet with the key `CZ825V-17JUN24-WXN-9`.
[0308]
[0309] Table 21, page 2, shows host packets with key="CZ825V-17JUN24-WXN-9".
[0310] Step 2.3 Compare the currently open departure data page with the current host data page.
[0311] When iterating through dmTempMap to the packet key CZ825V-17JUN24-WXN-9, the same packet key was found in dcsTempMap. The two lists were then compared one by one in sequence (OPTIME in reverse order). When comparing the packets on the second page of the outbound traffic alert with the packets on the first page of the host traffic alert, none of the packets corresponding to this packet key had been compared, leaving two packets remaining.
[0312] Open Departure Message ID Host Message ID 10000006 9999999 10000001
[0313] The message with key="CZ825V-17JUN24-WXN-9" in the second page of Table 22 (open departure messages) and the second page of host messages is currently being compared as a normal message. After comparison:
[0314] Statistical analysis of consistent and inconsistent data in ordinary messages;
[0315] Construct regular message delay details data;
[0316] The inconsistencies appended to the above message are as follows:
[0317]
[0318] Table 23CZ825V-17JUN24-WXN-9 Message Inconsistency Data The following are the details of the delay data for the ordinary messages appended to the above messages:
[0319]
[0320]
[0321] Table 24 CZ825V-17JUN24-WXN-9 Message Delay Details
[0322] Step 3: Complete the construction and save of the result file.
[0323] This summarizes the information unique to both singleDmIdMap and singleDcsIdMap.
[0324] After the comparison is completed, among all the messages with message key (i.e., key in Table 25) CZ825V-17JUN24-WXN-9, only the open departure ordinary message with ID=10000001 was not compared. The additional unique data information is as follows:
[0325]
[0326] Table 25CZ825V-17JUN24-WXN-9 Message Inconsistency Data
[0327] After the comparison is completed, among all the packets with message key (i.e., key in Table 26) ARJ21-17JUN24-WXN-7, only the host ordinary packet with ID=7212134 was not compared. The additional unique data information is as follows:
[0328]
[0329] Table 26 ARJ21-17JUN24-WXN-7 Message Inconsistency Data
[0330] And so on.
[0331] Add it to the message inconsistency results file. Add an .html extension to the message inconsistency and delay details file, then save.
[0332] The pagination-based message comparison method provided in this invention divides open departure data and host data into several pages sequentially. Following reverse chronological order, the messages from each page of open departure data and each page of host data are compared sequentially. This ensures that only a portion of the full text of the messages and a portion of the comparison results reside in memory, significantly improving the performance of the message comparison tool. Furthermore, by using pagination to search for messages, this method reduces the number of messages searched and stored in memory per instance, thereby lowering the software's memory footprint. Moreover, the message comparison method provided in this invention, through configuration, can support message comparison in various scenarios, greatly expanding its applicability to different applications.
[0333] In the above embodiments, a pagination-based message comparison method is provided. Correspondingly, the present invention also provides a pagination-based message comparison device. The pagination-based message comparison device provided in the embodiments of the present invention can implement the above-described pagination-based message comparison method. The pagination-based message comparison device can be implemented by software, hardware, or a combination of both. For example, the pagination-based message comparison device may include integrated or separate functional modules or units to perform the corresponding steps in the above methods.
[0334] Please refer to Figure 12 This diagram illustrates a pagination-based message comparison apparatus provided by some embodiments of the present invention. Since the apparatus embodiments are substantially similar to the method embodiments, the description is relatively simple; relevant details can be found in the descriptions of the method embodiments. The apparatus embodiments described below are merely illustrative.
[0335] like Figure 12 As shown, the pagination-based message comparison device 1200 may include:
[0336] The acquisition module 1201 is used to acquire open departure data and host data;
[0337] The paging module 1202 is used to respond to a message query request and divide the open departure data and host data into several pages in sequence based on the target number of pages, so as to obtain multiple pages of open departure data and multiple pages of host data.
[0338] The lookup module 1203 is used to sequentially search for packets of open departure data on each page in reverse order of packet entry time; and to sequentially search for packets of host data on each page in reverse order of time.
[0339] Message comparison module 1204 is used to iterate through each page of open departure data in reverse chronological order and perform message comparison operations between the messages of the current page of open departure data and the messages of the host data in each page.
[0340] The message that enables outbound data on the current page is compared with the message that enables host data on each page until all host data on all pages have been traversed, thus completing the message comparison process and obtaining the corresponding message comparison result.
[0341] In some embodiments of the present invention, the message comparison module 1204 is specifically used for:
[0342] If the current page of open departure data is the first page of open departure data, then search for the packets of the first page of open departure data in reverse chronological order; and search for the packets of the first page of host data in reverse chronological order.
[0343] Based on the message key and message type, the message of the first page of open departure data and the message of the first page of host data are compared to obtain the corresponding comparison results. The message key is a string of letters and numbers composed of multiple fields in the original message. The message type includes ordinary message type and composite message type.
[0344] Search for the packets containing the host data on the second page in reverse chronological order.
[0345] Based on the message key and message type, the message containing the data for opening departure on the first page and the message containing the data for host on the second page are compared to obtain the corresponding comparison results;
[0346] Following reverse chronological order, based on the message key and message type, except for the first and second pages of host data, each page of host data is traversed and compared with the messages of the first page of open departure data to obtain the corresponding comparison results.
[0347] In some embodiments of the present invention, the message comparison module 1204 is further specifically used for:
[0348] Based on the message key and message type, the first message of the first page of open departure data and the first message of the first page of host data with the same message key are compared to obtain the corresponding comparison results.
[0349] In some embodiments of the present invention, the message comparison module 1204 is further specifically used for:
[0350] Select the first packet with the same packet key from the first page of host data as the current packet;
[0351] Retrieve the format of the message key for the first message and the current message;
[0352] If the message comparison method used is determined to be the normal message comparison method based on the message key format, perform the following message comparison operation on the first message and the current message:
[0353] Count the number of times the values of the child tags under the main tag are inconsistent;
[0354] Statistical analysis was performed on the number of identical and inconsistent ordinary messages.
[0355] Construct the first delay details data table for ordinary messages;
[0356] Remove the information corresponding to the messages that have been compared from the first data table containing the information of the open, off-port unique data portion and the second data table containing the information of the host unique data portion;
[0357] Store the message ID of the current message into the ID set used to store all the host message IDs that have been compared;
[0358] Remove the first message from the third data table that stores all temporary open departure message data;
[0359] End the current message comparison process.
[0360] In some embodiments of the present invention, the message comparison module 1204 is further specifically used for:
[0361] Retrieve the format of the message key for the first message and the current message;
[0362] If the message comparison method used is determined to be a composite message comparison method based on the message key format, perform the following message comparison operation on the first message and the current message:
[0363] Count the number of times the values of the child tags under the main tag are inconsistent;
[0364] Statistical analysis was performed on the number of consistent and inconsistent composite messages.
[0365] Construct the second delay details data table for the composite message;
[0366] Remove the information corresponding to the messages that have been compared from the first data table containing the information of the open, off-port unique data portion and the second data table containing the information of the host unique data portion;
[0367] Store the message ID of the current message into the ID set used to store all the host message IDs that have been compared;
[0368] Remove the first message from the third data table that stores all temporary open departure message data;
[0369] End the current message comparison process.
[0370] In some embodiments of the present invention, the pagination-based message comparison device 1200 may further include:
[0371] Read module (in) Figure 12 (not shown in the image), is used to compare the message that opens the outbound data of the current page with the message of the host data of each page until the host data of all pages has been traversed, and after the message comparison process is completed and the corresponding message comparison result is obtained, the comparison result is read.
[0372] Statistics module (in) Figure 12 (Not shown in the image), used to count the number of consistent messages, the number of inconsistent messages, and the number of times each field is inconsistent in the comparison results, and to obtain the statistical results;
[0373] Output and display module (in) Figure 12 (Not shown in the image), used to output statistical results and display the statistical results in tabular form.
[0374] In some embodiments of the present invention, the acquisition module 1201 is further configured to:
[0375] Before performing a message comparison operation between the message of the current page of open departure data and the message of the host data of each page, the time range information of the data to be queried in the message query request and the message type information of the data to be queried are obtained. The message type information includes: ordinary message type information and composite message type information.
[0376] The pagination-based message comparison device 1200 may include:
[0377] Query module (in) Figure 12 (not shown in the image), used to query the database for the total number of open departure messages and the total number of host messages that meet the conditions based on time range information and message type information. The message type information includes: ordinary message type information and composite message type information.
[0378] Evaluation module (in) Figure 12 (not shown in the text) is used to assess the target number of pages based on the total number of open departure messages, the total number of host messages, memory usage, and the size of a single row of data.
[0379] Calculation module (in) Figure 12 (Not shown in the text) is used to calculate the number of messages per page for open departure based on the total number of open departure messages and the target page number; and to calculate the number of messages per page for the host based on the total number of host messages and the target page number.
[0380] In some embodiments of the present invention, the pagination-based message comparison device 1200 provided in the present invention is based on the same inventive concept and has the same beneficial effects as the pagination-based message comparison method provided in the foregoing embodiments of the present invention.
[0381] According to another embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed in a computer, causes the computer to perform a combination Figures 1 to 11 The method described.
[0382] According to another embodiment, an electronic device is also provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements a combination... Figures 1 to 11 The method described.
[0383] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.
[0384] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.< / long> < / messageentity>
Claims
1. A message comparison method based on pagination, characterized in that, The method includes: Obtain open departure data and obtain host data; In response to a message query request, the open departure data and the host data are divided into several pages based on the target page number, resulting in multiple pages of open departure data and multiple pages of host data; Search for the messages that enable departure data on each page in reverse chronological order of message entry time; and search for the messages that enable host data on each page in reverse chronological order of the aforementioned time. Traverse each page of open departure data in reverse chronological order, and perform a packet comparison operation between the packets of the current page of open departure data and the packets of the host data of each page: The message that enables outbound data on the current page is compared with the message that enables host data on each page until all host data on all pages have been traversed, thus completing the message comparison process and obtaining the corresponding message comparison result.
2. The message comparison method according to claim 1, characterized in that, The packet comparison operation between the message that opens outbound data on the current page and the message that opens host data on each page includes: If the current page of open departure data is the first page of open departure data, then search for the first page of open departure data in reverse chronological order; and search for the first page of host data in reverse chronological order. Based on the message key and message type, the message containing the data of the first page of open departure and the message containing the data of the first page of host are compared to obtain the corresponding comparison results. The message key is a string of letters and numbers composed of multiple fields in the original message. The message type includes ordinary message type and composite message type. Search for the packets of the second page of host data in reverse chronological order. Based on the message key and message type, the message containing the data for opening departure on the first page and the message containing the data for the host on the second page are compared to obtain the corresponding comparison results; Following the reverse time sequence, based on the message key and message type, except for the first and second pages of host data, each page of host data is traversed and compared with the message of the first page of open departure data to obtain the corresponding comparison result.
3. The message comparison method according to claim 2, characterized in that, The method further includes: Based on the message key and message type, the first message of the first page of open departure data and the first message of the first page of host data with the same message key are compared to obtain the corresponding comparison result.
4. The message comparison method according to claim 3, characterized in that, The process involves comparing the first message of the first page of open departure data with the first message of the first page of host data based on the message key and message type to obtain the corresponding comparison results, including: Select the first packet with the same packet key from the host data on the first page as the current packet; Obtain the format of the message key for the first message and the current message; If the message comparison method used is determined to be a normal message comparison method based on the format of the message key, the following operations are performed to compare the first message and the current message: Count the number of times the values of the child tags under the main tag are inconsistent; Statistical analysis was performed on the number of identical and inconsistent ordinary messages. Construct the first delay details table for a regular message; Remove the information corresponding to the messages that have been compared from the first data table containing the information of the open, off-port unique data portion and the second data table containing the information of the host unique data portion; Store the message ID of the current message into the ID set used to store all the host message IDs that have been compared; Remove the first message from the third data table that stores all temporarily open departure message data; End the current message comparison process.
5. The message comparison method according to claim 4, characterized in that, The step of comparing the first message of the first page of open departure data with the first message of the first page of host data with the same message key based on the message key and message type to obtain the corresponding comparison result also includes: Obtain the format of the message key for the first message and the current message; If the message comparison method used is determined to be a composite message comparison method based on the format of the message key, the following operations are performed to compare the first message and the current message: Count the number of times the values of the child tags under the main tag are inconsistent; Statistical analysis was performed on the number of consistent and inconsistent composite messages. Construct the second delay details data table for the composite message; Remove the information corresponding to the completed comparison from the first data table storing the open departure-specific data portion and the second data table storing the host-specific data portion; Store the message ID of the current message into the ID set used to store all the host message IDs that have been compared; Remove the first message from the third data table that stores all temporarily open departure message data; End the current message comparison process.
6. The message comparison method according to claim 1, characterized in that, After comparing the message that opens outbound data on the current page with the message that opens host data on each page, until all pages of host data have been traversed and the message comparison process is completed, and the corresponding message comparison result is obtained, the method further includes: Read the comparison results; The number of identical messages, the number of inconsistent messages, and the number of times each field is inconsistent in the comparison results are counted to obtain the statistical results. Output the statistical results and display them in tabular form.
7. The message comparison method according to claim 2, characterized in that, Before performing a packet comparison operation on the packets of the current page of open departure data and the packets of the host data of each page, the method further includes: Obtain the time range information of the data to be queried in the message query request, as well as the message type information of the data to be queried. The message type information includes: ordinary message type information and composite message type information. Based on the time range information and the message type information, the total number of open departure messages and the total number of host messages that meet the conditions are queried from the database. The message type information includes: ordinary message type information and composite message type information. Based on the total number of open departure messages, the total number of host messages, memory usage, and single-line data size, the target number of pages is evaluated. The number of messages per page for open departure is calculated based on the total number of open departure messages and the target page number; and the number of messages per page for host is calculated based on the total number of host messages and the target page number.
8. A message comparison device based on pagination, characterized in that, The device includes: The acquisition module is used to acquire open departure data and host data; The pagination module is used to respond to a message query request and divide the open departure data and the host data into several pages in sequence based on the target number of pages, so as to obtain multiple pages of open departure data and multiple pages of host data. The search module is used to sequentially search for packets of open departure data on each page in reverse chronological order of packet entry time; and to sequentially search for packets of host data on each page in reverse chronological order of the time. The message comparison module is used to traverse each page of open departure data in reverse chronological order, and perform a message comparison operation between the messages of the current page of open departure data and the messages of each page of host data. The message that enables outbound data on the current page is compared with the message that enables host data on each page until all host data on all pages have been traversed, thus completing the message comparison process and obtaining the corresponding message comparison result.
9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed in a computer, causes the computer to perform the method described in any one of claims 1 to 7.
10. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method according to any one of claims 1 to 7.