Data processing method and device

By creating two to-be-stored files for the data to be stored in the two-by-two security platform, and only updating one target storage file, the problem of data loss caused by system failures during data writing or synchronization is solved, and data is improved. reliability and security.

CN118331516BActive Publication Date: 2024-09-03BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410779615.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-09-03
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

In a security platform based on two by two, data may be lost due to system failure or interruption during data writing or synchronization.

Method used

By creating two files to be stored for the data to be stored in the data processing system, and determining one of the two files as the target storage file, only the target storage file is updated with data, so that in the event of a failure or interruption, the other file The data in it can still be used to avoid data loss.

Benefits of technology

It improves the reliability and security of data updates and writing, ensuring that even in the event of system failure or interruption, backup data is available to avoid data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118331516B
    Figure CN118331516B
Patent Text Reader

Abstract

This specification provides a data processing method and device, wherein the data processing method includes: obtaining data to be stored and a file identifier to be stored of the data to be stored; determining a first file to be stored and a second file to be stored of the data to be stored according to the file identifier to be stored, wherein the first file to be stored and the second file to be stored are stored in the same memory of the data processing system, the first file update timestamp of the first file to be stored is different from the second file update timestamp of the second file to be stored, and the first file to be stored and the second file to be stored store historical storage data corresponding to the data to be stored; determining a target storage file of the data to be stored in the first file to be stored and the second file to be stored; and updating the target storage file based on the data to be stored. Avoiding the problem of data loss in the process of data update or writing, and improving the reliability and security of data update and writing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data processing method. The present invention also relates to a data processing device, a computing device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Equipment redundancy technology is an important technical measure taken to ensure that important system equipment does not stop operating. With the development of redundancy technology, the signal system has gradually developed into a three-out-of-two system and a two-by-two-out-of-two system, especially the two-by-two-out-of-two redundant structure. Due to its high safety, good reliability and low cost, it is widely used in railway signal equipment, computer equipment and other fields.

[0003] However, in actual applications, in the process of writing data based on the two-by-two security platform, data writing may fail due to system failure or writing interruption, resulting in loss of the original stored data. Therefore, a method is urgently needed to solve the technical problem of data loss caused by data writing failure. Summary of the invention

[0004] In view of this, the embodiments of this specification provide a data processing method. This specification also relates to a data processing device, a computing device, a computer-readable storage medium and a computer program product to solve the above problems existing in the prior art.

[0005] According to a first aspect of an embodiment of this specification, a data processing method is provided, which is applied to a data processing system, including:

[0006] Acquire the data to be stored and the identifier of the file to be stored of the data to be stored;

[0007] Determining, according to the to-be-stored file identifier, a first to-be-stored file and a second to-be-stored file of the to-be-stored data, wherein the first to-be-stored file and the second to-be-stored file are stored in a same memory of the data processing system, a first file update timestamp of the first to-be-stored file is different from a second file update timestamp of the second to-be-stored file, and the first to-be-stored file and the second to-be-stored file store historical storage data corresponding to the to-be-stored data;

[0008] Determining a target storage file for the data to be stored in the first file to be stored and the second file to be stored;

[0009] The target storage file is updated based on the data to be stored.

[0010] According to a second aspect of an embodiment of this specification, there is provided a data processing device, which is applied to a data processing system, including:

[0011] An acquisition module is configured to acquire the data to be stored and an identifier of a file to be stored of the data to be stored;

[0012] A first determining module is configured to determine, according to the to-be-stored file identifier, a first to-be-stored file and a second to-be-stored file of the to-be-stored data, wherein the first to-be-stored file and the second to-be-stored file are stored in a same memory of the data processing system, a first file update timestamp of the first to-be-stored file is different from a second file update timestamp of the second to-be-stored file, and the first to-be-stored file and the second to-be-stored file store historical storage data corresponding to the to-be-stored data;

[0013] A second determining module is configured to determine a target storage file for the data to be stored in the first to-be-stored file and the second to-be-stored file;

[0014] An updating module is configured to update the target storage file based on the data to be stored.

[0015] According to a third aspect of an embodiment of this specification, another data processing method is provided, which is applied to a data processing system, wherein the data processing system includes a first subsystem and a second subsystem;

[0016] The method comprises:

[0017] In response to a data synchronization request, a first file to be synchronized and a second file to be synchronized are read, wherein the data synchronization request carries a target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are determined according to the target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are stored in a same memory of the data processing system, a first file update timestamp of the first file to be synchronized and a second file update timestamp of the second file to be synchronized are different, and the first file to be synchronized or the second file to be synchronized stores target synchronization data;

[0018] Determine a first target synchronization file among the first file to be synchronized and the second file to be synchronized;

[0019] Acquire a second target synchronization file corresponding to the first target synchronization file, wherein the first target synchronization file is stored in the first subsystem, and the second target synchronization file is stored in the second subsystem;

[0020] Data synchronization processing is performed between the first subsystem and the second subsystem according to the first target synchronization file and the second target synchronization file.

[0021] According to a fourth aspect of an embodiment of this specification, another data processing device is provided, which is applied to a data processing system, wherein the data processing system includes a first subsystem and a second subsystem;

[0022] The device comprises:

[0023] A reading module, configured to read a first file to be synchronized and a second file to be synchronized in response to a data synchronization request, wherein the data synchronization request carries a target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are determined according to the target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are stored in a same memory of the data processing system, a first file update timestamp of the first file to be synchronized and a second file update timestamp of the second file to be synchronized are different, and the first file to be synchronized or the second file to be synchronized stores target synchronization data;

[0024] A file determination module, configured to determine a first target synchronization file among the first file to be synchronized and the second file to be synchronized;

[0025] A file acquisition module, configured to acquire a second target synchronization file corresponding to the first target synchronization file, wherein the first target synchronization file is stored in the first subsystem, and the second target synchronization file is stored in the second subsystem;

[0026] The synchronization module is configured to perform data synchronization processing between the first subsystem and the second subsystem according to the first target synchronization file and the second target synchronization file.

[0027] According to the fifth aspect of the embodiments of this specification, a computing device is provided, including a memory, a processor, and a computer program or instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned data processing method when executing the computer program or instructions.

[0028] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program or instructions, and when the computer program or instructions are executed by a processor, the steps of the above-mentioned data processing method are implemented.

[0029] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program or instructions, which implement the steps of the above-mentioned data processing method when executed by a processor.

[0030] An embodiment of the present specification realizes that, after acquiring the data to be stored, two files to be stored that can be used to store the data to be stored are determined in the same storage device, and one of the two files to be stored is determined as a target storage file, and the data to be stored is updated to the target storage file, so that the data to be stored is updated only to one file to be stored. In this way, even if the system fails or the update process is interrupted during the process of updating the data to be stored to the target storage file, causing the data update to fail, the storage data in another file to be stored is still available for use, thereby avoiding the problem of data loss during the data update or writing process and improving the reliability and security of data update and writing. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a flow chart of a data processing method provided by an embodiment of this specification;

[0032] Figure 2 is an architecture diagram of a data processing system provided by an embodiment of this specification;

[0033] Figure 3 is a processing flow chart of a data processing method in a same subsystem provided in an embodiment of this specification;

[0034] Figure 4 is a processing flow chart of a data processing method applied to a two-by-two-take-two security platform provided in an embodiment of this specification;

[0035] Figure 5 It is a structural schematic diagram of a data processing device provided in an embodiment of this specification;

[0036] Figure 6 is a flow chart of another data processing method provided by an embodiment of this specification;

[0037] Figure 7 is a processing flow chart of another data processing method in the same subsystem provided in an embodiment of this specification;

[0038] Figure 8 is a processing flow chart of another data processing method applied to a two-by-two-take-two security platform provided by an embodiment of this specification;

[0039] Fig. 9 is a structural schematic diagram of another data processing device provided in an embodiment of this specification;

[0040] Fig.10 It is a structural block diagram of a computing device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0041] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0042] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0043] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0044] First, the terms involved in one or more embodiments of this specification are explained.

[0045] Two times two, take two: the first two is the active / standby system, that is, the two hot standby systems; the second two is the two CPUs in each system; the last two is the result output, take two for comparison.

[0046] Equipment redundancy technology is an important technical measure taken to ensure that important system equipment does not stop operating. With the development of redundancy technology, the signal system has gradually developed into a three-out-of-two system and a two-by-two-out-of-two system, especially the two-by-two-out-of-two redundant structure. Due to its high safety, good reliability and low cost, it is widely used in railway signal equipment, computer equipment and other fields.

[0047] However, in actual applications, when writing data based on the 2x2x2 secure platform, system failure or write interruption may cause data writing failure, resulting in loss of the original stored data. When synchronizing data based on the 2x2x2 secure platform, system failure or system power failure may also cause data synchronization interruption, resulting in data loss.

[0048] In this specification, a data processing method is provided. This specification also relates to a data processing apparatus, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.

[0049] Figure 1 A flowchart of a data processing method provided according to an embodiment of the present specification is shown, which specifically includes the following steps:

[0050] Step 102: Obtain the data to be stored and the identifier of the file to be stored of the data to be stored.

[0051] In one or more embodiments of the present specification, the data processing method is applied to a data processing system. Figure 2 , Figure 2 FIG. 1 shows an architecture diagram of a data processing system provided according to an embodiment of this specification. Figure 2 As shown, the data processing system includes two subsystems, namely the first subsystem and the second subsystem. The first subsystem and the second subsystem are two sets of subsystems that operate independently of each other, and a communication connection is established between the first subsystem and the second subsystem. Two CPUs (Central Processing Units) are deployed in the first subsystem and the second subsystem, respectively, and each CPU can independently and synchronously perform the same calculation or processing task. Each CPU has its own memory for data storage ( Figure 2 not shown).

[0052] In practical applications, data is particularly important in various technical fields. After data is generated or changed, it needs to be recorded and stored to avoid data loss. However, in the process of recording and storing data, data loss may also occur due to system failure or storage interruption.

[0053] Among them, the data to be stored refers to all data of any data type that needs to be stored after the data is updated. For example, security data, computer data, etc. Taking security data as an example, in the field of rail transit technology, data such as track layout, train position, and signal status are all security data that need to be stored, and track layout data, train position data, and signal status data are data of different data types to be stored. Furthermore, taking train position data as an example, there are n1 train position data stored in the data processing system. After the train position data is updated, there are n2 pieces (including the n1 pieces of data that have been stored), then these n2 pieces of train position data need to be updated to the data processing system, that is, the n2 pieces of train position data after the data update are the data to be stored.

[0054] The identifier of the file to be stored refers to the identifier of a data file that can be used to store the data to be stored or the name of the data file. The identifier of the file to be stored can be used to determine the data file that can be used to store the data to be stored.

[0055] Specifically, when data to be stored of any data type is updated, or there is other data storage demand, the data to be stored and the file identifier to be stored corresponding to the data to be stored are obtained, so that in the subsequent process, the data file used to store the data to be stored is determined based on the file identifier to be stored.

[0056] Step 104: Determine a first file to be stored and a second file to be stored of the data to be stored according to the identifier of the file to be stored.

[0057] In practical applications, in order to avoid data loss due to system failure or interruption of the data storage process, two data files can be created in the memory corresponding to each CPU of the data processing system to store data of the same data type, so as to achieve data redundancy backup of the data to be stored in the memory corresponding to one CPU. Therefore, in one or more embodiments provided in this specification, two data files that can be used to store the data to be stored can be determined according to the identifier of the file to be stored.

[0058] The first file to be stored and the second file to be stored refer to two data files in any memory of the data processing system, and both the first file to be stored and the second file to be stored store historical storage data corresponding to the data to be stored, and the first file update timestamp of the first file to be stored is different from the second file update timestamp of the second file to be stored. It should be noted that, since the first file update timestamp of the first file to be stored is different from the second file update timestamp of the second file to be stored, the historical storage data stored in the first file to be stored is different from the historical storage data stored in the second file to be stored.

[0059] The first file update timestamp is the timestamp when the data of the first file to be stored is updated; the second file update timestamp is the timestamp when the data of the second file to be stored is updated.

[0060] Specifically, after obtaining the to-be-stored file identifier of the to-be-stored data, the first to-be-stored file and the second to-be-stored file of the to-be-stored data can be determined in any memory of the data processing system according to the to-be-stored file identifier. As described above, each CPU of the data processing system can independently and synchronously perform the same calculation or processing task. Therefore, in actual applications, the above operation flow and subsequent operation flows are synchronously performed in each CPU of the data processing system.

[0061] Step 106: Determine a target storage file for the data to be stored in the first file to be stored and the second file to be stored.

[0062] In order to avoid data loss due to system failure or interruption of the data storage process, after determining the first file to be stored and the second file to be stored, the data update operation can be performed only on one of the files to be stored, that is, the data to be stored can be updated to one of the first file to be stored and the second file to be stored. In this way, even if a system failure or an interruption of the data storage process occurs, only the data in the file to be stored that is undergoing the data update operation will be affected. Since the other file to be stored has not undergone the data update operation, the data in the other file to be stored is still valid and available, thus avoiding data loss.

[0063] Based on this, after determining the first file to be stored and the second file to be stored of the data to be stored, a target storage file can be determined from the first file to be stored and the second file to be stored to update the data to be stored into the target storage file.

[0064] The target storage file refers to a file to be stored for updating the data to be stored, that is, the target storage file is a file to be stored for writing the data to be stored. The specific implementation method of determining the target storage file from the first file to be stored and the second file to be stored is as follows:

[0065] In a specific implementation manner provided in this specification, determining a target storage file of the data to be stored in the first file to be stored and the second file to be stored includes:

[0066] Acquire first update information of the first file to be stored and second update information of the second file to be stored;

[0067] According to the first update information and the second update information, a target storage file of the data to be stored is determined in the first file to be stored and the second file to be stored.

[0068] Since the historical storage data stored in the first file to be stored and the historical storage data stored in the second file to be stored are different, in order to make the storage data available for effective use as much as possible, the file to be stored that stores less historical storage data among the first file to be stored and the second file to be stored can be determined as the target storage file. Therefore, in the process of determining the target storage file in the first file to be stored and the second file to be stored, it can be determined specifically according to the update status of the first file to be stored and the second file to be stored.

[0069] The first update information is the update information corresponding to the first file to be stored, which may specifically include the first file update timestamp, file update mark information, file update identification information, file update quantity information, etc. of the first file to be stored. The second update information is the update information corresponding to the second file to be stored, which may specifically include the second file update timestamp, file update mark information, file update identification information, file update quantity information, etc. of the second file to be stored.

[0070] File update mark information is used to characterize whether a data file is the later updated data file among the two data files corresponding to data of any data type. The file update mark information can be determined based on the file update timestamp of the data file. Taking the train position data as an example, the first file to be stored and the second file to be stored corresponding to the train position data are data file 1 and data file 2, respectively. Among them, the file update timestamp of data file 1 is later than the file update timestamp of data file 2. It can be determined that data file 1 is updated later than data file 2. Then, the update information of data file 1 contains file update mark information, and the update information of data file 2 does not contain file update mark information.

[0071] The file update identification information refers to the update information of the file identification of the data file, and the file update identification information records the historical file identifications of the data file. The file update quantity information refers to the update information of the data quantity of the data file, and the file update quantity information records the historical data quantity stored in the data file.

[0072] Specifically, after determining the first file to be stored and the second file to be stored of the data to be stored, first update information of the first file to be stored and second update information of the second file to be stored are respectively obtained, and based on the first update information and the second update information, among the first file to be stored and the second file to be stored, the file to be stored that is updated earlier is determined to be the target storage file.

[0073] The update time of the first file to be stored and the second file to be stored can be determined based on the first file update timestamp of the first file to be stored and the second file update timestamp of the second file to be stored, or based on whether the first file to be stored and the second file to be stored have file update mark information, or based on the amount of data stored in the first file to be stored and the amount of data stored in the second file to be stored. The following further describes the implementation method of determining the target storage file.

[0074] In a specific implementation manner provided in this specification, determining a target storage file of the data to be stored in the first file to be stored and the second file to be stored according to the first update information and the second update information includes:

[0075] Determine a first file update timestamp of the first file to be stored in the first update information, and determine a second file update timestamp of the second file to be stored in the second update information;

[0076] When the first file update timestamp is less than the second file update timestamp, determining the first file to be stored as the target storage file of the data to be stored;

[0077] In a case where the first file update timestamp is greater than the second file update timestamp, the second file to be stored is determined as the target storage file of the data to be stored.

[0078] Specifically, after obtaining the first update information of the first file to be stored and the second update information of the second file to be stored, the file update timestamp of the first file to be stored, i.e., the first file update timestamp, can be determined in the first update information, and the file update timestamp of the second file to be stored, i.e., the second file update timestamp, can be determined in the second update information, and the first file update timestamp and the second file update timestamp can be compared. If the first file update timestamp is less than the second file update timestamp, it means that the update time of the first file to be stored is earlier than the update time of the second file to be stored, and therefore, the first file to be stored can be determined as the target storage file; if the first file update timestamp is greater than the second file update timestamp, it means that the update time of the first file to be stored is later than the update time of the second file to be stored, and therefore, the second file to be stored can be determined as the target storage file.

[0079] For example, the first file to be stored and the second file to be stored are determined to be data file 1 and data file 2 respectively, and the file update timestamp of data file 1 is smaller than the file update timestamp of data file 2, which means that the update time of data file 1 is earlier than the update time of data file 2, and data file 1 is determined as the target storage file.

[0080] Since the update information of the file to be stored also records the file update mark information of the file to be stored, in order to improve the processing efficiency of determining the target storage file, the target storage file can also be determined according to the file update mark information.

[0081] In another specific implementation manner provided in this specification, determining a target storage file of the data to be stored in the first file to be stored and the second file to be stored according to the first update information and the second update information includes:

[0082] In a case where the first update information contains file update mark information, determining the second file to be stored as a target storage file of the data to be stored;

[0083] In a case where the second update information contains file update mark information, the first file to be stored is determined as a target storage file of the data to be stored.

[0084] If there is file update mark information in the first update information of the first file to be stored, it means that the update time of the first file to be stored is later than the update time of the second file to be stored. Therefore, the second file to be stored can be determined as the target storage file; if there is file update mark information in the second update information of the second file to be stored, it means that the update time of the second file to be stored is later than the update time of the first file to be stored. Therefore, the first file to be stored can be determined as the target storage file.

[0085] Continuing with the above example, the first file to be stored and the second file to be stored are data file 1 and data file 2 respectively, and there is file update mark information in the update information of data file 2, which means that the update time of data file 2 is later than the update time of data file 1, and data file 1 is determined as the target storage file.

[0086] By determining the target storage file from the first file to be stored and the second file to be stored, the data to be stored can be updated to the target storage file in the subsequent process, and the other file to be stored will not perform data update operations. Therefore, even if a system failure occurs or the data update process is interrupted, resulting in data loss in the target storage file, the data in the other file to be stored can be used, thereby avoiding data loss. Furthermore, by determining the target storage file through the first update information of the first file to be stored and the second update information of the second file to be stored, the data stored in the target storage file can be less than the data in the other file to be stored, thereby achieving more valid data available.

[0087] Step 108: Update the target storage file based on the data to be stored.

[0088] After the target storage file is determined in the first file to be stored and the second file to be stored, the data to be stored can be updated to the target storage file, thereby realizing data update of the data to be stored.

[0089] In actual applications, the target storage file stores historical storage data corresponding to the data to be stored. However, since it is uncertain whether the target storage file has experienced system failures or data update interruptions, the accuracy of the historical storage data stored in the target storage file cannot be determined. The data to be stored is all data of any data type that needs to be stored after the data is updated, that is, the data to be stored includes historical storage data. Based on this, the target storage file and the historical storage data in the target storage file can be deleted, and a new file can be created to store the data to be stored.

[0090] Therefore, in a specific implementation manner provided in this specification, updating the target storage file based on the data to be stored includes:

[0091] Deleting the target storage file;

[0092] Based on the to-be-stored file identifier, create a target storage empty file;

[0093] The data to be stored is stored in the target storage empty file to obtain an updated storage file.

[0094] The target storage empty file refers to an empty file newly created based on the to-be-stored file identifier, and is used to store the to-be-stored data. The updated storage file refers to a data file obtained after storing the to-be-stored data in the target storage empty file.

[0095] Specifically, after determining the target storage file, the target storage file is deleted, and a target storage empty file is created with the file identifier to be stored, the target storage empty file is opened, and the data to be stored is stored in the target storage empty file, so that the updated storage file after updating the data to be stored can be obtained.

[0096] In actual applications, there may be a situation where the data to be stored is stored for the first time. At this time, there is no data file for storing the data to be stored in the data processing system. Therefore, it is necessary to create a corresponding empty file for the data to be stored to store the data.

[0097] In a specific implementation manner provided in this specification, after obtaining the data to be stored and the identifier of the file to be stored of the data to be stored, the method further includes:

[0098] According to the to-be-stored file identifier, query whether the to-be-stored data has a to-be-stored file;

[0099] If it does not exist, creating a first empty file to be stored and a second empty file to be stored based on the identifier of the file to be stored;

[0100] The data to be stored is stored in the first empty file to be stored or the second empty file to be stored.

[0101] The first empty file to be stored and the second empty file to be stored are two empty files created for the data to be stored based on the identifier of the file to be stored, and are used for performing data redundancy backup of the data to be stored.

[0102] Specifically, after obtaining the identification of the file to be stored of the data to be stored, it is queried in the data processing system whether there is a file to be stored corresponding to the data to be stored. If not, it means that the data to be stored is stored for the first time in the data processing system. Therefore, a first empty file to be stored and a second empty file to be stored can be created in each memory of the data processing system respectively, and the data to be stored can be stored in any one of the first empty file to be stored and the second empty file to be stored.

[0103] In actual applications, the data to be stored is updated to the data processing system, which is synchronously executed by each CPU in the data processing system. Therefore, the data to be stored will be synchronously updated to the memory corresponding to each CPU. After each CPU completes the update of the data to be stored, it is also necessary to verify the storage results of the memory corresponding to each CPU to determine whether the data stored in the memory corresponding to each CPU is consistent.

[0104] In a specific implementation manner provided in this specification, after updating the target storage file based on the data to be stored, the method further includes:

[0105] Obtaining first storage file information of a first updated storage file and second storage file information of a second updated storage file, wherein the first updated storage file is stored in a first memory, the second updated storage file is stored in a second memory, the first updated storage file and the second updated storage file store the data to be stored, and the first memory and the second memory are deployed in the same subsystem of the data processing system;

[0106] Verifying whether the first stored file information is consistent with the second stored file information;

[0107] If the first storage file information and the second storage file information are verified to be consistent, confirming that the data to be stored is stored successfully;

[0108] When the first storage file information and the second storage file information are verified to be inconsistent, it is confirmed that the storage of the data to be stored has failed.

[0109] Since each CPU is deployed in two subsystems of the data processing system, the storage results of the memories corresponding to each CPU in the same subsystem may be verified first, and then the storage results of the two subsystems may be further verified.

[0110] The first updated storage file refers to an updated storage file stored in the first memory, and the second updated storage file refers to an updated storage file stored in the second memory. The first memory and the second memory are two memories of any subsystem in the data processing system.

[0111] The first storage file information refers to the storage file information of the first updated storage file; the second storage file information refers to the storage file information of the second updated storage file. The storage file information may specifically include the file identifier of the updated storage file, the file status of the updated storage file, and the data stored in the updated storage file.

[0112] Specifically, the first storage file information of the first updated storage file is obtained, specifically including the file identification, file status and data stored in the first updated storage file, and the second storage file information of the second updated storage file is obtained, specifically including the file identification, file status and data stored in the second updated storage file. The file identification, file status and data stored in the first updated storage file are verified to be consistent with the file identification, file status and data stored in the second updated storage file. If all are consistent, it is confirmed that the data to be stored is successfully stored in the subsystem; if at least one of the file identification, file status and data stored in the file is inconsistent, it is confirmed that the data to be stored has failed to be stored in the subsystem.

[0113] Further, see Figure 3 , Figure 3 FIG. 1 shows a processing flow chart of a data processing method in a same subsystem according to an embodiment of the present specification. Figure 3 As shown, taking any subsystem in the data processing system as an example, in the same subsystem, CPU1 obtains the data to be stored and the identification of the file to be stored of the data to be stored, and determines the first file to be stored and the second file to be stored of the data to be stored according to the identification of the file to be stored. According to the update time of the first file to be stored and the update time of the second file to be stored, the target storage file is determined in the first file to be stored and the second file to be stored, and the target storage file is updated based on the data to be stored, and the first storage file information of the updated target storage file is obtained, that is, the first storage file information of the first updated storage file ( Figure 3 (not shown in the figure). In this process, CPU2 synchronously executes the above operations to obtain the second storage file information of the second updated storage file. Check whether the first storage file information is consistent with the second storage file information. If they are consistent, it means that the data to be stored is successfully stored in the subsystem. If they are inconsistent, it means that the data to be stored fails to be stored in the subsystem, and the subsystem needs to be shut down. After the subsystem is shut down, the subsystem can be repaired by manual intervention.

[0114] Furthermore, after the verification of the two subsystems in the data processing system is completed, in order to ensure the consistency of the data stored in the two subsystems, the storage results of the two subsystems also need to be verified.

[0115] Based on this, in a specific implementation provided in this specification, the data processing system includes a first subsystem and a second subsystem;

[0116] The method further comprises:

[0117] Acquire a first data storage result of the first subsystem and a second data storage result of the second subsystem;

[0118] A system processing result of the data processing system is determined according to the first data storage result and the second data storage result.

[0119] The first data storage result is the data storage result of the first subsystem, including storage success or storage failure; the second data storage result is the data storage result of the second subsystem, including storage success or storage failure. The system processing result is the processing result of the data processing system, including success or failure.

[0120] Specifically, after determining the first data storage result of the first subsystem and the second data storage result of the second subsystem, the system processing result of the data processing system can be determined based on the first data storage result and the second data storage result, so as to determine the further processing flow of the data processing system based on the system processing result.

[0121] In a specific implementation manner provided in this specification, the first subsystem is a main system, and the second subsystem is a backup system;

[0122] Determining a system processing result of the data processing system according to the first data storage result and the second data storage result includes:

[0123] When the first data storage result is storage success and the second data storage result is storage success, determining that the system processing result of the data processing system is success, and verifying whether the data stored in the first subsystem is consistent with the data stored in the second subsystem;

[0124] When the first data storage result is a storage success and the second data storage result is a storage failure, determining that the system processing result of the data processing system is a success, and re-storing the data to be stored in the second subsystem;

[0125] When the first data storage result is storage failure and the second data storage result is storage failure, determining that the system processing result of the data processing system is failure, and performing downtime processing on the first subsystem and the second subsystem;

[0126] When the first data storage result is storage failure and the second data storage result is storage success, the first subsystem is downtime processed, and the second subsystem is determined as the first subsystem.

[0127] In practical applications, the data processing system specifically includes a main system and a backup system. The main system is the subsystem that bears the main workload of the data processing system under normal operation; the backup system is the backup system of the main system, which can synchronize the data and status of the main system in real time, and take over the work of the main system when the main system fails or needs maintenance, to ensure the normal operation of the data processing system.

[0128] Specifically, if the first data storage result is a successful storage and the second data storage result is a successful storage, that is, the data to be stored is successfully stored in both the main system and the backup system, then it means that the system processing result of this data processing system is successful. At this time, the backup system needs to verify the consistency of the data stored between the main system and the backup system. If the verification is inconsistent, it means that an abnormality has occurred in the backup system, and the backup system is downtime processed to ensure the data security of the data processing system. If the verification is consistent, it means that neither the main system nor the backup system has an abnormality.

[0129] If the first data storage result is a successful storage and the second data storage result is a failed storage, that is, the data to be stored is successfully stored in the primary system but failed to be stored in the backup system, since the backup system does not output data to the outside, it means that the system processing result of the data processing system is successful. This time, the data to be stored can be stored again in the backup system. If the data to be stored is successfully stored in the backup system, the operation continues through the data and status of the primary system; if the data to be stored fails to be stored in the backup system, the backup system is down, and the backup system can be repaired later through manual intervention.

[0130] If the first data storage result is storage failure and the second data storage result is storage failure, that is, the data to be stored fails to be stored in both the primary system and the backup system, then it means that the system processing result of this data processing system is failure. At this time, both the primary system and the backup system need to be downtime processed.

[0131] If the first data storage result is a storage failure and the second data storage result is a storage success, that is, the data to be stored fails to be stored in the main system but is successfully stored in the backup system, the main system is down and the backup system is determined as the new main system. Since there is only one subsystem in the data processing system at this time, there is no need to verify the data storage results between the main and backup systems, and the system processing result of the data processing system is successful. Furthermore, after the original main system is successfully repaired, the original main system continues to run as the main system in the data processing system, and the new main system is downgraded to the original backup system.

[0132] After verifying the first data storage result of the first subsystem and the second data storage result of the second subsystem, continue to verify the storage result of the first subsystem and the storage result of the second subsystem based on the first data storage result and the second data storage result, so as to determine the system processing result of the data processing system, and further determine the subsequent processing flow of the data processing system according to the system processing result, so as to ensure the security of the data processing system and improve the reliability of storage of data stored in the data processing system.

[0133] The data processing method provided in the present specification is applied to a data processing system, including: obtaining data to be stored and a file identifier to be stored of the data to be stored; determining a first file to be stored and a second file to be stored of the data to be stored according to the file identifier to be stored, wherein the first file to be stored and the second file to be stored are stored in a same memory of the data processing system, a first file update timestamp of the first file to be stored is different from a second file update timestamp of the second file to be stored, and the first file to be stored and the second file to be stored store historical storage data corresponding to the data to be stored; determining a target storage file of the data to be stored in the first file to be stored and the second file to be stored; and updating the target storage file based on the data to be stored.

[0134] An embodiment of the present specification realizes that, in the process of storing the data to be stored, only one of the two files to be stored of the data to be stored is updated, thereby ensuring that no matter whether a system failure or an interruption in the data update process occurs, the stored data in at least one file to be stored is available for use, avoiding data loss and improving the security of data storage. In the event that any subsystem in the data processing system is abnormal, the abnormal subsystem is downtime processed so that it can be repaired through manual intervention to ensure the security of the data processing system.

[0135] The following combination Figure 4 Taking the data processing method provided in this specification as an example of applying it to a two-by-two-take-two security platform, the data processing method is further described. Figure 4 A processing flow chart of a data processing method applied to a two-by-two-take-two security platform provided in an embodiment of this specification is shown, such as Figure 4 As shown, a main system and a backup system are deployed in the two-by-two security platform, and two CPUs are deployed in the main system and the backup system, respectively. In the process of updating the data to be stored to the two-by-two security platform, each CPU synchronously processes the data to be stored. Taking CPU1 in the main system as an example, according to the to-be-stored file identifier of the data to be stored, two to-be-stored files corresponding to the to-be-stored data are determined in the memory corresponding to CPU1, which are file A and file B. Since the file update timestamp of file A is greater than the file update timestamp of file B, or since there is file update mark information in the update information of file A, file B can be determined as the target storage file. Delete the stored file B, create a new file B with the to-be-stored file identifier, and update the data to be stored to the new file B. In this process, CPU2 in the main system synchronously performs the above operations and also updates the data to be stored to the new file B. Based on this, the file identifier, file status, and data stored in the new file B in CPU1, and the file identifier, file status, and data stored in the new file B in CPU2 are checked for consistency. If the verification is consistent, the data to be stored is successfully stored in the main system; if the verification is inconsistent, the data to be stored fails to be stored in the main system. During the above operation, the backup system performs consistency verification on the file identification, file status, and data stored in the new file B in CPU1, and the file identification, file status, and data stored in the new file B in CPU2 based on the same method, and obtains the verification result. After the verification of the main system and the backup system is completed, the storage results between the main and backup systems are verified according to the verification results of the main system and the verification results of the backup system to determine the system processing results of the two-by-two security platform, and the subsequent processing flow of the two-by-two security platform is determined according to the system processing results of the two-by-two security platform.

[0136] An embodiment of the present specification realizes, based on a two-by-two-take-two security platform, that in the process of storing the data to be stored, two files to be stored for the data to be stored are determined, and the data to be stored is stored in only one file to be stored, so as to solve the problem of data loss caused by storage failure or storage anomaly of the data to be stored, and improve the security and reliability of data storage.

[0137] Corresponding to the above method embodiment, this specification also provides a data processing device embodiment, Figure 5 FIG. 1 shows a schematic diagram of the structure of a data processing device provided by an embodiment of the present specification. Figure 5 As shown, the device is applied to a data processing system, comprising:

[0138] An acquisition module 502 is configured to acquire data to be stored and an identifier of a file to be stored of the data to be stored;

[0139] A first determining module 504 is configured to determine, according to the to-be-stored file identifier, a first to-be-stored file and a second to-be-stored file of the to-be-stored data, wherein the first to-be-stored file and the second to-be-stored file are stored in a same memory of the data processing system, a first file update timestamp of the first to-be-stored file is different from a second file update timestamp of the second to-be-stored file, and the first to-be-stored file and the second to-be-stored file store historical storage data corresponding to the to-be-stored data;

[0140] A second determining module 506 is configured to determine a target storage file for the data to be stored in the first to-be-stored file and the second to-be-stored file;

[0141] The updating module 508 is configured to update the target storage file based on the data to be stored.

[0142] Optionally, the second determining module 506 is further configured to:

[0143] Acquire first update information of the first file to be stored and second update information of the second file to be stored;

[0144] According to the first update information and the second update information, a target storage file of the data to be stored is determined in the first file to be stored and the second file to be stored.

[0145] Optionally, the second determining module 506 is further configured to:

[0146] Determine a first file update timestamp of the first file to be stored in the first update information, and determine a second file update timestamp of the second file to be stored in the second update information;

[0147] When the first file update timestamp is less than the second file update timestamp, determining the first file to be stored as the target storage file of the data to be stored;

[0148] In a case where the first file update timestamp is greater than the second file update timestamp, the second file to be stored is determined as the target storage file of the data to be stored.

[0149] Optionally, the second determining module 506 is further configured to:

[0150] In a case where the first update information contains file update mark information, determining the second file to be stored as a target storage file of the data to be stored;

[0151] In a case where the second update information contains file update mark information, the first file to be stored is determined as a target storage file of the data to be stored.

[0152] Optionally, the updating module 508 is further configured to:

[0153] Deleting the target storage file;

[0154] Based on the to-be-stored file identifier, create a target storage empty file;

[0155] The data to be stored is stored in the target storage empty file to obtain an updated storage file.

[0156] Optionally, the device further includes a creation module configured to:

[0157] According to the to-be-stored file identifier, query whether the to-be-stored data has a to-be-stored file;

[0158] If it does not exist, creating a first empty file to be stored and a second empty file to be stored based on the identifier of the file to be stored;

[0159] The data to be stored is stored in the first empty file to be stored or the second empty file to be stored.

[0160] Optionally, the device further includes an information verification module configured to:

[0161] Obtaining first storage file information of a first updated storage file and second storage file information of a second updated storage file, wherein the first updated storage file is stored in a first memory, the second updated storage file is stored in a second memory, the first updated storage file and the second updated storage file store the data to be stored, and the first memory and the second memory are deployed in the same subsystem of the data processing system;

[0162] Verifying whether the first stored file information is consistent with the second stored file information;

[0163] If the first storage file information and the second storage file information are verified to be consistent, confirming that the data to be stored is stored successfully;

[0164] When the first storage file information and the second storage file information are verified to be inconsistent, it is confirmed that the storage of the data to be stored has failed.

[0165] Optionally, the data processing system includes a first subsystem and a second subsystem;

[0166] The device further includes a third determining module, configured to:

[0167] Acquire a first data storage result of the first subsystem and a second data storage result of the second subsystem;

[0168] A system processing result of the data processing system is determined according to the first data storage result and the second data storage result.

[0169] Optionally, the first subsystem is a main system, and the second subsystem is a backup system;

[0170] The third determining module is further configured to:

[0171] When the first data storage result is storage success and the second data storage result is storage success, determining that the system processing result of the data processing system is success, and verifying whether the data stored in the first subsystem is consistent with the data stored in the second subsystem;

[0172] When the first data storage result is a storage success and the second data storage result is a storage failure, determining that the system processing result of the data processing system is a success, and re-storing the data to be stored in the second subsystem;

[0173] When the first data storage result is storage failure and the second data storage result is storage failure, determining that the system processing result of the data processing system is failure, and performing downtime processing on the first subsystem and the second subsystem;

[0174] When the first data storage result is storage failure and the second data storage result is storage success, the first subsystem is downtime processed, and the second subsystem is determined as the first subsystem.

[0175] The data processing device provided in the present specification is applied to a data processing system, including: an acquisition module, configured to acquire data to be stored and a file identifier to be stored of the data to be stored; a first determination module, configured to determine a first file to be stored and a second file to be stored of the data to be stored according to the file identifier to be stored, wherein the first file to be stored and the second file to be stored are stored in the same memory of the data processing system, a first file update timestamp of the first file to be stored is different from a second file update timestamp of the second file to be stored, and the first file to be stored and the second file to be stored store historical storage data corresponding to the data to be stored; a second determination module, configured to determine a target storage file of the data to be stored in the first file to be stored and the second file to be stored; and an update module, configured to update the target storage file based on the data to be stored.

[0176] An embodiment of the present specification realizes that, in the process of storing the data to be stored, only one of the two files to be stored of the data to be stored is updated, thereby ensuring that no matter whether a system failure or an interruption in the data update process occurs, the stored data in at least one file to be stored is available for use, avoiding data loss and improving the security of data storage. In the event that any subsystem in the data processing system is abnormal, the abnormal subsystem is downtime processed so that it can be repaired through manual intervention to ensure the security of the data processing system.

[0177] The above is a schematic scheme of a data processing device of this embodiment. It should be noted that the technical scheme of the data processing device and the technical scheme of the above data processing method belong to the same concept, and the details of the technical scheme of the data processing device that are not described in detail can be referred to the description of the technical scheme of the above data processing method.

[0178] Figure 6 A flowchart of another data processing method provided according to an embodiment of this specification is shown, which specifically includes the following steps:

[0179] Step 602: In response to a data synchronization request, read a first file to be synchronized and a second file to be synchronized.

[0180] In one or more embodiments of this specification, the data processing method is applied to a data processing system, the data processing system includes a first subsystem and a second subsystem, and the data processing system is the same as the data processing system in the above data processing method. For the explanation of the data processing system, please refer to the description of the data processing system in the above data processing method, and this specification will not repeat it here.

[0181] The data synchronization request refers to a request for synchronizing the data stored in the first subsystem and the second subsystem of the data processing system. The data synchronization request carries a target synchronization file identifier. The target synchronization file identifier refers to the identifier of the data file that needs to be synchronized or the name of the data file.

[0182] Since two data files are created for the data to be stored in the process of storing the data in the data processing system, it is necessary to determine the two data files corresponding to the data of each data type during the data synchronization process to carry out the subsequent data synchronization process.

[0183] The first file to be synchronized and the second file to be synchronized refer to two data files in any memory of the first subsystem, the first file to be synchronized or the second file to be synchronized stores target synchronization data, and the first file update timestamp of the first file to be synchronized and the second file update timestamp of the second file to be synchronized are different. The first file to be synchronized and the second file to be synchronized are determined according to the target synchronization file identifier. The target synchronization data refers to the data that needs to be synchronized.

[0184] Specifically, after receiving the data synchronization request, the data processing system reads the first file to be synchronized and the second file to be synchronized in the first subsystem based on the target synchronization file identifier in the data synchronization request. Since each CPU of the data processing system can independently and synchronously perform the same calculation or processing task, in actual applications, the above operation flow and subsequent operation flows are synchronously performed in each CPU of the data processing system.

[0185] Furthermore, the data synchronization request may be triggered each time the data to be stored is updated in the data processing system, or may be manually triggered by a user, or a data synchronization cycle may be set for the data processing system to automatically trigger the data synchronization request at intervals of the data synchronization cycle.

[0186] Step 604: Determine a first target synchronization file among the first files to be synchronized and the second files to be synchronized.

[0187] Data synchronization is the synchronization of data stored in the first subsystem and data stored in the second subsystem. Therefore, it is necessary to determine the data files used for data synchronization in the first subsystem and the second subsystem respectively, and perform data synchronization through these two data files to achieve data synchronization between the first subsystem and the second subsystem.

[0188] In a data processing system, the data files stored in the memories corresponding to each CPU should be the same. Before synchronizing data between the first subsystem and the second subsystem, it is necessary to first determine the data files that can be used for data synchronization in the memories corresponding to each CPU in the first subsystem and the second subsystem.

[0189] Based on this, after reading the first file to be synchronized and the second file to be synchronized, the data files that need to be synchronized can be determined in the first file to be synchronized and the second file to be synchronized. At this time, the data files that need to be synchronized will also be determined in another memory in the first subsystem, and then the first target file to be synchronized is determined in the two data files that need to be synchronized determined in the first subsystem.

[0190] The first target synchronization file refers to a data file that needs to be synchronized in the first subsystem. The specific implementation method of determining the first target synchronization file in the first file to be synchronized and the second file to be synchronized is as follows:

[0191] In a specific implementation manner provided in this specification, determining a first target synchronization file in the first file to be synchronized and the second file to be synchronized includes:

[0192] Determine a first candidate synchronization file among the first file to be synchronized and the second file to be synchronized;

[0193] Acquire a second candidate synchronization file corresponding to the first candidate synchronization file, wherein the first candidate synchronization file and the second candidate synchronization file are respectively stored in different memories of the first subsystem;

[0194] Verifying whether the first candidate synchronization file and the second candidate synchronization file are consistent;

[0195] When the first candidate synchronization file and the second candidate synchronization file are verified to be consistent, the first candidate synchronization file or the second candidate synchronization file is determined as the first target synchronization file.

[0196] For data of any data type, since the data stored in two data files stored in the same memory are different, on the basis of ensuring data synchronization, in order to further save computing resources and improve the efficiency of data synchronization, the data file with a later update time can be determined in the two data files and data synchronization can be performed on the data file.

[0197] Among them, the first candidate synchronization file refers to a data file determined in the memory corresponding to any CPU for data synchronization. The first candidate synchronization file is the file to be synchronized that is updated later than the first file to be synchronized and the second file to be synchronized. The second candidate synchronization file refers to a candidate synchronization file stored in the same subsystem as the first candidate synchronization file but in a different memory. That is, the first candidate synchronization file and the second candidate synchronization file are two candidate synchronization files in different memories in the same subsystem.

[0198] Specifically, after reading and obtaining the first file to be synchronized and the second file to be synchronized, the first candidate synchronization file is determined in the first file to be synchronized and the second file to be synchronized. The second candidate synchronization file corresponding to the first candidate synchronization file is obtained, and it is verified whether the first candidate synchronization file and the second candidate synchronization file are consistent. If they are consistent, since the first candidate synchronization file is the same as the second candidate synchronization file, the first candidate synchronization file or the second candidate synchronization file can be determined as the first target synchronization file.

[0199] Furthermore, in order to facilitate subsequent use and processing based on the determined first target synchronization file, the first target synchronization file may be marked, as follows:

[0200] In a specific implementation manner provided in this specification, after determining the first candidate synchronization file or the second candidate synchronization file as the first target synchronization file, the method further includes:

[0201] The first target synchronization file is marked to generate file update mark information of the first target synchronization file.

[0202] After the first target synchronization file is determined, the first target synchronization file is marked and file update mark information of the first target synchronization file is generated. To facilitate the management of the file update mark information, the file update mark information can be recorded in the update information of the first target synchronization file.

[0203] If the first candidate synchronization file and the second candidate synchronization file are inconsistent in verification, the reading process of the first candidate synchronization file and the second candidate synchronization file fails, and the data processing system is shut down.

[0204] As described above, the first candidate synchronization file is the file to be synchronized that is updated later than the first file to be synchronized and the second file to be synchronized. Therefore, the first candidate synchronization file can be determined from the first file to be synchronized and the second file to be synchronized according to the update time of the first file to be synchronized and the update time of the second file to be synchronized.

[0205] In a specific implementation manner provided in this specification, determining a first candidate synchronization file in the first file to be synchronized and the second file to be synchronized includes:

[0206] Determine a first file update timestamp of the first file to be synchronized and a second file update timestamp of the second file to be synchronized;

[0207] Determine a candidate synchronization file to be determined in the first file to be synchronized and the second file to be synchronized according to the first file update timestamp and the second file update timestamp;

[0208] Determine whether the file status of the candidate synchronization file to be determined is an available status;

[0209] In a case where the file status of the to-be-determined candidate synchronization file is an available status, the to-be-determined candidate synchronization file is determined to be a first candidate synchronization file.

[0210] Specifically, the first file update timestamp of the first file to be synchronized and the second file update timestamp of the second file to be synchronized are determined respectively, and the candidate synchronization file to be determined is determined in the first file to be synchronized and the second file to be synchronized according to the first file update timestamp and the second file update timestamp. Since the first file to be synchronized or the second file to be synchronized may have been broken during the reading of the first file to be synchronized and the second file to be synchronized, or the first file to be synchronized or the second file to be synchronized may be in the process of file operation, at this time, the first file to be synchronized or the second file to be synchronized is in an abnormal file state and cannot be used, that is, the first file to be synchronized or the second file to be synchronized is in an unavailable state. Therefore, after determining the candidate synchronization file to be determined, it is necessary to further determine whether the candidate synchronization file to be determined is in an available state.

[0211] The candidate synchronization file to be determined refers to the file to be synchronized that is updated later between the first file to be synchronized and the second file to be synchronized. The available state is used to indicate that the candidate synchronization file to be determined is in an available state; the unavailable state is used to indicate that the candidate synchronization file to be determined is in an unavailable state. The candidate synchronization file to be determined can be a candidate synchronization file in an available state or a candidate synchronization file in an unavailable state.

[0212] Based on this, after determining the candidate synchronization file to be determined, it is necessary to further determine the file status of the candidate synchronization file to be determined. If the file status of the candidate synchronization file to be determined is an available state, it means that the candidate synchronization file to be determined can be used. At this time, the candidate synchronization file to be determined is determined as the first candidate synchronization file. If the file status of the candidate synchronization file to be determined is an unavailable state, it means that the candidate synchronization file to be determined cannot be used. At this time, the data stored in the candidate synchronization file to be determined cannot be used, and the data processing system is down.

[0213] Furthermore, according to the first file update timestamp and the second file update timestamp, the implementation process of determining the candidate synchronization file to be determined is as follows:

[0214] In a specific implementation manner provided in this specification, determining a candidate synchronization file to be determined in the first file to be synchronized and the second file to be synchronized according to the first file update timestamp and the second file update timestamp includes:

[0215] When the first file update timestamp is greater than the second file update timestamp, determining the first file to be synchronized as a candidate synchronization file to be determined;

[0216] When the first file update timestamp is smaller than the second file update timestamp, the second file to be synchronized is determined as a candidate synchronization file to be determined.

[0217] Specifically, the first file update timestamp and the second file update timestamp are compared. If the first file update timestamp is greater than the second file update timestamp, it means that the update time of the first file to be synchronized is later than the update time of the second file to be synchronized, so the first file to be synchronized can be determined as the candidate synchronization file to be determined; if the first file update timestamp is less than the second file update timestamp, it means that the update time of the first file to be synchronized is earlier than the update time of the second file to be synchronized, so the second file to be synchronized can be determined as the candidate synchronization file to be determined.

[0218] For example, the first file to be synchronized and the second file to be synchronized are determined to be data file P1 and data file P2 respectively, and the file update timestamp of data file P1 is greater than the file update timestamp of data file P2, which means that the update time of data file P1 is later than the update time of data file P2, and data file P1 is determined as the candidate synchronization file to be determined.

[0219] By determining the to-be-synchronized files with later update times as the to-be-determined candidate synchronization files according to the file update timestamp, it is possible to synchronize as much data as possible. After determining the to-be-determined candidate synchronization files, the file status of the to-be-determined candidate synchronization files is further determined to determine whether the to-be-determined candidate synchronization files are available, thereby ensuring the availability of the determined first candidate synchronization file.

[0220] See also Figure 7 , Figure 7 FIG. 2 shows a processing flow chart of another data processing method in the same subsystem according to an embodiment of the present specification. Figure 7 As shown, taking any subsystem in the data processing system as an example, in the same subsystem, CPU1 responds to the data synchronization request, obtains the target synchronization file identifier, and reads the first file to be synchronized and the second file to be synchronized in the memory corresponding to CPU1 according to the target synchronization file identifier, and determines the candidate synchronization file to be determined according to the update time of the first file to be synchronized and the update time of the second file to be synchronized, and determines the candidate synchronization file to be determined as the first candidate synchronization file in combination with the file status of the candidate synchronization file to be determined. In this process, CPU2 in the subsystem synchronously performs the above operations and determines the second candidate synchronization file. Check whether the first candidate synchronization file and the second candidate synchronization file are consistent. If they are consistent, the first candidate synchronization file or the second candidate synchronization file is determined as the first target synchronization file, and the first target synchronization file is marked to generate the file update mark information of the first target synchronization file. If they are inconsistent, it means that the data reading has failed, and the subsystem is down.

[0221] By determining the to-be-synchronized files with later update times as the to-be-determined candidate synchronization files according to the file update timestamp, it is possible to synchronize as much data as possible. After determining the to-be-determined candidate synchronization files, the file status of the to-be-determined candidate synchronization files is further determined to determine whether the to-be-determined candidate synchronization files are available, thereby ensuring the availability of the determined candidate synchronization files. Furthermore, the consistency of the candidate synchronization files in the two storages is verified to determine the target synchronization files in the subsystem.

[0222] Step 606: Acquire a second target synchronization file corresponding to the first target synchronization file, wherein the first target synchronization file is stored in the first subsystem and the second target synchronization file is stored in the second subsystem.

[0223] The second target synchronization file is a data file in the second subsystem that needs to be synchronized.

[0224] The first subsystem and the second subsystem of the data processing system are processed synchronously. After the first target synchronization file of the first subsystem is determined, the second target synchronization file of the second subsystem is obtained.

[0225] Step 608: Perform data synchronization processing between the first subsystem and the second subsystem according to the first target synchronization file and the second target synchronization file.

[0226] After obtaining the first target synchronization file and the second target synchronization file, data synchronization between the first subsystem and the second subsystem can be performed according to the first target synchronization file and the second target synchronization file. The implementation method is as follows:

[0227] In a specific implementation manner provided in this specification, the first subsystem is a main system, and the second subsystem is a backup system;

[0228] Performing data synchronization processing between the first subsystem and the second subsystem according to the first target synchronization file and the second target synchronization file includes:

[0229] Verify whether the first target synchronization file and the second target synchronization file are consistent;

[0230] When the first target synchronization file and the second target synchronization file are verified to be inconsistent, the first target synchronization file is synchronized to the second subsystem.

[0231] After obtaining the first target synchronization file and the second target synchronization file, check whether the first target synchronization file and the second target synchronization file are consistent. If they are consistent, it means that the first target synchronization file read in the first subsystem is consistent with the second target synchronization file read in the second subsystem, that is, the data read in the main system is consistent with the data read in the backup system, and the data processing system can be started normally. If they are inconsistent, it is considered that the data in the second target synchronization file read in the backup system is not the target synchronization data, and the data read in the main system needs to be synchronized to the backup system, that is, the first target synchronization file is synchronized to the backup system.

[0232] Furthermore, in actual applications, the main system is used to bear the main workload when the data processing system is operating normally; the standby system is the backup system of the main system. Therefore, there is no need to synchronize data for the main system. Therefore, the above-mentioned verification process can be executed in the standby system. Specifically, the main system can send the first target synchronization file to the standby system, and the standby system can verify the first target synchronization file and the second target synchronization file, and perform data synchronization between the main system and the standby system.

[0233] After determining the first target synchronization file of the first subsystem and the second target synchronization file of the second subsystem, by performing a consistency check on the first target synchronization file and the second target synchronization file, it can be determined whether the target synchronization data between the first subsystem and the second subsystem are synchronized. If not, data synchronization processing is performed to ensure data consistency between the first subsystem and the second subsystem.

[0234] Another data processing method provided in the present specification is applied to a data processing system, wherein the data processing system includes a first subsystem and a second subsystem; the method includes: in response to a data synchronization request, reading a first file to be synchronized and a second file to be synchronized, wherein the data synchronization request carries a target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are determined according to the target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are stored in a same memory of the data processing system, a first file update timestamp of the first file to be synchronized and a second file update timestamp of the second file to be synchronized are different, and the first file to be synchronized or the second file to be synchronized stores target synchronization data; determining a first target synchronization file in the first file to be synchronized and the second file to be synchronized; obtaining a second target synchronization file corresponding to the first target synchronization file, wherein the first target synchronization file is stored in the first subsystem and the second target synchronization file is stored in the second subsystem; and performing data synchronization processing between the first subsystem and the second subsystem according to the first target synchronization file and the second target synchronization file.

[0235] Another embodiment of the present specification realizes that, in the process of data synchronization between the first subsystem and the second subsystem, one of the two to-be-synchronized files corresponding to the target synchronization data is determined for data synchronization, and the target synchronization file is determined in combination with the available status of the to-be-synchronized files, thereby improving the accuracy of determining the target synchronization file. Based on the two target synchronization files, the first subsystem and the second subsystem are synchronized, thereby improving the consistency and reliability of data synchronization between the first subsystem and the second subsystem.

[0236] The following combination Figure 8 , taking another data processing method provided in this specification applied to a two-by-two-take-two security platform as an example, the data processing method is further described. Figure 8 FIG. 1 shows a processing flow chart of another data processing method applied to a two-by-two-take-two security platform provided in an embodiment of the present specification, such as Figure 8As shown, a main system and a backup system are deployed in the two-by-two-take-two security platform, and two CPUs are deployed in the main system and the backup system, respectively. In the process of data synchronization of the two-by-two-take-two security platform, each CPU performs processing synchronously. Taking CPU1 in the main system as an example, according to the target synchronization file identifier, two files to be synchronized that need to be synchronized are determined in the memory corresponding to CPU1, which are file A and file B. When the file update timestamp of file A is greater than the file update timestamp of file B, and file A is in an available state, file A is determined to be the first candidate synchronization file. In this process, CPU2 of the main system synchronously performs the above operations, and determines file A as the second candidate synchronization file in the memory corresponding to CPU2. Check whether the two files A are consistent, that is, check whether the first candidate synchronization file is consistent with the second candidate synchronization file. If they are consistent, file A is determined as the first target synchronization file, and the first target synchronization file stores the target synchronization data. In this process, the backup system will also complete the consistency check of the two files A and determine the second target synchronization file. The main system sends the first target synchronization file, including the target synchronization data, to the backup system, and the backup system performs consistency check on the first target synchronization file and the second target synchronization file. If the first target synchronization file is consistent with the second target synchronization file, the two-by-two-take-two security platform starts and runs normally; if they are inconsistent, it means that the data stored in the second target synchronization file in the backup system is not the target synchronization data, and the target synchronization data sent by the main system needs to be synchronized to the backup system, specifically to the two files to be synchronized (file A) in the backup system. In this way, the synchronization of the target synchronization data between the main system and the backup system can be completed.

[0237] Another embodiment provided in this specification realizes that, in the process of data synchronization between the main system and the backup system based on the two-by-two-take-two security platform, one to-be-synchronized file corresponding to the target synchronization data is determined for data synchronization, and the target synchronization file is determined in combination with the available status of the to-be-synchronized file, thereby improving the accuracy of determining the target synchronization file. According to the two target synchronization files, the main system and the backup system are synchronized, thereby improving the consistency and reliability of data synchronization between the main system and the backup system.

[0238] Corresponding to the above method embodiment, this specification also provides another data processing device embodiment, Fig. 9 FIG. 2 shows a schematic diagram of the structure of another data processing device provided by an embodiment of the present specification. Fig. 9 As shown, the device is applied to a data processing system, and the data processing system includes a first subsystem and a second subsystem;

[0239] The device comprises:

[0240] A reading module 902 is configured to read a first file to be synchronized and a second file to be synchronized in response to a data synchronization request, wherein the data synchronization request carries a target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are determined according to the target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are stored in a same memory of the data processing system, a first file update timestamp of the first file to be synchronized and a second file update timestamp of the second file to be synchronized are different, and the first file to be synchronized or the second file to be synchronized stores target synchronization data;

[0241] The file determination module 904 is configured to determine a first target synchronization file among the first file to be synchronized and the second file to be synchronized;

[0242] A file acquisition module 906 is configured to acquire a second target synchronization file corresponding to the first target synchronization file, wherein the first target synchronization file is stored in the first subsystem and the second target synchronization file is stored in the second subsystem;

[0243] The synchronization module 908 is configured to perform data synchronization processing between the first subsystem and the second subsystem according to the first target synchronization file and the second target synchronization file.

[0244] Optionally, the file determination module 904 is further configured to:

[0245] Determine a first candidate synchronization file among the first file to be synchronized and the second file to be synchronized;

[0246] Acquire a second candidate synchronization file corresponding to the first candidate synchronization file, wherein the first candidate synchronization file and the second candidate synchronization file are respectively stored in different memories of the first subsystem;

[0247] Verifying whether the first candidate synchronization file and the second candidate synchronization file are consistent;

[0248] When the first candidate synchronization file and the second candidate synchronization file are verified to be consistent, the first candidate synchronization file or the second candidate synchronization file is determined as the first target synchronization file.

[0249] Optionally, the file determination module 904 is further configured to:

[0250] Determine a first file update timestamp of the first file to be synchronized and a second file update timestamp of the second file to be synchronized;

[0251] Determine a candidate synchronization file to be determined in the first file to be synchronized and the second file to be synchronized according to the first file update timestamp and the second file update timestamp;

[0252] Determine whether the file status of the candidate synchronization file to be determined is an available status;

[0253] In a case where the file status of the to-be-determined candidate synchronization file is an available status, the to-be-determined candidate synchronization file is determined to be a first candidate synchronization file.

[0254] Optionally, the file determination module 904 is further configured to:

[0255] When the first file update timestamp is greater than the second file update timestamp, determining the first file to be synchronized as a candidate synchronization file to be determined;

[0256] When the first file update timestamp is smaller than the second file update timestamp, the second file to be synchronized is determined as a candidate synchronization file to be determined.

[0257] Optionally, the device further includes a marking module configured to:

[0258] The first target synchronization file is marked to generate file update mark information of the first target synchronization file.

[0259] Optionally, the first subsystem is a main system, and the second subsystem is a backup system;

[0260] The synchronization module 908 is further configured to:

[0261] Verify whether the first target synchronization file and the second target synchronization file are consistent;

[0262] When the first target synchronization file and the second target synchronization file are verified to be inconsistent, the first target synchronization file is synchronized to the second subsystem.

[0263] Another data processing device provided in the present specification is applied to a data processing system, the data processing system includes a first subsystem and a second subsystem; the device includes: a reading module, configured to read a first file to be synchronized and a second file to be synchronized in response to a data synchronization request, wherein the data synchronization request carries a target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are determined according to the target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are stored in the same memory of the data processing system, the first file update timestamp of the first file to be synchronized and the second file update timestamp of the second file to be synchronized are different, and the first file to be synchronized or the second file to be synchronized stores target synchronization data; a file determination module, configured to determine a first target synchronization file in the first file to be synchronized and the second file to be synchronized; a file acquisition module, configured to acquire a second target synchronization file corresponding to the first target synchronization file, wherein the first target synchronization file is stored in the first subsystem and the second target synchronization file is stored in the second subsystem; a synchronization module, configured to perform data synchronization processing between the first subsystem and the second subsystem according to the first target synchronization file and the second target synchronization file.

[0264] Another embodiment of the present specification realizes that, in the process of data synchronization between the first subsystem and the second subsystem, one of the two to-be-synchronized files corresponding to the target synchronization data is determined for data synchronization, and the target synchronization file is determined in combination with the available status of the to-be-synchronized files, thereby improving the accuracy of determining the target synchronization file. Based on the two target synchronization files, the first subsystem and the second subsystem are synchronized, thereby improving the consistency and reliability of data synchronization between the first subsystem and the second subsystem.

[0265] The above is a schematic scheme of another data processing device of this embodiment. It should be noted that the technical scheme of the data processing device and the technical scheme of the above data processing method belong to the same concept, and the details of the technical scheme of the data processing device that are not described in detail can all be referred to the description of the technical scheme of the above data processing method.

[0266] Fig.10 The structure block diagram of a computing device 1000 provided according to an embodiment of the present specification is shown. The components of the computing device 1000 include but are not limited to a memory 1010 and a processor 1020. The processor 1020 is connected to the memory 1010 via a bus 1030, and the database 1050 is used to store data.

[0267] The computing device 1000 also includes an access device 1040 that enables the computing device 1000 to communicate via one or more networks 1060. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1040 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0268] In one embodiment of the present specification, the above components of the computing device 1000 and Fig.10 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.10 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0269] The computing device 1000 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1000 may also be a mobile or stationary server.

[0270] The processor 1020 implements the steps of the above-mentioned data processing method when executing the computer program or instruction.

[0271] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above data processing method.

[0272] An embodiment of the present specification further provides a computer-readable storage medium storing a computer program or instruction, which implements the steps of the data processing method as described above when executed by a processor.

[0273] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above data processing method.

[0274] An embodiment of the present specification also provides a computer program product, including a computer program or instructions, which implement the steps of the above data processing method when executed by a processor.

[0275] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the above data processing method.

[0276] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0277] The computer program or instruction includes a computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0278] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that this specification is not limited by the order of the actions described, because according to this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this specification.

[0279] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0280] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A data processing method, characterized in that: Applied to data processing systems, including: Acquire the data to be stored and the identifier of the file to be stored of the data to be stored; Determining, according to the to-be-stored file identifier, a first to-be-stored file and a second to-be-stored file of the to-be-stored data, wherein the first to-be-stored file and the second to-be-stored file are stored in a same memory of the data processing system, a first file update timestamp of the first to-be-stored file is different from a second file update timestamp of the second to-be-stored file, and the first to-be-stored file and the second to-be-stored file store historical storage data corresponding to the to-be-stored data; Determining a target storage file for the data to be stored in the first file to be stored and the second file to be stored, wherein determining the target storage file for the data to be stored in the first file to be stored and the second file to be stored comprises obtaining first update information of the first file to be stored and second update information of the second file to be stored, and determining the target storage file for the data to be stored in the first file to be stored and the second file to be stored according to the first update information and the second update information, wherein the target storage file is the file to be stored that is updated earlier than the first file to be stored and the second file to be stored; The target storage file is updated based on the data to be stored.

2. The method according to claim 1, characterized in that Determining a target storage file of the data to be stored in the first file to be stored and the second file to be stored according to the first update information and the second update information includes: Determine a first file update timestamp of the first file to be stored in the first update information, and determine a second file update timestamp of the second file to be stored in the second update information; When the first file update timestamp is less than the second file update timestamp, determining the first file to be stored as the target storage file of the data to be stored; In a case where the first file update timestamp is greater than the second file update timestamp, the second file to be stored is determined as the target storage file of the data to be stored.

3. The method according to claim 1, characterized in that Determining a target storage file of the data to be stored in the first file to be stored and the second file to be stored according to the first update information and the second update information includes: In the case where there is file update mark information in the first update information, determining the second file to be stored as the target storage file of the data to be stored, wherein the file update mark information is used to indicate whether the data file is a data file that is updated later than the other two data files corresponding to data of any data type; In a case where the second update information contains file update mark information, the first file to be stored is determined as a target storage file of the data to be stored.

4. The method according to claim 1, characterized in that Updating the target storage file based on the data to be stored includes: Deleting the target storage file; Based on the to-be-stored file identifier, create a target storage empty file; The data to be stored is stored in the target storage empty file to obtain an updated storage file.

5. The method according to claim 1, characterized in that After obtaining the data to be stored and the identifier of the file to be stored of the data to be stored, the method further includes: According to the to-be-stored file identifier, query whether the to-be-stored data has a to-be-stored file; If it does not exist, creating a first empty file to be stored and a second empty file to be stored based on the identifier of the file to be stored; The data to be stored is stored in the first empty file to be stored or the second empty file to be stored.

6. The method according to claim 1, characterized in that After updating the target storage file based on the data to be stored, the method further includes: Obtaining first storage file information of a first updated storage file and second storage file information of a second updated storage file, wherein the first updated storage file is stored in a first memory, the second updated storage file is stored in a second memory, the first updated storage file and the second updated storage file store the data to be stored, and the first memory and the second memory are deployed in the same subsystem of the data processing system; Verifying whether the first stored file information is consistent with the second stored file information; If the first storage file information and the second storage file information are verified to be consistent, confirming that the data to be stored is stored successfully; When the first storage file information and the second storage file information are verified to be inconsistent, it is confirmed that the storage of the data to be stored has failed.

7. The method according to claim 6, characterized in that The data processing system includes a first subsystem and a second subsystem; The method further comprises: Acquire a first data storage result of the first subsystem and a second data storage result of the second subsystem; A system processing result of the data processing system is determined according to the first data storage result and the second data storage result.

8. The method according to claim 7, characterized in that The first subsystem is a main system, and the second subsystem is a backup system; Determining a system processing result of the data processing system according to the first data storage result and the second data storage result includes: When the first data storage result is storage success and the second data storage result is storage success, determining that the system processing result of the data processing system is success, and verifying whether the data stored in the first subsystem is consistent with the data stored in the second subsystem; When the first data storage result is a storage success and the second data storage result is a storage failure, determining that the system processing result of the data processing system is a success, and re-storing the data to be stored in the second subsystem; When the first data storage result is storage failure and the second data storage result is storage failure, determining that the system processing result of the data processing system is failure, and performing downtime processing on the first subsystem and the second subsystem; When the first data storage result is storage failure and the second data storage result is storage success, the first subsystem is downtime processed, and the second subsystem is determined as the first subsystem.

9. A data processing method, characterized in that: Applied to a data processing system, the data processing system comprising a first subsystem and a second subsystem; The method comprises: In response to a data synchronization request, a first file to be synchronized and a second file to be synchronized are read, wherein the data synchronization request carries a target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are determined according to the target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are stored in a same memory of the data processing system, a first file update timestamp of the first file to be synchronized and a second file update timestamp of the second file to be synchronized are different, and the first file to be synchronized or the second file to be synchronized stores target synchronization data; A first target synchronization file is determined in the first file to be synchronized and the second file to be synchronized, wherein the determining of the first target synchronization file in the first file to be synchronized and the second file to be synchronized includes determining a first candidate synchronization file in the first file to be synchronized and the second file to be synchronized, obtaining a second candidate synchronization file corresponding to the first candidate synchronization file, and verifying whether the first candidate synchronization file and the second candidate synchronization file are consistent. When the first candidate synchronization file and the second candidate synchronization file are verified to be consistent, the first candidate synchronization file or the second candidate synchronization file is determined as the first target synchronization file. The first candidate synchronization file and the second candidate synchronization file are respectively stored in different memories of the first subsystem. The first candidate synchronization file is a data file determined in any memory for data synchronization. The first candidate synchronization file is a file to be synchronized that is updated later in the first file to be synchronized and the second file to be synchronized. Acquire a second target synchronization file corresponding to the first target synchronization file, wherein the first target synchronization file is stored in the first subsystem, and the second target synchronization file is stored in the second subsystem; Data synchronization processing is performed between the first subsystem and the second subsystem according to the first target synchronization file and the second target synchronization file.

10. The method according to claim 9, characterized in that Determining a first candidate synchronization file among the first file to be synchronized and the second file to be synchronized includes: Determine a first file update timestamp of the first file to be synchronized and a second file update timestamp of the second file to be synchronized; Determine a candidate synchronization file to be determined in the first file to be synchronized and the second file to be synchronized according to the first file update timestamp and the second file update timestamp; Determine whether the file status of the candidate synchronization file to be determined is an available status; In a case where the file status of the to-be-determined candidate synchronization file is an available status, the to-be-determined candidate synchronization file is determined to be a first candidate synchronization file.

11. The method according to claim 10, characterized in that Determining a candidate synchronization file to be determined in the first file to be synchronized and the second file to be synchronized according to the first file update timestamp and the second file update timestamp includes: When the first file update timestamp is greater than the second file update timestamp, determining the first file to be synchronized as a candidate synchronization file to be determined; When the first file update timestamp is smaller than the second file update timestamp, the second file to be synchronized is determined as a candidate synchronization file to be determined.

12. The method according to claim 9, characterized in that After determining the first candidate synchronization file or the second candidate synchronization file as a first target synchronization file, the method further includes: The first target synchronization file is marked to generate file update marking information of the first target synchronization file, wherein the file update marking information is used to indicate whether the data file is a data file that is updated later than the two data files corresponding to data of any data type.

13. The method according to claim 9, characterized in that The first subsystem is a main system, and the second subsystem is a backup system; Performing data synchronization processing between the first subsystem and the second subsystem according to the first target synchronization file and the second target synchronization file includes: Verify whether the first target synchronization file and the second target synchronization file are consistent; When the first target synchronization file and the second target synchronization file are verified to be inconsistent, the first target synchronization file is synchronized to the second subsystem.

14. A data processing device, characterized in that: Applied to data processing systems, including: An acquisition module is configured to acquire the data to be stored and an identifier of a file to be stored of the data to be stored; A first determining module is configured to determine, according to the to-be-stored file identifier, a first to-be-stored file and a second to-be-stored file of the to-be-stored data, wherein the first to-be-stored file and the second to-be-stored file are stored in a same memory of the data processing system, a first file update timestamp of the first to-be-stored file is different from a second file update timestamp of the second to-be-stored file, and the first to-be-stored file and the second to-be-stored file store historical storage data corresponding to the to-be-stored data; A second determining module is configured to determine a target storage file of the data to be stored in the first file to be stored and the second file to be stored, wherein determining the target storage file of the data to be stored in the first file to be stored and the second file to be stored comprises obtaining first update information of the first file to be stored and second update information of the second file to be stored, and determining the target storage file of the data to be stored in the first file to be stored and the second file to be stored according to the first update information and the second update information, wherein the target storage file is the file to be stored that is updated earlier in the first file to be stored and the second file to be stored; An updating module is configured to update the target storage file based on the data to be stored.

15. A data processing device, characterized in that: Applied to a data processing system, the data processing system comprising a first subsystem and a second subsystem; The device comprises: A reading module, configured to read a first file to be synchronized and a second file to be synchronized in response to a data synchronization request, wherein the data synchronization request carries a target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are determined according to the target synchronization file identifier, the first file to be synchronized and the second file to be synchronized are stored in a same memory of the data processing system, a first file update timestamp of the first file to be synchronized and a second file update timestamp of the second file to be synchronized are different, and the first file to be synchronized or the second file to be synchronized stores target synchronization data; A file determination module is configured to determine a first target synchronization file in the first file to be synchronized and the second file to be synchronized, wherein the determining of the first target synchronization file in the first file to be synchronized and the second file to be synchronized includes determining a first candidate synchronization file in the first file to be synchronized and the second file to be synchronized, obtaining a second candidate synchronization file corresponding to the first candidate synchronization file, and verifying whether the first candidate synchronization file and the second candidate synchronization file are consistent. When the first candidate synchronization file and the second candidate synchronization file are verified to be consistent, the first candidate synchronization file or the second candidate synchronization file is determined as the first target synchronization file. The first candidate synchronization file and the second candidate synchronization file are respectively stored in different memories of the first subsystem. The first candidate synchronization file is a data file determined in any memory for data synchronization. The first candidate synchronization file is a file to be synchronized with a later update time in the first file to be synchronized and the second file to be synchronized. A file acquisition module, configured to acquire a second target synchronization file corresponding to the first target synchronization file, wherein the first target synchronization file is stored in the first subsystem, and the second target synchronization file is stored in the second subsystem; The synchronization module is configured to perform data synchronization processing between the first subsystem and the second subsystem according to the first target synchronization file and the second target synchronization file.

16. A computing device comprising a memory, a processor, and a computer program or instruction stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program or instructions, the steps of the method described in any one of claims 1-8 or 9-13 are implemented.

17. A computer-readable storage medium storing a computer program or instruction, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method described in any one of claims 1-8 or 9-13 are implemented.

18. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method described in any one of claims 1-8 or 9-13 are implemented.

Citation Information

Patent Citations

  • Data processing method for double 2-vote-2 redundant structure

    CN108082219A

  • Train LCU control system based on double 2-vote-2

    CN111891184A

  • Data file writing method and device, electronic equipment and storage medium

    CN116861488A

  • Synchronization system and method based on two-out-of-two system, electronic equipment and storage medium

    CN117938291A

  • Method and system for backup storage of electronic data

    WO2008118168A1