CN113805957B - Method and device for dynamically loading edge program - Google Patents

Method and device for dynamically loading edge program Download PDF

Info

Publication number
CN113805957B
CN113805957B CN202110928819.4A CN202110928819A CN113805957B CN 113805957 B CN113805957 B CN 113805957B CN 202110928819 A CN202110928819 A CN 202110928819A CN 113805957 B CN113805957 B CN 113805957B
Authority
CN
China
Prior art keywords
package
edge
target
cloud platform
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110928819.4A
Other languages
Chinese (zh)
Other versions
CN113805957A (en
Inventor
胡正才
张科
何龙
谭维鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Aciga Technology Co ltd
Original Assignee
Guangdong Aciga Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Aciga Technology Co ltd filed Critical Guangdong Aciga Technology Co ltd
Priority to CN202110928819.4A priority Critical patent/CN113805957B/en
Publication of CN113805957A publication Critical patent/CN113805957A/en
Application granted granted Critical
Publication of CN113805957B publication Critical patent/CN113805957B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The invention discloses a method and a device for dynamically loading an edge program, wherein the device is used for executing the method, and the method comprises the following steps: the cloud platform acquires target package information which needs to be loaded or updated at the target edge; the cloud platform acquires target business demand information of a target edge end; the cloud platform determines a target package list applicable to the target edge according to the target package information and the target service demand information; the cloud platform executes a first management operation for each target program package in the target program package list; and the cloud platform executes a second management operation for each package except the target package list. The implementation of the invention is beneficial to the cooperation of the cloud platform and the edge program, realizes the functions of dynamic loading and on-demand loading of the edge program, can realize centralized management of the functions loaded on the edge of the cloud platform, and greatly reduces the version upgrading difficulty of the edge.

Description

Method and device for dynamically loading edge program
Technical Field
The invention relates to the technical field of the internet of things, in particular to a method and a device for dynamically loading an edge program.
Background
With the development of application of the internet of things, more and more internet of things platforms adopt a cloud and side architecture scheme. Under the architecture scheme, the internet of things cloud platform mainly completes related functions needing centralized computation, such as unified management of equipment based on the cloud platform, and most of business processing can be completed in an edge program.
However, it is found that some new problems are also brought about under the "cloud+edge" architecture scheme. The edge program often operates in a local area network, the local area network is distributed on each project site, the program version update of the edge program can become troublesome, and the operation can only be performed remotely or on site through a network, so that the version update implementation difficulty of the edge program is greatly increased, and the cost can be higher.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method and a device for dynamically loading an edge program, which are beneficial to efficiently updating the edge program.
In order to solve the technical problem, the first aspect of the present invention discloses a dynamic loading method for an edge program, which is applied to an internet of things system, wherein the internet of things system is provided with a cloud platform and an edge which are in communication connection, the edge comprises a plurality of local area networks, the local area networks comprise a plurality of terminal devices and edge servers which are in communication connection with the plurality of terminal devices, and the method comprises:
the cloud platform acquires target package information which needs to be loaded or updated at a target edge;
the cloud platform acquires target business demand information of a target edge end;
the cloud platform determines a target package list applicable to the target edge according to the target package information and the target business demand information;
the cloud platform executes a first management operation for each target package in the target package list, wherein the first management operation comprises one of an authorization operation, a loading operation, an upgrading operation and a recovery operation;
the cloud platform executes a second management operation for each package other than the target package list, wherein the second management operation comprises one of a cancel authorization operation, an uninstall operation, a return operation and a pause operation.
In the first aspect of the present invention, the cloud platform determines the target package list applicable to the target edge according to the target package information and the target service requirement information, and executes the first management operation for each target package in the target package list, and executes the second management operation for each package outside the target package list, which is favorable for the cooperation of the cloud platform and the edge program, and realizes the dynamic loading and on-demand loading functions of the edge program, and can realize centralized management of the functions loaded on the edge at the cloud platform, thereby greatly reducing the version upgrading difficulty of the edge, and reducing the labor cost required for updating the edge version.
In an optional implementation manner, in the first aspect of the present invention, after the cloud platform determines, according to the target package information and the target service requirement information, a target package list applicable to the target edge, the method further includes:
and the cloud platform sends a target package list to the target edge end so that the target edge end executes loading or updating operation of the target package according to the target package list.
In an optional implementation manner, in the first aspect of the present invention, before the cloud platform determines, according to the target package information and the target service requirement information, a target package list applicable to the target edge, the method further includes:
the cloud platform acquires a package information table, wherein the package information table comprises package information compatible with an edge server accessed to the internet of things system, and the package information comprises one or more of package ID, package identifier, package version number, package name, package function description, update content description relative to a previous version package, package application range, package download path, package summary data and package state.
In an optional implementation manner, in the first aspect of the present invention, before the cloud platform determines, according to the target package information and the target service requirement information, a target package list applicable to the target edge, and after the cloud platform acquires the package information table, the method further includes:
the cloud platform acquires an edge information table corresponding to the program package information table, wherein the edge information table comprises an edge ID, an edge installation and use position, an edge loaded function program package list and one or more combinations of a loading running state, an edge use environment and an edge use description.
In an optional implementation manner, in a first aspect of the present invention, the cloud platform obtains target package information that needs to be loaded or needs to be updated by a target edge, which specifically includes:
the cloud platform acquires the currently loaded program package information of the target edge;
and the cloud platform determines the target package information which needs to be loaded or updated by the target edge according to the currently loaded package information and the package information compatible with the edge server.
As an optional implementation manner, in the first aspect of the present invention, the method further includes:
and the cloud platform acquires a loaded program package list and a corresponding program package running state which are periodically reported by the target edge.
The second aspect of the invention discloses an edge program dynamic loading device which is applied to an Internet of things system, wherein the Internet of things system is provided with a cloud platform and an edge which are in communication connection, the edge comprises a plurality of local area networks, the local area networks comprise a plurality of terminal devices and edge servers which are in communication connection with the terminal devices, the edge program dynamic loading device is arranged in the cloud platform and comprises an acquisition module, a determination module and a management module,
the acquisition module is used for acquiring the information of the target program package which needs to be loaded or updated by the target edge,
the acquisition module is further configured to acquire target service requirement information of a target edge,
the determining module is configured to determine a target package list applicable to the target edge according to the target package information and the target service requirement information,
the management module is used for executing a first management operation aiming at each target program package in the target program package list, wherein the first management operation comprises one of an authorization operation, a loading operation, an upgrading operation and a recovery operation,
the management module is further configured to perform a second management operation for each package other than the target package list, where the second management operation includes one of a cancel authorization operation, an unload operation, a return operation, and a suspend operation.
In the second aspect of the present invention, the cloud platform determines the target package list applicable to the target edge according to the target package information and the target service requirement information, and executes the first management operation for each target package in the target package list, and executes the second management operation for each package outside the target package list, which is favorable for the cloud platform to cooperate with the edge program to realize the dynamic loading and on-demand loading functions of the edge program, and can realize centralized management of the functions loaded on the edge at the cloud platform, thereby greatly reducing the difficulty of version upgrade of the edge, and reducing the labor cost required for version upgrade of the edge.
The third aspect of the present invention discloses another dynamic loading device for an edge program, which is applied to an internet of things system, wherein the internet of things system is provided with a cloud platform and an edge which are in communication connection, the edge comprises a plurality of local area networks, the local area networks comprise a plurality of terminal devices and an edge server which is in communication connection with the plurality of terminal devices, the dynamic loading device for the edge program is arranged in the cloud platform, and the dynamic loading device for the edge program comprises:
a memory storing executable program code;
a processor coupled to the memory;
the processor calls the executable program codes stored in the memory to execute the steps of the method for dynamically loading the edge program disclosed in the first aspect of the invention.
A fourth aspect of the present invention discloses a computer readable storage medium storing computer instructions which, when called, are adapted to perform the steps of the method for dynamically loading an edge-side program disclosed in the first aspect of the present invention.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of an internet of things system of an edge program dynamic loading method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a dynamic loading method of an edge program according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an edge-side program dynamic loading device according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another dynamic loading device for an edge program according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first, second and the like in the description and in the claims, are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to better understand the method and the device for dynamically loading the edge program described in the invention, firstly, an internet of things system in an application scene of the method and the device is described, and specifically, a structural schematic diagram of the internet of things system can be shown in fig. 1. As shown in fig. 1, the internet of things system is provided with a cloud platform and an edge end which are in communication connection, wherein the edge end comprises a plurality of local area networks, and the local area networks comprise a plurality of terminal devices and edge servers which are in communication connection with the plurality of terminal devices.
Further, for an application scenario of the smart home, the terminal device may be a smart home device, and specifically may be one or more of a household appliance (such as an electric cooker, a television, a coffee machine, etc.), a lighting fixture, a security device (such as an intelligent door and window, a monitoring device, an intelligent alarm, etc.), etc.
Further, the cloud platform and the edge end can perform data interaction based on a wired network, specifically, can be realized by communication connection of the wired network based on a TCP/IP protocol, and it can be understood that the communication quality of the wired network is relatively stable and the data transmission speed is relatively high. Specifically, the cloud platform is in communication connection with an edge server of the edge end, so that data interaction between the cloud platform and the edge end is realized.
Further, in a local area network, the data interaction between the edge server and the terminal device may be implemented based on a communication connection of a wired network or may be implemented based on a communication connection of a wireless network. Optionally, the edge server and the terminal device may be implemented based on a communication connection of a wired network of a TCP/IP protocol, and the edge server and the terminal device may also be implemented based on a communication connection of a bluetooth communication protocol or a Zigbee communication protocol.
It should be noted that, the structural schematic diagram shown in fig. 1 is only for illustrating an internet of things system corresponding to the dynamic loading method based on the edge program, the related devices are only schematically shown, and specific structures, sizes, shapes, positions/installation modes and the like can be adaptively adjusted according to actual scenes, which is not limited by the structural schematic diagram shown in fig. 1.
The method and the device for dynamically loading the edge program are described in detail below.
Referring to fig. 2, fig. 2 is a flow chart of a dynamic loading method for an edge program according to an embodiment of the invention. The method for dynamically loading the edge program described in fig. 2 is applicable to the internet of things system described in fig. 1. As shown in fig. 2, the method for dynamically loading the edge program may include the following operations:
101. and the cloud platform acquires the information of the target program package which needs to be loaded or updated by the target edge.
In the embodiment of the invention, the target edge refers to an edge in the internet of things system, and it can be understood that the target edge is an object for which the cloud platform is aimed in the dynamic loading method of the edge program in the embodiment of the first aspect of the invention.
In the embodiment of the present invention, optionally, the cloud platform may be provided with a package management module for package management. Further optionally, a developer of the internet of things system may perform management operation on the package through a package management module of the cloud platform. Still further optionally, the package management module is mainly configured to implement a management operation on a functional package of an edge, where the management operation may include updating package content description, storing and downloading a package, maintaining a package version number, managing a package release status (e.g., online or offline), and a package upgrade policy (e.g., forced upgrade, recommended upgrade). Still further optionally, the cloud platform may further be provided with an edge management module for edge management, so as to perform management operation on the edge. Still further alternatively, the management operation may include an edge ID, an installation usage environment description, grouping management of the edge program according to specific service logic, and a function list loaded by the edge program.
102. And the cloud platform acquires target business demand information of the target edge.
In the embodiment of the present invention, optionally, the cloud platform may determine target service requirement information of the target edge by counting the target service data transmission amount of the target edge in a predetermined period of time, and further optionally, the target service requirement information may include a target service type and a corresponding data transmission amount.
103. And the cloud platform determines a target package list applicable to the target edge according to the target package information and the target service demand information.
In the embodiment of the present invention, optionally, the target package list may include a target package ID, a target package identifier, a target package version number, a target package name, a target package function description, or a current version update content, a target package application range (e.g., all edge ends or a designated edge end), a target package download path, target package summary data, and a target package status (e.g., normal, disabled, etc.).
104. The cloud platform executes a first management operation for each target package in the target package list.
In the embodiment of the present invention, the first management operation includes one of an authorization operation, a loading operation, an upgrade operation, and a recovery operation.
105. And the cloud platform executes a second management operation for each package except the target package list.
In the embodiment of the present invention, the second management operation includes one of a cancel authorization operation, an unload operation, a return operation, and a suspend operation.
Therefore, in the method for dynamically loading the edge program according to the first aspect of the embodiment of the present invention, the cloud platform determines the target package list applicable to the target edge according to the target package information and the target service requirement information, and executes the first management operation for each target package in the target package list, and executes the second management operation for each package outside the target package list, which is favorable for the collaboration of the cloud platform and the edge program, and realizes the functions of dynamically loading and loading the edge program as required, and can realize centralized management of the functions loaded on the edge at the cloud platform, thereby greatly reducing the version upgrading difficulty of the edge and reducing the labor cost required for updating the version of the edge.
In the embodiment of the present invention, optionally, after the cloud platform determines, according to the target program information and the target service requirement information, a target package list to which the target edge end is applicable, the method further includes the following operations:
and the cloud platform sends the target package list to the target edge end so that the target edge end executes loading or updating operation of the target package according to the target package list.
The method is beneficial to the target edge to execute the loading or updating operation of the target package according to the target package list, so that the management of the cloud platform to the target edge for the target package is facilitated.
Further optionally, the target edge may be provided with a function running module, where the module may be used to implement functions such as downloading, loading, suspending, unloading, and running status monitoring of the package. Further optionally, the module may implement operations such as suspending/resuming operation, unloading, and monitoring an operation state of the package by defining a set of basic interfaces for the package.
In some embodiments of the present invention, before the cloud platform determines the target package list applicable to the target edge according to the target program information and the target service requirement information, the method further includes the following operations:
the cloud platform acquires a program package information table, wherein the program package information table comprises program package information compatible with an edge server accessed into the Internet of things system, and the program package information comprises one or more of a program package ID, a program package identifier, a program package version number, a program package name, a program package function description, an update content description relative to a program package of a previous version, a program package application range, a program package download path, program package abstract data and a program package state.
Further, before the cloud platform determines the target package list applicable to the target edge according to the target program information and the target service requirement information, the method further comprises the following operations:
the cloud platform acquires an edge information table corresponding to the program package information table, wherein the edge information table comprises an edge ID, an edge installation and use position, an edge loaded function program package list and one or more combinations of a loading running state, an edge use environment and an edge use description.
Before the cloud platform determines a target package list applicable to the target edge, the cloud platform acquires a package information table, so that the cloud platform is beneficial to comprehensively and comprehensively managing package information compatible with an edge server in the Internet of things system.
Further, before the cloud platform determines the target package list applicable to the target edge according to the target program information and the target service requirement information, and after the cloud platform acquires the package information list, the method further comprises the following operations:
the cloud platform acquires an edge information table corresponding to the program package information table, wherein the edge information table comprises an edge ID, an edge installation and use position, an edge loaded function program package list and one or more combinations of a loading running state, an edge use environment and an edge use description.
Before the cloud platform determines the target package list applicable to the target edge, and after the cloud platform obtains the package information list, the cloud platform obtains the edge information list corresponding to the package information list before the cloud platform determines the target package list applicable to the target edge, so that the cloud platform is beneficial to further comprehensively and pointedly overall management of package information compatible with an edge server in the internet of things system.
Further, the cloud platform obtains the target package information that needs to be loaded or needs to be updated by the target edge, which may specifically include the following operations:
the cloud platform acquires the currently loaded program package information of the target edge;
and the cloud platform determines target package information which needs to be loaded or updated by the target edge according to the currently loaded package information and package information compatible with the edge server.
According to the cloud platform, the target package information which is required to be loaded or updated by the target edge is determined according to the currently loaded package information and the package information compatible with the edge server, so that the accuracy of the target package information which is required to be loaded or updated by the target edge is improved, and the high efficiency of the target edge in loading or updating the target package is improved.
In other embodiments of the invention, the method further comprises the operations of:
the cloud platform acquires a loaded program package list and a corresponding program package running state which are periodically reported by a target edge.
The cloud platform is beneficial to dynamically managing the program package of the target edge by acquiring the loaded program package list and the corresponding program package running state which are periodically reported by the target edge.
Alternatively, the package running state may include: unauthorized, authorized (to be loaded), loading, normal running, abnormal running, to be paused, stopped, to be unloaded, unloading, and unloaded. Further, the package state transition and flow may be as follows:
1) A user (developer or manager) manages the program package of the edge through a cloud platform management interface, and changes the state of the program package in the edge information table into 'waiting xx';
2) The edge end periodically detects the state of a local program package and reports the state to the cloud platform;
3) The cloud platform calculates whether the target edge end needs to update the program package according to the reported information, if so, the state of the program package in the edge end information table is modified into xx, and an operation instruction is issued to the edge end;
4) And the target edge end performs corresponding operation of the program package according to an operation instruction issued by the cloud platform, and after the update operation is completed, the edge end monitors that the state of the program package is 'xx', reports the program package to the cloud platform and updates the program package to a cloud platform database in the next reporting period.
Further optionally, the user (developer or manager) manages the package of the edge through the cloud platform management interface, including the following:
a) Unloading a certain program package of the edge, and setting a corresponding program package record in an edge information table as to-be-unloaded;
b) Performing new package authorization operation on a certain edge, adding a new package record to the edge in an edge information table, and setting the state of the new package record as authorized;
c) Performing unauthorized operation on a certain program package at the edge, setting a corresponding program package record in an edge information table as unauthorized, paying attention to that a user can only speak the authorized program package to perform unauthorized operation, and only performing unloading operation on the program package in other states;
d) Version upgrading or rollback operation is carried out on a certain program package at the edge end, the program package is authorized to be higher or lower in version, the corresponding program package version number is modified, and the state of the program package is set to be authorized; when the user performs program package version authorization or upgrading, only authorizing the program package with normal state in the program package information table;
e) Performing pause operation on a certain program package at the edge end, and setting the state of the corresponding program package to be stopped;
f) And carrying out recovery operation on a certain program package at the edge end, and setting the state of the corresponding program package to be recovered.
Still further optionally, the periodically reporting, by the edge, the locally loaded package list and the running state may include the following operations:
the edge end periodically detects the running state of the local program package and submits the running state to the cloud platform for the cloud platform to perform relevant management operation;
the program package operation states detected by the edge end comprise loading, normal operation, abnormal operation, stopping operation, unloading and unloading.
The package state information submitted by the edge terminal comprises:
(1) edge end ID;
(2) a package state list including information of each package including a package ID, a package identifier, a package version number, a package running state, etc.;
(3) package state information commit time stamp.
And after receiving the package state information, the cloud platform updates the package state information into an edge information table, and meanwhile, calls the cloud platform to calculate the package list range which needs to be updated by the edge.
Still further optionally, the cloud platform computing edge may need to load or update the package scope, which includes the following operations:
the cloud platform receives a program package state list reported by an edge, and the specific flow for calculating the program package range of the edge is as follows:
1) Inquiring a program list EdgePluginInfoList of the edge from an edge information list according to the edge ID;
2) Traversing the edge PluginStatusList to obtain the state information of the program package edge PluginStatus one by one, searching the corresponding edge PluginInfo from the edge PluginInfoList according to the program package ID, comparing the edge PlugStatus with the edge PlugInfo, calculating whether the edge end needs to update the program package, if the edge end needs to update, packing the fields such as the program package ID, the program package identifier, the program package version number, the program package download path, the operation type and the like into an edge PluginUpdateInfo object, otherwise, neglecting the edge PlugStatus;
3) Comparing the EdgePluginInfoList with the EdgePluginStatusList according to the program package ID, finding that the EdgePluginInfoList exists but the EdgePlugStatusList does not exist, and the state is an authorized program package, and packaging the program package into an EdgePluginUpdateInfo object with the operation type being loading;
4) And (3) packing the EdgePluginUpdateInfo objects generated in the steps 2 and 3 into a program package list EdgePluginUpdateInfo list which needs to be updated by the edge terminal, and issuing the program package list EdgePluginUpdateInfo list to the edge terminal.
The comparison operation flow of the edgeplug status and edgeplug info in the step 2 may be as follows:
1) If the state in the EdgePluginInfo is authorized, packing the EdgePluginUpdateInfo object with the operation type of loading, and modifying the state of the EdgePluginInfo into the loading;
2) If the state of the EdgePluginInfo is to be stopped, packing an EdgePluginUpdateInfo object with the operation type of stopping, and modifying the state of the EdgePluginInfo into stopping;
3) If the state of the EdgePluginInfo is to be unloaded, packing an EdgePluginUpdateInfo object with the operation type of unloading, and modifying the state of the EdgePluginInfo into the state of unloading;
4) If the state of the EdgePluginInfo is not the three states, and the state of the EdgePluginInfo is inconsistent with the state reported by the EdgePluginStatus, the state value of the EdgePluginInfo is directly updated to be the state value of the EdgePlugStatus.
Still further alternatively, the edge processing package list information edgeplugingelnfo list automatically updates or loads a new package, and the specific flow is as follows:
1) Traversing the list edgePluginUpdateInfoList to obtain an edgePluginUpdateInfo object
2) Judging whether a corresponding program package exists locally or not:
a. if the URL does not exist, and the operation type is loading, a package operation framework is called to download and load the package according to the URL; otherwise, the piece of information is ignored.
b. If so, judging whether the version number of the local program package is consistent with the version number of the EdgePluginUpdateInfo or not:
if the local version number is inconsistent with the EdgePluginUpdateInfo and the operation type is loading, the original program package is downloaded by calling a program package operation framework, and the new version of the program package is downloaded and loaded according to the URL of the EdgePluginUpdateInfo, otherwise, the new version of the program package is ignored;
if the local version number is consistent with the acquired version number and the operation type is resume use, stop use or uninstall, invoking the package running framework to resume use, stop use or uninstall the changed package; otherwise, neglecting the information of the program package;
3) After processing the edge PluginInfoList one by one, the edge terminal immediately or waits for the next reporting period to report the locally loaded program package list and the running state to the cloud platform once.
Still further optionally, in order to ensure consistency of package transmission between the cloud platform and the edge, the package is checked between the cloud platform and the edge through a summary algorithm:
a. the cloud platform extracts the abstract of the program package through an abstract algorithm;
b. when the edge end actively acquires or the cloud platform pushes the package information, the abstract information is issued to the edge end
c. After the program package is downloaded by the edge end, the program package is extracted with an abstract algorithm, and compared with the abstract algorithm issued by the cloud platform, if the abstract algorithm is consistent with the abstract algorithm, the downloaded program package is considered to be legal, and subsequent actions such as updating the program package and the like are continued; otherwise, performing exception handling, such as retry package downloading, etc.; optionally, the digest algorithm includes, but is not limited to, the SHA1 algorithm.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating an edge-side program dynamic loading device according to a second embodiment of the present invention. The dynamic loading device of the edge program described in fig. 3 is suitable for the internet of things system described in fig. 1. As shown in fig. 3, the dynamic loading device for the edge program includes an acquisition module 301, a determination module 302 and a management module 303,
the obtaining module 301 is configured to obtain target package information that needs to be loaded or needs to be updated by a target edge,
the obtaining module 301 is further configured to obtain target service requirement information of a target edge,
the determining module 302 is configured to determine, according to the target package information and the target service requirement information, a target package list applicable to the target edge,
the management module 303 is configured to perform a first management operation for each target package in the target package list, where the first management operation includes one of an authorization operation, a loading operation, an upgrade operation, and a recovery operation,
the management module 303 is further configured to perform a second management operation for each package other than the target package list, where the second management operation includes one of a cancel authorization operation, an unload operation, a return operation, and a suspend operation.
In the second aspect of the embodiment of the present invention, the cloud platform determines the target package list applicable to the target edge according to the target package information and the target service requirement information, and executes the first management operation for each target package in the target package list, and executes the second management operation for each package outside the target package list, which is favorable for the cloud platform to cooperate with the edge program to realize the dynamic loading and on-demand loading functions of the edge program, and can realize centralized management of the functions loaded on the edge at the cloud platform, thereby greatly reducing the version upgrading difficulty of the edge, and reducing the labor cost required for updating the edge version.
Referring to fig. 4, fig. 4 is a schematic diagram of an edge program dynamic loading device according to a second embodiment of the invention. The dynamic loading device of the edge program described in fig. 4 is suitable for the system of the internet of things described in fig. 1. As shown in fig. 4, the dynamic loading device for the edge program includes:
a memory 401 storing executable program codes;
a processor 402 coupled with the memory 401;
further, an input interface 403 and an output interface 404 coupled to the processor 402 may also be included;
the processor 402 invokes executable program codes stored in the memory 401, for executing the steps of the method for dynamically loading an edge program described in the embodiment of the first aspect of the present invention.
An embodiment of the third aspect of the present invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, where the computer program causes a computer to execute the steps of the method for dynamically loading an edge-side program described in the embodiment of the first aspect of the present invention.
In a fourth aspect, embodiments of the present invention disclose a computer program product comprising a non-transitory computer readable storage medium storing a computer program, the computer program being operable to cause a computer to perform the steps of the method for dynamically loading an edge-side program described in the embodiments of the first aspect of the present invention.
The apparatus embodiments described above are merely illustrative, in which the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above detailed description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product that may be stored in a computer-readable storage medium including Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable programmable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disc Memory, magnetic disc Memory, tape Memory, or any other medium that can be used for computer-readable carrying or storing data.
Finally, it should be noted that: the embodiment of the invention discloses a method and a device for dynamically loading an edge program, which are disclosed as preferred embodiments of the invention, and are only used for illustrating the technical scheme of the invention, but not limiting the technical scheme; although the invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that; the technical scheme described in the foregoing embodiments can be modified or some of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (7)

1. The utility model provides an edge end program dynamic loading method, is applied to the internet of things system, wherein, the internet of things system is provided with communication connection's cloud platform and edge end, the edge end includes a plurality of LAN, include a plurality of terminal equipment and with a plurality of terminal equipment communication connection's edge server in the LAN, characterized in that, the method includes:
the cloud platform acquires target package information which needs to be loaded or updated at a target edge;
the cloud platform acquires target business demand information of a target edge end;
the cloud platform determines a target package list applicable to the target edge according to the target package information and the target business demand information;
the cloud platform executes a first management operation for each target package in the target package list, wherein the first management operation comprises one of an authorization operation, a loading operation, an upgrading operation and a recovery operation;
the cloud platform executes a second management operation for each package except the target package list, wherein the second management operation comprises one of a cancel authorization operation, an uninstall operation, a return operation and a pause operation;
before the cloud platform determines the target package list applicable to the target edge according to the target package information and the target business requirement information, the method further comprises:
the cloud platform acquires a package information table, wherein the package information table comprises package information compatible with an edge server accessed to the internet of things system, and the package information comprises one or more of package ID, package identifier, package version number, package name, package function description, update content description relative to a previous version package, package application range, package download path, package abstract data and package state;
before the cloud platform determines the target package list applicable to the target edge according to the target package information and the target business requirement information, and after the cloud platform acquires the package information list, the method further comprises:
the cloud platform acquires an edge information table corresponding to the program package information table, wherein the edge information table comprises an edge ID, an edge installation and use position, an edge loaded function program package list and one or more combinations of a loading running state, an edge use environment and an edge use description.
2. The method for dynamically loading an edge program according to claim 1, wherein after the cloud platform determines a target package list applicable to the target edge according to the target package information and the target service requirement information, the method further comprises:
and the cloud platform sends a target package list to the target edge end so that the target edge end executes loading or updating operation of the target package according to the target package list.
3. The method for dynamically loading an edge program according to claim 1, wherein the cloud platform obtains target package information that needs to be loaded or updated by a target edge, and specifically includes:
the cloud platform acquires the currently loaded program package information of the target edge;
and the cloud platform determines the target package information which needs to be loaded or updated by the target edge according to the currently loaded package information and the package information compatible with the edge server.
4. The method for dynamically loading an edge program according to claim 1, further comprising:
and the cloud platform acquires a loaded program package list and a corresponding program package running state which are periodically reported by the target edge.
5. The edge program dynamic loading device is applied to an Internet of things system, wherein the Internet of things system is provided with a cloud platform and an edge which are in communication connection, the edge comprises a plurality of local area networks, the local area networks comprise a plurality of terminal devices and edge servers which are in communication connection with the terminal devices, the edge program dynamic loading device is arranged in the cloud platform, and is characterized in that the edge program dynamic loading device comprises an acquisition module, a determination module and a management module,
the acquisition module is used for acquiring the information of the target program package which needs to be loaded or updated by the target edge,
the acquisition module is further configured to acquire target service requirement information of a target edge,
the determining module is configured to determine a target package list applicable to the target edge according to the target package information and the target service requirement information,
the management module is used for executing a first management operation aiming at each target program package in the target program package list, wherein the first management operation comprises one of an authorization operation, a loading operation, an upgrading operation and a recovery operation,
the management module is further configured to perform a second management operation for each package other than the target package list, where the second management operation includes one of a cancel authorization operation, an unload operation, a return operation, and a suspend operation;
the system also comprises a functional module, wherein the functional module is used for executing the following functions:
before the cloud platform determines a target package list applicable to the target edge according to the target package information and the target service requirement information, the cloud platform acquires a package information table, wherein the package information table comprises package information compatible with an edge server accessed to the internet of things system, and the package information comprises one or more of package ID, package identifier, package version number, package name, package function description, update content description relative to a previous version package, package application range, package download path, package abstract data and package state;
before the cloud platform determines a target package list applicable to the target edge according to the target package information and the target service requirement information, and after the cloud platform acquires a package information table, the cloud platform acquires an edge information table corresponding to the package information table, wherein the edge information table comprises an edge ID, an edge installation and use position, an edge loaded function package list and one or more combinations of a loading operation state, an edge use environment and an edge use description.
6. The utility model provides an edge program dynamic loading device, is applied to the internet of things system, wherein, the internet of things system is provided with communication connection's cloud platform and edge, the edge includes a plurality of LAN, include a plurality of terminal equipment and with a plurality of in the LAN the edge server of terminal equipment communication connection, edge program dynamic loading device sets up in the cloud platform, its characterized in that, edge program dynamic loading device includes:
a memory storing executable program code;
a processor coupled to the memory;
the processor invokes the executable program code stored in the memory to perform the steps of the edge side program dynamic loading method of any of claims 1-4.
7. A computer readable storage medium storing computer instructions for performing the steps of the edge-side program dynamic loading method according to any one of claims 1-4 when said computer instructions are invoked.
CN202110928819.4A 2021-08-13 2021-08-13 Method and device for dynamically loading edge program Active CN113805957B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110928819.4A CN113805957B (en) 2021-08-13 2021-08-13 Method and device for dynamically loading edge program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110928819.4A CN113805957B (en) 2021-08-13 2021-08-13 Method and device for dynamically loading edge program

Publications (2)

Publication Number Publication Date
CN113805957A CN113805957A (en) 2021-12-17
CN113805957B true CN113805957B (en) 2024-02-13

Family

ID=78893617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110928819.4A Active CN113805957B (en) 2021-08-13 2021-08-13 Method and device for dynamically loading edge program

Country Status (1)

Country Link
CN (1) CN113805957B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630558A (en) * 2015-12-28 2016-06-01 联想(北京)有限公司 Upgrading method and electronic equipment
CN106502725A (en) * 2016-09-30 2017-03-15 歌尔科技有限公司 The upgrade method of application program, equipment and electronic equipment
CN107391210A (en) * 2017-08-15 2017-11-24 北京奇虎科技有限公司 The operating method and device of application program, terminal device
CN110007935A (en) * 2019-03-29 2019-07-12 阿里巴巴集团控股有限公司 A kind of processing method, device and the equipment of program upgrading
CN110750291A (en) * 2019-10-30 2020-02-04 苏州科达科技股份有限公司 Edge device algorithm updating method, system, device and storage medium
CN111427664A (en) * 2020-03-25 2020-07-17 杭州电子科技大学 Container-based protocol analysis method, device, system and storage medium
CN112019610A (en) * 2020-08-21 2020-12-01 广东德圳智能技术有限公司 Cloud edge coordination method and system
CN112269565A (en) * 2020-10-30 2021-01-26 杭州电子科技大学 Container-based edge device operation method, device and system
EP3809673A1 (en) * 2019-10-20 2021-04-21 NVIDIA Corporation Live updating of machine learning models
CN112698884A (en) * 2020-12-30 2021-04-23 北京达佳互联信息技术有限公司 Program starting method, device, system, equipment and storage medium
CN113015942A (en) * 2018-12-28 2021-06-22 西门子股份公司 Data analysis method, device and system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630558A (en) * 2015-12-28 2016-06-01 联想(北京)有限公司 Upgrading method and electronic equipment
CN106502725A (en) * 2016-09-30 2017-03-15 歌尔科技有限公司 The upgrade method of application program, equipment and electronic equipment
CN107391210A (en) * 2017-08-15 2017-11-24 北京奇虎科技有限公司 The operating method and device of application program, terminal device
CN113015942A (en) * 2018-12-28 2021-06-22 西门子股份公司 Data analysis method, device and system
CN110007935A (en) * 2019-03-29 2019-07-12 阿里巴巴集团控股有限公司 A kind of processing method, device and the equipment of program upgrading
EP3809673A1 (en) * 2019-10-20 2021-04-21 NVIDIA Corporation Live updating of machine learning models
CN110750291A (en) * 2019-10-30 2020-02-04 苏州科达科技股份有限公司 Edge device algorithm updating method, system, device and storage medium
CN111427664A (en) * 2020-03-25 2020-07-17 杭州电子科技大学 Container-based protocol analysis method, device, system and storage medium
CN112019610A (en) * 2020-08-21 2020-12-01 广东德圳智能技术有限公司 Cloud edge coordination method and system
CN112269565A (en) * 2020-10-30 2021-01-26 杭州电子科技大学 Container-based edge device operation method, device and system
CN112698884A (en) * 2020-12-30 2021-04-23 北京达佳互联信息技术有限公司 Program starting method, device, system, equipment and storage medium

Also Published As

Publication number Publication date
CN113805957A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
CN108365993B (en) Block link point dynamic changing method, system and computer readable storage medium
CN109144559B (en) Update data packet pushing method and server
CN104219316A (en) Method and device for processing call request in distributed system
CN102710593B (en) Method, device and system for publishing message in graph mashup
CN103312549A (en) Transaction management method, device and system
CN109391673A (en) A kind of method, system and the terminal device of management update file
KR20160013884A (en) Updating software components through online stores
CN106210099A (en) Data handling system and method
CN112988485A (en) Simulation test method and device for power Internet of things equipment
CN110197064B (en) Process processing method and device, storage medium and electronic device
CN114124917B (en) Remote upgrading method, equipment, system and medium for ground locking piece
US20170230713A1 (en) Set Top Box Upgrade Method and Apparatus
CN114116014A (en) Instruction issuing method and device, intelligent equipment and storage medium
CN112650520A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN111857772A (en) Method and equipment for remote transmission and dynamic loading of terminal edge application program
CN103186536A (en) Method and system for scheduling data shearing devices
CN113805957B (en) Method and device for dynamically loading edge program
CN108170488B (en) Method and device for upgrading plug-in
CN112667272A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN110347659A (en) Data processing method and device, transaction data processing method and device
CN111090442A (en) Application updating method and device and storage medium
CN110287007A (en) Data call response method, server and computer readable storage medium
CN112948098B (en) Service unit offline method based on micro-service unit architecture and related device
CN113721938A (en) Edge-edge cooperative task processing method, device and system suitable for power Internet of things

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant