Edge device updating method and device, equipment and storage medium
By determining the target edge device in the Internet of Things device network and updating it, the problem of excessive traffic resources occupancy in cloud devices when transmitting update packets is solved, and a more efficient update process is achieved.
Patent Information
- Application Number
- CN202510703989.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-07-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the Internet of Things application scenario, cloud devices need to consume a large amount of traffic resources when transmitting update packets to edge devices, resulting in excessive traffic resources for cloud devices.
By obtaining update instructions, determine the set of edge devices containing update packets, determine the target edge devices based on the network conditions of each edge device, and update according to the remaining storage space and thresholds of the target edge device, reducing the traffic occupancy of cloud devices.
It effectively reduces the traffic resource usage of cloud devices when updating edge devices, and improves update efficiency and network transmission performance.
Smart Images

Figure CN120238538A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data transmission, and particularly to a method, device, equipment, and storage medium for updating edge devices. Background Art
[0002] In the Internet of Things application scenario, multiple devices generally form a device network to meet the requirements of the Internet of Things application scenario. The device network usually includes cloud devices and multiple edge devices communicatively connected to the cloud devices. The edge devices have no direct communication connection with each other but can achieve communication connection through the relay of the cloud devices.
[0003] When the cloud device needs to update the software or system of the edge device, it will send the corresponding update package to each edge device respectively for the edge devices to update.
[0004] However, when the cloud device transmits the update package to the edge device, it consumes a large amount of traffic, resulting in a large amount of traffic resources of the cloud device being occupied. Summary of the Invention
[0005] In order to facilitate reducing the traffic resources occupied when the cloud device updates the edge device, this application provides a method, device, equipment, and storage medium for updating edge devices.
[0006] In a first aspect, this application provides a method for updating edge devices, which is applied to an Internet of Things device network. The Internet of Things device network includes: at least one cloud device and multiple edge devices. The cloud device is directly communicatively connected to each edge device, and each edge device is directly communicatively connected to each other. The method includes:
[0007] Obtain an update instruction, and in response to the existence of an update package corresponding to the update instruction in at least one other edge device, determine the edge device containing the update package to obtain a set of candidate edge devices;
[0008] Based on the network conditions corresponding to each candidate edge device in the set of candidate edge devices, determine a target edge device;
[0009] Update based on the obtained storage remaining space, remaining space threshold, and the update package in the target edge device.
[0010] In a second aspect, this application provides an edge device update device, including:
[0011] Applied to an Internet of Things device network. The Internet of Things device network includes: at least one cloud device and multiple edge devices. The cloud device is directly communicatively connected to each edge device, and each edge device is directly communicatively connected to each other. The device includes:
[0012] The device set acquisition module is configured to acquire an update instruction, and in response to the existence of an update package corresponding to the update instruction in at least one other of the edge devices, determine the edge device containing the update package, and obtain a set of candidate edge devices;
[0013] The target device determination module is configured to determine a target edge device based on the network conditions corresponding to each candidate edge device in the set of candidate edge devices;
[0014] The update package update module is configured to perform an update based on the acquired storage remaining space, the remaining space threshold, and the update package in the target edge device.
[0015] In a third aspect, the present application provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps in the above method are implemented.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method are implemented.
[0017] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0018] For the above edge device update method, device, equipment, and storage medium, by acquiring an update instruction, in response to the existence of an update package corresponding to the update instruction in at least one other of the edge devices, determining the edge device containing the update package, and obtaining a set of candidate edge devices; determining a target edge device based on the network conditions corresponding to each candidate edge device in the set of candidate edge devices; performing an update based on the acquired storage remaining space, the remaining space threshold, and the update package in the target edge device. Through the above implementation, when an edge device in the Internet of Things device network acquires an update instruction, if it is determined that there is an update package corresponding to the update instruction in other edge devices, the edge device with the best network condition among other edge devices can be used as the target edge device, and then the update package in the target edge device can be acquired and further updated according to the update package. In this way, when the edge device is updated, it is no longer necessary to make the cloud device occupy a large amount of traffic resources to send the update package, thereby facilitating the reduction of the traffic resources occupied by the cloud device when updating the edge device.
[0019] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become easily understood through the following description. Brief Description of the Drawings
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following accompanying drawings only show some embodiments of the present invention, and thus should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related accompanying drawings can also be obtained based on these drawings.
[0021] Figure 1 It is a flowchart of a method for updating an edge device provided in an embodiment of the present application;
[0022] Figure 2 It is a schematic diagram of the network structure of an Internet of Things device provided in an embodiment of the present application;
[0023] Figure 3 It is a schematic diagram of the structure of a device for updating an edge device provided in an embodiment of the present application;
[0024] Figure 4 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application;
[0025] Figure 5 It is an internal structure diagram of a computer-readable storage medium provided in an embodiment of the present application. Detailed Description of the Embodiments
[0026] In order to make the objectives, technical solutions and advantages of the present disclosure clearer and more understandable, the present disclosure will be 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 disclosure and are not used to limit the present disclosure.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of this article and the above accompanying drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or equipment.
[0028] In this text, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. Additionally, in this text, the character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0029] Embodiment 1
[0030] Figure 1 is a flowchart of an edge device update method provided in Embodiment 1 of this application. Refer to Figure 1 , this method can be executed by a device that executes this method, and this device can be implemented in software and / or hardware. This method is applied to an Internet of Things device network, and the Internet of Things device network includes: at least one cloud device and multiple edge devices. The cloud device is directly communicatively connected to each of the edge devices, and each of the edge devices is directly communicatively connected to each other; the method includes:
[0031] S110. Obtain an update instruction, and in response to the existence of an update package corresponding to the update instruction in at least one other edge device, determine the edge device containing the update package to obtain a set of candidate edge devices.
[0032] An Internet of Things device network exemplified in this embodiment is as Figure 2 shown. This Internet of Things device network includes: one cloud device, which is directly communicatively connected to three edge devices (Edge Device 1, Edge Device 2, Edge Device 3), and the three edge devices are directly communicatively connected to each other; in other embodiments, the specific numbers of cloud devices and edge devices in the Internet of Things device network are not limited.
[0033] It should be noted that taking one edge device as an example, when establishing a direct communication connection between this edge device and another edge device, it is necessary to first determine whether this edge device and another edge device belong to the same network segment. If so, this edge device establishes a direct communication connection with another edge device; otherwise, no direct communication connection is established; the steps for determining whether this edge device and another edge device belong to the same network segment include: obtaining the first IP address and the first subnet mask of the edge device, performing a bitwise AND operation on the first IP address and the first subnet mask to obtain the first network address; also obtaining the second IP address and the second subnet mask of another edge device, performing a bitwise AND operation on the second IP address and the second subnet mask to obtain the second network address; determining whether the first network address and the second network address are the same, thereby determining whether this edge device and another edge device belong to the same network segment; if they are the same, it indicates that this edge device and another edge device belong to the same network segment.
[0034] It should also be noted that if it is determined that the edge device and another edge device do not belong to the same network segment, in order to establish a direct communication connection between the edge device and the other edge device, a direct communication connection between the edge device and the other edge device can be established in the form of forwarding through the cloud device.
[0035] The cloud device obtains the device information of all edge devices communicating with it. In this embodiment, the device information includes: device address, device status, device network situation, device storage situation, device type, device model. In other embodiments, it is not specifically limited; the cloud device broadcasts the device information of all the edge devices it obtains to the Internet of Things device network so that any edge device can obtain the device information of all edge devices in the Internet of Things device network.
[0036] In this embodiment, the communication protocol between the cloud device and the edge device, and between the edge devices can be the TCP network transmission protocol, the KCP network transmission protocol, etc., which is not specifically limited.
[0037] Taking one of the edge devices as an example, when the cloud device determines that the edge device needs to be updated, it will first select the optimal instruction transmission path and send the update instruction to the edge device through the optimal instruction transmission path; the types of instruction transmission paths that the cloud device can select include: First, the direct communication path directly communicating with the edge device; Second, the relay communication path indirectly communicating with the edge device through other edge devices; the cloud device obtains the network latency corresponding to each direct communication path and relay communication path one by one, and takes the communication path with the lowest network latency among the direct communication path and the relay communication path as the optimal instruction transmission path.
[0038] Taking one of the edge devices as an example, after receiving the update instruction sent by the cloud device, the edge device first determines whether there is an update package corresponding to the update instruction among other edge devices in the Internet of Things device network. The update package is used to update the heartbeat, program, service, and firmware of the edge device; and determine all other edge devices in the Internet of Things device network that contain the update package, and record the set of the determined other edge devices as the set of candidate edge devices; the set of candidate edge devices includes at least one other edge device.
[0039] S120. Determine the target edge device based on the network situations corresponding to the candidate edge devices in the set of candidate edge devices.
[0040] Among them, the network condition corresponding to the edge device to be selected is the quality of the network transmission performance between the edge device to be selected and the edge device that needs to be updated currently; the target edge device is the edge device to be selected with the best network transmission performance among the edge devices to be selected in the set of edge devices to be selected, and the target edge device is subsequently used to transmit the update package it contains to the edge device that needs to be updated currently.
[0041] It should be noted that by determining the target edge device, it is convenient to use the communication path between the target edge device and the edge device that needs to be updated currently as the target transmission path for transmitting the update package subsequently; since the quality of the network transmission performance of the target transmission path is the best, the transmission rate of the update package can be effectively improved, thus facilitating the improvement of the update efficiency.
[0042] S130. Update based on the obtained remaining storage space, the remaining space threshold, and the update package in the target edge device.
[0043] Among them, a storage medium for storing the update package is provided in the edge device that needs to be updated currently, and the current available storage space of this storage medium is the remaining storage space. If the remaining storage space of the storage medium is too low, it will greatly affect the writing and reading efficiency of the storage medium. For this reason, a remaining space threshold is preset based on historical experience. If the remaining storage space is lower than the remaining space threshold, it means that the remaining storage space is too low. By calculating the difference between the remaining storage space and the remaining space threshold, the actual available storage space of the storage medium currently can be calculated. Further, by judging the size of the actual available storage space and the update package in the target edge device, it can be judged whether the edge device that needs to be updated currently can completely receive and store the update package, so as to facilitate the update through the update package.
[0044] It should be noted that in this embodiment, by obtaining an update instruction, in response to the existence of an update package corresponding to the update instruction in at least one other edge device, the edge device containing the update package is determined to obtain a set of candidate edge devices; based on the network conditions corresponding to each candidate edge device in the set of candidate edge devices, a target edge device is determined; and an update is performed based on the obtained remaining storage space, remaining space threshold, and the update package in the target edge device. Through the above implementation, when an edge device in the Internet of Things device network obtains an update instruction, if it determines that there is an update package corresponding to the update instruction in other edge devices, it can use the other edge device with the best network condition among other edge devices as the target edge device, then obtain the update package in the target edge device, and further perform an update according to the update package. In this way, when the edge device is updated, there is no need for the cloud device to occupy a large amount of traffic resources to send the update package, thus facilitating the reduction of the traffic resources occupied by the cloud device when updating the edge device.
[0045] Embodiment 2
[0046] An edge device update method provided in Embodiment 2 of this application optimizes the "performing an update based on the obtained remaining storage space, remaining space threshold, and the update package in the target edge device" in Embodiment 1; it should be noted that for parts not detailed in this embodiment, reference can be made to the descriptions in other embodiments. The method includes:
[0047] S210. Obtain an update instruction, and in response to the existence of an update package corresponding to the update instruction in at least one other edge device, determine the edge device containing the update package to obtain a set of candidate edge devices.
[0048] S220. Based on the network conditions corresponding to each candidate edge device in the set of candidate edge devices, determine a target edge device.
[0049] S231. Based on the obtained remaining storage space and the remaining space threshold, obtain a target remaining space.
[0050] Among them, the target remaining space is the difference between the remaining storage space and the remaining space threshold.
[0051] S232. Obtain the size of the update package in the target edge device.
[0052] S233. Perform an update based on the target remaining space, the size of the update package, and the update package in the target edge device.
[0053] Among them, after the edge device to be updated currently obtains the target remaining space and the update package size, by comparing the sizes of the two, it can be determined whether the update package can be completely stored in the storage medium of the edge device to be updated currently; then, based on the judgment result, an update method for updating the current edge device according to the update package in the target edge device can be selected.
[0054] Embodiment III
[0055] An edge device update method provided in Embodiment III of this application optimizes the "updating based on the target remaining space, the update package size, and the update package in the target edge device" in Embodiment II; it should be noted that for parts not detailed in this embodiment, the descriptions in other embodiments can be referred to. This method includes:
[0056] S310. Obtain an update instruction, and in response to the existence of an update package corresponding to the update instruction in at least one other edge device, determine the edge device containing the update package to obtain a set of candidate edge devices.
[0057] S320. Based on the network conditions corresponding to each candidate edge device in the set of candidate edge devices, determine a target edge device.
[0058] S331. Based on the obtained storage remaining space and the remaining space threshold, obtain the target remaining space.
[0059] S332. Obtain the update package size of the update package in the target edge device.
[0060] S333. In response to the target remaining space being greater than the update package size, receive the update package in the target edge device and perform an update based on the received update package.
[0061] Among them, after the edge device to be updated currently obtains the target remaining space and the update package size, it determines whether the target remaining space is greater than the update package size. If so, it means that the storage medium of the edge device to be updated currently has sufficient storage space to store the entire update package; at this time, the edge device to be updated currently receives the update package sent by the target edge device and uses the update package to perform an update.
[0062] Embodiment IV
[0063] An edge device update method provided in Embodiment IV of this application optimizes the "updating based on the target remaining space, the update package size, and the update package in the target edge device" in Embodiment II; it should be noted that for parts not detailed in this embodiment, the descriptions in other embodiments can be referred to. This method includes:
[0064] S410. Obtain an update instruction, and in response to the existence of an update package corresponding to the update instruction in at least one other of the edge devices, determine the edge device containing the update package to obtain a set of candidate edge devices.
[0065] S420. Based on the network conditions corresponding to each candidate edge device in the set of candidate edge devices, determine a target edge device.
[0066] S431. Based on the obtained remaining storage space and the remaining space threshold, obtain a target remaining space.
[0067] S432. Obtain the update package size of the update package in the target edge device.
[0068] S433. In response to the target remaining space not being greater than the update package size, establish a data transfer channel with the target edge device, and based on the data transfer channel, streamingly receive the packet chunks of the update package in the target edge device, and perform an update based on the packet chunks.
[0069] Among them, after the edge device that needs to be updated currently obtains the target remaining space and the update package size, it determines whether the target remaining space is greater than the update package size. If not, it means that the storage medium of the edge device that needs to be updated currently does not have sufficient storage space to store the entire update package; at this time, another update method needs to be replaced, that is, first establish a data transfer channel between the edge device that needs to be updated currently and the target edge device, and this data transfer channel is used to streamingly transmit the packet chunks generated after the update package is segmented; after determining that the target remaining space is not greater than the update package size, the edge device that needs to be updated currently notifies the target edge device to segment the update package it contains, so as to obtain a plurality of packet chunks arranged in sequence according to time sequence, so that the target edge device can sequentially streamingly transmit each packet chunk to the edge device that needs to be updated currently. After the edge device that needs to be updated currently receives the packet chunk, it first stores the packet chunk in the device memory, and then performs step-by-step updates according to each packet chunk.
[0070] It should be noted that when the storage space of the edge device that needs to be updated currently is insufficient, the current edge device (that is, the above-mentioned edge device that needs to be updated currently) can be step-by-step updated by streaming and receiving packet chunks. In this way, it can be ensured that even if the storage space of the current edge device is insufficient, the update can still proceed normally, which helps to improve the stability of the update of the current edge device.
[0071] Embodiment Five
[0072] An edge device update method provided in the fifth embodiment of the present application optimizes "determining a target edge device based on the network conditions corresponding to each candidate edge device in the candidate edge device set" in the first embodiment; it should be noted that for parts not detailed in this embodiment, reference can be made to the descriptions of other embodiments. The method includes:
[0073] S510. Obtain an update instruction, and in response to the existence of an update packet corresponding to the update instruction in at least one other edge device, determine the edge device containing the update packet to obtain a candidate edge device set.
[0074] It should be noted that the network conditions include bandwidth, network latency, and packet loss rate.
[0075] The network conditions between a candidate edge device and the current edge device include bandwidth, network latency, and packet loss rate.
[0076] Among them, bandwidth refers to the amount of data that can be transmitted in the network per unit time, usually in Mbps (megabits per second) or Gbps (gigabits per second). The higher the bandwidth, the stronger the network's ability to transmit data, and the relatively better the path transmission. For example, a device connected to another device through gigabit Ethernet can theoretically have a bandwidth of up to 1000 Mbps, which has a stronger transmission ability compared to 100 Mbps of 100Base - T Ethernet.
[0077] Among them, network latency, also known as delay, refers to the time it takes for data to be sent from one device to another device, generally in milliseconds (ms). Low latency is very important for applications with high real - time requirements, such as video calls and online games. Usually, the latency between devices within a local area network may be between a few milliseconds and dozens of milliseconds, while in a wide - area network, due to the long transmission distance and many network nodes passed through, the latency may reach several hundred milliseconds. The lower the latency, the better the real - time performance of the path transmission and the better the experience.
[0078] Among them, the packet loss rate is the proportion of lost data packets during network transmission. A too high packet loss rate will lead to incomplete data transmission and require re - transmission, thus affecting the transmission efficiency and quality. For example, in video playback, packet loss may cause phenomena such as frame freezing and screen distortion. Generally speaking, the ideal network packet loss rate should be less than 1%. If the packet loss rate exceeds 5%, the path transmission quality may be poor and will have an obvious impact on most applications.
[0079] S521. Obtain the bandwidth, network latency, and packet loss rate corresponding to each candidate edge device in the candidate edge device set, and also obtain the first weight corresponding to the bandwidth, the second weight corresponding to the network latency, and the third weight corresponding to the packet loss rate.
[0080] Among them, in this embodiment, in order to determine the network communication quality between the candidate edge device and the current edge device subsequently, it is necessary to comprehensively consider the bandwidth, network latency, and packet loss rate between the candidate edge device and the current edge device in a weighted calculation manner. Therefore, a first weight is preset for the bandwidth B , a second weight is preset for the network latency D , and a third weight is preset for the packet loss rate L .
[0081] S522. Calculate the network communication quality corresponding to each of the candidate edge devices based on the bandwidth, network latency, and packet loss rate of each of the candidate edge devices, and the first weight, the second weight, and the third weight
[0082] Among them, the network communication quality S corresponding to the candidate edge device is the weighted sum among the bandwidth B, the network latency D, and the packet loss rate L, and S = *B + *D + *L
[0083] S523. Determine the target edge device based on the network communication quality corresponding to each of the candidate edge devices
[0084] Among them, the network communication quality S corresponding to each of the candidate edge devices can be calculated, and the target edge device is the candidate edge device corresponding to the maximum value among the network communication qualities S
[0085] S530. Update based on the obtained storage remaining space, remaining space threshold, and the update package in the target edge device
[0086] Embodiment Six
[0087] An edge device update method provided in Embodiment Six of the present application supplements the method described in Embodiment One; it should be noted that for parts not detailed in this embodiment, reference can be made to the descriptions of other embodiments. The method includes
[0088] S610. Obtain an update instruction, and in response to the existence of an update package corresponding to the update instruction in at least one other edge device, determine the edge device containing the update package to obtain a set of candidate edge devices
[0089] S620. Determine the target edge device based on the network conditions corresponding to each candidate edge device in the set of candidate edge devices
[0090] S630. Update based on the obtained storage remaining space, remaining space threshold, and the update package in the target edge device
[0091] S640. In response to an update failure, update again based on the obtained remaining storage space, the remaining space threshold, and the update package in the target edge device, and calculate the update retry count.
[0092] Among them, during the update process of the current edge device, there may be a situation of update failure. In this embodiment, if it is determined that the update fails, the current edge device re-executes the update step S630, and calculates the update retry count at this time as 1. And so on, each time step S630 is re-executed, the update retry count is incremented by 1.
[0093] S650. In response to the update retry count being greater than a preset count threshold, send the update failure information to the target edge device, so that the target edge device rolls back the update package, and uploads the update failure information to the cloud device, so that the cloud device broadcasts the update failure information to the Internet of Things device network.
[0094] It should be noted that if the re-execution of the update step S630 fails multiple times, it is not appropriate to continue the update at this time. Therefore, a count threshold is preset according to historical experience. The count threshold is used to compare with the update retry count. If the update retry count is greater than the preset count threshold, it means that it is not appropriate to continue the update at this time. At this time, the current edge device generates update failure information and sends the update failure information to the target edge device. The target edge device receives the update failure information, rolls back the update package that has been sent, and at the same time further sends the update failure information to the cloud device, so that the cloud device broadcasts the update failure information in the Internet of Things device network, so as to facilitate other edge devices to know the information that the current edge device update fails.
[0095] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps in other steps.
[0096] Embodiment Seven
[0097] Based on the same inventive concept, this embodiment also provides an edge device update apparatus for implementing the edge device update method involved above. The solution provided by this apparatus for solving problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the edge device update apparatus provided below can refer to the limitations on the edge device update method in the above text, and will not be elaborated here.
[0098] In this embodiment, as Figure 3 shown, an edge device update apparatus is provided, which is applied to an Internet of Things device network. The Internet of Things device network includes: at least one cloud device and multiple edge devices. The cloud device is directly communicatively connected to each of the edge devices, and each of the edge devices is directly communicatively connected to each other; the apparatus includes:
[0099] A device set acquisition module, configured to acquire an update instruction, and determine the edge device containing the update packet in response to the existence of an update packet corresponding to the update instruction in at least one other edge device, so as to obtain a set of candidate edge devices;
[0100] A target device determination module, configured to determine a target edge device based on the network conditions corresponding to each candidate edge device in the set of candidate edge devices;
[0101] An update packet update module, configured to perform an update based on the acquired storage remaining space, remaining space threshold, and the update packet in the target edge device.
[0102] Each module in the above edge device update apparatus can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in the form of hardware or be independent of it, 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 the above respective modules.
[0103] It should be noted that in this embodiment, by obtaining an update instruction, in response to the existence of an update package corresponding to the update instruction in at least one other of the edge devices, the edge device containing the update package is determined to obtain a set of candidate edge devices; based on the network conditions corresponding to each candidate edge device in the set of candidate edge devices, a target edge device is determined; and an update is performed based on the obtained storage remaining space, remaining space threshold, and the update package in the target edge device. Through the above implementation, when an edge device in the Internet of Things device network obtains an update instruction, if it determines that there is an update package corresponding to the update instruction in other edge devices, it can use the other edge device with the best network condition among other edge devices as the target edge device, then obtain the update package in the target edge device, and further perform an update according to the update package. In this way, when the edge device is updated, there is no need to make the cloud device occupy a large amount of traffic resources to send the update package, thus facilitating the reduction of the traffic resources occupied by the cloud device when updating the edge device.
[0104] Embodiment VIII
[0105] In this embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 4 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. 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 data. The network 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, it implements an edge device update method.
[0106] Those skilled in the art can understand that Figure 4 the structure shown in
[0107] is only a block diagram of some structures related to the solution of the present disclosure, and does not constitute a limitation on the computer device to which the solution of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0108] In this embodiment, a computer-readable storage medium is provided, as Figure 5 shown, on which a computer program is stored. When the computer program is executed by the processor, it implements the steps in the above method embodiments.
[0109] Embodiment X
[0110] In this embodiment, a computer program product is provided, including a computer program which, when executed by a processor, implements the steps in the above method embodiments.
[0111] 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 for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0112] Those of ordinary skill in the art can understand that all or part of the processes of implementing the above method embodiments can be completed by instructing relevant hardware through a computer program. 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 above method embodiments. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this disclosure can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this disclosure can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this disclosure can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.
[0113] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope recorded in this specification.
[0114] The above-described embodiments merely represent several implementation manners of the present disclosure. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present disclosure. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present disclosure, several modifications and improvements can still be made, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the appended claims.
Claims
1. An edge device update method, characterized in that, Applied to an Internet of Things device network, the Internet of Things device network includes: at least one cloud device and multiple edge devices, the cloud device is directly communicatively connected to each of the edge devices, and each of the edge devices is directly communicatively connected to each other; the method includes: Obtain an update instruction, and in response to the existence of an update package corresponding to the update instruction in at least one other of the edge devices, determine the edge device containing the update package to obtain a set of candidate edge devices; Based on the network conditions corresponding to each candidate edge device in the set of candidate edge devices, determine a target edge device; Update based on the obtained storage remaining space, remaining space threshold, and the update package in the target edge device.
2. The method according to claim 1, wherein The updating based on the obtained storage remaining space, remaining space threshold, and the update package in the target edge device includes: Based on the obtained storage remaining space and remaining space threshold, obtain a target remaining space; Obtain the update package size of the update package in the target edge device; Update based on the target remaining space, the update package size, and the update package in the target edge device.
3. The method according to claim 2, wherein The updating based on the target remaining space, the update package size, and the update package in the target edge device includes: In response to the target remaining space being greater than the update package size, receive the update package in the target edge device and update based on the received update package.
4. The method according to claim 2, characterized in that The updating based on the target remaining space, the update package size, and the update package in the target edge device includes: In response to the target remaining space not being greater than the update package size, establish a streaming channel with the target edge device, streamingly receive packet chunks of the update package in the target edge device based on the streaming channel, and update based on the packet chunks.
5. The method according to claim 1, wherein The network conditions include bandwidth, network latency, and packet loss rate; the determining of the target edge device based on the network conditions corresponding to each candidate edge device in the set of candidate edge devices includes: Obtain the bandwidth, network latency, and packet loss rate corresponding to each candidate edge device in the set of candidate edge devices, and also obtain a first weight corresponding to the bandwidth, a second weight corresponding to the network latency, and a third weight corresponding to the packet loss rate; Based on the bandwidth, network latency, and packet loss rate of each candidate edge device, and the first weight, the second weight, and the third weight, calculate the network communication quality corresponding to each candidate edge device one by one; Based on the network communication quality corresponding to each candidate edge device one by one, determine the target edge device.
6. The method according to claim 1, wherein It further includes: In response to an update failure, re-update based on the obtained storage remaining space, remaining space threshold, and the update package in the target edge device, and calculate the update retry count; In response to the update retry count being greater than a preset count threshold, send the update failure information to the target edge device so that the target edge device rolls back the update package and uploads the update failure information to the cloud device so that the cloud device broadcasts the update failure information to the Internet of Things device network.
7. An edge device update device, characterized in that, Applied to the Internet of Things device network, the Internet of Things device network includes: at least one cloud device and multiple edge devices, the cloud device is directly communicatively connected to each of the edge devices, and each of the edge devices is directly communicatively connected to each other; the apparatus includes: A device set acquisition module, configured to acquire an update instruction, and determine, in response to the existence of an update package corresponding to the update instruction in at least one other of the edge devices, the edge device containing the update package, so as to obtain a set of candidate edge devices; A target device determination module, configured to determine a target edge device based on the network conditions corresponding to each candidate edge device in the set of candidate edge devices; An update package update module, configured to perform an update based on the acquired remaining storage space, a remaining space threshold, and the update package in the target edge device.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, 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 the 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 the processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
P2P network node selection method and P2P redirect server
CN103957269A
Online version upgrading method and system for edge device, electronic device and storage medium
CN120010883A