Multi-node hot backup method and device
By sending data packets to computing nodes to record timestamps and generating a probability distribution map of processing time, abnormal nodes are dynamically detected and replaced, solving the problem of wasted computing resources in existing technologies and achieving efficient utilization of computing resources and safe backup of autonomous driving systems.
Patent Information
- Application Number
- CN202310691720.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-12
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-06-12
AI Technical Summary
In existing technologies, redundant backup schemes for distributed systems waste computing resources in vehicle systems and cannot effectively achieve dynamic backup of computing nodes, especially when computing resources are scarce, they cannot meet the safety requirements of autonomous driving systems.
By sending data packets at a preset frequency to computing nodes, recording timestamps, and generating a probability distribution map of processing time, abnormal nodes can be dynamically detected and backup nodes can be replaced when necessary, thereby reducing the consumption of computing resources.
It improves the utilization rate of computing resources, reduces the waste of computing resources, realizes dynamic backup of computing nodes, and meets the safety requirements of autonomous driving systems.
Smart Images

Figure CN116627722B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a multi-node hot backup method and apparatus. Background Technology
[0002] As autonomous driving and driver assistance systems mature, system functional nodes become increasingly complex. A single computing platform can no longer meet the computational needs, requiring a distributed system architecture to allocate overall in-vehicle computing resources. The security of this distributed system is paramount, especially for in-vehicle systems, as it directly impacts the safety of drivers and passengers. Therefore, backup of computing nodes is an urgent necessity.
[0003] In existing technologies, backup nodes are typically loaded simultaneously with compute nodes to prevent compute node failures. However, this setup requires the system to load both backup and compute nodes regardless of whether the compute node fails, resulting in the occupation of limited system resources and low resource utilization. Summary of the Invention
[0004] This application provides a multi-node hot backup method and apparatus that does not require excessive computing resources and can improve resource utilization.
[0005] In a first aspect, embodiments of this application provide a multi-node hot backup method, the method comprising:
[0006] Different first data packets are sent to multiple computing nodes at a preset frequency. The data types in the first data packets are the same. The data type of the first data packets is a preset data type, which is used to record the timestamp of the first data packet transmission.
[0007] The first computing node receives a second data packet sent by the first computing node. The second data packet includes a first timestamp of the first computing node receiving the first data packet and a second timestamp of the first computing node sending the second data packet. The data type of the second data packet is the same as the data type of the first data packet. The first computing node is any one of the plurality of computing nodes.
[0008] The first timestamp and the second timestamp are matched and calculated to obtain multiple processing times of the first computing node;
[0009] Based on the multiple processing times, a first probability distribution map corresponding to the first computing node is generated;
[0010] Upon receiving a third data packet sent by the first computing node, the system determines whether the first computing node is abnormal based on the first probability distribution map, wherein the data type of the third data packet is the same as the data type of the first data packet.
[0011] If the first computing node malfunctions, the backup node of the first computing node will replace the first computing node.
[0012] In one embodiment, upon receiving a third data packet sent by the first computing node, determining whether the first computing node is abnormal based on the first probability distribution map includes:
[0013] If the processing time of the first computing node in processing the received first data packet is within the preset abnormal range of the first probability distribution map, it is determined that the first computing node is abnormal.
[0014] In one embodiment, determining that the first computing node is abnormal when the processing time of the first computing node in processing the received first data packet is within a preset abnormal range of the first probability distribution map includes:
[0015] If the number of times the processing time of the first computing node in processing the received first data packet falls within the preset abnormal range of the first probability distribution map reaches a preset threshold, it is determined that the first computing node is abnormal.
[0016] In one embodiment, replacing the first computing node with a backup node in the event of an anomaly in the first computing node includes:
[0017] If the first computing node is abnormal, the first computing node will be set as the first problem node;
[0018] Load the first backup node and switch the first problem node to the first backup node. The first backup node corresponds to the first computing node and has a higher priority than the first problem node.
[0019] Set the priority of the first backup node after loading to the priority of the first compute node.
[0020] In one embodiment, replacing the first computing node with a backup node in the event of an anomaly in the first computing node includes:
[0021] If the first computing node is abnormal, the first computing node will be set as the second problem node;
[0022] A filtering node is connected, and the filtering node outputs output data corresponding to the first data packet received by the second problem node, so that the second problem node can process the first data packet normally;
[0023] Load the second backup node and switch the second problem node to the second backup node, which corresponds to the first computing node.
[0024] In one embodiment, the aforementioned access filtering node, based on the first data packet received by the second problem node, outputs processing data corresponding to the first data packet to enable the second problem node to process the first data packet normally, including:
[0025] Obtain the first data packet input to the second problem node;
[0026] Based on the first data packet, estimate the output result of the first data packet;
[0027] The output result is used as the output result of the second problem node, so that the second problem node can process the first data packet normally.
[0028] In one embodiment, prior to the aforementioned access filtering node, the method further includes:
[0029] The filtering nodes are preloaded into the backup process pool;
[0030] When the first computing node is set as the second problem node, the filtering node is obtained from the backup process pool.
[0031] In one embodiment, in the event of an anomaly in the first computing node, replacing the first computing node with a backup node includes:
[0032] When the first computing node is a node that requires initialization, the first computing node is backed up by the filtering node before the initialization operation is performed. The initialization operation includes assigning values to the variables of the first computing node.
[0033] In the event of an anomaly in the first computing node, a third backup node is loaded, which corresponds to the first computing node.
[0034] Input initialization data into the third backup node so that the third backup node completes the initialization operation;
[0035] Switch the first computing node to the third backup node.
[0036] In one embodiment, before sending different first data packets to multiple computing nodes at a preset frequency, the method further includes:
[0037] Obtain the configuration file for each compute node, which includes the number of topics subscribed to by each compute node;
[0038] The priority order of the multiple computing nodes is determined based on the number of subscribed topics;
[0039] The multiple computing nodes are backed up according to the priority order, and the backup content is stored on the multiple backup nodes.
[0040] Secondly, this application provides a multi-node hot backup device, the device comprising:
[0041] The sending module is used to send different first data packets to multiple computing nodes at a preset frequency. The first data packets contain the same data type, and the data type of the first data packets is a preset data type. The preset data type is used to record the timestamp of the first data packet transmission.
[0042] The receiving module is used to receive a second data packet sent by a first computing node. The second data packet includes a first timestamp of the first computing node receiving the first data packet and a second timestamp of sending the second data packet. The data type of the second data packet is the same as the data type of the first data packet. The first computing node is any one of the plurality of computing nodes.
[0043] The calculation module is used to perform matching calculations on the first timestamp and the second timestamp to obtain multiple processing times of the first calculation node;
[0044] The generation module is used to generate a first probability distribution map corresponding to the first computing node based on the multiple processing times;
[0045] The diagnostic module is used to determine whether the first computing node is abnormal based on the first probability distribution map when it receives a third data packet sent by the first computing node, wherein the data type of the third data packet is the same as the data type of the first data packet.
[0046] The replacement module is used to replace the first computing node with a backup node in the event of an anomaly in the first computing node.
[0047] Thirdly, embodiments of this application provide an electronic device, which includes: a processor and a memory storing computer program instructions;
[0048] When the processor executes computer program instructions, it implements the multi-node hot backup method as described in any of the embodiments of the first aspect.
[0049] Fourthly, embodiments of this application provide a computer storage medium storing computer program instructions, which, when executed by a processor, implement the multi-node hot backup method as described in any of the embodiments of the first aspect.
[0050] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform a multi-node hot backup method as described in any of the embodiments of the first aspect above.
[0051] In a multi-node hot backup method and apparatus provided in this application embodiment, different first data packets are sent to multiple computing nodes at a preset frequency. The data types of the first data packets are the same, and the data type of the first data packets is a preset data type used to record the timestamp of the transmission of the first data packets. A second data packet sent by a first computing node is received. The second data packet includes a first timestamp of the first computing node receiving the first data packet and a second timestamp of the second data packet being sent. The data type of the second data packet is the same as that of the first data packet. The first computing node is any one of the multiple computing nodes. The first timestamp and the second timestamp are matched and calculated to obtain multiple processing durations. A first probability distribution map corresponding to the first computing node is generated based on the multiple processing durations. When a third data packet sent by the first computing node is received, it is determined whether the first computing node is abnormal according to the first probability distribution map. The data type of the third data packet is the same as that of the first data packet. If the first computing node is abnormal, the backup node of the first computing node is replaced by the first computing node. Using the above method, the timestamp of each data packet transmission can be recorded according to the first data packet corresponding to the preset data type. This allows for the calculation of the processing time of each computing node for each first data packet based on these timestamps, generating a probability distribution map of the processing time for each computing node. Based on this probability distribution map, it can be determined whether a computing node is malfunctioning and unable to process data packets. In the event of a computing node malfunction, a backup node will replace the malfunctioning node. Thus, by simply reading the timestamp of each data packet transmission, the processing time of the computing node can be obtained to detect whether a computing node is malfunctioning. Furthermore, a backup node is only loaded and replaced when a computing node malfunctions, thereby reducing the waste of computing resources and improving the utilization rate of computing resources. Attached Figure Description
[0052] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 This is a flowchart illustrating a multi-node hot backup method provided in one embodiment of this application;
[0054] Figure 2 This is a schematic diagram of a probability distribution diagram provided in an embodiment of this application;
[0055] Figure 3 This is a schematic diagram illustrating the relationship between computing nodes in a computing chain, provided in an embodiment of this application.
[0056] Figure 4 This is a schematic diagram of the structure of a multi-node hot backup device provided in an embodiment of this application;
[0057] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0058] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0059] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0060] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" or any other variations thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0061] With the development of autonomous driving technology, the computational chain of onboard computing systems is becoming increasingly complex, and the demand for computational security is becoming increasingly stringent. To address this growing functional safety requirement, distributed system hot backup solutions have emerged. Currently, the main redundancy backup solutions for distributed systems fall into the following categories:
[0062] A dual-machine backup mechanism is adopted, including a server, clients and corresponding bus technology. The client group consists of two or more machines, divided into a primary client and a backup client. The backup client performs heartbeat detection on the primary client to determine the health status of the node.
[0063] Alternatively, based on the Quality of Service (QoS) policy of the Data Distribution Service (DDS), multiple node instances can be loaded and set with different priorities. Low-priority nodes can be used as backups. When a high-priority node fails, the priority of the low-priority node is immediately increased, and the problematic node is deregistered, thereby achieving the hot backup function of functional nodes.
[0064] However, in the aforementioned existing solutions, the dual-machine hot backup redundancy scheme increases the system's redundancy on top of the hardware. For space-intensive devices, such as vehicle systems with limited computing resources, fully utilizing the computing power of the onboard equipment undoubtedly leads to a waste of computing resources. In extreme cases, if both hosts fail, the system cannot adequately meet functional safety requirements.
[0065] The QoS (Quality of Service) strategy employed in DDS (Distributed System Datasetter) heavily relies on DDS's underlying communication mechanism and requires loading multiple instances of each node simultaneously, resulting in the consumption of limited system resources and making it unsuitable for in-vehicle systems. Therefore, existing distributed system redundancy backup strategies lack a method to achieve complete system redundancy backup, especially for autonomous driving systems where computational resources are scarce. The dynamic redundancy hot backup strategy designed in this patent can dynamically adapt to problematic nodes in the system.
[0066] To address the problems of the prior art, this application provides a multi-node hot backup method and apparatus. The multi-node hot backup method provided in this application is described below.
[0067] Before providing a further detailed description of the embodiments of the present invention, the nouns and terms involved in the embodiments of the present invention will be explained, and the nouns and terms involved in the embodiments of the present invention shall be interpreted as follows.
[0068] Node: A relatively independent computing module in an autonomous driving system;
[0069] Computational chain: A complete computational task that starts with the sampling input from the sensor and ends with driving the corresponding actuator, consisting of multiple computational nodes;
[0070] DDS: Developed by the Object Management Group (OMG), DDS is a new specification based on publish / subscribe communication. DDS describes the interfaces and behaviors for publishing, transmitting, and subscribing to data in distributed real-time systems. Independent of the platform system, it can handle distributed data transmission networks and achieve efficient and high-speed data interaction.
[0071] QoS: Quality of Service Policy, refers to the transmission requirements that need to be met during information transmission. Here, it refers to the service policy provided in DDS.
[0072] Kalman Filtering: Filtering is a weighted algorithm that applies different weights to different signal components. Kalman filtering (KF) is a class of optimization autoregressive data processing algorithms, and also a data fusion algorithm. Due to its low computational cost and simple recursive properties, it is widely used in real-time dynamic systems. The extended Kalman filter algorithm can be applied to nonlinear systems.
[0073] Figure 1 A flowchart illustrating a multi-node hot backup method according to an embodiment of this application is shown. Figure 1 As shown, the method may specifically include the following steps:
[0074] S101, send different first data packets to multiple computing nodes at a preset frequency. The data types in the first data packets are the same. The data type of the first data packets is a preset data type, which is used to record the timestamp of the first data packet transmission.
[0075] Optionally, in this embodiment, the autonomous driving technology involves modules such as perception, decision-making, planning, and control, all of which involve a large amount of numerical computation. These computational tasks are divided according to function and distributed as nodes within a high-performance computing platform. The computing platform can consist of hardware devices with different architectures, including but not limited to x86 architecture processors and ARM architecture processors (Advanced RISC Machine, ARM). In this embodiment, a computing node is a relatively independent computing module in the autonomous driving system. The first data packet is the set of data that each computing node needs to process.
[0076] Optionally, in this embodiment, each computing node often has its own fixed data type for processing, which can be int, float, or a custom data structure. The preset data type in this application is a custom data structure data type. Furthermore, the preset data type needs to be compatible with the data types of all computing nodes in the entire computing chain and be able to store the timestamps of data packets of the preset data type being sent to and output from the computing nodes. It is readily understood that in this embodiment, the first data packet may contain not only data of the preset data type but also other types of data; this application does not impose any limitations on this.
[0077] Optionally, in the embodiments of this application, multiple computing nodes can be multiple associated nodes on the entire computing chain; or a single computing node can complete a computing task without needing to perform associated calculations with other computing nodes; or they can be different computing modules corresponding to different vehicles. Here, a computing chain typically refers to the division of a complete computing task, formed by computing nodes as units and data flow as the association. For example, recognizing an image and finally sending it to the control system to control the actuator motor involves many steps, and this entire process can be defined as a computing chain.
[0078] Optionally, in this embodiment, the preset frequency refers to continuously sending data packets to the computing node at a certain transmission frequency. The preset transmission frequency of the first data packet in this application is not specifically limited and can be adjusted according to user needs.
[0079] S102, receive a second data packet sent by the first computing node. The second data packet includes a first timestamp of the first computing node receiving the first data packet and a second timestamp of sending the second data packet. The data type of the second data packet is the same as the data type of the first data packet. The first computing node is any one of the plurality of computing nodes.
[0080] S103, perform matching calculations on the first timestamp and the second timestamp to obtain multiple processing times for the first computing node.
[0081] Optionally, in the embodiments of this application, the first computing node can be any one of the above-mentioned multiple computing nodes, and the same method can be used to obtain the processing time and generate the probability distribution map for each computing node.
[0082] Optionally, in one possible implementation of this application, the first computing node processes the first data packet upon receiving it to obtain a second data packet, and adds the timestamps of receiving the first data packet and sending the second data packet to the data structure corresponding to the second data packet. Thus, the timestamps can be obtained by reading the data structure of the second data packet, and the processing time of the first computing node for each processing of the first data packet can be obtained by analyzing the timestamps.
[0083] Optionally, in this embodiment, for the computing chain, the aforementioned preset type of data packet is transmitted throughout the entire computing chain. During the data packet transmission process, the first data packet passes through each computing node. Due to the special nature of the preset type of data packet, the time points when each computing node receives and sends the preset type of data packet are recorded, thereby obtaining the processing time of each computing node for the corresponding data packet. It is easy to understand that for multiple computing nodes on a computing chain, the data packet received by the next computing node is the data packet output by the previous computing node, but these data packets all contain data of the preset data type in this application.
[0084] Optionally, in this embodiment, the specific method for obtaining the processing time of each computing node is not limited. It can also be done by statistical time dimension and time granularity. This application only provides an illustrative example. S104, Based on the multiple processing times, a first probability distribution map corresponding to the first computing node is generated.
[0085] Optionally, in one possible implementation of this application, after obtaining the processing time of the first computing node, since the first data packet is continuously sent to the computing node at a preset frequency, the processing time of the first computing node for each data packet can be obtained over time. Thus, a first probability distribution map, i.e., a probability map of the processing time of the first computing node, can be drawn based on these processing times. Optionally, the horizontal axis of the first probability distribution map can be the processing time of the first computing node for processing the data packet, and the vertical axis can be the probability of occurrence.
[0086] Optionally, in one possible implementation of this application, the first probability distribution graph can be a normal distribution graph. Of course, it is easy to understand that the normal distribution statistics here are just a specific example provided. This application is not limited to this. The program used to analyze, calculate and statistically analyze the processing time can be customized by the user, including but not limited to other distribution statistics methods such as geometric distribution.
[0087] Optionally, in one possible implementation of this application, for the computation chain, when a computing node receives data of a preset type, it adds the start and completion times of processing that segment of data to the data structure corresponding to that preset type of data as timestamps. After completing the processing of the entire computation chain, a timestamp queue is obtained, ordered by the computation time consumed by each computing node. That is, in a computation chain, the processing time of each computing node is sorted according to the order of the computing nodes in the computation chain. After obtaining the data structure of the preset type of data, the system's health detection node can obtain the timestamps of each computing node processing this data, thereby obtaining the amount of time consumed by the computing node in completing the data processing. Since the first data packet is continuously sent to the computing node at a preset frequency, as time goes by, a normal distribution data graph of the computation time consumed by each computing node can be obtained, that is, a probability distribution graph of the processing time corresponding to each computing node.
[0088] S105, upon receiving the third data packet sent by the first computing node, determine whether the first computing node is abnormal based on the first probability distribution map, wherein the third data packet has the same data type as the first data packet.
[0089] Optionally, in this embodiment, the content of the third data packet can be the same as that of the first data packet. The only difference is that the first data packet is the data sent to the first computing node before the first probability distribution map is generated, and the third data packet is the data sent to the first computing node after the first probability distribution map is generated. The data content of the two can be the same, as long as they can both record the processing time of the first computing node each time it processes data.
[0090] S106, if the first computing node is abnormal, replace the first computing node with a backup node.
[0091] Alternatively, in one possible implementation of this application, such as Figure 2As shown, taking a normal distribution curve as the first probability distribution diagram as an example, after obtaining the normal distribution curve of the processing time corresponding to the computing node, using the 3 sigma (3 times the standard deviation threshold) principle as an example, the user can specify the range of deviation in the normal distribution curve (i.e., the range of abnormal processing time). When the time consumed by the next computing node (i.e., the processing time) exceeds the specified range, the health status of the computing node is judged to be poor, that is, the computing node is judged to be abnormal. Depending on the priority of each computing node, the number of allowed processing time deviations is different. If the number of times the processing time of a computing node exceeds the deviation range exceeds the specified threshold, the corresponding dynamic backup scheduling strategy is further triggered to replace the first computing node, so that the backup node corresponding to the first computing node can still complete the computing work of the abnormal first computing node.
[0092] Specifically, the backup strategy can be determined based on the type of the first computing node. For example, when the first computing node is an associated node in the entire computing chain, the scheduling strategy can be to delay loading the backup node by buffering the node. However, when the first computing node is a computing node capable of completing a complete computing task, the backup node can be loaded directly.
[0093] In one possible implementation of this application, the backup strategy of each computing node can be obtained by directly reading the configuration file of each computing node, thereby enabling the backup of the computing node to be completed directly according to the backup strategy given in the configuration file.
[0094] The 3σ rule states that the probability of a value falling within the range (μ-σ, μ+σ) is 0.6827; the probability of a value falling within the range (μ-2σ, μ+2σ) is 0.9545; and the probability of a value falling within the range (μ-3σ, μ+3σ) is 0.9973. It can be assumed that almost all values of Y are concentrated within the range (μ-3σ, μ+3σ), with the probability of values falling outside this range being less than 0.3%.
[0095] Optionally, in this embodiment, the computational task of a computing node is to process the input data and output the results to other computing nodes for further processing. Different computing nodes may be distributed across different processor platforms. In the prior art, the traditional approach to checking the health status of computing nodes is through a heartbeat detection mechanism. This involves a daemon node sending requests to the target node in a polling manner, requiring a response to determine the node's liveness. While feasible, this method requires a separate daemon node that continuously monitors the target node, wasting computational resources. The probabilistic statistical method used in this application only requires obtaining the processing time of each computing node to determine if it is abnormal. It eliminates the need to send polling requests to the computing node each time, and determines its abnormality by whether the node responds to the query request. This significantly reduces computational resource consumption and improves the utilization rate of computational resources.
[0096] In a multi-node hot backup method provided in this application embodiment, different first data packets are sent to multiple computing nodes at a preset frequency. The data types of the first data packets are the same, and the data type of the first data packets is a preset data type used to record the timestamp of the transmission of the first data packets. A second data packet sent by a first computing node is received. The second data packet includes a first timestamp of the first computing node receiving the first data packet and a second timestamp of the second data packet being sent. The data type of the second data packet is the same as that of the first data packet. The first computing node is any one of the multiple computing nodes. The first timestamp and the second timestamp are matched and calculated to obtain multiple processing durations. A first probability distribution map corresponding to the first computing node is generated based on the multiple processing durations. When a third data packet sent by the first computing node is received, it is determined whether the first computing node is abnormal according to the first probability distribution map. The data type of the third data packet is the same as that of the first data packet. If the first computing node is abnormal, the backup node of the first computing node is replaced by the first computing node.
[0097] Using the above method, the timestamp of each data packet transmission can be recorded according to the first data packet corresponding to the preset data type. This allows for the calculation of the processing time of each computing node for each first data packet based on these timestamps, generating a probability distribution map of the processing time for each computing node. Based on this probability distribution map, it can be determined whether a computing node is malfunctioning and unable to process data packets. In the event of a computing node malfunction, a backup node will replace the malfunctioning node. Thus, by simply reading the timestamp of each data packet transmission, the processing time of the computing node can be obtained to detect whether a computing node is malfunctioning. Furthermore, a backup node is only loaded and replaced when a computing node malfunctions, thereby reducing the waste of computing resources and improving the utilization rate of computing resources.
[0098] In one embodiment, step 105 above can be specifically performed as follows:
[0099] S201, if the processing time of the first computing node in processing the received first data packet is within the preset abnormal range of the first probability distribution map, it is determined that the first computing node is abnormal.
[0100] Optionally, in one possible implementation of this application, the first probability distribution diagram is a normal distribution curve diagram as an example. Taking the 3 sigma principle as an example, the user can specify the range of processing time when an anomaly occurs in the normal distribution curve diagram, that is, the preset anomaly range. When the time consumed by the next computing node exceeds the specified range, the health status of the computing node is judged to be poor, that is, the computing node is judged to be abnormal.
[0101] Optionally, in these optional embodiments, by obtaining the processing time of each computing node through the statistical probability distribution map, it is only necessary to determine whether the computing node is abnormal. It is not necessary to send a query request to the computing node in a polling manner every time. The computing node is judged by whether it responds to the query request, which greatly reduces the occupation of computing resources and improves the utilization rate of computing resources.
[0102] In one embodiment, step 201 above can be specifically performed as follows:
[0103] S301, if the number of times the processing time of the first computing node in processing the received first data packet falls within the preset abnormal range of the first probability distribution map reaches a preset threshold, it is determined that the first computing node is abnormal.
[0104] Optionally, in one possible implementation of this application, the first probability distribution diagram is a normal distribution curve, and the 3 sigma principle is used as an example. The user can specify the range of processing time that anomalies occur in the normal distribution curve, i.e., the preset anomaly range. When the time consumed by the next computing node exceeds the specified range, the threshold of the number of abnormal processing times allowed for the first computing node is determined according to the different priorities of the first computing nodes, i.e., the preset threshold. If the number of abnormal processing times of the first computing node exceeds the preset threshold, it is determined that the first computing node is abnormal, and the corresponding dynamic backup scheduling strategy is further triggered to replace the first computing node, so that the backup node corresponding to the first computing node can still complete the computing work of the abnormal first computing node.
[0105] Optionally, in this embodiment, the preset threshold for the computing node can be provided through a configuration file. When the computing node is loaded into the system and running, the preset threshold can be read as a configuration parameter and configured to the application corresponding to the computing node. The application can decouple the modification of the preset threshold from the computing node.
[0106] Optionally, in these optional embodiments, by obtaining the processing time of each computing node through the statistical probability distribution map, it is only necessary to determine whether the computing node is abnormal. It is not necessary to send a query request to the computing node in a polling manner every time. The computing node is judged by whether it responds to the query request, which greatly reduces the occupation of computing resources and improves the utilization rate of computing resources.
[0107] In one embodiment, step 106 above can be specifically performed as follows:
[0108] S401, if the first computing node is abnormal, the first computing node is set as the first problem node.
[0109] Optionally, in this embodiment of the application, when the first computing node is abnormal, the corresponding backup strategy is executed by determining the node type of the first computing node. Specifically, the backup strategy corresponding to the first computing node can be obtained by reading the configuration file of each computing node.
[0110] Optionally, in one possible implementation of this application, when the first computing node is a computing node capable of completing a complete computing task, the first computing node is set as the problem node.
[0111] S402, Load the first backup node and switch the first problem node to the first backup node. The first backup node corresponds to the first computing node and has a higher priority than the first problem node.
[0112] Optionally, in this embodiment, after setting the first computing node as the problem node, a backup node is directly loaded in the system, and the first problem node is switched to the first backup node. Based on the different priority strategies in DDS, the priority of the backup node is set to be higher than that of the problem node, thereby realizing the switching of node subscription and publishing entities.
[0113] S403, set the priority of the first backup node after loading to the priority of the first computing node.
[0114] Optionally, in this embodiment, after switching the first problem node to the first backup node, the first problem node is deregistered, and then the priority of the first backup node is set to normal, that is, set to the priority of the original first computing node.
[0115] Optionally, in these optional embodiments, when a computing node malfunctions, the backup strategy corresponding to that computing node can be obtained by reading the computing node's configuration file. This allows for dynamic adaptation and adjustment of the backup strategy for each computing node, thereby reducing the consumption of system computing resources and improving the utilization rate of system resources.
[0116] In one embodiment, step 106 above can be specifically performed as follows:
[0117] S501, if the first computing node is abnormal, set the first computing node as the second problem node.
[0118] Optionally, in this embodiment of the application, when the first computing node is abnormal, the corresponding backup strategy is executed by determining the node type of the first computing node. Specifically, the backup strategy corresponding to the first computing node can be obtained by reading the configuration file of each computing node.
[0119] Optionally, in one possible implementation of this application, when the first computing node is a computing node that can complete a complete computing task, or when the first computing node is a regional node on the entire computing chain, i.e., an associated node, or when the first computing node is a board-level functional module, the first computing node can be set as the second problem node.
[0120] S502, access the filtering node, the filtering node outputs the output data corresponding to the first data packet received by the second problem node, so that the second problem node can process the first data packet normally;
[0121] S503, load the second backup node and switch the second problem node to the second backup node, the second backup node corresponding to the first computing node.
[0122] Optionally, in this embodiment, a designed filtering node is used to switch the second problematic node that malfunctions. Simultaneously, the second backup node is loaded into the memory data.
[0123] In these optional embodiments, the loading time of the backup node corresponding to different computing nodes is different. This application can extend the loading time of the corresponding backup node by accessing the filter node, so as to ensure that the computing node can still perform computing tasks normally before the backup node is successfully loaded.
[0124] Optionally, in one possible implementation of this application, if the current computing node fails and cannot process the input computational data (i.e., the current computing node only has input and no output), a filtering node is then connected. The filtering node can estimate future data based on historical data. Thus, when a computing node fails, the input data can be estimated using a filtering algorithm to replace the computing node's output. Therefore, the filtering node can temporarily replace the malfunctioning node and perform tasks normally, thereby extending the reloading time of the computing node and the loading time of the backup node.
[0125] Optionally, in this embodiment, if the corresponding backup node takes too long to load or encounters additional problems, the corresponding filter node will activate a safety response strategy. Taking the motor driver as an example, when the corresponding backup node fails to load in time, the filter node will gradually weaken the drive signal of the motor driver node to stop the operation and avoid sudden shutdown operations that could cause accidents to the vehicle.
[0126] In one embodiment, step 502 above can be specifically performed as follows:
[0127] S601, Obtain the first data packet input to the second problem node;
[0128] S602, based on the first data packet, estimate the output result of the first data packet;
[0129] S603, the output result is used as the output result of the second problem node, so that the second problem node can process the first data packet normally.
[0130] Optionally, in one possible implementation of this application, by using the topic subscription / publishing mechanism of nodes in the DDS to select the corresponding QoS quality service policy, historical data for a certain period of time can be retained. The parameters of the Kalman filter algorithm in the filtering node can be tuned using this historical data to obtain the corresponding covariance matrix. This ensures that, given the same input data as the computing node, the error between the output calculated data obtained by the filtering node and the calculated data output by the computing node itself is within an acceptable range, thus achieving the backup effect of the filtering node.
[0131] Kalman filtering algorithms are inherently robust and highly adaptable to their parameters. These parameters, similar to the results of solving equations, are often the core of the algorithm and are adjusted empirically. However, these parameters do have a certain range of values; for example, the covariance matrix can be initially determined based on the variance data and then further adjusted based on the results. Furthermore, there is a degree of coupling and nonlinearity between the parameters, requiring gradual adjustment to ensure that the output calculated through the filtering nodes more closely approximates the actual output.
[0132] Optionally, in one possible implementation of this application, if the current computing node fails and cannot process the input computational data (i.e., the current computing node only has input and no output), a filtering node is then connected. The filtering node can estimate future data based on historical data. Therefore, when a computing node fails, the input data can be estimated using a filtering algorithm to replace the computing node's output. In this way, the filtering node can temporarily replace the malfunctioning node and perform tasks normally, achieving a backup effect for the computing node.
[0133] In these alternative embodiments, existing technologies typically involve complete backups of computing nodes. However, a single computing node can be very large, with long loading times and high resource consumption, making it unsuitable for general use. In contrast, the filtering node of this application only requires adjusting the corresponding parameters to estimate for different computing nodes, thus offering greater applicability. It effectively solves the problem of excessive computing resource consumption and improves the utilization rate of computing resources.
[0134] In one embodiment, prior to step 502 above, the method may further perform the following steps:
[0135] S701, the filter node is preloaded into the standby process pool;
[0136] S702, when the first computing node is set as the second problem node, the filtering node is obtained from the backup process pool.
[0137] Optionally, in one possible implementation of this application, the filter node is preloaded during the system startup phase and designated as a backup process pool for system calls, so that the problematic node can still temporarily execute tasks normally, thereby saving the time of reloading the filter node.
[0138] Optionally, it should be noted that in this embodiment, not all computing nodes are backed up. If a backup node is designated for each computing node, the computing resources of the entire system would need to be doubled; triple backup would require three times the computing resources, which would be a huge drain on the computing resources of the entire system. In this application, several filtering nodes are pre-loaded as a pool, and given priority access to higher-priority computing nodes. It is easy to understand that the priority here is dynamically adjustable; nodes can be retrieved from the pool when needed, and returned to the pool when their priority decreases. This reduces the overhead of reloading filtering nodes, improves the utilization of computing resources, and reduces the occupation of computing resources.
[0139] Optionally, in this embodiment, the system offers two backup methods: one where the user explicitly specifies a backup strategy, and the other where the system automatically adapts. When the user explicitly specifies the computing nodes to be backed up, they must also provide a corresponding backup strategy. The system will back up the computing nodes according to the specified configuration rules, achieving hot switching. For computing nodes not explicitly specified by the user, the system will perform backups according to the computing node priority. The backed-up computing nodes will be executed sequentially according to the priority set by the user for different computing nodes. Furthermore, when the system has ample idle computing resources, the scope of backed-up nodes will be expanded according to their priority, thereby achieving full scheduling of system computing resources and ensuring sufficient system functional safety.
[0140] In one embodiment, step 106 above can be specifically performed as follows:
[0141] S801, when the first computing node is a node that needs initialization, before the first computing node performs initialization, the first computing node is backed up by the filtering node, and the initialization operation includes assigning values to the variables of the first computing node.
[0142] Optionally, in this embodiment of the application, when the first computing node is abnormal, the corresponding backup strategy is executed by determining the node type of the first computing node. Specifically, the backup strategy corresponding to the first computing node can be obtained by reading the configuration file of each computing node.
[0143] Optionally, in one possible implementation of this application, when the first computing node is the computing node that needs to perform initialization operations, the filtering node needs to perform computing node backup before the computing node performs initialization operations. Specifically, the initialization operation may refer to the operation of assigning values to some variables before the computing node performs normal computation.
[0144] S802, if the first computing node is abnormal, load the third backup node, which corresponds to the first computing node;
[0145] S803, input initialization data to the third backup node so that the third backup node completes the initialization operation;
[0146] S804, switch the first computing node to the third backup node.
[0147] Optionally, in this embodiment of the application, after loading the backup node, the existing data previously processed by the computing node is used as input to enable the third backup node to complete the initialization operation, and then the third backup node is replaced with the first computing node.
[0148] Optionally, in these optional embodiments, when a computing node malfunctions, the backup strategy corresponding to that computing node can be obtained by reading the computing node's configuration file. This allows for dynamic adaptation and adjustment of the backup strategy for each computing node, thereby reducing the consumption of system computing resources and improving the utilization rate of system resources.
[0149] In one embodiment, prior to step 101, the method may further perform the following steps:
[0150] S901, Obtain the configuration file for each computing node, the configuration file including the number of subscribed topics for each computing node.
[0151] Optionally, in this embodiment, for computing nodes, the functional program needs to be compiled into machine code for the specified platform in binary format and run. Simultaneously, the parameters required by the computing node are provided in the form of a configuration file, facilitating modification during dynamic debugging. Static analysis can also be performed on the configuration files corresponding to each computing node to obtain the topology of each computing node in the entire computing chain. The provided configuration file information includes, but is not limited to: the number of topics subscribed to by the computing node; all topic names subscribed to by the computing node; the number of topics published by the computing node; all topic names published by the computing node; the current priority of the computing node; and the current backup strategy of the computing node. Optionally, in this embodiment, the configuration file can be provided in YAML, XML, or other formats.
[0152] Optionally, static analysis can be performed by using the timestamps of each computing node recorded in the aforementioned preset type of data packet to obtain the topology of each computing node in a complete computing chain.
[0153] S902, determine the priority order of the multiple computing nodes based on the number of subscribed topics.
[0154] Optionally, in this embodiment of the application, as shown in the above embodiments, in the designed autonomous driving computing node, the computing node is implemented as binary machine code through compilation and runs on a specified computing platform. Meanwhile, the parameters required by the computing node are implemented using configuration files. The configuration file contains information such as the input computing node, the names of the topics subscribed to and published by the output computing node, etc. After performing static analysis on the entire chain of nodes, a complete node topology diagram can be obtained.
[0155] S903, back up the multiple computing nodes according to the priority order, and store the backup content in the multiple backup nodes.
[0156] Optionally, in this embodiment, the system performs static analysis based on the complete computation chain of multiple modules in autonomous driving. The priority of each computation node is determined by the number of input / output topics corresponding to that node, and the priority level can be mapped to [1-100]. For example, a level 1 computation node is the highest priority, a level 2 computation node is the second highest priority, and so on. It is understood that this is merely an illustrative example, and the specific representation of priority is not limited; it can be adjusted according to user needs. A default priority is assigned to each computation node based on the computational analysis results. When system resources are relatively idle, this priority can be used to proactively back up computation nodes, thereby improving the utilization of computational resources and reducing their consumption.
[0157] Optionally, in one possible implementation of this application, based on the above-mentioned invention examples, a simplified flowchart of the corresponding vehicle trajectory tracking algorithm is provided, such as... Figure 3 As shown, the computational chain in autonomous driving technology can be divided into nodes based on their computational functions, as follows: perception algorithm node, data fusion algorithm node, localization algorithm node, and control algorithm node.
[0158] The underlying communication between nodes is implemented through DDS as middleware, and entity objects are created by calling the DDS registration function interface.
[0159] On the Linux platform, taking the corresponding compute node written in C++ as an example, the compute node is compiled into a dynamic library (.so file), and dynamically loaded using ClassLoader technology through a unified launcher program. Simultaneously with loading the .so dynamic library, the corresponding configuration file needs to be read to complete the configuration of the compute node. The configuration file format includes, but is not limited to, YAML and XML formats. Here are some examples, such as configuring the node using YAML format:
[0160]
[0161]
[0162] Node information includes, but is not limited to, node name, class name, information related to subscribed topics, and information related to published topics.
[0163] By performing static checks on the configuration files, i.e., the static analysis described above, the static relationships between the computing nodes in the system's computing chain can be obtained, yielding similar results. Figure 3 Data relationship diagram in the middle.
[0164] Users can set priority rules for nodes through the "prioprity" field in the configuration file. For specific strategies, please refer to steps 901-903 above.
[0165] Users can set dynamic redundancy hot backup policies for nodes through the "backup" field in the configuration file. For specific execution methods, please refer to steps 401-804 above.
[0166] Meanwhile, the system has a backup strategy for nodes not specified by the user. For specific implementation details, please refer to steps 701-702.
[0167] During the initial vehicle startup phase, test data is used to probe the functions of the entire chain and all modules, initially deriving the corresponding normal distribution curve. In subsequent dynamic driving, the normal distribution parameters are adjusted based on historical data to achieve optimal adaptation. The test data can be from the previous vehicle operation or data pre-installed by the automaker.
[0168] After obtaining the node's health status, the `Liveness` attribute of the node is set using the node health status monitoring capabilities of DDS, enabling other related nodes to detect its health status. `Liveness` is used to identify the health status of the nodes identified by the normal distribution. This parameter is provided by DDS technology.
[0169] The following describes the execution process of dynamic redundancy hot backup of the system:
[0170] by Figure 3 For example, set the data fusion node configuration file, where the node priority is 1 and the backup strategy is filter node backup.
[0171] After the system starts up, test data will be sent first, and the normal distribution of the running time of each computing node will be obtained through the strategies in steps 101-105.
[0172] The structure that records the time consumed by a node's operation is given as an example below, which records relevant information about the node's operation time.
[0173]
[0174] When a data fusion node fails, i.e., the time to complete the computing task times out, or when the number of abnormal processing times reaches the value specified in the cumulative count, a switch will be made between the execution node and the backup node.
[0175] In these optional embodiments, the multi-node hot backup method of this application is implemented in software, which does not require a large amount of system hardware computing resources and can make full use of the computing resources when the system is idle. Loading computing nodes uses configuration files, which allows for easy invocation of different loading strategies. Compared with dual-machine hot backup and DDS's QoS strategy, it provides users with finer-grained operation, can dynamically adapt to different nodes, and ensures less system resource consumption. It can also achieve full node coverage backup and support short-term board-level functional backup, i.e., backing up the computing nodes on the entire development board. The designed node health detection mechanism, which uses a probability distribution map to determine whether a computing node is abnormal, avoids the computational resource consumption problem caused by sending additional heartbeat data to computing nodes, and more accurately reflects the health status of nodes, avoiding situations where some computing nodes may have normal heartbeat detection but abnormal data processing capabilities. Simultaneously, this data processing method can achieve dynamic detection of the entire computing chain and fully automated driving modules, achieving full coverage of health status monitoring for all computing nodes.
[0176] Figure 4 A schematic diagram of a multi-node hot backup device provided in another embodiment of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0177] Reference Figure 4 A multi-node hot backup device may include:
[0178] The sending module 401 is used to send different first data packets to multiple computing nodes at a preset frequency. The first data packets have the same data type, and the data type of the first data packets is a preset data type. The preset data type is used to record the timestamp of the first data packet transmission.
[0179] The receiving module 402 is used to receive a second data packet sent by a first computing node. The second data packet includes a first timestamp of the first computing node receiving the first data packet and a second timestamp of sending the second data packet. The data type of the second data packet is the same as the data type of the first data packet. The first computing node is any one of the plurality of computing nodes.
[0180] The calculation module 403 is used to perform matching calculations on the first timestamp and the second timestamp to obtain multiple processing times of the first calculation node;
[0181] The generation module 404 is used to generate a first probability distribution map corresponding to the first computing node based on multiple processing times.
[0182] The diagnostic module 405 is used to determine whether the first computing node is abnormal based on the first probability distribution map when it receives a third data packet sent by the first computing node, wherein the data type of the third data packet is the same as the data type of the first data packet.
[0183] The replacement module 406 is used to replace the first computing node with a backup node in the event of an anomaly in the first computing node.
[0184] In one embodiment, the multi-node hot backup device may further include:
[0185] The second diagnostic module is used to determine that the first computing node is abnormal when the processing time of the first computing node in processing the received first data packet is within a preset abnormal range of the first probability distribution map.
[0186] In one embodiment, the multi-node hot backup device may further include:
[0187] The third diagnostic module is used to determine that the first computing node is abnormal when the number of times the processing time of the first computing node in processing the received first data packet falls within the preset abnormal range of the first probability distribution map reaches a preset threshold.
[0188] In one embodiment, the multi-node hot backup device may further include:
[0189] The first setting module is used to set the first computing node as the first problem node when the first computing node has an anomaly.
[0190] The first loading module is used to load the first backup node and switch the first problem node to the first backup node. The first backup node corresponds to the first computing node and has a higher priority than the first problem node.
[0191] The second setting module is used to set the priority of the first backup node after loading to the priority of the first computing node.
[0192] In one embodiment, the multi-node hot backup device may further include:
[0193] The third setting module is used to set the first computing node as the second problem node when the first computing node is abnormal.
[0194] The first access module is used to access the filtering node. The filtering node outputs output data corresponding to the first data packet received by the second problem node so that the second problem node can process the first data packet normally.
[0195] The second loading module is used to load the second backup node and switch the second problem node to the second backup node, which corresponds to the first computing node.
[0196] In one embodiment, the multi-node hot backup device may further include:
[0197] The first acquisition module is used to acquire the first data packet input to the second problem node;
[0198] The first estimation module is used to estimate the output result of the first data packet based on the first data packet.
[0199] The first processing module is used to use the output result as the output result of the second problem node, so that the second problem node can process the first data packet normally.
[0200] In one embodiment, the multi-node hot backup device may further include:
[0201] The third loading module is used to preload the filtering nodes into the backup process pool;
[0202] The second acquisition module is used to acquire the filter node from the backup process pool when the first computing node is set as the second problem node.
[0203] In one embodiment, the multi-node hot backup device may further include:
[0204] The first backup module is used to back up the first computing node through the filtering node before the first computing node performs the initialization operation, when the first computing node is a node that needs initialization operation. The initialization operation includes assigning values to the variables of the first computing node.
[0205] The fourth loading module is used to load a third backup node in the event of an anomaly in the first computing node, the third backup node being corresponding to the first computing node;
[0206] The first input module is used to input initialization data to the third backup node so that the third backup node can complete the initialization operation.
[0207] The second replacement module is used to switch the first computing node to the third backup node.
[0208] In one embodiment, the multi-node hot backup device can also:
[0209] The third acquisition module is used to acquire the configuration file of each computing node, the configuration file including the number of subscribed topics for each computing node;
[0210] The second processing module is used to determine the priority order of the multiple computing nodes based on the number of subscribed topics;
[0211] The second backup module is used to back up the multiple computing nodes according to the priority order, and store the backup content in the multiple backup nodes.
[0212] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. They are devices corresponding to the above-mentioned battery thermal runaway early warning method. All implementation methods in the above-mentioned method embodiments are applicable to the embodiments of this device. For details on its specific functions and the technical effects it brings, please refer to the method embodiment section. It will not be repeated here.
[0213] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0214] Figure 5 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.
[0215] The device may include a processor 501 and a memory 502 storing program instructions.
[0216] When processor 501 executes the program, it implements the steps in any of the above method embodiments.
[0217] For example, the program can be divided into one or more modules / units, one or more of which are stored in memory 502 and executed by processor 501 to complete this application. One or more modules / units can be a series of program instruction segments capable of performing a specific function, which describe the program's execution process in the device.
[0218] Specifically, the processor 501 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0219] Memory 502 may include mass storage for data or instructions. For example, and not limitingly, memory 502 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 502 may include removable or non-removable (or fixed) media. Where appropriate, memory 502 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 502 is non-volatile solid-state memory.
[0220] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to one aspect of this disclosure.
[0221] The processor 501 implements any of the methods described in the above embodiments by reading and executing program instructions stored in the memory 502.
[0222] In one example, the electronic device may also include a communication interface 503 and a bus 510. The processor 501, memory 502, and communication interface 503 are connected via the bus 510 and communicate with each other.
[0223] The communication interface 503 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0224] Bus 510 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 510 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0225] Furthermore, in conjunction with the methods in the above embodiments, this application embodiment can provide a storage medium for implementation. This storage medium stores program instructions; when these program instructions are executed by a processor, they implement any of the methods in the above embodiments.
[0226] This application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0227] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0228] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, it will not be described again here.
[0229] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0230] The functional modules shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on machine-readable media or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable media" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer grids such as the Internet, intranets, etc.
[0231] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0232] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to create a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0233] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A multi-node hot backup method, characterized in that, The method includes: Different first data packets are sent to multiple computing nodes at a preset frequency. The data types in the first data packets are the same. The data type of the first data packets is a preset data type, which is used to record the timestamp of the first data packet transmission. The first computing node receives a second data packet sent by the first computing node. The second data packet includes a first timestamp of the first computing node receiving the first data packet and a second timestamp of the first computing node sending the second data packet. The data type of the second data packet is the same as the data type of the first data packet. The first computing node is any one of the plurality of computing nodes. The first timestamp and the second timestamp are matched and calculated to obtain multiple processing times of the first computing node; A first probability distribution map corresponding to the first computing node is generated based on the multiple processing times; Upon receiving a third data packet sent by the first computing node, the system determines whether the first computing node is abnormal based on the first probability distribution map, wherein the data type of the third data packet is the same as the data type of the first data packet. If the first computing node is faulty, the backup node of the first computing node will replace the first computing node. The step of determining whether the first computing node is abnormal based on the first probability distribution map includes: If the processing time of the first computing node in processing the received first data packet is within the preset abnormal range of the first probability distribution map, it is determined that the first computing node is abnormal.
2. The method according to claim 1, characterized in that, The step of determining that the first computing node is abnormal when the processing time of the first computing node in processing the received first data is within a preset abnormal range of the first probability distribution map includes: If the number of times the processing time of the first computing node in processing the received first data packet falls within the preset abnormal range of the first probability distribution map reaches a preset threshold, it is determined that the first computing node is abnormal.
3. The method according to claim 1, characterized in that, The step of replacing the first computing node with a backup node in the event of an anomaly in the first computing node includes: If the first computing node is abnormal, the first computing node will be set as the first problem node; Load the first backup node and switch the first problem node to the first backup node. The first backup node corresponds to the first computing node and has a higher priority than the first problem node. Set the priority of the first backup node after loading to the priority of the first compute node.
4. The method according to claim 1, characterized in that, The step of replacing the first computing node with a backup node in the event of an anomaly in the first computing node includes: If the first computing node is abnormal, the first computing node will be set as the second problem node; A filtering node is connected, and the filtering node outputs output data corresponding to the first data packet received by the second problem node, so that the second problem node can process the first data packet normally; Load the second backup node and switch the second problem node to the second backup node, which corresponds to the first computing node.
5. The method according to claim 4, characterized in that, The access filtering node, based on the first data packet received by the second problem node, outputs processing data corresponding to the first data packet to enable the second problem node to process the first data packet normally, including: Obtain the first data packet that is input to the second problem node; Based on the first data packet, estimate the output result of the first data packet; The output result is used as the output result of the second problem node, so that the second problem node can process the first data packet normally.
6. The method according to claim 4, characterized in that, Before accessing the filtering node, the method further includes: The filtering nodes are preloaded into the backup process pool; When the first computing node is set as the second problem node, the filtering node is obtained from the backup process pool.
7. The method according to claim 4, characterized in that, The step of replacing the first computing node with a backup node in the event of an anomaly in the first computing node includes: When the first computing node is a node that requires initialization, the first computing node is backed up by the filtering node before the initialization operation is performed. The initialization operation includes assigning values to the variables of the first computing node. In the event of an anomaly in the first computing node, a third backup node is loaded, which corresponds to the first computing node. Input initialization data into the third backup node so that the third backup node completes the initialization operation; Switch the first computing node to the third backup node.
8. The method according to claim 2, characterized in that, Before sending different first data packets to multiple computing nodes at a preset frequency, the method further includes: Obtain the configuration file for each compute node, which includes the number of topics subscribed to by each compute node; The priority order of the multiple computing nodes is determined based on the number of subscribed topics; The multiple computing nodes are backed up according to the priority order, and the backup content is stored on the multiple backup nodes.
9. A multi-node hot backup device, characterized in that, The device includes: The sending module is used to send different first data packets to multiple computing nodes at a preset frequency. The first data packets contain the same data type, and the data type of the first data packets is a preset data type. The preset data type is used to record the timestamp of the first data packet transmission. The receiving module is used to receive a second data packet sent by a first computing node. The second data packet includes a first timestamp of the first computing node receiving the first data packet and a second timestamp of sending the second data packet. The data type of the second data packet is the same as the data type of the first data packet. The first computing node is any one of the plurality of computing nodes. The calculation module is used to perform matching calculations on the first timestamp and the second timestamp to obtain multiple processing times of the first calculation node; The generation module is used to generate a first probability distribution map corresponding to the first computing node based on the multiple processing times; The diagnostic module is used to determine whether the first computing node is abnormal based on the first probability distribution map when it receives a third data packet sent by the first computing node, wherein the data type of the third data packet is the same as the data type of the first data packet. The replacement module is used to replace the first computing node with a backup node in the event of an anomaly in the first computing node. The diagnostic module is further configured to determine that the first computing node is abnormal if the processing time of the first computing node in processing the received first data packet is within a preset abnormal range of the first probability distribution map.
Citation Information
Patent Citations
Distributed storage system and implementation method of timestamp of distributed storage system
CN106470084A
Blockchain communication node verification method and device
CN111683078A
