A method, apparatus and related device for multi-node system upgrade
Patent Information
- Application Number
- CN202310397937.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-14
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-04-14
AI Technical Summary
[0003]本发明实施例提供了一种多节点信息传输的方法、装置及相关设备,解决了现有技术中多节点系统性能浪费的问题
[0013]第四方面,本发明实施例还提供了一种计算机可读存储介质,其特征在于,所述可读存储介质上存储有程序或指令,所述程序或指令被处理器执行时实现如第一方面中任一项所述的多节点系统升级的方法的步骤。
Smart Images

Figure CN116418672B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a method, apparatus and related equipment for upgrading a multi-node system. Background Technology
[0002] Currently, when upgrading using a communication interface, a host computer needs to send firmware data commands to a slave device via a communication bus. Due to limitations in the performance and capacity of embedded systems in electronic devices, the device cannot receive the entire firmware file at once. The host computer must break the firmware file into multiple commands and send them sequentially to the slave device. The slave device then sends a response command to the host computer upon receiving the command. Therefore, when multiple slave devices need to be upgraded simultaneously, after the host computer sends any command, it and the communication bus are idle while waiting for a response from the slave device or until a fixed time interval expires. Other slave devices are also idle, leading to wasted performance in multi-node systems. Summary of the Invention
[0003] This invention provides a method, apparatus, and related equipment for multi-node information transmission, which solves the problem of performance waste in existing multi-node systems.
[0004] In a first aspect, embodiments of the present invention provide a method for upgrading a multi-node system, applied to a host computer in a multi-node system, the multi-node system including the host computer and multiple slave computers, the multiple slave computers being communicatively connected to the host computer, the method comprising: After sending an update command to the first lower-level machine, the first timestamp corresponding to the first lower-level machine is updated to the second timestamp. The first lower-level machine is any one of the plurality of lower-level machines. The time interval between the first timestamp and the second timestamp is the minimum interval between the first lower-level machine receiving different update commands. After receiving the response message from the first lower-level machine according to the update instruction, the third timestamp corresponding to the first lower-level machine is updated to the fourth timestamp. The time interval between the third timestamp and the fourth timestamp is the maximum interval between the first lower-level machine receiving different update instructions. Add the first lower-level machine to the tail of the first node queue to obtain the first target node queue, or add the first lower-level machine to the tail of the second node queue to obtain the second target node queue. Based on the first target node queue and the second target node queue, the plurality of lower-level machines are upgraded sequentially.
[0005] Optionally, after sending the update command to the first lower-level machine, updating the first timestamp corresponding to the first lower-level machine to the second timestamp includes: Obtain the maximum waiting time for the first lower-level machine to send the response message back to the upper-level machine; The first timestamp of the first lower-level machine is updated to the second timestamp, and the time interval between the first timestamp and the second timestamp is greater than or equal to the maximum waiting time.
[0006] Optionally, after receiving the response message from the first lower-level machine according to the update instruction, updating the third timestamp corresponding to the first lower-level machine to the fourth timestamp includes: Obtain the maximum allowed time interval between different update commands received by the first lower-level machine; The third timestamp of the first lower-level machine is updated to the fourth timestamp, and the time interval between the third timestamp and the fourth timestamp is less than or equal to the maximum allowed time interval.
[0007] Optionally, the time interval between the first timestamp and the second timestamp is greater than a preset time interval, wherein the preset time interval is the minimum time interval between any two update commands sent by the host computer; or, The time interval between the third timestamp and the fourth timestamp is greater than the minimum time interval between any two update commands sent by the host computer.
[0008] Optionally, the step of sequentially upgrading the plurality of lower-level machines based on the first target node queue and the second target node queue includes: After updating the second lower-level machine, check whether the first timestamp of the third lower-level machine has expired. The second lower-level machine is any lower-level machine in the first target node queue, and the third lower-level machine is a lower-level machine in the first target node queue that is located after the second lower-level machine. If the first timestamp of the third lower-level machine expires, send the corresponding next update instruction to the third lower-level machine.
[0009] Optionally, after detecting whether the first timestamp of the third lower-level machine has expired, the method further includes: If the current time point in the third lower-level machine exceeds the preset time point, the first timestamp of the third lower-level machine will be cleared. If the first timestamp of the third lower-level machine is cleared, the third lower-level machine will be removed from the first target node queue.
[0010] Optionally, the step of sequentially upgrading the plurality of lower-level machines based on the first target node queue and the second target node queue includes: after updating the fourth lower-level machine, detecting whether the fourth timestamp of the fifth lower-level machine has expired, wherein the fourth lower-level machine is any lower-level machine in the second target node queue, and the fifth lower-level machine is a lower-level machine in the second target node queue that is located after the fourth lower-level machine; If the fourth timestamp of the fifth slave device expires, send the corresponding next update instruction to the fifth slave device.
[0011] Secondly, the present invention also provides a device for upgrading a multi-node system, applied to a host computer in a multi-node system, the multi-node system including the host computer and multiple slave computers, the multiple slave computers being communicatively connected to the host computer respectively, the device comprising: The first update module is used to update the first timestamp corresponding to the first lower-level machine to the second timestamp after sending an update instruction to the first lower-level machine. The first lower-level machine is any one of the plurality of lower-level machines, and the time interval between the first timestamp and the second timestamp is the minimum interval between the first lower-level machine receiving different update instructions. The second update module is used to update the third timestamp corresponding to the first lower-level machine to a fourth timestamp after receiving the response message fed back by the first lower-level machine according to the update instruction. The time interval between the third timestamp and the fourth timestamp is the maximum interval between the first lower-level machine receiving different update instructions. An add module is used to add the first lower-level machine to the tail of the first node queue to obtain the first target node queue, or to add the first lower-level machine to the tail of the second node queue to obtain the second target node queue. The upgrade module is used to sequentially upgrade the plurality of lower-level machines based on the first target node queue and the second target node queue.
[0012] Thirdly, embodiments of the present invention also provide an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the multi-node system upgrade method as described in any one of the first aspects.
[0013] Fourthly, embodiments of the present invention also provide a computer-readable storage medium, characterized in that the readable storage medium stores a program or instructions, which, when executed by a processor, implement the steps of the multi-node system upgrade method as described in any one of the first aspects.
[0014] This invention provides a method, apparatus, and related equipment for upgrading a multi-node system. The method is applied to a host computer in a multi-node system, which includes the host computer and multiple slave computers, each of which is communicatively connected to the host computer. The method includes: after sending an update command to a first slave computer, updating a first timestamp corresponding to the first slave computer to a second timestamp, where the first slave computer is any one of the multiple slave computers, and the time interval between the first timestamp and the second timestamp is the minimum interval between different update commands received by the first slave computer; after receiving a response message from the first slave computer based on the update command, updating a third timestamp corresponding to the first slave computer to a fourth timestamp, where the time interval between the third timestamp and the fourth timestamp is the maximum interval between different update commands received by the first slave computer; adding the first slave computer to the tail of a first node queue to obtain a first target node queue, or adding the first slave computer to the tail of a second node queue to obtain a second target node queue; and sequentially upgrading the multiple slave computers based on the first target node queue and the second target node queue. This invention improves the performance of multi-node systems by setting up an update queue after updating the timestamp of the lower-level machine. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating the video data processing method in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the video data processing device in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0017] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. A process can be terminated when its operation is complete, but it may also have additional steps not included in the figures. A process can correspond to a method, function, procedure, subroutine, subroutine, etc.
[0018] Furthermore, the terms "first," "second," etc., may be used herein to describe various directions, actions, steps, or elements, but these directions, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step, or element from another direction, action, step, or element. For example, without departing from the scope of this application, a first speed difference may be referred to as a second speed difference, and similarly, a second speed difference may be referred to as a first speed difference. Both the first speed difference and the second speed difference are speed differences, but they are not the same speed difference. The terms "first," "second," etc., should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0019] This invention provides a method for upgrading a multi-node system, applied to a host computer in a multi-node system. The multi-node system includes the host computer and multiple slave computers, each of which is communicatively connected to the host computer. The method includes: Step 101: After sending an update command to the first lower-level machine, update the first timestamp corresponding to the first lower-level machine to the second timestamp. The first lower-level machine is any one of the plurality of lower-level machines, and the time interval between the first timestamp and the second timestamp is the minimum interval between the first lower-level machine receiving different update commands.
[0020] In this embodiment, in a multi-node system, after the host computer sends a command to any node, it needs to receive a response message from that node before sending the next command. After the host computer sends a command to any node, the slave computer needs a period of time to execute the corresponding operation and then reply to the host computer with a response message based on the operation execution result. The host computer can use this time to send commands to other nodes, maximizing the use of the bus for message transmission, achieving the goal of parallel upgrades for multiple nodes, and shortening the total firmware update time for all nodes.
[0021] Specifically, the second timestamp is the earliest timestamp, and the first timestamp is the previously set timestamp. After the host computer sends an operation command to the node, it updates the earliest timestamp of this node by setting the earliest timestamp to the current timestamp plus the interval Ttx1, where Ttx1 should be greater than or equal to Tresp. Tresp is the maximum waiting time for the lower-level machine to respond to the message. If no response is received after the waiting time, the command message is considered to have failed, and the host computer executes the corresponding strategy.
[0022] Step 102: After receiving the response message from the first lower-level machine according to the update instruction, update the third timestamp corresponding to the first lower-level machine to the fourth timestamp. The time interval between the third timestamp and the fourth timestamp is the maximum interval between the first lower-level machine receiving different update instructions.
[0023] In this embodiment, the fourth timestamp is the latest timestamp, and the third timestamp is the previously set timestamp. After receiving the latest response message from each node, the host computer updates the latest timestamp of that node by adding the interval Ttx2 to the current timestamp. Ttx2 should be less than the value of Tnext. Tnext is the maximum allowed time interval set by the slave computer after the node sends a response message before receiving the next operation command. If no operation command is received within this time interval, the firmware upgrade process is automatically interrupted (to prevent the slave computer from getting stuck in the upgrade process due to not receiving commands from the host computer for an extended period).
[0024] Step 103: Add the first lower-level machine to the tail of the first node queue to obtain the first target node queue, or add the first lower-level machine to the tail of the second node queue to obtain the second target node queue.
[0025] In this embodiment, the host computer sets up a first node queue Qtx sorted by the earliest timestamp. After any node updates its earliest timestamp, the node is added to the end of the first node queue Qtx to obtain the first target node queue.
[0026] In this embodiment, the host computer sets up a second node queue Qrx sorted according to the latest timestamp. After any node updates its latest timestamp, this node is added to the end of the second node queue Qrx to obtain the second target node queue.
[0027] Step 104: Based on the first target node queue and the second target node queue, upgrade the nodes of the plurality of lower-level machines in sequence.
[0028] In this embodiment, the plurality of lower-level machines are upgraded sequentially according to the first target node queue and the second target node queue.
[0029] This invention provides a method for upgrading a multi-node system. The method is applied to a host computer in a multi-node system, which includes the host computer and multiple slave computers, each of which is communicatively connected to the host computer. The method includes: after sending an update command to a first slave computer, updating a first timestamp corresponding to the first slave computer to a second timestamp, where the first slave computer is any one of the multiple slave computers, and the time interval between the first timestamp and the second timestamp is the minimum interval between the first slave computer receiving different update commands; after receiving a response message from the first slave computer according to the update command, updating a third timestamp corresponding to the first slave computer to a fourth timestamp, where the third timestamp is... The time interval between the timestamp and the fourth timestamp is the maximum interval between the first lower-level machine receiving different update instructions. The first lower-level machine is added to the tail of the first node queue to obtain the first target node queue, or added to the tail of the second node queue to obtain the second target node queue. The timestamp interval between any two adjacent lower-level machines in the first target node queue is the minimum interval between the first lower-level machine receiving different update instructions, and the timestamp interval between any two adjacent lower-level machines in the second target node queue is the maximum interval between the first lower-level machine receiving different update instructions. Based on the first target node queue and the second target node queue, the plurality of lower-level machines are upgraded sequentially. This embodiment of the invention improves the performance of a multi-node system by setting up an update queue after updating the timestamps of the lower-level machines.
[0030] In other optional embodiments, optionally, updating the first timestamp corresponding to the first lower-level machine to the second timestamp after sending the update command to the first lower-level machine includes: Obtain the maximum waiting time for the first lower-level machine to send the response message back to the upper-level machine; The first timestamp of the first lower-level machine is updated to the second timestamp, and the time interval between the first timestamp and the second timestamp is greater than or equal to the maximum waiting time.
[0031] In this embodiment, specifically, the second timestamp is the earliest timestamp, and the first timestamp is the previously set timestamp. After the host computer sends an operation command to the node, it updates the earliest timestamp of this node by setting the earliest timestamp to the current timestamp plus the interval Ttx1, where Ttx1 should be greater than or equal to Tresp. Tresp is the maximum waiting time for the lower-level machine to respond to the message. If no response is received after the waiting time, the command message is considered to have failed, and the host computer executes the corresponding strategy.
[0032] Optionally, after receiving the response message from the first lower-level machine according to the update instruction, updating the third timestamp corresponding to the first lower-level machine to the fourth timestamp includes: Obtain the maximum allowed time interval between different update commands received by the first lower-level machine; The third timestamp of the first lower-level machine is updated to the fourth timestamp, and the time interval between the third timestamp and the fourth timestamp is less than or equal to the maximum allowed time interval.
[0033] In this embodiment, the fourth timestamp is the latest timestamp, and the third timestamp is the previously set timestamp. After receiving the latest response message from each node, the host computer updates the latest timestamp of that node by adding the interval Ttx2 to the current timestamp. Ttx2 should be less than the value of Tnext. Tnext is the maximum allowed time interval set by the slave computer after the node sends a response message before receiving the next operation command. If no operation command is received within this time interval, the firmware upgrade process is automatically interrupted (to prevent the slave computer from getting stuck in the upgrade process due to not receiving commands from the host computer for an extended period).
[0034] Optionally, the time interval between the first timestamp and the second timestamp is greater than a preset time interval, wherein the preset time interval is the minimum time interval between any two update commands sent by the host computer; or, The time interval between the third timestamp and the fourth timestamp is greater than the minimum time interval between any two update commands sent by the host computer.
[0035] In this embodiment, after sending an operation command to node A, operation commands are sent to other nodes, missing the opportunity to receive the operation response message from node A. Therefore, a minimum time interval Tmin is set between any two adjacent commands sent by the host computer to allow the bus to idle for a period of time, enabling the slave computer to acquire bus control privileges to send response messages. Accordingly, both Ttx1 and Ttx2 should be greater than Tmin.
[0036] Optionally, the step of sequentially upgrading the plurality of lower-level machines based on the first target node queue and the second target node queue includes: After updating the second lower-level machine, check whether the first timestamp of the third lower-level machine has expired. The second lower-level machine is any lower-level machine in the first target node queue, and the third lower-level machine is a lower-level machine in the first target node queue that is located after the second lower-level machine. If the first timestamp of the third lower-level machine expires, send the corresponding next update instruction to the third lower-level machine.
[0037] In this embodiment, after the host computer sends an operation instruction to any node, it first checks whether the earliest timestamp of the node at the front of the node queue Qtx has expired. If there is an expired node, it sends the corresponding next operation instruction to the expired node.
[0038] Optionally, after detecting whether the first timestamp of the third lower-level machine has expired, the method further includes: If the current time point in the third lower-level machine exceeds the preset time point, the first timestamp of the third lower-level machine will be cleared. If the first timestamp of the third lower-level machine is cleared, the third lower-level machine will be removed from the first target node queue.
[0039] In this embodiment, if the earliest timestamp of the first node in the node queue Qtx has been cleared, then this node is removed from the queue.
[0040] Optionally, the step of sequentially upgrading the plurality of lower-level machines based on the first target node queue and the second target node queue includes: after updating the fourth lower-level machine, detecting whether the fourth timestamp of the fifth lower-level machine has expired, wherein the fourth lower-level machine is any lower-level machine in the second target node queue, and the fifth lower-level machine is a lower-level machine in the second target node queue that is located after the fourth lower-level machine; If the fourth timestamp of the fifth slave device expires, send the corresponding next update instruction to the fifth slave device.
[0041] In this embodiment, after the host computer completes the previous step, it checks whether the latest timestamp of the first node in the node queue Qrx has expired. If there is an expired node, it sends the corresponding next operation instruction to this expired node.
[0042] In other embodiments, to avoid too many nodes entering the upgrade process simultaneously, resulting in multiple near-expiration nodes at the same time, a maximum number of nodes simultaneously entering the upgrade process, Cmax, is set. If there are no expired nodes and the number of nodes currently in the upgrade process is less than Cmax, an instruction to enter the upgrade process is sent to a new node. If there are no expired nodes and the number of nodes currently in the upgrade process is equal to Cmax, the corresponding next operation instruction is sent to the node at the front of the node queue. If there are no expired nodes and all nodes requiring upgrades are undergoing upgrades, the corresponding next operation instruction is sent to the node at the front of the node queue. The host computer sequentially sends all operation instructions for all nodes to the corresponding slave computer to complete the firmware upgrade operation for all nodes in the entire system.
[0043] This invention provides a method for upgrading a multi-node system. The method is applied to a host computer in a multi-node system, which includes the host computer and multiple slave computers, each of which is communicatively connected to the host computer. The method includes: after sending an update command to a first slave computer, updating a first timestamp corresponding to the first slave computer to a second timestamp, where the first slave computer is any one of the multiple slave computers, and the time interval between the first timestamp and the second timestamp is the minimum interval between different update commands received by the first slave computer; after receiving a response message from the first slave computer based on the update command, updating a third timestamp corresponding to the first slave computer to a fourth timestamp, where the time interval between the third timestamp and the fourth timestamp is the maximum interval between different update commands received by the first slave computer; adding the first slave computer to the tail of a first node queue to obtain a first target node queue, or adding the first slave computer to the tail of a second node queue to obtain a second target node queue; and sequentially upgrading the multiple slave computers based on the first target node queue and the second target node queue. This invention improves the performance of multi-node systems by setting up an update queue after updating the timestamp of the lower-level machine.
[0044] This invention also provides a device 200 for upgrading a multi-node system, such as... Figure 2 As shown, the video data processing device 200 includes: The first update module 210 is used to update the first timestamp corresponding to the first lower-level machine to the second timestamp after sending an update instruction to the first lower-level machine. The first lower-level machine is any one of the plurality of lower-level machines, and the time interval between the first timestamp and the second timestamp is the minimum interval between the first lower-level machine receiving different update instructions. The second update module 220 is used to update the third timestamp corresponding to the first lower-level machine to a fourth timestamp after receiving the response message fed back by the first lower-level machine according to the update instruction. The time interval between the third timestamp and the fourth timestamp is the maximum interval between the first lower-level machine receiving different update instructions. Add module 230, used to add the first lower-level machine to the tail of the first node queue to obtain the first target node queue, or add the first lower-level machine to the tail of the second node queue to obtain the second target node queue. The upgrade module 240 is used to sequentially upgrade the plurality of lower-level machines based on the first target node queue and the second target node queue.
[0045] Optionally, after sending the update command to the first lower-level machine, updating the first timestamp corresponding to the first lower-level machine to the second timestamp includes: Obtain the maximum waiting time for the first lower-level machine to send the response message back to the upper-level machine; The first timestamp of the first lower-level machine is updated to the second timestamp, and the time interval between the first timestamp and the second timestamp is greater than or equal to the maximum waiting time.
[0046] Optionally, after receiving the response message from the first lower-level machine according to the update instruction, updating the third timestamp corresponding to the first lower-level machine to the fourth timestamp includes: Obtain the maximum allowed time interval between different update commands received by the first lower-level machine; The third timestamp of the first lower-level machine is updated to the fourth timestamp, and the time interval between the third timestamp and the fourth timestamp is less than or equal to the maximum allowed time interval.
[0047] Optionally, the time interval between the first timestamp and the second timestamp is greater than a preset time interval, wherein the preset time interval is the minimum time interval between any two update commands sent by the host computer; or, The time interval between the third timestamp and the fourth timestamp is greater than the minimum time interval between any two update commands sent by the host computer.
[0048] Optionally, the step of sequentially upgrading the plurality of lower-level machines based on the first target node queue and the second target node queue includes: After updating the second lower-level machine, check whether the first timestamp of the third lower-level machine has expired. The second lower-level machine is any lower-level machine in the first target node queue, and the third lower-level machine is a lower-level machine in the first target node queue that is located after the second lower-level machine. If the first timestamp of the third lower-level machine expires, send the corresponding next update instruction to the third lower-level machine.
[0049] Optionally, after detecting whether the first timestamp of the third lower-level machine has expired, the method further includes: If the current time point in the third lower-level machine exceeds the preset time point, the first timestamp of the third lower-level machine will be cleared. If the first timestamp of the third lower-level machine is cleared, the third lower-level machine will be removed from the first target node queue.
[0050] Optionally, the step of sequentially upgrading the plurality of lower-level machines based on the first target node queue and the second target node queue includes: after updating the fourth lower-level machine, detecting whether the fourth timestamp of the fifth lower-level machine has expired, wherein the fourth lower-level machine is any lower-level machine in the second target node queue, and the fifth lower-level machine is a lower-level machine in the second target node queue that is located after the fourth lower-level machine; If the fourth timestamp of the fifth slave device expires, send the corresponding next update instruction to the fifth slave device.
[0051] This invention improves the performance of multi-node systems by setting up an update queue after updating the timestamp of the lower-level machine.
[0052] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 3 As shown, the electronic device 300 includes a memory 310 and a processor 320. The number of processors 320 in the electronic device 300 can be one or more. Figure 3 Taking a processor 320 as an example; the memory 310 and processor 320 in the server can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.
[0053] The memory 310, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the title generation method in the embodiments of the present invention. The processor 320 executes various functional applications and data processing of the server / terminal / server by running the software programs, instructions, and modules stored in the memory 310, thereby realizing the above-mentioned video data processing method.
[0054] The processor 320 is used to run the computer program stored in the memory 310, and performs the following steps: After sending an update command to the first lower-level machine, the first timestamp corresponding to the first lower-level machine is updated to the second timestamp. The first lower-level machine is any one of the plurality of lower-level machines. The time interval between the first timestamp and the second timestamp is the minimum interval between the first lower-level machine receiving different update commands. After receiving the response message from the first lower-level machine according to the update instruction, the third timestamp corresponding to the first lower-level machine is updated to the fourth timestamp. The time interval between the third timestamp and the fourth timestamp is the maximum interval between the first lower-level machine receiving different update instructions. Add the first lower-level machine to the tail of the first node queue to obtain the first target node queue, or add the first lower-level machine to the tail of the second node queue to obtain the second target node queue. Based on the first target node queue and the second target node queue, the plurality of lower-level machines are upgraded sequentially.
[0055] Optionally, after sending the update command to the first lower-level machine, updating the first timestamp corresponding to the first lower-level machine to the second timestamp includes: Obtain the maximum waiting time for the first lower-level machine to send the response message back to the upper-level machine; The first timestamp of the first lower-level machine is updated to the second timestamp, and the time interval between the first timestamp and the second timestamp is greater than or equal to the maximum waiting time.
[0056] Optionally, after receiving the response message from the first lower-level machine according to the update instruction, updating the third timestamp corresponding to the first lower-level machine to the fourth timestamp includes: Obtain the maximum allowed time interval between different update commands received by the first lower-level machine; The third timestamp of the first lower-level machine is updated to the fourth timestamp, and the time interval between the third timestamp and the fourth timestamp is less than or equal to the maximum allowed time interval.
[0057] Optionally, the time interval between the first timestamp and the second timestamp is greater than a preset time interval, wherein the preset time interval is the minimum time interval between any two update commands sent by the host computer; or, The time interval between the third timestamp and the fourth timestamp is greater than the minimum time interval between any two update commands sent by the host computer.
[0058] Optionally, the step of sequentially upgrading the plurality of lower-level machines based on the first target node queue and the second target node queue includes: After updating the second lower-level machine, check whether the first timestamp of the third lower-level machine has expired. The second lower-level machine is any lower-level machine in the first target node queue, and the third lower-level machine is a lower-level machine in the first target node queue that is located after the second lower-level machine. If the first timestamp of the third lower-level machine expires, send the corresponding next update instruction to the third lower-level machine.
[0059] Optionally, after detecting whether the first timestamp of the third lower-level machine has expired, the method further includes: If the current time point in the third lower-level machine exceeds the preset time point, the first timestamp of the third lower-level machine will be cleared. If the first timestamp of the third lower-level machine is cleared, the third lower-level machine will be removed from the first target node queue.
[0060] Optionally, the step of sequentially upgrading the plurality of lower-level machines based on the first target node queue and the second target node queue includes: after updating the fourth lower-level machine, detecting whether the fourth timestamp of the fifth lower-level machine has expired, wherein the fourth lower-level machine is any lower-level machine in the second target node queue, and the fifth lower-level machine is a lower-level machine in the second target node queue that is located after the fourth lower-level machine; If the fourth timestamp of the fifth slave device expires, send the corresponding next update instruction to the fifth slave device.
[0061] In one embodiment, the computer program of the electronic device provided by the present invention is not limited to the above-described method operation, but can also perform related operations in the video data processing method provided by any embodiment of the present invention.
[0062] The memory 410 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 410 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory 410 may further include memory remotely located relative to the processor 420, which can be connected to a server / terminal / server via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0063] This invention improves the performance of multi-node systems by setting up an update queue after updating the timestamp of the lower-level machine.
[0064] This invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a video data processing method, the method comprising: After sending an update command to the first lower-level machine, the first timestamp corresponding to the first lower-level machine is updated to the second timestamp. The first lower-level machine is any one of the plurality of lower-level machines. The time interval between the first timestamp and the second timestamp is the minimum interval between the first lower-level machine receiving different update commands. After receiving the response message from the first lower-level machine according to the update instruction, the third timestamp corresponding to the first lower-level machine is updated to the fourth timestamp. The time interval between the third timestamp and the fourth timestamp is the maximum interval between the first lower-level machine receiving different update instructions. Add the first lower-level machine to the tail of the first node queue to obtain the first target node queue, or add the first lower-level machine to the tail of the second node queue to obtain the second target node queue. Based on the first target node queue and the second target node queue, the plurality of lower-level machines are upgraded sequentially.
[0065] Optionally, after sending the update command to the first lower-level machine, updating the first timestamp corresponding to the first lower-level machine to the second timestamp includes: Obtain the maximum waiting time for the first lower-level machine to send the response message back to the upper-level machine; The first timestamp of the first lower-level machine is updated to the second timestamp, and the time interval between the first timestamp and the second timestamp is greater than or equal to the maximum waiting time.
[0066] Optionally, after receiving the response message from the first lower-level machine according to the update instruction, updating the third timestamp corresponding to the first lower-level machine to the fourth timestamp includes: Obtain the maximum allowed time interval between different update commands received by the first lower-level machine; The third timestamp of the first lower-level machine is updated to the fourth timestamp, and the time interval between the third timestamp and the fourth timestamp is less than or equal to the maximum allowed time interval.
[0067] Optionally, the time interval between the first timestamp and the second timestamp is greater than a preset time interval, wherein the preset time interval is the minimum time interval between any two update commands sent by the host computer; or, The time interval between the third timestamp and the fourth timestamp is greater than the minimum time interval between any two update commands sent by the host computer.
[0068] Optionally, the step of sequentially upgrading the plurality of lower-level machines based on the first target node queue and the second target node queue includes: After updating the second lower-level machine, check whether the first timestamp of the third lower-level machine has expired. The second lower-level machine is any lower-level machine in the first target node queue, and the third lower-level machine is a lower-level machine in the first target node queue that is located after the second lower-level machine. If the first timestamp of the third lower-level machine expires, send the corresponding next update instruction to the third lower-level machine.
[0069] Optionally, after detecting whether the first timestamp of the third lower-level machine has expired, the method further includes: If the current time point in the third lower-level machine exceeds the preset time point, the first timestamp of the third lower-level machine will be cleared. If the first timestamp of the third lower-level machine is cleared, the third lower-level machine will be removed from the first target node queue.
[0070] Optionally, the step of sequentially upgrading the plurality of lower-level machines based on the first target node queue and the second target node queue includes: after updating the fourth lower-level machine, detecting whether the fourth timestamp of the fifth lower-level machine has expired, wherein the fourth lower-level machine is any lower-level machine in the second target node queue, and the fifth lower-level machine is a lower-level machine in the second target node queue that is located after the fourth lower-level machine; If the fourth timestamp of the fifth slave device expires, send the corresponding next update instruction to the fifth slave device.
[0071] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method operations described above, but can also perform related operations in a video data processing method provided in any embodiment of the present invention.
[0072] This invention improves the performance of multi-node systems by setting up an update queue after updating the timestamp of the lower-level machine.
[0073] The computer-readable storage medium of this invention can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be—but is not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0074] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0075] The program code contained on the storage medium can be transmitted using any suitable medium, including—but not limited to—wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0076] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or terminal. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0077] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A method for upgrading a multi-node system, applied to a host computer in a multi-node system, the multi-node system comprising the host computer and multiple slave computers, the multiple slave computers being communicatively connected to the host computer, characterized in that, The method includes: After sending an update command to the first lower-level machine, the first timestamp corresponding to the first lower-level machine is updated to the second timestamp. The first lower-level machine is any one of the plurality of lower-level machines. The time interval between the first timestamp and the second timestamp is the minimum interval between the first lower-level machine receiving different update commands. After receiving the response message from the first lower-level machine according to the update instruction, the third timestamp corresponding to the first lower-level machine is updated to the fourth timestamp. The time interval between the third timestamp and the fourth timestamp is the maximum interval between the first lower-level machine receiving different update instructions. Add the first lower-level machine to the tail of the first node queue to obtain the first target node queue, or add the first lower-level machine to the tail of the second node queue to obtain the second target node queue. Based on the first target node queue and the second target node queue, the plurality of lower-level machines are upgraded sequentially; The step of sequentially upgrading the plurality of lower-level machines based on the first target node queue and the second target node queue includes: After updating the second lower-level machine, check whether the first timestamp of the third lower-level machine has expired. The second lower-level machine is any lower-level machine in the first target node queue, and the third lower-level machine is a lower-level machine in the first target node queue that is located after the second lower-level machine. If the first timestamp of the third lower-level machine expires, send the corresponding next update instruction to the third lower-level machine; After the fourth lower-level machine is updated, it is checked whether the fourth timestamp of the fifth lower-level machine has expired. The fourth lower-level machine is any lower-level machine in the second target node queue, and the fifth lower-level machine is a lower-level machine in the second target node queue that is located after the fourth lower-level machine. If the fourth timestamp of the fifth lower-level machine expires, send the corresponding next update instruction to the fifth lower-level machine; The method further includes, after detecting whether the first timestamp of the third lower-level machine has expired: If the current time point in the third lower-level machine exceeds the preset time point, the first timestamp of the third lower-level machine will be cleared. If the first timestamp of the third lower-level machine is cleared, the third lower-level machine will be removed from the first target node queue.
2. The method according to claim 1, characterized in that, The step of updating the first timestamp corresponding to the first lower-level machine to the second timestamp after sending the update command to the first lower-level machine includes: Obtain the maximum waiting time for the first lower-level machine to send the response message back to the upper-level machine; The first timestamp of the first lower-level machine is updated to the second timestamp, and the time interval between the first timestamp and the second timestamp is greater than or equal to the maximum waiting time.
3. The method according to claim 1, characterized in that, After receiving the response message from the first lower-level machine according to the update instruction, updating the third timestamp corresponding to the first lower-level machine to the fourth timestamp includes: Obtain the maximum allowed time interval between different update commands received by the first lower-level machine; The third timestamp of the first lower-level machine is updated to the fourth timestamp, and the time interval between the third timestamp and the fourth timestamp is less than or equal to the maximum allowed time interval.
4. The method according to claim 2 or 3, characterized in that, The time interval between the first timestamp and the second timestamp is greater than a preset time interval, which is the minimum time interval between the host computer sending any two update commands; or, The time interval between the third timestamp and the fourth timestamp is greater than the minimum time interval between any two update commands sent by the host computer.
5. A device for upgrading a multi-node system, applied to a host computer in a multi-node system, the multi-node system including the host computer and multiple slave computers, the multiple slave computers being communicatively connected to the host computer, characterized in that, The device includes: The first update module is used to update the first timestamp corresponding to the first lower-level machine to the second timestamp after sending an update instruction to the first lower-level machine. The first lower-level machine is any one of the plurality of lower-level machines, and the time interval between the first timestamp and the second timestamp is the minimum interval between the first lower-level machine receiving different update instructions. The second update module is used to update the third timestamp corresponding to the first lower-level machine to a fourth timestamp after receiving the response message fed back by the first lower-level machine according to the update instruction. The time interval between the third timestamp and the fourth timestamp is the maximum interval between the first lower-level machine receiving different update instructions. An add module is used to add the first lower-level machine to the tail of the first node queue to obtain the first target node queue, or to add the first lower-level machine to the tail of the second node queue to obtain the second target node queue. The upgrade module is used to sequentially upgrade the plurality of lower-level machines based on the first target node queue and the second target node queue; The upgrade module is also used for: After updating the second lower-level machine, check whether the first timestamp of the third lower-level machine has expired. The second lower-level machine is any lower-level machine in the first target node queue, and the third lower-level machine is a lower-level machine in the first target node queue that is located after the second lower-level machine. If the first timestamp of the third lower-level machine expires, send the corresponding next update instruction to the third lower-level machine; After the fourth lower-level machine is updated, it is checked whether the fourth timestamp of the fifth lower-level machine has expired. The fourth lower-level machine is any lower-level machine in the second target node queue, and the fifth lower-level machine is a lower-level machine in the second target node queue that is located after the fourth lower-level machine. If the fourth timestamp of the fifth lower-level machine expires, send the corresponding next update instruction to the fifth lower-level machine; If the current time point in the third lower-level machine exceeds the preset time point, the first timestamp of the third lower-level machine will be cleared. If the first timestamp of the third lower-level machine is cleared, the third lower-level machine will be removed from the first target node queue.
6. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method for upgrading a multi-node system as claimed in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method for upgrading a multi-node system as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Data sending method, electronic equipment, chip system and storage medium
CN114339897A
Event-driven cell scheduler and method for supporting multiple service categories in communication network
CN1213475A