A data edge distribution method, system, edge terminal and storage medium

By parsing and subcontracting the upgrade task instructions issued by the cloud platform in the edge computing device, the management difficulties caused by the diverse configuration of the edge computing device are solved, the accuracy and stability of the upgrade are achieved, and the network overhead is reduced.

CN118488042BActive Publication Date: 2024-10-22深圳开鸿数字产业发展有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410949772.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-10-22
Estimated Expiration
2044-07-16

AI Technical Summary

Technical Problem

In the existing technology, the diverse hardware and software configurations of edge computing devices make it difficult to manage data edge distribution, making it difficult to uniformly manage and ensure the accuracy and stability of upgrades.

Method used

By receiving the upgrade task instructions issued by the cloud platform, parsing and downloading the target upgrade package, subcontracting processing and sending for lightweight devices, ensuring the accuracy and stability of the terminal device receiving the upgrade package for device upgrade, and unified management of the upgrade. version to reduce version confusion.

Benefits of technology

It effectively ensures the accuracy and stability of terminal devices receiving upgrade packages for upgrading, and manages upgrade versions in a unified manner, reducing network overhead and avoiding version confusion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118488042B_ABST
    Figure CN118488042B_ABST
Patent Text Reader

Abstract

The present invention discloses a data edge distribution method, system, edge terminal and storage medium, the method comprising: when receiving an upgrade task instruction issued by a cloud platform, parsing to obtain the instruction type, terminal device ID and target upgrade package download address; establishing a communication connection with a terminal device according to the terminal device ID, and when it is determined that the terminal device does not meet the upgrade requirements, downloading the upgrade data packet on the cloud platform according to the target upgrade package download address to obtain the target upgrade package; when it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and sent to the terminal device; obtaining the upgrade result after the terminal device upgrades the device according to the multiple sub-package upgrade data packets, and uploading the upgrade result to the cloud platform. The present invention can sub-package and issue the upgrade package according to the device type of the terminal device, thereby ensuring the stability of data edge distribution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data edge distribution method, system, edge terminal and computer-readable storage medium. Background Art

[0002] The exponential growth of data collected by billions of IoT and mobile devices is driving a shift from sending data to cloud platforms for processing and storage to a distributed model. In this model, part of the computing occurs at the edge of the network, closer to where the data is created. Data edge processing refers to moving data processing functions closer to the data source to reduce the need for data to be transmitted in the network, improve response speed and reduce network bandwidth consumption to achieve faster, more reliable and more secure data transmission and processing.

[0003] Data edge processing technology has advantages such as proximity to data sources, low latency, and privacy protection, but it also faces problems such as security, uncertainty in network topology, and cost. In edge computing technology, the addition and exit of devices may cause changes in network topology, which brings challenges to network management and maintenance. In addition, since edge computing devices usually have diverse hardware and software configurations, unified management and standardization become difficult.

[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention

[0005] The main purpose of the present invention is to provide a data edge distribution method, system, edge terminal and computer-readable storage medium, aiming to solve the problem in the prior art that edge computing devices have diverse hardware and software configurations, which leads to difficulties in data edge distribution management.

[0006] To achieve the above object, the present invention provides a data edge distribution method, the data edge distribution method comprising the following steps:

[0007] When receiving an upgrade task instruction issued by the cloud platform, the upgrade task instruction is parsed to obtain a parsing result, wherein the parsing result includes the instruction type, the terminal device ID corresponding to the instruction type, and the target upgrade package download address;

[0008] Establishing a communication connection with the terminal device according to the terminal device ID, and when it is determined that the terminal device does not meet the upgrade requirements, downloading the upgrade data package on the cloud platform according to the target upgrade package download address to obtain the target upgrade package;

[0009] When it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device;

[0010] Obtain an upgrade result of the terminal device after the device is upgraded according to the multiple sub-package upgrade data packets, and upload the upgrade result to the cloud platform.

[0011] Optionally, the data edge distribution method, wherein when receiving the upgrade task instruction issued by the cloud platform, parsing the upgrade task instruction to obtain the parsing result specifically includes:

[0012] Establishing a communication connection with the cloud platform and receiving upgrade task instructions issued by the cloud platform;

[0013] Parsing the upgrade task instruction to obtain the instruction type, the terminal device ID corresponding to the instruction type, and the target upgrade package download address;

[0014] The instruction type is to upgrade a designated terminal device or to upgrade all terminal devices; the terminal device ID corresponding to the instruction type is the device ID corresponding to the designated terminal device or the device ID corresponding to all terminal devices.

[0015] Optionally, in the data edge distribution method, the upgrade requirement is that the downloaded target upgrade package or the upgrade package version meets a preset requirement;

[0016] The establishing of a communication connection with the terminal device according to the terminal device ID, and when it is determined that the terminal device does not meet the upgrade requirements, downloading the upgrade data package on the cloud platform according to the target upgrade package download address to obtain the target upgrade package, specifically includes:

[0017] Determine the terminal device according to the terminal device ID, and establish a communication connection with the terminal device;

[0018] If it is determined that the terminal device has not downloaded the target upgrade package or the upgrade package version does not meet the preset requirements, the upgrade data package is downloaded from the cloud platform according to the target upgrade package download address to obtain the initial target upgrade package;

[0019] An upgrade package integrity check is performed on the initial target upgrade package, and when the check passes, a target upgrade package is obtained.

[0020] Optionally, the data edge distribution method, wherein when it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device, specifically comprising:

[0021] Acquiring the device type of the terminal device, and when it is determined that the device type of the terminal device is a lightweight device type, sub-packaging the target upgrade package to obtain a plurality of sub-packaging upgrade data packets;

[0022] When the sub-packaging process is completed, an upgrade package sending instruction is generated, and the upgrade package sending instruction is sent to the terminal device;

[0023] When a confirmation message fed back by the terminal device according to the upgrade package sending instruction is received, the plurality of sub-package upgrade data packets are sent to the terminal device in sequence.

[0024] Optionally, the data edge distribution method, wherein the sending of the plurality of sub-package upgrade data packets to the terminal device in sequence, specifically comprises:

[0025] When the first sub-package upgrade data packet among the multiple sub-package upgrade data packets is sent and a reception confirmation message from the terminal device is received, the next sub-package upgrade data packet is sent to the terminal device until all sub-package upgrade data packets are sent;

[0026] When the sub-package upgrade data packets among the multiple sub-package upgrade data packets are sent completely and no reception confirmation message of the terminal device is received, the sub-package upgrade data packet that is currently sent completely is sent again;

[0027] When the number of resending reaches a preset number threshold, an upgrade task failure result is generated and the upgrade task failure result is uploaded to the cloud platform.

[0028] Optionally, the data edge distribution method, wherein when it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device, and then further includes:

[0029] If the communication connection with the terminal device is interrupted during the process of sending multiple sub-package upgrade data packets to the terminal device, obtaining the current packet sending state and storing the current packet sending state;

[0030] When the communication connection with the terminal device is restored, the current packet sending position is obtained according to the current packet sending state, and the unfinished sub-packet upgrade data packet is continued to be sent according to the current packet sending position.

[0031] Optionally, the data edge distribution method, wherein the step of obtaining an upgrade result of the terminal device after the device is upgraded according to the plurality of sub-package upgrade data packets, and uploading the upgrade result to the cloud platform, specifically includes:

[0032] When all of the sub-package upgrade data packets have been sent and verification pass information of the terminal device has been received, an upgrade instruction is generated and sent to the terminal device;

[0033] Obtain an upgrade result after the terminal device performs device upgrade according to the upgrade instruction and the multiple sub-package upgrade data packets, and upload the upgrade result to the cloud platform.

[0034] In addition, to achieve the above object, the present invention further provides a data edge distribution system, wherein the data edge distribution system comprises:

[0035] The instruction parsing module is used to parse the upgrade task instruction issued by the cloud platform when receiving the upgrade task instruction, and obtain the parsing result, wherein the parsing result includes the instruction type, the terminal device ID corresponding to the instruction type, and the target upgrade package download address;

[0036] A data packet download module, used to establish a communication connection with the terminal device according to the terminal device ID, and when it is determined that the terminal device does not meet the upgrade requirements, download the upgrade data packet on the cloud platform according to the target upgrade package download address to obtain the target upgrade package;

[0037] An upgrade package sub-packet sending module, for, when determining that the terminal device is a lightweight device type, sub-packetizing the target upgrade package to obtain a plurality of sub-packetized upgrade data packets, and sending the plurality of sub-packetized upgrade data packets to the terminal device;

[0038] The upgrade result uploading module is used to obtain the upgrade result of the terminal device after the device is upgraded according to the multiple sub-package upgrade data packets, and upload the upgrade result to the cloud platform.

[0039] In addition, to achieve the above-mentioned purpose, the present invention also provides an edge terminal, wherein the edge terminal includes: a memory, a processor, and a data edge distribution program stored in the memory and executable on the processor, and when the data edge distribution program is executed by the processor, the steps of the data edge distribution method described above are implemented.

[0040] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a data edge distribution program, and when the data edge distribution program is executed by a processor, the steps of the data edge distribution method described above are implemented.

[0041] In the present invention, when receiving the upgrade task instruction issued by the cloud platform, the upgrade task instruction is parsed to obtain the parsing result, wherein the parsing result includes the instruction type, the terminal device ID corresponding to the instruction type, and the target upgrade package download address; a communication connection is established with the terminal device according to the terminal device ID, and when it is determined that the terminal device does not have the upgrade requirements, the upgrade data packet is downloaded on the cloud platform according to the target upgrade package download address to obtain the target upgrade package; when it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device; the upgrade result after the terminal device upgrades the device according to the multiple sub-package upgrade data packets is obtained, and the upgrade result is uploaded to the cloud platform. When receiving the upgrade task instruction issued by the cloud platform, the present invention can obtain the corresponding target upgrade data packet according to the device type corresponding to the terminal device, and the target upgrade package is sub-packaged and then issued, which can effectively ensure the accuracy and stability of the terminal device receiving the upgrade package for upgrading. At the same time, the present invention can uniformly manage the upgraded versions, will not cause version confusion, and only needs to download the upgrade package once, effectively reducing network overhead. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flow chart of a preferred embodiment of the data edge distribution method of the present invention;

[0043] Figure 2 It is a schematic diagram of the overall architecture of edge distribution of a preferred embodiment of the data edge distribution method of the present invention;

[0044] Figure 3 It is a schematic diagram of the edge distribution process of a preferred embodiment of the data edge distribution method of the present invention;

[0045] Figure 4 It is a schematic diagram of the instruction processing flow of the main control device of the preferred embodiment of the data edge distribution method of the present invention;

[0046] Figure 5 It is a schematic diagram of the distribution file and instruction flow of the master control device in the preferred embodiment of the data edge distribution method of the present invention;

[0047] Figure 6 It is a schematic diagram of the breakpoint-resume transmission process of a preferred embodiment of the data edge distribution method of the present invention;

[0048] Figure 7 It is a structural diagram of a preferred embodiment of the data edge distribution system of the present invention;

[0049] Figure 8 FIG. 4 is a structural diagram of a preferred embodiment of the edge end of the present invention. DETAILED DESCRIPTION

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

[0051] The exponential growth of data collected by billions of IoT and mobile devices is driving a shift from sending data to cloud platforms for processing and storage to a distributed model in which part of the computing occurs at the edge of the network, closer to where the data is created. Data edge processing refers to moving data processing functions closer to the data source to reduce the need for data to travel across the network, improve response speed and reduce network bandwidth consumption to achieve faster, more reliable and more secure data transmission and processing.

[0052] Data edge processing technology has advantages such as proximity to data sources, low latency, and privacy protection, but it also faces problems such as security, uncertainty in network topology, and cost. In edge computing technology, the addition and exit of devices may cause changes in network topology, which brings challenges to network management and maintenance. In addition, since edge computing devices usually have diverse hardware and software configurations, unified management and standardization become difficult.

[0053] In response to the above problems, the present invention proposes a data edge distribution method, which can distribute instructions or files to the device end or terminal for processing, and can also distribute upgrade instructions and upgrade packages to the terminal devices. Compared with general solutions, the present invention can uniformly manage upgrade versions without causing version confusion. It only needs to download the upgrade package once, reducing network overhead.

[0054] The data edge distribution method described in the preferred embodiment of the present invention is as follows: Figure 1 and Figure 2 As shown, the data edge distribution method includes the following steps:

[0055] Step S10: When receiving the upgrade task instruction issued by the cloud platform, the upgrade task instruction is parsed to obtain a parsing result, wherein the parsing result includes the instruction type, the terminal device ID corresponding to the instruction type, and the target upgrade package download address.

[0056] The present invention mainly includes three modules: cloud platform, main control device (i.e. edge terminal in the present invention) and terminal device. Among them, the cloud platform: is used to create tasks and issue instructions;

[0057] Main control device: used to parse and distribute instructions, download upgrade packages and distribute them to devices; terminal device: used to receive and execute instructions.

[0058] Scenario preparation: The main control device is connected to the cloud platform for communication; the main control device is networked with the terminal device.

[0059] Edge distribution process: In actual applications, there are a large number of scenarios requiring distributed storage and distributed file distribution of secondary files. The present invention abstracts these scenarios and designs general edge copy storage and edge file distribution services. It provides capabilities to applications and system services through the NAPI (NAPI is a technology used on Linux to improve network processing efficiency) interface and the NATVIE interface (an interface for Java to call non-Java code), thereby realizing edge copy storage and edge file distribution functions.

[0060] like Figure 3 As shown, the present invention sends an upgrade instruction to the main control device through the cloud platform, and then the main control device parses the upgrade instruction and downloads the upgrade package, and distributes the upgrade instruction and the upgrade package to the terminal device, so that the terminal device can successfully complete the upgrade task.

[0061] Specifically, a communication connection is established with the cloud platform, and an upgrade task instruction issued by the cloud platform is received; the upgrade task instruction is parsed and processed to obtain the instruction type, the terminal device ID corresponding to the instruction type, and the target upgrade package download address; wherein the instruction type is to upgrade the specified terminal device or to upgrade all terminal devices; the terminal device ID corresponding to the instruction type is the device ID corresponding to the specified terminal device or the device ID corresponding to all terminal devices.

[0062] When a user creates an upgrade task, he or she can first query whether there is an upgrade data package to be released stored in the cloud platform's management server itself or the storage server. If so, for each terminal device, query whether the terminal device has a downloaded upgrade data package or whether the version of the installed data package corresponding to the upgrade data package is lower than the version of the upgrade data package; if it is lower, it indicates that the terminal device needs to be upgraded using the upgrade data package, and the terminal device can be determined as an upgradeable terminal device.

[0063] Furthermore, the cloud platform may periodically determine a plurality of upgradeable terminal devices from a plurality of terminal devices; or, upon receiving a specified trigger instruction, the cloud platform executes the step of determining a plurality of upgradeable terminal devices from a plurality of terminal devices.

[0064] like Figure 3 As shown in the figure, the process of issuing cloud platform instructions is as follows: after the main control device is connected to the cloud platform, the user can create an upgrade task on the cloud platform and configure the parameters required for the task. When the parameter configuration is completed and the upgrade task is generated, the upgrade task is issued to the main control device. When configuring the upgrade task, the user can choose to upgrade a specified device or perform a unified upgrade of the terminal devices.

[0065] For the process of the master device receiving instructions: the cloud platform sends the task instruction to the master control device, which includes the instruction type, terminal device ID and the target upgrade package download address. The edge distribution service parses the instruction and obtains the terminal device receiving the instruction and the instruction type. When the master control device receives the upgrade task, it parses the task instruction to obtain the target upgrade package download address.

[0066] Step S20: Establish a communication connection with the terminal device according to the terminal device ID. If it is determined that the terminal device does not meet the upgrade requirements, download the upgrade data package on the cloud platform according to the target upgrade package download address to obtain the target upgrade package. The upgrade requirement is that the downloaded target upgrade package or the upgrade package version meets the preset requirements.

[0067] Specifically, the terminal device is determined according to the terminal device ID, and a communication connection is established with the terminal device; if it is determined that the terminal device has not downloaded the target upgrade package or the upgrade package version does not meet the preset requirements, the upgrade data packet is downloaded from the cloud platform according to the target upgrade package download address to obtain an initial target upgrade package; an upgrade package integrity check is performed on the initial target upgrade package, and when the check passes, the target upgrade package is obtained.

[0068] like Figure 4 As shown, when the main control device establishes a connection with the terminal device, the main control device will check whether the upgrade package has been downloaded locally. If the upgrade package has not been downloaded locally or the upgrade package version does not correspond, the main control device will start downloading the upgrade package from the cloud. After the download is complete, the integrity of the upgrade package will be checked to ensure that the upgrade package is downloaded correctly.

[0069] like Figure 4 As shown, after the upgrade package is downloaded, if the main control device is connected to multiple terminal devices of the same type at the same time and multiple devices need to be upgraded uniformly, the upgrade package only needs to be downloaded once and then distributed to the devices that need to be upgraded respectively.

[0070] Step S30: When it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device.

[0071] Specifically, the device type of the terminal device is obtained, and when it is determined that the device type of the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets; when the sub-package processing is completed, an upgrade package sending instruction is generated, and the upgrade package sending instruction is sent to the terminal device; when a confirmation message is received from the terminal device based on the upgrade package sending instruction, the multiple sub-package upgrade data packets are sent to the terminal device in sequence.

[0072] It can be understood that when the first sub-package upgrade data packet among the multiple sub-package upgrade data packets is sent and a reception confirmation message from the terminal device is received, the next sub-package upgrade data packet is sent to the terminal device until all the sub-package upgrade data packets are sent; when the sub-package upgrade data packet among the multiple sub-package upgrade data packets is sent and no reception confirmation message from the terminal device is received, the sub-package upgrade data packet that has been sent is resent; when the number of resending reaches a preset number threshold, an upgrade task failure result is generated, and the upgrade task failure result is uploaded to the cloud platform.

[0073] Regarding the process of distributing upgrade packages and instructions: according to the instruction parsing result, the main control device sends the instruction to the corresponding terminal device, and the terminal device executes the instruction after receiving the instruction.

[0074] Specifically, after the main control device receives the upgrade instruction, which includes the ID of the terminal device to be upgraded, the main control device parses the terminal device ID, establishes a channel with the determined terminal device according to the terminal device ID, and establishes communication with the determined terminal device through the established channel.

[0075] like Figure 5 As shown, the main control device will generate a sending instruction before sending the upgrade package, and use this sending instruction to notify the terminal device that the main control device will start sending the upgrade package. When the main control device receives the confirmation from the terminal device (i.e. Figure 5 After the ack-confirmation character in the message, the main control device starts to send the upgrade package to the terminal device. Since the terminal device hardware may be a lightweight device, the main control device needs to send the upgrade package in packets. At the same time, in order to ensure the integrity of the data packet, during the process of sending the upgrade package, the main control device needs to receive the confirmation message sent by the terminal device after each successful transmission before sending the next packet.

[0076] If the main control device does not receive a confirmation message from the terminal device after sending the upgrade package, the main control device retries to send the package to the terminal device. When the number of retries exceeds the specified number of failures, the main control device reports the failure of the upgrade task to the cloud platform.

[0077] Furthermore, if the communication connection with the terminal device is interrupted during the process of sending multiple sub-package upgrade data packets to the terminal device, the current packet sending status is obtained and stored; when the communication connection with the terminal device is restored, the current packet sending position is obtained according to the current packet sending status, and the unfinished sub-package upgrade data packets continue to be sent according to the current packet sending position.

[0078] If the terminal device fails to verify the upgrade package, for example, data corruption occurs during the process of sending the upgrade package, the main control device is notified to resend a notification to start sending the package to the device terminal and retransmit the upgrade package.

[0079] like Figure 6 As shown in the figure, if the terminal device is disconnected from the main control device during the packet sending process, the main control device will store the packet sending status. When the terminal device reconnects and goes online, the main control device queries the packet sending status and continues to send the upgrade package from the packet sending position when the connection is disconnected to save time and resources. At the same time, to avoid incorrect status, the terminal device will check whether the packet sending position is correct after receiving the upgrade package. If it is incorrect, it will notify the main control device to determine the correct packet sending position and start sending the package again from the correct position.

[0080] Step S40: obtaining an upgrade result of the terminal device after the device is upgraded according to the multiple sub-package upgrade data packets, and uploading the upgrade result to the cloud platform.

[0081] Specifically, when all of the multiple sub-package upgrade data packets are sent and the verification pass information of the terminal device is received, an upgrade instruction is generated and sent to the terminal device; the upgrade result after the terminal device upgrades the device according to the upgrade instruction and the multiple sub-package upgrade data packets is obtained, and the upgrade result is uploaded to the cloud platform.

[0082] When the main control device completes sending the upgrade package, the terminal device performs an integrity check on the upgrade package. After the check succeeds, it sends a message to the main control device to confirm that the upgrade package has been received correctly. At this time, the main control device sends an upgrade instruction to the terminal device. After receiving the upgrade instruction, the terminal device starts the upgrade and returns the upgrade result to the main control device after the upgrade is completed. After receiving the message, the main control device reports the upgrade result to the cloud platform.

[0083] It is understandable that after the upgrade is completed, the terminal device will feedback the upgrade completion notification to the main control device; or, the main control device will actively send query information on whether the upgrade is completed to the terminal device to be upgraded according to a preset period, so that the terminal device to be upgraded can feedback the result of whether the upgrade is completed.

[0084] In addition, during the terminal device upgrade, in order not to stop processing received tasks, the terminal device can hand over new tasks processed by the terminal device to be upgraded to the terminal device that is not upgraded for processing, thereby achieving non-stop service upgrade.

[0085] The present invention proposes a data edge distribution method, which can distribute instructions or files to the device end or terminal for processing, and can also distribute upgrade instructions and upgrade packages to the terminal device. Compared with general solutions, the present invention can uniformly manage upgrade versions, will not cause version confusion, and only download the upgrade package once, effectively reducing network overhead.

[0086] Furthermore, if Figure 7 As shown, based on the above data edge distribution method, the present invention also provides a data edge distribution system accordingly, wherein the data edge distribution system includes:

[0087] The instruction parsing module 51 is used to parse the upgrade task instruction issued by the cloud platform to obtain a parsing result when receiving the upgrade task instruction, wherein the parsing result includes the instruction type, the terminal device ID corresponding to the instruction type, and the target upgrade package download address;

[0088] The data packet download module 52 is used to establish a communication connection with the terminal device according to the terminal device ID, and when it is determined that the terminal device does not meet the upgrade requirements, the upgrade data packet is downloaded from the cloud platform according to the target upgrade package download address to obtain the target upgrade package;

[0089] The upgrade package sub-packet sending module 53 is used for, when it is determined that the terminal device is a lightweight device type, to sub-packetize the target upgrade package to obtain multiple sub-packet upgrade data packets, and to send the multiple sub-packet upgrade data packets to the terminal device;

[0090] The upgrade result uploading module 54 is used to obtain the upgrade result of the terminal device after the device is upgraded according to the multiple sub-package upgrade data packets, and upload the upgrade result to the cloud platform.

[0091] Furthermore, if Figure 8 As shown, based on the above-mentioned data edge distribution method and system, the present invention also provides an edge terminal accordingly, and the edge terminal includes a processor 10, a memory 20 and a display 30. Figure 8 Only some components of the edge end are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

[0092] In some embodiments, the memory 20 may be an internal storage unit of the edge end, such as a hard disk or memory of the edge end. In other embodiments, the memory 20 may also be an external storage device of the edge end, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the edge end. Furthermore, the memory 20 may also include both an internal storage unit of the edge end and an external storage device. The memory 20 is used to store application software and various types of data installed on the edge end, such as program codes of the installed edge end. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a data edge distribution program 40 is stored on the memory 20, and the data edge distribution program 40 can be executed by the processor 10, thereby realizing the data edge distribution method in the present application.

[0093] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code stored in the memory 20 or process data, such as executing the data edge distribution method.

[0094] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the edge end and to display a visual user interface. The components 10-30 on the edge end communicate with each other via a system bus.

[0095] In one embodiment, when the processor 10 executes the data edge distribution program 40 in the memory 20, the following steps are implemented:

[0096] When receiving an upgrade task instruction issued by the cloud platform, the upgrade task instruction is parsed to obtain a parsing result, wherein the parsing result includes the instruction type, the terminal device ID corresponding to the instruction type, and the target upgrade package download address;

[0097] Establishing a communication connection with the terminal device according to the terminal device ID, and when it is determined that the terminal device does not meet the upgrade requirements, downloading the upgrade data package on the cloud platform according to the target upgrade package download address to obtain the target upgrade package;

[0098] When it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device;

[0099] Obtain an upgrade result of the terminal device after the device is upgraded according to the multiple sub-package upgrade data packets, and upload the upgrade result to the cloud platform.

[0100] When receiving the upgrade task instruction issued by the cloud platform, the upgrade task instruction is parsed to obtain the parsing result, which specifically includes:

[0101] Establishing a communication connection with the cloud platform and receiving upgrade task instructions issued by the cloud platform;

[0102] Parsing the upgrade task instruction to obtain the instruction type, the terminal device ID corresponding to the instruction type, and the target upgrade package download address;

[0103] The instruction type is to upgrade a designated terminal device or to upgrade all terminal devices; the terminal device ID corresponding to the instruction type is the device ID corresponding to the designated terminal device or the device ID corresponding to all terminal devices.

[0104] The upgrade requirement is that the downloaded target upgrade package or the upgrade package version meets the preset requirement;

[0105] The establishing of a communication connection with the terminal device according to the terminal device ID, and when it is determined that the terminal device does not meet the upgrade requirements, downloading the upgrade data package on the cloud platform according to the target upgrade package download address to obtain the target upgrade package, specifically includes:

[0106] Determine the terminal device according to the terminal device ID, and establish a communication connection with the terminal device;

[0107] If it is determined that the terminal device has not downloaded the target upgrade package or the upgrade package version does not meet the preset requirements, the upgrade data package is downloaded from the cloud platform according to the target upgrade package download address to obtain the initial target upgrade package;

[0108] An upgrade package integrity check is performed on the initial target upgrade package, and when the check passes, a target upgrade package is obtained.

[0109] Wherein, when it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device, specifically including:

[0110] Acquiring the device type of the terminal device, and when it is determined that the device type of the terminal device is a lightweight device type, sub-packaging the target upgrade package to obtain a plurality of sub-packaging upgrade data packets;

[0111] When the sub-packaging process is completed, an upgrade package sending instruction is generated, and the upgrade package sending instruction is sent to the terminal device;

[0112] When a confirmation message fed back by the terminal device according to the upgrade package sending instruction is received, the plurality of sub-package upgrade data packets are sent to the terminal device in sequence.

[0113] The sending of the plurality of sub-package upgrade data packets to the terminal device in sequence specifically includes:

[0114] When the first sub-package upgrade data packet among the multiple sub-package upgrade data packets is sent and a reception confirmation message from the terminal device is received, the next sub-package upgrade data packet is sent to the terminal device until all sub-package upgrade data packets are sent;

[0115] When the sub-package upgrade data packets among the multiple sub-package upgrade data packets are sent completely and no reception confirmation message of the terminal device is received, the sub-package upgrade data packet that is currently sent completely is sent again;

[0116] When the number of resending reaches a preset number threshold, an upgrade task failure result is generated and the upgrade task failure result is uploaded to the cloud platform.

[0117] Wherein, when it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device, and then it also includes:

[0118] If the communication connection with the terminal device is interrupted during the process of sending multiple sub-package upgrade data packets to the terminal device, obtaining the current packet sending state and storing the current packet sending state;

[0119] When the communication connection with the terminal device is restored, the current packet sending position is obtained according to the current packet sending state, and the unfinished sub-packet upgrade data packet is continued to be sent according to the current packet sending position.

[0120] The obtaining of the upgrade result after the terminal device performs the device upgrade according to the plurality of sub-package upgrade data packets, and uploading the upgrade result to the cloud platform specifically includes:

[0121] When all of the sub-package upgrade data packets have been sent and verification pass information of the terminal device has been received, an upgrade instruction is generated and sent to the terminal device;

[0122] Obtain an upgrade result after the terminal device performs device upgrade according to the upgrade instruction and the multiple sub-package upgrade data packets, and upload the upgrade result to the cloud platform.

[0123] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a data edge distribution program, and when the data edge distribution program is executed by a processor, the steps of the data edge distribution method described above are implemented.

[0124] In summary, the present invention provides a data edge distribution method and related equipment, the method comprising: when receiving an upgrade task instruction issued by a cloud platform, parsing the upgrade task instruction to obtain a parsing result, wherein the parsing result includes the instruction type, the terminal device ID corresponding to the instruction type, and the target upgrade package download address; establishing a communication connection with the terminal device according to the terminal device ID, and when it is determined that the terminal device does not have the upgrade requirements, downloading the upgrade data packet on the cloud platform according to the target upgrade package download address to obtain the target upgrade package; when it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device; obtaining the upgrade result of the terminal device after the device is upgraded according to the multiple sub-package upgrade data packets, and uploading the upgrade result to the cloud platform. When the present invention receives the upgrade task instruction issued by the cloud platform, it can obtain the corresponding target upgrade data packet according to the device type corresponding to the terminal device, and the target upgrade package is sub-packaged and then issued, which can effectively ensure the accuracy and stability of the terminal device receiving the upgrade package for upgrading. At the same time, the present invention can uniformly manage the upgraded versions, will not cause version confusion, and only needs to download the upgrade package once, effectively reducing network overhead.

[0125] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or edge end including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or edge end. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or edge end including the element.

[0126] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.

[0127] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A data edge distribution method, characterized in that: The data edge distribution method comprises: When receiving an upgrade task instruction issued by the cloud platform, the upgrade task instruction is parsed to obtain a parsing result, wherein the parsing result includes the instruction type, the terminal device ID corresponding to the instruction type, and the target upgrade package download address; Establishing a communication connection with the terminal device according to the terminal device ID, and when it is determined that the terminal device does not meet the upgrade requirements, downloading the upgrade data package on the cloud platform according to the target upgrade package download address to obtain the target upgrade package; The upgrade requirement is that the downloaded target upgrade package or the upgrade package version meets the preset requirement; The establishing of a communication connection with the terminal device according to the terminal device ID, and when it is determined that the terminal device does not meet the upgrade requirements, downloading the upgrade data package on the cloud platform according to the target upgrade package download address to obtain the target upgrade package, specifically includes: Determine the terminal device according to the terminal device ID, and establish a communication connection with the terminal device; If it is determined that the terminal device has not downloaded the target upgrade package or the upgrade package version does not meet the preset requirements, the upgrade data package is downloaded from the cloud platform according to the target upgrade package download address to obtain the initial target upgrade package; Performing an upgrade package integrity check on the initial target upgrade package, and obtaining a target upgrade package when the check passes; When it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device; When it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device, specifically including: Acquiring the device type of the terminal device, and when it is determined that the device type of the terminal device is a lightweight device type, sub-packaging the target upgrade package to obtain a plurality of sub-packaging upgrade data packets; When the sub-packaging process is completed, an upgrade package sending instruction is generated, and the upgrade package sending instruction is sent to the terminal device; When receiving a confirmation message fed back by the terminal device according to the upgrade package sending instruction, sending the plurality of sub-package upgrade data packets to the terminal device in sequence; The sending of the plurality of sub-package upgrade data packets to the terminal device in sequence specifically includes: When the first sub-package upgrade data packet among the multiple sub-package upgrade data packets is sent and a reception confirmation message from the terminal device is received, the next sub-package upgrade data packet is sent to the terminal device until all sub-package upgrade data packets are sent; When the sub-package upgrade data packets among the multiple sub-package upgrade data packets are sent completely and no reception confirmation message of the terminal device is received, the sub-package upgrade data packet that is currently sent completely is sent again; When the number of resends reaches a preset number threshold, an upgrade task failure result is generated and the upgrade task failure result is uploaded to the cloud platform; When it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device, and then it also includes: If the communication connection with the terminal device is interrupted during the process of sending multiple sub-package upgrade data packets to the terminal device, obtaining the current packet sending state and storing the current packet sending state; When the communication connection with the terminal device is restored, the current packet sending position is obtained according to the current packet sending state, and the unfinished sub-package upgrade data packet is continued to be sent according to the current packet sending position; After receiving the upgrade package, the terminal device verifies whether the package sending position is correct. If it is wrong, it notifies the main control device to determine the correct package sending position and starts sending the package again from the correct position; Obtaining an upgrade result after the terminal device performs device upgrade according to the multiple sub-package upgrade data packets, and uploading the upgrade result to the cloud platform; After the upgrade is completed, the terminal device feeds back a notification of the upgrade completion to the main control device; Alternatively, the main control device actively sends query information on whether the upgrade is completed to the terminal device to be upgraded according to a preset period, so that the terminal device to be upgraded feeds back the result of whether the upgrade is completed; During the terminal device upgrade, in order to not stop processing the received tasks, the terminal device hands over the new tasks processed by the terminal device to be upgraded to the terminal device that is not upgraded for processing, so as to achieve non-stop service upgrade.

2. The data edge distribution method according to claim 1, characterized in that: When receiving the upgrade task instruction issued by the cloud platform, the upgrade task instruction is parsed to obtain the parsing result, which specifically includes: Establishing a communication connection with the cloud platform and receiving upgrade task instructions issued by the cloud platform; Parsing the upgrade task instruction to obtain the instruction type, the terminal device ID corresponding to the instruction type, and the target upgrade package download address; The instruction type is to upgrade a designated terminal device or to upgrade all terminal devices; the terminal device ID corresponding to the instruction type is the device ID corresponding to the designated terminal device or the device ID corresponding to all terminal devices.

3. The data edge distribution method according to claim 1, characterized in that: The obtaining the upgrade result of the terminal device after the device is upgraded according to the multiple sub-package upgrade data packets, and uploading the upgrade result to the cloud platform specifically includes: When all of the sub-package upgrade data packets have been sent and verification pass information of the terminal device has been received, an upgrade instruction is generated and sent to the terminal device; Obtain an upgrade result after the terminal device performs device upgrade according to the upgrade instruction and the multiple sub-package upgrade data packets, and upload the upgrade result to the cloud platform.

4. A data edge distribution system, characterized in that: The data edge distribution system comprises: The instruction parsing module is used to parse the upgrade task instruction issued by the cloud platform when receiving the upgrade task instruction, and obtain the parsing result, wherein the parsing result includes the instruction type, the terminal device ID corresponding to the instruction type, and the target upgrade package download address; A data packet download module, used to establish a communication connection with the terminal device according to the terminal device ID, and when it is determined that the terminal device does not meet the upgrade requirements, download the upgrade data packet on the cloud platform according to the target upgrade package download address to obtain the target upgrade package; The upgrade requirement is that the downloaded target upgrade package or the upgrade package version meets the preset requirement; The establishing of a communication connection with the terminal device according to the terminal device ID, and when it is determined that the terminal device does not meet the upgrade requirements, downloading the upgrade data package on the cloud platform according to the target upgrade package download address to obtain the target upgrade package, specifically includes: Determine the terminal device according to the terminal device ID, and establish a communication connection with the terminal device; If it is determined that the terminal device has not downloaded the target upgrade package or the upgrade package version does not meet the preset requirements, the upgrade data package is downloaded from the cloud platform according to the target upgrade package download address to obtain the initial target upgrade package; Performing an upgrade package integrity check on the initial target upgrade package, and obtaining a target upgrade package when the check passes; An upgrade package sub-packet sending module, for, when determining that the terminal device is a lightweight device type, sub-packetizing the target upgrade package to obtain a plurality of sub-packetized upgrade data packets, and sending the plurality of sub-packetized upgrade data packets to the terminal device; When it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device, specifically including: Acquiring the device type of the terminal device, and when it is determined that the device type of the terminal device is a lightweight device type, sub-packaging the target upgrade package to obtain a plurality of sub-packaging upgrade data packets; When the sub-packaging process is completed, an upgrade package sending instruction is generated, and the upgrade package sending instruction is sent to the terminal device; When receiving a confirmation message fed back by the terminal device according to the upgrade package sending instruction, sending the plurality of sub-package upgrade data packets to the terminal device in sequence; The sending of the plurality of sub-package upgrade data packets to the terminal device in sequence specifically includes: When the first sub-package upgrade data packet among the multiple sub-package upgrade data packets is sent and a reception confirmation message from the terminal device is received, the next sub-package upgrade data packet is sent to the terminal device until all sub-package upgrade data packets are sent; When the sub-package upgrade data packets among the multiple sub-package upgrade data packets are sent completely and no reception confirmation message of the terminal device is received, the sub-package upgrade data packet that is currently sent completely is sent again; When the number of resends reaches a preset number threshold, an upgrade task failure result is generated and the upgrade task failure result is uploaded to the cloud platform; When it is determined that the terminal device is a lightweight device type, the target upgrade package is sub-packaged to obtain multiple sub-package upgrade data packets, and the multiple sub-package upgrade data packets are sent to the terminal device, and then it also includes: If the communication connection with the terminal device is interrupted during the process of sending multiple sub-package upgrade data packets to the terminal device, obtaining the current packet sending state and storing the current packet sending state; When the communication connection with the terminal device is restored, the current packet sending position is obtained according to the current packet sending state, and the unfinished sub-package upgrade data packet is continued to be sent according to the current packet sending position; After receiving the upgrade package, the terminal device verifies whether the package sending position is correct. If it is wrong, it notifies the main control device to determine the correct package sending position and starts sending the package again from the correct position; An upgrade result uploading module, used to obtain the upgrade result of the terminal device after the device is upgraded according to the multiple sub-package upgrade data packets, and upload the upgrade result to the cloud platform; After the upgrade is completed, the terminal device feeds back a notification of the upgrade completion to the main control device; Alternatively, the main control device actively sends query information on whether the upgrade is completed to the terminal device to be upgraded according to a preset period, so that the terminal device to be upgraded feeds back the result of whether the upgrade is completed; During the terminal device upgrade, in order to not stop processing the received tasks, the terminal device hands over the new tasks processed by the terminal device to be upgraded to the terminal device that is not upgraded for processing, so as to achieve non-stop service upgrade.

5. An edge end, characterized in that: The edge end includes: a memory, a processor, and a data edge distribution program stored in the memory and executable on the processor. When the data edge distribution program is executed by the processor, the steps of the data edge distribution method according to any one of claims 1 to 3 are implemented.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a data edge distribution program, and when the data edge distribution program is executed by a processor, the steps of the data edge distribution method according to any one of claims 1 to 3 are implemented.