CN113342376B - Method and device for upgrading operating system of Internet of things equipment - Google Patents

Method and device for upgrading operating system of Internet of things equipment Download PDF

Info

Publication number
CN113342376B
CN113342376B CN202110699570.4A CN202110699570A CN113342376B CN 113342376 B CN113342376 B CN 113342376B CN 202110699570 A CN202110699570 A CN 202110699570A CN 113342376 B CN113342376 B CN 113342376B
Authority
CN
China
Prior art keywords
target internet
things equipment
internet
upgrading
things
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
CN202110699570.4A
Other languages
Chinese (zh)
Other versions
CN113342376A (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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202110699570.4A priority Critical patent/CN113342376B/en
Publication of CN113342376A publication Critical patent/CN113342376A/en
Application granted granted Critical
Publication of CN113342376B publication Critical patent/CN113342376B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The embodiment of the specification discloses a method and a device for upgrading an operating system of Internet of things equipment. The method can ensure that the Internet of things equipment executes different upgrading modes under different conditions, adopts a mode of combining the hot patch and the complete upgrading package, and considers the timeliness and stability of firmware upgrading.

Description

Method and device for upgrading operating system of Internet of things equipment
Technical Field
The application relates to the technical field of the Internet of things, in particular to a method and a device for upgrading an operating system of equipment of the Internet of things.
Background
At present, most of internet of things equipment adopts a Real-time operating system (RTOS). RTOS, although simpler in function and architecture than non-real-time operating systems such as Windows/Linux, ensures on-time execution of each thread through priority scheduling.
RTOS equipment, especially RTOS equipment in the medical field such as various infusion pumps, sensors with requirements on data continuity and the like, needs high real-time performance and long-time work to meet various functional requirements. At present, how to adjust service functions and repair vulnerabilities through upgrading of an operating system for the internet of things equipment is a technical problem which needs to be solved urgently.
Disclosure of Invention
The embodiment of the specification provides a method and a device for upgrading an operating system of equipment in the internet of things, so that business functions are adjusted and bug fixing is performed by upgrading the operating system of the equipment in the internet of things.
To achieve the above purpose, the embodiments of the present specification are implemented as follows:
an embodiment of the present specification provides a method for upgrading an operating system of an internet of things device, including:
acquiring working state information of target Internet of things equipment in the Internet of things equipment cluster;
judging whether the target Internet of things equipment is in a working state or not according to the working state information to obtain a first judgment result;
when the first judgment result shows that the target Internet of things equipment is in a working state, upgrading an operating system of the target Internet of things equipment by adopting a hot patch;
and when the first judgment result shows that the target Internet of things equipment is not in a working state, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading package.
The device for upgrading an operating system of an internet of things device provided by the embodiment of the present specification includes:
the acquisition module is used for acquiring the working state information of the target Internet of things equipment in the Internet of things equipment cluster;
the judging module is used for judging whether the target Internet of things equipment is in a working state or not according to the working state information to obtain a first judging result;
the first execution module is used for upgrading an operating system of the target internet of things equipment by adopting a hot patch when the first judgment result shows that the target internet of things equipment is in a working state;
and the second execution module is used for upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading package when the first judgment result shows that the target Internet of things equipment is not in a working state.
An electronic device provided in an embodiment of the present specification includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring working state information of target Internet of things equipment in the Internet of things equipment cluster;
judging whether the target Internet of things equipment is in a working state or not according to the working state information to obtain a first judgment result;
when the first judgment result shows that the target Internet of things equipment is in a working state, upgrading an operating system of the target Internet of things equipment by adopting a hot patch;
and when the first judgment result shows that the target Internet of things equipment is not in a working state, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading package.
Embodiments of the present specification provide a computer readable medium, on which computer readable instructions are stored, the computer readable instructions being executable by a processor to implement a method for upgrading an operating system of an internet of things device.
One embodiment of the present description achieves the following advantageous effects: the method comprises the steps of obtaining working state information of target Internet of things equipment in an Internet of things equipment cluster, judging whether the target Internet of things equipment is in a working state to obtain a first judgment result, adopting a hot patch to upgrade an operating system of the target Internet of things equipment when the first judgment result shows that the target Internet of things equipment is in the working state, and adopting a complete upgrade patch to upgrade the operating system of the target Internet of things equipment when the first judgment result shows that the target Internet of things equipment is not in the working state. The method can ensure that the Internet of things equipment executes different upgrading modes under different conditions, adopts a mode of combining the hot patch and the complete upgrading package, and considers the timeliness and stability of firmware upgrading.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a system architecture diagram of a method for upgrading an operating system of an internet of things device in an embodiment of the present specification;
fig. 2 is a schematic flowchart of a method for upgrading an operating system of an internet of things device in an embodiment of the present specification;
fig. 3 is a system architecture diagram for upgrading an operating system of each internet of things device in the embodiment of the present application;
fig. 4 is a schematic structural diagram of an apparatus for upgrading an operating system of an internet of things device according to an embodiment of the present specification;
fig. 5 is a schematic structural diagram of an electrical device provided in an embodiment of the present specification.
Detailed Description
To make the objects, technical solutions and advantages of one or more embodiments of the present disclosure more apparent, the technical solutions of one or more embodiments of the present disclosure will be clearly and completely described below with reference to specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present specification, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of one or more embodiments of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
In the prior art, the internet of things device, especially the internet of things device of a Real-time operating system (RTOS), generally needs to upgrade its operating system including firmware to adjust service functions, perform bug fixing, and the like, and when the firmware is upgraded, for various infusion pumps, cardiac pacemakers, and sensors having requirements for data continuity in the medical field, if a bug that needs to be repaired urgently exists in the device is found, if the firmware is upgraded forcibly, the device in operation may be restarted forcibly, which may bring irretrievable loss, and stability and timeliness cannot be considered at the same time.
Fig. 1 is a schematic diagram of a system architecture for upgrading an operating system of an internet of things device in an embodiment of the present specification. The system architecture may include a server 10, and an internet of things device cluster 20 in data connection with the server. The server may be an OTA (Over-the-air technology) server or a cloud platform. The internet of things cluster comprises a plurality of internet of things devices 21. Wherein, thing networking device is RTOS equipment, for example the transfer pump in the medical field, heartbeat sensor, or the controller of the blast furnace in the steel plant etc..
Fig. 2 is a schematic flowchart of a method for upgrading an operating system of an internet of things device in an embodiment of the present description.
As shown in fig. 2, the method for upgrading an operating system of an internet of things device provided by the present invention may include the following steps:
step S100: acquiring working state information of target Internet of things equipment in the Internet of things equipment cluster;
in the embodiment of the present invention, from the perspective of a program, an execution main body of the process may be a program loaded on an application server, where a server side may be an OTA server, a cloud service platform, and the like, and may obtain the working state information of each internet of things device in an internet of things device cluster.
The method for acquiring the working state information of the target Internet of things equipment can be divided into an active mode and a passive mode.
In the embodiment of the present invention, the obtaining of the working state information of the target internet of things device in the internet of things device cluster specifically includes:
sending a working state inquiry message to the target Internet of things equipment;
and acquiring the working state information fed back by the target Internet of things equipment.
In the embodiment of the invention, the active mode is used for acquiring the working state information of each piece of internet of things equipment in the internet of things equipment cluster, specifically, the acquired working state information is sent to the target internet of things equipment, and the state information representing the working state identification bit in the target internet of things equipment is determined, and the state information can be used as the working state information of the target internet of things equipment. The state information may characterize whether the internet of things device is in a working state or not. For example, the target internet of things device is an infusion pump, and the information in the status register of the target internet of things device can represent the working state of the target internet of things device, and whether the target internet of things device is in the working state can be determined through the value in the status register. Or sending an inquiry message to the target Internet of things equipment, and returning the working state information by the target Internet of things equipment. The internet of things equipment can be provided with a specific zone bit, and whether the equipment is in a working state or not is judged according to the zone bit. The mode of actively acquiring the working state information is adopted, and because the number of nodes in the Internet of things equipment cluster is large, when a plurality of target Internet of things equipment exist, the load pressure of the OTA server can be increased, but the upgrading process can be actively initiated, and the timeliness is good.
In the embodiment of the present invention, the obtaining of the working state information of the target internet of things device in the internet of things device cluster may specifically include:
and acquiring the working state information actively reported by the target Internet of things equipment.
In the embodiment of the invention, the working state information actively reported by the target Internet of things equipment is passively acquired, and the working state information actively reported by the target Internet of things equipment is obtained. In the embodiment of the invention, the target Internet of things equipment can have the capability of actively reporting the working state information.
The active reporting may be performed according to a preset time interval, a preset rule, and the like, for example, establishing a communication connection with the OTA server every predetermined time, and sending working state information representing a working state to the OTA server; or when the internet of things equipment starts to work, the working state information representing that the equipment is in the working state is reported, and when the work is finished, the working state information representing that the equipment is not in the working state is reported, and the like. This way server resources can be saved.
Of course, the two manners may be combined, for example, when the working state query information is sent, the process of the target internet of things device actively reporting the function is triggered, and when the upgrade is finished, the process of the active reporting function is terminated. The active reporting function process of the target internet of things device may actively report the working state information according to a preset rule during operation.
In the embodiment of the invention, if the internet of things equipment does not have the active reporting function, the installation package for installing the active reporting function can be sent after upgrading is completed, and the installation packages of different types and different languages are correspondingly arranged for different internet of things equipment, so that the internet of things equipment can analyze the installation package, and codes for realizing the active reporting function are written into the storage space of the internet of things equipment, so that the internet of things equipment can execute the process of the active reporting function.
S200, judging whether the target Internet of things equipment is in a working state or not according to the working state information to obtain a first judgment result;
in the embodiment of the invention, whether the target Internet of things equipment is in the working state or not is judged according to the obtained working state information, and a first judgment result is obtained. For example, if the working state information includes a value 1 representing that the target internet of things device is in a working state in the state register, the first determination result is that the target internet of things device is in the working state, and if the working state information includes a value 0 representing that the target internet of things device is not in the working state in the state register, the first determination result is that the target internet of things device is in the non-working state.
Of course, the first determination result may also be obtained by analyzing the obtained operating state information. For example, if the working state information is a message, the message is analyzed to obtain content representing the working state, and a first judgment result is obtained according to the content.
Step S300: when the first judgment result shows that the target Internet of things equipment is in a working state, upgrading an operating system of the target Internet of things equipment by adopting a hot patch;
in the embodiment of the invention, if the target Internet of things equipment is in the working state, the hot patch is adopted to upgrade the operating system of the target Internet of things equipment.
The operating system of the target internet of things device may be upgraded by using a HERA (hotscheduling embedded Real-time Applications) technology.
In the embodiment of the invention, the hot patch modifies the operating system under the condition that the equipment of the Internet of things is not restarted, so that the upgrading can be completed when the equipment of the Internet of things works normally without interrupting tasks executed by the equipment of the Internet of things, and the hot patch can be applied to the emergency upgrading scene. The method is a bug repairing method for the embedded system with real-time constraint without restarting the Internet of things equipment. Security updates may be performed on the real-time embedded system during operation without disrupting or violating real-time constraints.
In the embodiment of the invention, a built-in hardware debugging unit is called and processed, the writing position corresponding to the hot patch is determined, and when a code is redirected or an atomic instruction at a hardware level is received, the code corresponding to the hot patch is written into the position.
In the embodiment of the invention, the hot patch can be developed by adopting a high-level programming language or an assembly language, wherein when the high-level programming language is adopted, the binary file can be compiled by using a binary diffusion algorithm to realize the upgrading of the hot patch, and when the assembly language is adopted, the hot patch can be developed for the closed source equipment so as to upgrade the operating system of the equipment of the internet of things.
In the embodiment of the present invention, the target internet of things device may have an FPB (flashpatch and breakpoint) flash patch and a breakpoint unit therein, where each FPB allows setting a breakpoint to instruct the processor to stop or modify the code. Alternatively, one FPB may include 6 units for hardware breakpoints, with low overhead for the FPB unit, which only needs to store a list of patches and several memory addresses.
In embodiments of the present invention, upgrading with a hot patch may include directly rewriting the firmware executable file with trampoline (rampoline) redirection execution. For example, a jump or branch instruction is inserted at a target point, the original control flow of the application is redirected, execution of the instruction is stopped at a previously selected memory location, another instruction is written from memory, the control flow is manipulated by a branch swap instruction, and a trampoline is inserted at run-time. The information required for this process includes: insertion points, trampolines, and hardware breakpoints. Where the insertion point is the specific location where the branch or jump instruction is inserted and the breakpoint is used to instruct the processor to perform the trampoline insertion at that location. A trampoline is a branch instruction that can redirect control flow from an insertion point to a patch. Another way may be to update another instance with the running instance.
It can be seen that, in the embodiment of the present invention, the operating system of the target internet of things device can be upgraded by using the hot patch without restarting.
And S400, when the first judgment result shows that the target Internet of things equipment is not in a working state, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading package.
In the embodiment of the invention, if the target Internet of things equipment is not in a working state, the target Internet of things equipment can be upgraded by adopting the complete upgrade package.
In the embodiment of the present invention, the upgrading the operating system of the target internet of things device by using the complete upgrade package specifically may include:
after the complete upgrade package is written into the ROM of the target Internet of things equipment, restarting the target Internet of things equipment;
and in the process of restarting the target Internet of things equipment, clearing the hot patch loaded by the target Internet of things equipment.
The complete upgrade package is an update upgrade package of a complete version, and generally, the target internet of things device needs to be restarted to complete upgrading. Therefore, in the embodiment of the invention, when the target Internet of things equipment is determined not to be in the working state, the upgrading can be carried out in the mode.
In the embodiment of the invention, the OTA can be adopted to realize the upgrade of the ROM complete upgrade package.
In the embodiment of the application, in the process of restarting the target internet of things device, the hot patch which is loaded in the target internet of things is removed. Thus, compatibility problems caused by multiple upgrades of the same function by the hot patch and the complete upgrade package can be avoided.
When the target Internet of things equipment is in a non-working state, an upgrading instruction is sent to the target Internet of things equipment, the target Internet of things equipment downloads the corresponding upgrading package after receiving the upgrading instruction, the restarting operation is executed after the downloading is completed, and the initialization of the new version firmware is executed when the target Internet of things equipment is restarted to complete the upgrading. The process is stable.
In the embodiment of the invention, the upgrading of the operating system of the target Internet of things equipment is realized by combining the hot patch with the complete upgrade package, and the emergency repair capability is ensured.
In the foregoing embodiment, an upgrade method of a hot patch is introduced, and in this process, if an operating system has multiple hot patches, stability may be affected.
Before the upgrade of the operating system of the target internet of things device by using the hot patch, the method may further include:
determining the number of hot patches installed in an operating system of the target Internet of things equipment;
judging whether the number of the hot patches is larger than or equal to a preset value or not to obtain a second judgment result;
if the second judgment result shows that the number of the hot patches is larger than or equal to a preset value, terminating the upgrading process of the operating system of the target Internet of things equipment;
the upgrading the operating system of the target internet of things device by using the hot patch may specifically include:
and if the second judgment result shows that the number of the hot patches is smaller than the preset value, upgrading the operating system of the target Internet of things equipment by adopting the hot patches.
In the embodiment of the invention, before the operating system of the target Internet of things equipment is upgraded, the number of hot patches installed in the operating system of the target Internet of things equipment is determined. Since the number of FPB units is limited, for example, each FPB unit can correspond to N hot patches, and the number of hot patches that each FPB unit can handle is limited. And if the patch number of the hot patch quantity of the FPB unit is greater than or equal to a preset value, obtaining a second judgment result. The second judgment result represents that the number of the patches capable of running of the target Internet of things device exceeds the normal running range of the target Internet of things device.
And when the second judgment result represents that the number of the hot patches is greater than or equal to the preset value, terminating the upgrading process, namely, terminating the upgrading operation on the target Internet of things so as to ensure the running stability of the target Internet of things equipment.
And when the second judgment result represents that the number of the hot patches is smaller than a preset value, upgrading the operating system of the target Internet of things equipment by adopting the hot patches. The process can be referred to the foregoing embodiment, and is not described in detail herein.
In this embodiment of the present invention, after terminating the process of upgrading the operating system of the target internet of things device, the method may further include:
sending a working state inquiry message to the target Internet of things equipment according to a preset period;
and when information which is fed back by the target Internet of things equipment and represents that the target Internet of things equipment is not in a working state is received, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading packet.
In the embodiment of the invention, if the upgrading process of the operating system of the target internet of things is terminated, the working state inquiry message can be sent to the target internet of things equipment according to the preset period. And the target Internet of things equipment feeds back information representing the state of the target Internet of things equipment according to the working state inquiry message.
When the target internet of things is in a non-working state, the information indicating that the target internet of things equipment is not in the working state is fed back to the server after the working state inquiry message is received, and then the server can execute the process of upgrading the operating system of the target internet of things equipment by adopting a complete upgrade package.
In the embodiment of the invention, the predetermined period can be set according to actual needs, or specific values of the predetermined period can be obtained after pre-calibration is carried out according to different types of equipment.
Of course, in the embodiment of the present invention, after terminating the upgrade process on the operating system of the target internet of things device, the method may further include:
and after the information which is actively reported by the target Internet of things equipment and represents that the target Internet of things equipment is not in the working state is obtained, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading packet.
In the embodiment of the invention, if the target internet of things equipment has the active reporting capability, the target internet of things equipment can actively report the information for identifying that the target internet of things equipment is not in the working state when the target internet of things equipment is in the non-working state.
Certainly, the triggering condition actively reported may be when a corresponding instruction for determining the number of installed hot patches of the operating system of the target internet of things device is received, or when a working state query message is received, or when a corresponding instruction for terminating the upgrade process of the operating system of the target internet of things device is received. And after the actively reported information is received, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrade package.
In the embodiment of the present invention, the method may further include:
and when the first judgment result shows that the target Internet of things equipment is in a working state, sending a complete upgrading packet to the target Internet of things equipment so as to facilitate upgrading after the target Internet of things equipment is in a non-working state.
In the embodiment of the invention, if the target internet of things equipment is in a working state, the complete upgrade package can be sent to the target internet of things equipment, and then the complete upgrade package is directly used for upgrading after the target internet of things equipment is in a non-working state. When the target internet of things device is in a non-working state or an idle state, the complete upgrade package can be directly adopted to execute an update task to update the operating system.
Therefore, the method and the device can upgrade the operating system of the target Internet of things device by adopting the hot patch on the premise of ensuring the stability of the target Internet of things device.
On the basis of the foregoing embodiment, the embodiment of the present invention can also perform upgrading without affecting the normal operation of the internet of things device.
In this embodiment of the present invention, before the upgrading the operating system of the target internet of things device by using the hot patch, the method may further include:
acquiring task priority information of the target Internet of things equipment;
judging whether the task priority of the target Internet of things equipment is greater than a preset priority or not according to the task priority information to obtain a third judgment result;
and when the third judgment result shows that the task priority of the target Internet of things equipment is not greater than the preset priority, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading package.
In the embodiment of the invention, if the hot patch is directly adopted for upgrading, if a target internet of things device is still running a certain task, such as a counting task of a heartbeat sensor, a task of periodically reporting temperature in a blast furnace and the like, an error may occur or compatibility may be caused in the task execution process.
Therefore, in the embodiment of the invention, the task priority information of the target internet of things equipment is also obtained before the hot patch is adopted for upgrading. The task priority information represents priority information of each task. The scheduling of the priority of each task in the priority information is used to ensure that all tasks can be completed within the specified time corresponding to the task.
And when the task priority of the target Internet of things equipment is judged to be not more than the preset priority, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading package. The priority of the target internet of things device may be a priority corresponding to a currently running task. The preset priority may represent a priority corresponding to whether an urgent execution task is required, for example, an urgent repair patch.
The preset priority can be a priority corresponding to the fact that the stability of the target Internet of things equipment and the operation of other key tasks are not affected.
If the task priority of the target Internet of things equipment is judged to be larger than the preset priority, the hot patch can be directly adopted to upgrade the operating system of the target Internet of things equipment so as to upgrade the target Internet of things equipment in time, and the problems of system faults and the like caused by unrepaired equipment are avoided.
In the embodiment of the present invention, the server 21 may upgrade the operating system of each internet of things device through the operation on the cluster.
Referring to fig. 3, fig. 3 is a system architecture diagram for upgrading an operating system of each internet of things device in the embodiment of the present application.
For each internet of things device in the internet of things device clusters, determining a first cluster 31 in a working state and a second cluster 32 not in the working state;
for the internet of things device 310 in the first cluster, upgrading an operating system of the target internet of things device by using a hot patch;
for the internet of things devices 320 in the second cluster, the operating system of the target internet of things device is upgraded by using a complete upgrade package.
In the embodiment of the invention, a plurality of internet of things devices can be divided into different clusters, wherein the internet of things devices such as cameras and sensors in a first cluster are all in working states, and the internet of things devices such as infusion pumps and blast furnace sensors in a second cluster are not in working states. Unified operations may be performed for the clusters. And for each Internet of things device in the first cluster, upgrading by adopting a hot patch, and for each Internet of things device in the second cluster, upgrading by adopting a complete upgrading packet.
In the embodiment of the invention, the operating system of each piece of Internet of things equipment is upgraded through the cluster, and different upgrading modes can be adopted for different pieces of Internet of things equipment, so that the upgrading of the operating system of each piece of Internet of things equipment is ensured.
In the embodiment of the present invention, after the overall upgrade is performed in a cluster manner, the method may further include recording that the internet of things devices in each cluster are not completely upgraded to form a first list, and performing a step of determining the first cluster in the working state and the second cluster not in the working state after a predetermined time according to the first list, or re-performing a step of obtaining the working state information of the target internet of things device in the internet of things device cluster. The first list at least comprises the equipment address or equipment information and other Internet of things information of each Internet of things equipment so as to determine the uniqueness of the Internet of things equipment.
After the overall upgrade is performed in a cluster mode, the method further includes acquiring the number of hot patches installed in the internet of things equipment for the internet of things equipment in the first list, and if the number exceeds a preset number, in order to avoid failure of upgrade of the internet of things equipment, upgrading an operating system of the target internet of things equipment by using a complete upgrade package.
In the embodiment of the invention, the upgrading operation can be performed on the clusters, and the upgrading efficiency is improved on the premise of ensuring the compatibility of each Internet of things device in each cluster.
It should be understood that the order of some steps in the method described in one or more embodiments of the present disclosure may be interchanged according to actual needs, or some steps may be omitted or deleted.
Based on the same idea, the embodiment of the present specification further provides a device corresponding to the above method. Fig. 3 is a schematic structural diagram of an apparatus for upgrading an operating system of an internet of things device, which is provided in an embodiment of the present specification and corresponds to fig. 2. As shown in fig. 4, the apparatus may include:
the obtaining module 401 is configured to obtain working state information of a target internet of things device in the internet of things device cluster;
the judging module 402 is configured to judge whether the target internet of things device is in a working state according to the working state information, so as to obtain a first judgment result;
a first executing module 403, configured to upgrade, when the first determination result indicates that the target internet of things device is in a working state, an operating system of the target internet of things device by using a hot patch;
a second executing module 404, configured to upgrade, by using a complete upgrade package, an operating system of the target internet of things device when the first determination result indicates that the target internet of things device is not in a working state.
In some embodiments, the apparatus may further comprise:
the hot patch number determining unit is used for determining the number of hot patches installed in the operating system of the target Internet of things equipment;
the numerical value judging unit is used for judging whether the number of the hot patches is larger than or equal to a preset numerical value or not to obtain a second judgment result;
a stopping unit, configured to terminate an upgrade process of an operating system of the target internet of things device when the second determination result indicates that the hot patch number is greater than or equal to a preset value;
the first execution module is specifically configured to:
and if the second judgment result shows that the number of the hot patches is smaller than the preset value, upgrading the operating system of the target Internet of things equipment by adopting the hot patches.
In some embodiments, the apparatus may further comprise:
the priority acquiring unit is used for acquiring task priority information of the target Internet of things equipment;
the priority judging unit is used for judging whether the task priority of the target Internet of things equipment is greater than a preset priority or not according to the task priority information to obtain a third judging result;
and the first upgrading subunit is used for upgrading the operating system of the target Internet of things device by adopting a complete upgrading packet when the third judgment result shows that the task priority of the target Internet of things device is not greater than the preset priority.
In some embodiments, the apparatus may further comprise:
the polling unit is used for sending a working state inquiry message to the target Internet of things equipment according to a preset period;
and the second upgrading subunit is used for upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading package when receiving the information which is fed back by the target Internet of things equipment and represents that the target Internet of things equipment is not in the working state.
In some embodiments, the apparatus may further comprise:
and the breakpoint upgrading unit is used for sending a complete upgrading packet to the target Internet of things equipment when the first judgment result shows that the target Internet of things equipment is in a working state, so that the target Internet of things equipment is upgraded after being in a non-working state.
Based on the same idea, the embodiment of the present specification further provides an electronic device corresponding to the method.
Fig. 5 is a schematic structural diagram of an electronic device corresponding to fig. 2 provided in an embodiment of the present disclosure. As shown in fig. 5, the electronic device 900 may include:
at least one processor 910; and the number of the first and second groups,
a memory 930 communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory 930 stores instructions 920 executable by the at least one processor 910 to enable the at least one processor 910 to:
acquiring working state information of target Internet of things equipment in the Internet of things equipment cluster;
judging whether the target Internet of things equipment is in a working state or not according to the working state information to obtain a first judgment result;
when the first judgment result shows that the target Internet of things equipment is in a working state, upgrading an operating system of the target Internet of things equipment by adopting a hot patch;
and when the first judgment result shows that the target Internet of things equipment is not in a working state, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading packet.
Based on the same idea, the embodiment of the present specification further provides a computer-readable medium corresponding to the above method. The computer readable medium has computer readable instructions stored thereon that are executable by a processor to implement the method of:
acquiring working state information of target Internet of things equipment in the Internet of things equipment cluster;
judging whether the target Internet of things equipment is in a working state or not according to the working state information to obtain a first judgment result;
when the first judgment result shows that the target Internet of things equipment is in a working state, upgrading an operating system of the target Internet of things equipment by adopting a hot patch;
and when the first judgment result shows that the target Internet of things equipment is not in a working state, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading packet.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus for upgrading the operating system of the device in the internet of things shown in fig. 3, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to part of the description of the method embodiment for relevant points.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital character system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate a dedicated integrated circuit chip. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry for implementing the logical method flows can be readily obtained by a mere need to program the method flows with some of the hardware description languages described above and into an integrated circuit.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, AtmelAT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information which can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (13)

1. A method for upgrading an operating system of equipment of the Internet of things comprises the following steps:
acquiring working state information of target Internet of things equipment in the Internet of things equipment cluster;
judging whether the target Internet of things equipment is in a working state or not according to the working state information to obtain a first judgment result;
when the first judgment result shows that the target Internet of things equipment is in a working state, task priority information of the target Internet of things equipment is obtained;
judging whether the task priority of the target Internet of things equipment is greater than a preset priority or not according to the task priority information to obtain a third judgment result;
when the third judgment result shows that the task priority of the target Internet of things equipment is greater than the preset priority, upgrading the operating system of the target Internet of things equipment by using a hot patch;
when the third judgment result shows that the task priority of the target Internet of things equipment is not greater than the preset priority, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrade package;
and when the first judgment result shows that the target Internet of things equipment is not in a working state, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading packet.
2. The method of claim 1, prior to upgrading the operating system of the target internet of things device with the hot patch, further comprising:
determining the number of hot patches installed in an operating system of the target Internet of things equipment;
judging whether the number of the hot patches is larger than or equal to a preset value or not to obtain a second judgment result;
if the second judgment result shows that the number of the hot patches is larger than or equal to a preset value, terminating the upgrading process of the operating system of the target Internet of things equipment;
the upgrading the operating system of the target internet of things device by using the hot patch specifically includes:
and if the second judgment result shows that the number of the hot patches is smaller than the preset value, upgrading the operating system of the target Internet of things equipment by adopting the hot patches.
3. The method of claim 1, wherein upgrading the operating system of the target internet of things device with the complete upgrade package specifically comprises:
after the complete upgrade package is written into the ROM of the target Internet of things equipment, restarting the target Internet of things equipment;
and in the process of restarting the target Internet of things equipment, clearing the hot patch loaded by the target Internet of things equipment.
4. The method of claim 1, wherein the upgrading the operating system of the target internet of things device with the hot patch specifically includes:
and upgrading the operating system of the target Internet of things equipment by adopting a HERA technology.
5. The method according to claim 1, wherein the obtaining of the working state information of the target internet of things device in the internet of things device cluster specifically includes:
sending a working state inquiry message to the target Internet of things equipment;
and acquiring the working state information fed back by the target Internet of things equipment.
6. The method according to claim 1, wherein the obtaining of the working state information of the target internet of things device in the internet of things device cluster specifically includes:
and acquiring the working state information actively reported by the target Internet of things equipment.
7. The method of claim 2, after terminating the upgrade process for the operating system of the target internet of things device, further comprising:
sending a working state inquiry message to the target Internet of things equipment according to a preset period;
and when information which is fed back by the target Internet of things equipment and represents that the target Internet of things equipment is not in a working state is received, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading packet.
8. The method of claim 2, after terminating the upgrade process for the operating system of the target internet of things device, further comprising:
and after the information which is actively reported by the target Internet of things equipment and indicates that the target Internet of things equipment is not in the working state is obtained, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading packet.
9. The method of claim 2, further comprising:
and when the first judgment result shows that the target Internet of things equipment is in a working state, sending a complete upgrading packet to the target Internet of things equipment so as to facilitate upgrading after the target Internet of things equipment is in a non-working state.
10. The method of claim 1, further comprising:
for each Internet of things device in the Internet of things device clusters, determining a first cluster in a working state and a second cluster not in the working state;
for the Internet of things equipment in the first cluster, upgrading an operating system of the target Internet of things equipment by adopting a hot patch;
and for the Internet of things equipment in the second cluster, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading package.
11. An apparatus for upgrading an operating system of an internet of things device, comprising:
the acquisition module is used for acquiring the working state information of the target Internet of things equipment in the Internet of things equipment cluster;
the judging module is used for judging whether the target Internet of things equipment is in a working state or not according to the working state information to obtain a first judging result;
the priority acquisition module is used for acquiring task priority information of the target Internet of things equipment when the first judgment result shows that the target Internet of things equipment is in a working state;
the priority judging module is used for judging whether the task priority of the target Internet of things equipment is greater than a preset priority or not according to the task priority information to obtain a third judging result;
the first execution module is used for upgrading the operating system of the target internet of things device by adopting a hot patch when the third judgment result shows that the task priority of the target internet of things device is greater than the preset priority;
the second execution module is used for upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading packet when the third judgment result shows that the task priority of the target Internet of things equipment is not greater than the preset priority;
and the second execution module is further used for upgrading the operating system of the target internet of things device by adopting a complete upgrade package when the first judgment result shows that the target internet of things device is not in the working state.
12. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring working state information of target Internet of things equipment in the Internet of things equipment cluster;
judging whether the target Internet of things equipment is in a working state or not according to the working state information to obtain a first judgment result;
when the first judgment result shows that the target Internet of things equipment is in a working state, task priority information of the target Internet of things equipment is obtained;
judging whether the task priority of the target Internet of things equipment is greater than a preset priority or not according to the task priority information to obtain a third judgment result;
when the third judgment result shows that the task priority of the target Internet of things equipment is greater than the preset priority, upgrading the operating system of the target Internet of things equipment by using a hot patch;
when the third judgment result shows that the task priority of the target Internet of things equipment is not greater than the preset priority, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrade package;
and when the first judgment result shows that the target Internet of things equipment is not in a working state, upgrading the operating system of the target Internet of things equipment by adopting a complete upgrading package.
13. A computer readable medium having computer readable instructions stored thereon which are executable by a processor to implement a method of upgrading an operating system of an internet of things device as claimed in any one of claims 1 to 10.
CN202110699570.4A 2021-06-23 2021-06-23 Method and device for upgrading operating system of Internet of things equipment Active CN113342376B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110699570.4A CN113342376B (en) 2021-06-23 2021-06-23 Method and device for upgrading operating system of Internet of things equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110699570.4A CN113342376B (en) 2021-06-23 2021-06-23 Method and device for upgrading operating system of Internet of things equipment

Publications (2)

Publication Number Publication Date
CN113342376A CN113342376A (en) 2021-09-03
CN113342376B true CN113342376B (en) 2022-08-30

Family

ID=77478370

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110699570.4A Active CN113342376B (en) 2021-06-23 2021-06-23 Method and device for upgrading operating system of Internet of things equipment

Country Status (1)

Country Link
CN (1) CN113342376B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7168075B1 (en) * 1999-11-15 2007-01-23 Siemens Aktiengesellschaft Automation device and updating method
CN111651175A (en) * 2020-04-27 2020-09-11 厦门科灿信息技术有限公司 Upgrading method, device, terminal and storage medium of data center monitoring system

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7509636B2 (en) * 2003-12-15 2009-03-24 Microsoft Corporation System and method for updating files utilizing delta compression patching
US20060075001A1 (en) * 2004-09-30 2006-04-06 Canning Jeffrey C System, method and program to distribute program updates
CN104834537B (en) * 2014-12-30 2018-04-27 沈阳东软医疗系统有限公司 Data processing method, server and client
CA3019911A1 (en) * 2015-07-27 2017-02-02 Datagrid Systems, Inc. Techniques for evaluating server system reliability, vulnerability and component compatibility using crowdsourced server and vulnerability data
US10866824B2 (en) * 2017-01-13 2020-12-15 Citrix Systems, Inc. Continuous uptime of guest virtual machines during upgrade of a virtualization host device
US10705821B2 (en) * 2018-02-09 2020-07-07 Forescout Technologies, Inc. Enhanced device updating
CN109413210A (en) * 2018-12-18 2019-03-01 郑州云海信息技术有限公司 Target drives upgrade method, device, equipment and the medium of distributed cluster system
CN109491698B (en) * 2018-12-29 2022-07-08 武汉思普崚技术有限公司 System updating method and device based on hot patch
CN110032382A (en) * 2019-03-25 2019-07-19 深圳猛犸电动科技有限公司 A kind of vehicle electronic control unit upgrade method, system and terminal device
CN110597545B (en) * 2019-09-04 2023-05-30 北京方研矩行科技有限公司 Hot patch Ding Zhineng upgrading method and system based on OTA component
CN111045714B (en) * 2019-12-19 2022-03-01 歌尔股份有限公司 Firmware updating method and device, earphone and computer readable storage medium
WO2021142761A1 (en) * 2020-01-17 2021-07-22 深圳市汇顶科技股份有限公司 Chip patching method and chip
CN111965989B (en) * 2020-08-14 2024-01-26 深圳市欧瑞博科技股份有限公司 System updating method and device, intelligent home control panel and storage medium
CN112099821A (en) * 2020-08-25 2020-12-18 珠海格力电器股份有限公司 Program upgrading method and device and air conditioning system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7168075B1 (en) * 1999-11-15 2007-01-23 Siemens Aktiengesellschaft Automation device and updating method
CN111651175A (en) * 2020-04-27 2020-09-11 厦门科灿信息技术有限公司 Upgrading method, device, terminal and storage medium of data center monitoring system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
自动更新系统的设计与实现;陈坚等;《计算机时代》;20100802(第08期);全文 *

Also Published As

Publication number Publication date
CN113342376A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
JP6912583B2 (en) Service processing method and equipment
CN109032825B (en) Fault injection method, device and equipment
US10515206B2 (en) Program-instruction-controlled instruction flow supervision
CN110046479B (en) Link library file anti-debugging method and device based on android operating system
CN104375861A (en) Installation-free operation method and device for application programs based on Android platform and terminal
US9690567B2 (en) Runtime detection of software configurations and upgrades
CN111708655A (en) Application crash processing method, device and system
US11704139B2 (en) Service processing method and apparatus, electronic device, and storage medium
TWI684916B (en) Function selection method and server
CN103793248A (en) Method and device for upgrading application program
CN112130926B (en) Application program running method, device, terminal equipment and storage medium
CN110007935B (en) Processing method, device and equipment for program upgrading
CN108121650B (en) Method and device for testing page user interface
CN110046100B (en) Packet testing method, electronic device and medium
CN113342376B (en) Method and device for upgrading operating system of Internet of things equipment
CN109508249B (en) Crash processing method and device and electronic equipment
CN111385661B (en) Method, device, terminal and storage medium for voice control of full screen playing
CN109582388B (en) Parameter configuration method, device and equipment
CN111897543A (en) Software management method, device, management equipment and storage medium
CN109933355B (en) Application program upgrading method and device
CN105573891A (en) Android application electricity consumption statistics method and device
CN104281443B (en) Method for realizing code and data replacement by using TCM (trusted cryptography module)
CN113282363A (en) Method and device for optimizing hybrid APP
CN107451050B (en) Function acquisition method and device and server
CN112286572A (en) Configuration method and device of business process

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