A data synchronization method, electronic equipment, readable storage medium and program product

CN122903380APending Publication Date: 2026-10-13CHINA SOUTHERN AIRLINES DIGITAL TECHNOLOGY (GUANGDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610969536.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-01
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

但是,传统数据同步方案的可靠性较低

Benefits of technology

[0010]第五方面,本公开提供一种计算机程序产品,计算机程序产品包括计算机程序或指令,当计算机程序或指令被处理器执行时,实现上述的数据同步方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903380A_ABST
    Figure CN122903380A_ABST
Patent Text Reader

Abstract

The present disclosure provides a data synchronization method, an electronic device, a readable storage medium and a program product, relates to the technical field of data synchronization, and can improve the reliability of data synchronization. The method comprises the following steps: a first device generates a synchronization data packet based on aviation business data to be synchronized, the synchronization data packet comprises a synchronization data packet identifier, aviation business data and a first check code, the first check code is generated by the first device based on a preset check algorithm on the aviation business data; the first device sends the synchronization data packet to a second device and receives a feedback data packet sent by the second device, the feedback data packet comprises a second check code and a feedback data packet identifier, the second check code is generated by the second device based on the preset check algorithm on the aviation business data in the synchronization data packet, and if the first check code and the second check code do not match, the first device retransmits the synchronization data packet to the second device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data synchronization technology, and in particular to a data synchronization method, electronic device, readable storage medium, and program product. Background Technology

[0002] The efficient operation of airline operations is directly related to flight safety, passenger service quality, and business efficiency. Its daily operations rely heavily on the real-time collaboration of multiple core systems, such as reservation systems, sales front-end (official website / APP), docking systems (hotels, in-flight catering), and cabin service systems.

[0003] Current traditional data synchronization schemes mainly employ simple packet transmission acknowledgment mechanisms (such as TCP handshakes). However, traditional data synchronization schemes have relatively low reliability. Summary of the Invention

[0004] This disclosure provides a data synchronization method, electronic device, readable storage medium, and program product that can improve the reliability of data synchronization.

[0005] In a first aspect, this disclosure provides a data synchronization method applied to a first device, the method comprising: The first device generates a synchronization data packet based on the aviation business data to be synchronized. The synchronization data packet includes a synchronization data packet identifier, aviation business data, and a first checksum. The aviation business data represents the attribute data of the corresponding services for a flight. The first checksum is calculated by the first device based on a preset checksum algorithm on the aviation business data. The first device sends the synchronization data packet to the second device and receives a feedback data packet sent by the second device. The feedback data packet includes a second checksum and a feedback data packet identifier. The second checksum is calculated by the second device based on a preset checksum algorithm on the aviation business data in the synchronization data packet. If the first checksum and the second checksum do not match, the first device retransmits the synchronization data packet to the second device.

[0006] In this solution, the first device calculates and generates a first check code based on a preset verification algorithm for aviation business data. The first check code reflects the complete content of the aviation business data to be synchronized. Compared with using general fields as check codes, it can avoid data mismatch problems caused by errors in aviation business data, thereby avoiding business risks such as flight business matching disorder, pricing and inventory distortion, and abnormal passenger service and refund / change processes caused by data mismatch. The second device calculates and generates a second check code based on the same preset verification algorithm used by the first device for the received aviation business data. The first device compares and verifies the first and second check codes. Compared with traditional data synchronization solutions that cannot detect problems such as missing fields and content tampering during data transmission, this solution can directly reflect whether there are problems such as missing fields and content tampering during data transmission based on the matching of the first and second check codes. If the first and second check codes do not match, the synchronization data packet is retransmitted, thereby improving the reliability and security of data synchronization.

[0007] Secondly, this disclosure provides a data synchronization method applied to a first device and a second device, the method comprising: The first device generates a synchronization data packet based on the aviation business data to be synchronized. The synchronization data packet includes a synchronization data packet identifier, aviation business data, and a first checksum. The aviation business data represents the attribute data of the corresponding services for a flight. The first checksum is generated by the first device based on the aviation business data. The first device sends the synchronization data packet to the second device. The second device receives the synchronization data packet and generates a feedback data packet based on the aviation business data in the synchronization data packet. The feedback data packet includes a second checksum and a feedback data packet identifier. The second checksum is generated by the second device based on the aviation business data. The second device sends the feedback data packet to the first device. The first device receives the feedback data packet, and if the first checksum and the second checksum do not match, the first device retransmits the synchronization data packet to the second device.

[0008] Thirdly, this disclosure provides an electronic device including a processor, a communication interface, and a memory, wherein the memory stores at least one computer program, which is loaded and executed by the processor to implement the above-described data synchronization method.

[0009] Fourthly, this disclosure provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to implement the above-described data synchronization method.

[0010] Fifthly, this disclosure provides a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the aforementioned data synchronization method.

[0011] It should be noted that any of the possible implementations of any of the above aspects can be combined, provided that the solutions do not contradict each other. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in this disclosure, the accompanying drawings used in some embodiments of this disclosure will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings.

[0013] Figure 1 This is a schematic diagram illustrating an application scenario of a data synchronization method provided in an embodiment of this disclosure; Figure 2 A schematic diagram of the hardware structure of a first device provided in an embodiment of this disclosure; Figure 3 A flowchart illustrating a data synchronization method provided in an embodiment of this disclosure; Figure 4 A flowchart illustrating another data synchronization method provided in this embodiment of the disclosure; Figure 5 This is a schematic diagram of the structure of a synchronization data packet provided in an embodiment of the present disclosure; Figure 6 A flowchart illustrating yet another data synchronization method provided in this disclosure embodiment; Figure 7 This is a schematic diagram of the structure of a data synchronization device provided in an embodiment of the present disclosure. Detailed Implementation

[0014] The technical solutions of this disclosure will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0015] It should be noted that, in this disclosure, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this disclosure should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0016] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0017] In the description of this disclosure, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "more than one" means two or more.

[0018] The efficient operation of airline operations is directly related to flight safety, passenger service quality, and business efficiency. Its daily operations rely heavily on the real-time data synchronization of multiple core systems, such as reservation systems, sales front-end (official website / APP), docking systems (hotels, in-flight catering), and cabin service systems.

[0019] Aviation industry flight-related product data is characterized by "many core attributes, high real-time requirements, and frequent updates" (e.g., flight changes lead to real-time adjustments to ticket inventory, and passenger cancellations and changes trigger updates to hotel booking data). Traditional synchronization solutions lack precise verification mechanisms for core aviation attributes, relying solely on simple data packet transmission confirmation (such as TCP handshakes). This fails to detect issues like missing fields or content tampering during data transmission, resulting in discrepancies such as "the reservation system shows available stock, but the sales front end shows no stock" and "inconsistencies between in-flight catering data and the cabin service system" after data synchronization. Therefore, traditional data synchronization solutions have low reliability.

[0020] Furthermore, existing synchronization solutions using hash verification methods often generate verification codes based on the full dataset or common core fields (such as product ID and name), without considering the unique core attributes of flight-related products in the aviation industry (such as flight number, cabin class, service code, flight departure and arrival times, transfer identifiers, etc.). These attributes are crucial for the consistency of aviation product data. If only common fields are verified, there may be missed checks such as "incorrect flight number but correct product ID," leading to low reliability of data synchronization.

[0021] To address the aforementioned issues, this disclosure provides a data synchronization method. A first device generates a synchronization data packet based on aviation business data to be synchronized. The synchronization data packet includes a synchronization data packet identifier, aviation business data, and a first checksum. The first device sends the synchronization data packet to a second device and receives a feedback data packet sent by the second device. The feedback data packet includes a second checksum and a feedback data packet identifier. If the first checksum and the second checksum do not match, the first device retransmits the synchronization data packet to the second device, thereby improving the reliability and security of data synchronization.

[0022] Figure 1 This is a schematic diagram illustrating an application scenario of a data synchronization method provided in an embodiment of this disclosure. For example... Figure 1 As shown in the figure, there are two devices, namely the first device and the second device, which are two devices that need to synchronize data.

[0023] The first and second devices can communicate via wired or wireless means. For example, the first device can send synchronization data packets to the second device through a standardized interface.

[0024] The first device can serve as the execution subject of the data synchronization method provided in the embodiments of this disclosure.

[0025] In some embodiments, the first device can be any one or more devices capable of generating aviation business data. For example, the first device can be a device that configures at least one of a reservation system, a middleware system, a sales front-end, an in-flight catering system, a cabin service system, etc.

[0026] In other embodiments, the first device may be any one or more devices that receive or acquire aviation business data to be synchronized.

[0027] For example, the first device can obtain aviation business data to be synchronized from at least one of the following systems based on a preset period: reservation system, middleware system, sales front-end, catering system, cabin service system, etc.

[0028] The second device can be any one or more devices that require data synchronization. For example, the second device can be a device that configures at least one of the following: a reservation system, a middleware system, a sales front-end, an in-flight catering system, and a cabin service system.

[0029] The first and second devices can be communication equipment, electronic equipment, or servers, etc. A server can be a single physical server; or it can be two or more physical servers sharing different responsibilities, with multiple servers working together to achieve corresponding functions. For example, depending on the server type, a server can be a blade server, a high-density server, a rack server, or a tower server, etc.

[0030] Taking the first device as a server as an example, Figure 2 This is a schematic diagram of the hardware structure of a first device provided in an embodiment of this disclosure.

[0031] See Figure 2 , Figure 2 The first device 200 shown may include a processor 201, a memory 202, a communication interface 203, and a bus 204. The processor 201, the memory 202, and the communication interface 203 can be connected via the bus 204.

[0032] The processor 201 is the control center of the first device, and can be a general-purpose central processing unit (CPU) or other general-purpose processors. The general-purpose processor can be a microprocessor or any conventional processor.

[0033] As an example, processor 201 may include one or more CPUs, for example Figure 2 CPU 0 and CPU 1 are shown in the diagram.

[0034] The memory 202 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.

[0035] In one possible implementation, the memory 202 may exist independently of the processor 201. The memory 202 can be connected to the processor 201 via a bus 204 and is used to store data, instructions, or program code. When the processor 201 calls and executes the instructions or program code stored in the memory 202, it can implement the data synchronization method provided in this embodiment of the disclosure.

[0036] In another possible implementation, the memory 202 can also be integrated with the processor 201.

[0037] The communication interface 203 is used for the first device to connect with other devices via a communication network, which may be Ethernet, radio access network (RAN), wireless local area network (WLAN), etc. The communication interface 203 may include a receiving unit for receiving data and a transmitting unit for transmitting data.

[0038] Bus 204 can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 2 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0039] It should be pointed out that, Figure 2 The structure shown does not constitute a limitation on the first device, except Figure 2 In addition to the components shown, the first device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0040] Figure 3 This is a flowchart illustrating a data synchronization method provided in an embodiment of the present disclosure, as shown below. Figure 3 As shown, the method is applied to a first device and includes: S301, The first device generates a synchronization data packet based on the aviation business data to be synchronized.

[0041] The synchronization data packet includes a synchronization data packet identifier, aviation business data, and a first checksum.

[0042] Synchronization packet identifiers are used to uniquely identify a single synchronization packet. For example, a universally unique identifier (UUID) with non-repeating, distributed generation characteristics can be used as a globally unique identifier for a single synchronization packet.

[0043] Aviation business data is used to characterize the attribute data of the associated services for a flight. Aviation business data can also be called aviation-related product data. For example, aviation business data includes at least one of the following: flight number, service identifier (which can also be called product), service name, service specifications, service inventory status, and service sales status.

[0044] The first verification code is generated by the first device based on a preset verification algorithm for aviation business data, and can be used to reflect the complete content of the aviation business data to be synchronized.

[0045] For example, the preset verification algorithm can be a hash verification algorithm, a cyclic redundancy check algorithm, a parity check algorithm, etc. For instance, the hash verification algorithm can be Message-Digest Algorithm 5 (MD5), Secure Hash Algorithm 256-bit (SHA-256), Secure Hash Algorithm 512-bit (SHA-512), etc.

[0046] In some embodiments, before generating a synchronization data packet based on the aviation business data to be synchronized, the first device must first acquire the aviation business data to be synchronized.

[0047] The first device can obtain aviation business data to be synchronized from at least one of the following systems: reservation system, middleware system, sales front-end, catering system, cabin service system, etc.

[0048] In one feasible implementation, the first device can acquire the aviation business data to be synchronized according to a preset period. For example, the preset period can be 30 minutes, 1 hour, 2 hours, 150 minutes, 5 hours, etc.

[0049] For peak travel periods such as weekends and holidays when flight routes are busy and business demand is high, the preset cycle can be shorter, for example, retrieving aviation business data to be synchronized every 30 minutes. For periods with lower daily business demand, the preset cycle can be longer, for example, retrieving aviation business data to be synchronized every 150 minutes.

[0050] In another feasible implementation, the first device can acquire the aviation business data to be synchronized before the arrival time of a flight. For example, the first device can acquire the aviation business data to be synchronized half an hour before the arrival time of a flight.

[0051] S302, the first device sends a synchronization data packet to the second device and receives a feedback data packet sent by the second device.

[0052] Feedback data packets refer to the data packets generated by the second device after verifying the synchronization data packets sent by the first device.

[0053] The feedback data packet includes a second checksum and a feedback data packet identifier.

[0054] The second checksum is generated by the second device based on a preset checksum algorithm by calculating the aviation business data in the synchronization data packet. It can be used to reflect the complete content of the aviation business data received by the second device.

[0055] It is understandable that the first check code and the second check code are generated by the first device and the second device using the same check algorithm.

[0056] After the first device sends a synchronization data packet to the second device, there may be a situation where it does not receive a feedback data packet sent by the second device. In this case, the first device can retransmit the synchronization data packet to the second device.

[0057] In some embodiments, after the first device sends a synchronization data packet to the second device, the first device starts a timeout timer. If the timeout timer records a time greater than or equal to a preset timeout period, and the first device has not received a feedback data packet from the second device, the first device retransmits the synchronization data packet to the second device. If the first device receives a feedback data packet from the second device, it can stop the timeout timer.

[0058] The preset timeout can be a set value. For example, the preset timeout can be 500ms, 550ms, 600ms, etc., to meet the low latency requirements of aviation systems.

[0059] The first device starts timing after sending a synchronization data packet to the second device, and retransmits the data if the recorded time exceeds the preset timeout. This avoids data loss caused by unexpected situations such as network fluctuations, link interruptions, and momentary failures of the receiving system, thereby improving the reliability of data synchronization and the practicality of the data synchronization method. At the same time, the automatic retransmission of synchronization data packets without manual intervention reduces manual maintenance costs.

[0060] S303. If the first check code and the second check code do not match, the first device shall retransmit the synchronization data packet to the second device.

[0061] The first device retransmitting the synchronization data packet to the second device means that the first device resends the synchronization data packet to the second device.

[0062] Understandably, if no issues such as missing fields or content changes occur in the aviation business data within the synchronization data packet during data transmission, the checksums generated by the first and second devices based on the same aviation business data should be identical. That is, if the first and second checksums match, the data synchronization between the first and second devices is successful, and a synchronization log containing the synchronization data packet identifier, synchronization timestamp, and the second device identifier can be recorded. For example, if the first checksum is "E2F57A98D3B1C4E6" and the second checksum is also "E2F57A98D3B1C4E6", then the first and second checksums match.

[0063] If, during data transmission, issues such as missing fields or content changes occur in the aviation business data within the synchronization data packet, the checksums generated by the first and second devices based on different aviation business data will differ; that is, the first and second checksums will not match. For example, if the first checksum is "E2F57A98D3B1C4E6" and the second checksum is "E2F57A98D3B1C4E7", then the first and second checksums do not match.

[0064] In this embodiment, the first device calculates a first checksum based on a preset hash of the aviation business data. The first checksum reflects the complete content of the aviation business data to be synchronized. Compared with using a general field as the checksum, it can avoid data mismatch caused by errors in aviation business data, thereby avoiding business risks such as flight business matching disorder, pricing and inventory distortion, and abnormal passenger service and refund / change processes caused by data mismatch. The second device calculates a second checksum based on the same preset verification algorithm used by the first device. The first device compares and verifies the first and second checksums. Compared with traditional data synchronization schemes that cannot detect problems such as missing fields and content tampering during data transmission, this scheme can directly reflect whether there are problems such as missing fields and content tampering during data transmission based on the matching of the first and second checksums. If the first and second checksums do not match, the synchronization data packet is retransmitted, thereby improving the reliability and security of data synchronization.

[0065] In some embodiments, the synchronization data packet includes the number of retransmissions. Step S303 further includes: S3031. If the number of retransmissions of the synchronization data packet is less than the preset retransmission number threshold, the number of retransmissions of the synchronization data packet is increased by 1, and the first retransmission synchronization data packet after updating the retransmission number is obtained.

[0066] The preset retransmission threshold can be a set value. For example, the preset retransmission count can be 3, 4, 5, etc.

[0067] The first retransmission synchronization data packet includes the first retransmission synchronization data packet identifier, aviation business data, the first checksum, and the updated retransmission count.

[0068] In some embodiments, the number of retransmissions in the first synchronization data packet sent after the first device and the second device establish a communication connection is 0.

[0069] In some embodiments, if the number of retransmissions of the synchronization data packet is greater than or equal to a preset retransmission threshold, the first device stops retransmitting the synchronization data packet to the second device and outputs a synchronization error warning.

[0070] A synchronization error warning is used to indicate a data synchronization error between a first device and a second device. For example, a synchronization error warning can be in the form of a voice announcement, a siren alarm, or a displayed message, etc.

[0071] In some embodiments, after outputting a synchronization error warning, an error log can also be recorded.

[0072] In some embodiments, if the number of retransmissions is greater than or equal to the preset number of retransmissions, and the first check code and the second check code still do not match, the first device may also stop retransmitting synchronization data packets to the second device and output a synchronization error warning.

[0073] S3032, The first device sends a first retransmission synchronization data packet to the second device and receives a first retransmission feedback data packet sent by the second device.

[0074] The first retransmission feedback data packet includes a third checksum and a first retransmission feedback data packet identifier.

[0075] The third checksum is generated by the second device based on a preset checksum algorithm calculated from the aviation business data in the first retransmission synchronization data packet.

[0076] In some embodiments, before the first device sends the first retransmission synchronization data packet to the second device, the first retransmission synchronization data packet is added to a retransmission queue, and the first retransmission synchronization data packet is retransmitted based on the retransmission queue.

[0077] In some embodiments, after receiving the first retransmission feedback data packet sent by the second device, the first device verifies the first checksum and the third checksum. If the first checksum and the third checksum match, the first device determines that the data of the first device and the second device are synchronized; if the first checksum and the third checksum do not match, the first device may retransmit the synchronization data packet to the second device again.

[0078] In some embodiments, the first device sends synchronization data packets and a configuration file to the second device via a target communication protocol. The configuration file instructs the second device to communicate according to the target communication protocol, which can adapt to devices corresponding to heterogeneous systems developed by multiple airline vendors and reduce interoperability costs. For example, the target communication protocol may be a protocol such as Hypertext Transfer Protocol (HTTP), Hypertext Transfer Protocol Secure (HTTPS), or Simple Object Access Protocol (SOAP).

[0079] In some embodiments, the configuration file can also be used to instruct the second device to perform calculations according to a preset verification algorithm used by the first device. Unifying the hash algorithm types of the first and second devices through the configuration file can improve security and compatibility.

[0080] In this embodiment, by judging whether to retransmit the synchronization data packet based on the number of retransmissions and the preset retransmission threshold, the reliability of data synchronization can be improved. When the number of retransmissions is less than the preset retransmission threshold, the number of retransmissions is recorded and the number of retransmissions in the synchronization data packet is updated, so that the first device and the second device can clearly understand the number of retransmissions. When the number of retransmissions is greater than or equal to the preset retransmission threshold, retransmission is stopped, which can avoid resource congestion and waste caused by continuous retransmission and improve the practicality of the data synchronization method.

[0081] In some embodiments, the synchronization data packet includes a retransmission priority. The first device retransmits the synchronization data packet to the second device based on the retransmission time interval corresponding to the retransmission priority, provided the retransmission time interval is satisfied.

[0082] Retransmission priority is used to characterize the transmission order of synchronization data packets after they are added to the retransmission queue. The higher the retransmission priority, the earlier the synchronization data packets are sent after being added to the retransmission queue; the lower the retransmission priority, the later the synchronization data packets are sent after being added to the retransmission queue. For example, retransmission priority can include levels 1-3, where level 1 corresponds to low priority, level 2 corresponds to medium priority, and level 3 corresponds to high priority.

[0083] In some embodiments, the first device may determine the retransmission priority of the synchronization data packets based on the flight's departure time.

[0084] In one feasible implementation, the retransmission priority rule can be: the retransmission priority of synchronization data packets within T hours before flight departure = 3 - floor(T / 24), T≤72. For example, when T=12, the retransmission priority of synchronization data packets within 12 hours before flight departure is level 3; when T=24, the retransmission priority of synchronization data packets within 24 hours before flight departure is level 2.

[0085] In other embodiments, the first device may determine the retransmission priority of the synchronization data packet based on the service type.

[0086] In one feasible implementation, the retransmission priority rule could be: the priority of in-flight catering services is higher than that of hotel services, and the priority of hotel services is higher than that of lounge services. For example, the retransmission priority of the synchronous data packets corresponding to in-flight catering services is level 3, the retransmission priority of the synchronous data packets corresponding to hotel services is level 2, and the retransmission priority of the synchronous data packets corresponding to lounge services is level 1.

[0087] In some embodiments, the higher the retransmission priority, the shorter the retransmission time interval corresponding to the retransmission priority.

[0088] In some embodiments, for the same retransmission priority, the retransmission time interval is the same for each retransmission. Taking retransmission priorities of level 1, level 2 and level 3 as an example, retransmission priority level 1 corresponds to low priority, and the retransmission time interval for each retransmission is 2s; retransmission priority level 2 corresponds to medium priority, and the retransmission time interval for each retransmission is 1s; retransmission priority level 3 corresponds to high priority, and the retransmission time interval for each retransmission is 0.5s.

[0089] In other embodiments, for the same retransmission priority, the retransmission time interval for each retransmission may also be different.

[0090] Taking retransmission priority levels 1, 2, and 3 as an example, level 1 (low priority) has a retransmission interval of 2 seconds for the first retransmission. If no feedback is received from the second device after 2 seconds, a second retransmission is performed with an interval of 2.5 seconds. The interval for the Nth retransmission is (1.5 + 0.5N) seconds. Level 2 (medium priority) has a retransmission interval of 1 second for each retransmission. If no feedback is received from the second device after 1 second, a second retransmission is performed with an interval of 1.5 seconds. The interval for the Nth retransmission is (0.5 + 0.5N) seconds. Level 3 (high priority) has a retransmission interval of 0.5 seconds for each retransmission. If no feedback is received from the second device after 0.5 seconds, a second retransmission is performed with an interval of 1 second. The interval for the Nth retransmission is (0.5N) seconds.

[0091] In this embodiment, prioritizing the retransmission of synchronization data packets ensures that highly sensitive and time-sensitive data is retransmitted first, thereby improving the efficiency of data synchronization. At the same time, the higher the priority, the shorter the corresponding time interval, which can further improve the efficiency of data synchronization and avoid business risks caused by data synchronization delays.

[0092] In some embodiments, the synchronization data packet includes a retransmission identifier. The first device sets the retransmission identifier of the synchronization data packet to a first value and retransmits the synchronization data packet to the second device. The first value of the retransmission identifier instructs the second device to prioritize processing the synchronization data packet retransmitted by the first device after updating the retransmission identifier. Correspondingly, when the retransmission identifier is not the first value, retransmission can be performed based on a conventional order. For example, the first value can be a number, such as 0 or 1; the first value can also be a string, such as A or B; or the first value can be a boolean value, such as true.

[0093] In this embodiment, by instructing the second device to prioritize processing the synchronization data packet through the retransmission flag in the synchronization data packet, the efficiency of data synchronization can be improved, thereby avoiding business risks caused by data synchronization delays.

[0094] In some embodiments, the types of feedback packets include synchronization success feedback packets and synchronization failure feedback packets.

[0095] The synchronization success feedback data packet indicates that, given a match between the first and second checksums, the second device generates a feedback data packet based on the received synchronization data packet. The second device generates a feedback identifier in the feedback data packet; a first value for the feedback identifier indicates that the feedback data packet is a synchronization success feedback data packet. Alternatively, the second device sends a feedback data packet and a synchronization success response to the first device; the synchronization success response indicates that the feedback data packet is a synchronization success feedback data packet.

[0096] The synchronization failure feedback data packet is used to characterize a feedback data packet generated by the second device based on the received synchronization data packet when the first checksum and the second checksum do not match. The second device generates a feedback identifier in the feedback data packet; when the feedback identifier is a second value, it indicates that the feedback data packet is a synchronization failure feedback data packet. Alternatively, the second device sends a feedback data packet and a synchronization failure response to the first device; the synchronization failure response is used to characterize the feedback data packet as a synchronization failure feedback data packet.

[0097] In some other feasible implementations, when the first device receives a feedback data packet, and based on the feedback identifier in the feedback data packet being the second value or the first device receiving a feedback failure response, the first device does not perform the matching operation of the first check code and the second check code, but directly retransmits the synchronization data packet to the second device.

[0098] In this embodiment, by receiving synchronization success feedback data packets and synchronization failure feedback data packets, the first device can directly understand the matching status of the first check code and the second check code. In the event of synchronization failure, the first device can directly retransmit without matching the first check code and the second check code, which can improve the efficiency of data synchronization.

[0099] The following examples illustrate step S301.

[0100] In some embodiments, aviation business data includes aviation identification data, business basic data, and business status data.

[0101] Among them, aviation identification data is used to characterize flight information.

[0102] For example, airline identification data includes at least one of the following: flight number (e.g., following the International Air Transport Association (IATA) flight number coding standard), cabin class, flight date (format YYYY-MM-DD), origin-destination code (IATA 3-digit city code), and transit identifier. For example, cabin class includes standard airline cabin codes such as First Class (F), Business Class (J), and Economy Class (Y). Transit identifiers include non-transit identifiers and transit identifiers. For example, a first value can represent a non-transit identifier, and a second value can represent a transit identifier; for example, the first value can be 0, and the second value can be 1.

[0103] Business foundation data is used to characterize the basic information of the services provided by flights.

[0104] For example, the basic business data includes at least one of the following: a unique product ID (e.g., based on an airline's unified code), product name, product specifications (e.g., in-flight catering type, hotel room type, etc.), price (including currency code), and inventory status. Inventory status includes both in-stock and out-of-stock status. For instance, a first value can represent an out-of-stock status, and a second value can represent an in-stock status; for example, the first value can be 0, and the second value can be 1.

[0105] Business status data is used to characterize the business status information of the corresponding supporting services for flights.

[0106] For example, the business status data includes at least one of the following: sales status, refund / modification rule version number, and data update timestamp. The sales status includes "not yet available," "available," and "sold out." For instance, a first value can represent "not yet available," a second value can represent "available," and a third value can represent "sold out." For example, the first value can be 0, the second value can be 1, and the third value can be 2.

[0107] In some embodiments, the first device may employ a configurable mechanism for aviation business data. For example, it may support airlines in adding or adjusting aviation business data based on business needs. The aviation business data may be stored in a distributed configuration center of the first device for synchronous access by various systems within the first device, ensuring the consistency of data attributes.

[0108] Figure 4 This is a flowchart illustrating another data synchronization method provided in an embodiment of this disclosure. Figure 4 As shown, this step includes: S3011, The first device determines the core attribute fields and the full range of business fields based on aviation identification data, business basic data and business status data.

[0109] In some embodiments, the core attribute fields can be arranged in the order of aviation identification data, business basic data, and business status data.

[0110] The "Full Business Data" field includes all data information related to the flight's associated services. This field can be in a preset data format, such as JavaScript object notation (JSON).

[0111] In some embodiments, core attribute fields can be added based on the airline's business type (such as focusing on in-flight catering services). For example, for in-flight catering services, in-flight catering set meal codes, special meal identifiers, etc., can be added.

[0112] S3012. The first device calculates the core attribute fields based on a preset verification algorithm to generate the first verification code.

[0113] In some embodiments, the first device can concatenate the Hexing attribute fields in a preset order (e.g., aviation identification data, business basic data, and business status data) to obtain a concatenated string, and then calculate a first checksum of a preset number of bytes based on a preset verification algorithm. For example, the preset number of bytes can be 16 bytes.

[0114] S3013. The first device encapsulates the synchronization data packet identifier, core attribute fields, full service fields, and first checksum to generate a synchronization data packet.

[0115] In some embodiments, the structure of the synchronization data packet can adopt a standardized encapsulation format. The synchronization data packet includes a header, a body, and a trailer. The header includes a synchronization data packet identifier, retransmission count, retransmission priority identifier, retransmission identifier, and first device identifier, etc. The body includes core attribute fields and full service fields, and the trailer includes a first checksum, data verification timestamp, etc. The body supports formats such as JSON and Extensible Markup Language (XML).

[0116] In some embodiments, the structure of the synchronization data packets may also adopt the protocol buffer (protobuf) format.

[0117] Taking the synchronization of combined product data of airline tickets and transit hotels from the airline reservation system and the middle platform system to the sales front end as an example, a complete process for generating a synchronization data package is given. The aviation business data to be synchronized includes flight number XX1234, cabin class Y, hotel ID H123, and inventory of 10, etc. The first device extracts core attribute fields and full data fields from the aviation business data. The core attribute fields are "flight number XX1234, cabin class Y, flight date 2024-10-01, origin A-destination B, product IDP5678, inventory 10, sales status 1"; the first device concatenates these core attribute fields to obtain the concatenated string "CA1234Y20241001PEKSHA P5678101"; the first device uses the MD5 algorithm to generate the first checksum "E2F57A98D3B1C4E6"; the first device encapsulates the synchronization data package identifier, core attribute fields, full business fields, and the first checksum to generate the synchronization data package.

[0118] Figure 5 This is a schematic diagram illustrating the structure of a synchronization data packet provided in an embodiment of this disclosure. Figure 5 As shown, a synchronization data packet includes a header, a body, and a trailer. The header is 16 bytes, the body can be of variable length (i.e., the length of the body in a synchronization data packet is not fixed), and the trailer is 32 bytes.

[0119] The header includes an 8-byte synchronization packet identifier, a 4-byte retransmission priority identifier, and a 4-byte first device identifier. The body includes core attribute fields and full service fields. The core attribute fields include aviation identification data, basic service data, and service status data. The footer includes a 16-byte first checksum and a 16-byte data verification timestamp.

[0120] By encapsulating synchronization data packets using a standardized encapsulation format, it becomes easier for other devices to parse them, thereby improving the efficiency of data synchronization.

[0121] Figure 6 This is a flowchart illustrating yet another data synchronization method provided in an embodiment of this disclosure. Figure 6 As shown, the method is applied to a first device and a second device, and includes: S601, The first device generates a synchronization data packet based on the aviation business data to be synchronized.

[0122] The synchronization data packet includes a synchronization data packet identifier, aviation business data, and a first verification code. The aviation business data is used to characterize the attribute data of the supporting business corresponding to a flight, and the first verification code is generated by the first device based on the aviation business data.

[0123] This step is the same as step S301 above, and will not be repeated here.

[0124] S602, The first device sends a synchronization data packet to the second device.

[0125] This step is the same as the step S302 above in which the first device sends a synchronization data packet to the second device, and will not be described again here.

[0126] S603, the second device receives the synchronization data packet and generates a feedback data packet based on the aviation business data in the synchronization data packet.

[0127] The feedback data packet includes a second check code and a feedback data packet identifier. The second check code is generated by the second device based on the aviation business data.

[0128] In some embodiments, after receiving a synchronization data packet, the second device parses the header and trailer of the synchronization data packet to obtain a first checksum. Then, the second device extracts aviation business data from the body of the synchronization data packet, concatenates the aviation business data into a string in the same order as the first device, and calculates a second checksum based on a preset checksum algorithm. The first checksum and the second checksum are compared, and a feedback data packet is generated based on the comparison result.

[0129] In other embodiments, if the comparison result indicates that the first check code and the second check code match, a verification pass feedback data packet or a synchronization success feedback data packet is generated; if the comparison result indicates that the first check code and the second check code do not match, a verification failure feedback data packet or a synchronization failure feedback data packet is generated.

[0130] S604, The second device sends a feedback data packet to the first device.

[0131] S605. The first device receives the feedback data packet and, if the first check code and the second check code do not match, retransmits the synchronization data packet to the second device.

[0132] This step is the same as step S303 above, and will not be repeated here.

[0133] In this embodiment, through a two-way handshake synchronization based on a preset verification algorithm, the receiver (i.e., the second device in this scheme) verifies the integrity of the data to be synchronized based on the first and second verification codes, and feeds back the verification result to the sender (i.e., the first device in this scheme). The sender then performs data verification based on the fed-back second verification code and the first verification code, thereby realizing bidirectional verification of data transmission and forming a closed-loop verification. This solves the problem that traditional one-way verification cannot confirm the validity of the receiver's data, ensuring that the data of the sender and receiver are consistent, thereby improving the reliability and accuracy of data synchronization.

[0134] The foregoing primarily describes the solutions of the embodiments of this disclosure from a methodological perspective. It is understood that, in order to achieve the above functions, the data synchronization device includes at least one of the hardware structures and software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure.

[0135] This disclosure embodiment can divide the data synchronization device into functional modules according to the above method embodiment. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one functional module. The integrated module can be implemented in hardware or software. It should be noted that the module division in this disclosure embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. The following description uses the example of dividing each function into a separate functional module.

[0136] Figure 7 This is a schematic diagram of a data synchronization device provided in an embodiment of the present disclosure. This data synchronization device is applied to a first device and can execute the data synchronization method provided in the above-described method embodiments. Figure 7 As shown, the data synchronization device 700 includes: a processing module 701, a communication module 702, and a storage module 703.

[0137] In some embodiments, the processing module 701 is used to generate a synchronization data packet based on the aviation business data to be synchronized.

[0138] The synchronization data packet includes a synchronization data packet identifier, aviation business data, and a first check code. The aviation business data is used to characterize the attribute data of the supporting business corresponding to a flight. The first check code is generated by the first device based on a preset check algorithm to calculate the aviation business data.

[0139] The processing module 701 can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The processor can include application processors and baseband processors. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0140] In some embodiments, the communication module 702 includes a sending module and a receiving module. The sending module is used to send synchronization data packets to the second device, and the receiving module is used to receive feedback data packets sent by the second device.

[0141] The feedback data packet includes a second check code and a feedback data packet identifier. The second check code is generated by the second device based on a preset check algorithm and the aviation business data in the synchronization data packet.

[0142] In some embodiments, the receiving module is further configured to retransmit the synchronization data packet to the second device if the first check code and the second check code do not match.

[0143] The communication module 702 is also used to establish a communication connection between the processing module 701 and the storage module 703.

[0144] In some embodiments, the storage module 703 is used to store aviation business data to be synchronized, synchronization data packets, feedback data packets, etc.

[0145] For example, the processing module 701 can be as follows: Figure 2 The processor 201 shown; the communication module 702 can be as follows: Figure 2 The communication interface 203 shown; the storage module 703 can be as follows: Figure 2 The internal memory 202 shown.

[0146] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0147] This disclosure provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the beam measurement method described in the above method embodiments.

[0148] This disclosure also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the beam measurement method in the method flow shown in the above method embodiments.

[0149] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires; a portable computer disk drive; a hard disk drive; random access memory (RAM); read-only memory (ROM); erasable programmable read-only memory (EPROM); a register; a hard disk drive; an optical fiber; a compact disc read-only memory (CD-ROM); an optical storage device; a magnetic storage device; or any suitable combination thereof; or any other form of computer-readable storage medium known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium may also be a component of the processor. The processor and the storage medium may reside in an application-specific integrated circuit (ASIC).

[0150] In this embodiment of the disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0151] Since the beam measurement device, computer-readable storage medium, and computer program product in the embodiments of the present invention can be applied to the above methods, the technical effects they can achieve can also be referred to the above method embodiments. The embodiments of the present invention will not be repeated here.

[0152] In the embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, 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 network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0154] In addition, the functional units in the various embodiments of this disclosure 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.

[0155] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any changes or substitutions within the technical scope disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. A data synchronization method, characterized in that, Applied to a first device, the method includes: The first device generates a synchronization data packet based on the aviation business data to be synchronized; the synchronization data packet includes a synchronization data packet identifier, aviation business data, and a first check code, wherein the aviation business data is used to characterize the attribute data of the supporting business corresponding to a flight, and the first check code is generated by the first device based on a preset check algorithm calculated on the aviation business data; The first device sends the synchronization data packet to the second device and receives the feedback data packet sent by the second device; the feedback data packet includes a second check code and a feedback data packet identifier, wherein the second check code is generated by the second device by performing a hash operation on the aviation business data in the synchronization data packet based on the preset check algorithm; If the first check code does not match the second check code, the first device retransmits the synchronization data packet to the second device.

2. The method according to claim 1, characterized in that, The synchronization data packet includes the number of retransmissions; The first device retransmits the synchronization data packet to the second device, including: If the number of retransmissions of the synchronization data packet is less than the preset retransmission number threshold, the number of retransmissions of the synchronization data packet is increased by 1, and the first retransmission synchronization data packet after updating the retransmission number is obtained. The first device sends the first retransmission synchronization data packet to the second device and receives the first retransmission feedback data packet sent by the second device; the first retransmission feedback data packet includes a third check code and a first retransmission feedback data packet identifier, wherein the third check code is generated by the second device based on the preset check algorithm for calculating the aviation business data in the first retransmission synchronization data packet.

3. The method according to claim 2, characterized in that, The method further includes: If the number of retransmissions of the synchronization data packet is greater than or equal to the preset retransmission threshold, the first device stops retransmitting the synchronization data packet to the second device and outputs a synchronization error warning; the synchronization error warning is used to indicate a data synchronization error between the first device and the second device.

4. The method according to any one of claims 1-3, characterized in that, The synchronization data packet includes retransmission priority; The first device retransmits the synchronization data packet to the second device, including: The first device retransmits the synchronization data packet to the second device based on the retransmission time interval corresponding to the retransmission priority, provided that the retransmission time interval is satisfied. The higher the retransmission priority, the shorter the retransmission interval.

5. The method according to any one of claims 1-3, characterized in that, After the first device sends the synchronization data packet to the second device, the method further includes: The first device starts a timeout timer; The first device retransmits the synchronization data packet to the second device, including: If the time recorded by the timeout timer is greater than or equal to the preset timeout time, and the first device does not receive the feedback data packet sent by the second device, the first device retransmits the synchronization data packet to the second device.

6. The method according to any one of claims 1-3, characterized in that, The synchronization data packet includes a retransmission identifier; The first device retransmits the synchronization data packet to the second device, including: The first device sets the retransmission flag of the synchronization data packet to a first value and retransmits the synchronization data packet to the second device. The retransmission flag being set to the first value is used to instruct the second device to prioritize the processing of the synchronization data packet retransmitted by the first device.

7. The method according to any one of claims 1-3, characterized in that, The method further includes: If the first verification code matches the second verification code, the first device determines that the data of the first device and the second device are synchronized.

8. The method according to claim 1, characterized in that, The aviation business data includes aviation identification data, business basic data, and business status data. The aviation identification data is used to represent flight information, the business basic data is used to represent the basic information of the services provided by the flight, and the business status data is used to represent the business status information of the corresponding supporting services of the flight. The first device generates a synchronization data packet based on the aviation business data to be synchronized, including: The first device determines the core attribute fields and the full range of business fields based on the aviation identification data, the basic business data, and the business status data; The first device calculates the core attribute field based on the preset verification algorithm to generate a first verification code; The first device encapsulates the synchronization data packet identifier, the core attribute field, the full service field, and the first checksum to generate the synchronization data packet.

9. The method according to claim 1, characterized in that, The feedback data packet includes a synchronization success feedback data packet and a synchronization failure feedback data packet; The synchronization success feedback data packet is used to characterize the feedback from the second device to the synchronization data packet when the first check code and the second check code match; The synchronization failure feedback data packet is used to characterize the feedback from the second device to the synchronization data packet when the first checksum and the second checksum do not match.

10. A data synchronization method, characterized in that, The method includes: The first device generates a synchronization data packet based on the aviation business data to be synchronized; the synchronization data packet includes a synchronization data packet identifier, aviation business data, and a first check code, wherein the aviation business data is used to characterize the attribute data of the supporting business corresponding to a flight, and the first check code is generated by the first device based on the aviation business data; The first device sends the synchronization data packet to the second device; The second device receives the synchronization data packet and generates a feedback data packet based on the aviation business data in the synchronization data packet; the feedback data packet includes a second check code and a feedback data packet identifier, wherein the second check code is generated by the second device based on the aviation business data; The second device sends the feedback data packet to the first device; The first device receives the feedback data packet, and if the first check code and the second check code do not match, the first device retransmits the synchronization data packet to the second device.

11. The method according to claim 10, characterized in that, The first device sends the synchronization data packet to the second device, including: The first device sends the synchronization data packet and configuration file to the second device through the target communication protocol. The configuration file is used to instruct the second device to communicate in accordance with the target communication protocol.

12. An electronic device, characterized in that, The electronic device includes a processor, a communication interface, and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the data synchronization method as described in any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to implement the data synchronization method as described in any one of claims 1 to 11.

14. A computer program product, characterized in that, The computer program product includes a computer program or instructions that, when executed by a processor, implement the data synchronization method as described in any one of claims 1 to 11.