Method and apparatus for real-time data synchronization of multiple computing nodes

By acquiring real-time data from compute nodes through the observer module and the publish-subscribe pattern, and using hash algorithms and HashMaps to implement data caching, the real-time and accuracy issues of data synchronization across multiple compute nodes are resolved, achieving efficient data synchronization.

CN114416787BActive Publication Date: 2025-11-21AUTOMOTIVE INTELLIGENCE & CONTROL OF CHINA CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111521543.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2025-11-21
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

In the existing technology, the existing synchronization methods cannot meet the real-time data synchronization requirements of multiple computing nodes, and there are problems such as poor real-time performance, high system overhead, and large data synchronization errors.

Method used

The system uses an observer module and a publish-subscribe pattern to obtain real-time data from computing nodes. Data caching is implemented through hash algorithms and HashMaps to ensure the synchronization of timestamps and location information and reduce system load.

Benefits of technology

It enables real-time synchronization of data across multiple computing nodes, improving synchronization accuracy and flexibility, reducing system load, and ensuring the real-time nature and scalability of data synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114416787B_ABST
    Figure CN114416787B_ABST
Patent Text Reader

Abstract

The application discloses a kind of data real-time synchronization method and device of multiple computing nodes, the method includes: based on observer module, the real-time data of each computing node is obtained;The real-time data is stored to first cache module;Data processing module carries out information extraction to the real-time data stored to the first cache module, obtains extraction result;Wherein, the extraction result includes the position information of the real-time data and time stamp time;The data processing module processes the extraction result, obtains processing result, and the processing result is stored to second cache module.The technical scheme of the application enhances the real-time of data synchronization, and the poor real-time problem existing in the traditional data real-time synchronization system of existing conventional is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of data synchronization, and particularly relates to a multi-computing-node data real-time synchronization method and device. BACKGROUND

[0002] The intelligent networked automobile industry is entering the fast lane of accelerated driving, showing a rapidly developing industrial prospect. With the improvement of automobile intelligence and the development of vehicle-road cooperation communication technology, automatic driving vehicles are increasingly widely promoted and applied, reducing the risk of automobile driving and alleviating the heavy driving task of users. At the same time, with the advent of the Internet of Things era, the data perceived and reported by Internet of Things devices is increasing, and intelligent networked automobiles are increasingly identical to smartwatches, smartphones and other smart devices, all of which are computing nodes, reporting data through sensor networks and various network paths. Therefore, real-time synchronization of data of all computing nodes is particularly important for seamless connection and data sharing.

[0003] However, the existing data synchronization method has many problems and cannot meet the growing demand for data sharing. The main problems are as follows:

[0004] (1) The traditional synchronization method is a simple copy synchronization, that is, a data sharing method based on scanning. The software architecture design of the data synchronization software system is relatively simple, and the real-time performance is poor. When the data does not change, unnecessary network bandwidth and central processing unit resources are often consumed to monitor the change of the data in order to synchronize in time. When the real-time requirement of data synchronization increases, the system overhead is exponentially increased.

[0005] (2) The traditional synchronization method basically relies on the way of caching data by a relational database, without considering the synchronization scheme for high-throughput real-time data, that is, without a more efficient data caching and searching mechanism.

[0006] (3) When using a sensor network to obtain data synchronization, the time and position information of each sensor are not synchronized, or the data of multiple sensors participating in cross positioning is not from the same moment, resulting in errors in obtaining data. At present, the research on data synchronization of multi-sensor networking has not broken through the time synchronization stage. After time synchronization, it is difficult to quickly determine the same data of the same moment from each sensor in a large amount of data. SUMMARY

[0007] The present application aims to at least partly solve one of the problems in the related art. To this end, one object of the present application is to provide a multi-computing-node data real-time synchronization method and device.

[0008] To solve the above technical problems, embodiments of the present application provide the following technical solutions:

[0009] In a first aspect, embodiments of the present application provide a multi-computing node data real-time synchronization method, comprising:

[0010] acquiring real-time data of each computing node based on an observer module; storing the real-time data to a first cache module; performing information extraction on the real-time data stored to the first cache module by a data processing module to obtain an extraction result; wherein the extraction result comprises position information and a time stamp time of the real-time data; processing the extraction result by the data processing module to obtain a processing result, and storing the processing result to a second cache module.

[0011] The number of computing nodes can be multiple; the observer module is implemented based on a publish-subscribe mode, and is used to control and manage behaviors of objects that exist in a dependent relationship and are not independent. When a one-to-many dependent relationship exists among multiple objects, when a state of an object changes, all objects dependent on it are notified and automatically updated, and the method is applied to a multi-computing node data real-time synchronization system.

[0012] Embodiments of the present application can quickly determine the detection data of each sensing device on the same computing node at the same time when multiple sensing devices are used to detect multiple moving computing nodes, and can also realize synchronization of arbitrary data among multiple computing nodes. The synchronization of the time stamp and the position information is guaranteed while the real-time of the data synchronization is guaranteed, the accuracy and flexibility of the data synchronization are improved, the burden of the system is reduced, and the poor real-time problem existing in the existing traditional data real-time synchronization system is optimized.

[0013] In a possible implementation, the acquiring real-time data of each computing node based on the observer module comprises:

[0014] The first cache module subscribes to state information of each computing node;

[0015] When the state information of the computing node is updated, the observer module acquires real-time data of the computing node.

[0016] The data processing module and the first cache module of the embodiment of the application subscribe to the data state information of the plurality of sensing devices, and when new data is generated, the state change of the computing node is immediately notified to the data processing module and the first cache module, so that the real-time performance of data synchronization is ensured through the triggering mode of "publish-subscribe", and the coupling relationship between the target and the observer is reduced, and the abstract coupling relationship between the target and the observer is ensured, so that the scalability of the multi-computing node data real-time synchronization system is ensured.

[0017] In a possible implementation, when the state information of the computing node is updated, the observer module acquires real-time data of the computing node, and the method comprises the following steps of:

[0018] The state information of each computing node is detected based on the sensing device;

[0019] When the sensing device detects that the state information of the computing node is updated, the sensing device acquires the real-time data of the computing node which is updated;

[0020] The sensing device sends the real-time data to the observer module.

[0021] The sensing device can be a sensor or a camera or other devices with equivalent functions; wherein the sensing device can be arranged in the interior of the computing node, and is used for monitoring and collecting the real-time state data information (for example, position, speed, time stamp and temperature) of the computing node, and then feeding back to the service device.

[0022] In a possible implementation, the method further comprises the following steps of:

[0023] The data processing module calculates the position information based on a hash algorithm to acquire target position information Adress;

[0024] The data processing module stores the target position information Adress and the time stamp time into the second cache module based on HashMap.

[0025] Optionally, the target position information Adress is calculated based on the following formula:

[0026] Address=ax+bmod(N)

[0027] In the formula, x is position information, a and b are calculation parameters, N is the number of calculation stages, and mod(N) is a calculation function.

[0028] In a possible implementation, the storing, by the second cache module, of the target position information Adress and the timestamp time based on the HashMap comprises:

[0029] The data processing module obtains a key value of the HashMap based on the target position information Adress and the timestamp time.

[0030] Optionally, the key value is obtained based on the following formula:

[0031] key = Address + time.

[0032] Embodiments of the present application obtain current position information and a timestamp time of each computing node in real time through a multi-perception device, in particular, through a multi-sensor networking manner, and recompute the value of the position information through a consistent hash algorithm.

[0033] In a second aspect, embodiments of the present application further provide a data real-time synchronization device for a plurality of computing nodes, comprising:

[0034] An obtaining unit, configured to obtain real-time data of each computing node based on an observer module;

[0035] A storage unit, configured to store the real-time data to a first cache module;

[0036] An extraction unit, configured to perform information extraction on the real-time data stored to the first cache module by a data processing module, and obtain an extraction result; wherein the extraction result comprises position information and a timestamp time of the real-time data;

[0037] A processing unit, configured to perform processing on the extraction result by the data processing module, obtain a processing result, and store the processing result to a second cache module.

[0038] In a third aspect, embodiments of the present application provide a service device, which comprises a processor configured to support the service device to realize corresponding functions in the vehicle driving control method provided in the first aspect. The service device can further comprise a memory coupled with the processor, which stores necessary program instructions and data of the service device. The service device can further comprise a communication interface, configured to enable the service device to communicate with other devices or a communication network.

[0039] In a fourth aspect, the present application provides a chip system, which comprises a processor for supporting a service device to implement the functions involved in the first aspect. In a possible design, the chip system further comprises a memory, and the memory is configured to store program instructions and data necessary for the data sending device. The chip system can be composed of a chip, or can include a chip and other discrete devices

[0040] In a fifth aspect, an embodiment of the present application further provides a computer storage medium, which stores a computer program. The computer program is executed by a processor to implement the method described above.

[0041] In a sixth aspect, an embodiment of the present application further provides a computer program, which comprises instructions. When the computer program is executed by a computer, the computer is caused to perform the method described above. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 FIG. 1 is a flow diagram of a data real-time synchronization method of multiple computing nodes provided by an embodiment of the present application;

[0043] Figure 2 FIG. 2 is a schematic diagram of working principles of an observer module of multiple computing nodes provided by an embodiment of the present application;

[0044] Figure 3 FIG. 3 is a schematic diagram of storage principles of a second storage module provided by an embodiment of the present application;

[0045] Figure 4 FIG. 4 is an example of a data real-time synchronization method of multiple computing nodes provided by an embodiment of the present application;

[0046] Figure 5 FIG. 5 is a structural schematic diagram of a data real-time synchronization apparatus of multiple computing nodes provided by an embodiment of the present application. DETAILED DESCRIPTION

[0047] The embodiments of the present application will be described below with reference to the drawings.

[0048] The terms "first" and "second" and the like in the description and claims of the present application and the accompanying drawings are used to distinguish different objects, rather than to describe a particular order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include other steps or units not listed, or can optionally include other steps or units inherent to the process, method, product or device.

[0049] Reference to“an embodiment” herein means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase“in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily all referring to a common set of embodiments, although they can. It will be explicitly understood that the application can be combined with one or more aspects of the embodiments described in this specification that are not necessarily mutually exclusive.

[0050] As used in this description, the terms“component,”“module,”“system,” and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and / or a computer. By way of illustration, both an application running on a computing device and the computing device can be a component. One or more components can reside within a process and / or thread of execution and a component can be localized, partially and / or entirely, in one computer or distributed between two or more computers. In addition, these components can execute from various computer readable media having various data structures stored thereon. The components can communicate by way of local and / or remote processes such as in accordance with a signal having one or more data packets (e.g., data from one component interacting with another component in a local system, distributed system, and / or across a network such as the Internet with other systems via the signal).

[0051] First, some terms in the present application are explained and described, so as to facilitate the understanding of those skilled in the art.

[0052] (1) HashMap: an implementation of the Map interface based on a hash table.

[0053] (2) Hash table (also called hash table), is a data structure according to the key value (key value) and direct access; that is, it accesses the record by mapping the key value to a position in the table to speed up the search. The mapping function is called hash function, and the array storing the record is called hash table.

[0054] (3) Hash algorithm: is to map arbitrary length binary value to shorter fixed length binary value, this small binary value is called hash value; hash value is a unique and extremely compact numerical representation of a piece of data.

[0055] (4) Publish-Subscribe pattern: In software architecture, publish subscribe is a messaging paradigm, where senders of messages, called publishers, do not send messages directly to specific receivers, called subscribers. Instead, published messages are addressed in a topic space of categories, without knowledge of what subscribers, if any, exist for the topic. Similarly, a subscriber expresses interest in one or more categories and only receives messages that are of interest, without knowledge of the specific publishers (if any) that may exist.

[0056] In order to facilitate the understanding of the embodiments of the present application, first, one of the multi-computing node data real-time synchronization system architectures based on which the embodiments of the present application are described; the multi-computing node data real-time synchronization system includes a service device, a plurality of computing nodes and a plurality of sensing devices; wherein the plurality of sensing devices monitor the state change information of the plurality of computing nodes in real time; the service device and the plurality of sensing devices communicate based on the network, so that the service device can obtain the real-time data of the plurality of computing nodes based on the plurality of sensing devices.

[0057] In the present application, the service device includes an observer module, a data processing module, a first cache module and a second cache module.

[0058] Among them, the service device obtains the real-time state information of the plurality of computing nodes through the plurality of sensing devices based on the observer module; then the service device stores the real-time state information of the plurality of computing nodes based on the first cache module; the service device processes the storage information of the first cache module based on the data processing module, obtains the target data, and then stores the target data in the second cache module of the service device, thereby realizing the data real-time synchronization of the plurality of computing nodes.

[0059] The service device of the present application further includes a processor configured to support the corresponding functions of the service device in the method of data real-time synchronization of the plurality of computing nodes. The service device can also include a memory coupled to the processor, which stores the necessary program instructions and data of the service device. The service device can also include a communication interface for communication between the service device and other devices or communication networks.

[0060] Among them, the processor can be any conventional processor, such as a commercially available central processing unit (CPU). The memory can be a hard disk drive.

[0061] The service device of the present application can be installed at any location as needed.

[0062] The computing node of the present application can be various intelligent devices; for example: watches, mobile phones or cars, etc.

[0063] The perception device of the present application can be a sensor or a camera or the like device with equivalent functions; wherein the perception device can be arranged inside the computing node, for monitoring and collecting the data information of the real-time state of the computing node (for example: position, speed timestamp and temperature and the like real-time state data information), and then feeding back to the service device.

[0064] The multi-computing node data real-time synchronization system in the embodiments of the present application includes but is not limited to the above data real-time synchronization system.

[0065] As shown in Figure 1 The embodiments of the present application provide a multi-computing node data real-time synchronization method, which can be applied to the above multi-computing node data real-time synchronization system, including:

[0066] Step S1: obtaining real-time data of each computing node based on an observer module;

[0067] Specifically, the observer module obtains real-time data of each computing node, including: the first cache module subscribes to the state information of each computing node; when the state information of the computing node is updated, the observer module obtains the real-time data of the computing node.

[0068] Wherein, the observer module is realized based on the publish-subscribe mode, and is used for controlling and managing the behaviors of objects that exist in a dependent relationship with each other and are not independent; when a plurality of objects exist in a one-to-many dependent relationship, when the state of an object changes, all objects dependent on it are notified and automatically updated, and are applied to the multi-computing node data real-time synchronization system.

[0069] As shown in Figure 2 Subject (abstract target): also called theme, refers to the observed object, that is, the observer, defines a set of observers in the target, and provides a series of methods to add or delete observer objects, and defines a notification method notify; through the architecture inheritance and object association, the real-time change of data is notified to the subscribed observer through the update interface in real time, and the real-time performance of data synchronization is improved.

[0070] Subject state (concrete target): subclass of abstract target, usually contains data that changes frequently, when the state changes, notifies each observer, and also implements the abstract business logic defined in the target class, if the abstract target class does not need to be extended, the concrete target class can be omitted;

[0071] Observer (abstract observer): respond to the observation target, generally defined as an interface; have the method of notify, add, delete, maintain the state data of the concrete observation target, and timely notify the subscribed abstract "observer" through the object association.

[0072] Observer state (concrete observer): a reference to a concrete target is maintained in the concrete observer, and the state of the concrete observer is stored. These states need to be consistent with the state of the concrete target, and the update method of the abstract observer is implemented.

[0073] Further, when the state information of the computing node is updated, the observer module acquires the real-time data of the computing node, comprising: detecting the state information of each computing node based on a sensing device; when the sensing device detects that the state information of the computing node is updated, the sensing device acquires the real-time data of the computing node; the sensing device sends the real-time data to the observer module.

[0074] Among them, the data processing module and the first cache module of the multi-computing node data real-time synchronization system subscribe to the data state information of multiple sensing devices. When new data is generated, the state change of the computing node will immediately notify the data processing module and the first cache module. Through the trigger mode of "publish-subscribe", the real-time of data synchronization is guaranteed, and the coupling relationship between the target and the observer is reduced. The coupling relationship between the two is abstract, which guarantees the scalability of the data real-time synchronization system.

[0075] Generally, when traditional multi-sensor networks or multi-computing nodes acquire data synchronization, due to the different time synchronization between sensors, the position information is also different, or the data of multiple sensors participating in cross positioning is not from the same moment, resulting in error in acquiring data; At the same time, the traditional synchronization method basically relies on the way of caching data by relational database, without considering the synchronization scheme for high-throughput real-time data, that is, there is no more efficient data caching and searching mechanism.

[0076] The embodiments of the present application are based on sensors, cameras and other sensing devices, which are connected through internal network connection and use the data caching method of the present application to enhance the real-time of synchronized data, ensure the accuracy of synchronized data when processing high-throughput real-time data, and avoid a large amount of redundant data through the networking of multiple sensing devices and multiple computing nodes.

[0077] Step S2: store the real-time data to the first cache module;

[0078] Step S3: The data processing module extracts information from the real-time data stored in the first cache module, and obtains an extraction result; the extraction result includes position information and a timestamp time of the real-time data;

[0079] Step S4: The data processing module processes the extraction result, obtains a processing result, and stores the processing result in a second cache module.

[0080] Specifically, the processing of the extraction result, the obtaining of the processing result, and the storing of the processing result in the second cache module include:

[0081] The data processing module calculates the position information based on a hash algorithm, and obtains target position information Adress.

[0082] The data processing module stores the target position information Adress and the timestamp time in the second cache module based on a HashMap.

[0083] Embodiments of the application obtain current position information and a timestamp time of each computing node in real time through a multi-sensing device, especially in a multi-sensor networking manner, and re-calculate the value of the position information through a consistent hash algorithm.

[0084] The target position information Adress is calculated based on the following formula:

[0085] Address=ax+bmod(N)

[0086] In the formula, x is the position information, a and b are calculation parameters, N is the number of calculation stages, and mod(N) is a calculation function.

[0087] Specifically, the storing of the target position information Adress and the timestamp time in the second cache module based on the HashMap includes:

[0088] The data processing module obtains a key value of the HashMap based on the target position information Adress and the timestamp time.

[0089] The key value is calculated based on the following formula:

[0090] key=Address+time.

[0091] As Figure 3As shown, a hash table data structure Map is used as a cache mode of real-time synchronization data, the key value type of Map is string, the key value is composed of Address+time, and the value corresponding to map[key] is the current cached real-time synchronization data information.

[0092] Specifically, the position information and the timestamp are stored based on the HashMap; the position information includes multiple position information such as the first position information, the second position information, and the third position information, and the timestamp includes multiple timestamps such as the first timestamp, the second timestamp, and the third timestamp.

[0093] The HashMap obtains a key value according to a set of position information and a timestamp.

[0094] According to a key value, a value is obtained.

[0095] For example, a first key value is obtained according to the first target position information and the first timestamp, and a first value is obtained according to the first key value.

[0096] A second key value is obtained according to the second target position information and the second timestamp, and a second value is obtained according to the second key value.

[0097] A third key value is obtained according to the third target position information and the third timestamp, and a third value is obtained according to the third key value.

[0098]

[0099] An Nth value is obtained.

[0100] Finally, based on N values, a hash table is formed, and the real-time synchronization of data of multiple computing nodes is realized; N is a positive integer.

[0101] The embodiments of the application combine the networking mode of multiple computing nodes, ensure the real-time of data synchronization, ensure the synchronization of the timestamp and the position information, improve the accuracy and flexibility of data synchronization, and also reduce the burden of the system.

[0102] As shown in the figure, Figure 4 The above embodiments of the application can be implemented based on the following implementation modes:

[0103] (1) the perception device includes a first perception device, a second perception device, a third perception device, and an Nth perception device; based on the N perception devices, real-time data of the multi-computing nodes are monitored and collected, and then the collected real-time data of the multi-computing nodes are sent to an observer module; the observer module sends the acquired real-time data to a first cache module for storage.

[0104] (2) the data processing module extracts the real-time data stored in the first cache module, acquires position information and a timestamp of the real-time data;

[0105] (3) the data processing module processes the position information based on a hash algorithm to acquire target position information;

[0106] (4) the data processing module acquires a key value of a Hashmap based on the target position information and the timestamp, forms a hash table, and stores the hash table to a second cache module;

[0107] (5) then, new data is waited for, that is, real-time updated data of each computing node detected by the perception device.

[0108] As shown in Figure 5 , the embodiment of the application further provides a multi-computing node data real-time synchronization device 500, including:

[0109] an acquisition unit 501 configured to acquire real-time data of each computing node based on an observer module;

[0110] a storage unit 502 configured to store the real-time data to a first cache module;

[0111] an extraction unit 503 configured to perform information extraction on the real-time data stored in the first cache module by a data processing module, and acquire an extraction result; wherein the extraction result includes position information and a timestamp time of the real-time data;

[0112] a processing unit 504 configured to process the extraction result by the data processing module, and store the extraction result to a second cache module.

[0113] Optionally, the acquisition of the real-time data of each computing node based on the observer module includes:

[0114] the first cache module subscribes to state information of each computing node;

[0115] when the state information of the computing node is updated, the observer module acquires real-time data of the computing node.

[0116] Optionally, when the state information of the computing node is updated, the observer module acquires real-time data of the computing node, comprising:

[0117] The perception device detects the state information of each computing node based on perception equipment;

[0118] When the perception device detects that the state information of the computing node is updated, the perception device acquires the real-time data of the computing node updated by the perception device;

[0119] The perception device sends the real-time data to the observer module.

[0120] Optionally, the extraction result is processed and stored in a second cache module, comprising:

[0121] The data processing module calculates the target location information Adress based on a hash algorithm on the location information;

[0122] The data processing module stores the target location information Adress and the timestamp time in the second cache module based on HashMap.

[0123] Optionally, the target location information Adress is calculated based on the following formula:

[0124] Address=ax+bmod(N)

[0125] In the formula, x is the location information; a and b are calculation parameters; N is the number of calculation stages; and mod(N) is a calculation function.

[0126] Optionally, the target location information Adress and the timestamp time are stored in the second cache module based on HashMap, comprising:

[0127] The data processing module acquires the key value of the HashMap based on the target location information Adress and the timestamp time.

[0128] Optionally, the key value is calculated based on the following formula:

[0129] key=Address+time.

[0130] The application provides a chip system, which comprises a processor for supporting a service device to realize the functions involved in the first aspect. In a possible design, the chip system further comprises a memory, and the memory is configured to store necessary program instructions and data of the data sending device. The chip system can be composed of a chip, or can comprise a chip and other discrete devices

[0131] An embodiment of the present application further provides a computer storage medium storing a computer program, which, when executed by a processor, implements the method described above.

[0132] An embodiment of the present application further provides a computer program, which comprises instructions, which, when executed by a computer, cause the computer to perform the method described above.

[0133] In addition, other configurations and effects of the apparatus of the embodiments of the present application are known to those skilled in the art, and to reduce redundancy, they are not described here.

[0134] It should be noted that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a list of executable instructions for implementing logic functions, and can be specifically embodied in any computer-readable medium for use by an instruction execution system, apparatus or device, such as a computer-based system, a system including a processor, or other system that can fetch and execute instructions from the instruction execution system, apparatus or device, or in conjunction with these instructions execution system, apparatus or device. For the purpose of the present description, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transport programs for use by an instruction execution system, apparatus or device, or in conjunction with these instruction execution system, apparatus or device. More specific examples (non-exhaustive list) of computer-readable medium include the following: electrical connections having one or more wires (electronic devices), portable computer diskettes (magnetic devices), random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memories), fiber optic devices, and portable compact disk read-only memories (CDROMs). In addition, the computer-readable medium can even be paper or other suitable medium on which the program can be printed, as the program can be electronically obtained, for example, by optical scanning of the paper or other medium, followed by electronic conversion, interpretation or processing, if necessary, in other suitable manner, and then stored in a computer memory.

[0135] It should be understood that various aspects of the application can be implemented in hardware, software, firmware or a combination of them. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following technologies, known in the art, or their combinations can be used: discrete logic circuitry having logic gates for implementing logic functions upon an application data signal, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.

[0136] In the description of the present application, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific feature, structure, material or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. The illustrative representations of the above terms in the present specification do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0137] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application.

[0138] In addition, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise specifically limited.

[0139] In this application, unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connecting", "fixing" and the like should be understood broadly, for example, can be fixed connection, can also be detachable connection, or integral; can be mechanical connection, can also be electrical connection; can be directly connected, can also be indirectly connected through an intermediate medium, can be the internal communication of two elements or the interaction relationship of two elements, unless otherwise explicitly limited. For those skilled in the art, the specific meaning of the above terms in this application can be understood according to the specific circumstances.

[0140] In this application, unless otherwise explicitly specified and limited, the first feature is "on" or "under" the second feature, which can be direct contact between the first and second features, or indirect contact between the first and second features through an intermediate medium. Moreover, the first feature "above", "above" and "above" the second feature can be directly above or obliquely above the first feature, or only indicate that the horizontal height of the first feature is higher than that of the second feature. The first feature "below", "below" and "below" the second feature can be directly below or obliquely below the first feature, or only indicate that the horizontal height of the first feature is less than that of the second feature.

[0141] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.

Claims

1. A method for real-time data synchronization across multiple computing nodes, characterized in that, include: Real-time data from each computing node is obtained based on the observer module; The real-time data is stored in the first cache module; The data processing module extracts information from the real-time data stored in the first cache module and obtains the extraction result; wherein, the extraction result includes the location information and timestamp of the real-time data; The data processing module processes the extraction results, obtains the processing results, and stores the processing results in the second cache module; The step of processing the extraction result, obtaining the processing result, and storing the processing result in the second cache module includes: The data processing module calculates the location information based on a hash algorithm to obtain the target location information Address; The data processing module stores the target location information (Address) and timestamp (time) in the second cache module based on a HashMap. The process of storing the target location information (Address) and timestamp (time) in the second cache module based on a HashMap includes: The data processing module obtains the key value of the HashMap based on the target location information (Adress) and the timestamp (time). The target location information Adress includes multiple location information, the timestamp time includes multiple timestamps, and the HashMap obtains a key value based on a set of the location information and the timestamps.

2. The method according to claim 1, characterized in that, The real-time data acquisition of each computing node based on the observer module includes: The first cache module subscribes to the state information of each computing node; When the status information of the computing node is updated, the observer module obtains the real-time data of the computing node.

3. The method according to claim 2, characterized in that, When the state information of the computing node is updated, the observer module acquires the real-time data of the computing node, including: The state information of each computing node is detected by sensing devices; When the sensing device detects an update in the status information of the computing node, the sensing device acquires the updated real-time data of the computing node. The sensing device sends the real-time data to the observer module.

4. The method according to claim 1, characterized in that, The target location information Address is calculated based on the following formula: Address = ax + bmod(N) In the formula, x represents the location information; a and b are the calculation parameters; N represents the number of calculation stages; and mod(N) is the calculation function.

5. The method according to claim 1, characterized in that, The key value is calculated based on the following formula: key = Address + time.

6. A real-time data synchronization device for multiple computing nodes, characterized in that, For implementing the method as described in any one of claims 1-5, comprising: The acquisition unit is used to acquire real-time data from each computing node based on the observer module; Storage unit, used to store the real-time data to the first cache module; An extraction unit is used by the data processing module to extract information from the real-time data stored in the first cache module and obtain extraction results; wherein, the extraction results include the location information and timestamp of the real-time data; The processing unit is used by the data processing module to process the extraction result, obtain the processing result, and store the processing result in the second cache module.

7. A computer storage medium, characterized in that, The computer storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-5.

8. A computer program, characterized in that, The computer program includes instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Data processing method and device, terminal and readable storage medium

    CN113076321A