WO2021057880A1 - Program upgrade method and apparatus for internet of things device, and internet of things device - Google Patents

Program upgrade method and apparatus for internet of things device, and internet of things device Download PDF

Info

Publication number
WO2021057880A1
WO2021057880A1 PCT/CN2020/117622 CN2020117622W WO2021057880A1 WO 2021057880 A1 WO2021057880 A1 WO 2021057880A1 CN 2020117622 W CN2020117622 W CN 2020117622W WO 2021057880 A1 WO2021057880 A1 WO 2021057880A1
Authority
WO
WIPO (PCT)
Prior art keywords
upgrade
program
internet
application
upgraded
Prior art date
Application number
PCT/CN2020/117622
Other languages
French (fr)
Chinese (zh)
Inventor
李燕琼
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2021057880A1 publication Critical patent/WO2021057880A1/en

Links

Images

Classifications

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

Definitions

  • the present invention relates to the field of computer technology, and in particular to a program upgrade method and device for Internet of Things equipment, and Internet of Things equipment.
  • the Internet of Things is an information carrier based on networks such as the Internet, wireless networks, and traditional telecommunications networks.
  • Intelligent processing processes such as intelligent perception, identification, data collection, and equipment management can be realized through various Internet of Things devices.
  • IoT devices can include information sensors, radio frequency identification technology, global positioning systems, infrared sensors, laser scanners, on-board equipment, smart speakers, etc.
  • the use of IoT devices can collect sound, light, electricity, heat, images, location, etc. in real time. This kind of information is needed to realize intelligent perception, recognition and management.
  • Internet of Things devices need the support of applications, operating systems, firmware and other programs to run. As time goes by, programs in Internet of Things devices have solutions to vulnerabilities, compatibility issues, increase interaction methods, or provide more functional support, etc. Demand, need to upgrade the IoT device program.
  • the Internet of Things device when upgrading the Internet of Things device, in order to make the device operate normally, the Internet of Things device is usually upgraded during the operation of the Internet of Things device. At this time, the main application in the Internet of Things device is in a normal operating state. The task is also in the running state, and the main application and the upgrade task are started at the same time to complete the upgrade of the device program during the normal operation of the device.
  • the memory resources of most IoT devices are small.
  • the memory resources of sensors may only be 100K. If the main program operation and upgrade tasks are still processed simultaneously according to the usage status of the memory resources, the download speed is likely to decrease or the main program is unstable. There is currently no effective way to solve the technical problem.
  • the embodiments of the present invention provide a program upgrade method and device for an Internet of Things device, and an Internet of Things device to solve the system failure that occurs when the Internet of Things device simultaneously processes the main application program operation and the upgrade task in the prior art. Stable technical issues.
  • an embodiment of the present application provides a program upgrade method for an Internet of Things device, including:
  • an embodiment of the present application provides a program upgrade method for an Internet of Things device, including:
  • an embodiment of the present application provides a program upgrade apparatus for an Internet of Things device, including:
  • the message detection module is used to detect the upgrade trigger message sent by the device management server during the running process of at least one application
  • a message response module configured to close at least part of the application based on the resource occupation of the at least one application in response to the upgrade trigger message
  • Program download module used to download the program to be upgraded from the upgrade server
  • the program upgrade module is used to run the program to be upgraded and complete the upgrade task of the Internet of Things device;
  • the program running module is used to re-run the at least one application program.
  • an embodiment of the present application provides a program upgrade apparatus for Internet of Things equipment, including:
  • the message detection module is used to detect the upgrade trigger message sent by the device management server during the running process of at least one application
  • the condition judgment module is used to judge whether the resource occupation of the currently running application program meets the upgrade conditions
  • the first processing module is configured to download the program to be upgraded from the upgrade server if it is satisfied; run the program to be upgraded to complete the upgrade task of the Internet of Things device;
  • the second processing module is configured to return to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition if it is not satisfied, and continue execution.
  • an embodiment of the present application provides an Internet of Things device, including: a storage component and a processing component; the storage component is used to store one or more computer instructions; the one or more computer instructions are used by the processing component transfer;
  • the processing component is used for:
  • At least one application detect an upgrade trigger message sent by the device management server; in response to the upgrade trigger message, close at least part of the application based on the resource occupation of the at least one application; from the upgrade server Download the program to be upgraded; run the program to be upgraded to complete the upgrade task of the Internet of Things device; re-run the at least one application program.
  • an embodiment of the present application provides an Internet of Things device, including: a storage component and a processing component; the storage component is used to store one or more computer instructions; the one or more computer instructions are used by the processing component transfer;
  • the processing component is used for:
  • At least one application program detect the upgrade trigger message sent by the device management server; determine whether the resource occupation of the currently running application program meets the upgrade conditions; if so, download the program to be upgraded from the upgrade server; run the For the program to be upgraded, complete the upgrade task of the Internet of Things device; if it is not satisfied, return to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition and continue execution.
  • the upgrade trigger message sent by the device management server can be detected during the operation of at least one application of the IoT device, and then the upgrade trigger message can be responded to Based on the resource occupation of at least one application, at least part of the application is closed, so that the system environment of the Internet of Things device can meet the upgrade requirements, and the program to be upgraded can be downloaded from the upgrade server.
  • the downloaded program to be upgraded can be run to complete the upgrade task of the IoT device.
  • at least one application can be re-run to make the IoT device run normally again.
  • the system of the IoT device can download the program to be upgraded and complete the upgrade task normally, thereby solving the technical problem of system instability caused by the simultaneous operation of the upgrade task and the main application program.
  • FIG. 1 is a flowchart of an embodiment of a program upgrade method for an Internet of Things device provided by an embodiment of the present invention
  • FIG. 2 is a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by an embodiment of the present invention
  • FIG. 3 is a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by an embodiment of the present invention
  • FIG. 4 is an example diagram of an upgrade of an Internet of Things device provided by an embodiment of the present invention.
  • FIG. 5 is a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by an embodiment of the present invention.
  • FIG. 6 is a flowchart of another embodiment of a program upgrade method for an Internet of Things device according to an embodiment of the present invention.
  • FIG. 7 is a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of an embodiment of an apparatus for program upgrading of an Internet of Things device provided by an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of an embodiment of an Internet of Things device provided by an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of an embodiment of an apparatus for program upgrading of an Internet of Things device provided by an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of an embodiment of an Internet of Things device provided by an embodiment of the present invention.
  • the words “if” and “if” as used herein can be interpreted as “when” or “when” or “in response to determination” or “in response to recognition”.
  • the phrase “if determined” or “if recognized (statement or event)” can be interpreted as “when determined” or “in response to determination” or “when recognized (statement or event) )” or “in response to identification (statement or event)”.
  • the embodiments of this application can be applied to Internet of Things devices, by analyzing the occupancy of system resources in the Internet of Things devices to provide conditions that can be upgraded normally, so that the upgrade can be completed in time, and the operation of the main application program can be resumed in time, thereby Avoid running system instability problems caused by downloading and upgrading.
  • the hardware resources and memory resources of the Internet of Things device may be fixed and not large enough.
  • the program in the Internet of Things device may be upgraded, for example, a general upgrade of an application program, a version upgrade, or a firmware upgrade, and so on.
  • a secure HTTPS Hypertext Transfer Protocol Secure, Hypertext Transfer Security Protocol.
  • the upgrade trigger message sent by the device management server can be detected during the operation of at least one application program, and the response to the upgrade trigger message can be based on the at least one application program. Occupies resources, close at least part of the application, so that the resources in the IoT device system can perform the upgrade task. After downloading the program to be upgraded from the upgrade server, the program to be upgraded can be run to complete the upgrade task of the IoT device, and then at least one application can be rerun.
  • the IoT device completes the upgrade task, and reruns at least one application after the upgrade is completed to restore the system of the IoT device to a stable state, which can solve the system failure caused by the upgrade task and the main application running at the same time. Stable technical issues.
  • a flowchart of an embodiment of a program upgrade method for an Internet of Things device provided by an embodiment of this application, the method may include the following steps:
  • the embodiments of the present application may be applied to Internet of Things devices.
  • the Internet of Things devices may refer to electronic devices with limited resources, and specifically may refer to electronic devices with memory resources less than a set memory threshold.
  • IoT devices When IoT devices are running normally, they need the support of multiple programs. For example, they can include: Bootloader, OS (operating system, operating system), timing program, and network connection program, etc.
  • OS operating system, operating system
  • timing program timing program
  • network connection program etc.
  • IoT devices When IoT devices are running normally, they need the support of multiple programs. For example, they can include: Bootloader, OS (operating system, operating system), timing program, and network connection program, etc.
  • OS operating system, operating system
  • timing program For some specific functions of the Internet of Things Devices, for example, image sensors, sound sensors, etc., may also include applications that provide certain functions for users, for example, applications that display images, applications that output sounds for users, and so on.
  • the device management server can be used to provide computing services. For example, it can be composed of personal computers, supercomputers, laptops, and other devices, or it can be composed of cloud servers.
  • the embodiment of the application does not make specific types of device management servers. Too much restriction.
  • the device management server refers to the server used to manage the Internet of Things devices. It can usually respond to and process service requests from the Internet of Things devices, and can also manage and control applications in the Internet of Things devices.
  • the device management server may be composed of a third-party server, and the third-party server may specifically refer to the developer who developed the user application. The access server set by the user application.
  • the device management server determines that there is an upgrade requirement for the IoT device, it can send an upgrade trigger message to the IoT device.
  • the upgrade trigger message may include information such as the program name and download address of the program to be upgraded, and the download address can be determined through the upgrade trigger message, so that the program to be upgraded can be downloaded from the upgrade server.
  • the at least one application program may refer to a main application (MAIN APP Task) module in the Internet of Things device.
  • the main application module refers to a software module with a specific application purpose formulated by the user.
  • the programs used on IoT devices do not include the operating systems and network modules of IoT devices.
  • At least one application in the Internet of Things device consumes resources of the Internet of Things device during the running process, which may include hardware resources or memory resources. Due to the small resources of the IoT device, if at least one application has a large resource occupancy, the remaining resources of the IoT device are small, and the upgrade cannot be performed in time, or there is a resource contention between the upgrade program and the operation of at least one application. . For example, suppose the memory resource of the IoT device is 100K, and the resource occupied by at least one application is 60K, and the remaining resource is 40K, but if the upgrade task requires 60K of memory resources, the upgrade cannot be completed due to insufficient remaining resources. If the upgrade task is 38K of memory resources are required. 98K of memory resources are required to upgrade at least one application and the upgrade task at the same time. Task upgrades can be performed. However, due to excessive memory resource consumption, resource conflicts and resource contention are prone to occur. Lead to instability of IoT devices.
  • the upgrade After responding to the upgrade trigger message, the upgrade can be started. At this time, based on the resource occupation of at least one application, at least part of the application can be closed. By closing at least part of the application, part of the resources in the IoT device can be unoccupied, and the supply of applicable resources can be increased. The device can be upgraded after closing at least some applications.
  • the response to the upgrade trigger message may include the download address of the program to be upgraded, and the program to be upgraded may be downloaded from the server based on the download address of the program to be upgraded.
  • the response to the upgrade trigger message may include download prompt information of the program to be upgraded, and the Internet of Things device may determine the download address of the program to be upgraded according to the download prompt information in the response upgrade trigger message, so that based on the download address,
  • the upgrade server downloads the program to be upgraded.
  • the downloading of the program to be upgraded from the upgrade server may specifically be: based on the download address, sending a download request to the upgrade server corresponding to the download address, and establishing a connection with the upgrade server based on the download request.
  • the program to be upgraded can be downloaded from the upgrade server.
  • the Internet of Things device After downloading the program to be upgraded, the Internet of Things device can start the program to be upgraded to complete the upgrade task of the Internet of Things device.
  • the re-running the at least one application program may include restarting at least part of the closed application program to re-run the at least one application program.
  • the upgrade trigger message sent by the device management server can be detected during the operation of at least one application, and the upgrade trigger message can be based on at least one application.
  • the resources of the program are occupied, and at least part of the application programs are closed, so that the resources in the IoT device system can perform the upgrade task.
  • the program to be upgraded can be run to complete the upgrade task of the IoT device, and then at least one application can be rerun.
  • the IoT device completes the upgrade task, and reruns at least one application after the upgrade is completed to restore the system of the IoT device to a stable state, which can solve the system failure caused by the upgrade task and the main application running at the same time. Stable technical issues.
  • shutting down at least part of the application based on the resource occupation of the at least one application may include:
  • all applications are closed based on the resource occupation of the at least one application.
  • the downloading of the program to be upgraded from the upgrade server may include:
  • the hypertext transmission security protocol requires more resources, it cannot be used when at least part of the application is not closed or is affected by resource restrictions and has a poor use effect.
  • closing at least part of the application can enable hypertext transmission
  • the security protocol can be used to improve the security of the download, thereby improving the security of the upgrade task.
  • a flowchart of another embodiment of a program upgrade method of an Internet of Things device provided by this embodiment of the application, the method may include the following steps:
  • 201 During the running process of at least one application program, detect an upgrade trigger message sent by the device management server.
  • the mode command can be executed to switch the Internet of Things device to the download mode, and the program to be upgraded can be downloaded from the upgrade server.
  • the IoT device When switching the IoT device to the download mode, the IoT device needs to be not in the upgrade mode. Therefore, when switching the Internet of Things device to the download mode, it may also include: setting the upgrade flag bit as the first flag, restarting the Internet of Things device, and when detecting that the upgrade flag bit is the first flag, determining the physical network The device switches to the download mode to download the program to be upgraded from the upgrade server.
  • Detecting the completion of the program to be upgraded may specifically be detecting that the program to be upgraded receives an end instruction sent by the upgrade server to determine that the download of the program to be upgraded is completed.
  • Switching the Internet of Things device to the upgrade mode may specifically include: when detecting that the download of the program to be upgraded is completed, setting the upgrade flag to the second flag, restarting the Internet of Things device, and detecting that the upgrade flag is the second flag, Make sure that the IoT device is switched to the upgrade mode.
  • switching the Internet of Things device to the upgrade mode may specifically include clearing the download mode when it is detected that the download of the program to be upgraded is completed, and switching the Internet of Things device to the upgrade mode .
  • the program to be upgraded can be run to complete the upgrade task of the Internet of Things device.
  • the upgrade flag bit may refer to a variable used to identify the upgrade mode. Through the setting of the upgrade flag bit, it can be determined whether the program of the Internet of Things device can be upgraded currently.
  • the upgrade flag bit may be expressed as an integer variable flag (flag), the first flag set for flag may specifically mean that flag is equal to 0; the second flag set for flag may specifically mean that flag is equal to 1.
  • the upgrade flag is the first flag, it is not in the upgrade state, and the program to be upgraded for the Internet of Things device is not executed.
  • the upgrade flag is the second flag, the upgrade procedure for the Internet of Things device is executed to complete the upgrade of the Internet of Things device.
  • the download mode is set so that the current operating environment of the Internet of Things device can be clarified, so that the program to be upgraded can be downloaded according to the current operating environment.
  • the Internet of Things device can be switched to the upgrade mode to detect the When the Internet of Things device is in the upgrade mode, the program to be upgraded can be run to complete the upgrade task of the Internet of Things device.
  • the content of execution can be clarified through the role of the model, so as to improve the upgrade efficiency.
  • the switching the Internet of Things device to the download mode to download the program to be upgraded from the upgrade server may include:
  • the program to be upgraded is downloaded from the upgrade server.
  • the Internet of Things device After the download mode of the Internet of Things device is turned on, the Internet of Things device can be switched from the normal operation mode to the download mode by restarting. After the restart, the Internet of Things device in the download mode can start to download the program to be upgraded. In the download mode, when the upgrade flag is the first flag, the program to be upgraded can be downloaded from the upgrade server. Due to the restart method, the application in the Internet of Things device is closed, and the application is isolated from the download process to ensure download efficiency.
  • At least one application program of the Internet of Things device is arranged in the order of startup sequence, it may specifically include: startup program, operating system, network module, user application program, and so on. Different applications have different functions.
  • the startup program is to completely isolate at least one application from the upgrade task for execution, and the upgrade task and at least one application can be isolated on the IoT device during the startup phase.
  • downloading the program to be upgraded from the upgrade server may include:
  • the boot program of the Internet of Things device when it is detected that the upgrade flag is the first flag, the program to be upgraded is downloaded from the upgrade server.
  • the download of the program to be upgraded can be started, so that the IoT device can start the program to be upgraded when the boot program starts other programs but does not start. Download to isolate the upgrade task from user applications, operating systems, and other programs.
  • downloading the program to be upgraded from the upgrade server may include:
  • the download task of the service to be upgraded can be started.
  • the startup of the operating system can be entered, and the program download can be started when the network connection is successful.
  • switching the Internet of Things device to the upgrade mode may include:
  • the program to be upgraded can be run to complete the upgrade task of the Internet of Things device.
  • confirming the switch to the upgrade mode includes:
  • the method when detecting that the IoT device is in the upgrade mode, running the program to be upgraded, and after completing the upgrade task of the IoT device, the method may further include:
  • the re-running the at least one application program may include:
  • the restarting the Internet of Things device to re-run the at least one application may include:
  • the at least one application is started.
  • the restarting of the Internet of Things device described in this application may specifically refer to running a restart (Reboot) instruction to restart the Internet of Things device.
  • Reboot restart
  • a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by this embodiment of the application, the method may include the following steps:
  • 311 Restart the Internet of Things device to re-run the at least one application.
  • the restarting the Internet of Things device to restart running the at least one application program may include:
  • the upgrade of the IoT device is divided into three stages as a whole.
  • the upgrade trigger message sent by the device management server can be detected.
  • the Internet of Things device can respond to the upgrade trigger message and close all applications based on the resource occupation of at least one application.
  • the Internet of Things device can be set to download mode and restarted.
  • the Internet of Things device can be switched. Go to download mode to download the program to be upgraded.
  • the boot program starts first. At the end of the startup, the IoT device can begin to enter the startup phase.
  • the IoT device Through the detection of the upgrade flag bit, it can start the IoT device when it is determined that the upgrade flag bit is the first flag.
  • the operating system unit and when the operating system is started, establishes the connection between the Internet of Things device and the upgrade server, thereby completing the establishment of the download environment.
  • When downloading the program to be upgraded from the upgrade server use the monitoring task to monitor the download process of the program to be upgraded, so that when the download of the program to be upgraded is detected, the download mode can be cleared and the upgrade can be set
  • the flag bit is the second flag.
  • the program to be upgraded has undergone mode switching, restarted the device, and equipped with the download environment to complete the download of the program to be upgraded.
  • the download of the program to be upgraded is completed, and the installation of the program to be upgraded can be started.
  • the Internet of Things device can be restarted, and the Internet of Things device can be restarted.
  • the boot program of the device check the upgrade flag bit.
  • the upgrade flag is detected as the second flag, it means that the IoT device has switched to the upgrade mode at this time.
  • the IoT device can set the upgrade flag as the first flag and switch it to the normal working mode.
  • the IoT device can separately handle the download and installation of the program to be upgraded, and then run at least one application normally. Avoid resource conflicts during the running and downloading and installation of applications, and improve the stability of the system.
  • the smart speaker M1 in FIG. 4 can establish a communication connection with the device management server M2, and can also establish a communication connection with the upgrade server M3.
  • the smart speaker M1 can run at least one application program normally during normal operation.
  • the device management server M2 may send an upgrade trigger message 401 to the smart speaker M1.
  • the smart speaker M1 can obtain the upgrade trigger message 402.
  • the smart speaker M1 may close all the application programs 403 based on the resource occupation of the at least one application program in response to the upgrade trigger message. After that, the smart speaker M1 can set the Internet of Things device to a download mode 404, and then can run a restart command (Reboot) 405. After the restart instruction is executed, the smart speaker M1 can start the bootloader 406. The smart speaker M1 can determine the upgrade flag (Upgrade Flag) 406, and when the upgrade flag is the first flag 407, the operating system unit (OS Init) 408 can be started to establish a network connection 409. After the network connection is successful (Network Ready), it can be judged whether it is in the download mode 410.
  • the smart speaker M1 may close all the application programs 403 based on the resource occupation of the at least one application program in response to the upgrade trigger message. After that, the smart speaker M1 can set the Internet of Things device to a download mode 404, and then can run a restart command (Reboot) 405. After the restart instruction is executed, the smart speaker M1 can
  • the monitor task (Monitor Task) 411 can be started, and the program to be upgraded 412 can be downloaded from the upgrade server M3 and used The monitoring task monitors the download process of the program to be upgraded. When it is detected that the download of the program to be upgraded is completed, the download mode is cleared and the upgrade flag bit is set to the second flag 413.
  • the smart speaker M1 can run the restart instruction 405.
  • the boot program is started 406, when the upgrade flag is detected as the second flag 407, it is confirmed to switch to the upgrade mode, so that in the upgrade mode, the program to be upgraded is run 414.
  • the upgrade flag bit can be cleared, that is, the upgrade flag bit is set to the first flag 415.
  • the smart speaker M1 can restart the Internet of Things device and execute the startup boot program; execute detecting that the upgrade flag is the first flag, and execute step 408 to start the operating system and establish a network connection 409; detecting that it is not in the download mode , Start the at least one application 416.
  • a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by this embodiment of the application, the method may include the following steps:
  • the occupancy threshold may be determined in the following manner:
  • the determining the occupancy threshold by using the target resource and the total resource of the Internet of Things device may include: calculating the ratio of the target resource to the total resource of the Internet of Things device to obtain the upgrade task Occupancy ratio, calculate the difference between the integer 1 and the occupation ratio of the upgrade task to obtain the occupation threshold.
  • shutting down at least part of the application program includes: in response to the upgrade trigger message, if the resource occupation of the at least one application program The proportion of the total resources occupied by the Internet of Things device is greater than the corresponding occupancy threshold, and at least some applications are closed.
  • shutting down at least part of the application program may include: in response to the upgrade trigger message, If the resource occupancy of the at least one application is greater than the corresponding occupancy threshold, based on the occupancy threshold, re-determine the available resources of the at least one application; close at least part of the application so that the The resources occupied by the remaining application programs are less than the occupiable resources.
  • 505 Re-run the at least one application program.
  • the upgrade trigger message sent by the device management server can be detected. Thereafter, in response to the upgrade trigger message, if the resource occupation of the at least one application program is greater than the occupation threshold, at least part of the application program may be closed. By closing at least part of the application, some of the occupied resources in the IoT device can be released, so that the resources of the IoT device can complete the program to be upgraded without affecting the stable operation of the remaining part of the application.
  • a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by this embodiment of the application, the method may include the following steps:
  • 601 During the running process of at least one application program, detect an upgrade trigger message sent by the device management server.
  • the upgrade type includes full upgrade or incremental upgrade.
  • step 603 If the upgrade type is a full upgrade, release the resource occupation of the at least one application program to close the at least one application program. After that, step 606 is executed.
  • step 605 According to the resource occupation of the at least one application program and the target resource, release the resource occupation of at least part of the application program, so that the remaining resources in the Internet of Things device meet the demand of the target resource. After that, step 606 is executed.
  • the releasing the resource occupation of at least part of the application program according to the resource occupation of the at least one application program and the target resource, so that the remaining resources in the Internet of Things device meet the demand of the target resource may include : According to the total resources of the Internet of Things device and the target resources, calculate the occupable resources of the application in the Internet of Things device; release the resources occupied by at least part of the at least one application to make all The occupancy of remaining resources in the at least one application program is less than the occupable resources.
  • At least one application can be individually set to run levels. When at least part of the applications are closed, the corresponding applications can be closed in order from low to high according to the operating level of each application. , Until the remaining resources of the Internet of Things devices meet the resource requirements of the upgrade task.
  • the running level of the first application is level one
  • the running level of the second application is level two
  • the running level of the level one application is greater than that of the level two application
  • the run level of the level two application can be lower than that of the level one application.
  • the shutdown rule of the program run level is to close the second application first.
  • the remaining resources in the IoT device meet the resource requirements of the upgrade task, do not close the first application and start the download task; if the remaining resources in the IoT device meet the resource requirements of the upgrade task, the download task can be started; The resources do not meet the resource requirements of the upgrade task, and the first application program needs to be closed until the remaining resources in the IoT device meet the resource requirements of the upgrade task.
  • 606 Download the program to be upgraded from the upgrade server.
  • 607 Run the program to be upgraded to complete the upgrade task of the Internet of Things device.
  • the upgrade trigger message sent by the device management server can be detected, and the upgrade type of the corresponding upgrade task can be determined through the upgrade trigger message.
  • the upgrade type may be Including full upgrades and incremental upgrades.
  • the resource requirements for IoT devices may be high. Therefore, all applications can be closed to perform the upgrade task.
  • incremental upgrades the resource requirements for IoT devices are low. Therefore, you can Use the method of shutting down some upgrade resources to perform upgrade tasks.
  • different shutdown methods are used.
  • the upgrade process is more flexible and can reduce the number of times to close all applications, so as to maintain the operational status of the Internet of Things device, so that it can maintain high work efficiency.
  • a flowchart of another embodiment of a program upgrade method of an Internet of Things device provided by this embodiment of the application, the method may include the following steps:
  • the determining whether the resource occupation of the currently running application program satisfies the upgrade condition may include determining whether the resource occupation of the currently running application program is less than a corresponding occupancy threshold.
  • the occupancy threshold is determined based on the resources required by the upgrade task corresponding to the upgrade trigger message.
  • the occupancy threshold may be specifically determined by: determining the target resource required by the upgrade trigger message when the upgrade trigger message runs based on the upgrade trigger message; and determining the occupancy threshold by using the target resource and the total resources of the Internet of Things device.
  • the determining the occupancy threshold by using the target resource and the total resource of the Internet of Things device may include: calculating the ratio of the target resource to the total resource of the Internet of Things device to obtain the upgrade task Occupancy ratio, calculate the difference between the integer 1 and the occupation ratio of the upgrade task to obtain the occupation threshold.
  • step 704 If not satisfied, go back to step 702.
  • the upgrade trigger message sent by the device management server can be detected. After that, it can be judged whether the currently running application program meets the upgrade conditions. If it is satisfied, the program to be upgraded can be downloaded from the upgrade server; the program to be upgraded is run to complete the upgrade task of the IoT device, and if it is not satisfied, it can return to The step of judging whether the resource occupation of the currently running application program meets the upgrade condition is continued until the resource occupation of the currently running application program meets the upgrade condition. From the perspective of whether the resource occupancy of the currently running application program meets the upgrade conditions, the resource environment of the IoT device is monitored, so that the upgrade task is executed when the upgrade conditions are met. It avoids the phenomenon of system instability caused by the upgrade when the resource environment of the Internet of things equipment is poor, and the stability and effectiveness of the upgrade are improved.
  • the resource occupancy of IoT devices can be monitored according to a certain monitoring frequency.
  • the judging whether the resource occupancy of the currently running application meets the upgrade conditions may include:
  • the judging whether the resource occupation of the currently running application meets the upgrade condition based on the preset monitoring frequency may include: determining the monitoring time corresponding to each monitoring based on the preset monitoring frequency; when any monitoring time is reached , To determine whether the resource occupation of the currently running application program meets the upgrade conditions.
  • At least part of the application program may be closed, so that the resource occupation of the currently running application program meets the upgrade condition, thereby realizing the upgrade. If it is not met, returning to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition and continuing to execute may include:
  • the upgrade can be achieved by closing at least part of the currently running applications so that the resource display of the remaining applications after closing meets the upgrade conditions.
  • closing at least part of the application program may specifically be:
  • it can also be specifically: determining the target resources required for the upgrade task; according to the total resources of the Internet of Things device and the target resources, calculating the occupancy of the application in the Internet of Things device Resources; release the resource occupation of at least part of the currently running applications, so that the resource occupation of the remaining applications is less than the occupable resources.
  • FIG. 8 it is a schematic structural diagram of an embodiment of an apparatus for program upgrading of Internet of Things equipment provided by an embodiment of this application, and the apparatus may include:
  • the message detection module 801 is configured to detect the upgrade trigger message sent by the device management server during the running process of at least one application program.
  • the message response module 802 is configured to close at least part of the application based on the resource occupation of the at least one application in response to the upgrade trigger message.
  • the program download module 803 is used to download the program to be upgraded from the upgrade server.
  • the program upgrade module 804 is configured to run the program to be upgraded and complete the upgrade task of the Internet of Things device.
  • the program running module 805 is used to re-run the at least one application program.
  • the upgrade trigger message sent by the device management server can be detected during the operation of at least one application, and the upgrade trigger message can be based on at least one application.
  • the resources of the program are occupied, and at least part of the application programs are closed, so that the resources in the IoT device system can perform the upgrade task.
  • the program to be upgraded can be run to complete the upgrade task of the IoT device, and then at least one application can be rerun.
  • the IoT device completes the upgrade task, and reruns at least one application after the upgrade is completed to restore the system of the IoT device to a stable state, which can solve the system failure caused by the upgrade task and the main application running at the same time. Stable technical issues.
  • the message response module may include:
  • the first response unit is configured to respond to the upgrade trigger message and close all applications based on the resource occupation of the at least one application.
  • the program download module may include:
  • the mode switching unit is used to switch the Internet of Things device to a download mode to download the program to be upgraded from the upgrade server;
  • the device also includes:
  • the upgrade switching module is used to switch the Internet of Things device to the upgrade mode when detecting that the download of the program to be upgraded is completed;
  • the program upgrade module may include:
  • the first upgrade unit is configured to detect that the Internet of Things device is in an upgrade mode, run the program to be upgraded, and complete the upgrade task of the Internet of Things device.
  • the mode switching unit includes:
  • the first processing subunit is configured to set the Internet of Things device to a download mode and restart the Internet of Things device to switch the Internet of Things device to the download mode;
  • the second processing subunit is used to download the program to be upgraded from the upgrade server when detecting that the upgrade flag bit is the first flag.
  • the second processing subunit may include:
  • the first download module is configured to download the program to be upgraded from the upgrade server when detecting that the upgrade flag bit is the first flag when the boot program of the Internet of Things device is started.
  • the first download module may include:
  • the upgrade switching module includes:
  • the flag clearing unit is used for detecting that the downloading of the program to be upgraded is completed, clearing the download mode and setting the upgrade flag bit as the second flag;
  • the first restart unit is configured to restart the Internet of Things device
  • the first switching unit is used for confirming switching to the upgrade mode when detecting that the upgrade flag bit is the second flag.
  • the first switching unit may include:
  • the third processing subunit is used for confirming switching to the upgrade mode when detecting that the upgrade flag bit is the second flag when the boot program of the Internet of Things device is started.
  • the device may further include:
  • the flag setting module is used to set the upgrade flag bit as the first flag.
  • the program running module includes:
  • the second restart unit is configured to restart the Internet of Things device to re-run the at least one application.
  • the second restart unit may include:
  • the second restart subunit is used to run a restart instruction and start the boot program
  • the fourth processing subunit is used to detect that the upgrade flag is the first flag, start the operating system and establish a network connection;
  • the program start subunit is used to start the at least one application when it is detected that it is not in the download mode.
  • the message response module may include:
  • the second response unit is configured to respond to the upgrade trigger message and close at least part of the application if the resource occupation of the at least one application is greater than the corresponding occupancy threshold.
  • the message response module includes:
  • the type determining unit is used to determine the upgrade type of the upgrade task corresponding to the upgrade trigger message; wherein, the upgrade type includes a full upgrade or an incremental upgrade;
  • the second upgrade unit is configured to release the resource occupation of the at least one application program if the upgrade type is a full upgrade, so as to close the at least one application program;
  • the third upgrade unit is configured to determine a target resource matching the incremental upgrade if the upgrade type is an incremental upgrade; release at least part of the application according to the resource occupation of the at least one application and the target resource The resources of the program are occupied, so that the remaining resources in the Internet of Things device meet the requirements of the target resources.
  • the program download module may include:
  • the protocol transmission unit is used to download the program to be upgraded from the upgrade server based on the hypertext transmission security protocol.
  • the device further includes:
  • the task monitoring module is used to start a download monitoring task, and use the download monitoring task to monitor the download process of the program to be upgraded.
  • the program upgrade apparatus of the Internet of Things device described in FIG. 8 can execute the program upgrade method of the Internet of Things device described in the embodiments shown in FIGS. 1 to 6, and its implementation principles and technical effects will not be repeated.
  • the specific operations performed by the modules, units, and sub-units of the program upgrade apparatus in the foregoing embodiment have been described in detail in the embodiment of the method, and detailed description will not be given here.
  • an embodiment of the present application also provides a computer-readable storage medium that stores computer instructions stored thereon, and when the computer instructions are executed by one or more processors, cause the The program upgrade method of the Internet of Things device described in FIGS. 1 to 6 in any of the embodiments executed by one or more processors in the foregoing embodiments.
  • the device shown in FIG. 8 may be configured as an Internet of Things device.
  • FIG. 9 a schematic structural diagram of an Internet of Things device provided in an embodiment of this application.
  • the device may include:
  • the processing component 902 is used to:
  • At least one application detect an upgrade trigger message sent by the device management server; in response to the upgrade trigger message, close at least part of the application based on the resource occupation of the at least one application; from the upgrade server Download the program to be upgraded; run the program to be upgraded to complete the upgrade task of the Internet of Things device; re-run the at least one application program.
  • the upgrade trigger message sent by the device management server can be detected during the operation of at least one application, and the upgrade trigger message can be based on at least one application.
  • the resources of the program are occupied, and at least part of the application programs are closed, so that the resources in the IoT device system can perform the upgrade task.
  • the program to be upgraded can be run to complete the upgrade task of the IoT device, and then at least one application can be rerun.
  • the IoT device completes the upgrade task, and reruns at least one application after the upgrade is completed to restore the system of the IoT device to a stable state, which can solve the system failure caused by the upgrade task and the main application running at the same time. Stable technical issues.
  • the processing component in response to the upgrade trigger message, based on the resource occupation of the at least one application program, shutting down at least part of the application program may specifically be:
  • all applications are closed based on the resource occupation of the at least one application.
  • the processing component downloading the program to be upgraded from the upgrade server may specifically be:
  • the processing component runs the program to be upgraded and completes the upgrade task of the Internet of Things device, it may also specifically be:
  • the processing component runs the program to be upgraded, and completing the upgrade task of the Internet of Things device may specifically be:
  • the processing component switches the Internet of Things device to a download mode to download the program to be upgraded from the upgrade server, which may specifically be:
  • the program to be upgraded is downloaded from the upgrade server.
  • downloading the program to be upgraded from the upgrade server may specifically be:
  • the boot program of the Internet of Things device when it is detected that the upgrade flag is the first flag, the program to be upgraded is downloaded from the upgrade server.
  • downloading the program to be upgraded from the upgrade server may specifically be:
  • switching the Internet of Things device to the upgrade mode may specifically be:
  • confirming to switch to the upgrade mode may specifically be:
  • the processing component when the processing component detects that the IoT device is in the upgrade mode, it runs the program to be upgraded, and after completing the upgrade task of the IoT device, it may also specifically be:
  • re-running the at least one application by the processing component may specifically be:
  • the processing component restarting the Internet of Things device to re-run the at least one application program may specifically be:
  • the at least one application is started.
  • the processing component in response to the upgrade trigger message, based on the resource occupation of the at least one application program, shutting down at least part of the application program may specifically be:
  • the processing component in response to the upgrade trigger message, based on the resource occupation of the at least one application program, shutting down at least part of the application program may specifically be:
  • the upgrade type is a full upgrade, release the resource occupation of the at least one application program to close the at least one application program;
  • the downloading of the program to be upgraded from the upgrade server may specifically be:
  • the processing component downloads the program to be upgraded from the upgrade server, it may specifically be:
  • the Internet of Things device described in FIG. 9 can execute the program upgrade method of the Internet of Things device described in the embodiments shown in FIGS. 1 to 6, and its implementation principles and technical effects will not be described in detail.
  • the specific manner of operations performed by the processing components of the Internet of Things device in the foregoing embodiment has been described in detail in the embodiment of the method, and will not be elaborated here.
  • FIG. 10 it is a schematic structural diagram of an embodiment of an apparatus for program upgrading of Internet of Things equipment provided by an embodiment of this application, and the apparatus may include:
  • the message detection module 1001 is configured to detect the upgrade trigger message sent by the device management server during the running process of at least one application program;
  • the condition judgment module 1002 is used to judge whether the resource occupation of the currently running application program meets the upgrade condition
  • the first processing module 1003 is configured to download the program to be upgraded from the upgrade server if it is satisfied; run the program to be upgraded to complete the upgrade task of the Internet of Things device;
  • the second processing module 1004 is configured to return to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition if it is not satisfied, and continue execution.
  • condition judgment module may include:
  • the condition judgment unit is configured to judge whether the resource occupation of the currently running application program meets the upgrade condition based on the preset monitoring frequency.
  • the second processing module may include:
  • the resource processing unit is configured to, if not satisfied, close at least part of the application based on the resource occupation of the currently running application; return to the step of judging whether the resource occupation of the currently running application meets the upgrade condition and continue execution.
  • the upgrade can be achieved by closing at least part of the currently running applications so that the resource display of the remaining applications after closing meets the upgrade conditions.
  • the program upgrade apparatus for the Internet of Things device described in FIG. 10 can execute the program upgrade method for the Internet of Things device described in the embodiment shown in FIG. 7, and its implementation principles and technical effects will not be described in detail.
  • the specific operations performed by the modules, units, and sub-units of the program upgrade apparatus in the foregoing embodiment have been described in detail in the embodiment of the method, and detailed description will not be given here.
  • an embodiment of the present application also provides a computer-readable storage medium that stores computer instructions stored thereon, and when the computer instructions are executed by one or more processors, cause the The program upgrade method of the Internet of Things device described in FIG. 7 in any one of the embodiments executed by one or more processors in the above embodiments.
  • the device shown in FIG. 10 may be configured as an Internet of Things device.
  • FIG. 11 it is a schematic structural diagram of an Internet of Things device provided by an embodiment of this application.
  • the device may include: a storage component 1101 And processing component 1102; the storage component 1101 is used to store one or more computer instructions; the one or more computer instructions are called by the processing component 1102;
  • the processing component 1102 is used to:
  • At least one application program detect the upgrade trigger message sent by the device management server; determine whether the resource occupation of the currently running application program meets the upgrade conditions; if so, download the program to be upgraded from the upgrade server; run the For the program to be upgraded, complete the upgrade task of the Internet of Things device; if it is not satisfied, return to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition and continue execution.
  • the processing component judging whether the resource occupation of the currently running application program satisfies the upgrade condition may specifically be:
  • the Internet of Things device described in FIG. 11 can execute the program upgrade method of the Internet of Things device described in the embodiment shown in FIG. 7, and its implementation principles and technical effects will not be described in detail.
  • the specific operation performed by the processing component of the IoT device in the foregoing embodiment has been described in detail in the embodiment of the method, and will not be elaborated here.
  • the device embodiments described above are merely illustrative.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement without creative work.
  • each implementation manner can be implemented by adding a necessary general hardware platform, and of course, it can also be implemented by a combination of hardware and programs.
  • the above technical solution essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present invention can be used in one or more computer usable storage containing computer usable program codes.
  • the form of a computer program product implemented on a medium including but not limited to disk storage, CD-ROM, optical storage, etc.).
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent 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 computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, 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, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

Disclosed are a program upgrade method and apparatus for an Internet of Things device, and an Internet of Things device. The method comprises: during the operation of at least one application program, detecting an upgrade trigger message sent by a device management service end (101); in response to the upgrade trigger message, closing at least some application programs on the basis of the resource occupation of the at least one application program (102); downloading a program to be upgraded from an upgrade service end (103); operating the program to be upgraded to complete an upgrade task of an Internet of Things device (104); and re-operating the at least one application program (105). By means of the method, conflicts between operating application programs and upgrade tasks are reduced to improve upgrade efficiency and system stability.

Description

物联网设备的程序升级方法、装置及物联网设备Method and device for program upgrading of internet of things equipment and internet of things equipment
本申请要求2019年09月27日递交的申请号为201910926491.5、发明名称为“物联网设备的程序升级方法、装置及物联网设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on September 27, 2019 with the application number 201910926491.5 and the title of the invention "program upgrade method and device for Internet of Things equipment, and Internet of Things equipment", the entire content of which is incorporated herein by reference Applying.
技术领域Technical field
本发明涉及计算机技术领域,尤其涉及一种物联网设备的程序升级方法、装置以及物联网设备。The present invention relates to the field of computer technology, and in particular to a program upgrade method and device for Internet of Things equipment, and Internet of Things equipment.
背景技术Background technique
物联网是一个基于互联网、无线网、传统电信网等网络的信息载体,通过各种物联网设备可以实现智能化感知、识别、数据采集和设备管理等智能处理过程。物联网设备可以包括信息传感器、射频识别技术、全球定位系统、红外传感器、激光扫描器、车载设备、智能音箱等,利用物联网设备可以实时采集声音、光、电、热、图像、位置等各种需要的信息,从而实现智能化感知、识别和管理。物联网设备需要应用程序、操作系统、固件等程序的支撑才得以运行,而随着时间的推移,物联网设备中的程序存在解决漏洞、兼容性问题、增加交互方式或者提供更多功能支持等需求,需要将物联网设备程序升级。The Internet of Things is an information carrier based on networks such as the Internet, wireless networks, and traditional telecommunications networks. Intelligent processing processes such as intelligent perception, identification, data collection, and equipment management can be realized through various Internet of Things devices. IoT devices can include information sensors, radio frequency identification technology, global positioning systems, infrared sensors, laser scanners, on-board equipment, smart speakers, etc. The use of IoT devices can collect sound, light, electricity, heat, images, location, etc. in real time. This kind of information is needed to realize intelligent perception, recognition and management. Internet of Things devices need the support of applications, operating systems, firmware and other programs to run. As time goes by, programs in Internet of Things devices have solutions to vulnerabilities, compatibility issues, increase interaction methods, or provide more functional support, etc. Demand, need to upgrade the IoT device program.
现有技术中,在对物联网设备进行升级时,为了使设备正常运行,物联网设备通常是在物联网设备运行期间升级,此时,物联网设备中的主应用程序处于正常运行状态,升级任务也处于运行状态,主应用程序与升级任务同时启动,以在设备的正常运行时,完成设备程序的升级。In the prior art, when upgrading the Internet of Things device, in order to make the device operate normally, the Internet of Things device is usually upgraded during the operation of the Internet of Things device. At this time, the main application in the Internet of Things device is in a normal operating state. The task is also in the running state, and the main application and the upgrade task are started at the same time to complete the upgrade of the device program during the normal operation of the device.
但是,多数物联网设备的内存资源较小,例如,传感器的内存资源可能只有100K,如果仍然根据内存资源的使用状态同时处理主程序运行以及升级任务,容易出现下载速度下降或者主程序运行不稳定的问题,目前并没有一种有效方式可以解决该技术问题。However, the memory resources of most IoT devices are small. For example, the memory resources of sensors may only be 100K. If the main program operation and upgrade tasks are still processed simultaneously according to the usage status of the memory resources, the download speed is likely to decrease or the main program is unstable. There is currently no effective way to solve the technical problem.
发明内容Summary of the invention
有鉴于此,本发明实施例提供一种物联网设备的程序升级方法、装置以及物联网设备设备,用以解决现有技术中物联网设备同时处理主应用程序运行以及升级任务时出现的系统不稳定的技术问题。In view of this, the embodiments of the present invention provide a program upgrade method and device for an Internet of Things device, and an Internet of Things device to solve the system failure that occurs when the Internet of Things device simultaneously processes the main application program operation and the upgrade task in the prior art. Stable technical issues.
第一方面,本申请实施例提供一种物联网设备的程序升级方法,包括:In the first aspect, an embodiment of the present application provides a program upgrade method for an Internet of Things device, including:
在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;During the operation of at least one application program, detecting an upgrade trigger message sent by the device management server;
响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序;In response to the upgrade trigger message, close at least part of the application based on the resource occupation of the at least one application;
从升级服务端下载待升级程序;Download the program to be upgraded from the upgrade server;
运行所述待升级程序,完成所述物联网设备的升级任务;Run the program to be upgraded to complete the upgrade task of the Internet of Things device;
重新运行所述至少一个应用程序。Re-run the at least one application program.
第二方面,本申请实施例提供一种物联网设备的程序升级方法,包括:In the second aspect, an embodiment of the present application provides a program upgrade method for an Internet of Things device, including:
在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;During the operation of at least one application program, detecting an upgrade trigger message sent by the device management server;
判断当前运行的应用程序的资源占用是否满足升级条件;Determine whether the resource occupancy of the currently running application program meets the upgrade conditions;
如果满足,从升级服务端下载待升级程序;运行所述待升级程序,完成所述物联网设备的升级任务;If it is satisfied, download the program to be upgraded from the upgrade server; run the program to be upgraded to complete the upgrade task of the Internet of Things device;
如果不满足,返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行。If it is not satisfied, return to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition and continue to execute.
第三方面,本申请实施例提供一种物联网设备的程序升级装置,包括:In a third aspect, an embodiment of the present application provides a program upgrade apparatus for an Internet of Things device, including:
消息检测模块,用于在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;The message detection module is used to detect the upgrade trigger message sent by the device management server during the running process of at least one application;
消息响应模块,用于响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序;A message response module, configured to close at least part of the application based on the resource occupation of the at least one application in response to the upgrade trigger message;
程序下载模块,用于从升级服务端下载待升级程序;Program download module, used to download the program to be upgraded from the upgrade server;
程序升级模块,用于运行所述待升级程序,完成所述物联网设备的升级任务;The program upgrade module is used to run the program to be upgraded and complete the upgrade task of the Internet of Things device;
程序运行模块,用于重新运行所述至少一个应用程序。The program running module is used to re-run the at least one application program.
第四方面,本申请实施例提供一种物联网设备的程序升级装置,包括:In a fourth aspect, an embodiment of the present application provides a program upgrade apparatus for Internet of Things equipment, including:
消息检测模块,用于在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;The message detection module is used to detect the upgrade trigger message sent by the device management server during the running process of at least one application;
条件判断模块,用于判断当前运行的应用程序的资源占用是否满足升级条件;The condition judgment module is used to judge whether the resource occupation of the currently running application program meets the upgrade conditions;
第一处理模块,用于如果满足,从升级服务端下载待升级程序;运行所述待升级程序,完成所述物联网设备的升级任务;The first processing module is configured to download the program to be upgraded from the upgrade server if it is satisfied; run the program to be upgraded to complete the upgrade task of the Internet of Things device;
第二处理模块,用于如果不满足,返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行。The second processing module is configured to return to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition if it is not satisfied, and continue execution.
第五方面,本申请实施例提供一种物联网设备,包括:存储组件与处理组件;所述存储组件用于存储一条或多条计算机指令;所述一条或多条计算机指令被所述处理组件调用;In a fifth aspect, an embodiment of the present application provides an Internet of Things device, including: a storage component and a processing component; the storage component is used to store one or more computer instructions; the one or more computer instructions are used by the processing component transfer;
所述处理组件用于:The processing component is used for:
在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序;从升级服务端下载待升级程序;运行所述待升级程序,完成所述物联网设备的升级任务;重新运行所述至少一个应用程序。During the operation of at least one application, detect an upgrade trigger message sent by the device management server; in response to the upgrade trigger message, close at least part of the application based on the resource occupation of the at least one application; from the upgrade server Download the program to be upgraded; run the program to be upgraded to complete the upgrade task of the Internet of Things device; re-run the at least one application program.
第六方面,本申请实施例提供一种物联网设备,包括:存储组件与处理组件;所述存储组件用于存储一条或多条计算机指令;所述一条或多条计算机指令被所述处理组件调用;In a sixth aspect, an embodiment of the present application provides an Internet of Things device, including: a storage component and a processing component; the storage component is used to store one or more computer instructions; the one or more computer instructions are used by the processing component transfer;
所述处理组件用于:The processing component is used for:
在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;判断当前运行的应用程序的资源占用是否满足升级条件;如果满足,从升级服务端下载待升级程序;运行所述待升级程序,完成所述物联网设备的升级任务;如果不满足,返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行。During the operation of at least one application program, detect the upgrade trigger message sent by the device management server; determine whether the resource occupation of the currently running application program meets the upgrade conditions; if so, download the program to be upgraded from the upgrade server; run the For the program to be upgraded, complete the upgrade task of the Internet of Things device; if it is not satisfied, return to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition and continue execution.
本发明实施例,针对资源较少的物联网设备,可以在物联网设备的至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息,之后,可以响应于所述升级触发消息,基于至少一个应用程序的资源占用,关闭至少部分应用程序,从而可以使得物联网设备的系统环境能够满足升级需求,进而可以从升级服务端下载待升级程序。下载结束时,可以运行下载完毕的待升级程序,从而完成物联网设备的升级任务。在升级完毕之后,可以重新运行至少一个应用程序,以使物联网设备重新正常运行。通过关闭至少部分应用程序以使物联网设备的系统能够正常下载待升级程序并完成升级任务,从而可以解决升级任务与主应用程序同时运行时导致的系统不稳定的技术问题。In the embodiment of the present invention, for IoT devices with fewer resources, the upgrade trigger message sent by the device management server can be detected during the operation of at least one application of the IoT device, and then the upgrade trigger message can be responded to Based on the resource occupation of at least one application, at least part of the application is closed, so that the system environment of the Internet of Things device can meet the upgrade requirements, and the program to be upgraded can be downloaded from the upgrade server. At the end of the download, the downloaded program to be upgraded can be run to complete the upgrade task of the IoT device. After the upgrade is completed, at least one application can be re-run to make the IoT device run normally again. By closing at least part of the application program, the system of the IoT device can download the program to be upgraded and complete the upgrade task normally, thereby solving the technical problem of system instability caused by the simultaneous operation of the upgrade task and the main application program.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为本发明实施例提供的一种物联网设备的程序升级方法的一个实施例的流程图;FIG. 1 is a flowchart of an embodiment of a program upgrade method for an Internet of Things device provided by an embodiment of the present invention;
图2为本发明实施例提供的一种物联网设备的程序升级方法的又一个实施例的流程图;FIG. 2 is a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by an embodiment of the present invention;
图3为本发明实施例提供的一种物联网设备的程序升级方法的又一个实施例的流程图;FIG. 3 is a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by an embodiment of the present invention;
图4为本发明实施例提供的一个物联网设备的升级示例图;FIG. 4 is an example diagram of an upgrade of an Internet of Things device provided by an embodiment of the present invention;
图5为本发明实施例提供的一种物联网设备的程序升级方法的又一个实施例的流程图;FIG. 5 is a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by an embodiment of the present invention;
图6为本发明实施例提供的一种物联网设备的程序升级方法的又一个实施例的流程图;FIG. 6 is a flowchart of another embodiment of a program upgrade method for an Internet of Things device according to an embodiment of the present invention;
图7为本发明实施例提供的一种物联网设备的程序升级方法的又一个实施例的流程图;FIG. 7 is a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by an embodiment of the present invention;
图8为本发明实施例提供的一种物联网设备的程序升级装置的一个实施例的结构示意图;FIG. 8 is a schematic structural diagram of an embodiment of an apparatus for program upgrading of an Internet of Things device provided by an embodiment of the present invention;
图9为本发明实施例提供的一种物联网设备的一个实施例的结构示意图;FIG. 9 is a schematic structural diagram of an embodiment of an Internet of Things device provided by an embodiment of the present invention;
图10为本发明实施例提供的一种物联网设备的程序升级装置的一个实施例的结构示意图;FIG. 10 is a schematic structural diagram of an embodiment of an apparatus for program upgrading of an Internet of Things device provided by an embodiment of the present invention;
图11为本发明实施例提供的一种物联网设备的一个实施例的结构示意图。FIG. 11 is a schematic structural diagram of an embodiment of an Internet of Things device provided by an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义,“多种”一般包含至少两种,但是不排除包含至少一种的情况。The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms of "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, "multiple" Generally, it contains at least two types, but it does not exclude the inclusion of at least one type.
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" used in this text is only an association relationship describing the associated objects, indicating that there can be three types of relationships, for example, A and/or B can mean that A alone exists, and both A and A exist at the same time. B, there are three cases of B alone. In addition, the character "/" in this text generally indicates that the associated objects before and after are in an "or" relationship.
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于识别”。类似地,取决于语境,短语“如果确定”或“如果识别(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当识别(陈述的条件或事件)时”或“响应于识别(陈述的条件或事件)”。Depending on the context, the words "if" and "if" as used herein can be interpreted as "when" or "when" or "in response to determination" or "in response to recognition". Similarly, depending on the context, the phrase "if determined" or "if recognized (statement or event)" can be interpreted as "when determined" or "in response to determination" or "when recognized (statement or event) )" or "in response to identification (statement or event)".
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的商品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种商品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的商品或者系统中还存在另外的相同要素。It should also be noted that the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a commodity or system that includes a series of elements not only includes those elements, but also includes those elements that are not explicitly listed. Other elements of, or also include elements inherent to this kind of commodity or system. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the commodity or system that includes the element.
本申请实施例可以应用于物联网设备中,通过对物联网设备中系统资源的占用情况进行分析,以提供能够正常升级的条件,使得升级能够及时完成,并及时恢复主应用程序的运行,从而避免出现下载升级导致的运行系统不稳定问题。The embodiments of this application can be applied to Internet of Things devices, by analyzing the occupancy of system resources in the Internet of Things devices to provide conditions that can be upgraded normally, so that the upgrade can be completed in time, and the operation of the main application program can be resumed in time, thereby Avoid running system instability problems caused by downloading and upgrading.
现有技术中,物联网设备的硬件资源、内存资源可能是一定的,且不够大。在物联网设备至少一个应用程序运行的过程中,可以针对物联网设备中的程序进行升级,例如,应用程序的普通升级、版本的升级或者固件升级等等。在升级过程中,为了确保物联网设备与升级父亲端之间的网络连接的安全性以及可靠性,通常需要物联网设备与升级服务端通过安全的HTTPS(Hypertext transfer protocol Secure,超文本传输安全协议)下载待升级程序,也即是安装包。但是,由于HTTPS的下载升级过程中,需要增加证书交换以及握手验证的过程,对系统内存资源的消耗更大。因此,资源受限的物联网设备往往无法使用HTTPS进行下载升级。并且,在一些资源受限的物联网设备中如果同时进行应用程序的运行以及升级任务的下载时,由于资源受限,还容易出现物联网设备的操作系统不稳定的技术问题。为了解决上述技术问题,发明人提出了本申请的技术方案。In the prior art, the hardware resources and memory resources of the Internet of Things device may be fixed and not large enough. During the running of at least one application program of the Internet of Things device, the program in the Internet of Things device may be upgraded, for example, a general upgrade of an application program, a version upgrade, or a firmware upgrade, and so on. During the upgrade process, in order to ensure the security and reliability of the network connection between the IoT device and the upgraded father, it is usually necessary for the IoT device and the upgrade server to pass a secure HTTPS (Hypertext Transfer Protocol Secure, Hypertext Transfer Security Protocol). ) Download the program to be upgraded, which is the installation package. However, since the download and upgrade process of HTTPS needs to increase the process of certificate exchange and handshake verification, the consumption of system memory resources is greater. Therefore, resource-constrained IoT devices are often unable to download and upgrade using HTTPS. Moreover, in some resource-constrained IoT devices, if the application program is run and the upgrade task is downloaded at the same time, due to the limited resources, the technical problem of the instability of the operating system of the IoT device is prone to occur. In order to solve the above technical problems, the inventor proposed the technical solution of this application.
本申请实施例中,针对资源受限的物联网设备,可以在至少一个应用程序运行的过程中,检测设备管理服务端发送的升级触发消息,响应于该升级触发消息,可以基于至少一个应用程序的资源占用,关闭至少部分应用程序,以使得物联网设备系统中的资源能够执行升级任务。从升级服务端下载待升级程序之后,可以运行该待升级程序,完成物联网设备的升级任务,之后,可以重新运行至少一个应用程序。此时,物联网设备完 成升级任务,且在升级结束之后重新运行至少一个应用程序,以使物联网设备的系统恢复到稳定状态,从而可以解决升级任务与主应用程序同时运行时导致的系统不稳定的技术问题。In the embodiment of the present application, for resource-constrained IoT devices, the upgrade trigger message sent by the device management server can be detected during the operation of at least one application program, and the response to the upgrade trigger message can be based on the at least one application program. Occupies resources, close at least part of the application, so that the resources in the IoT device system can perform the upgrade task. After downloading the program to be upgraded from the upgrade server, the program to be upgraded can be run to complete the upgrade task of the IoT device, and then at least one application can be rerun. At this time, the IoT device completes the upgrade task, and reruns at least one application after the upgrade is completed to restore the system of the IoT device to a stable state, which can solve the system failure caused by the upgrade task and the main application running at the same time. Stable technical issues.
下面将结合附图对本申请实施例进行详细描述。The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
如图1所示,为本申请实施例提供的一种物联网设备的程序升级方法的一个实施例的流程图,所述方法可以包括以下几个步骤:As shown in FIG. 1, a flowchart of an embodiment of a program upgrade method for an Internet of Things device provided by an embodiment of this application, the method may include the following steps:
101:在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息。101: During the running process of at least one application program, detect an upgrade trigger message sent by the device management server.
本申请实施例可以应用于物联网设备中,所述物联网设备可以指资源受限的电子设备,具体可以指内存资源小于设置的内存阈值的电子设备。The embodiments of the present application may be applied to Internet of Things devices. The Internet of Things devices may refer to electronic devices with limited resources, and specifically may refer to electronic devices with memory resources less than a set memory threshold.
物联网设备在正常运行时,需要多个程序的支持,例如可以包括:引导程序(Bootloader)、OS(operating system、操作系统)、定时程序以及网络连接程序等,对于某些特定功能的物联网设备,例如,图像传感器、声音传感器等,还可以包括具有针对用户提供某些特定功能的应用程序,例如,展示图像的应用程序、为用户输出声音的应用程序等。When IoT devices are running normally, they need the support of multiple programs. For example, they can include: Bootloader, OS (operating system, operating system), timing program, and network connection program, etc. For some specific functions of the Internet of Things Devices, for example, image sensors, sound sensors, etc., may also include applications that provide certain functions for users, for example, applications that display images, applications that output sounds for users, and so on.
设备管理服务端可以用于提供计算服务的设备,例如可以是个人计算机、超级计算机、笔记本电脑等设备构成,还可以是云服务器构成,本申请实施例对所述设备管理服务端的具体类型不作出过多限定。The device management server can be used to provide computing services. For example, it can be composed of personal computers, supercomputers, laptops, and other devices, or it can be composed of cloud servers. The embodiment of the application does not make specific types of device management servers. Too much restriction.
设备管理服务端是指用于对物联网设备进行管理的服务端,通常可以对物联网设备的服务请求进行响应,并进行处理,还可以对物联网设备中的应用程序进行管理控制。在一些实施例中,当物联网设备中的用户应用程序进行版本更新或者升级时,设备管理服务端可以由第三方服务器构成,该第三方服务器具体可以指开发该用户应用程序的开发者为这个用户应用程序设置的访问服务器。The device management server refers to the server used to manage the Internet of Things devices. It can usually respond to and process service requests from the Internet of Things devices, and can also manage and control applications in the Internet of Things devices. In some embodiments, when the user application in the Internet of Things device is version updated or upgraded, the device management server may be composed of a third-party server, and the third-party server may specifically refer to the developer who developed the user application. The access server set by the user application.
设备管理服务端判断物联网设备存在升级需求时,可以发送升级触发消息至物联网设备。所述升级触发消息中可以包括待升级程序的程序名称以及下载地址等信息,通过升级触发消息可以确定下载地址,从而从升级服务端下载待升级程序。When the device management server determines that there is an upgrade requirement for the IoT device, it can send an upgrade trigger message to the IoT device. The upgrade trigger message may include information such as the program name and download address of the program to be upgraded, and the download address can be determined through the upgrade trigger message, so that the program to be upgraded can be downloaded from the upgrade server.
所述至少一个应用程序可以指所述物联网设备中的主应用(MAIN APP Task)模块,主应用模块是指针对用户制定的具有特定应用目地的软件模块,通过主应用模块主要为用户可以在物联网设备上使用的程序,不包括物联网设备的操作系统、网络模块等。The at least one application program may refer to a main application (MAIN APP Task) module in the Internet of Things device. The main application module refers to a software module with a specific application purpose formulated by the user. The programs used on IoT devices do not include the operating systems and network modules of IoT devices.
102:响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序。102: In response to the upgrade trigger message, close at least part of the application based on the resource occupation of the at least one application.
物联网设备中的至少一个应用程序在运行过程中会消耗该物联网设备的资源,其中,可以包括硬件资源或内存资源。由于物联网设备的资源较小,如果至少一个应用程序的资源占用较大,导致物联网设备的剩余资源较少,不能够及时进行升级,或者升级程序与至少一个应用程序的运行存在资源争夺现象。例如,假设物联网设备的内存资源为100K,而至少一个应用程序占用的资源为60K,剩余资源为40K,但是若升级任务需要60K的内存资源,由于剩余资源不够,不能完成升级,若升级任务需要38K的内存资源,在至少一个应用程序以及升级任务同时进行升级时需要使用98K的内存资源,可以进行任务升级,但是由于内存资源消耗过多,容易出现资源使用冲突,资源争抢等现象,导致物联网设备出现不稳定现象。At least one application in the Internet of Things device consumes resources of the Internet of Things device during the running process, which may include hardware resources or memory resources. Due to the small resources of the IoT device, if at least one application has a large resource occupancy, the remaining resources of the IoT device are small, and the upgrade cannot be performed in time, or there is a resource contention between the upgrade program and the operation of at least one application. . For example, suppose the memory resource of the IoT device is 100K, and the resource occupied by at least one application is 60K, and the remaining resource is 40K, but if the upgrade task requires 60K of memory resources, the upgrade cannot be completed due to insufficient remaining resources. If the upgrade task is 38K of memory resources are required. 98K of memory resources are required to upgrade at least one application and the upgrade task at the same time. Task upgrades can be performed. However, due to excessive memory resource consumption, resource conflicts and resource contention are prone to occur. Lead to instability of IoT devices.
在响应升级触发消息之后,可以开始启动升级。此时可以基于至少一个应用程序的资源占用,关闭至少部分应用程序,通过至少部分应用程序的关闭,可以使得物联网设备中的部分资源被解除占用,提高了可应用资源的供应量,物联网设备即可以在关闭了至少部分应用程序的基础上进行升级。After responding to the upgrade trigger message, the upgrade can be started. At this time, based on the resource occupation of at least one application, at least part of the application can be closed. By closing at least part of the application, part of the resources in the IoT device can be unoccupied, and the supply of applicable resources can be increased. The device can be upgraded after closing at least some applications.
103:从升级服务端下载待升级程序。103: Download the program to be upgraded from the upgrade server.
可选地,所述响应升级触发消息中可以包括待升级程序的下载地址,可以基于待升级程序的下载地址,从服务端下载待升级程序。Optionally, the response to the upgrade trigger message may include the download address of the program to be upgraded, and the program to be upgraded may be downloaded from the server based on the download address of the program to be upgraded.
可选地,所述响应升级触发消息中可以包括待升级程序的下载提示信息,物联网设备可以根据响应升级触发消息中的下载提示信息,确定待升级程序的下载地址,从而基于下载地址,从升级服务端下载待升级程序。Optionally, the response to the upgrade trigger message may include download prompt information of the program to be upgraded, and the Internet of Things device may determine the download address of the program to be upgraded according to the download prompt information in the response upgrade trigger message, so that based on the download address, The upgrade server downloads the program to be upgraded.
在一些实施例中,所述从升级服务端下载待升级程序具体可以是:基于下载地址,向所述下载地址对应的升级服务端发送下载请求,基于所述下载请求建立与所述升级服务端的握手连接,连接完成,根据已建立的握手连接,与所述升级服务端交换证书之后,可以从升级服务端下载待升级程序。In some embodiments, the downloading of the program to be upgraded from the upgrade server may specifically be: based on the download address, sending a download request to the upgrade server corresponding to the download address, and establishing a connection with the upgrade server based on the download request. After the handshake connection is completed, after the certificate is exchanged with the upgrade server according to the established handshake connection, the program to be upgraded can be downloaded from the upgrade server.
104:运行所述待升级程序,完成所述物联网设备的升级任务。104: Run the program to be upgraded to complete the upgrade task of the Internet of Things device.
物联网设备在下载待升级程序之后,可以启动该待升级程序,以完成所述物联网设备的升级任务。After downloading the program to be upgraded, the Internet of Things device can start the program to be upgraded to complete the upgrade task of the Internet of Things device.
105:重新运行所述至少一个应用程序。105: Re-run the at least one application program.
所述重新运行所述至少一个应用程序可以包括重新启动被关闭的至少部分应用程序,以重新运行至少一个应用程序。The re-running the at least one application program may include restarting at least part of the closed application program to re-run the at least one application program.
本申请实施例中,通过针对资源受限的物联网设备,可以在至少一个应用程序运行 的过程中,检测设备管理服务端发送的升级触发消息,响应于该升级触发消息,可以基于至少一个应用程序的资源占用,关闭至少部分应用程序,以使得物联网设备系统中的资源能够执行升级任务。从升级服务端下载待升级程序之后,可以运行该待升级程序,完成物联网设备的升级任务,之后,可以重新运行至少一个应用程序。此时,物联网设备完成升级任务,且在升级结束之后重新运行至少一个应用程序,以使物联网设备的系统恢复到稳定状态,从而可以解决升级任务与主应用程序同时运行时导致的系统不稳定的技术问题。In the embodiment of the present application, by targeting resource-constrained IoT devices, the upgrade trigger message sent by the device management server can be detected during the operation of at least one application, and the upgrade trigger message can be based on at least one application. The resources of the program are occupied, and at least part of the application programs are closed, so that the resources in the IoT device system can perform the upgrade task. After downloading the program to be upgraded from the upgrade server, the program to be upgraded can be run to complete the upgrade task of the IoT device, and then at least one application can be rerun. At this time, the IoT device completes the upgrade task, and reruns at least one application after the upgrade is completed to restore the system of the IoT device to a stable state, which can solve the system failure caused by the upgrade task and the main application running at the same time. Stable technical issues.
为了解决下载任务与至少一个应用程序同时运行产生的资源冲突问题,可以关闭所有应用程序,增加系统中的可利用资源,从而确保程序升级能够正常完成。作为一个实施例,所述响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序可以包括:In order to solve the resource conflict problem caused by the download task and at least one application program running at the same time, all applications can be closed to increase the available resources in the system, so as to ensure that the program upgrade can be completed normally. As an embodiment, in response to the upgrade trigger message, shutting down at least part of the application based on the resource occupation of the at least one application may include:
响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭所有应用程序。In response to the upgrade trigger message, all applications are closed based on the resource occupation of the at least one application.
为了确保下载的安全性,所述从升级服务端下载待升级程序可以包括:In order to ensure the security of the download, the downloading of the program to be upgraded from the upgrade server may include:
基于超文本传输安全协议,从升级服务端下载待升级程序。Based on the hypertext transmission security protocol, download the program to be upgraded from the upgrade server.
所述超文本传输安全协议由于需要资源较多,在未关闭至少部分应用程序时,不可以使用或者受资源限制影响而使用效果不佳,本申请中通过关闭至少部分应用程序可以使得超文本传输安全协议得以使用,以提高下载的安全性,从而提高升级任务的安全性。Because the hypertext transmission security protocol requires more resources, it cannot be used when at least part of the application is not closed or is affected by resource restrictions and has a poor use effect. In this application, closing at least part of the application can enable hypertext transmission The security protocol can be used to improve the security of the download, thereby improving the security of the upgrade task.
如图2所示,为本申请实施例提供的一种物联网设备的程序升级方法的又一个实施例的流程图,所述方法可以包括以下几个步骤:As shown in FIG. 2, a flowchart of another embodiment of a program upgrade method of an Internet of Things device provided by this embodiment of the application, the method may include the following steps:
201:在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息。201: During the running process of at least one application program, detect an upgrade trigger message sent by the device management server.
本申请实施例中的部分步骤的处理过程与图1所示的实施例中的部分内容相同,在此不再赘述。The processing process of some steps in the embodiment of the present application is the same as part of the content in the embodiment shown in FIG. 1, and will not be repeated here.
202:响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭所有应用程序。202: In response to the upgrade trigger message, close all applications based on the resource occupation of the at least one application.
203:切换所述物联网设备至下载模式,以从升级服务端下载待升级程序。203: Switch the Internet of Things device to the download mode to download the program to be upgraded from the upgrade server.
作为一种可能的实现方式,可以通过执行模式指令,以切换物联网设备至下载模式,从升级服务端下载待升级程序。As a possible implementation, the mode command can be executed to switch the Internet of Things device to the download mode, and the program to be upgraded can be downloaded from the upgrade server.
切换物联网设备至下载模式时,需要物联网设备不处于升级模式。因此,所述切换所述物联网设备至下载模式时,还可以包括:设置升级标志位为第一标志,重启所述物 联网设备,检测所述升级标志位为第一标志时,确定物理网设备切换至下载模式,以从升级服务端下载待升级程序。When switching the IoT device to the download mode, the IoT device needs to be not in the upgrade mode. Therefore, when switching the Internet of Things device to the download mode, it may also include: setting the upgrade flag bit as the first flag, restarting the Internet of Things device, and when detecting that the upgrade flag bit is the first flag, determining the physical network The device switches to the download mode to download the program to be upgraded from the upgrade server.
204:检测所述待升级程序下载完成时,切换所述物联网设备至升级模式。204: When it is detected that the download of the program to be upgraded is completed, switch the Internet of Things device to an upgrade mode.
检测所述待升级程序完成具体可以是检测所述待升级程序接收到所述升级服务端发送的结束指令,即可以确定所述待升级程序下载完成。Detecting the completion of the program to be upgraded may specifically be detecting that the program to be upgraded receives an end instruction sent by the upgrade server to determine that the download of the program to be upgraded is completed.
切换所述物联网设备至升级模式具体可以包括:检测所述待升级程序下载完成时,设置升级标志位为第二标志,重启物联网设备,并检测所述升级标志位为第二标志时,确定物联网设备切换至升级模式。Switching the Internet of Things device to the upgrade mode may specifically include: when detecting that the download of the program to be upgraded is completed, setting the upgrade flag to the second flag, restarting the Internet of Things device, and detecting that the upgrade flag is the second flag, Make sure that the IoT device is switched to the upgrade mode.
在检测所述待升级程序下载完成时,切换所述物联网设备至升级模式具体可以包括在检测所述待升级程序下载完成时,清除所述下载模式,并切换所述物联网设备至升级模式。When it is detected that the download of the program to be upgraded is completed, switching the Internet of Things device to the upgrade mode may specifically include clearing the download mode when it is detected that the download of the program to be upgraded is completed, and switching the Internet of Things device to the upgrade mode .
205:检测所述物联网设备处于升级模式时,运行所述待升级程序,完成所述物联网设备的升级任务。205: When detecting that the Internet of Things device is in an upgrade mode, run the program to be upgraded to complete the upgrade task of the Internet of Things device.
所述物联网处理升级模式时,也即检测到升级标志位为第二标志时,可以运行待升级程序,完成所述物联网设备的升级任务。When the Internet of Things processes the upgrade mode, that is, when it is detected that the upgrade flag is the second flag, the program to be upgraded can be run to complete the upgrade task of the Internet of Things device.
升级标志位可以指用于标识升级模式的变量,通过升级标志位的设置可以判断当前是否可以对物联网设备的程序进行升级。例如,所述升级标志位可以通过表示为整型变量flag(标志),为flag设置的第一标志具体可以指flag等于0;为flag设置的第二标志具体可以指flag等于1。在升级标志位为第一标志时,未处于升级状态,不执行物联网设备的待升级程序。在升级标志位为第二标志时,执行对物联网设备的升级程序,完成对物联网设备的升级。The upgrade flag bit may refer to a variable used to identify the upgrade mode. Through the setting of the upgrade flag bit, it can be determined whether the program of the Internet of Things device can be upgraded currently. For example, the upgrade flag bit may be expressed as an integer variable flag (flag), the first flag set for flag may specifically mean that flag is equal to 0; the second flag set for flag may specifically mean that flag is equal to 1. When the upgrade flag is the first flag, it is not in the upgrade state, and the program to be upgraded for the Internet of Things device is not executed. When the upgrade flag is the second flag, the upgrade procedure for the Internet of Things device is executed to complete the upgrade of the Internet of Things device.
206:重新运行所述至少一个应用程序。206: Re-run the at least one application program.
本申请实施例中,通过设置下载模式,以使得物联网设备可以明确当前运行环境,从而根据当前运行环境,下载待升级程序,下载成功之后可以切换所述物联网设备至升级模式,检测所述物联网设备处于升级模式时,可以运行待升级程序,完成所述物联网设备的升级任务。在这一过程中,通过模式的作用可以明确执行的内容,以提高升级效率。In the embodiment of this application, the download mode is set so that the current operating environment of the Internet of Things device can be clarified, so that the program to be upgraded can be downloaded according to the current operating environment. After the download is successful, the Internet of Things device can be switched to the upgrade mode to detect the When the Internet of Things device is in the upgrade mode, the program to be upgraded can be run to complete the upgrade task of the Internet of Things device. In this process, the content of execution can be clarified through the role of the model, so as to improve the upgrade efficiency.
作为一个实施例,所述切换所述物联网设备至下载模式,以从升级服务端下载待升级程序可以包括:As an embodiment, the switching the Internet of Things device to the download mode to download the program to be upgraded from the upgrade server may include:
设置所述物联网设备为下载模式并重启所述物联网设备,以切换所述物联网设备至 下载模式。Set the Internet of Things device to the download mode and restart the Internet of Things device to switch the Internet of Things device to the download mode.
检测升级标志位为第一标志时,从升级服务端下载待升级程序。When it is detected that the upgrade flag is the first flag, the program to be upgraded is downloaded from the upgrade server.
物联网设备中下载模式的开启之后,可以通过重启的方式,使物联网设备由正常运行模式切换至下载模式,重启之后,处于下载模式的物联网设备即可以开始下载待升级程序。在下载模式下,升级标志位为第一标志时,可以从升级服务端下载待升级程序。由于采用重启的方式,物联网设备中的应用程序关闭,将应用程序与下载过程进行了隔离,以确保下载效率。After the download mode of the Internet of Things device is turned on, the Internet of Things device can be switched from the normal operation mode to the download mode by restarting. After the restart, the Internet of Things device in the download mode can start to download the program to be upgraded. In the download mode, when the upgrade flag is the first flag, the program to be upgraded can be downloaded from the upgrade server. Due to the restart method, the application in the Internet of Things device is closed, and the application is isolated from the download process to ensure download efficiency.
由于物联网设备的至少一个应用程序中按照启动顺序的先后顺序排列,具体可以包括:启动程序、操作系统、网络模块、用户应用程序等。不同的应用程序具备不同的功能。而启动程序是为了将至少一个应用程序与升级任务完全隔离以执行,可以启动阶段将升级任务与至少一个应用程序在物联网设备进行隔离。Since at least one application program of the Internet of Things device is arranged in the order of startup sequence, it may specifically include: startup program, operating system, network module, user application program, and so on. Different applications have different functions. The startup program is to completely isolate at least one application from the upgrade task for execution, and the upgrade task and at least one application can be isolated on the IoT device during the startup phase.
作为一种可能的实现方式,所述检测升级标志位为第一标志时,从升级服务端下载待升级程序可以包括:As a possible implementation, when the detecting that the upgrade flag is the first flag, downloading the program to be upgraded from the upgrade server may include:
在所述物联网设备的引导程序启动时,检测所述升级标志位为第一标志时,从升级服务端下载待升级程序。When the boot program of the Internet of Things device is started, when it is detected that the upgrade flag is the first flag, the program to be upgraded is downloaded from the upgrade server.
本申请实施例中,在物联网设备启动引导程序之后,即可以开始进行待升级程序的下载,以使得物联网设备能够在引导程序启动其他程序不启动的情况下即可以开始进行待升级程序的下载,以实现升级任务与用户应用、操作系统等程序的隔离,在升级结束之后,再启动物联网设备的至少一个应用程序即可,从而确保应用程序的正常运行,以避免出现因下载任务以及用户应用同时执行产生资源争夺而导致系统运行不稳定、升级任务不稳定的问题。In the embodiment of the present application, after the IoT device starts the boot program, the download of the program to be upgraded can be started, so that the IoT device can start the program to be upgraded when the boot program starts other programs but does not start. Download to isolate the upgrade task from user applications, operating systems, and other programs. After the upgrade is complete, you can start at least one application of the IoT device to ensure the normal operation of the application to avoid downloading tasks and Simultaneous execution of user applications results in resource contention, resulting in unstable system operation and unstable upgrade tasks.
进一步,可选地,所述在所述物联网设备的引导程序启动时,检测所述升级标志位为第一标志时,从升级服务端下载待升级程序可以包括:Further, optionally, when detecting that the upgrade flag is the first flag when the boot program of the Internet of Things device is started, downloading the program to be upgraded from the upgrade server may include:
在所述物联网设备的引导程序启动时,检测所述升级标志位为第一标志时,运行所述物联网设备的操作系统单元。When the boot program of the Internet of Things device is started, when it is detected that the upgrade flag is the first flag, the operating system unit of the Internet of Things device is run.
检测与所述升级服务端的网络连接已完成时,检测所述物联网设备为下载模式时,从所述升级服务端下载待升级程序。When it is detected that the network connection with the upgrade server is completed, and when it is detected that the Internet of Things device is in the download mode, download the program to be upgraded from the upgrade server.
在检测升级标志位为第一标志时,可以启动待升级服务的下载任务,此时即可以进入操作系统的启动、网络连接成功时,即可以开始进行程序下载。When it is detected that the upgrade flag is the first flag, the download task of the service to be upgraded can be started. At this time, the startup of the operating system can be entered, and the program download can be started when the network connection is successful.
作为一种可能的实现方式,所述检测所述待升级程序下载完成时,切换所述物联网 设备至升级模式可以包括:As a possible implementation manner, when detecting that the download of the program to be upgraded is completed, switching the Internet of Things device to the upgrade mode may include:
检测所述待升级程序下载完成时,清除所述下载模式并设置升级标志位为第二标志;When detecting that the download of the program to be upgraded is completed, clear the download mode and set the upgrade flag bit as the second flag;
重启所述物联网设备;Restart the Internet of Things device;
检测所述升级标志位为第二标志时,确认切换至升级模式。When detecting that the upgrade flag bit is the second flag, confirm switching to the upgrade mode.
在物联网设备进入升级模式之后,可以运行所述待升级程序,完成所述物联网设备的升级任务。After the Internet of Things device enters the upgrade mode, the program to be upgraded can be run to complete the upgrade task of the Internet of Things device.
进一步,可选地,所述检测所述升级标志位为第二标志时,确认切换至升级模式包括:Further, optionally, when detecting that the upgrade flag bit is the second flag, confirming the switch to the upgrade mode includes:
在所述物联网设备的引导程序启动时,检测所述升级标志位为第二标志时,确认切换至升级模式。When the boot program of the Internet of Things device is started, when it is detected that the upgrade flag bit is the second flag, it is confirmed to switch to the upgrade mode.
在某些实施例中,所述检测所述物联网设备处于升级模式时,运行所述待升级程序,完成所述物联网设备的升级任务之后,所述方法还可以包括:In some embodiments, when detecting that the IoT device is in the upgrade mode, running the program to be upgraded, and after completing the upgrade task of the IoT device, the method may further include:
设置所述升级标志位为第一标志。Set the upgrade flag bit as the first flag.
作为一个实施例,所述重新运行所述至少一个应用程序可以包括:As an embodiment, the re-running the at least one application program may include:
重启所述物联网设备,以重新运行所述至少一个应用程序。Restart the Internet of Things device to re-run the at least one application.
在某些实施例中,所述重启所述物联网设备,以重新运行所述至少一个应用程序可以包括:In some embodiments, the restarting the Internet of Things device to re-run the at least one application may include:
运行重启指令,启动引导程序;Run the restart command to start the boot program;
检测升级标志位为第一标志时,启动操作系统并建立网络连接;When detecting that the upgrade flag is the first flag, start the operating system and establish a network connection;
检测未处于下载模式时,启动所述至少一个应用程序。When it is detected that it is not in the download mode, the at least one application is started.
本申请中所述的重启物联网设备具体可以指运行重启(Reboot)指令,以重启所述物联网设备。The restarting of the Internet of Things device described in this application may specifically refer to running a restart (Reboot) instruction to restart the Internet of Things device.
如图3所示,为本申请实施例提供的一种物联网设备的程序升级方法的又一个实施例的流程图,所述方法可以包括以下几个步骤:As shown in FIG. 3, a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by this embodiment of the application, the method may include the following steps:
301:在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息。301: During the running process of at least one application program, detect an upgrade trigger message sent by the device management server.
302:响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭所有应用程序。302: In response to the upgrade trigger message, close all applications based on the resource occupation of the at least one application.
303:设置所述物联网设备为下载模式并重启,以切换所述物联网设备至下载模式;303: Set the Internet of Things device to download mode and restart to switch the Internet of Things device to download mode;
304:在所述物联网设备的引导程序启动时,检测所述升级标志位为第一标志时,运行所述物联网设备的操作系统单元。304: When the boot program of the Internet of Things device is started, when it is detected that the upgrade flag bit is the first flag, run the operating system unit of the Internet of Things device.
305:检测与所述升级服务端的网络连接已完成时,检测所述物联网设备为下载模式时,启动监控任务,从所述升级服务端下载待升级程序并利用所述监控任务监控所述待升级程序的下载过程。305: When it is detected that the network connection with the upgrade server is completed, when it is detected that the Internet of Things device is in the download mode, a monitoring task is started, the program to be upgraded is downloaded from the upgrade server, and the monitoring task is used to monitor the waiting The download process of the upgrade program.
在从升级服务端下载待升级程序时可以基于超文本传输安全协议,从升级服务端下载待升级程序,以确保下载的安全性。When downloading the program to be upgraded from the upgrade server, it is possible to download the program to be upgraded from the upgrade server based on the hypertext transmission security protocol to ensure the security of the download.
306:检测所述待升级程序下载完成时,清除所述下载模式并设置升级标志位为第二标志;306: When detecting that the download of the program to be upgraded is completed, clear the download mode and set the upgrade flag bit as the second flag;
307:重启所述物联网设备。307: Restart the Internet of Things device.
308:在所述物联网设备的引导程序启动时,检测所述升级标志位为第二标志时,确认切换至升级模式。308: When the boot program of the Internet of Things device is started, when it is detected that the upgrade flag bit is the second flag, confirm to switch to the upgrade mode.
309:检测所述物联网设备处于升级模式时,运行所述待升级程序,完成所述物联网设备的升级任务。309: When detecting that the Internet of Things device is in an upgrade mode, run the program to be upgraded to complete the upgrade task of the Internet of Things device.
310:设置所述升级标志位为第一标志。310: Set the upgrade flag bit as the first flag.
311:重启所述物联网设备,以重新运行所述至少一个应用程序。311: Restart the Internet of Things device to re-run the at least one application.
所述重启所述物联网设备,以重启运行所述至少一个应用程序可以包括:The restarting the Internet of Things device to restart running the at least one application program may include:
重启所述物联网设备,启动引导程序;检测所述升级标志位为第一标志时,启动操作系统并建立网络连接;检测未处于下载模式时,启动所述至少一个应用程序。Restart the Internet of Things device and start the boot program; when it is detected that the upgrade flag is the first flag, start the operating system and establish a network connection; when it is detected that it is not in the download mode, start the at least one application program.
本申请实施例中的部分步骤的处理过程与图1~图2中所示的实施例中的部分内容相同,在此不再赘述。The processing process of part of the steps in the embodiment of the present application is the same as part of the content in the embodiment shown in FIG. 1 to FIG. 2, and will not be repeated here.
本申请实施例中,物联网设备的升级整体分为了三个阶段,第一阶段,在物联网设备至少一个应用程序正常运行的过程中,可以检测到设备管理服务端发送的升级触发消息,此时物联网设备可以响应于该升级触发消息,基于至少一个应用程序的资源占用,关闭所有应用程序,进而可以将物联网设备设置为下载模式,并重新启动,此时,即可以切换物联网设备至下载模式,进行待升级程序的下载。在物联网设备重启之后,引导程序先启动,启动结束时,物联网设备即可以开始进入启动阶段,通过对升级标志位的检测可以在确定升级标志位为第一标志时,启动物联网设备的操作系统单元,并在操作系统启动完毕时,建立物联网设备与升级服务端的连接,从而完成下载环境的搭建。在下载过程中,可以启动监控任务,在从升级服务端下载待升级程序时,利用监控任务监控待升级程序的下载过程,从而可以在检测待升级程序下载完成时,清除下载模式,并设置升级标志位为第二标志。此时待升级程序经过模式切换、重启设备、搭载下载环境 之后完成待升级程序的下载工作。第二阶段,在将升级标志位设置为第二标志之后,即完成待升级程序的下载工作,可以开始执行待升级程序的安装工作,此时,可以重启物联网设备,并在所述物联网设备的引导程序启动之后,检测升级标志位。当检测到升级标志位为第二标志时,说明此时物联网设备已切换至升级模式,在升级模式下,即可以开始运行待升级程序,完成物联网设备的升级任务,此时即完成待升级程序的安装工作。第三阶段,物联网设备在安装待升级程序之后,可以设置升级标志位为第一标志,将其切换为正常的工作模式,此时,重启所述物联网设备,即可以重新运行至少一个应用程序,完成整个物联网设备的升级。在这一升级过程中,由于物联网设备的下载过程以及安装过程均未有应用程序参与运行,可以使得物联网设备能够单独处理待升级程序的下载以及安装,之后再正常运行至少一个应用程序,避免出现应用程序的运行与下载以及安装过程出现资源冲突,提高了系统的稳定性。In the embodiment of this application, the upgrade of the IoT device is divided into three stages as a whole. In the first stage, during the normal operation of at least one application of the IoT device, the upgrade trigger message sent by the device management server can be detected. The Internet of Things device can respond to the upgrade trigger message and close all applications based on the resource occupation of at least one application. Then the Internet of Things device can be set to download mode and restarted. At this time, the Internet of Things device can be switched. Go to download mode to download the program to be upgraded. After the IoT device restarts, the boot program starts first. At the end of the startup, the IoT device can begin to enter the startup phase. Through the detection of the upgrade flag bit, it can start the IoT device when it is determined that the upgrade flag bit is the first flag. The operating system unit, and when the operating system is started, establishes the connection between the Internet of Things device and the upgrade server, thereby completing the establishment of the download environment. During the download process, you can start the monitoring task. When downloading the program to be upgraded from the upgrade server, use the monitoring task to monitor the download process of the program to be upgraded, so that when the download of the program to be upgraded is detected, the download mode can be cleared and the upgrade can be set The flag bit is the second flag. At this time, the program to be upgraded has undergone mode switching, restarted the device, and equipped with the download environment to complete the download of the program to be upgraded. In the second stage, after the upgrade flag is set to the second flag, the download of the program to be upgraded is completed, and the installation of the program to be upgraded can be started. At this time, the Internet of Things device can be restarted, and the Internet of Things device can be restarted. After the boot program of the device is started, check the upgrade flag bit. When the upgrade flag is detected as the second flag, it means that the IoT device has switched to the upgrade mode at this time. In the upgrade mode, you can start to run the program to be upgraded and complete the upgrade task of the IoT device. Installation work of the upgrade program. In the third stage, after installing the program to be upgraded, the IoT device can set the upgrade flag as the first flag and switch it to the normal working mode. At this time, restart the IoT device to re-run at least one application Procedures to complete the upgrade of the entire Internet of Things equipment. In this upgrade process, since no application is involved in the download process and installation process of the IoT device, the IoT device can separately handle the download and installation of the program to be upgraded, and then run at least one application normally. Avoid resource conflicts during the running and downloading and installation of applications, and improve the stability of the system.
为了便于理解,以所述物联网设备为智能音箱为例对本申请实施例进行详细说明。图4中的智能音箱M1可以与设备管理服务端M2建立通信连接,还可以与升级服务端M3建立通信连接。所述智能音箱M1可以在正常工作过程中可以正常运行至少一个应用程序。设备管理服务端M2可以发送升级触发消息401至智能音箱M1。在至少一个应用程序的运行过程中,智能音箱M1可以获取升级触发消息402。For ease of understanding, the embodiments of the present application are described in detail by taking the IoT device as a smart speaker as an example. The smart speaker M1 in FIG. 4 can establish a communication connection with the device management server M2, and can also establish a communication connection with the upgrade server M3. The smart speaker M1 can run at least one application program normally during normal operation. The device management server M2 may send an upgrade trigger message 401 to the smart speaker M1. During the running of at least one application, the smart speaker M1 can obtain the upgrade trigger message 402.
智能音箱M1可以响应于该升级触发消息,基于所述至少一个应用程序的资源占用,关闭所有应用程序403。之后,智能音箱M1可以设置所述物联网设备为下载模式404,之后可以运行重启指令(Reboot)405。重启指令运行之后,智能音箱M1可以启动引导程序(Bootloader)406。智能音箱M1可以判断升级标志位(Upgrade Flag)406,在升级标志位为第一标志407时,可以启动操作系统单元(OS Init)408,建立网络连接409。网络连接成功(Network Ready)之后,可以判断是否处于下载模式410,在处于下载模式时,可以启动监控任务(Monitor Task)411,可以从所述升级服务端M3下载待升级程序412并利用所述监控任务监控所述待升级程序的下载过程。检测所述待升级程序下载完成时,清除所述下载模式并设置升级标志位为第二标志413。The smart speaker M1 may close all the application programs 403 based on the resource occupation of the at least one application program in response to the upgrade trigger message. After that, the smart speaker M1 can set the Internet of Things device to a download mode 404, and then can run a restart command (Reboot) 405. After the restart instruction is executed, the smart speaker M1 can start the bootloader 406. The smart speaker M1 can determine the upgrade flag (Upgrade Flag) 406, and when the upgrade flag is the first flag 407, the operating system unit (OS Init) 408 can be started to establish a network connection 409. After the network connection is successful (Network Ready), it can be judged whether it is in the download mode 410. When in the download mode, the monitor task (Monitor Task) 411 can be started, and the program to be upgraded 412 can be downloaded from the upgrade server M3 and used The monitoring task monitors the download process of the program to be upgraded. When it is detected that the download of the program to be upgraded is completed, the download mode is cleared and the upgrade flag bit is set to the second flag 413.
之后,智能音箱M1可以运行重启指令405,在启动引导程序启动406后,检测所述升级标志位为第二标志407时,确认切换至升级模式,从而在升级模式下,运行所述待升级程序414,完成所述物联网设备的升级任务。升级成功之后,可以清除升级标志位,也即设置升级标志位为第一标志415。After that, the smart speaker M1 can run the restart instruction 405. After the boot program is started 406, when the upgrade flag is detected as the second flag 407, it is confirmed to switch to the upgrade mode, so that in the upgrade mode, the program to be upgraded is run 414. Complete the upgrade task of the Internet of Things device. After the upgrade is successful, the upgrade flag bit can be cleared, that is, the upgrade flag bit is set to the first flag 415.
之后,智能音箱M1可以重启所述物联网设备,执行启动引导程序;执行检测所述 升级标志位为第一标志时,以及执行步骤408启动操作系统并建立网络连接409;检测未处于下载模式时,启动所述至少一个应用程序416。After that, the smart speaker M1 can restart the Internet of Things device and execute the startup boot program; execute detecting that the upgrade flag is the first flag, and execute step 408 to start the operating system and establish a network connection 409; detecting that it is not in the download mode , Start the at least one application 416.
如图5所示,为本申请实施例提供的一种物联网设备的程序升级方法的又一个实施例的流程图,所述方法可以包括以下几个步骤:As shown in FIG. 5, a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by this embodiment of the application, the method may include the following steps:
501:在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息。501: During the running process of at least one application program, detect an upgrade trigger message sent by the device management server.
502:响应于所述升级触发消息,如果所述至少一个应用程序的资源占用大于相对应的占用阈值,关闭至少部分应用程序。502: In response to the upgrade trigger message, if the resource occupancy of the at least one application program is greater than the corresponding occupancy threshold, close at least part of the application program.
作为一种可能的实现方式,所述占用阈值可以通过以下方式确定:As a possible implementation manner, the occupancy threshold may be determined in the following manner:
基于所述升级触发消息,确定所述升级触发消息运行时所需的目标资源;Based on the upgrade trigger message, determine the target resource required when the upgrade trigger message runs;
利用所述目标资源以及所述物联网设备的总资源,确定所述占用阈值。Use the target resource and the total resource of the Internet of Things device to determine the occupancy threshold.
可选地,所述利用所述目标资源以及所述物联网设备的总资源,确定所述占用阈值可以包括:计算所述目标资源与所述物联网设备的总资源的比值,获得升级任务的占用比例,计算整数1与升级任务的占用比例的差,获得所述占用阈值。所述响应于所述升级触发消息,如果所述至少一个应用程序的资源占用大于相对应占用阈值,关闭至少部分应用程序包括:响应于所述升级触发消息,如果所述至少一个应用程序的资源占用与物联网设备的总资源的比例大于相对应的占用阈值,关闭至少部分应用程序。Optionally, the determining the occupancy threshold by using the target resource and the total resource of the Internet of Things device may include: calculating the ratio of the target resource to the total resource of the Internet of Things device to obtain the upgrade task Occupancy ratio, calculate the difference between the integer 1 and the occupation ratio of the upgrade task to obtain the occupation threshold. In response to the upgrade trigger message, if the resource occupancy of the at least one application program is greater than a corresponding occupancy threshold, shutting down at least part of the application program includes: in response to the upgrade trigger message, if the resource occupation of the at least one application program The proportion of the total resources occupied by the Internet of Things device is greater than the corresponding occupancy threshold, and at least some applications are closed.
在某些实施例中,所述响应于所述升级触发消息,如果所述至少一个应用程序的资源占用大于相对应的占用阈值,关闭至少部分应用程序可以包括:响应于所述升级触发消息,如果所述至少一个应用程序的资源占用大于相对应的占用阈值,基于所述占用阈值,重新确定所述至少一个应用程序的可占用资源;关闭至少部分应用程序,以使得至少一个应用程序中的剩余应用程序占用的资源小于所述可占用资源。In some embodiments, in response to the upgrade trigger message, if the resource occupancy of the at least one application program is greater than a corresponding occupancy threshold, shutting down at least part of the application program may include: in response to the upgrade trigger message, If the resource occupancy of the at least one application is greater than the corresponding occupancy threshold, based on the occupancy threshold, re-determine the available resources of the at least one application; close at least part of the application so that the The resources occupied by the remaining application programs are less than the occupiable resources.
503:从升级服务端下载待升级程序。503: Download the program to be upgraded from the upgrade server.
504:运行所述待升级程序,完成所述物联网设备的升级任务。504: Run the program to be upgraded to complete the upgrade task of the Internet of Things device.
505:重新运行所述至少一个应用程序。505: Re-run the at least one application program.
本申请实施例中的部分步骤的处理过程与图1~图3所示的实施例中的部分内容相同,在此不再赘述。The processing process of part of the steps in the embodiment of the present application is the same as part of the content in the embodiment shown in FIG. 1 to FIG. 3, and will not be repeated here.
本申请实施例中,在至少一个应用程序运行过程中,可以检测设备管理服务端发送的升级触发消息。之后,可以响应于所述升级触发消息,如果所述至少一个应用程序的资源占用大于占用阈值,可以关闭至少部分应用程序。通过关闭至少部分应用程序可以将物联网设备中的部分被占用的资源解除占用,从而可以使物联网设备的资源可以完成 待升级程序且不影响剩余部分的应用程序的稳定运行。In the embodiment of the present application, during the running of at least one application program, the upgrade trigger message sent by the device management server can be detected. Thereafter, in response to the upgrade trigger message, if the resource occupation of the at least one application program is greater than the occupation threshold, at least part of the application program may be closed. By closing at least part of the application, some of the occupied resources in the IoT device can be released, so that the resources of the IoT device can complete the program to be upgraded without affecting the stable operation of the remaining part of the application.
如图6所示,为本申请实施例提供的一种物联网设备的程序升级方法的又一个实施例的流程图,所述方法可以包括以下几个步骤:As shown in FIG. 6, a flowchart of another embodiment of a program upgrade method for an Internet of Things device provided by this embodiment of the application, the method may include the following steps:
601:在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息。601: During the running process of at least one application program, detect an upgrade trigger message sent by the device management server.
602:确定与所述升级触发消息对应升级任务的升级类型。602: Determine the upgrade type of the upgrade task corresponding to the upgrade trigger message.
其中,所述升级类型包括全量升级或增量升级。Wherein, the upgrade type includes full upgrade or incremental upgrade.
603:如果所述升级类型为全量升级,解除所述至少一个应用程序的资源占用,以关闭所述至少一个应用程序。之后,执行步骤606。603: If the upgrade type is a full upgrade, release the resource occupation of the at least one application program to close the at least one application program. After that, step 606 is executed.
604:如果所述升级类型为增量升级,确定与所述增量升级相匹配的目标资源。604: If the upgrade type is an incremental upgrade, determine a target resource that matches the incremental upgrade.
605:根据所述至少一个应用程序的资源占用以及所述目标资源,解除至少部分应用程序的资源占用,以使所述物联网设备中剩余资源满足所述目标资源的需求。之后,执行步骤606。605: According to the resource occupation of the at least one application program and the target resource, release the resource occupation of at least part of the application program, so that the remaining resources in the Internet of Things device meet the demand of the target resource. After that, step 606 is executed.
可选地,所述根据所述至少一个应用程序的资源占用以及所述目标资源,解除至少部分应用程序的资源占用,以使所述物联网设备中剩余资源满足所述目标资源的需求可以包括:根据所述物联网设备的总资源,以及所述目标资源,计算所述物联网设备中应用程序的可占用资源;解除所述至少一个应用程序中至少部分应用程序占用的资源,以使所述至少一个应用程序中的剩余存在的资源占用小于所述可占用资源。Optionally, the releasing the resource occupation of at least part of the application program according to the resource occupation of the at least one application program and the target resource, so that the remaining resources in the Internet of Things device meet the demand of the target resource may include : According to the total resources of the Internet of Things device and the target resources, calculate the occupable resources of the application in the Internet of Things device; release the resources occupied by at least part of the at least one application to make all The occupancy of remaining resources in the at least one application program is less than the occupable resources.
在某些实施例中,可以对至少一个应用程序分别设置各自的运行级别,在关闭至少部分应用程序时,可以按照每个应用程序的运行级别,按照从低到高的顺序关闭对应的应用程序,直至物联网设备的剩余资源满足升级任务的资源需求。例如,第一应用程序的运行级别为一级,第二应用程序的运行级别为二级,一级应用程序的运行级别大于二级应用程序,可以按照二级应用程序运行级别低于一级应用程序运行级别的关闭规则,先关闭第二应用程序,如果物联网设备中的剩余资源满足升级任务的资源需求不再关闭第一应用程序,即可以开始执行下载任务;如果物联网设备中的剩余资源不满足升级任务的资源需求,需要关闭第一应用程序,直至物联网设备中的剩余资源满足升级任务的资源需求。In some embodiments, at least one application can be individually set to run levels. When at least part of the applications are closed, the corresponding applications can be closed in order from low to high according to the operating level of each application. , Until the remaining resources of the Internet of Things devices meet the resource requirements of the upgrade task. For example, the running level of the first application is level one, the running level of the second application is level two, and the running level of the level one application is greater than that of the level two application, and the run level of the level two application can be lower than that of the level one application. The shutdown rule of the program run level is to close the second application first. If the remaining resources in the IoT device meet the resource requirements of the upgrade task, do not close the first application and start the download task; if the remaining resources in the IoT device meet the resource requirements of the upgrade task, the download task can be started; The resources do not meet the resource requirements of the upgrade task, and the first application program needs to be closed until the remaining resources in the IoT device meet the resource requirements of the upgrade task.
606:从升级服务端下载待升级程序。606: Download the program to be upgraded from the upgrade server.
607:运行所述待升级程序,完成所述物联网设备的升级任务。607: Run the program to be upgraded to complete the upgrade task of the Internet of Things device.
608:重新运行所述至少一个应用程序。608: Re-run the at least one application program.
本申请实施例中的部分步骤的处理过程与图1~图3所示的实施例中的部分内容相 同,在此不再赘述。The processing process of part of the steps in the embodiment of this application is the same as part of the content in the embodiment shown in Fig. 1 to Fig. 3, and will not be repeated here.
本申请实施例中,在物联网设备的至少一个应用程序的运行过程中,可以检测设备管理服务器发送的升级触发消息,通过升级触发消息可以确定其对应升级任务的升级类型,所述升级类型可以包括全量升级以及增量升级。对于全量升级可能对物联网设备的资源要求较高,因此,可以采用关闭所有应用程序的方式以执行升级任务,而对于增量升级而言,对物联网设备的资源要求较低,因此,可以采用关闭部分升级资源的方式以执行升级任务。对于不同类型的升级任务采用不同的关闭方式,升级过程较为灵活可以减少关闭所有应用程序的次数,以保持物联网设备的可运行状态,使得其能够维持较高的工作效率。In the embodiment of the present application, during the running process of at least one application program of the Internet of Things device, the upgrade trigger message sent by the device management server can be detected, and the upgrade type of the corresponding upgrade task can be determined through the upgrade trigger message. The upgrade type may be Including full upgrades and incremental upgrades. For a full upgrade, the resource requirements for IoT devices may be high. Therefore, all applications can be closed to perform the upgrade task. For incremental upgrades, the resource requirements for IoT devices are low. Therefore, you can Use the method of shutting down some upgrade resources to perform upgrade tasks. For different types of upgrade tasks, different shutdown methods are used. The upgrade process is more flexible and can reduce the number of times to close all applications, so as to maintain the operational status of the Internet of Things device, so that it can maintain high work efficiency.
如图7所示,为本申请实施例提供的一种物联网设备的程序升级方法的又一个实施例的流程图,所述方法可以包括以下几个步骤:As shown in FIG. 7, a flowchart of another embodiment of a program upgrade method of an Internet of Things device provided by this embodiment of the application, the method may include the following steps:
701:在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;701: During the operation of at least one application program, detect an upgrade trigger message sent by the device management server;
702:判断当前运行的应用程序的资源占用是否满足升级条件。702: Determine whether the resource occupation of the currently running application program meets the upgrade condition.
可选地,所述判断当前运行的应用程序的资源占用是否满足升级条件可以包括判断当前运行的应用程序的资源占用是否小于对应的占用阈值。Optionally, the determining whether the resource occupation of the currently running application program satisfies the upgrade condition may include determining whether the resource occupation of the currently running application program is less than a corresponding occupancy threshold.
其中,所述占用阈值为基于所述升级触发消息对应的升级任务所需的资源而确定。所述占用阈值具体可以通过:基于所述升级触发消息,确定所述升级触发消息运行时所需的目标资源;利用所述目标资源以及所述物联网设备的总资源,确定所述占用阈值。Wherein, the occupancy threshold is determined based on the resources required by the upgrade task corresponding to the upgrade trigger message. The occupancy threshold may be specifically determined by: determining the target resource required by the upgrade trigger message when the upgrade trigger message runs based on the upgrade trigger message; and determining the occupancy threshold by using the target resource and the total resources of the Internet of Things device.
可选地,所述利用所述目标资源以及所述物联网设备的总资源,确定所述占用阈值可以包括:计算所述目标资源与所述物联网设备的总资源的比值,获得升级任务的占用比例,计算整数1与升级任务的占用比例的差,获得所述占用阈值。Optionally, the determining the occupancy threshold by using the target resource and the total resource of the Internet of Things device may include: calculating the ratio of the target resource to the total resource of the Internet of Things device to obtain the upgrade task Occupancy ratio, calculate the difference between the integer 1 and the occupation ratio of the upgrade task to obtain the occupation threshold.
703:如果满足,从升级服务端下载待升级程序;运行所述待升级程序,完成所述物联网设备的升级任务。703: If it is satisfied, download the program to be upgraded from the upgrade server; run the program to be upgraded to complete the upgrade task of the Internet of Things device.
704:如果不满足,返回步骤702。704: If not satisfied, go back to step 702.
本申请实施例中的部分步骤的处理过程与图1~图3所示的实施例中的部分内容相同,在此不再赘述。The processing process of part of the steps in the embodiment of the present application is the same as part of the content in the embodiment shown in FIG. 1 to FIG. 3, and will not be repeated here.
本申请实施例中,在物联网设备的至少一个应用程序的运行过程中,可以检测设备管理服务器发送的升级触发消息。之后,可以判断当前运行的应用程序是否满足升级条件,如果满足,可以从升级服务端下载待升级程序;运行所述待升级程序,完成所述物联网设备的升级任务,如果不满足可以返回至判断当前运行的应用程序的资源占用是否 满足升级条件的步骤继续执行,直至当前运行的应用程序的资源占用满足升级条件。对当前运行的应用程序的资源占用是否满足升级条件的角度出发,对物联网设备的资源环境进行了监控,从而在达到升级条件时,执行升级任务。避免了在物联网设备资源环境较差时的升级而引发系统不稳定的现象,提高了升级的稳定性以及有效性。In the embodiment of the present application, during the operation of at least one application program of the Internet of Things device, the upgrade trigger message sent by the device management server can be detected. After that, it can be judged whether the currently running application program meets the upgrade conditions. If it is satisfied, the program to be upgraded can be downloaded from the upgrade server; the program to be upgraded is run to complete the upgrade task of the IoT device, and if it is not satisfied, it can return to The step of judging whether the resource occupation of the currently running application program meets the upgrade condition is continued until the resource occupation of the currently running application program meets the upgrade condition. From the perspective of whether the resource occupancy of the currently running application program meets the upgrade conditions, the resource environment of the IoT device is monitored, so that the upgrade task is executed when the upgrade conditions are met. It avoids the phenomenon of system instability caused by the upgrade when the resource environment of the Internet of things equipment is poor, and the stability and effectiveness of the upgrade are improved.
为了提高监控的准确性以及有效性,可以按照一定的监控频率对物联网设备的资源占用情况进行监控,作为一个实施例,所述判断当前运行的应用程序的资源占用是否满足升级条件可以包括:In order to improve the accuracy and effectiveness of monitoring, the resource occupancy of IoT devices can be monitored according to a certain monitoring frequency. As an embodiment, the judging whether the resource occupancy of the currently running application meets the upgrade conditions may include:
基于预设监控频率,判断当前运行的应用程序的资源占用是否满足升级条件。Based on the preset monitoring frequency, it is determined whether the resource occupation of the currently running application program meets the upgrade conditions.
可选地,所述基于预设监控频率,判断当前运行的应用程序的资源占用是否满足升级条件可以包括:基于预设监控频率,确定每次监控对应的监控时间;在达到任一监控时间时,判断当前运行的应用程序的资源占用是否满足升级条件。Optionally, the judging whether the resource occupation of the currently running application meets the upgrade condition based on the preset monitoring frequency may include: determining the monitoring time corresponding to each monitoring based on the preset monitoring frequency; when any monitoring time is reached , To determine whether the resource occupation of the currently running application program meets the upgrade conditions.
在一些实施例中,在当前运行的应用程序的资源占用不满足升级条件时,可以关闭至少部分应用程序,以使得当前运行的应用程序的资源占用满足升级条件,从而实现升级。所述如果不满足,返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行可以包括:In some embodiments, when the resource occupation of the currently running application program does not meet the upgrade condition, at least part of the application program may be closed, so that the resource occupation of the currently running application program meets the upgrade condition, thereby realizing the upgrade. If it is not met, returning to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition and continuing to execute may include:
如果不满足,基于当前运行的应用程序的资源占用,关闭至少部分应用程序;返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行。If not, close at least part of the application based on the resource occupation of the currently running application; return to the step of judging whether the resource occupation of the currently running application meets the upgrade condition and continue execution.
通过关闭当前运行至少部分应用程序以使关闭后剩余应用程序的资源展示满足升级条件,从而可以实现升级。The upgrade can be achieved by closing at least part of the currently running applications so that the resource display of the remaining applications after closing meets the upgrade conditions.
进一步,可选地,所述基于当前运行的应用程序的资源占用,关闭至少部分应用程序具体可以是:Further, optionally, based on the resource occupation of the currently running application program, closing at least part of the application program may specifically be:
解除当前运行的应用程序中至少部分应用程序占用的资源。Release the resources occupied by at least part of the currently running applications.
作为一种可能的实现方式,具体还可以是:确定升级任务所需的目标资源;根据所述物联网设备的总资源,以及所述目标资源,计算所述物联网设备中应用程序的可占用资源;解除当前运行运行应用程序中至少部分应用程序的资源占用,以使剩余应用程序的资源占用小于所述可占用资源。As a possible implementation, it can also be specifically: determining the target resources required for the upgrade task; according to the total resources of the Internet of Things device and the target resources, calculating the occupancy of the application in the Internet of Things device Resources; release the resource occupation of at least part of the currently running applications, so that the resource occupation of the remaining applications is less than the occupable resources.
如图8所示,为本申请实施例提供的一种物联网设备的程序升级装置的一个实施例的结构示意图,所述装置可以包括:As shown in FIG. 8, it is a schematic structural diagram of an embodiment of an apparatus for program upgrading of Internet of Things equipment provided by an embodiment of this application, and the apparatus may include:
消息检测模块801,用于在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息。The message detection module 801 is configured to detect the upgrade trigger message sent by the device management server during the running process of at least one application program.
消息响应模块802,用于响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序。The message response module 802 is configured to close at least part of the application based on the resource occupation of the at least one application in response to the upgrade trigger message.
程序下载模块803,用于从升级服务端下载待升级程序。The program download module 803 is used to download the program to be upgraded from the upgrade server.
程序升级模块804,用于运行所述待升级程序,完成所述物联网设备的升级任务。The program upgrade module 804 is configured to run the program to be upgraded and complete the upgrade task of the Internet of Things device.
程序运行模块805,用于重新运行所述至少一个应用程序。The program running module 805 is used to re-run the at least one application program.
本申请实施例中,通过针对资源受限的物联网设备,可以在至少一个应用程序运行的过程中,检测设备管理服务端发送的升级触发消息,响应于该升级触发消息,可以基于至少一个应用程序的资源占用,关闭至少部分应用程序,以使得物联网设备系统中的资源能够执行升级任务。从升级服务端下载待升级程序之后,可以运行该待升级程序,完成物联网设备的升级任务,之后,可以重新运行至少一个应用程序。此时,物联网设备完成升级任务,且在升级结束之后重新运行至少一个应用程序,以使物联网设备的系统恢复到稳定状态,从而可以解决升级任务与主应用程序同时运行时导致的系统不稳定的技术问题。In the embodiment of the present application, by targeting resource-constrained IoT devices, the upgrade trigger message sent by the device management server can be detected during the operation of at least one application, and the upgrade trigger message can be based on at least one application. The resources of the program are occupied, and at least part of the application programs are closed, so that the resources in the IoT device system can perform the upgrade task. After downloading the program to be upgraded from the upgrade server, the program to be upgraded can be run to complete the upgrade task of the IoT device, and then at least one application can be rerun. At this time, the IoT device completes the upgrade task, and reruns at least one application after the upgrade is completed to restore the system of the IoT device to a stable state, which can solve the system failure caused by the upgrade task and the main application running at the same time. Stable technical issues.
作为一个实施例,所述消息响应模块可以包括:As an embodiment, the message response module may include:
第一响应单元,用于响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭所有应用程序。The first response unit is configured to respond to the upgrade trigger message and close all applications based on the resource occupation of the at least one application.
在某些实施例中,所述程序下载模块可以包括:In some embodiments, the program download module may include:
模式切换单元,用于切换所述物联网设备至下载模式,以从升级服务端下载待升级程序;The mode switching unit is used to switch the Internet of Things device to a download mode to download the program to be upgraded from the upgrade server;
所述装置还包括:The device also includes:
升级切换模块,用于检测所述待升级程序下载完成时,切换所述物联网设备至升级模式;The upgrade switching module is used to switch the Internet of Things device to the upgrade mode when detecting that the download of the program to be upgraded is completed;
所述程序升级模块可以包括:The program upgrade module may include:
第一升级单元,用于检测所述物联网设备处于升级模式时,运行所述待升级程序,完成所述物联网设备的升级任务。The first upgrade unit is configured to detect that the Internet of Things device is in an upgrade mode, run the program to be upgraded, and complete the upgrade task of the Internet of Things device.
作为一种可能的实现方式,所述模式切换单元包括:As a possible implementation manner, the mode switching unit includes:
第一处理子单元,用于设置所述物联网设备为下载模式并重启所述物联网设备,以切换所述物联网设备至下载模式;The first processing subunit is configured to set the Internet of Things device to a download mode and restart the Internet of Things device to switch the Internet of Things device to the download mode;
第二处理子单元,用于检测升级标志位为第一标志时,从升级服务端下载待升级程序。The second processing subunit is used to download the program to be upgraded from the upgrade server when detecting that the upgrade flag bit is the first flag.
在某些实施例中,所第二处理子单元可以包括:In some embodiments, the second processing subunit may include:
第一下载模块,用于在所述物联网设备的引导程序启动时,检测所述升级标志位为第一标志时,从升级服务端下载待升级程序。The first download module is configured to download the program to be upgraded from the upgrade server when detecting that the upgrade flag bit is the first flag when the boot program of the Internet of Things device is started.
进一步,可选地,所述第一下载模块可以包括:Further, optionally, the first download module may include:
在所述物联网设备的引导程序启动时,检测所述升级标志位为第一标志时,运行所述物联网设备的操作系统单元;When the boot program of the Internet of Things device is started, when it is detected that the upgrade flag is the first flag, run the operating system unit of the Internet of Things device;
检测与所述升级服务端的网络连接已完成时,检测所述物联网设备为下载模式时,从所述升级服务端下载待升级程序。When it is detected that the network connection with the upgrade server is completed, and when it is detected that the Internet of Things device is in the download mode, download the program to be upgraded from the upgrade server.
作为又一种可能的实现方式,所述升级切换模块包括:As yet another possible implementation manner, the upgrade switching module includes:
标志清除单元,用于检测所述待升级程序下载完成时,清除所述下载模式并设置升级标志位为第二标志;The flag clearing unit is used for detecting that the downloading of the program to be upgraded is completed, clearing the download mode and setting the upgrade flag bit as the second flag;
第一重启单元,用于重启所述物联网设备;The first restart unit is configured to restart the Internet of Things device;
第一切换单元,用于检测所述升级标志位为第二标志时,确认切换至升级模式。The first switching unit is used for confirming switching to the upgrade mode when detecting that the upgrade flag bit is the second flag.
在某些实施例中,所述第一切换单元可以包括:In some embodiments, the first switching unit may include:
第三处理子单元,用于在所述物联网设备的引导程序启动时,检测所述升级标志位为第二标志时,确认切换至升级模式。The third processing subunit is used for confirming switching to the upgrade mode when detecting that the upgrade flag bit is the second flag when the boot program of the Internet of Things device is started.
在某些实施例中,所述装置还可以包括:In some embodiments, the device may further include:
标志设置模块,用于设置所述升级标志位为第一标志。The flag setting module is used to set the upgrade flag bit as the first flag.
作为一种可能的实现方式,所述程序运行模块包括:As a possible implementation, the program running module includes:
第二重启单元,用于重启所述物联网设备,以重新运行所述至少一个应用程序。The second restart unit is configured to restart the Internet of Things device to re-run the at least one application.
进一步,可选地,所述第二重启单元可以包括:Further, optionally, the second restart unit may include:
第二重启子单元,用于运行重启指令,启动引导程序;The second restart subunit is used to run a restart instruction and start the boot program;
第四处理子单元,用于检测升级标志位为第一标志时,启动操作系统并建立网络连接;The fourth processing subunit is used to detect that the upgrade flag is the first flag, start the operating system and establish a network connection;
程序启动子单元,用于检测未处于下载模式时,启动所述至少一个应用程序。The program start subunit is used to start the at least one application when it is detected that it is not in the download mode.
作为一个实施例,所述消息响应模块可以包括:As an embodiment, the message response module may include:
第二响应单元,用于响应于所述升级触发消息,如果所述至少一个应用程序的资源占用大于相对应的占用阈值,关闭至少部分应用程序。The second response unit is configured to respond to the upgrade trigger message and close at least part of the application if the resource occupation of the at least one application is greater than the corresponding occupancy threshold.
作为又一个实施例,所述消息响应模块包括:As another embodiment, the message response module includes:
类型确定单元,用于确定与所述升级触发消息对应升级任务的升级类型;其中,所 述升级类型包括全量升级或增量升级;The type determining unit is used to determine the upgrade type of the upgrade task corresponding to the upgrade trigger message; wherein, the upgrade type includes a full upgrade or an incremental upgrade;
第二升级单元,用于如果所述升级类型为全量升级,解除所述至少一个应用程序的资源占用,以关闭所述至少一个应用程序;The second upgrade unit is configured to release the resource occupation of the at least one application program if the upgrade type is a full upgrade, so as to close the at least one application program;
第三升级单元,用于如果所述升级类型为增量升级,确定与所述增量升级相匹配的目标资源;根据所述至少一个应用程序的资源占用以及所述目标资源,解除至少部分应用程序的资源占用,以使所述物联网设备中剩余资源满足所述目标资源的需求。The third upgrade unit is configured to determine a target resource matching the incremental upgrade if the upgrade type is an incremental upgrade; release at least part of the application according to the resource occupation of the at least one application and the target resource The resources of the program are occupied, so that the remaining resources in the Internet of Things device meet the requirements of the target resources.
作为一个实施例,所述程序下载模块可以包括:As an embodiment, the program download module may include:
协议传输单元,用于基于超文本传输安全协议,从升级服务端下载待升级程序。The protocol transmission unit is used to download the program to be upgraded from the upgrade server based on the hypertext transmission security protocol.
作为又一个实施例,所述装置还包括:As yet another embodiment, the device further includes:
任务监控模块,用于启动下载监控任务,利用所述下载监控任务监控所述待升级程序的下载过程。The task monitoring module is used to start a download monitoring task, and use the download monitoring task to monitor the download process of the program to be upgraded.
图8所述的物联网设备的程序升级装置可以执行图1~图6所示实施例所述的物联网设备的程序升级方法,其实现原理和技术效果不再赘述。对于上述实施例中的程序升级装置其中的各个模块、单元、子单元所执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。The program upgrade apparatus of the Internet of Things device described in FIG. 8 can execute the program upgrade method of the Internet of Things device described in the embodiments shown in FIGS. 1 to 6, and its implementation principles and technical effects will not be repeated. The specific operations performed by the modules, units, and sub-units of the program upgrade apparatus in the foregoing embodiment have been described in detail in the embodiment of the method, and detailed description will not be given here.
此外,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令存储有计算机指令,当所述计算机指令被一个或多个处理器执行时,致使所述一个或多个处理器上述实施例中执行的任一个实施例中图1~图6所述的物联网设备的程序升级方法。In addition, an embodiment of the present application also provides a computer-readable storage medium that stores computer instructions stored thereon, and when the computer instructions are executed by one or more processors, cause the The program upgrade method of the Internet of Things device described in FIGS. 1 to 6 in any of the embodiments executed by one or more processors in the foregoing embodiments.
在实际应用中,图8所示的装置可以配置为一物联网设备,如图9所示,为本申请实施例提供的一种物联网设备的结构示意图,所述设备可以包括:In practical applications, the device shown in FIG. 8 may be configured as an Internet of Things device. As shown in FIG. 9, a schematic structural diagram of an Internet of Things device provided in an embodiment of this application. The device may include:
存储组件901与处理组件902;所述存储组件901用于存储一条或多条计算机指令;所述一条或多条计算机指令被所述处理组件902调用;A storage component 901 and a processing component 902; the storage component 901 is used to store one or more computer instructions; the one or more computer instructions are called by the processing component 902;
所述处理组件902用于:The processing component 902 is used to:
在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序;从升级服务端下载待升级程序;运行所述待升级程序,完成所述物联网设备的升级任务;重新运行所述至少一个应用程序。During the operation of at least one application, detect an upgrade trigger message sent by the device management server; in response to the upgrade trigger message, close at least part of the application based on the resource occupation of the at least one application; from the upgrade server Download the program to be upgraded; run the program to be upgraded to complete the upgrade task of the Internet of Things device; re-run the at least one application program.
本申请实施例中,通过针对资源受限的物联网设备,可以在至少一个应用程序运行的过程中,检测设备管理服务端发送的升级触发消息,响应于该升级触发消息,可以基 于至少一个应用程序的资源占用,关闭至少部分应用程序,以使得物联网设备系统中的资源能够执行升级任务。从升级服务端下载待升级程序之后,可以运行该待升级程序,完成物联网设备的升级任务,之后,可以重新运行至少一个应用程序。此时,物联网设备完成升级任务,且在升级结束之后重新运行至少一个应用程序,以使物联网设备的系统恢复到稳定状态,从而可以解决升级任务与主应用程序同时运行时导致的系统不稳定的技术问题。In the embodiment of the present application, by targeting resource-constrained IoT devices, the upgrade trigger message sent by the device management server can be detected during the operation of at least one application, and the upgrade trigger message can be based on at least one application. The resources of the program are occupied, and at least part of the application programs are closed, so that the resources in the IoT device system can perform the upgrade task. After downloading the program to be upgraded from the upgrade server, the program to be upgraded can be run to complete the upgrade task of the IoT device, and then at least one application can be rerun. At this time, the IoT device completes the upgrade task, and reruns at least one application after the upgrade is completed to restore the system of the IoT device to a stable state, which can solve the system failure caused by the upgrade task and the main application running at the same time. Stable technical issues.
作为一个实施例,所述处理组件响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序具体可以是:As an embodiment, the processing component, in response to the upgrade trigger message, based on the resource occupation of the at least one application program, shutting down at least part of the application program may specifically be:
响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭所有应用程序。In response to the upgrade trigger message, all applications are closed based on the resource occupation of the at least one application.
在某些实施例中,所述处理组件从升级服务端下载待升级程序具体可以是:In some embodiments, the processing component downloading the program to be upgraded from the upgrade server may specifically be:
切换所述物联网设备至下载模式,以从升级服务端下载待升级程序;Switch the Internet of Things device to a download mode to download the program to be upgraded from the upgrade server;
所述处理组件运行所述待升级程序,完成所述物联网设备的升级任务之前,还具体可以是:Before the processing component runs the program to be upgraded and completes the upgrade task of the Internet of Things device, it may also specifically be:
检测所述待升级程序下载完成时,切换所述物联网设备至升级模式;When detecting that the download of the program to be upgraded is complete, switch the Internet of Things device to an upgrade mode;
所述处理组件运行所述待升级程序,完成所述物联网设备的升级任务具体可以是:The processing component runs the program to be upgraded, and completing the upgrade task of the Internet of Things device may specifically be:
检测所述物联网设备处于升级模式时,运行所述待升级程序,完成所述物联网设备的升级任务。When detecting that the Internet of Things device is in the upgrade mode, run the program to be upgraded to complete the upgrade task of the Internet of Things device.
作为一种可能的实现方式,所述处理组件切换所述物联网设备至下载模式,以从升级服务端下载待升级程序具体可以是:As a possible implementation manner, the processing component switches the Internet of Things device to a download mode to download the program to be upgraded from the upgrade server, which may specifically be:
设置所述物联网设备为下载模式并重启所述物联网设备,以切换所述物联网设备至下载模式;Setting the Internet of Things device to download mode and restarting the Internet of Things device to switch the Internet of Things device to the download mode;
检测升级标志位为第一标志时,从升级服务端下载待升级程序。When it is detected that the upgrade flag is the first flag, the program to be upgraded is downloaded from the upgrade server.
在一种可能的设计中,所述处理组件检测升级标志位为第一标志时,从升级服务端下载待升级程序具体可以是:In a possible design, when the processing component detects that the upgrade flag is the first flag, downloading the program to be upgraded from the upgrade server may specifically be:
在所述物联网设备的引导程序启动时,检测所述升级标志位为第一标志时,从升级服务端下载待升级程序。When the boot program of the Internet of Things device is started, when it is detected that the upgrade flag is the first flag, the program to be upgraded is downloaded from the upgrade server.
进一步,可选地,所述处理组件在所述物联网设备的引导程序启动时,检测所述升级标志位为第一标志时,从升级服务端下载待升级程序具体可以是:Further, optionally, when the processing component detects that the upgrade flag is the first flag when the boot program of the Internet of Things device is started, downloading the program to be upgraded from the upgrade server may specifically be:
在所述物联网设备的引导程序启动时,检测所述升级标志位为第一标志时,运行所 述物联网设备的操作系统单元;When the boot program of the Internet of Things device is started, when it is detected that the upgrade flag bit is the first flag, run the operating system unit of the Internet of Things device;
检测与所述升级服务端的网络连接已完成时,检测所述物联网设备为下载模式时,从所述升级服务端下载待升级程序。When it is detected that the network connection with the upgrade server is completed, and when it is detected that the Internet of Things device is in the download mode, download the program to be upgraded from the upgrade server.
作为又一种可能的实现方式,所述处理组件检测所述待升级程序下载完成时,切换所述物联网设备至升级模式具体可以是:As yet another possible implementation manner, when the processing component detects that the download of the program to be upgraded is completed, switching the Internet of Things device to the upgrade mode may specifically be:
检测所述待升级程序下载完成时,清除所述下载模式并设置升级标志位为第二标志;When detecting that the download of the program to be upgraded is completed, clear the download mode and set the upgrade flag bit as the second flag;
重启所述物联网设备;Restart the Internet of Things device;
检测所述升级标志位为第二标志时,确认切换至升级模式。When detecting that the upgrade flag bit is the second flag, confirm switching to the upgrade mode.
在一种可能的设计中,所述处理组件检测所述升级标志位为第二标志时,确认切换至升级模式具体可以是:In a possible design, when the processing component detects that the upgrade flag bit is the second flag, confirming to switch to the upgrade mode may specifically be:
在所述物联网设备的引导程序启动时,检测所述升级标志位为第二标志时,确认切换至升级模式。When the boot program of the Internet of Things device is started, when it is detected that the upgrade flag bit is the second flag, it is confirmed to switch to the upgrade mode.
进一步,可选地,所述处理组件检测所述物联网设备处于升级模式时,运行所述待升级程序,完成所述物联网设备的升级任务之后,还具体可以是:Further, optionally, when the processing component detects that the IoT device is in the upgrade mode, it runs the program to be upgraded, and after completing the upgrade task of the IoT device, it may also specifically be:
设置所述升级标志位为第一标志。Set the upgrade flag bit as the first flag.
在某些实施例中,所述处理组件重新运行所述至少一个应用程序具体可以是:In some embodiments, re-running the at least one application by the processing component may specifically be:
重启所述物联网设备,以重新运行所述至少一个应用程序。Restart the Internet of Things device to re-run the at least one application.
在一种可能的设计中,所述处理组件重启所述物联网设备,以重新运行所述至少一个应用程序具体可以是:In a possible design, the processing component restarting the Internet of Things device to re-run the at least one application program may specifically be:
运行重启指令,启动引导程序;Run the restart command to start the boot program;
检测升级标志位为第一标志时,启动操作系统并建立网络连接;When detecting that the upgrade flag is the first flag, start the operating system and establish a network connection;
检测未处于下载模式时,启动所述至少一个应用程序。When it is detected that it is not in the download mode, the at least one application is started.
作为又一个实施例,所述处理组件响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序具体可以是:As another embodiment, the processing component in response to the upgrade trigger message, based on the resource occupation of the at least one application program, shutting down at least part of the application program may specifically be:
响应于所述升级触发消息,如果所述至少一个应用程序的资源占用大于相对应的占用阈值,关闭至少部分应用程序。In response to the upgrade trigger message, if the resource occupancy of the at least one application program is greater than the corresponding occupancy threshold, close at least part of the application program.
作为又一个实施例,所述处理组件响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序具体可以是:As another embodiment, the processing component in response to the upgrade trigger message, based on the resource occupation of the at least one application program, shutting down at least part of the application program may specifically be:
确定与所述升级触发消息对应升级任务的升级类型;其中,所述升级类型包括全量升级或增量升级;Determine the upgrade type of the upgrade task corresponding to the upgrade trigger message; wherein, the upgrade type includes full upgrade or incremental upgrade;
如果所述升级类型为全量升级,解除所述至少一个应用程序的资源占用,以关闭所述至少一个应用程序;If the upgrade type is a full upgrade, release the resource occupation of the at least one application program to close the at least one application program;
如果所述升级类型为增量升级,确定与所述增量升级相匹配的目标资源;根据所述至少一个应用程序的资源占用以及所述目标资源,解除至少部分应用程序的资源占用,以使所述物联网设备中剩余资源满足所述目标资源的需求。If the upgrade type is an incremental upgrade, determine the target resource that matches the incremental upgrade; according to the resource occupation of the at least one application and the target resource, release at least part of the application's resource occupation, so that The remaining resources in the Internet of Things device meet the requirements of the target resources.
作为又一个实施例,所述从升级服务端下载待升级程序具体可以是:As another embodiment, the downloading of the program to be upgraded from the upgrade server may specifically be:
基于超文本传输安全协议,从升级服务端下载待升级程序。Based on the hypertext transmission security protocol, download the program to be upgraded from the upgrade server.
作为又一个实施例,所述处理组件从升级服务端下载待升级程序之前,具体可以是:As another embodiment, before the processing component downloads the program to be upgraded from the upgrade server, it may specifically be:
启动下载监控任务,利用所述下载监控任务监控所述待升级程序的下载过程。Start the download monitoring task, and use the download monitoring task to monitor the download process of the program to be upgraded.
图9所述的物联网设备可以执行图1~图6所示实施例所述的物联网设备的程序升级方法,其实现原理和技术效果不再赘述。对于上述实施例中的物联网设备其中的处理组件所执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。The Internet of Things device described in FIG. 9 can execute the program upgrade method of the Internet of Things device described in the embodiments shown in FIGS. 1 to 6, and its implementation principles and technical effects will not be described in detail. The specific manner of operations performed by the processing components of the Internet of Things device in the foregoing embodiment has been described in detail in the embodiment of the method, and will not be elaborated here.
如图10所示,为本申请实施例提供的一种物联网设备的程序升级装置的一个实施例的结构示意图,所述装置可以包括:As shown in FIG. 10, it is a schematic structural diagram of an embodiment of an apparatus for program upgrading of Internet of Things equipment provided by an embodiment of this application, and the apparatus may include:
消息检测模块1001,用于在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;The message detection module 1001 is configured to detect the upgrade trigger message sent by the device management server during the running process of at least one application program;
条件判断模块1002,用于判断当前运行的应用程序的资源占用是否满足升级条件;The condition judgment module 1002 is used to judge whether the resource occupation of the currently running application program meets the upgrade condition;
第一处理模块1003,用于如果满足,从升级服务端下载待升级程序;运行所述待升级程序,完成所述物联网设备的升级任务;The first processing module 1003 is configured to download the program to be upgraded from the upgrade server if it is satisfied; run the program to be upgraded to complete the upgrade task of the Internet of Things device;
第二处理模块1004,用于如果不满足,返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行。The second processing module 1004 is configured to return to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition if it is not satisfied, and continue execution.
作为一个实施例,所述条件判断模块可以包括:As an embodiment, the condition judgment module may include:
条件判断单元,用于基于预设监控频率,判断当前运行的应用程序的资源占用是否满足升级条件。The condition judgment unit is configured to judge whether the resource occupation of the currently running application program meets the upgrade condition based on the preset monitoring frequency.
作为又一个实施例,在当前运行的应用程序的资源占用不满足升级条件时,可以关闭至少部分应用程序,以使得当前运行的应用程序的资源占用满足升级条件,从而实现升级。所述第二处理模块可以包括:As another embodiment, when the resource occupation of the currently running application program does not meet the upgrade condition, at least part of the application program may be closed, so that the resource occupation of the currently running application program meets the upgrade condition, thereby realizing the upgrade. The second processing module may include:
资源处理单元,用于如果不满足,基于当前运行的应用程序的资源占用,关闭至少部分应用程序;返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步 骤继续执行。The resource processing unit is configured to, if not satisfied, close at least part of the application based on the resource occupation of the currently running application; return to the step of judging whether the resource occupation of the currently running application meets the upgrade condition and continue execution.
通过关闭当前运行至少部分应用程序以使关闭后剩余应用程序的资源展示满足升级条件,从而可以实现升级。The upgrade can be achieved by closing at least part of the currently running applications so that the resource display of the remaining applications after closing meets the upgrade conditions.
图10所述的物联网设备的程序升级装置可以执行图7所示实施例所述的物联网设备的程序升级方法,其实现原理和技术效果不再赘述。对于上述实施例中的程序升级装置其中的各个模块、单元、子单元所执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。The program upgrade apparatus for the Internet of Things device described in FIG. 10 can execute the program upgrade method for the Internet of Things device described in the embodiment shown in FIG. 7, and its implementation principles and technical effects will not be described in detail. The specific operations performed by the modules, units, and sub-units of the program upgrade apparatus in the foregoing embodiment have been described in detail in the embodiment of the method, and detailed description will not be given here.
此外,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令存储有计算机指令,当所述计算机指令被一个或多个处理器执行时,致使所述一个或多个处理器上述实施例中执行的任一个实施例中图7所述的物联网设备的程序升级方法。In addition, an embodiment of the present application also provides a computer-readable storage medium that stores computer instructions stored thereon, and when the computer instructions are executed by one or more processors, cause the The program upgrade method of the Internet of Things device described in FIG. 7 in any one of the embodiments executed by one or more processors in the above embodiments.
在实际应用中,图10所示的装置可以配置为一物联网设备,如图11所示,为本申请实施例提供的一种物联网设备的结构示意图,所述设备可以包括:存储组件1101与处理组件1102;所述存储组件1101用于存储一条或多条计算机指令;所述一条或多条计算机指令被所述处理组件1102调用;In practical applications, the device shown in FIG. 10 may be configured as an Internet of Things device. As shown in FIG. 11, it is a schematic structural diagram of an Internet of Things device provided by an embodiment of this application. The device may include: a storage component 1101 And processing component 1102; the storage component 1101 is used to store one or more computer instructions; the one or more computer instructions are called by the processing component 1102;
所述处理组件1102用于:The processing component 1102 is used to:
在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;判断当前运行的应用程序的资源占用是否满足升级条件;如果满足,从升级服务端下载待升级程序;运行所述待升级程序,完成所述物联网设备的升级任务;如果不满足,返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行。During the operation of at least one application program, detect the upgrade trigger message sent by the device management server; determine whether the resource occupation of the currently running application program meets the upgrade conditions; if so, download the program to be upgraded from the upgrade server; run the For the program to be upgraded, complete the upgrade task of the Internet of Things device; if it is not satisfied, return to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition and continue execution.
作为一个实施例,所述处理组件判断当前运行的应用程序的资源占用是否满足升级条件具体可以是:As an embodiment, the processing component judging whether the resource occupation of the currently running application program satisfies the upgrade condition may specifically be:
基于预设监控频率,判断当前运行的应用程序的资源占用是否满足升级条件。Based on the preset monitoring frequency, it is determined whether the resource occupation of the currently running application program meets the upgrade conditions.
作为一个实施例,所述处理组件处理如果不满足,返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行具体可以是:As an embodiment, if the processing component processing is not satisfied, returning to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition and continuing to execute may specifically be:
如果不满足,基于当前运行的应用程序的资源占用,关闭至少部分应用程序;返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行。If not, close at least part of the application based on the resource occupation of the currently running application; return to the step of judging whether the resource occupation of the currently running application meets the upgrade condition and continue execution.
图11所述的物联网设备可以执行图7所示实施例所述的物联网设备的程序升级方法,其实现原理和技术效果不再赘述。对于上述实施例中的物联网设备其中的处理组件所执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细 阐述说明。The Internet of Things device described in FIG. 11 can execute the program upgrade method of the Internet of Things device described in the embodiment shown in FIG. 7, and its implementation principles and technical effects will not be described in detail. The specific operation performed by the processing component of the IoT device in the foregoing embodiment has been described in detail in the embodiment of the method, and will not be elaborated here.
实施例未详细描述的部分,可参考对图1~图7所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1~图7所示实施例中的描述,在此不再赘述。For parts that are not described in detail in the embodiment, reference may be made to the relevant description of the embodiment shown in FIG. 1 to FIG. 7. For the implementation process and technical effects of this technical solution, please refer to the description in the embodiment shown in FIG. 1 to FIG. 7, which will not be repeated here.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement without creative work.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助加必需的通用硬件平台的方式来实现,当然也可以通过硬件和程序结合的方式来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以计算机产品的形式体现出来,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Through the description of the above implementation manners, those skilled in the art can clearly understand that each implementation manner can be implemented by adding a necessary general hardware platform, and of course, it can also be implemented by a combination of hardware and programs. Based on this understanding, the above technical solution essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present invention can be used in one or more computer usable storage containing computer usable program codes. The form of a computer program product implemented on a medium (including but not limited to disk storage, CD-ROM, optical storage, etc.).
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网 络接口和内存。In a typical configuration, the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-permanent 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 computer readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. The information can be computer-readable instructions, data structures, program modules, 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, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features thereof are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (22)

  1. 一种物联网设备的程序升级方法,其特征在于,包括:A method for program upgrading of Internet of Things equipment, which is characterized in that it comprises:
    在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;During the operation of at least one application program, detecting an upgrade trigger message sent by the device management server;
    响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序;In response to the upgrade trigger message, close at least part of the application based on the resource occupation of the at least one application;
    从升级服务端下载待升级程序;Download the program to be upgraded from the upgrade server;
    运行所述待升级程序,完成所述物联网设备的升级任务;Run the program to be upgraded to complete the upgrade task of the Internet of Things device;
    重新运行所述至少一个应用程序。Re-run the at least one application program.
  2. 根据权利要求1所述的方法,其特征在于,所述响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序包括:The method according to claim 1, wherein, in response to the upgrade trigger message, shutting down at least part of the application based on the resource occupation of the at least one application comprises:
    响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭所有应用程序。In response to the upgrade trigger message, all applications are closed based on the resource occupation of the at least one application.
  3. 根据权利要求2所述的方法,其特征在于,所述从升级服务端下载待升级程序包括:The method according to claim 2, wherein the downloading the program to be upgraded from the upgrade server comprises:
    切换所述物联网设备至下载模式,以从升级服务端下载待升级程序;Switch the Internet of Things device to a download mode to download the program to be upgraded from the upgrade server;
    所述运行所述待升级程序,完成所述物联网设备的升级任务之前,还包括:Before the running the program to be upgraded and completing the upgrade task of the Internet of Things device, it further includes:
    检测所述待升级程序下载完成时,切换所述物联网设备至升级模式;When detecting that the download of the program to be upgraded is complete, switch the Internet of Things device to an upgrade mode;
    所述运行所述待升级程序,完成所述物联网设备的升级任务包括:The running the program to be upgraded and completing the upgrade task of the Internet of Things device includes:
    检测所述物联网设备处于升级模式时,运行所述待升级程序,完成所述物联网设备的升级任务。When detecting that the Internet of Things device is in the upgrade mode, run the program to be upgraded to complete the upgrade task of the Internet of Things device.
  4. 根据权利要求3所述的方法,其特征在于,所述切换所述物联网设备至下载模式,以从升级服务端下载待升级程序包括:The method according to claim 3, wherein the switching the Internet of Things device to a download mode to download the program to be upgraded from an upgrade server comprises:
    设置所述物联网设备为下载模式并重启所述物联网设备,以切换所述物联网设备至下载模式;Setting the Internet of Things device to download mode and restarting the Internet of Things device to switch the Internet of Things device to the download mode;
    检测升级标志位为第一标志时,从升级服务端下载待升级程序。When it is detected that the upgrade flag is the first flag, the program to be upgraded is downloaded from the upgrade server.
  5. 根据权利要求4所述的方法,其特征在于,所述检测升级标志位为第一标志时,从升级服务端下载待升级程序包括:The method according to claim 4, wherein when the detecting that the upgrade flag is the first flag, downloading the program to be upgraded from the upgrade server comprises:
    在所述物联网设备的引导程序启动时,检测所述升级标志位为第一标志时,从升级服务端下载待升级程序。When the boot program of the Internet of Things device is started, when it is detected that the upgrade flag is the first flag, the program to be upgraded is downloaded from the upgrade server.
  6. 根据权利要求5所述的方法,其特征在于,所述在所述物联网设备的引导程序启 动时,检测所述升级标志位为第一标志时,从升级服务端下载待升级程序包括:The method according to claim 5, wherein the detecting that the upgrade flag is the first flag when the boot program of the Internet of Things device is started, downloading the program to be upgraded from the upgrade server comprises:
    在所述物联网设备的引导程序启动时,检测所述升级标志位为第一标志时,运行所述物联网设备的操作系统单元;When the boot program of the Internet of Things device is started, when it is detected that the upgrade flag is the first flag, run the operating system unit of the Internet of Things device;
    检测与所述升级服务端的网络连接已完成时,检测所述物联网设备为下载模式时,从所述升级服务端下载待升级程序。When it is detected that the network connection with the upgrade server is completed, and when it is detected that the Internet of Things device is in the download mode, download the program to be upgraded from the upgrade server.
  7. 根据权利要求3所述的方法,其特征在于,所述检测所述待升级程序下载完成时,切换所述物联网设备至升级模式包括:The method according to claim 3, wherein when detecting that the download of the program to be upgraded is completed, switching the Internet of Things device to an upgrade mode comprises:
    检测所述待升级程序下载完成时,清除所述下载模式并设置升级标志位为第二标志;When detecting that the download of the program to be upgraded is completed, clear the download mode and set the upgrade flag bit as the second flag;
    重启所述物联网设备;Restart the Internet of Things device;
    检测所述升级标志位为第二标志时,确认切换至升级模式。When detecting that the upgrade flag bit is the second flag, confirm switching to the upgrade mode.
  8. 根据权利要求7所述的方法,其特征在于,所述检测所述升级标志位为第二标志时,确认切换至升级模式包括:The method according to claim 7, wherein when the detecting that the upgrade flag bit is the second flag, confirming to switch to the upgrade mode comprises:
    在所述物联网设备的引导程序启动时,检测所述升级标志位为第二标志时,确认切换至升级模式。When the boot program of the Internet of Things device is started, when it is detected that the upgrade flag bit is the second flag, it is confirmed to switch to the upgrade mode.
  9. 根据权利要求7所述的方法,其特征在于,所述检测所述物联网设备处于升级模式时,运行所述待升级程序,完成所述物联网设备的升级任务之后,还包括:The method according to claim 7, characterized in that, when detecting that the IoT device is in an upgrade mode, running the program to be upgraded, and after completing the upgrade task of the IoT device, the method further comprises:
    设置所述升级标志位为第一标志。Set the upgrade flag bit as the first flag.
  10. 根据权利要求4所述的方法,其特征在于,所述重新运行所述至少一个应用程序包括:The method according to claim 4, wherein the re-running the at least one application program comprises:
    重启所述物联网设备,以重新运行所述至少一个应用程序。Restart the Internet of Things device to re-run the at least one application.
  11. 根据权利要求10所述的方法,其特征在于,所述重启所述物联网设备,以重新运行所述至少一个应用程序包括:The method according to claim 10, wherein the restarting the Internet of Things device to re-run the at least one application program comprises:
    运行重启指令,启动引导程序;Run the restart command to start the boot program;
    检测升级标志位为第一标志时,启动操作系统并建立网络连接;When detecting that the upgrade flag is the first flag, start the operating system and establish a network connection;
    检测未处于下载模式时,启动所述至少一个应用程序。When it is detected that it is not in the download mode, the at least one application is started.
  12. 根据权利要求1所述的方法,其特征在于,所述响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序包括:The method according to claim 1, wherein, in response to the upgrade trigger message, shutting down at least part of the application based on the resource occupation of the at least one application comprises:
    响应于所述升级触发消息,如果所述至少一个应用程序的资源占用大于相对应的占用阈值,关闭至少部分应用程序。In response to the upgrade trigger message, if the resource occupancy of the at least one application program is greater than the corresponding occupancy threshold, close at least part of the application program.
  13. 根据权利要求1所述的方法,其特征在于,所述响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序包括:The method according to claim 1, wherein, in response to the upgrade trigger message, shutting down at least part of the application based on the resource occupation of the at least one application comprises:
    确定与所述升级触发消息对应升级任务的升级类型;其中,所述升级类型包括全量升级或增量升级;Determine the upgrade type of the upgrade task corresponding to the upgrade trigger message; wherein, the upgrade type includes full upgrade or incremental upgrade;
    如果所述升级类型为全量升级,解除所述至少一个应用程序的资源占用,以关闭所述至少一个应用程序;If the upgrade type is a full upgrade, release the resource occupation of the at least one application program to close the at least one application program;
    如果所述升级类型为增量升级,确定与所述增量升级相匹配的目标资源;根据所述至少一个应用程序的资源占用以及所述目标资源,解除至少部分应用程序的资源占用,以使所述物联网设备中剩余资源满足所述目标资源的需求。If the upgrade type is an incremental upgrade, determine the target resource that matches the incremental upgrade; according to the resource occupation of the at least one application and the target resource, release at least part of the application's resource occupation, so that The remaining resources in the Internet of Things device meet the requirements of the target resources.
  14. 根据权利要求1所述的方法,其特征在于,所述从升级服务端下载待升级程序包括:The method according to claim 1, wherein the downloading the program to be upgraded from the upgrade server comprises:
    基于超文本传输安全协议,从升级服务端下载待升级程序。Based on the hypertext transmission security protocol, download the program to be upgraded from the upgrade server.
  15. 根据权利要求1所述的方法,其特征在于,所述从升级服务端下载待升级程序之前,还包括:The method according to claim 1, wherein before the downloading the program to be upgraded from the upgrade server, the method further comprises:
    启动下载监控任务,利用所述下载监控任务监控所述待升级程序的下载过程。Start the download monitoring task, and use the download monitoring task to monitor the download process of the program to be upgraded.
  16. 一种物联网设备的程序升级方法,其特征在于,包括:A method for program upgrading of Internet of Things equipment, which is characterized in that it comprises:
    在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;During the operation of at least one application program, detecting an upgrade trigger message sent by the device management server;
    判断当前运行的应用程序的资源占用是否满足升级条件;Determine whether the resource occupancy of the currently running application program meets the upgrade conditions;
    如果满足,从升级服务端下载待升级程序;运行所述待升级程序,完成所述物联网设备的升级任务;If it is satisfied, download the program to be upgraded from the upgrade server; run the program to be upgraded to complete the upgrade task of the Internet of Things device;
    如果不满足,返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行。If it is not satisfied, return to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition and continue to execute.
  17. 根据权利要求16所述的方法,其特征在于,所述判断当前运行的应用程序的资源占用是否满足升级条件包括:The method according to claim 16, wherein the judging whether the resource occupation of the currently running application program satisfies the upgrade condition comprises:
    基于预设监控频率,判断当前运行的应用程序的资源占用是否满足升级条件。Based on the preset monitoring frequency, it is determined whether the resource occupation of the currently running application program meets the upgrade conditions.
  18. 根据权利要求16所述的方法,其特征在于,所述如果不满足,返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行包括:The method according to claim 16, characterized in that, if it is not satisfied, returning to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition and continuing to execute comprises:
    如果不满足,基于当前运行的应用程序的资源占用,关闭至少部分应用程序;返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行。If not, close at least part of the application based on the resource occupation of the currently running application; return to the step of judging whether the resource occupation of the currently running application meets the upgrade condition and continue execution.
  19. 一种物联网设备的程序升级装置,其特征在于,包括:A program upgrade device for Internet of Things equipment, which is characterized in that it includes:
    消息检测模块,用于在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;The message detection module is used to detect the upgrade trigger message sent by the device management server during the running process of at least one application;
    消息响应模块,用于响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序;A message response module, configured to close at least part of the application based on the resource occupation of the at least one application in response to the upgrade trigger message;
    程序下载模块,用于从升级服务端下载待升级程序;Program download module, used to download the program to be upgraded from the upgrade server;
    程序升级模块,用于运行所述待升级程序,完成所述物联网设备的升级任务;The program upgrade module is used to run the program to be upgraded and complete the upgrade task of the Internet of Things device;
    程序运行模块,用于重新运行所述至少一个应用程序。The program running module is used to re-run the at least one application program.
  20. 一种物联网设备的程序升级装置,其特征在于,包括:A program upgrade device for Internet of Things equipment, which is characterized in that it includes:
    消息检测模块,用于在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;The message detection module is used to detect the upgrade trigger message sent by the device management server during the running process of at least one application;
    条件判断模块,用于判断当前运行的应用程序的资源占用是否满足升级条件;The condition judgment module is used to judge whether the resource occupation of the currently running application program meets the upgrade conditions;
    第一处理模块,用于如果满足,从升级服务端下载待升级程序;运行所述待升级程序,完成所述物联网设备的升级任务;The first processing module is configured to download the program to be upgraded from the upgrade server if it is satisfied; run the program to be upgraded to complete the upgrade task of the Internet of Things device;
    第二处理模块,用于如果不满足,返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行。The second processing module is configured to return to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition if it is not satisfied, and continue execution.
  21. 一种物联网设备,其特征在于,包括:存储组件与处理组件;所述存储组件用于存储一条或多条计算机指令;所述一条或多条计算机指令被所述处理组件调用;An Internet of Things device, characterized by comprising: a storage component and a processing component; the storage component is used to store one or more computer instructions; the one or more computer instructions are called by the processing component;
    所述处理组件用于:The processing component is used for:
    在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;响应于所述升级触发消息,基于所述至少一个应用程序的资源占用,关闭至少部分应用程序;从升级服务端下载待升级程序;运行所述待升级程序,完成所述物联网设备的升级任务;重新运行所述至少一个应用程序。During the operation of at least one application, detect an upgrade trigger message sent by the device management server; in response to the upgrade trigger message, close at least part of the application based on the resource occupation of the at least one application; from the upgrade server Download the program to be upgraded; run the program to be upgraded to complete the upgrade task of the Internet of Things device; re-run the at least one application program.
  22. 一种物联网设备,其特征在于,包括:存储组件与处理组件;所述存储组件用于存储一条或多条计算机指令;所述一条或多条计算机指令被所述处理组件调用;An Internet of Things device, characterized by comprising: a storage component and a processing component; the storage component is used to store one or more computer instructions; the one or more computer instructions are called by the processing component;
    所述处理组件用于:The processing component is used for:
    在至少一个应用程序的运行过程中,检测设备管理服务端发送的升级触发消息;判断当前运行的应用程序的资源占用是否满足升级条件;如果满足,从升级服务端下载待升级程序;运行所述待升级程序,完成所述物联网设备的升级任务;如果不满足,返回至所述判断当前运行的应用程序的资源占用是否满足升级条件的步骤继续执行。During the operation of at least one application program, detect the upgrade trigger message sent by the device management server; determine whether the resource occupation of the currently running application program meets the upgrade conditions; if so, download the program to be upgraded from the upgrade server; run the For the program to be upgraded, complete the upgrade task of the Internet of Things device; if it is not satisfied, return to the step of judging whether the resource occupation of the currently running application program meets the upgrade condition and continue execution.
PCT/CN2020/117622 2019-09-27 2020-09-25 Program upgrade method and apparatus for internet of things device, and internet of things device WO2021057880A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910926491.5 2019-09-27
CN201910926491.5A CN112579114A (en) 2019-09-27 2019-09-27 Program upgrading method and device for Internet of things equipment and Internet of things equipment

Publications (1)

Publication Number Publication Date
WO2021057880A1 true WO2021057880A1 (en) 2021-04-01

Family

ID=75110054

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117622 WO2021057880A1 (en) 2019-09-27 2020-09-25 Program upgrade method and apparatus for internet of things device, and internet of things device

Country Status (3)

Country Link
CN (1) CN112579114A (en)
TW (1) TW202113587A (en)
WO (1) WO2021057880A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113242288B (en) * 2021-05-06 2022-03-08 国家计算机网络与信息安全管理中心 Internet of things equipment firmware upgrading method, system and device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101105756A (en) * 2007-08-21 2008-01-16 中兴通讯股份有限公司 Multi-core terminal firmware upgrading method
CN103530146A (en) * 2013-09-16 2014-01-22 成都交大光芒科技股份有限公司 Low-power-consumption embedded device remote wireless updating method
CN106101835A (en) * 2016-07-05 2016-11-09 青岛海信电器股份有限公司 Intelligent television upgrade control method and device
CN109445809A (en) * 2018-08-29 2019-03-08 交控科技股份有限公司 Train automatic monitoring ATS subsystem software automatically updating method and system
CN109766109A (en) * 2018-12-17 2019-05-17 浙江创意声光电科技有限公司 The client update method of lighting controller, apparatus and system
CN110221856A (en) * 2019-06-25 2019-09-10 努比亚技术有限公司 A kind of wearable device upgrade method, wearable device and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239111B (en) * 2014-09-30 2017-11-07 北京金山安全软件有限公司 Application program upgrading method and device and terminal
CN105721941B (en) * 2016-01-18 2019-08-13 贵阳海信电子有限公司 The aerial downloading upgrade control method and device of cloud TV
CN106325929B (en) * 2016-08-22 2020-02-07 合肥美的智能科技有限公司 Firmware upgrading method, firmware upgrading device, refrigerator and server
CN107992318A (en) * 2017-12-07 2018-05-04 北京趣拿软件科技有限公司 Application program updating method, apparatus, storage medium and processor
CN110086885A (en) * 2019-05-10 2019-08-02 上海擎感智能科技有限公司 The upgrade package method for down loading and device of space download technology, storage medium and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101105756A (en) * 2007-08-21 2008-01-16 中兴通讯股份有限公司 Multi-core terminal firmware upgrading method
CN103530146A (en) * 2013-09-16 2014-01-22 成都交大光芒科技股份有限公司 Low-power-consumption embedded device remote wireless updating method
CN106101835A (en) * 2016-07-05 2016-11-09 青岛海信电器股份有限公司 Intelligent television upgrade control method and device
CN109445809A (en) * 2018-08-29 2019-03-08 交控科技股份有限公司 Train automatic monitoring ATS subsystem software automatically updating method and system
CN109766109A (en) * 2018-12-17 2019-05-17 浙江创意声光电科技有限公司 The client update method of lighting controller, apparatus and system
CN110221856A (en) * 2019-06-25 2019-09-10 努比亚技术有限公司 A kind of wearable device upgrade method, wearable device and storage medium

Also Published As

Publication number Publication date
CN112579114A (en) 2021-03-30
TW202113587A (en) 2021-04-01

Similar Documents

Publication Publication Date Title
US11146620B2 (en) Systems and methods for instantiating services on top of services
US8997090B2 (en) Installing an operating system in a host system
US11301280B2 (en) System and method for managing a monitoring agent in an operating system of a virtual computing instance
US10891122B2 (en) Rolling upgrade of a distributed application
WO2015196967A1 (en) Method and apparatus for application to permanently reside in background of operating system
WO2019184164A1 (en) Method for automatically deploying kubernetes worker node, device, terminal apparatus, and readable storage medium
WO2016177260A1 (en) Libvirt software hot upgrading method and device
US10212034B1 (en) Automated network change management
US9268662B2 (en) Method and system for a high availability framework
CN111552489B (en) User mode file system hot upgrading method, device, server and medium
US11231919B2 (en) Live updates of stateful components
US10404568B2 (en) Agent manager for distributed transaction monitoring system
WO2016078362A1 (en) Method and device for upgrade board by board in dual master control isolation
CN104636159B (en) The method and apparatus that software in virtual machine is upgraded
WO2021057880A1 (en) Program upgrade method and apparatus for internet of things device, and internet of things device
CN111752577B (en) Upgrading method and equipment for system version
CN109218338B (en) Information processing system, method and device
US10394619B2 (en) Signature-based service manager with dependency checking
WO2018010603A1 (en) Storage mode upgrade method, apparatus and system based on video cloud storage system
CN116521209A (en) Upgrading method and device of operating system, storage medium and electronic equipment
CN115878136A (en) Deployment method, device and system based on bare metal server
US20230032581A1 (en) Method and Apparatus for Processing Virtual Machine Component
JP2010170285A (en) Service provider node, program for providing service, and software updating method
CN110727945B (en) Virus scanning method, device and computer readable medium
TWI554876B (en) Method for processing node replacement and server system using the same

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20867811

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20867811

Country of ref document: EP

Kind code of ref document: A1