Networking upgrading method, device, equipment, medium and program product

By adopting a tree network deployment method with one master and multiple slaves in the network upgrade of multi-device nodes, upgrading the upgrade nodes according to the node system status and network structure, the problem of lack of flexibility and high cost in the equipment network upgrade in the existing technology is solved, and efficient and reliable multi-device node network upgrade is achieved.

CN119987808APending Publication Date: 2025-05-13SUZHOU OUYEEL SEMICON CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411991178.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing equipment networking upgrade technology lacks flexibility, scalability and reusability. The multi-equipment networking upgrade solution is costly and cannot achieve unified version control or unified process.

Method used

The tree network deployment method of one master and multiple slaves is adopted. By obtaining the upgrade instructions received by the master node, the node to be upgraded is determined according to the node system status, and the upgrade node is upgraded according to the parent-child node relationship of the network. Finally, the main node is upgraded after all the child nodes have completed the upgrade.

Benefits of technology

The network upgrade efficiency of multi-device nodes is improved, and the communication link between nodes is independent while using the network structure to quickly upgrade multiple sub-nodes, ensuring the reliability and version uniformity of the upgrade.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987808A_ABST
    Figure CN119987808A_ABST
Patent Text Reader

Abstract

The invention relates to a networking upgrading method and device, equipment, a medium and a program product. The method comprises the following steps: acquiring an upgrading instruction received by a main node; determining a to-be-upgraded node according to the node system state of each child node under the network corresponding to the main node; upgrading the to-be-upgraded node according to the upgrading instruction and a father-child node relationship of networking to obtain an upgrading result; and under the condition that the upgrading result is that all the to-be-upgraded nodes are upgraded, upgrading the main node according to the upgrading instruction. By adopting the method, a flexible upgrading scheme which is extensible in the number of node equipment, supports different node equipment types and is independent in communication link between nodes can be provided based on networking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of software networking upgrade, and in particular to a networking upgrade method, device, equipment, medium and program product. Background Art

[0002] With the development of software networking upgrade technology, various types of device networking upgrade technologies have emerged. However, in the existing technology, different device networking upgrade technologies have defects that are difficult to overcome. For example, upgrade solutions such as differential upgrade and SD card upgrade focus on implementation details and lack flexibility, scalability and reusability. For example, some multi-device networking upgrade solutions require the establishment of multiple communication connections and multiple transmissions of networking upgrade programs for multi-device networking upgrades, which are costly and cannot achieve unified version control or unified processes. Summary of the invention

[0003] Based on this, it is necessary to provide a networking upgrade method, device, computer equipment, computer-readable storage medium and computer program product for multiple device nodes that can provide a one-master-multiple-slave tree-shaped networking deployment mode for multiple device upgrade scenarios of automotive electronic equipment in response to the above-mentioned technical problems.

[0004] In a first aspect, the present application provides a network upgrade method, comprising:

[0005] Get the upgrade instructions received by the master node;

[0006] Determine the node to be upgraded according to the node system status of each sub-node in the network corresponding to the master node;

[0007] Upgrading the node to be upgraded according to the upgrade instruction and the parent-child node relationship of the networking to obtain an upgrade result;

[0008] When the upgrade result is that all nodes to be upgraded have completed upgrading, the master node is upgraded according to the upgrade instruction.

[0009] In one embodiment, the step of upgrading the node to be upgraded according to the upgrade instruction and the parent-child node relationship of the network to obtain an upgrade result includes:

[0010] Determine version upgrade data according to the upgrade instruction;

[0011] The version upgrade data is sent down to the non-operating partition of the node to be upgraded step by step according to the parent-child node relationship, so as to upgrade the non-operating partition of the node to be upgraded and obtain the upgrade result.

[0012] In one of the embodiments, before determining the node to be upgraded according to the node system status of each sub-node in the network corresponding to the master node, the method further includes:

[0013] Performing a system status check on the subnode according to the networking structure of the networking to obtain a check result;

[0014] When the inspection result indicates that the child node is in an upgradeable state, a state switching instruction is generated according to the inspection result, so that the child node switches the current node state to an upgrade state.

[0015] In one of the embodiments, after the child node switches the current node state to the upgrade state, the method further includes:

[0016] Generate heartbeat information according to the heartbeat timer of the master node;

[0017] The heartbeat information is sent to the child node, so that the child node responds to the heartbeat information.

[0018] In one of the embodiments, after the child node switches the current node state to the upgrade state, the method further includes:

[0019] Get the version information of the upgrade subnode in the upgrade state;

[0020] In the case that the upgrade state of the upgrade sub-node is interrupted, version rollback processing is performed on the completed sub-node that has completed the upgrade according to the version information.

[0021] In one embodiment, after upgrading the master node according to the upgrade instruction, the method further includes:

[0022] Get the partition cutting instruction;

[0023] The partition switching instruction is sent to each sub-node in the network, so that each sub-node in the network switches to the partition state to be switched.

[0024] In a second aspect, the present application also provides a network upgrade device, including:

[0025] The acquisition module is used to obtain the upgrade instructions of the master node;

[0026] A node determination module, used to determine the node to be upgraded according to the node system status of each sub-node in the network corresponding to the master node;

[0027] A first upgrading module, configured to upgrade the node to be upgraded according to the upgrading instruction and the parent-child node relationship of the networking, and obtain an upgrading result;

[0028] The second upgrading module is used to upgrade the master node according to the upgrading instruction when the upgrading result is that all nodes to be upgraded have completed upgrading.

[0029] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0030] Get the upgrade instructions received by the master node;

[0031] Determine the node to be upgraded according to the node system status of each sub-node in the network corresponding to the master node;

[0032] Upgrading the node to be upgraded according to the upgrade instruction and the parent-child node relationship of the networking to obtain an upgrade result;

[0033] When the upgrade result is that all nodes to be upgraded have completed upgrading, the master node is upgraded according to the upgrade instruction.

[0034] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0035] Get the upgrade instructions received by the master node;

[0036] Determine the node to be upgraded according to the node system status of each sub-node in the network corresponding to the master node;

[0037] Upgrading the node to be upgraded according to the upgrade instruction and the parent-child node relationship of the networking to obtain an upgrade result;

[0038] When the upgrade result is that all nodes to be upgraded have completed upgrading, the master node is upgraded according to the upgrade instruction.

[0039] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0040] Get the upgrade instructions received by the master node;

[0041] Determine the node to be upgraded according to the node system status of each sub-node in the network corresponding to the master node;

[0042] Upgrading the node to be upgraded according to the upgrade instruction and the parent-child node relationship of the networking to obtain an upgrade result;

[0043] When the upgrade result is that all nodes to be upgraded have completed upgrading, the master node is upgraded according to the upgrade instruction.

[0044] The above-mentioned network upgrade method, device, equipment, medium and program product obtain the upgrade instruction received by the main node; determine the node to be upgraded according to the node system status of each child node under the network corresponding to the main node; upgrade the node to be upgraded according to the upgrade instruction and the parent-child node relationship of the network to obtain the upgrade result; when the upgrade result is that the nodes to be upgraded have completed the upgrade, upgrade the main node according to the upgrade instruction. Therefore, the nodes to be upgraded are determined according to the node system status of each child node under the networking corresponding to the main node, and the nodes to be upgraded are upgraded according to the upgrade instructions and the parent-child node relationship of the networking. That is, the networking structure of the networking is utilized to quickly use the child nodes that are ready to be upgraded as the nodes to be upgraded, and the nodes to be upgraded are upgraded first. That is, the communication links between nodes are independent, and the parent-child node relationship of the networking can be utilized to quickly upgrade multiple child nodes at the same time, thereby improving the upgrade efficiency. When the upgrade result is that the nodes to be upgraded have all been upgraded, the main node is upgraded according to the upgrade instruction, so that the child nodes under the networking can be rolled back in case of upgrade interruption, thereby achieving the simplicity of the overall processing logic while ensuring the reliability of the upgrade. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 An application environment diagram of a network upgrade method in an embodiment;

[0047] Figure 2 A schematic diagram of a process flow of a network upgrade method in an embodiment;

[0048] Figure 3 A schematic diagram of a process flow of a network upgrade method in an embodiment;

[0049] Figure 4 A schematic diagram of a tree-type networking structure of a networking upgrade method in an embodiment;

[0050] Figure 5 A node interaction flow chart of a networking upgrade method in an embodiment;

[0051] Figure 6 A schematic diagram of main modules of a networking upgrade method in another embodiment;

[0052] Figure 7 is a timing diagram of an example of a networking upgrade method in another embodiment;

[0053] Figure 8 It is a structural block diagram of a network upgrade device in an embodiment;

[0054] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0056] The network upgrade method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 obtains the upgrade instruction received by the master node; determines the node to be upgraded according to the node system status of each child node under the network corresponding to the master node; upgrades the node to be upgraded according to the upgrade instruction and the parent-child node relationship of the network to obtain the upgrade result; when the upgrade result is that the nodes to be upgraded have completed the upgrade, the master node is upgraded according to the upgrade instruction. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc., and different nodes can be the same terminal device or different terminal devices. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0057] In an exemplary embodiment, Figure 2 As shown, a network upgrade method is provided, which is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps 202 to 208. Among them:

[0058] Step 202: Obtain the upgrade instruction received by the master node.

[0059] The master node is the main control device of the entire network, used to exchange data and information with the outside world, and control the upgrade of internal sub-nodes. The sub-nodes of the next level are connected to the master node, and different nodes can be the same terminal device or different terminal devices. The upgrade instructions received by the master node are sent by the external communication link, and the external communication link is only deployed in the master node of the network.

[0060] In some embodiments, after the upgrade instruction is issued externally, the upgrade instruction including the upgrade package can be sent to the master node through the external communication link deployed in the master node, so as to obtain the upgrade instruction received by the master node, but it is not limited thereto.

[0061] Step 204, determining the node to be upgraded according to the node system status of each sub-node in the network corresponding to the master node.

[0062] The node system status is status data used to determine the current node operation status. The status data can be used to indicate that the node system status is abnormal, or that the current node is in an upgradeable state, etc., but is not limited thereto.

[0063] In some embodiments, based on the node system status of each sub-node under the network corresponding to the master node, when the node system status of all sub-nodes under the network is in an upgradeable state, the master node sends instructions to gradually determine all sub-nodes under the network as nodes to be upgraded, and switch the node system status of the nodes to be upgraded to an upgraded state, thereby ensuring that the nodes to be upgraded can complete the upgrade more efficiently.

[0064] Step 206: upgrade the node to be upgraded according to the upgrade instruction and the parent-child node relationship of the network to obtain an upgrade result.

[0065] Among them, the parent-child node relationship of the network refers to the connection relationship between the nodes between the upper and lower levels in the networking structure of the network. The networking structure can adopt a tree structure with one master and multiple slaves. It should be noted that each node in the tree structure is only responsible for the upper and lower adjacent nodes. Therefore, the device types of each node can be different, and the number of devices under the entire network can be expanded. The communication link between nodes is irrelevant to the entire network. When expanding, the device to be added can be used as a child node that can directly establish a communication node. After the node is added, the same upgrade module is deployed, and the processing flow of each child node is the same, and the code is reused to achieve a more flexible and easy-to-expand leaf node upgrade. Different topologies can also be used, such as star, ring, bus, mesh, and hybrid. Among them, the hybrid can be a combination of tree and star, but is not limited to this.

[0066] In some embodiments, the node to be upgraded is upgraded according to the upgrade instruction and the parent-child node relationship of the network to obtain an upgrade result, including: determining the version upgrade data according to the upgrade instruction; sending the version upgrade data step by step to the non-running partition of the node to be upgraded according to the parent-child node relationship to upgrade the non-running partition of the node to be upgraded to obtain an upgrade result.

[0067] The version upgrade data may be an upgrade package.

[0068] In some embodiments, the upgrade process is triggered according to the upgrade instruction. The upgrade process can support multiple upgrade methods, such as OTA, proximal tools, SD cards, etc., to determine the version upgrade data according to the upgrade instruction, and send the version upgrade data step by step to the non-running partitions of the nodes to be upgraded according to the parent-child node relationship, so as to upgrade the non-running partitions of the nodes to be upgraded and obtain the upgrade results, thereby realizing an efficient and adaptable upgrade process for the nodes to be upgraded.

[0069] It should be noted that in the networking, each node to be upgraded is set to internally support AB partitions, which only treats the non-running partitions of the nodes to be upgraded, and does not affect the operation of the current partition system program of the nodes to be upgraded. When the upgrade of the non-running partition of the node to be upgraded fails, it means that the current upgrade has an exception. Since the partition upgrade does not affect the normal operation of the running area, no additional processing is required, and only waiting for the next upgrade is required, thereby ensuring the version availability of each node to be upgraded in abnormal scenarios.

[0070] Step 208: When the upgrade result shows that all nodes to be upgraded have completed the upgrade, the master node is upgraded according to the upgrade instruction.

[0071] Among them, whether the node to be upgraded has completed the upgrade is returned by the node to be upgraded. The heartbeat monitoring can monitor the communication status of all nodes in the network to ensure that the communication disconnection between nodes during the upgrade process can be perceived and processed in time.

[0072] In some embodiments, when the upgrade result is that all nodes to be upgraded have completed the upgrade, the master node is upgraded according to the upgrade instruction, which means that the upgrade order of each node in the network is to set the networking upgrade order to give priority to upgrading the nodes to be upgraded as leaf nodes. After all nodes to be upgraded are successfully upgraded, the parent node corresponding to the node to be upgraded starts to upgrade until all nodes to be upgraded under the master node are successfully upgraded, and then the master node is upgraded according to the upgrade instruction. After the master node is upgraded, the entire upgrade process is completed.

[0073] It should be noted that in the initial upgrade process, the nodes to be upgraded, which are leaf nodes, can be upgraded at the same time. After the upgrade of the nodes to be upgraded is completed, the parent node corresponding to the nodes to be upgraded waits for all the child nodes under it to complete the upgrade before starting the upgrade of this node. The parallel execution of the upgrade process ensures the efficiency of the upgrade.

[0074] In some embodiments, after the master node completes the upgrade, the master node publishes the upgrade results and waits for the user's restart instruction. After receiving the restart message, all nodes complete the startup of the new partition program. The startup order is consistent with the upgrade order, and the leaf node is started first, and then the parent node is started.

[0075] In some embodiments, after upgrading the master node according to the upgrade instruction, the method further includes: obtaining a partition cutting instruction; sending the partition cutting instruction to each child node in the network, so that each child node in the network switches to the partition state to be switched.

[0076] In some embodiments, after the master node is upgraded, a partition cutting instruction is obtained, and the master node uniformly sends the partition cutting instruction to the child nodes to prepare the child nodes to switch to the new partition so that the new partition application can be started at the next startup. It should be noted that placing the partition cutting operation after all nodes are successfully upgraded can greatly simplify the exception handling process of errors or power outages during the upgrade process, thereby improving the upgrade efficiency.

[0077] In the above networking upgrade method, the upgrade instruction received by the master node is obtained; the node to be upgraded is determined according to the node system status of each child node under the network corresponding to the master node; the node to be upgraded is upgraded according to the upgrade instruction and the parent-child node relationship of the network to obtain the upgrade result; when the upgrade result is that the nodes to be upgraded have all been upgraded, the master node is upgraded according to the upgrade instruction. Therefore, by determining the node to be upgraded according to the node system status of each child node under the network corresponding to the master node, and upgrading the node to be upgraded according to the upgrade instruction and the parent-child node relationship of the network, the network structure of the network is used to quickly use the child node that is ready to be upgraded as the node to be upgraded, and the node to be upgraded is upgraded first, that is, the communication link between the nodes is independent, and the parent-child node relationship of the network can be used to quickly upgrade multiple child nodes at the same time, thereby improving the efficiency of the upgrade, and when the upgrade result is that the nodes to be upgraded have all been upgraded, the master node is upgraded according to the upgrade instruction, so that each child node under the network can be rolled back in the event of an upgrade interruption, thereby achieving a simple overall processing logic while ensuring the reliability of the upgrade.

[0078] In an exemplary embodiment, Figure 3As shown, before determining the node to be upgraded according to the node system status of each sub-node in the network corresponding to the master node, the network upgrade method further includes a system status check step, and the system status check step includes steps 302 to 304. Among them:

[0079] Step 302: Perform a system status check on the sub-node according to the networking structure of the network to obtain a check result.

[0080] Among them, the system status check is a status check process implemented by issuing check instructions step by step according to the networking structure of the network.

[0081] In some embodiments, inspection instructions are issued to child nodes according to the networking structure of the network, and the child nodes in turn issue inspection instructions to corresponding child nodes, and the node system status of each child node is checked step by step. When the system status of a node is abnormal, the inspection result is that the system status is abnormal. When all nodes are in an upgradeable state, the inspection result is that the child node is in an upgradeable state.

[0082] Step 304: When the inspection result indicates that the child node is in an upgradeable state, a state switching instruction is generated according to the inspection result, so that the child node switches the current node state to an upgrade state.

[0083] The upgrade status refers to the current subnode being in the upgrade status.

[0084] In some embodiments, when the inspection result indicates that the child node is in an upgradeable state, that is, when all the child nodes are currently in an upgradeable state, the master node will generate a state switching instruction based on the inspection result, and send it down to all child nodes step by step to switch the current node state of the child node to an upgrade state, thereby ensuring the efficient implementation of the subsequent upgrade process.

[0085] In some embodiments, after the child node switches the current node state to an upgraded state, the method further includes: generating heartbeat information according to the heartbeat timer of the master node; and sending the heartbeat information to the child node so that the child node responds to the heartbeat information.

[0086] The heartbeat timer is a timer that continuously sends heartbeat information according to a timing cycle.

[0087] In some embodiments, after the child node switches the current node state to the upgrade state, the parent node corresponding to the current child node will start a heartbeat timer to send a heartbeat message to the child nodes under it. After the child node receives the heartbeat message, the child node will determine whether the heartbeat state of other child nodes currently under it is normal, and respond to the heartbeat message sent by the parent node. If all child nodes have sent a normal heartbeat message, after the parent node receives the normal heartbeat message, the heartbeat function is set to normal, and wait for the next heartbeat message to be sent and check the timing period. If no heartbeat message is received within the period or a heartbeat abnormality message is received, the heartbeat abnormality result is returned step by step, and the timer is ended. When the root node receives a heartbeat abnormality, the child node is controlled to end the upgrade state and return an error message to the outside, thereby ensuring the normal communication function between nodes during the upgrade process.

[0088] In some embodiments, after the child node switches the current node state to an upgraded state, the method further includes: obtaining version information of the upgraded child node in the upgraded state; in the event that the upgrade state of the upgraded child node is interrupted, performing version rollback processing on the completed child node that has completed the upgrade according to the version information.

[0089] The upgrade status interruption may be caused by a power failure in any upgrade status of any node during the upgrade process.

[0090] In some embodiments, after the child node switches the current node state to the upgrade state, the master node records the version information of the upgrade child node currently in the upgrade state, thereby obtaining the version information. When the power is cut off during the upgrade process (regardless of which node or which upgrade state it is in), resulting in the interruption of the upgrade state of the upgrade child node, the program can be restarted to perform version rollback processing on the completed child node that has completed the upgrade according to the version information, accurately determine the current system state and roll back the version according to the version information, thereby achieving consistency of all versions under the unified networking with those before the upgrade.

[0091] In order to understand the solution of this application more clearly, Figure 4 , Figure 5 , Figure 6 and Figure 7 The details are as follows:

[0092] first, Figure 4 The figure shows that the network structure in the tree-type network is a tree topology, in which the upgrade function of each node is performed in sequence according to the level, and the leaf nodes in the tree-type network can be flexibly expanded.

[0093] Secondly, in Figure 5 The interaction flow chart between nodes in the tree network is shown in Figure 6 The main modules and Figure 7The timing example diagram shown in the figure can more clearly show a complete specific implementation process.

[0094] Specifically, in Figure 5 The interaction process between nodes in one branch of the tree network is shown in Figure 5 There are six interactive steps ①②③④⑤⑥ shown in the figure, among which:

[0095] ① The process of the current node receiving the parent node upgrade instruction. If the current node is the root node, the instruction currently received is the external instruction.

[0096] ②③ is the process of the current node sending instructions to the child nodes;

[0097] ④⑤ is the process of receiving instructions and executing upgrades for the child node, and returning the upgrade results to the current node;

[0098] ⑥ is the process of returning the results to the parent node after the current node is upgraded.

[0099] In addition, Figure 6 The connection relationship of each module in an exemplary embodiment is shown in FIG. Figure 6 The functions of each module are as follows:

[0100] Communication module: used for internal interaction between nodes. The root node also includes external communication.

[0101] System state conversion module: When the upgrade is triggered, the entire ECU is converted from the running state to the upgrading state. Other business modules sense the upgrade system status, start and stop the business as needed, and then execute the upgrade;

[0102] Heartbeat monitoring module: During the upgrade of multiple device nodes, the communication status of all nodes in the entire network is monitored through the heartbeat monitoring module to ensure timely perception and processing of abnormalities;

[0103] Upgrade installation module: realizes functions such as processing upgrade packages, writing upgrade images, and partition switching;

[0104] Finally, in Figure 7 The simplified upgrade sequence diagram is shown in Figure 1, which mainly explains that after the user issues an upgrade request, this solution will send the upgrade instruction to Figure 7 Node 1 in the system is selected as the root node, and then nodes 2 and 3 are upgraded in parallel by issuing instructions step by step. Node 2 is the parent node of node 4, and node 2 will be upgraded only after node 4 is upgraded. Finally, after nodes 2 and 3 are upgraded, root node 1 is upgraded, and the upgrade result of this upgrade is returned to the user.

[0105] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0106] Based on the same inventive concept, the embodiment of the present application also provides a network upgrade device for implementing the network upgrade method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more network upgrade device embodiments provided below can refer to the limitations on the network upgrade method above, and will not be repeated here.

[0107] In an exemplary embodiment, Figure 8 As shown, a network upgrade device 800 is provided, including: an acquisition module 801, a node determination module 802, a first upgrade module 803 and a second upgrade module 804, wherein:

[0108] The acquisition module 801 is used to acquire the upgrade instruction of the master node;

[0109] The node determination module 802 is used to determine the node to be upgraded according to the node system status of each sub-node in the network corresponding to the master node;

[0110] The first upgrade module 803 is used to upgrade the node to be upgraded according to the upgrade instruction and the parent-child node relationship of the network to obtain an upgrade result;

[0111] The second upgrading module 804 is used to upgrade the master node according to the upgrading instruction when the upgrading result is that all nodes to be upgraded have completed upgrading.

[0112] In some embodiments, the first upgrade module 803 is also used to determine version upgrade data according to the upgrade instruction; and send the version upgrade data step by step to the non-running partition of the node to be upgraded according to the parent-child node relationship, so as to upgrade the non-running partition of the node to be upgraded and obtain the upgrade result.

[0113] In some embodiments, the device also includes: an inspection module, which is used to perform a system status inspection on the child node according to the networking structure of the network to obtain an inspection result; when the inspection result indicates that the child node is in an upgradeable state, a state switching instruction is generated according to the inspection result to enable the child node to switch the current node state to an upgraded state.

[0114] In some embodiments, the device further includes: a heartbeat monitoring module, configured to generate heartbeat information according to a heartbeat timer of the master node; and send the heartbeat information to the child node so that the child node responds to the heartbeat information.

[0115] In some embodiments, the device also includes: a version rollback module, which is used to obtain version information of an upgraded sub-node in an upgraded state; when the upgrade state of the upgraded sub-node is interrupted, version rollback processing is performed on the completed sub-node that has completed the upgrade according to the version information.

[0116] In some embodiments, the device further includes: a partition cutting module, which is used to obtain a partition cutting instruction; and send the partition cutting instruction to each sub-node in the network, so that each sub-node in the network switches to the partition state to be switched.

[0117] In the above networking upgrade device, the upgrade instruction received by the master node is obtained; the node to be upgraded is determined according to the node system status of each child node under the network corresponding to the master node; the node to be upgraded is upgraded according to the upgrade instruction and the parent-child node relationship of the network to obtain the upgrade result; when the upgrade result is that the nodes to be upgraded have all been upgraded, the master node is upgraded according to the upgrade instruction. Therefore, by determining the node to be upgraded according to the node system status of each child node under the network corresponding to the master node, and upgrading the node to be upgraded according to the upgrade instruction and the parent-child node relationship of the network, the network structure of the network is used to quickly use the child node that is ready to be upgraded as the node to be upgraded, and the node to be upgraded is upgraded first, that is, the communication link between the nodes is independent, and the parent-child node relationship of the network can be used to quickly upgrade multiple child nodes at the same time, thereby improving the efficiency of the upgrade, and when the upgrade result is that the nodes to be upgraded have all been upgraded, the master node is upgraded according to the upgrade instruction, so that each child node under the network can be rolled back in the event of an upgrade interruption, thereby achieving a simple overall processing logic while ensuring the reliability of the upgrade.

[0118] Each module in the above-mentioned network upgrade device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0119] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store networking data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a networking upgrade method is implemented.

[0120] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0121] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned network upgrade method when executing the computer program.

[0122] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned network upgrade method are implemented.

[0123] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the above-mentioned network upgrade method when executed by a processor.

[0124] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0125] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0126] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0127] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A network upgrade method, characterized in that: The method comprises: Get the upgrade instructions received by the master node; Determine the node to be upgraded according to the node system status of each sub-node in the network corresponding to the master node; Upgrading the node to be upgraded according to the upgrade instruction and the parent-child node relationship of the networking to obtain an upgrade result; When the upgrade result is that all nodes to be upgraded have completed upgrading, the master node is upgraded according to the upgrade instruction.

2. The method according to claim 1, characterized in that The step of upgrading the node to be upgraded according to the upgrade instruction and the parent-child node relationship of the networking to obtain an upgrade result includes: Determine version upgrade data according to the upgrade instruction; The version upgrade data is sent down to the non-operating partition of the node to be upgraded step by step according to the parent-child node relationship, so as to upgrade the non-operating partition of the node to be upgraded and obtain the upgrade result.

3. The method according to claim 1, characterized in that Before determining the node to be upgraded according to the node system status of each sub-node in the network corresponding to the master node, the method further includes: Performing a system status check on the subnode according to the networking structure of the networking to obtain a check result; When the inspection result indicates that the child node is in an upgradeable state, a state switching instruction is generated according to the inspection result, so that the child node switches the current node state to an upgrade state.

4. The method according to claim 3, characterized in that: After the child node switches the current node state to the upgrade state, the method further includes: Generate heartbeat information according to the heartbeat timer of the master node; The heartbeat information is sent to the child node, so that the child node responds to the heartbeat information.

5. The method according to claim 3, characterized in that: After the child node switches the current node state to the upgrade state, the method further includes: Get the version information of the upgrade subnode in the upgrade state; In the case that the upgrade state of the upgrade sub-node is interrupted, version rollback processing is performed on the completed sub-node that has completed the upgrade according to the version information.

6. The method according to claim 1, characterized in that After the master node is upgraded according to the upgrade instruction, the method further includes: Get the partition cutting instruction; The partition switching instruction is sent to each sub-node in the network, so that each sub-node in the network switches to the partition state to be switched.

7. A network upgrade device, characterized in that: The device comprises: The acquisition module is used to obtain the upgrade instructions of the master node; A node determination module, used to determine the node to be upgraded according to the node system status of each sub-node in the network corresponding to the master node; A first upgrading module, configured to upgrade the node to be upgraded according to the upgrading instruction and the parent-child node relationship of the networking, and obtain an upgrading result; The second upgrading module is used to upgrade the master node according to the upgrading instruction when the upgrading result is that all nodes to be upgraded have completed upgrading.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Slave gateway upgrading method, storage medium, electronic device and computer program product

    CN120263644A