Version data switching method and device, storage node and computer storage medium
By synchronizing business data to the message queue in real time and generating new version data, and using the message queue to achieve incremental data synchronization, the data interruption problem caused by version iteration in the existing technology is solved, and seamless version data switching and data processing continuity are achieved.
Patent Information
- Application Number
- CN202511024608.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-10-17
AI Technical Summary
The existing business data version iteration method will lead to the interruption of real-time statistics of online business data, affecting the continuity and consistency of data processing.
By synchronizing the received business data to the message queue in real time, generating new version data, and using the message queue to synchronize incremental data, the new cache is finally used to replace the original cache, completing the seamless switching of version data.
It enables version data switching without interrupting real-time business data, ensuring that upstream businesses are unaware, incremental data is synchronized accurately and without omissions, and ensuring the continuity and consistency of data processing.
Smart Images

Figure CN120803518A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data storage, in particular to a version data switching method and device, a storage node and a computer storage medium. BACKGROUND
[0002] In the field of data storage, there are many real-time business data update scenarios that are very active. In such scenarios, business data full version updates are often required, such as model vector data and real-time feature data. The existing implementation method is to stop real-time updates of business data, and then start again after the version iteration is completed. This method will inevitably affect the real-time statistics of online business data. SUMMARY
[0003] The present application relates to the technical field of data storage, in particular to a version data switching method and device, a storage node and a computer storage medium.
[0004] Embodiments of the present application can be implemented as follows: In a first aspect, the present application provides a version data switching method, which comprises: When a new version data construction is started, real-time synchronization of received business data to a message queue is performed; Based on the currently received business data, a new version data construction is performed to generate new version data; Using the message queue, incremental data after the currently received business data is synchronized to a new cache that stores the new version data; The new cache is used to replace an original cache that stores original version data, so as to complete switching from the original version data to the new version data.
[0005] In an optional embodiment, the step of performing a new version data construction based on the currently received business data to generate new version data comprises: A snapshot of the currently received business data is created; Based on the snapshot, a new version data construction is performed to generate new version data.
[0006] In an optional embodiment, the step of using the message queue to synchronize incremental data after the currently received business data to a new cache that stores the new version data comprises: The new version data is written to the new cache; Real-time writing of received business data to the new cache is performed, and a position of business data that is first written to the new cache in the message queue is used as a termination synchronization position; synchronizing, as incremental data, the service data between the start synchronization position and the end synchronization position in the message queue to the new cache, the start synchronization position being the position of the next service data of the latest service data in the new version data in the message queue.
[0007] In an optional implementation, the received service data is written to the new cache in real time while also being written to the original cache in real time, and the step of synchronizing, as incremental data, the service data between the start synchronization position and the end synchronization position in the message queue to the new cache comprises: reading each incremental data in sequence from the start synchronization position; for each incremental data, if the incremental data is to-be-synchronized data, writing the incremental data to the new cache until each to-be-synchronized data in the incremental data is written to the new cache.
[0008] In an optional implementation, before the step of for each incremental data, if the incremental data is to-be-synchronized data, writing the incremental data to the new cache, the method comprises: for each incremental data, if the incremental data does not exist in both the new cache and the original cache at the same time, determining that the incremental data is to-be-synchronized data.
[0009] In an optional implementation, each service data written to the new cache from the end synchronization position is provided with a double-write mark; before the step of for each incremental data, if the incremental data is to-be-synchronized data, writing the incremental data to the new cache, the method comprises: if the incremental data exists in the new cache and is provided with a double-write mark, determining that the incremental data is not to-be-synchronized data, otherwise determining that the incremental data is to-be-synchronized data.
[0010] In an optional implementation, after the step of replacing the original cache storing the original version data with the new cache to complete switching from the original version data to the new version data, the method comprises: stopping writing received service data to the original cache in real time and releasing the original cache; stopping synchronizing received service data to the message queue in real time.
[0011] In a second aspect, the present application provides a version data switching device, the device comprising: a synchronization module, configured to synchronize received service data to a message queue in real time when new version data construction is started; a construction module, configured to perform new version data construction based on currently received service data to generate new version data. The synchronization module is further configured to synchronize, by using the message queue, incremental data after the currently received service data to a new cache in which the new version data is stored. The switching module is configured to replace a previous cache in which previous version data is stored by the new cache, so as to complete switching from the previous version data to the new version data.
[0012] In a third aspect, the present application provides a storage node, comprising a processor and a memory, wherein the memory is configured to store a program, and the processor is configured to implement the version data switching method according to the first aspect when executing the program.
[0013] In a fourth aspect, the present application provides a computer storage medium, which stores a computer program, and the computer program is configured to implement the version data switching method according to the first aspect when executed by a processor.
[0014] Compared with the prior art, the present application has the following beneficial effects: When it is necessary to start the construction of the new version data, the received service data is first synchronized to the message queue in real time, then the new version data is generated based on the currently received service data, next, the incremental data after the currently received service data is synchronized to the new cache in which the new version data is stored by using the message queue, and finally, the previous cache in which the previous version data is stored is replaced by the new cache, so as to complete switching from the previous version data to the new version data. By synchronizing the received service data to the message queue in real time and synchronizing the incremental data by using the message queue, the real-time service data is not interrupted during the whole switching process, so that the version data switching under the condition that the upstream service is not aware of is realized. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation to the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0016] Figure 1 The example diagram of the architecture of the version data switching provided for the present embodiment.
[0017] Figure 2 The example diagram of the flow of the version data switching method provided for the present embodiment.
[0018] Figure 3 The example diagram of the whole process of the version data switching provided for the present embodiment.
[0019] Figure 4 Block diagram of version data switching device provided in the embodiment.
[0020] Figure 5 Block diagram of storage node provided in the embodiment.
[0021] Icon: 10-storage node; 11-processor; 12-memory; 13-bus; 100-version data switching device; 110-synchronization module; 120-constructing module; 130-switching module. DETAILED DESCRIPTION
[0022] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.
[0023] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative labor are within the scope of protection of the present application.
[0024] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0025] In the description of the present application, it should be noted that if the terms "upper", "lower", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship when the product of the present application is usually placed, which is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the indicated device or element must have a particular orientation, be constructed and operated in a particular orientation, therefore, it cannot be understood as a limitation on the present application.
[0026] In addition, if the terms "first", "second" and the like appear, they are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0027] It should be noted that the features in the embodiments of the present application can be combined with each other without conflict.
[0028] Please refer to Figure 1 , Figure 1 Block diagram of version data switching provided in the embodiment,Figure 1 In the method, the data processing engine receives the service data in real time, synchronizes the received service data to the message queue in real time when starting the new version data construction, performs the new version data construction based on the currently received service data, and generates the new version data, Figure 1 In an implementation form of the method, a snapshot of the currently received service data is created, and the snapshot is processed to generate the new version data. At this time, the latest data in the new version data is located at the offset position 1 in the message queue. During the whole process, the data processing engine continuously receives the service data and writes the service data to the original cache storing the original version data in real time.
[0029] Starting from the offset position 1, the incremental synchronization based on the new version data is needed. The process of the incremental synchronization includes: writing the new version data to the new cache, writing the service data received in real time to the new cache, and writing the service data at the offset position 2 in the message queue to the new cache for the first time. The service data between the offset position 1 and the offset position 2 is the incremental data that needs to be synchronized. In order to avoid the repeated synchronization of the incremental data, it can be first identified whether the incremental data needs to be synchronized, and only the incremental data that needs to be synchronized is synchronized. Figure 1 In an implementation form of the method, the service data starting from the offset position 2 is set with a double-write flag in the new cache. When the incremental data synchronization is performed, the incremental data starting from the offset position 1 in the message queue is read. If the read incremental data exists in the new cache and is set with the double-write flag, it means that the incremental data has been synchronized and does not need to be repeated. Otherwise, the incremental data needs to be written to the new cache. When the incremental data between the offset position 1 and the offset position 2 is written to the new cache, the incremental data update is completed. At this time, the new cache replaces the original cache storing the original version data, so as to complete the switching from the original version data to the new version data.
[0030] Based on the architecture example diagram of Figure 1 , the version data switching method is first introduced in this embodiment. Please refer to Figure 2 , Figure 2 The flow example diagram of the version data switching method provided in this embodiment includes the following steps: Step S101, when starting the new version data construction, the received service data is synchronized to the message queue in real time.
[0031] In the embodiment, the message queue refers to a data buffer component with the capability of persistence and sequential read-write, and the message queue records the cursor offset of the business data currently entering the message queue in real time, which represents the offset position of the business data in the message queue. In the embodiment, the cursor offset of the business data currently entering the message queue is updated in real time with the received business data, and to obtain the business data at a specified position in the message queue, the cursor offset of the business data can be recorded to obtain the corresponding business data according to the cursor offset.
[0032] In step S102, the new version data is constructed based on the currently received business data, and the new version data is generated.
[0033] In the embodiment, the currently received business data can be the business data received from the latest business data in the original version data to the current time. Compared with the original version data, the new version data is obtained by constructing the version data based on the business data from the latest business data in the original version data to the current time.
[0034] In step S103, the message queue is used to synchronize the incremental data after the currently received business data to the new cache storing the new version data.
[0035] In the embodiment, the new version data construction needs a certain time, and during this process, the business data will not be interrupted, so the new version data and the original version data are not seamlessly connected, but there will be incremental data that needs to be completed. The sequential read-write feature of the message queue can ensure the ordered synchronization of the incremental data, and the cursor offset of the message queue can accurately record the position of the incremental data that needs to be completed in the message queue, so as to realize the accurate and ordered synchronization of the incremental data.
[0036] In step S104, the new cache is used to replace the original cache storing the original version data, so as to complete the switching from the original version data to the new version data.
[0037] In the embodiment, the new cache and the original cache respectively represent the temporary storage structures of the new version data and the original version data, and the two can exist in the same storage node or be distributed on multiple storage nodes in the physical aspect, but are independent of each other in the logical aspect. As an implementation manner, the original cache can store the original version data and the business data after the original version data. Only when the new cache also stores the new version data and the business data after the new version data, the new cache and the original cache can be synchronized, and the data of the two is complete and consistent, so as to switch from the original version data to the new version data.
[0038] The method provided in the embodiment synchronizes the received service data to the message queue in real time, uses the message queue to realize synchronization of the incremental data, and thus realizes version data switching without awareness of the upstream service.
[0039] In an optional implementation, in order to reduce the influence on real-time service data as much as possible when generating new version data, and to maintain the continuity of service data while trying not to affect the performance of service data processing, the embodiment provides a specific implementation of generating new version data. create a snapshot of the current received service data; construct new version data based on the snapshot to generate new version data.
[0040] In the embodiment, the snapshot is created without interrupting real-time service data. The snapshot is a complete copy of the received service data after the original version data and before the current time, which records the static state of the current service data. The snapshot is used as the basic input of new version construction, and its role is to retain a stable data source to avoid data confusion or inconsistency in the new version construction process due to continuous service updates.
[0041] In an optional implementation, in order to ensure that no incremental data is missed in the synchronization process and to realize accurate capture and playback of the incremental data, the embodiment further provides a specific implementation of synchronizing incremental data. First, write the new version data into the new cache; Second, write the received service data into the new cache in real time, and use the position of the service data first written into the new cache in the message queue as the termination synchronization position. In the embodiment, the service data first written into the new cache refers to the first real-time service data written into the new cache after the new cache completes the new version data loading. Since the service data also exists in a specific offset position in the message queue, the offset position can be marked as the termination synchronization position, representing the end position of the incremental data to be synchronized.
[0042] Finally, synchronize the service data between the start synchronization position and the termination synchronization position in the message queue to the new cache, and the start synchronization position is the position of the next service data of the latest service data in the new version data in the message queue.
[0043] In the embodiment, the starting synchronization position corresponds to the cursor offset (e.g., offset1) of the latest business data recorded in the message queue at the time of snapshot creation, and the ending synchronization position corresponds to the cursor offset (e.g., offset2) of the message queue in which the business data is first written into the new cache. Therefore, all the business data in the interval ([offset1, offset2]) constitutes the incremental data generated between the completion of the snapshot and the start of the new cache to receive the business data in real time.
[0044] In order to write the received business data into the new cache in real time without interrupting the business data, and in order to ensure the consistency of the new cache and the original cache after synchronization without interrupting the business data, the embodiment further provides an implementation manner of synchronizing the incremental data to the new cache: Start from the starting synchronization position, and read each incremental data in sequence. For each incremental data, if the incremental data is to-be-synchronized data, write the incremental data into the new cache until each to-be-synchronized data in the incremental data is written into the new cache.
[0045] In the embodiment, the to-be-synchronized data is business data that is not written into the new cache in advance, and the purpose of introducing the to-be-synchronized data is to avoid repeated writing or omission.
[0046] In an optional implementation, there is a certain time delay in the process of writing the new version data into the new cache (such as snapshot creation, construction of new version data, and writing of new version data into the new cache), and part of the business data may be written into the original cache but not yet written into the new cache. In order to accurately identify the to-be-synchronized data, the embodiment provides two implementation manners: Manner one: For each incremental data, if the incremental data does not exist in both the new cache and the original cache at the same time, it is determined that the incremental data is to-be-synchronized data.
[0047] In the embodiment, if the incremental data exists in both the new cache and the original cache at the same time, it means that the incremental data is in a synchronized state and is consistent, and there is no need for repeated synchronization, otherwise, synchronization is needed.
[0048] In order to improve the identification efficiency of manner one, the embodiment introduces a double-write flag to quickly and accurately identify the to-be-synchronized data, namely manner two: Each business data written into the new cache from the ending synchronization position is provided with a double-write flag; If there is incremental data in the new cache and the double-write flag is set, it is determined that the incremental data is not to-be-synchronized data, otherwise, it is determined that the incremental data is to-be-synchronized data.
[0049] In the embodiment, the double-write mark can be a meta information or an identification bit added to the data entry, which indicates whether the service data has been actively written into the new cache during the double-write mechanism. The double-write mechanism means that after the new version data is built and written into the new cache, all service data will be written into the original cache in real time and also be synchronously written into the new cache in real time, so as to guarantee the data consistency between the new cache and the original cache before switching. Therefore, the service data with the double-write mark means that it has been written into both the original cache and the new cache.
[0050] In the optional implementation, after the version data is switched, in order to effectively avoid resource waste and state confusion, and to vacate necessary storage space and computing resources for the next new version construction, the embodiment further provides a post-processing after the version data is switched: stopping real-time writing of received service data into the original cache and releasing the original cache; stopping real-time synchronization of received service data to the message queue.
[0051] In the embodiment, releasing the original cache means a process of clearing the original cache from the current running environment after confirming that the original cache no longer participates in any data read-write operation, including but not limited to actions such as dereferencing, destroying instance, releasing memory space, etc.; and stopping real-time synchronization of received service data to the message queue means closing the data replication channel for new version data construction, rather than interrupting the streaming processing path of the service itself.
[0052] In order to more clearly illustrate the whole process of version data switching, please refer to Figure 3 , Figure 3 the example diagram of the whole process of version data switching provided for the embodiment, Figure 3In the embodiment, before starting the new version data construction, the original cache has the original version data and the real-time business data that has been written. After starting the new version data construction, the real-time business data continues to be written into the original cache, and meanwhile, the real-time business data is written into the message queue. At t1 moment, a snapshot is created for the business data written until t1 moment, at this time, the snapshot corresponds to Offset1 in the message queue, and the new version data is obtained based on the snapshot, and the new version data is written into the new cache at t2 moment, starting from t2 moment, the real-time business data is written into the original cache, the new cache and the message queue, the data written into the message queue at t2 moment corresponds to Offset2, and between t1 and t2, the real-time business data is continuously written into the original cache, therefore, the original cache at t2 moment includes the original version data, the business data until t1 moment, the business data between t1 and t2 and the business data at t2 moment, and the new cache at t2 moment includes the new version data and the business data at t2 moment, since the new version data is generated based on the business data until t1 moment, therefore, the missing business data of the new cache compared with the original cache is the business data between t1 and t2, when the business data is synchronized to the new cache, for example, the business data between t1 and t2 is written into the new cache at t3 moment, the new cache and the original cache are in the synchronization state at tx moment in the embodiment, at this time, the new cache can replace the original cache, and the version data switching is completed. Figure 3
[0053] It should be noted that, Figure 3 In the embodiment, the original cache and the new cache are only examples of data storage, and only for the purpose of description, and do not represent actual storage locations.
[0054] In order to perform the corresponding steps in the above embodiment and each possible implementation, an implementation of a version data switching device 100 is given as follows. Please refer to Figure 4 , Figure 4 A block schematic diagram of the version data switching device provided in the embodiment is shown in the figure, it should be noted that the basic principle and the generated technical effects of the version data switching device 100 provided in the embodiment are the same as those of the above-mentioned embodiment, for brief description, part of the embodiment is not mentioned.
[0055] The version data switching device 100 includes a synchronization module 110, a construction module 120 and a switching module 130.
[0056] The synchronization module 110 is configured to synchronize the received business data to the message queue in real time when starting the new version data construction; The construction module 120 is configured to construct the new version data based on the currently received business data, and generate the new version data; The synchronization module 110 is further configured to synchronize the incremental data after the currently received business data to the new cache in which the new version data is stored by using the message queue; The switching module 130 is configured to replace the original cache storing the original version data with the new cache to complete the switching from the original version data to the new version data.
[0057] In an optional embodiment, the constructing module 120 is specifically configured to: create a snapshot of the currently received service data; construct the new version data based on the snapshot to generate the new version data.
[0058] In an optional embodiment, the synchronizing module 110 is specifically configured to: write the new version data into the new cache; write the received service data into the new cache in real time, and take the position of the service data first written into the new cache in the message queue as the terminal synchronization position; synchronize the service data between the start synchronization position and the terminal synchronization position in the message queue to the new cache as the incremental data, wherein the start synchronization position is the position of the next service data of the latest service data in the new version data in the message queue.
[0059] In an optional embodiment, the received service data is written into the new cache in real time and also written into the original cache in real time, and the synchronizing module 110 is specifically configured to, when synchronizing the service data between the start synchronization position and the terminal synchronization position in the message queue to the new cache as the incremental data, further configured to: read each incremental data in sequence from the start synchronization position; for each incremental data, if the incremental data is to-be-synchronized data, write the incremental data into the new cache until each to-be-synchronized data in the incremental data is written into the new cache.
[0060] In an optional embodiment, the synchronizing module 110 is further configured to: for each incremental data, if the incremental data does not exist in both the new cache and the original cache at the same time, determine that the incremental data is to-be-synchronized data.
[0061] In an optional embodiment, each service data written into the new cache from the terminal synchronization position is provided with a double-write mark, and the synchronizing module 110 is further configured to, if the incremental data exists in the new cache and is provided with the double-write mark, determine that the incremental data is not to-be-synchronized data, otherwise, determine that the incremental data is to-be-synchronized data.
[0062] In an optional embodiment, the switching module 130 is further configured to: stop writing the received service data into the original cache in real time and release the original cache; stop synchronizing the received service data to the message queue in real time.
[0063] The embodiment of the present application further provides a block schematic diagram of the storage node 10, and the storage node 10 implements the version data switching method of the foregoing embodiment. Figure 5 , Figure 5 The block schematic diagram of the storage node 10 is provided for the embodiment, and the storage node 10 comprises a processor 11, a memory 12 and a bus 13, and the processor 11 and the memory 12 are connected through the bus 13.
[0064] The processor 11 can be an integrated circuit chip with a signal processing capability. In the implementation process, each step of the version data switching method of the foregoing embodiment can be completed by the integrated logic circuit of hardware or the instruction in the form of software in the processor 11. The processor 11 can be a general processor, including a CPU (Central Processing Unit), an NP (Network Processor), etc.; and can also be a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Logic Gate Array) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0065] The memory 12 is used for storing a program for implementing the version data switching method, and the program can be a software function module in the form of software or firmware stored in the memory 12 or solidified in an OS (Operating System) of the storage node 10.
[0066] The processor 11 executes the program to implement the version data switching method of the foregoing embodiment after receiving an execution instruction.
[0067] The embodiment further provides a computer storage medium, and the computer storage medium stores a computer program, and the computer program is executed by the processor to implement the version data switching method in the foregoing embodiment.
[0068] To sum up, the embodiment of the present application provides a version data switching method, device, storage node and computer storage medium, the method comprises: when starting new version data construction, synchronizing the received service data to the message queue in real time; based on the current received service data, the new version data is constructed to generate new version data; using the message queue, the incremental data after the current received service data is synchronized to the new cache which stores the new version data; the new cache replaces the original cache which stores the original version data, to complete the switching from the original version data to the new version data. Compared with the prior art, the embodiment has at least the following advantages: (1) by synchronizing the received service data to the message queue in real time, the synchronization of incremental data is realized by using the message queue, so that the real-time service data is not interrupted during the whole switching process, thereby realizing the version data switching under the condition of no awareness of the upstream service; (2) by using the ordered feature of the message queue, the incremental data is quickly filled; (3) by using the double writing mechanism, the incremental data is not lost and the service data is not interrupted; (4) by using the cursor offset recorded by the message queue, the interval of the incremental data is determined according to the cursor offset, so that the incremental data is caught up from the beginning to the end, and the data is not lost or repeated.
[0069] The above is only various embodiments of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A version data switching method, characterized in that: The method comprises: When starting a new version of data construction, the received business data will be synchronized to the message queue in real time; Build new version data based on the currently received business data to generate new version data; Using the message queue, synchronizing incremental data subsequent to the currently received business data to a new cache storing the new version data; The new cache is used to replace the original cache storing the original version data, so as to complete the switching from the original version data to the new version data.
2. The method according to claim 1, characterized in that The step of constructing new version data based on the currently received business data and generating the new version data includes: Create a snapshot of the currently received business data; New version data is constructed based on the snapshot to generate new version data.
3. The method according to claim 1, characterized in that The step of synchronizing the incremental data subsequent to the currently received business data to the new cache storing the new version data by using the message queue includes: Writing the new version data into the new cache; Writing the received service data into the new cache in real time, and using the position of the service data first written into the new cache in the message queue as the termination synchronization position; The business data between the start synchronization position and the end synchronization position in the message queue is synchronized to the new cache as incremental data, and the start synchronization position is the position of the next business data of the latest business data in the new version data in the message queue.
4. The method according to claim 3, characterized in that The received business data is written into the new cache in real time and also into the original cache in real time, and the step of synchronizing the business data between the start synchronization position and the end synchronization position in the message queue as incremental data to the new cache includes: Starting from the starting synchronization position, reading each incremental data in sequence; For each incremental data, if the incremental data is data to be synchronized, the incremental data is written into the new cache, until each data to be synchronized in the incremental data is written into the new cache.
5. The method according to claim 4, characterized in that For each incremental data, if the incremental data is data to be synchronized, before the step of writing the incremental data into the new cache, the method includes: For each incremental data, if the incremental data does not exist in both the new cache and the original cache, the incremental data is determined to be data to be synchronized.
6. The method according to claim 4, characterized in that Each piece of service data written into the new cache starting from the synchronization termination position is set with a double write mark; For each incremental data, if the incremental data is data to be synchronized, before the step of writing the incremental data into the new cache, the method includes: If the incremental data exists in the new cache and a double-write mark is set, the incremental data is determined to be non-data to be synchronized; otherwise, the incremental data is determined to be data to be synchronized.
7. The method according to any one of claims 1 to 6, characterized in that After the step of replacing the original cache storing the original version data with the new cache to complete the switching from the original version data to the new version data, the method further includes: Stop writing the received service data to the original buffer in real time and release the original buffer; Stop synchronizing the received business data to the message queue in real time.
8. A version data switching device, characterized in that: The device comprises: The synchronization module is used to synchronize the received business data to the message queue in real time when starting the new version data construction; A construction module is used to construct a new version of data based on the currently received business data and generate the new version of data; The synchronization module is further configured to synchronize, using the message queue, incremental data subsequent to the currently received business data to a new cache storing the new version data; The switching module is configured to replace the original cache storing the original version data with the new cache to complete the switching from the original version data to the new version data.
9. A storage node, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a program, and the processor is used to implement the version data switching method according to any one of claims 1 to 7 when executing the program.
10. A computer storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the version data switching method according to any one of claims 1 to 7 is implemented.