WO2021223247A1 - Device upgrading method, smart device, and computer readable storage medium - Google Patents

Device upgrading method, smart device, and computer readable storage medium Download PDF

Info

Publication number
WO2021223247A1
WO2021223247A1 PCT/CN2020/089281 CN2020089281W WO2021223247A1 WO 2021223247 A1 WO2021223247 A1 WO 2021223247A1 CN 2020089281 W CN2020089281 W CN 2020089281W WO 2021223247 A1 WO2021223247 A1 WO 2021223247A1
Authority
WO
WIPO (PCT)
Prior art keywords
node device
software
update
attribute
mapping relationship
Prior art date
Application number
PCT/CN2020/089281
Other languages
French (fr)
Chinese (zh)
Inventor
杨宁
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to CN202080098880.4A priority Critical patent/CN115335803B/en
Priority to PCT/CN2020/089281 priority patent/WO2021223247A1/en
Publication of WO2021223247A1 publication Critical patent/WO2021223247A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • This application relates to the technical field of the Internet of Things, and in particular to a device upgrade method, a smart device, and a computer-readable storage medium.
  • the Internet of Things is an information carrier based on the Internet and traditional telecommunications networks. It enables all ordinary physical objects that can be independently addressed to achieve interconnection and interoperability, and can realize intelligent identification, positioning, management and other functions.
  • the Internet of Things has a huge number of connected devices, but the huge connected devices correspond to many technical standards. The standards have not yet been fully interconnected and cannot reach the state of interconnection of all things.
  • the Open Connectivity Foundation (OCF) protocol can realize connections between tens of billions of devices, and realize safe and reliable device discovery and connection mechanisms across different operating systems and platforms. How to realize the upgrade management of IoT devices with different transmission protocols under the OCF protocol has become a hot issue of research.
  • the embodiments of the present application provide a device upgrade method, a smart device, and a computer-readable storage medium, which can implement device upgrade management for various connected node devices under the OCF protocol.
  • the first aspect of the embodiments of the present application provides a device upgrade method, including:
  • the first mapping relationship is established, and the first mapping relationship refers to the update mapping information between the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device, the update mapping
  • the information includes the mapping relationship of update version attributes and the mapping relationship of update status attributes;
  • a second aspect of the embodiments of the present application provides a device upgrade device, the device includes:
  • the establishment unit is used to establish a first mapping relationship, and the first mapping relationship refers to the update mapping information between the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device ,
  • the update mapping information includes the mapping relationship of the update version attribute and the mapping relationship of the update status attribute;
  • An obtaining unit configured to obtain a software update data package related to the node device and the first mapping relationship if an upgrade event of the connected node device is detected;
  • the upgrade unit is configured to perform upgrade processing on the node device according to the software update data package and the first mapping relationship.
  • the third aspect of the embodiments of the present application provides a smart device, including a processor, a memory, a communication interface, and one or more programs.
  • the one or more programs are stored in the memory and configured by The processor executes, and the program includes instructions for executing the steps in the method according to the first aspect described above.
  • the fourth aspect of the embodiments of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables the computer to execute Part or all of the steps described in the method described in the aspect.
  • the fifth aspect of the embodiments of the present application provides a computer program product, wherein the above-mentioned computer program product includes a computer program stored on a computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer At this time, the computer is caused to execute part or all of the steps described in the method described in the first aspect of the embodiments of the present application.
  • the processing module establishes the updated mapping information between the software update resource in the OCF service module of the Virtual Open Connectivity Foundation and the over-the-air download cluster OTA Cluster in the node device.
  • the updated mapping information includes the mapping of the updated version attribute The mapping relationship between the relationship and the update status attribute. If the processing module detects the upgrade event of the connected node device, it can obtain the software update data packet related to the node device and the first mapping relationship. Further, the processing module can be based on the software The data packet and the first mapping relationship are updated, and the node device is upgraded, so that the device upgrade management of various connected node devices under the OCF protocol can be realized.
  • FIG. 1 is a schematic diagram of the architecture of a device upgrade system provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a device upgrade method provided by an embodiment of the application
  • FIG. 3 is a schematic flowchart of another device upgrade method provided by an embodiment of the application.
  • FIG. 4 is a schematic flowchart of another device upgrade method provided by an embodiment of the application.
  • FIG. 5 is a schematic flowchart of another device upgrade method provided by an embodiment of this application.
  • FIG. 6 is a schematic structural diagram of a device upgrading apparatus provided by an embodiment of the application.
  • FIG. 7 is a schematic structural diagram of a smart device provided by an embodiment of this application.
  • the Internet of Things system includes a bridge platform, multiple node devices, and OCF devices.
  • the OCF device can access the node device through the node device protocol to the bridge platform of the OCF protocol.
  • FIG. 1 is a schematic diagram of the architecture of an equipment upgrade system provided by an embodiment of the present application.
  • the equipment upgrade system includes an OCF device, a virtual OCF service module, a processing module, a virtual node service module, and a node device.
  • the virtual OCF service module is established for the OCF device.
  • the OCF device can transmit data through the virtual OCF service module and exchange data between the processing modules.
  • the virtual node service module is established for the node device. Data can be transmitted through the virtual node service module, and different node devices can establish different virtual node service modules.
  • the node device can be a ZigBee device, for example, it can be a light bulb that supports the ZigBee protocol, or a light switch that supports the ZigBee protocol, or a smart home such as a refrigerator that supports the ZigBee protocol. Of course, it can also be a device that transmits data based on other transmission methods. , Such as Bluetooth speakers.
  • the processing module in Figure 1 can realize the function of the bridge platform.
  • Table 1 is a mapping model from the ZigBee protocol to the OCF protocol.
  • the ZigBee device corresponds to the OCF device
  • the service cluster of the ZigBee device corresponds to the resource type of the OCF device
  • the ZigBee protocol attribute corresponds to the OCF protocol resource attribute.
  • Table 1 shows the protocol specifications and software update resource descriptions related to the software update resource types of OCF devices
  • Table 3 shows "oic.r.softwareupdate”.
  • "Resource type definition Table 4 shows the definition of the "swupdteaction” attribute value
  • Table 5 shows the definition of the "swupdatestatus” attribute value
  • Table 6 shows the definition of the "swupdateresult” attribute value
  • Table 7 shows the Over the air cluster (Over the Air Cluster, OTA Cluster) related protocol specifications and descriptions in the ZigBee device.
  • Table 8 shows the definition of OTA Cluster attributes.
  • Cluster ID describe 0x0019 OAT upgrade Parameters and commands are used for device OTA upgrade
  • a device upgrade method, smart device, and computer-readable storage medium are provided, which are helpful for implementing device upgrade management of various node devices that are accessed under the OCF protocol. Detailed descriptions are given below.
  • FIG. 2 is a schematic flowchart of a device upgrade method provided by an embodiment of the present application.
  • the method of this embodiment is applied to the above-mentioned device upgrade system, and is mainly executed by the above-mentioned smart device, and specifically is executed by a processor provided in the smart device, and the processor is the same as the processing shown in FIG. 1 above.
  • Module correspondence the description includes the following steps.
  • the first mapping relationship refers to the update mapping information between the software update resource in the virtual OCF service module and the OTA Cluster in the node device.
  • the update mapping information includes the mapping relationship and the updated version attribute. Update the mapping relationship of status attributes.
  • the processing module when the processing module receives a notification that the node device to be upgraded accesses the virtual node service module, it can establish the update mapping information between the software update resource in the virtual OCF service module and the OTA Cluster in the node device.
  • Table 9 shows the software update resource in the virtual OCF service module and the update mapping information between the OTA Cluster in the ZigBee device
  • the update mapping information between the OTA Cluster in the ZigBee device and the software update resources of the virtual OCF service module includes the mapping relationship between the update version attribute and the update status attribute.
  • "0x0009” in Table 9 is used to identify the OTA Cluster in the ZigBee device
  • "0x0004" is used to identify the downloaded software version in the ZigBee attribute
  • "0x0006” is used to identify the mirror upgrade status in the ZigBee attribute
  • "oic.r.softwareupdate” "Is used to identify the software update resource in the virtual OCF service module
  • "nv” is used to describe the new software version available in the software update resource attribute
  • “swupdatestatus” is used to describe the software update status in the software update resource attribute.
  • the mapping relationship of update version attributes refers to the mapping between "0x0004" and “nv” in the table
  • the mapping relationship of update status attributes refers to the mapping between "0x0006" and "swupdatestatus”.
  • the processing module may establish a virtual OCF device after establishing the first mapping relationship, where the virtual OCF device may include software update resources, and the processing module may associate the address information of the associated server provided by the device manufacturer of the node device It is added to the software update resource as the first attribute, that is, the information whose attribute name is "purl" in Table 3, and the signature method of the associated server of the node device is added to the software update resource as the second attribute, that is, For example, in Table 3, the attribute name is "signed".
  • the address information of the associated server is the address for downloading the latest software package
  • the signature method of the associated server is used to verify the downloaded latest software package.
  • the processing module can detect the upgrade event of the connected node device, it can obtain the software update data package related to the node device, and obtain the first mapping relationship, so as to perform the upgrade process on the node device.
  • the upgrade event of the node device may be when the node device initiates an update request, or when the OCF device detects that the node device needs to be upgraded, or the smart device actively confirms that there is an upgrade event when the update cycle arrives, and so on.
  • the processing module may obtain a software update data package related to the node device to upgrade the node device when the local version information of the node device is lower than the service version information on the associated server, and Obtain the first mapping relationship.
  • the processing module can perform data upgrade processing on the node device according to the software data package.
  • the relevant attributes in the OTA Cluster of the node device will change.
  • the processing module can perform upgrade feedback processing on the status of the node device upgrade process.
  • the processing module can obtain the software data packet according to the address information included in the first attribute. If the processing module receives the first software data packet update request of the node device, it can send the data packet to the node according to the obtained software data packet.
  • the equipment performs data upgrade processing.
  • the download status of the software data package may be mapped into the first mapping relation according to the update status attribute in the first mapping relation
  • the update status attribute of the software package is sent to the virtual OCF service module to send download status feedback information including the download status of the software data package.
  • the processing module may receive feedback information sent by the node device through the virtual node service module, and the feedback information includes node device software version information and node device software update status information. After receiving the feedback information, the processing module can map the node device software version information to the updated version attribute in the first mapping relationship according to the update version attribute and the update status attribute in the first mapping relationship, and map the node device software update status information Is the update state attribute in the first mapping relationship. Then, the processing module may send to the virtual OCF service module the upgrade status feedback information including the update version attribute of the virtual OCF service module and the software update status attribute of the virtual OCF service module.
  • the processing module can establish a first mapping relationship.
  • the first mapping relationship refers to the update mapping information between the software update resource in the virtual OCF service module and the OTA Cluster in the node device.
  • the update mapping information includes The mapping relationship between the update version attribute and the update status attribute. If the processing module detects the upgrade event of the connected node device, it can obtain the software update data package related to the node device, and obtain the first mapping relationship, and further Yes, the processing module performs upgrade processing on the node device according to the software update data packet and the first mapping relationship.
  • FIG. 3 is a schematic flowchart of another device upgrade method provided by an embodiment of the present application.
  • the method of this embodiment is applied to the above-mentioned device upgrade system, and is mainly executed by the above-mentioned smart device, and specifically is executed by a processor provided in the smart device, and the processor is the same as the processing shown in FIG. 1 above.
  • Module correspondence the description includes the following steps.
  • the virtual node service module can allow device access, and the node device transmits data through the virtual node service module.
  • the node device can send an access request to the virtual node service module. After the virtual node service module receives the request, it can allow the node device to access, and return a message to the node device that the device is successfully connected, so that the node device Confirm whether the connection is successful.
  • the virtual node service module may send a device access notification to the processing module, so that the OCF device can determine that the node device is an access system when the node device upgrade event is triggered of.
  • step 301 For the specific implementation of step 301, reference may be made to the specific description of step 201 in the foregoing embodiment, which will not be repeated here.
  • the OCF device triggers an upgrade event of the node device.
  • the OCF device can trigger the upgrade event of the node device, and the trigger mode can be that the OCF device triggers the virtual OCF service module to perform software upgrade.
  • the processing module can detect the upgrade event of the connected node device.
  • the virtual OCF service module may send the address information included in the first attribute in the software update resource to the processing module, where the address information included in the first attribute is the address of the associated server, and the address of the associated server is Provided by the manufacturer of the node device, the address type of the associated server is "https://xxx". So that the processing module receives the first attribute, and obtains the latest software version according to the first attribute, and performs subsequent data upgrade processing of the node device.
  • the processing module may obtain a second mapping relationship established by the processing module, where the second mapping relationship refers to a device information mapping relationship between the virtual OCF service module and the node device.
  • the processing module can obtain the device information of the node device according to the second mapping relationship.
  • the device information can be the MAC address (Media Access Control Address), IP address (Internet Protocol Address), ID (Identity Document) of the node device, etc. Etc., so that the processing module can confirm the node device based on the device information.
  • the processing module obtains the device information of the node device, it can obtain the local version information of the node device through the virtual node service module established for the node device according to the device information.
  • the processing module sends a request for local version information of the node device to the virtual node service module. After the virtual node service module obtains the request, it can send the request to the node device. After the node device receives the request, The local version information is sent to the virtual node service module, and the virtual node service module sends the local version information to the processing module, and the processing module can obtain the local version information of the node device.
  • the virtual OCF service module sends the address information included in the first attribute in the software update resource to the processing module, that is, sends the address of the associated server to the processing module to process
  • the module can send a service version information request to the associated server according to the address of the associated server.
  • the associated server After the associated server receives the request, it can send the service version information to the processing module, and the processing module can obtain the associated server Version information on the service.
  • the processing module can determine whether the local version information is lower than the service version information. If the local version information is lower than the service version information, the node device can be notified that the device has been upgraded, and the processing module sends the upgrade notification information to the virtual node service module, and the virtual node service module receives the upgrade notification information and then upgrades the device.
  • the notification information is sent to the node device to notify the node device that it can perform upgrade processing, and request software data packages from the node device.
  • the processing module determines that the local version information is lower than the service version information, it can determine that the node device needs to be upgraded, and obtain the software data package according to the address information included in the first attribute, where the address included in the first attribute The information is the address of the associated server.
  • the processing module also needs to obtain the first mapping relationship, so that the subsequent processing module first mapping relationship can perform upgrade feedback processing on the status of the node device during the upgrade process.
  • the processing module can detect whether the local storage space satisfies the software data package storage condition before acquiring the software data package according to the address information included in the first attribute. If the local storage space is sufficient, the processing module can Download all software data packages from the associated server at one time.
  • the processing module may verify the downloaded software data package according to the signature method included in the second attribute, where the signature method included in the second attribute is provided by the manufacturer of the node device, and the signature method It is used to perform integrity check and signature verification on the software data package downloaded by the processing module. If there is no error in the verification, the software data packet can be stored in the processing module.
  • the download status of the software data package will change, and the update status attribute in the first mapping relationship will change accordingly with the change of the download status.
  • the update status attribute in the first mapping relationship refers to "0x0006" and "swupdatestatus" in Table 1.
  • Table 3 in the description with the corresponding attribute ID as "0x0006”, there are 6 situations in the OTA upgrade status, and the processing module will experience different download statuses during the download of the software data package, such as "waiting for download” and " “Download in progress” and “download complete”, therefore, during the process of downloading the software data package by the processing module, the OTA upgrade status will change with the download status of the software data package.
  • the update status attribute in the first mapping relationship will change accordingly with the change in the download status of the software data package, and the processing module can change the download status of the software data package download status. Feedback to the virtual OCF service module.
  • the virtual OCF service module may feed back the download status information Send to OCF device.
  • 311 Divide the software data packet into N data blocks, each block has M data pages, where N and M are positive integers.
  • 312 Receive the first software data package update request sent by the node device through the virtual node service module, where the first software data package update request includes the required block identifier of the first data block and the corresponding page identifier of the data page.
  • the node device can send a first software data package update request to the virtual node service module, where the first software data package update request includes the required block identifier of the first data block and Corresponding to the page identifier of the data page, the virtual node service module receives the first software data package update request, and then sends the first software data package update request to the processing module, and the processing module can receive the node device through the virtual node service The first software data package update request sent by the module.
  • the processing module uses the block identifier of the first data block and the corresponding data included in the first software data package update request.
  • the page identification of the page, the data page under the corresponding data block is sent to the virtual node service module.
  • the virtual node service module receives the data page under the corresponding data block, it sends the data page under the corresponding data block to the node device, and the node The device can then receive the data page under the requested data block.
  • 314 Receive feedback information sent by the node device through the virtual node service module, where the feedback information includes: node device software version information and node device software update status information.
  • the node device after the node device receives the data page under the requested data block sent by the processing module through the virtual node service module, the software version information of the node device and the software update status information of the node device change, and the node device can report to the virtual node service module.
  • the node service module sends feedback information that includes the software version information of the node device and the software update status information of the node device. After receiving the feedback information, the virtual node service module can send the feedback information to the processing module. You can receive the feedback information.
  • 315 According to the update version attribute and the update status attribute in the first mapping relationship, map the node device software version information to the update version attribute in the first mapping relationship, and map the node device software update status information to the update version attribute in the first mapping relationship Update the status attribute.
  • the processing module can update the version attribute and the update status attribute in the first mapping relationship according to the feedback information, map the node device software version information to the updated version attribute in the first mapping relationship, and convert The node device software update status information is mapped to the update status attribute in the first mapping relationship.
  • the processing module can make corresponding changes to the update version attribute and the update status attribute in the first mapping relationship according to the feedback information sent by the node device, and the processing module can update the version attribute and virtual OCF of the virtual OCF service module in the first mapping relationship.
  • the service module update status attribute is sent to the virtual OCF service module.
  • the update version attribute in the first mapping relationship refers to "0x0004" and “nv” in Table 1
  • the update status attribute refers to " 0x0006” and "swupdatestatus”.
  • the processing module responds to the first software data package update request sent by the node device through the virtual node service module, the node device software version information and software update status will change, where "0x0004" corresponds to the service version information of the associated server. "0x0006” corresponds to the 6 cases of the OTA upgrade status shown in Table 3.
  • the node device can send feedback information to the virtual node service module.
  • the feedback information includes the software version information of the node device and the software update status information of the node device.
  • the virtual node service module receives the feedback information , And then send the feedback information to the processing module.
  • the processing module can make corresponding changes to the update version attribute and the update status attribute in the first mapping relationship according to the feedback information.
  • the processing module may map the node device software version information to the update version attribute in the first mapping relationship, and map the node device software update status information to the update state attribute in the first mapping relationship. Then the processing module feeds back the updated version attribute and update status attribute of the virtual OCF service module to the virtual OCF service module.
  • the virtual OCF service module may use the updated version attribute and update status of the virtual OCF service module The attributes are sent to the OCF device.
  • the processing module establishes the first mapping relationship
  • the OCF device triggers the upgrade event of the node device
  • the processing module detects the upgrade event of the connected node device, and obtains the device information of the node device according to the second mapping relationship.
  • the processing module obtains the local version information of the node device through the virtual node service module established for the node device according to the device information, and obtains the service version information on the associated server according to the address information included in the first attribute.
  • the local version information is lower
  • the upgrade notification information is sent to the node device through the virtual node service module.
  • the processing module obtains the software data package according to the address information included in the first attribute, and obtains the first mapping relationship.
  • the download status of the software data package is mapped to the update status attribute in the first mapping relationship.
  • the software data packet is divided into N data blocks, each block has M data pages, where N and M are positive integers.
  • the data page under the corresponding data block is sent to the node device through the virtual node service module according to the block identifier and the corresponding page identifier.
  • Receive feedback information sent by the node device through the virtual node service module includes: node device software version information and node device software update status information, and according to the update version attribute and update status attribute in the first mapping relationship, the node device software version The information is mapped to the updated version attribute in the first mapping relationship, the node device software update status information is mapped to the update status attribute in the first mapping relationship, and the virtual OCF service module is sent to the virtual OCF service module including the updated version attribute of the virtual OCF service module and the virtual OCF service The update status feedback information of the module update status attribute.
  • FIG. 4 is a schematic flowchart of another device upgrade method provided by an embodiment of the present application.
  • the method of this embodiment is applied to the above-mentioned device upgrade system, and is mainly executed by the above-mentioned smart device, and specifically is executed by a processor provided in the smart device, and the processor is the same as the processing shown in FIG. 1 above.
  • Module correspondence the description includes the following steps.
  • the node device triggers an upgrade event of the node device.
  • the node device may trigger an upgrade event of the node device, and the trigger mode may be that the node device periodically requests an upgrade from the processing module.
  • the node device sends an upgrade request to the virtual node service module, and after the virtual node service module receives the upgrade request, it sends the upgrade request to the processing module.
  • the processing module may receive an upgrade request sent by the node device through the virtual node service module, where the upgrade request carries the local version information of the node device.
  • 408 Divide the software data packet into N data blocks, and each block has M data pages.
  • steps 401 and 404-413 please refer to the specific description of steps 301 and 306-316 in the foregoing embodiment, which will not be repeated here.
  • the processing module establishes a first mapping relationship, the node device triggers an upgrade event of the node device, and the processing module obtains an upgrade request that occurs when the node device triggers the upgrade event, where the upgrade request includes local version information of the node device .
  • the processing module obtains the service version information on the associated server according to the address information included in the first attribute, and when the local version information is lower than the service version information, obtains the software data package according to the address information included in the first attribute, and obtains The first mapping relationship.
  • the download status of the software data package is mapped to the update status attribute in the first mapping relationship.
  • the software data packet is divided into N data blocks, and each block has M data pages.
  • the processing module receives the first software data package update request sent by the node device through the virtual node service module, wherein the first software data package update request includes the required block identifier of the first data block and corresponding data
  • the page identifier of the page in response to the first software data packet request, sends the data page under the corresponding data block to the node device through the virtual node service module according to the block identifier and the corresponding page identifier.
  • Receive feedback information sent by the node device through the virtual node service module includes: node device software version information and node device software update status information, and according to the update version attribute and update status attribute in the first mapping relationship, the node device software version The information is mapped to the updated version attribute in the first mapping relationship, the node device software update status information is mapped to the update status attribute in the first mapping relationship, and the virtual OCF service module is sent to the virtual OCF service module including the updated version attribute of the virtual OCF service module and the virtual OCF service The update status feedback information of the module update status attribute.
  • FIG. 5 is a schematic flowchart of another device upgrade method provided by an embodiment of the present application.
  • the method of this embodiment is applied to the above-mentioned device upgrade system, and is mainly executed by the above-mentioned smart device, and specifically is executed by a processor provided in the smart device, and the processor is the same as the processing shown in FIG. 1 above.
  • Module correspondence the description includes the following steps.
  • the OCF device triggers an upgrade event of the node device.
  • the processing device may obtain the first mapping relationship, and the first mapping relationship may be used for feedback in subsequent steps.
  • the node device can send a second software data package update request to the virtual node service module, where the second software data package update request includes the required block identifier of the second data block and Corresponding to the page identifier of the data page, the virtual node service module receives the second software data package update request, and then sends the second software data package update request to the processing module, and the processing module can receive the node device through the virtual node service The second software data package update request sent by the module.
  • the processing module can detect whether the local storage space meets the software data package storage conditions. If the local storage space is insufficient, the processing module can check The node device downloads the corresponding software data package from the associated server through the second software data package request sent by the virtual node service module, and does not need to download all the software data packages from the associated server at one time.
  • the processing module may include the required block identifier of the second data block and the corresponding data page according to the second software data packet request. Page identification, download the data page under the corresponding data block from the associated server.
  • the processing module may verify the data page under the downloaded data block according to the signature method included in the second attribute, where the signature method included in the second attribute is provided by the manufacturer of the node device, The signature method is used to perform integrity check and signature verification on the software data package downloaded by the processing module. If there is no error in the verification, the data page under the downloaded data block can be stored in the processing module.
  • 511 Map the download status of the software data package to the update status attribute in the first mapping relationship according to the update status attribute in the first mapping relationship.
  • the processing module downloads the data page under the corresponding data block from the associated server according to the second software data packet request, and after the verification is correct, the data page under the corresponding data block can be sent to the virtual node service module, the virtual node After receiving the data page under the corresponding data block, the service module sends the data page under the corresponding data block to the node device, and the node device can receive the data page under the requested data block.
  • 514 Receive feedback information sent by the node device through the virtual node service module, where the feedback information includes: node device software version information and node device software update status information.
  • 516 Send the upgrade status feedback information including the updated version attribute of the virtual OCF service module and the updated status attribute of the virtual OCF service module to the virtual OCF service module.
  • steps 501-507, 511-512, and 514-516 please refer to the specific descriptions of steps 301-307, 309-310, and 313-316 in the foregoing embodiment, which will not be repeated here.
  • the processing module may also download the corresponding software data package according to the second software data package request of the node device, and then respond to the second software data package request.
  • the processing module establishes the first mapping relationship, and the OCF device triggers the upgrade event of the node device.
  • the processing module detects the upgrade event of the connected node device, and obtains the device information of the node device according to the second mapping relationship.
  • the processing module obtains the local version information of the node device through the virtual node service module established for the node device according to the device information, and obtains the service version information on the associated server according to the address information included in the first attribute.
  • the local version information is lower
  • the upgrade notification information is sent to the node device through the virtual node service module, and the first mapping relationship is obtained.
  • the processing module receives a second software data packet request sent by the node device through the virtual node service module, where the second software data packet request includes the block identifier of the required second data block and the page identifier of the corresponding data page. Then, download the data page under the corresponding data block from the associated server, and map the download status of the software data package to the update status attribute in the first mapping relationship according to the update status attribute in the first mapping relationship. Send the download status feedback information including the download status of the software data package to the virtual OCF service module. In response to the second software data packet request, the data page under the corresponding data block is sent to the node device through the virtual node service module.
  • Receive feedback information sent by the node device through the virtual node service module includes: node device software version information and node device software update status information, and according to the update version attribute and update status attribute in the first mapping relationship, the node device software version The information is mapped to the updated version attribute in the first mapping relationship, the node device software update status information is mapped to the update status attribute in the first mapping relationship, and the virtual OCF service module is sent to the virtual OCF service module including the updated version attribute of the virtual OCF service module and the virtual OCF service The update status feedback information of the module update status attribute.
  • the OCF device can be used to trigger the node device upgrade, and the corresponding software data package can be downloaded according to the software data package requirements of the node device, and the device upgrade management of various node devices connected under the OCF protocol can be realized.
  • FIG. 6 is a schematic structural diagram of an equipment upgrading apparatus provided by an embodiment of the present application.
  • the device includes:
  • the establishment unit 601 is configured to establish a first mapping relationship, and the first mapping relationship refers to the update mapping between the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device Information, the update mapping information includes the mapping relationship of the update version attribute and the mapping relationship of the update status attribute;
  • the acquiring unit 602 is configured to, if an upgrade event of an accessed node device is detected, acquire a software update data package related to the node device and the first mapping relationship;
  • the upgrade unit 603 is configured to perform upgrade processing on the node device according to the software update data package and the first mapping relationship.
  • the establishing unit 601 is further configured to:
  • the signature method of the associated server of the node device is added as the second attribute to the software update resource.
  • the upgrading unit 603 is specifically configured to:
  • upgrade feedback processing is performed on the state during the upgrade processing of the node device.
  • the upgrading unit 603 is specifically configured to:
  • the device further includes a sending unit 604, specifically configured to:
  • the acquiring unit 602 is specifically configured to:
  • the upgrading unit 603 is specifically used for:
  • the data page under the corresponding data block is sent to the node device through the virtual node service module according to the block identifier and the corresponding page identifier.
  • the upgrading unit 603 is further configured to:
  • the upgrading unit 602 is specifically configured to:
  • the feedback information including: node device software version information and node device software update status information;
  • the node device software version information is mapped to the update version attribute in the first mapping relationship, and the node device software update status information is mapped to the update version attribute in the first mapping relationship.
  • the detection unit 606 is specifically configured to:
  • the second software data packet request includes the block identifier of the required second data block and the corresponding data
  • the page identifier of the page and download the data page under the corresponding data block from the associated server according to the block identifier and the corresponding page identifier.
  • the upgrading unit 602 is further configured to:
  • the data page under the corresponding data block is sent to the node device through the virtual node service module.
  • the upgrade event of the accessed node device is triggered by an OCF device, where the OCF device transmits data through the virtual OCF service module, and the acquiring unit 602 further Used for:
  • the second mapping relationship refers to: a device information mapping relationship between the virtual OCF service module and the node device;
  • the upgrade event of the accessed node device is triggered by the node device, and the acquiring unit 602 is specifically configured to:
  • the establishing unit 601 establishes a first mapping relationship, and the first mapping relationship refers to: the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device
  • the update mapping information includes the update version attribute mapping relationship and the update status attribute mapping relationship.
  • the obtaining unit 602 detects the upgrade event of the connected node device, it obtains information related to the node device The software update data package and the first mapping relationship. Further, the upgrading unit 603 performs upgrade processing on the node device according to the software update data package and the first mapping relationship.
  • the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • the functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • FIG. 7 is a schematic structural diagram of a smart device provided by an embodiment of the application.
  • the smart device shown in FIG. 7 may include: a processor 701, a communication interface 702, and a memory 703.
  • the processor 701, a communication interface 702 and the memory 703 are respectively connected to a bus, where the memory 703 is used to store a computer program, and the computer program includes program instructions, and the processor 701 is used to execute the program instructions stored in the memory 703.
  • the processor 701 executes the following operations by running the executable program code in the memory 703:
  • the first mapping relationship is established, and the first mapping relationship refers to the update mapping information between the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device, the update mapping
  • the information includes the mapping relationship of update version attributes and the mapping relationship of update status attributes;
  • the processor 701 is further configured to:
  • the signature method of the associated server of the node device is added as the second attribute to the software update resource.
  • the processor 701 is specifically configured to:
  • upgrade feedback processing is performed on the state during the upgrade processing of the node device.
  • the processor 701 is specifically configured to:
  • the processor 701 is further configured to:
  • the processor 701 is specifically configured to:
  • the data page under the corresponding data block is sent to the node device through the virtual node service module according to the block identifier and the corresponding page identifier.
  • the processor 701 is further configured to:
  • the processor 701 is specifically configured to:
  • the feedback information including: node device software version information and node device software update status information;
  • the node device software version information is mapped to the update version attribute in the first mapping relationship, and the node device software update status information is mapped to the update version attribute in the first mapping relationship.
  • the processor 701 is further configured to:
  • the local storage space does not meet the software data packet storage condition, receive a second software data packet request sent by the node device through the virtual node service module, where the second software data packet request includes the required The block identifier of the second data block and the page identifier of the corresponding data page, and the data page under the corresponding data block is downloaded from the associated server according to the block identifier and the corresponding page identifier.
  • the processor 701 is further configured to:
  • the data page under the corresponding data block is sent to the node device through the virtual node service module.
  • the upgrade event of the accessed node device is triggered by an OCF device, where the OCF device transmits data through the virtual OCF service module, and the processor 701 specifically Used for:
  • the second mapping relationship refers to: a device information mapping relationship between the virtual OCF service module and the node device;
  • the local version information of the node device through a virtual node service module established for the node device, where the node device transmits data through the virtual node service module;
  • the upgrade event of the accessed node device is triggered by the node device, and the processor 701 is specifically configured to:
  • the processor 701 establishes a first mapping relationship, and the first mapping relationship refers to the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device
  • the update mapping information includes the update version attribute mapping relationship and the update status attribute mapping relationship. If the upgrade event of the connected node device is detected, the software update data related to the node device is acquired The package and the first mapping relationship, and further, the node device is upgraded according to the software update data package and the first mapping relationship.
  • An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method as recorded in the above method embodiment .
  • the embodiments of the present application also provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the method embodiments described above. Part or all of the steps described in the terminal or network device.
  • the computer program product may be a software installation package.
  • the steps of the method or algorithm described in combination with the disclosure of the present application may be implemented in a hardware manner, or may be implemented in a manner in which a processor executes software instructions.
  • Software instructions can be composed of corresponding software modules, which can be stored in random access memory (Random Access Memory, RAM), flash memory, read-only memory (Read Only Memory, ROM), and erasable programmable read-only memory ( Erasable Programmable ROM (EPROM), Electrically Erasable Programmable Read-Only Memory (Electrically EPROM, EEPROM), register, hard disk, mobile hard disk, CD-ROM or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium.
  • the storage medium may also be an integral part of the processor.
  • the processor and the storage medium may be located in the ASIC.
  • the ASIC may be located in a communication device such as a terminal.
  • the processor and the storage medium may also exist as discrete components in the communication device.
  • the program can be stored in a computer readable storage medium.
  • the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

Embodiments of the present application provide a device upgrading method, a smart device, and a computer readable storage medium. The method comprises: establishing a first mapping relationship, wherein the first mapping relationship means: update mapping information between a software update resource in a virtual Open Connectivity Foundation (OCF) service module established for the node device and an over-the-air (OTA) Cluster in the node device, and the update mapping information comprises a mapping relationship of update version attributes and a mapping relationship of update state attributes; if an upgrade event of the accessed node device is detected, obtaining a software update data packet and a first mapping relationship related to the node device; and upgrading the node device according to the software update data packet and the first mapping relationship, thereby achieving device upgrade management for the accessed node devices under an OCF protocol.

Description

一种设备升级方法、智能设备及计算机可读存储介质Device upgrading method, smart device and computer readable storage medium 技术领域Technical field
本申请涉及物联网技术领域,尤其涉及一种设备升级方法、智能设备及计算机可读存储介质。This application relates to the technical field of the Internet of Things, and in particular to a device upgrade method, a smart device, and a computer-readable storage medium.
背景技术Background technique
物联网是一个基于互联网、传统电信网等信息承载体,让所有能够被独立寻址的普通物理对象实现互联互通的网络,可以实现智能化识别、定位、管理等功能。物联网的连接设备数量庞大,但是庞大的连接设备对应着众多技术标准,标准之间尚未完全互联互通,达不到万物相联的状态。而开放连接基金会(OpenConnectivityFoundation,OCF)协议能够实现百亿级别设备间的连接,跨越不同的操作系统和平台实现安全、可靠的设备发现和连接机制。如何实现各种不同传输协议的物联网设备在OCF协议下的升级管理成为研究的热点问题。The Internet of Things is an information carrier based on the Internet and traditional telecommunications networks. It enables all ordinary physical objects that can be independently addressed to achieve interconnection and interoperability, and can realize intelligent identification, positioning, management and other functions. The Internet of Things has a huge number of connected devices, but the huge connected devices correspond to many technical standards. The standards have not yet been fully interconnected and cannot reach the state of interconnection of all things. The Open Connectivity Foundation (OCF) protocol can realize connections between tens of billions of devices, and realize safe and reliable device discovery and connection mechanisms across different operating systems and platforms. How to realize the upgrade management of IoT devices with different transmission protocols under the OCF protocol has become a hot issue of research.
发明内容Summary of the invention
本申请实施例提供了一种设备升级方法、智能设备及计算机可读存储介质,可实现在OCF协议下对接入的各种节点设备进行设备升级管理。The embodiments of the present application provide a device upgrade method, a smart device, and a computer-readable storage medium, which can implement device upgrade management for various connected node devices under the OCF protocol.
本申请实施例第一方面提供了一种设备升级方法,包括:The first aspect of the embodiments of the present application provides a device upgrade method, including:
建立第一映射关系,所述第一映射关系是指:虚拟开放连接基金会OCF服务模块中的软件更新资源、与节点设备中的空中下载簇OTA Cluster之间的更新映射信息,所述更新映射信息包括更新版本属性的映射关系和更新状态属性的映射关系;The first mapping relationship is established, and the first mapping relationship refers to the update mapping information between the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device, the update mapping The information includes the mapping relationship of update version attributes and the mapping relationship of update status attributes;
在检测到所述节点设备的升级事件的情况下,获取与所述节点设备相关的软件数据包和所述第一映射关系;In the case of detecting an upgrade event of the node device, acquiring a software data package related to the node device and the first mapping relationship;
根据所述软件数据包和所述第一映射关系,对所述节点设备进行升级处理。Perform upgrade processing on the node device according to the software data package and the first mapping relationship.
本申请实施例第二方面提供了一种设备升级装置,所述装置包括:A second aspect of the embodiments of the present application provides a device upgrade device, the device includes:
建立单元,用于建立第一映射关系,所述第一映射关系是指:虚拟开放连接基金会OCF服务模块中的软件更新资源、与节点设备中的空中下载簇OTA Cluster之间的更新映射信息,所述更新映射信息包括更新版本属性的映射关系和更新状态属性的映射关系;The establishment unit is used to establish a first mapping relationship, and the first mapping relationship refers to the update mapping information between the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device , The update mapping information includes the mapping relationship of the update version attribute and the mapping relationship of the update status attribute;
获取单元,用于若检测到已接入的节点设备的升级事件,则获取与所述节点设备相关的软件更新数据包和所述第一映射关系;An obtaining unit, configured to obtain a software update data package related to the node device and the first mapping relationship if an upgrade event of the connected node device is detected;
升级单元,用于根据所述软件更新数据包和所述第一映射关系,对所述节点设备进行升级处理。The upgrade unit is configured to perform upgrade processing on the node device according to the software update data package and the first mapping relationship.
本申请实施例第三方面提供了一种智能设备,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如上述第一方面所述的方法中的步骤的指令。The third aspect of the embodiments of the present application provides a smart device, including a processor, a memory, a communication interface, and one or more programs. The one or more programs are stored in the memory and configured by The processor executes, and the program includes instructions for executing the steps in the method according to the first aspect described above.
本申请实施例第四方面提供了一种计算机可读存储介质,其中,上述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,上述计算机程序使得计算机执行如本申请实施例第一方面所述的方法中所描述的部分或全部步骤。The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables the computer to execute Part or all of the steps described in the method described in the aspect.
本申请实施例第五方面提供了一种计算机程序产品,其中,上述计算机程序产品包括存储在计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使得计算机执行如本申请实施例第一方面所述的方法中所描述的部分或全部步骤。The fifth aspect of the embodiments of the present application provides a computer program product, wherein the above-mentioned computer program product includes a computer program stored on a computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer At this time, the computer is caused to execute part or all of the steps described in the method described in the first aspect of the embodiments of the present application.
通过实施本申请实施例,处理模块建立虚拟开放连接基金会OCF服务模块中的软件更新资源、与节点设备中的空中下载簇OTA Cluster之间的更新映射信息,更新映射信息包括更新版本属性的映射关系和更新状态属性的映射关系,如果处理模块检测到已接入的节点设备的升级事件,就可以获取与节点设备相关的软件更新数据包和第一映射关系,进一步的,处理模块可以根据软件更新数据包和第一映射关系,对节点设备进行升级处理,从而可实现在OCF协议下对接入的各种节点设备进行设备升级管理。By implementing the embodiments of this application, the processing module establishes the updated mapping information between the software update resource in the OCF service module of the Virtual Open Connectivity Foundation and the over-the-air download cluster OTA Cluster in the node device. The updated mapping information includes the mapping of the updated version attribute The mapping relationship between the relationship and the update status attribute. If the processing module detects the upgrade event of the connected node device, it can obtain the software update data packet related to the node device and the first mapping relationship. Further, the processing module can be based on the software The data packet and the first mapping relationship are updated, and the node device is upgraded, so that the device upgrade management of various connected node devices under the OCF protocol can be realized.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the embodiments.
图1是本申请实施例提供的一种设备升级系统的架构示意图;FIG. 1 is a schematic diagram of the architecture of a device upgrade system provided by an embodiment of the present application;
图2为本申请实施例提供的一种设备升级方法的流程示意图;FIG. 2 is a schematic flowchart of a device upgrade method provided by an embodiment of the application;
图3为本申请实施例提供的另一种设备升级方法的流程示意图;FIG. 3 is a schematic flowchart of another device upgrade method provided by an embodiment of the application;
图4为本申请实施例提供的又一种设备升级方法的流程示意图;FIG. 4 is a schematic flowchart of another device upgrade method provided by an embodiment of the application;
图5为本申请实施例提供的又一种设备升级方法的流程示意图;FIG. 5 is a schematic flowchart of another device upgrade method provided by an embodiment of this application;
图6为本申请实施例提供的一种设备升级装置的结构示意图;FIG. 6 is a schematic structural diagram of a device upgrading apparatus provided by an embodiment of the application;
图7为本申请实施例提供的一种智能设备的结构示意图。FIG. 7 is a schematic structural diagram of a smart device provided by an embodiment of this application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图对本申请实施例中的技术方案进行清楚、详细的描述。The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the drawings in the embodiments of the present application.
物联网系统中包括桥接平台、多个节点设备、OCF设备,OCF设备可以通过节点设备的协议到OCF协议的桥接平台访问节点设备。The Internet of Things system includes a bridge platform, multiple node devices, and OCF devices. The OCF device can access the node device through the node device protocol to the bridge platform of the OCF protocol.
请参见图1,图1是本申请实施例提供的一种设备升级系统的架构示意图,该设备升级系统包括OCF设备、虚拟OCF服务模块、处理模块、虚拟节点服务模块以及节点设备。如图1所示,虚拟OCF服务模块是为OCF设备建立的,OCF设备可以通过虚拟OCF服务模块传输数据与处理模块之间交互数据,虚拟节点服务模块是为所述节点设备建立的,节点设备可以通过虚拟节点服务模块传输数据,不同的节点设备可以建立不同的虚拟节点服务模块。节点设备可以是ZigBee设备,例如,可以是支持ZigBee协议的灯泡,或者是支持ZigBee协议的灯开关,或者是支持ZigBee协议的冰箱等智能家居,当然也可以为基于其他传输方式进行数据传输的设备,比如蓝牙音箱等。图1中的处理模块可以实现桥接平台的功能。Please refer to FIG. 1. FIG. 1 is a schematic diagram of the architecture of an equipment upgrade system provided by an embodiment of the present application. The equipment upgrade system includes an OCF device, a virtual OCF service module, a processing module, a virtual node service module, and a node device. As shown in Figure 1, the virtual OCF service module is established for the OCF device. The OCF device can transmit data through the virtual OCF service module and exchange data between the processing modules. The virtual node service module is established for the node device. Data can be transmitted through the virtual node service module, and different node devices can establish different virtual node service modules. The node device can be a ZigBee device, for example, it can be a light bulb that supports the ZigBee protocol, or a light switch that supports the ZigBee protocol, or a smart home such as a refrigerator that supports the ZigBee protocol. Of course, it can also be a device that transmits data based on other transmission methods. , Such as Bluetooth speakers. The processing module in Figure 1 can realize the function of the bridge platform.
例如,以节点设备为ZigBee设备为例,表1是ZigBee协议到OCF协议的映射模型。如表1所示,ZigBee设备与OCF设备相对应,ZigBee设备的服务簇与OCF设备的资源类型相对应,ZigBee协议属性与OCF协议资源属性相对应。For example, taking the node device as a ZigBee device as an example, Table 1 is a mapping model from the ZigBee protocol to the OCF protocol. As shown in Table 1, the ZigBee device corresponds to the OCF device, the service cluster of the ZigBee device corresponds to the resource type of the OCF device, and the ZigBee protocol attribute corresponds to the OCF protocol resource attribute.
表1:Table 1:
Figure PCTCN2020089281-appb-000001
Figure PCTCN2020089281-appb-000001
Figure PCTCN2020089281-appb-000002
Figure PCTCN2020089281-appb-000002
关于表1的具体描述可以参考如下述的一系列表格,其中,表2表示的是OCF设备的软件更新资源类型有关的协议规范以及软件更新资源说明,表3表示的是“oic.r.softwareupdate”资源类型的定义,表4表示的是“swupdteaction”属性值的定义,表5表示的是“swupdatestatus”属性值的定义,表6表示的是“swupdateresult”属性值的定义,表7表示的是ZigBee设备中空中下载簇(Over the Air Cluster,OTA Cluster)有关的协议规范以及说明,表8表示的是OTA Cluster属性的定义。For a detailed description of Table 1, please refer to the following series of tables. Among them, Table 2 shows the protocol specifications and software update resource descriptions related to the software update resource types of OCF devices, and Table 3 shows "oic.r.softwareupdate". "Resource type definition, Table 4 shows the definition of the "swupdteaction" attribute value, Table 5 shows the definition of the "swupdatestatus" attribute value, Table 6 shows the definition of the "swupdateresult" attribute value, and Table 7 shows the Over the air cluster (Over the Air Cluster, OTA Cluster) related protocol specifications and descriptions in the ZigBee device. Table 8 shows the definition of OTA Cluster attributes.
表2:Table 2:
Figure PCTCN2020089281-appb-000003
Figure PCTCN2020089281-appb-000003
表3:table 3:
Figure PCTCN2020089281-appb-000004
Figure PCTCN2020089281-appb-000004
表4:Table 4:
Figure PCTCN2020089281-appb-000005
Figure PCTCN2020089281-appb-000005
Figure PCTCN2020089281-appb-000006
Figure PCTCN2020089281-appb-000006
表5:table 5:
Figure PCTCN2020089281-appb-000007
Figure PCTCN2020089281-appb-000007
表6:Table 6:
描述describe 错误码error code
空闲idle 00
升级成功update successed 11
没有足够的内存Not enough memory 22
没有足够的flashNot enough flash 33
连接丢失Connection lost 44
软件校验失败Software verification failed 55
无效的URLInvalid URL 66
下载地址URL不支持下载的协议类型The download URL does not support the download protocol type 77
固件升级失败Firmware upgrade failed 88
软件传输失败。HTTP错误码Software transfer failed. HTTP error code 400-600400-600
表7:Table 7:
簇标识Cluster ID 簇标识Cluster ID 描述describe
0x00190x0019 OAT升级OAT upgrade 参数和命令用于设备OTA升级Parameters and commands are used for device OTA upgrade
表8:Table 8:
Figure PCTCN2020089281-appb-000008
Figure PCTCN2020089281-appb-000008
Figure PCTCN2020089281-appb-000009
Figure PCTCN2020089281-appb-000009
在本申请实施例中提供了一种设备升级方法、智能设备及计算机可读存储介质,有助于实现在OCF协议下对接入的各种节点设备进行设备升级管理。以下分别详细说明。In the embodiments of the present application, a device upgrade method, smart device, and computer-readable storage medium are provided, which are helpful for implementing device upgrade management of various node devices that are accessed under the OCF protocol. Detailed descriptions are given below.
请参见图2,图2是本申请实施例提供的一种设备升级方法的流程示意图。本实施例的方法应用于上述的设备升级系统,主要由上述涉及的智能设备来执行,具体是由在该智能设备中设置的处理器来执行,该处理器与上述图1中所示的处理模块对应,所述包括以下步骤。Please refer to FIG. 2, which is a schematic flowchart of a device upgrade method provided by an embodiment of the present application. The method of this embodiment is applied to the above-mentioned device upgrade system, and is mainly executed by the above-mentioned smart device, and specifically is executed by a processor provided in the smart device, and the processor is the same as the processing shown in FIG. 1 above. Module correspondence, the description includes the following steps.
201:建立第一映射关系,第一映射关系是指:虚拟OCF服务模块中的软件更新资源、与节点设备中的OTA Cluster之间的更新映射信息,更新映射信息包括更新版本属性的映射关系和更新状态属性的映射关系。201: Establish a first mapping relationship. The first mapping relationship refers to the update mapping information between the software update resource in the virtual OCF service module and the OTA Cluster in the node device. The update mapping information includes the mapping relationship and the updated version attribute. Update the mapping relationship of status attributes.
具体的,当处理模块接到需升级的节点设备接入虚拟节点服务模块的通知,就可以建立虚拟OCF服务模块中的软件更新资源、与节点设备中的OTA Cluster之间的更新映射信息。Specifically, when the processing module receives a notification that the node device to be upgraded accesses the virtual node service module, it can establish the update mapping information between the software update resource in the virtual OCF service module and the OTA Cluster in the node device.
例如,以ZigBee设备为例,如表9所示,表9表示的是虚拟OCF服务模块中的软件更新资源、与ZigBee设备中的OTA Cluster之间的更新映射信息For example, taking the ZigBee device as an example, as shown in Table 9, Table 9 shows the software update resource in the virtual OCF service module and the update mapping information between the OTA Cluster in the ZigBee device
表9:Table 9:
Figure PCTCN2020089281-appb-000010
Figure PCTCN2020089281-appb-000010
从表9中可以看出,ZigBee设备中的OTA Cluster与虚拟OCF服务模块的软件更新资源之间的更新映射信息,包括了更新版本属性的映射关系和更新状态属性的映射关系。表9中“0x0009”用于标识ZigBee设备中的OTA Cluster,“0x0004”用于标识ZigBee属性中的下载软件版本,“0x0006”用于标识ZigBee属性中的镜像升级状态,“oic.r.softwareupdate”用于标识虚拟OCF服务模块中的软件更新资源,“nv”用于描述软件更新资源属性中的可获得的新软件版本,“swupdatestatus”用于描述软件更新资源属性中的软件更新状态。更新版本属性的映射关系是指表中“0x0004”与“nv”的映射,更新状态属性的映射关系是指“0x0006”与“swupdatestatus”的映射。It can be seen from Table 9 that the update mapping information between the OTA Cluster in the ZigBee device and the software update resources of the virtual OCF service module includes the mapping relationship between the update version attribute and the update status attribute. "0x0009" in Table 9 is used to identify the OTA Cluster in the ZigBee device, "0x0004" is used to identify the downloaded software version in the ZigBee attribute, and "0x0006" is used to identify the mirror upgrade status in the ZigBee attribute, "oic.r.softwareupdate" "Is used to identify the software update resource in the virtual OCF service module, "nv" is used to describe the new software version available in the software update resource attribute, and "swupdatestatus" is used to describe the software update status in the software update resource attribute. The mapping relationship of update version attributes refers to the mapping between "0x0004" and "nv" in the table, and the mapping relationship of update status attributes refers to the mapping between "0x0006" and "swupdatestatus".
在一种实现方式中,处理模块在建立第一映射关系之后,可以建立虚拟OCF设备,其中,虚拟OCF设备可以包括软件更新资源,处理模块可以将节点设备的设备厂商提供的关联服务器的地址信息作为第一属性添加到软件更新资源中,也就是例如表3中属性名称为“purl”的信息,将节点设备的关联服务器的签名方法作为第二属性添加到所述软件更新资源中,也就是例如表3中属性名称为“signed”的信息。其中,关联服务器的地址信息是下载最新软件包的地址,关联服务器的签名方法是用来对下载的最新软件包进行校验。In one implementation, the processing module may establish a virtual OCF device after establishing the first mapping relationship, where the virtual OCF device may include software update resources, and the processing module may associate the address information of the associated server provided by the device manufacturer of the node device It is added to the software update resource as the first attribute, that is, the information whose attribute name is "purl" in Table 3, and the signature method of the associated server of the node device is added to the software update resource as the second attribute, that is, For example, in Table 3, the attribute name is "signed". Among them, the address information of the associated server is the address for downloading the latest software package, and the signature method of the associated server is used to verify the downloaded latest software package.
202:若检测到已接入节点设备的升级事件,则获取与节点设备相关的软件更新数据包和第一映射关系。202: If the upgrade event of the connected node device is detected, acquire the software update data package related to the node device and the first mapping relationship.
具体的,如果处理模块可以检测到已接入的节点设备的升级事件,就可以获取与节点设备相关的软件更新数据包,并获取第一映射关系,以对节点设备进行升级处理。节点设备的升级事件可以是当节点设备发起更新请求,或者当OCF设备监测到需要升级时的节点设备,或者当更新周期到来时智能设备主动确认存在升级事件等等。Specifically, if the processing module can detect the upgrade event of the connected node device, it can obtain the software update data package related to the node device, and obtain the first mapping relationship, so as to perform the upgrade process on the node device. The upgrade event of the node device may be when the node device initiates an update request, or when the OCF device detects that the node device needs to be upgraded, or the smart device actively confirms that there is an upgrade event when the update cycle arrives, and so on.
在一种实现方式中,处理模块可以在节点设备的本地版本信息是低于关联服务器上的服务版本信息的情况下,获取与节点设备相关的软件更新数据包以对节点设备进行升级处理,并获取第一映射关系。In an implementation manner, the processing module may obtain a software update data package related to the node device to upgrade the node device when the local version information of the node device is lower than the service version information on the associated server, and Obtain the first mapping relationship.
203:根据软件更新数据包和第一映射关系,对节点设备进行升级处理。203: Perform upgrade processing on the node device according to the software update data package and the first mapping relationship.
具体的,在处理模块获取了节点设备需要进行升级处理的对应的软件数据包之后,就可以根据该软件数据包对节点设备进行数据升级处理。在节点设备进行升级的过程中,节点设备的OTA Cluster中的相关属性会发生变化,根据第一映射关系,处理模块可以对节点设备升级处理过程中的状态进行升级反馈处理。Specifically, after the processing module obtains the corresponding software data package that needs to be upgraded for the node device, it can perform data upgrade processing on the node device according to the software data package. During the node device upgrade process, the relevant attributes in the OTA Cluster of the node device will change. According to the first mapping relationship, the processing module can perform upgrade feedback processing on the status of the node device upgrade process.
在一种实现方式中,处理模块可以根据第一属性包括的地址信息获取软件数据包,如果处理模块接收到节点设备的第一软件数据包更新请求,就可以根据获取到的软件数据包对节点设备进行数据升级处理。In an implementation manner, the processing module can obtain the software data packet according to the address information included in the first attribute. If the processing module receives the first software data packet update request of the node device, it can send the data packet to the node according to the obtained software data packet. The equipment performs data upgrade processing.
在一种实现方式中,在处理模块根据第一属性包括的地址信息获取软件数据包之后,可以根据第一映射关系中的更新状态属性,将软件数据包的下载状态映射为第一映射关系中的更新状态属性,向虚拟OCF服务模块发送包括软件数据包下载状态的下载状态反馈信息。In an implementation manner, after the processing module obtains the software data package according to the address information included in the first attribute, the download status of the software data package may be mapped into the first mapping relation according to the update status attribute in the first mapping relation The update status attribute of the software package is sent to the virtual OCF service module to send download status feedback information including the download status of the software data package.
在一种实现方式中,处理模块可以接收节点设备通过虚拟节点服务模块发送的反馈信息,反馈信息包括节点设备软件版本信息和节点设备软件更新状态信息。接收到反馈信息之后,处理模块可以根据第一映射关系中的更新版本属性和更新状态属性,将节点设备软件版本信息映射为第一映射关系中的更新版本属性,将节点设备软件更新状态信息映射为第一映射关系中的更新状态属性。然后,处理模块可以 向虚拟OCF服务模块发送包括虚拟OCF服务模块更新版本属性和虚拟OCF服务模块软件更新状态属性的升级状态反馈信息。In an implementation manner, the processing module may receive feedback information sent by the node device through the virtual node service module, and the feedback information includes node device software version information and node device software update status information. After receiving the feedback information, the processing module can map the node device software version information to the updated version attribute in the first mapping relationship according to the update version attribute and the update status attribute in the first mapping relationship, and map the node device software update status information Is the update state attribute in the first mapping relationship. Then, the processing module may send to the virtual OCF service module the upgrade status feedback information including the update version attribute of the virtual OCF service module and the software update status attribute of the virtual OCF service module.
本申请实施例中,处理模块可以建立第一映射关系,第一映射关系是指:虚拟OCF服务模块中的软件更新资源、与节点设备中的OTA Cluster之间的更新映射信息,更新映射信息包括更新版本属性的映射关系和更新状态属性的映射关系,若处理模块检测到已接入的节点设备的升级事件,就可以获取与节点设备相关的软件更新数据包,并获取第一映射关系,进一步的,处理模块根据软件更新数据包和第一映射关系,对节点设备进行升级处理。通过实施上述方法,可实现在OCF协议下对接入的各种节点设备进行设备升级管理。In the embodiment of the present application, the processing module can establish a first mapping relationship. The first mapping relationship refers to the update mapping information between the software update resource in the virtual OCF service module and the OTA Cluster in the node device. The update mapping information includes The mapping relationship between the update version attribute and the update status attribute. If the processing module detects the upgrade event of the connected node device, it can obtain the software update data package related to the node device, and obtain the first mapping relationship, and further Yes, the processing module performs upgrade processing on the node device according to the software update data packet and the first mapping relationship. Through the implementation of the above method, it is possible to implement device upgrade management for various node devices accessed under the OCF protocol.
再请参见图3,图3是本申请实施例提供的另一种设备升级方法的流程示意图。本实施例的方法应用于上述的设备升级系统,主要由上述涉及的智能设备来执行,具体是由在该智能设备中设置的处理器来执行,该处理器与上述图1中所示的处理模块对应,所述包括以下步骤。Please refer to FIG. 3 again, which is a schematic flowchart of another device upgrade method provided by an embodiment of the present application. The method of this embodiment is applied to the above-mentioned device upgrade system, and is mainly executed by the above-mentioned smart device, and specifically is executed by a processor provided in the smart device, and the processor is the same as the processing shown in FIG. 1 above. Module correspondence, the description includes the following steps.
301:建立第一映射关系。301: Establish a first mapping relationship.
具体的,在建立第一映射关系之前,需确认节点设备是接入虚拟节点服务模块的。虚拟节点服务模块可以允许设备接入,节点设备是通过虚拟节点服务模块传输数据的。节点设备可以向虚拟节点服务模块发送接入请求,在虚拟节点服务模块接到该请求之后,就可以允许节点设备接入,并向节点设备返回一个设备接入成功的信息,以便于让节点设备确认是否接入成功。并且,在节点设备接入虚拟节点服务模块之后,虚拟节点服务模块可以向处理模块发送一个设备接入的通知,以便于OCF设备在触发节点设备的升级事件时,确定该节点设备是接入系统的。Specifically, before establishing the first mapping relationship, it is necessary to confirm that the node device is connected to the virtual node service module. The virtual node service module can allow device access, and the node device transmits data through the virtual node service module. The node device can send an access request to the virtual node service module. After the virtual node service module receives the request, it can allow the node device to access, and return a message to the node device that the device is successfully connected, so that the node device Confirm whether the connection is successful. In addition, after the node device accesses the virtual node service module, the virtual node service module may send a device access notification to the processing module, so that the OCF device can determine that the node device is an access system when the node device upgrade event is triggered of.
其中,步骤301的具体实施方式可以参见上述实施例步骤201的具体描述,此处不再赘述。For the specific implementation of step 301, reference may be made to the specific description of step 201 in the foregoing embodiment, which will not be repeated here.
302:OCF设备触发节点设备的升级事件。302: The OCF device triggers an upgrade event of the node device.
具体的,OCF设备可以触发节点设备的升级事件,其触发方式可以是OCF设备触发虚拟OCF服务模块进行软件升级。Specifically, the OCF device can trigger the upgrade event of the node device, and the trigger mode can be that the OCF device triggers the virtual OCF service module to perform software upgrade.
303:检测到已接入的节点设备的升级事件。303: The upgrade event of the connected node device is detected.
具体的,在OCF设备触发节点设备的升级事件时,处理模块就可以检测到已接入的节点设备的升级事件。Specifically, when the OCF device triggers the upgrade event of the node device, the processing module can detect the upgrade event of the connected node device.
在一种实现方式中,虚拟OCF服务模块可以将软件更新资源中的第一属性包括的地址信息发送给处理模块,其中,第一属性包括的地址信息是关联服务器的地址,关联服务器的地址是由节点设备的厂商提供的,关联服务器的地址类型为“https://xxx”。以使得处理模块接收该第一属性,并根据该第一属性获取最新的软件版本,进行后续节点设备的数据升级处理。In an implementation manner, the virtual OCF service module may send the address information included in the first attribute in the software update resource to the processing module, where the address information included in the first attribute is the address of the associated server, and the address of the associated server is Provided by the manufacturer of the node device, the address type of the associated server is "https://xxx". So that the processing module receives the first attribute, and obtains the latest software version according to the first attribute, and performs subsequent data upgrade processing of the node device.
304:根据第二映射关系获得节点设备的设备信息。304: Obtain device information of the node device according to the second mapping relationship.
具体的,处理模块可以获取第二映射关系,该第二映射关系由处理模块建立的,其中,第二映射关系是指虚拟OCF服务模块与节点设备之间的设备信息映射关系。可选的,处理模块可以根据第二映射关系,得到节点设备的设备信息,设备信息可以是节点设备的MAC地址(Media Access Control Address),IP地址(Internet Protocol Address),ID(Identity Document)等等,以便于处理模块根据设备信息确认节点设备。Specifically, the processing module may obtain a second mapping relationship established by the processing module, where the second mapping relationship refers to a device information mapping relationship between the virtual OCF service module and the node device. Optionally, the processing module can obtain the device information of the node device according to the second mapping relationship. The device information can be the MAC address (Media Access Control Address), IP address (Internet Protocol Address), ID (Identity Document) of the node device, etc. Etc., so that the processing module can confirm the node device based on the device information.
305:根据设备信息,通过虚拟节点服务模块获取节点设备的本地版本信息。305: According to the device information, obtain the local version information of the node device through the virtual node service module.
具体的,在处理模块得到节点设备的设备信息之后,就可以根据设备信息,通过为节点设备建立的虚拟节点服务模块获取节点设备的本地版本信息。Specifically, after the processing module obtains the device information of the node device, it can obtain the local version information of the node device through the virtual node service module established for the node device according to the device information.
在一种实现方式中,处理模块向虚拟节点服务模块发送节点设备的本地版本信息请求,在虚拟节点服务模块获得该请求之后,就可以将该请求发送给节点设备,节点设备接收该请求之后,将本地版本信息发送给虚拟节点服务模块,虚拟节点服务模块再将本地版本信息发送给处理模块,处理模块就可以获得节点设备的本地版本信息。In one implementation, the processing module sends a request for local version information of the node device to the virtual node service module. After the virtual node service module obtains the request, it can send the request to the node device. After the node device receives the request, The local version information is sent to the virtual node service module, and the virtual node service module sends the local version information to the processing module, and the processing module can obtain the local version information of the node device.
306:根据第一属性包括的地址信息,获取关联服务器上的服务版本信息。306: Acquire service version information on the associated server according to the address information included in the first attribute.
具体的,在OCF设备触发节点设备的升级事件之后,虚拟OCF服务模块会将软件更新资源中的第一属性包括的地址信息发送给处理模块,也就是将关联服务器的地址发送给处理模块,处理模块接收到关联服务器的地址之后,就可以根据关联服务器的地址向关联服务器发送服务版本信息请求,关联服务器接收该请求之后,就可以将服务版本信息发送给处理模块,处理模块就可以获得关联服务器上的服务版本信息。Specifically, after the OCF device triggers the upgrade event of the node device, the virtual OCF service module sends the address information included in the first attribute in the software update resource to the processing module, that is, sends the address of the associated server to the processing module to process After the module receives the address of the associated server, it can send a service version information request to the associated server according to the address of the associated server. After the associated server receives the request, it can send the service version information to the processing module, and the processing module can obtain the associated server Version information on the service.
307:在本地版本信息低于服务版本信息的情况下,通过虚拟节点服务模块向节点设备发送升级通知信息。307: When the local version information is lower than the service version information, send upgrade notification information to the node device through the virtual node service module.
具体的,处理模块在获得节点设备的本地版本信息和关联服务器上的服务版本信息,就可以确定本地版本信息是否低于所述服务版本信息。如果在本地版本信息低于服务版本信息的情况下,就可以通知节点设备升级了,处理模块向虚拟节点服务模块发送升级通知信息,虚拟节点服务模块接收到该升级通知信息之后,再将该升级通知信息发送给节点设备,以通知节点设备可以进行升级处理,向节点设备请求软件数据包。Specifically, after obtaining the local version information of the node device and the service version information on the associated server, the processing module can determine whether the local version information is lower than the service version information. If the local version information is lower than the service version information, the node device can be notified that the device has been upgraded, and the processing module sends the upgrade notification information to the virtual node service module, and the virtual node service module receives the upgrade notification information and then upgrades the device. The notification information is sent to the node device to notify the node device that it can perform upgrade processing, and request software data packages from the node device.
308:根据第一属性包括的地址信息获取软件数据包,并获取第一映射关系。308: Obtain the software data package according to the address information included in the first attribute, and obtain the first mapping relationship.
具体的,如果处理模块确定本地版本信息是低于服务版本信息的,就可以确定节点设备需要进行升级处理,并根据第一属性包括的地址信息获取软件数据包,其中,第一属性包括的地址信息是关联服务器的地址。处理模块还需获取第一映射关系,以便于后续处理模块第一映射关系,对节点设备升级处理过程中的状态进行升级反馈处理。Specifically, if the processing module determines that the local version information is lower than the service version information, it can determine that the node device needs to be upgraded, and obtain the software data package according to the address information included in the first attribute, where the address included in the first attribute The information is the address of the associated server. The processing module also needs to obtain the first mapping relationship, so that the subsequent processing module first mapping relationship can perform upgrade feedback processing on the status of the node device during the upgrade process.
在一种实现方式中,处理模块在根据第一属性包括的地址信息获取软件数据包之前,可以检测本地存储空间是否满足软件数据包存储条件,如果在本地存储空间充足的情况下,处理模块可以一次性的将软件数据包从关联服务器上全部下载下来。In one implementation, the processing module can detect whether the local storage space satisfies the software data package storage condition before acquiring the software data package according to the address information included in the first attribute. If the local storage space is sufficient, the processing module can Download all software data packages from the associated server at one time.
在一种实现方式中,处理模块可以根据第二属性包括的签名方法,对下载的软件数据包的进行校验,其中,第二属性包括的签名方法是由节点设备的厂商提供的,签名方法是用来对处理模块下载的软件数据包进行完整性检查和签名校验的。如果校验没有错误,就可以将软件数据包存放在处理模块中。In an implementation manner, the processing module may verify the downloaded software data package according to the signature method included in the second attribute, where the signature method included in the second attribute is provided by the manufacturer of the node device, and the signature method It is used to perform integrity check and signature verification on the software data package downloaded by the processing module. If there is no error in the verification, the software data packet can be stored in the processing module.
309:根据第一映射关系中的更新状态属性,将软件数据包的下载状态映射为第一映射关系中的更新状态属性。309: According to the update status attribute in the first mapping relationship, map the download status of the software data package to the update status attribute in the first mapping relationship.
具体的,处理模块在下载软件数据包的过程中,软件数据包的下载状态会发生变化,第一映射关系中的更新状态属性会随着下载状态的变化发生相应的变化。Specifically, in the process of downloading the software data package by the processing module, the download status of the software data package will change, and the update status attribute in the first mapping relationship will change accordingly with the change of the download status.
例如,以节点设备为ZigBee设备为例,如表1所示,第一映射关系中的更新状态属性是指表1中的“0x0006”和“swupdatestatus”。如表3所示,对应属性标识为“0x0006”的描述中,OTA升级状态有6 种情况,而处理模块在下载软件数据包的过程中会经历不同的下载状态,比如“等待下载”、“下载进行中”、“下载完成”,因此,在处理模块下载软件数据包的过程中,OTA升级状态会随着软件数据包的下载状态发生变化。同样的,处理模块在下载软件数据包的过程中也会出现如表6所示的“nsa”、“svv”、“sva”等状态,因此,在处理模块下载软件数据包的过程中,软件更新状态会随着软件数据包的下载状态发生变化。For example, taking the node device as a ZigBee device as an example, as shown in Table 1, the update status attribute in the first mapping relationship refers to "0x0006" and "swupdatestatus" in Table 1. As shown in Table 3, in the description with the corresponding attribute ID as "0x0006", there are 6 situations in the OTA upgrade status, and the processing module will experience different download statuses during the download of the software data package, such as "waiting for download" and " "Download in progress" and "download complete", therefore, during the process of downloading the software data package by the processing module, the OTA upgrade status will change with the download status of the software data package. Similarly, when the processing module downloads the software data package, the status of "nsa", "svv", and "sva" as shown in Table 6 will also appear. Therefore, when the processing module downloads the software data package, the software The update status will change with the download status of the software data package.
310:向虚拟OCF服务模块发送包括软件数据包下载状态的下载状态反馈信息。310: Send the download status feedback information including the download status of the software data package to the virtual OCF service module.
具体的,处理模块在下载软件数据包的过程中,第一映射关系中的更新状态属性会随着软件数据包下载状态的变化发生相应的变化,处理模块可以将软件数据包下载状态的下载状态反馈给虚拟OCF服务模块。Specifically, in the process of downloading the software data package by the processing module, the update status attribute in the first mapping relationship will change accordingly with the change in the download status of the software data package, and the processing module can change the download status of the software data package download status. Feedback to the virtual OCF service module.
在一种实现方式中,在处理模块将软件数据包下载状态的下载状态反馈给虚拟OCF服务模块,并且虚拟OCF服务模块接收到下载状态反馈信息之后,虚拟OCF服务模块可以将该下载状态反馈信息发送给OCF设备。In one implementation, after the processing module feeds back the download status of the software data package download status to the virtual OCF service module, and the virtual OCF service module receives the download status feedback information, the virtual OCF service module may feed back the download status information Send to OCF device.
311:将软件数据包分为N数据块,每块有M数据页,其中,N和M为正整数。311: Divide the software data packet into N data blocks, each block has M data pages, where N and M are positive integers.
312:接收节点设备通过虚拟节点服务模块发送的第一软件数据包更新请求,其中,第一软件数据包更新请求中包括所需的第一数据块的块标识及对应的数据页的页标识。312: Receive the first software data package update request sent by the node device through the virtual node service module, where the first software data package update request includes the required block identifier of the first data block and the corresponding page identifier of the data page.
具体的,节点设备接收到升级通知信息之后,可以向虚拟节点服务模块发送的第一软件数据包更新请求,其中,第一软件数据包更新请求中包括所需的第一数据块的块标识及对应的数据页的页标识,虚拟节点服务模块接收到该第一软件数据包更新请求,再将该第一软件数据包更新请求发送给处理模块,处理模块就可以接收到节点设备通过虚拟节点服务模块发送的第一软件数据包更新请求。Specifically, after the node device receives the upgrade notification information, it can send a first software data package update request to the virtual node service module, where the first software data package update request includes the required block identifier of the first data block and Corresponding to the page identifier of the data page, the virtual node service module receives the first software data package update request, and then sends the first software data package update request to the processing module, and the processing module can receive the node device through the virtual node service The first software data package update request sent by the module.
313:响应第一软件数据包请求,根据块标识及对应的页标识通过虚拟节点服务模块向节点设备发送相应数据块下的数据页。313: In response to the first software data packet request, send the data page under the corresponding data block to the node device through the virtual node service module according to the block identifier and the corresponding page identifier.
具体的,处理模块接收到节点设备通过虚拟节点服务模块发送的第一软件数据包更新请求之后,根据第一软件数据包更新请求中包括的所需的第一数据块的块标识及对应的数据页的页标识,将相应数据块下的数据页发送给虚拟节点服务模块,虚拟节点服务模块接收到相应数据块下的数据页之后,再将相应数据块下的数据页发送给节点设备,节点设备就可以接收到请求的数据块下的数据页。Specifically, after the processing module receives the first software data package update request sent by the node device through the virtual node service module, the processing module uses the block identifier of the first data block and the corresponding data included in the first software data package update request. The page identification of the page, the data page under the corresponding data block is sent to the virtual node service module. After the virtual node service module receives the data page under the corresponding data block, it sends the data page under the corresponding data block to the node device, and the node The device can then receive the data page under the requested data block.
314:接收节点设备通过虚拟节点服务模块发送的反馈信息,反馈信息包括:节点设备软件版本信息和节点设备软件更新状态信息。314: Receive feedback information sent by the node device through the virtual node service module, where the feedback information includes: node device software version information and node device software update status information.
具体的,节点设备在接收到处理模块通过虚拟节点服务模块发送的所请求的数据块下的数据页之后,节点设备的软件版本信息和节点设备的软件更新状态信息发生变化,节点设备可以向虚拟节点服务模块发送反馈信息,该反馈信息包括节点设备的软件版本信息和节点设备的软件更新状态信息,虚拟节点服务模块接收到该反馈信息之后,就可以将该反馈信息发送给处理模块,处理模块就可以接收该反馈信息了。Specifically, after the node device receives the data page under the requested data block sent by the processing module through the virtual node service module, the software version information of the node device and the software update status information of the node device change, and the node device can report to the virtual node service module. The node service module sends feedback information that includes the software version information of the node device and the software update status information of the node device. After receiving the feedback information, the virtual node service module can send the feedback information to the processing module. You can receive the feedback information.
315:根据第一映射关系中的更新版本属性和更新状态属性,将节点设备软件版本信息映射为第一映射关系中的更新版本属性,将节点设备软件更新状态信息映射为第一映射关系中的更新状态属性。315: According to the update version attribute and the update status attribute in the first mapping relationship, map the node device software version information to the update version attribute in the first mapping relationship, and map the node device software update status information to the update version attribute in the first mapping relationship Update the status attribute.
具体的,处理模块在接收到反馈信息之后,就可以根据反馈信息对第一映射关系中更新版本属性和更新状态属性,将节点设备软件版本信息映射为第一映射关系中的更新版本属性,将节点设备软件更新状态信息映射为第一映射关系中的更新状态属性。Specifically, after receiving the feedback information, the processing module can update the version attribute and the update status attribute in the first mapping relationship according to the feedback information, map the node device software version information to the updated version attribute in the first mapping relationship, and convert The node device software update status information is mapped to the update status attribute in the first mapping relationship.
316:向虚拟OCF服务模块发送包括虚拟OCF服务模块更新版本属性和虚拟OCF服务模块更新状态属性的升级状态反馈信息。316: Send to the virtual OCF service module the upgrade status feedback information including the updated version attribute of the virtual OCF service module and the updated status attribute of the virtual OCF service module.
具体的,处理模块可以根据节点设备发送的反馈信息对第一映射关系中更新版本属性和更新状态属性作出相应的变化,处理模块可以将第一映射关系中虚拟OCF服务模块更新版本属性和虚拟OCF服务模块更新状态属性发送给虚拟OCF服务模块。Specifically, the processing module can make corresponding changes to the update version attribute and the update status attribute in the first mapping relationship according to the feedback information sent by the node device, and the processing module can update the version attribute and virtual OCF of the virtual OCF service module in the first mapping relationship. The service module update status attribute is sent to the virtual OCF service module.
例如,以节点设备为ZigBee设备为例,如表1所示,第一映射关系中的更新版本属性是指表1中的“0x0004”和“nv”,更新状态属性是指表1中的“0x0006”和“swupdatestatus”。处理模块在响应节点设备通过虚拟节点服务模块发送的第一软件数据包更新请求时,节点设备软件版本信息和软件更新状态会发生变化,其中,“0x0004”对应的是关联服务器的服务版本信息,“0x0006”对应的会出现如表3所示的OTA升级状态的6种情况。在节点设备数据升级的过程中,节点设备可以向虚拟节点服务模块发送反馈信息,该反馈信息包括节点设备的软件版本信息和节点设备的软件更新状态信息,虚拟节点服务模块接收到该反馈信息之后,再将该反馈信息发送给处理模块。处理模块可以根据该反馈信息对第一映射关系中的更新版本属性和更新状态属性作对应的变化。处理模块可以将节点设备软件版本信息映射为第一映射关系中的更新版本属性,将节点设备软件更新状态信息映射为第一映射关系中的更新状态属性。然后处理模块将虚拟OCF服务模块的更新版本属性和更新状态属性反馈给虚拟OCF服务模块。For example, taking the node device as a ZigBee device as an example, as shown in Table 1, the update version attribute in the first mapping relationship refers to "0x0004" and "nv" in Table 1, and the update status attribute refers to " 0x0006" and "swupdatestatus". When the processing module responds to the first software data package update request sent by the node device through the virtual node service module, the node device software version information and software update status will change, where "0x0004" corresponds to the service version information of the associated server. "0x0006" corresponds to the 6 cases of the OTA upgrade status shown in Table 3. In the process of node device data upgrade, the node device can send feedback information to the virtual node service module. The feedback information includes the software version information of the node device and the software update status information of the node device. After the virtual node service module receives the feedback information , And then send the feedback information to the processing module. The processing module can make corresponding changes to the update version attribute and the update status attribute in the first mapping relationship according to the feedback information. The processing module may map the node device software version information to the update version attribute in the first mapping relationship, and map the node device software update status information to the update state attribute in the first mapping relationship. Then the processing module feeds back the updated version attribute and update status attribute of the virtual OCF service module to the virtual OCF service module.
在一种实现方式中,在虚拟OCF服务模块接收到处理模块发送的虚拟OCF服务模块的更新版本属性和更新状态属性之后,虚拟OCF服务模块可以将该虚拟OCF服务模块的更新版本属性和更新状态属性发送给OCF设备。In an implementation manner, after the virtual OCF service module receives the updated version attribute and the update status attribute of the virtual OCF service module sent by the processing module, the virtual OCF service module may use the updated version attribute and update status of the virtual OCF service module The attributes are sent to the OCF device.
本申请实施例中,处理模块建立第一映射关系,OCF设备触发节点设备的升级事件,处理模块检测到已接入的节点设备的升级事件,根据第二映射关系获得节点设备的设备信息。接着,处理模块根据设备信息,通过为节点设备建立的虚拟节点服务模块获取节点设备的本地版本信息,并根据第一属性包括的地址信息,获取关联服务器上的服务版本信息,在本地版本信息低于服务版本信息的情况下,通过虚拟节点服务模块向节点设备发送升级通知信息。进一步的,处理模块根据第一属性包括的地址信息获取软件数据包,并获取第一映射关系。根据第一映射关系中的更新状态属性,将所述软件数据包的下载状态映射为第一映射关系中的更新状态属性。向虚拟OCF服务模块发送包括软件数据包下载状态的下载状态反馈信息。将软件数据包分为N数据块,每块有M数据页,其中,N和M为正整数。接收节点设备通过虚拟节点服务模块发送的第一软件数据包更新请求,其中,第一软件数据包更新请求中包括所需的第一数据块的块标识及对应的数据页的页标识。响应第一软件数据包请求,根据块标识及对应的页标识通过虚拟节点服务模块向节点设备发送相应数据块下的数据页。接收节点设备通过虚拟节点服务模块发送的反馈信息,反馈信息包括:节点设备软件版本信息和节点设备软件更新状态信息,根据第一映射关系中的更新版本属性和更新状态属性,将节点设备软件版本信息映射为第一映射关系中的更新版本属性,将节点设备软件更新状态信息映射为第一映射关系中的更新状态属性,向虚拟OCF服务模块发送包括虚拟OCF服务模块更新版本属性和虚拟OCF服务模块更新状态属性的升级状态反馈信息。通过实施上述 方法,可实现在OCF协议下对接入的各种节点设备进行设备升级管理。In the embodiment of the present application, the processing module establishes the first mapping relationship, the OCF device triggers the upgrade event of the node device, the processing module detects the upgrade event of the connected node device, and obtains the device information of the node device according to the second mapping relationship. Then, the processing module obtains the local version information of the node device through the virtual node service module established for the node device according to the device information, and obtains the service version information on the associated server according to the address information included in the first attribute. The local version information is lower In the case of service version information, the upgrade notification information is sent to the node device through the virtual node service module. Further, the processing module obtains the software data package according to the address information included in the first attribute, and obtains the first mapping relationship. According to the update status attribute in the first mapping relationship, the download status of the software data package is mapped to the update status attribute in the first mapping relationship. Send the download status feedback information including the download status of the software data package to the virtual OCF service module. The software data packet is divided into N data blocks, each block has M data pages, where N and M are positive integers. Receive the first software data package update request sent by the node device through the virtual node service module, where the first software data package update request includes the required block identifier of the first data block and the page identifier of the corresponding data page. In response to the first software data packet request, the data page under the corresponding data block is sent to the node device through the virtual node service module according to the block identifier and the corresponding page identifier. Receive feedback information sent by the node device through the virtual node service module, the feedback information includes: node device software version information and node device software update status information, and according to the update version attribute and update status attribute in the first mapping relationship, the node device software version The information is mapped to the updated version attribute in the first mapping relationship, the node device software update status information is mapped to the update status attribute in the first mapping relationship, and the virtual OCF service module is sent to the virtual OCF service module including the updated version attribute of the virtual OCF service module and the virtual OCF service The update status feedback information of the module update status attribute. Through the implementation of the above method, it is possible to implement device upgrade management for various node devices accessed under the OCF protocol.
再请参见图4,图4是本申请实施例提供的又一种设备升级方法的流程示意图。本实施例的方法应用于上述的设备升级系统,主要由上述涉及的智能设备来执行,具体是由在该智能设备中设置的处理器来执行,该处理器与上述图1中所示的处理模块对应,所述包括以下步骤。Please refer to FIG. 4 again, which is a schematic flowchart of another device upgrade method provided by an embodiment of the present application. The method of this embodiment is applied to the above-mentioned device upgrade system, and is mainly executed by the above-mentioned smart device, and specifically is executed by a processor provided in the smart device, and the processor is the same as the processing shown in FIG. 1 above. Module correspondence, the description includes the following steps.
401:建立第一映射关系。401: Establish a first mapping relationship.
402:节点设备触发节点设备的升级事件。402: The node device triggers an upgrade event of the node device.
具体的,节点设备可以触发节点设备的升级事件,其触发方式可以是节点设备定时向处理模块请求升级。Specifically, the node device may trigger an upgrade event of the node device, and the trigger mode may be that the node device periodically requests an upgrade from the processing module.
在一种实现方式中,节点设备向虚拟节点服务模块发送升级请求,虚拟节点服务模块接收到该升级请求之后,再将该升级请求发送给处理模块。In an implementation manner, the node device sends an upgrade request to the virtual node service module, and after the virtual node service module receives the upgrade request, it sends the upgrade request to the processing module.
403:获取节点设备触发所述升级事件时发生的升级请求,其中,升级请求包括节点设备的本地版本信息。403: Obtain an upgrade request that occurs when the node device triggers the upgrade event, where the upgrade request includes local version information of the node device.
具体的,处理模块可以接收节点设备通过虚拟节点服务模块发送的升级请求,其中,该升级请求携带了节点设备的本地版本信息。Specifically, the processing module may receive an upgrade request sent by the node device through the virtual node service module, where the upgrade request carries the local version information of the node device.
404:根据第一属性包括的地址信息,获取关联服务器上的服务版本信息。404: Obtain service version information on the associated server according to the address information included in the first attribute.
405:在本地版本信息低于服务版本信息的情况下,根据第一属性包括的地址信息获取软件数据包,并获取第一映射关系。405: In a case where the local version information is lower than the service version information, obtain the software data package according to the address information included in the first attribute, and obtain the first mapping relationship.
406:根据第一映射关系中的更新状态属性,将软件数据包的下载状态映射为第一映射关系中的更新状态属性。406: According to the update status attribute in the first mapping relationship, map the download status of the software data package to the update status attribute in the first mapping relationship.
407:向虚拟OCF服务模块发送包括软件数据包下载状态的下载状态反馈信息。407: Send the download status feedback information including the download status of the software data package to the virtual OCF service module.
408:将软件数据包分为N数据块,每块有M数据页。408: Divide the software data packet into N data blocks, and each block has M data pages.
409:接收节点设备通过虚拟节点服务模块发送的第一软件数据包更新请求,其中,所述第一软件数据包更新请求中包括所需的第一数据块的块标识及对应的数据页的页标识。409: Receive a first software data package update request sent by the node device through the virtual node service module, where the first software data package update request includes the required block identifier of the first data block and the page of the corresponding data page Logo.
410:响应第一软件数据包请求,根据块标识及对应的页标识通过虚拟节点服务模块向节点设备发送相应数据块下的数据页。410: In response to the first software data packet request, send the data page under the corresponding data block to the node device through the virtual node service module according to the block identifier and the corresponding page identifier.
411:接收节点设备通过虚拟节点服务模块发送的反馈信息,反馈信息包括:节点设备软件版本信息和节点设备软件更新状态信息。411: Receive feedback information sent by the node device through the virtual node service module, where the feedback information includes: node device software version information and node device software update status information.
412:根据第一映射关系中的更新版本属性和更新状态属性,将节点设备软件版本信息映射为第一映射关系中的更新版本属性,将节点设备软件更新状态信息映射为第一映射关系中的更新状态属性。412: According to the update version attribute and the update status attribute in the first mapping relationship, map the node device software version information to the update version attribute in the first mapping relationship, and map the node device software update status information to the update version attribute in the first mapping relationship Update the status attribute.
413:向虚拟OCF服务模块发送包括虚拟OCF服务模块更新版本属性和虚拟OCF服务模块更新状态属性的升级状态反馈信息。413: Send to the virtual OCF service module the upgrade status feedback information including the updated version attribute of the virtual OCF service module and the updated status attribute of the virtual OCF service module.
其中,步骤401、404-413的具体实施方式可以参见上述实施例步骤301、306-316的具体描述,此处不再赘述。For the specific implementation manners of steps 401 and 404-413, please refer to the specific description of steps 301 and 306-316 in the foregoing embodiment, which will not be repeated here.
本申请实施例中,处理模块建立第一映射关系,节点设备触发节点设备的升级事件,处理模块获取节点设备触发所述升级事件时发生的升级请求,其中,升级请求包括节点设备的本地版本信息。接着,处理模块根据第一属性包括的地址信息,获取关联服务器上的服务版本信息,在本地版本信息低于服务 版本信息的情况下,根据第一属性包括的地址信息获取软件数据包,并获取第一映射关系。根据第一映射关系中的更新状态属性,将软件数据包的下载状态映射为第一映射关系中的更新状态属性。向虚拟OCF服务模块发送包括软件数据包下载状态的下载状态反馈信息。将软件数据包分为N数据块,每块有M数据页。进一步的,处理模块接收节点设备通过虚拟节点服务模块发送的第一软件数据包更新请求,其中,所述第一软件数据包更新请求中包括所需的第一数据块的块标识及对应的数据页的页标识,响应第一软件数据包请求,根据块标识及对应的页标识通过虚拟节点服务模块向节点设备发送相应数据块下的数据页。接收节点设备通过虚拟节点服务模块发送的反馈信息,反馈信息包括:节点设备软件版本信息和节点设备软件更新状态信息,根据第一映射关系中的更新版本属性和更新状态属性,将节点设备软件版本信息映射为第一映射关系中的更新版本属性,将节点设备软件更新状态信息映射为第一映射关系中的更新状态属性,向虚拟OCF服务模块发送包括虚拟OCF服务模块更新版本属性和虚拟OCF服务模块更新状态属性的升级状态反馈信息。通过实施上述方法,能够利用节点设备定时请求设备升级,并一次性的将软件数据包下载,实现在OCF协议下对接入的各种节点设备进行设备升级管理。In the embodiment of the present application, the processing module establishes a first mapping relationship, the node device triggers an upgrade event of the node device, and the processing module obtains an upgrade request that occurs when the node device triggers the upgrade event, where the upgrade request includes local version information of the node device . Next, the processing module obtains the service version information on the associated server according to the address information included in the first attribute, and when the local version information is lower than the service version information, obtains the software data package according to the address information included in the first attribute, and obtains The first mapping relationship. According to the update status attribute in the first mapping relationship, the download status of the software data package is mapped to the update status attribute in the first mapping relationship. Send the download status feedback information including the download status of the software data package to the virtual OCF service module. The software data packet is divided into N data blocks, and each block has M data pages. Further, the processing module receives the first software data package update request sent by the node device through the virtual node service module, wherein the first software data package update request includes the required block identifier of the first data block and corresponding data The page identifier of the page, in response to the first software data packet request, sends the data page under the corresponding data block to the node device through the virtual node service module according to the block identifier and the corresponding page identifier. Receive feedback information sent by the node device through the virtual node service module, the feedback information includes: node device software version information and node device software update status information, and according to the update version attribute and update status attribute in the first mapping relationship, the node device software version The information is mapped to the updated version attribute in the first mapping relationship, the node device software update status information is mapped to the update status attribute in the first mapping relationship, and the virtual OCF service module is sent to the virtual OCF service module including the updated version attribute of the virtual OCF service module and the virtual OCF service The update status feedback information of the module update status attribute. Through the implementation of the above method, it is possible to use the node device to periodically request device upgrades, and to download the software data package at one time, so as to realize the device upgrade management of various connected node devices under the OCF protocol.
再请参见图5,图5是本申请实施例提供的又一种设备升级方法的流程示意图。本实施例的方法应用于上述的设备升级系统,主要由上述涉及的智能设备来执行,具体是由在该智能设备中设置的处理器来执行,该处理器与上述图1中所示的处理模块对应,所述包括以下步骤。Please refer to FIG. 5 again, which is a schematic flowchart of another device upgrade method provided by an embodiment of the present application. The method of this embodiment is applied to the above-mentioned device upgrade system, and is mainly executed by the above-mentioned smart device, and specifically is executed by a processor provided in the smart device, and the processor is the same as the processing shown in FIG. 1 above. Module correspondence, the description includes the following steps.
501:建立第一映射关系。501: Establish a first mapping relationship.
502:OCF设备触发节点设备的升级事件。502: The OCF device triggers an upgrade event of the node device.
503:检测到已接入节点设备的升级事件。503: The upgrade event of the connected node device is detected.
504:根据第二映射关系获得节点设备的设备信息。504: Obtain device information of the node device according to the second mapping relationship.
505:根据设备信息,通过为节点设备建立的虚拟节点服务模块获取节点设备的本地版本信息。505: According to the device information, obtain the local version information of the node device through the virtual node service module established for the node device.
506:根据第一属性包括的地址信息,获取关联服务器上的服务版本信息。506: Acquire the service version information on the associated server according to the address information included in the first attribute.
507:在本地版本信息低于服务版本信息的情况下,通过虚拟节点服务模块向节点设备发送升级通知信息。507: When the local version information is lower than the service version information, send upgrade notification information to the node device through the virtual node service module.
508:获取第一映射关系。508: Acquire the first mapping relationship.
具体的,在确定节点设备需要升级后,处理设备就可以获取第一映射关系,第一映射关系可以用于后续步骤中的反馈。Specifically, after determining that the node device needs to be upgraded, the processing device may obtain the first mapping relationship, and the first mapping relationship may be used for feedback in subsequent steps.
509:接收节点设备通过虚拟节点服务模块发送的第二软件数据包请求,其中,第二软件数据包请求包括所需的第二数据块的块标识及对应的数据页的页标识。509: Receive a second software data packet request sent by the node device through the virtual node service module, where the second software data packet request includes the block identifier of the required second data block and the page identifier of the corresponding data page.
具体的,节点设备接收到升级通知信息之后,可以向虚拟节点服务模块发送的第二软件数据包更新请求,其中,第二软件数据包更新请求中包括所需的第二数据块的块标识及对应的数据页的页标识,虚拟节点服务模块接收到该第二软件数据包更新请求,再将该第二软件数据包更新请求发送给处理模块,处理模块就可以接收到节点设备通过虚拟节点服务模块发送的第二软件数据包更新请求。Specifically, after the node device receives the upgrade notification information, it can send a second software data package update request to the virtual node service module, where the second software data package update request includes the required block identifier of the second data block and Corresponding to the page identifier of the data page, the virtual node service module receives the second software data package update request, and then sends the second software data package update request to the processing module, and the processing module can receive the node device through the virtual node service The second software data package update request sent by the module.
在一种实现方式中,在确定本地版本信息是低于服务版本信息之后,处理模块可以检测本地存储空间是否满足软件数据包存储条件,如果在本地存储空间不充足的情况下,处理模块可以根据节点设备通过虚拟节点服务模块发送的第二软件数据包请求,从关联服务器上下载相应的软件数据包,并不需要一次性的将软件数据包从关联服务器上全部下载下来。In one implementation, after determining that the local version information is lower than the service version information, the processing module can detect whether the local storage space meets the software data package storage conditions. If the local storage space is insufficient, the processing module can check The node device downloads the corresponding software data package from the associated server through the second software data package request sent by the virtual node service module, and does not need to download all the software data packages from the associated server at one time.
510:从关联服务器上下载相应数据块下的数据页。510: Download the data page under the corresponding data block from the associated server.
具体的,处理模块在接收节点设备通过虚拟节点服务模块发送的第二软件数据包请求之后,就可以根据第二软件数据包请求包括所需的第二数据块的块标识及对应的数据页的页标识,从关联服务器上下载相应数据块下的数据页。Specifically, after receiving the second software data packet request sent by the node device through the virtual node service module, the processing module may include the required block identifier of the second data block and the corresponding data page according to the second software data packet request. Page identification, download the data page under the corresponding data block from the associated server.
在一种实现方式中,处理模块可以根据第二属性包括的签名方法,对下载的数据块下的数据页进行校验,其中,第二属性包括的签名方法是由节点设备的厂商提供的,签名方法是用来对处理模块下载的软件数据包进行完整性检查和签名校验的。如果校验没有错误,就可以将下载的数据块下的数据页存放在处理模块中。In an implementation manner, the processing module may verify the data page under the downloaded data block according to the signature method included in the second attribute, where the signature method included in the second attribute is provided by the manufacturer of the node device, The signature method is used to perform integrity check and signature verification on the software data package downloaded by the processing module. If there is no error in the verification, the data page under the downloaded data block can be stored in the processing module.
511:根据第一映射关系中的更新状态属性,将软件数据包的下载状态映射为第一映射关系中的更新状态属性。511: Map the download status of the software data package to the update status attribute in the first mapping relationship according to the update status attribute in the first mapping relationship.
512:向虚拟OCF服务模块发送包括软件数据包下载状态的下载状态反馈信息。512: Send the download status feedback information including the download status of the software data package to the virtual OCF service module.
513:响应第二软件数据包请求,通过虚拟节点服务模块向节点设备发送相应数据块下的数据页。513: In response to the second software data packet request, send the data page under the corresponding data block to the node device through the virtual node service module.
具体的,处理模块根据第二软件数据包请求,从关联服务器上下载相应数据块下的数据页,并效验正确之后,就可以将相应数据块下的数据页发送给虚拟节点服务模块,虚拟节点服务模块接收到相应数据块下的数据页之后,再将相应数据块下的数据页发送给节点设备,节点设备就可以接收到请求的的数据块下的数据页。Specifically, the processing module downloads the data page under the corresponding data block from the associated server according to the second software data packet request, and after the verification is correct, the data page under the corresponding data block can be sent to the virtual node service module, the virtual node After receiving the data page under the corresponding data block, the service module sends the data page under the corresponding data block to the node device, and the node device can receive the data page under the requested data block.
514:接收节点设备通过虚拟节点服务模块发送的反馈信息,反馈信息包括:节点设备软件版本信息和节点设备软件更新状态信息。514: Receive feedback information sent by the node device through the virtual node service module, where the feedback information includes: node device software version information and node device software update status information.
515:根据第一映射关系中的更新版本属性和更新状态属性,将节点设备软件版本信息映射为第一映射关系中的更新版本属性,将节点设备软件更新状态信息映射为第一映射关系中的更新状态属性。515: According to the update version attribute and the update status attribute in the first mapping relationship, map the node device software version information to the update version attribute in the first mapping relationship, and map the node device software update status information to the update version attribute in the first mapping relationship Update the status attribute.
516:向虚拟OCF服务模块发送包括虚拟OCF服务模块更新版本属性和虚拟OCF服务模块更新状态属性的升级状态反馈信息。516: Send the upgrade status feedback information including the updated version attribute of the virtual OCF service module and the updated status attribute of the virtual OCF service module to the virtual OCF service module.
其中,步骤501-507、511-512、514-516的具体实施方式可以参见上述实施例步骤301-307、309-310、313-316的具体描述,此处不再赘述。For the specific implementation manners of steps 501-507, 511-512, and 514-516, please refer to the specific descriptions of steps 301-307, 309-310, and 313-316 in the foregoing embodiment, which will not be repeated here.
需要说明的是,针对节点设备触发节点设备的升级事件时,处理模块也可以根据节点设备的第二软件数据包请求来下载相应的软件数据包,然后再响应第二软件数据包请求。It should be noted that when an upgrade event of the node device is triggered for the node device, the processing module may also download the corresponding software data package according to the second software data package request of the node device, and then respond to the second software data package request.
本申请实施例中,处理模块建立第一映射关系,OCF设备触发节点设备的升级事件。处理模块检测到已接入的节点设备的升级事件,根据第二映射关系获得节点设备的设备信息。接着,处理模块根据设备信息,通过为节点设备建立的虚拟节点服务模块获取节点设备的本地版本信息,并根据第一属性包括的地址信息,获取关联服务器上的服务版本信息,在本地版本信息低于服务版本信息的情况下,通过虚拟节点服务模块向节点设备发送升级通知信息,并获取第一映射关系。进一步的,处理模块接收节点设备通过虚拟节点服务模块发送的第二软件数据包请求,其中,第二软件数据包请求包括所需的第二数据块的块标识及对应的数据页的页标识。然后,从关联服务器上下载相应数据块下的数据页,根据第一映射关系中的更新状态属性,将软件数据包的下载状态映射为第一映射关系中的更新状态属性。向虚拟OCF服务模块发送包括软件数据包下载状态的下载状态反馈信息。响应第二软件数据包请求,通过虚拟节点服务模块向节点设备发送相应数据块下的数据页。接收节点设备通过虚拟节点服务模块发送的反馈信息, 反馈信息包括:节点设备软件版本信息和节点设备软件更新状态信息,根据第一映射关系中的更新版本属性和更新状态属性,将节点设备软件版本信息映射为第一映射关系中的更新版本属性,将节点设备软件更新状态信息映射为第一映射关系中的更新状态属性,向虚拟OCF服务模块发送包括虚拟OCF服务模块更新版本属性和虚拟OCF服务模块更新状态属性的升级状态反馈信息。通过实施上述方法,能够利用OCF设备触发节点设备升级,并根据节点设备的软件数据包需求来下载相应的软件数据包,实现在OCF协议下对接入的各种节点设备进行设备升级管理。In the embodiment of the present application, the processing module establishes the first mapping relationship, and the OCF device triggers the upgrade event of the node device. The processing module detects the upgrade event of the connected node device, and obtains the device information of the node device according to the second mapping relationship. Then, the processing module obtains the local version information of the node device through the virtual node service module established for the node device according to the device information, and obtains the service version information on the associated server according to the address information included in the first attribute. The local version information is lower In the case of service version information, the upgrade notification information is sent to the node device through the virtual node service module, and the first mapping relationship is obtained. Further, the processing module receives a second software data packet request sent by the node device through the virtual node service module, where the second software data packet request includes the block identifier of the required second data block and the page identifier of the corresponding data page. Then, download the data page under the corresponding data block from the associated server, and map the download status of the software data package to the update status attribute in the first mapping relationship according to the update status attribute in the first mapping relationship. Send the download status feedback information including the download status of the software data package to the virtual OCF service module. In response to the second software data packet request, the data page under the corresponding data block is sent to the node device through the virtual node service module. Receive feedback information sent by the node device through the virtual node service module, the feedback information includes: node device software version information and node device software update status information, and according to the update version attribute and update status attribute in the first mapping relationship, the node device software version The information is mapped to the updated version attribute in the first mapping relationship, the node device software update status information is mapped to the update status attribute in the first mapping relationship, and the virtual OCF service module is sent to the virtual OCF service module including the updated version attribute of the virtual OCF service module and the virtual OCF service The update status feedback information of the module update status attribute. By implementing the above method, the OCF device can be used to trigger the node device upgrade, and the corresponding software data package can be downloaded according to the software data package requirements of the node device, and the device upgrade management of various node devices connected under the OCF protocol can be realized.
参见图6,图6是本申请实施例提供的一种设备升级装置的结构示意图。该装置包括:Refer to FIG. 6, which is a schematic structural diagram of an equipment upgrading apparatus provided by an embodiment of the present application. The device includes:
建立单元601,用于建立第一映射关系,所述第一映射关系是指:虚拟开放连接基金会OCF服务模块中的软件更新资源、与节点设备中的空中下载簇OTA Cluster之间的更新映射信息,所述更新映射信息包括更新版本属性的映射关系和更新状态属性的映射关系;The establishment unit 601 is configured to establish a first mapping relationship, and the first mapping relationship refers to the update mapping between the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device Information, the update mapping information includes the mapping relationship of the update version attribute and the mapping relationship of the update status attribute;
获取单元602,用于若检测到已接入的节点设备的升级事件,则获取与所述节点设备相关的软件更新数据包和所述第一映射关系;The acquiring unit 602 is configured to, if an upgrade event of an accessed node device is detected, acquire a software update data package related to the node device and the first mapping relationship;
升级单元603,用于根据所述软件更新数据包和所述第一映射关系,对所述节点设备进行升级处理。The upgrade unit 603 is configured to perform upgrade processing on the node device according to the software update data package and the first mapping relationship.
在一些可行的实施方式中,所述建立单元601,还用于:In some feasible implementation manners, the establishing unit 601 is further configured to:
建立所述虚拟OCF设备,其中,所述虚拟OCF设备包括所述软件更新资源;Establishing the virtual OCF device, where the virtual OCF device includes the software update resource;
将所述节点设备的关联服务器的地址信息作为第一属性添加到所述软件更新资源中;Adding the address information of the associated server of the node device as the first attribute to the software update resource;
将所述节点设备的关联服务器的签名方法作为第二属性添加到所述软件更新资源中。The signature method of the associated server of the node device is added as the second attribute to the software update resource.
在一些可行的实施方式中,所述升级单元603,具体用于:In some feasible implementation manners, the upgrading unit 603 is specifically configured to:
根据所述软件数据包,对所述节点设备进行数据升级处理;Perform data upgrade processing on the node device according to the software data package;
根据所述第一映射关系,对所述节点设备升级处理过程中的状态进行升级反馈处理。According to the first mapping relationship, upgrade feedback processing is performed on the state during the upgrade processing of the node device.
在一些可行的实施方式中,所述升级单元603,具体用于:In some feasible implementation manners, the upgrading unit 603 is specifically configured to:
根据所述第一属性包括的地址信息获取所述软件数据包;Acquiring the software data package according to the address information included in the first attribute;
在接收到第一软件数据包更新请求的情况下,根据所述软件数据包对所述节点设备进行数据升级处理。In the case of receiving the first software data package update request, perform data update processing on the node device according to the software data package.
在一些可行的实施方式中,所述装置还包括发送单元604,具体用于:In some feasible implementation manners, the device further includes a sending unit 604, specifically configured to:
通过为所述节点设备建立的虚拟节点服务模块向所述节点设备发送升级通知信息,其中,所述节点设备是通过所述虚拟节点服务模块传输数据。Sending upgrade notification information to the node device through a virtual node service module established for the node device, where the node device transmits data through the virtual node service module.
在一些可行的实施方式中,所述获取单元602,具体用于:In some feasible implementation manners, the acquiring unit 602 is specifically configured to:
根据所述第一属性包括的地址信息从所述关联服务器上下载对应的软件数据包,并根据所述第二属性包括的签名方法,对所述软件数据包的进行校验;Download the corresponding software data package from the associated server according to the address information included in the first attribute, and verify the software data package according to the signature method included in the second attribute;
在校验完成后,将所述软件数据包分为N数据块,每块有M数据页,所述N和M为正整数;After the verification is completed, divide the software data packet into N data blocks, each block has M data pages, and the N and M are positive integers;
所述升级单元603,具体用于:The upgrading unit 603 is specifically used for:
接收所述节点设备通过所述虚拟节点服务模块发送的第一软件数据包更新请求,其中,所述第一软件数据包更新请求中包括所需的第一数据块的块标识及对应的数据页的页标识;Receive a first software data package update request sent by the node device through the virtual node service module, where the first software data package update request includes the required block identifier of the first data block and the corresponding data page Page ID;
响应所述第一软件数据包请求,根据所述块标识及对应的页标识通过虚拟节点服务模块向所述节点设备发送相应数据块下的数据页。In response to the first software data packet request, the data page under the corresponding data block is sent to the node device through the virtual node service module according to the block identifier and the corresponding page identifier.
在一些可行的实施方式中,所述升级单元603,还用于:In some feasible implementation manners, the upgrading unit 603 is further configured to:
根据第一映射关系中的更新状态属性,将所述软件数据包的下载状态映射为第一映射关系中的更新状态属性;Mapping the download status of the software data package to the update status attribute in the first mapping relationship according to the update status attribute in the first mapping relationship;
向所述虚拟OCF服务模块发送包括软件数据包下载状态的下载状态反馈信息。Sending the download status feedback information including the download status of the software data package to the virtual OCF service module.
在一些可行的实施方式中,所述升级单元602,具体用于:In some feasible implementation manners, the upgrading unit 602 is specifically configured to:
接收所述节点设备通过所述虚拟节点服务模块发送的反馈信息,所述反馈信息包括:节点设备软件版本信息和节点设备软件更新状态信息;Receiving feedback information sent by the node device through the virtual node service module, the feedback information including: node device software version information and node device software update status information;
根据第一映射关系中的更新版本属性和更新状态属性,将所述节点设备软件版本信息映射为第一映射关系中的更新版本属性,将节点设备软件更新状态信息映射为第一映射关系中的更新状态属性;According to the update version attribute and the update status attribute in the first mapping relationship, the node device software version information is mapped to the update version attribute in the first mapping relationship, and the node device software update status information is mapped to the update version attribute in the first mapping relationship. Update status attributes;
向所述虚拟OCF服务模块发送包括虚拟OCF服务模块更新版本属性和虚拟OCF服务模块更新状态属性的升级状态反馈信息。Sending the upgrade status feedback information including the updated version attribute of the virtual OCF service module and the updated status attribute of the virtual OCF service module to the virtual OCF service module.
在一些可行的实施方式中,所述检测单元606,具体用于:In some feasible implementation manners, the detection unit 606 is specifically configured to:
检测本地存储空间是否满足软件数据包存储条件;Check whether the local storage space meets the software data package storage conditions;
若是,则执行所述根据所述第一属性包括的地址信息获取软件数据包;If yes, execute the acquisition of the software data package according to the address information included in the first attribute;
若否,则接收所述节点设备通过所述虚拟节点服务模块发送的第二软件数据包请求,其中,所述第二软件数据包请求包括所需的第二数据块的块标识及对应的数据页的页标识,并根据所述块标识及对应的页标识,从所述关联服务器上下载相应数据块下的数据页。If not, receive a second software data packet request sent by the node device through the virtual node service module, where the second software data packet request includes the block identifier of the required second data block and the corresponding data The page identifier of the page, and download the data page under the corresponding data block from the associated server according to the block identifier and the corresponding page identifier.
在一些可行的实施方式中,所述升级单元602,还用于:In some feasible implementation manners, the upgrading unit 602 is further configured to:
根据所述第二属性包括的签名方法,对所述相应数据块下的数据页进行校验;Verify the data page under the corresponding data block according to the signature method included in the second attribute;
在校验完成后,响应所述第二软件数据包请求,通过虚拟节点服务模块向所述节点设备发送所述相应数据块下的数据页。After the verification is completed, in response to the second software data packet request, the data page under the corresponding data block is sent to the node device through the virtual node service module.
在一些可行的实施方式中,所述已接入的节点设备的升级事件是由OCF设备触发的,其中,所述OCF设备是通过所述虚拟OCF服务模块传输数据,所述获取单元602,还用于:In some feasible implementation manners, the upgrade event of the accessed node device is triggered by an OCF device, where the OCF device transmits data through the virtual OCF service module, and the acquiring unit 602 further Used for:
根据第二映射关系获得所述节点设备的设备信息,其中,所述第二映射关系是指:所述虚拟OCF服务模块与所述节点设备之间的设备信息映射关系;Obtaining the device information of the node device according to a second mapping relationship, where the second mapping relationship refers to: a device information mapping relationship between the virtual OCF service module and the node device;
根据所述设备信息,通过所述虚拟节点服务模块获取所述节点设备的本地版本信息;Obtaining the local version information of the node device through the virtual node service module according to the device information;
根据所述第一属性包括的地址信息,获取所述关联服务器上的服务版本信息;Obtaining service version information on the associated server according to the address information included in the first attribute;
在所述节点设备的本地版本信息低于所述关联服务器上的服务版本信息的情况下,执行所述获取与所述节点设备相关的软件数据包。In a case where the local version information of the node device is lower than the service version information on the associated server, execute the acquisition of the software data package related to the node device.
在一些可行的实施方式中,所述已接入的节点设备的升级事件是由节点设备触发的,所述获取单元602,具体用于:In some feasible implementation manners, the upgrade event of the accessed node device is triggered by the node device, and the acquiring unit 602 is specifically configured to:
获取所述节点设备触发所述升级事件时发生的升级请求,其中,所述升级请求包括所述节点设备的本地版本信息;Acquiring an upgrade request that occurs when the node device triggers the upgrade event, where the upgrade request includes local version information of the node device;
根据所述第一属性包括的地址信息,获取所述关联服务器上的服务版本信息;Obtaining service version information on the associated server according to the address information included in the first attribute;
在所述节点设备的本地版本信息低于所述关联服务器上的服务版本信息的情况下,执行所述获取与所述节点设备相关的软件数据包。In a case where the local version information of the node device is lower than the service version information on the associated server, execute the acquisition of the software data package related to the node device.
本申请实施例中,建立单元601建立第一映射关系,所述第一映射关系是指:虚拟开放连接基金会OCF服务模块中的软件更新资源、与节点设备中的空中下载簇OTA Cluster之间的更新映射信息,所述更新映射信息包括更新版本属性的映射关系和更新状态属性的映射关系,获取单元602若检测到已接入的节点设备的升级事件,则获取与所述节点设备相关的软件更新数据包和第一映射关系,进一步的,升级单元603根据所述软件更新数据包和所述第一映射关系,对所述节点设备进行升级处理。通过实施上述方法,可实现在OCF协议下对接入的各种节点设备进行设备升级管理。In the embodiment of the present application, the establishing unit 601 establishes a first mapping relationship, and the first mapping relationship refers to: the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device The update mapping information includes the update version attribute mapping relationship and the update status attribute mapping relationship. If the obtaining unit 602 detects the upgrade event of the connected node device, it obtains information related to the node device The software update data package and the first mapping relationship. Further, the upgrading unit 603 performs upgrade processing on the node device according to the software update data package and the first mapping relationship. Through the implementation of the above method, it is possible to implement device upgrade management for various node devices accessed under the OCF protocol.
可以理解,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。本申请实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。It can be understood that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation. The functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
参见图7,图7为本申请实施例提供的一种智能设备的结构示意图,其中,图7所示的智能设备可以包括:处理器701、通信接口702以及存储器703,处理器701、通信接口702以及存储器703分别连接总线,其中,存储器703中用于存储计算机程序,所述计算机程序包括程序指令,处理器701用于执行存储器703存储的程序指令。Referring to FIG. 7, FIG. 7 is a schematic structural diagram of a smart device provided by an embodiment of the application. The smart device shown in FIG. 7 may include: a processor 701, a communication interface 702, and a memory 703. The processor 701, a communication interface 702 and the memory 703 are respectively connected to a bus, where the memory 703 is used to store a computer program, and the computer program includes program instructions, and the processor 701 is used to execute the program instructions stored in the memory 703.
在本申请实施例中,处理器701通过运行存储器703中的可执行程序代码,执行如下操作:In the embodiment of the present application, the processor 701 executes the following operations by running the executable program code in the memory 703:
建立第一映射关系,所述第一映射关系是指:虚拟开放连接基金会OCF服务模块中的软件更新资源、与节点设备中的空中下载簇OTA Cluster之间的更新映射信息,所述更新映射信息包括更新版本属性的映射关系和更新状态属性的映射关系;The first mapping relationship is established, and the first mapping relationship refers to the update mapping information between the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device, the update mapping The information includes the mapping relationship of update version attributes and the mapping relationship of update status attributes;
在检测到所述节点设备的升级事件的情况下,获取与所述节点设备相关的软件数据包和所述第一映射关系;In the case of detecting an upgrade event of the node device, acquiring a software data package related to the node device and the first mapping relationship;
根据所述软件数据包和所述第一映射关系,对所述节点设备进行升级处理。Perform upgrade processing on the node device according to the software data package and the first mapping relationship.
在一些可行的实施方式中,所述处理器701,还用于:In some feasible implementation manners, the processor 701 is further configured to:
建立所述虚拟OCF设备,其中,所述虚拟OCF设备包括所述软件更新资源;Establishing the virtual OCF device, where the virtual OCF device includes the software update resource;
将所述节点设备的关联服务器的地址信息作为第一属性添加到所述软件更新资源中;Adding the address information of the associated server of the node device as the first attribute to the software update resource;
将所述节点设备的关联服务器的签名方法作为第二属性添加到所述软件更新资源中。The signature method of the associated server of the node device is added as the second attribute to the software update resource.
在一些可行的实施方式中,所述处理器701,具体用于:In some feasible implementation manners, the processor 701 is specifically configured to:
根据所述软件数据包,对所述节点设备进行数据升级处理;Perform data upgrade processing on the node device according to the software data package;
根据所述第一映射关系,对所述节点设备升级处理过程中的状态进行升级反馈处理。According to the first mapping relationship, upgrade feedback processing is performed on the state during the upgrade processing of the node device.
在一些可行的实施方式中,所述处理器701,具体用于:In some feasible implementation manners, the processor 701 is specifically configured to:
根据所述第一属性包括的地址信息获取所述软件数据包;Acquiring the software data package according to the address information included in the first attribute;
在接收到第一软件数据包更新请求的情况下,根据所述软件数据包对所述节点设备进行数据升级处理。In the case of receiving the first software data package update request, perform data update processing on the node device according to the software data package.
在一些可行的实施方式中,所述处理器701,还用于:In some feasible implementation manners, the processor 701 is further configured to:
通过为所述节点设备建立的虚拟节点服务模块向所述节点设备发送升级通知信息,其中,所述节点设备是通过所述虚拟节点服务模块传输数据。Sending upgrade notification information to the node device through a virtual node service module established for the node device, where the node device transmits data through the virtual node service module.
在一些可行的实施方式中,所述处理器701,具体用于:In some feasible implementation manners, the processor 701 is specifically configured to:
根据所述第一属性包括的地址信息从所述关联服务器上下载对应的软件数据包,并根据所述第二属性包括的签名方法,对所述软件数据包的进行校验;Download the corresponding software data package from the associated server according to the address information included in the first attribute, and verify the software data package according to the signature method included in the second attribute;
在校验完成后,将所述软件数据包分为N数据块,每块有M数据页,所述N和M为正整数;After the verification is completed, divide the software data packet into N data blocks, each block has M data pages, and the N and M are positive integers;
接收所述节点设备通过所述虚拟节点服务模块发送的第一软件数据包更新请求,其中,所述第一软件数据包更新请求中包括所需的第一数据块的块标识及对应的数据页的页标识;Receive a first software data package update request sent by the node device through the virtual node service module, where the first software data package update request includes the required block identifier of the first data block and the corresponding data page Page ID;
响应所述第一软件数据包请求,根据所述块标识及对应的页标识通过虚拟节点服务模块向所述节点设备发送相应数据块下的数据页。In response to the first software data packet request, the data page under the corresponding data block is sent to the node device through the virtual node service module according to the block identifier and the corresponding page identifier.
在一些可行的实施方式中,所述处理器701,还用于:In some feasible implementation manners, the processor 701 is further configured to:
根据第一映射关系中的更新状态属性,将所述软件数据包的下载状态映射为第一映射关系中的更新状态属性;Mapping the download status of the software data package to the update status attribute in the first mapping relationship according to the update status attribute in the first mapping relationship;
向所述虚拟OCF服务模块发送包括软件数据包下载状态的下载状态反馈信息。Sending the download status feedback information including the download status of the software data package to the virtual OCF service module.
在一些可行的实施方式中,所述处理器701,具体用于:In some feasible implementation manners, the processor 701 is specifically configured to:
接收所述节点设备通过所述虚拟节点服务模块发送的反馈信息,所述反馈信息包括:节点设备软件版本信息和节点设备软件更新状态信息;Receiving feedback information sent by the node device through the virtual node service module, the feedback information including: node device software version information and node device software update status information;
根据第一映射关系中的更新版本属性和更新状态属性,将所述节点设备软件版本信息映射为第一映射关系中的更新版本属性,将节点设备软件更新状态信息映射为第一映射关系中的更新状态属性;According to the update version attribute and the update status attribute in the first mapping relationship, the node device software version information is mapped to the update version attribute in the first mapping relationship, and the node device software update status information is mapped to the update version attribute in the first mapping relationship. Update status attributes;
向所述虚拟OCF服务模块发送包括虚拟OCF服务模块更新版本属性和虚拟OCF服务模块更新状态属性的升级状态反馈信息。Sending the upgrade status feedback information including the updated version attribute of the virtual OCF service module and the updated status attribute of the virtual OCF service module to the virtual OCF service module.
在一些可行的实施方式中,所述处理器701,还用于:In some feasible implementation manners, the processor 701 is further configured to:
在本地存储空间满足软件数据包存储条件的情况下,执行所述根据所述第一属性包括的地址信息获取所述软件数据包;In the case that the local storage space satisfies the software data package storage condition, execute the acquisition of the software data package according to the address information included in the first attribute;
在本地存储空间不满足软件数据包存储条件的情况下,接收所述节点设备通过所述虚拟节点服务模块发送的第二软件数据包请求,其中,所述第二软件数据包请求包括所需的第二数据块的块标识及对应的数据页的页标识,并根据所述块标识及对应的页标识,从所述关联服务器上下载相应数据块下的数据页。In the case that the local storage space does not meet the software data packet storage condition, receive a second software data packet request sent by the node device through the virtual node service module, where the second software data packet request includes the required The block identifier of the second data block and the page identifier of the corresponding data page, and the data page under the corresponding data block is downloaded from the associated server according to the block identifier and the corresponding page identifier.
在一些可行的实施方式中,所述处理器701,还用于:In some feasible implementation manners, the processor 701 is further configured to:
根据所述第二属性包括的签名方法,对所述相应数据块下的数据页进行校验;Verify the data page under the corresponding data block according to the signature method included in the second attribute;
在校验完成后,响应所述第二软件数据包请求,通过虚拟节点服务模块向所述节点设备发送所述相应数据块下的数据页。After the verification is completed, in response to the second software data packet request, the data page under the corresponding data block is sent to the node device through the virtual node service module.
在一些可行的实施方式中,所述已接入的节点设备的升级事件是由OCF设备触发的,其中,所述OCF设备是通过所述虚拟OCF服务模块传输数据,所述处理器701,具体用于:In some feasible implementation manners, the upgrade event of the accessed node device is triggered by an OCF device, where the OCF device transmits data through the virtual OCF service module, and the processor 701 specifically Used for:
根据第二映射关系获得所述节点设备的设备信息,其中,所述第二映射关系是指:所述虚拟OCF服务模块与所述节点设备之间的设备信息映射关系;Obtaining the device information of the node device according to a second mapping relationship, where the second mapping relationship refers to: a device information mapping relationship between the virtual OCF service module and the node device;
根据所述设备信息,通过为所述节点设备建立的虚拟节点服务模块获取所述节点设备的本地版本信息,其中,所述节点设备是通过所述虚拟节点服务模块传输数据;Acquiring, according to the device information, the local version information of the node device through a virtual node service module established for the node device, where the node device transmits data through the virtual node service module;
根据所述第一属性包括的地址信息,获取所述关联服务器上的服务版本信息;Obtaining service version information on the associated server according to the address information included in the first attribute;
在所述节点设备的本地版本信息低于所述关联服务器上的服务版本信息的情况下,执行所述获取与所述节点设备相关的软件数据包。In a case where the local version information of the node device is lower than the service version information on the associated server, execute the acquisition of the software data package related to the node device.
在一些可行的实施方式中,所述已接入的节点设备的升级事件是由节点设备触发的,所述处理器701,具体用于:In some feasible implementation manners, the upgrade event of the accessed node device is triggered by the node device, and the processor 701 is specifically configured to:
获取所述节点设备触发所述升级事件时发生的升级请求,其中,所述升级请求包括所述节点设备的本地版本信息;Acquiring an upgrade request that occurs when the node device triggers the upgrade event, where the upgrade request includes local version information of the node device;
根据所述第一属性包括的地址信息,获取所述关联服务器上的服务版本信息;Obtaining service version information on the associated server according to the address information included in the first attribute;
在所述节点设备的本地版本信息低于所述关联服务器上的服务版本信息的情况下,执行所述获取与所述节点设备相关的软件数据包。In a case where the local version information of the node device is lower than the service version information on the associated server, execute the acquisition of the software data package related to the node device.
本申请实施例中,处理器701建立第一映射关系,所述第一映射关系是指:虚拟开放连接基金会OCF服务模块中的软件更新资源、与节点设备中的空中下载簇OTA Cluster之间的更新映射信息,所述更新映射信息包括更新版本属性的映射关系和更新状态属性的映射关系,若检测到已接入的节点设备的升级事件,则获取与所述节点设备相关的软件更新数据包和第一映射关系,进一步的,根据所述软件更新数据包和所述第一映射关系,对所述节点设备进行升级处理。通过实施上述方法,可实现在OCF协议下对接入的各种节点设备进行设备升级管理。In this embodiment of the application, the processor 701 establishes a first mapping relationship, and the first mapping relationship refers to the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device The update mapping information includes the update version attribute mapping relationship and the update status attribute mapping relationship. If the upgrade event of the connected node device is detected, the software update data related to the node device is acquired The package and the first mapping relationship, and further, the node device is upgraded according to the software update data package and the first mapping relationship. Through the implementation of the above method, it is possible to implement device upgrade management for various node devices accessed under the OCF protocol.
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method as recorded in the above method embodiment .
本申请实施例还提供了一种计算机程序产品,其中,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如上述方法实施例中终端或网络设备所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。The embodiments of the present application also provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the method embodiments described above. Part or all of the steps described in the terminal or network device. The computer program product may be a software installation package.
结合本申请公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(Random Access Memory,RAM)、闪存、只读存储器(Read Only Memory,ROM)、可擦除可编程只读存储器(Erasable Programmable ROM,EPROM)、电可擦可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。另外,该ASIC可以位于通信装置如终端中。当然,处理器和存储介质也可以作为分立组件存在于通信装置中。The steps of the method or algorithm described in combination with the disclosure of the present application may be implemented in a hardware manner, or may be implemented in a manner in which a processor executes software instructions. Software instructions can be composed of corresponding software modules, which can be stored in random access memory (Random Access Memory, RAM), flash memory, read-only memory (Read Only Memory, ROM), and erasable programmable read-only memory ( Erasable Programmable ROM (EPROM), Electrically Erasable Programmable Read-Only Memory (Electrically EPROM, EEPROM), register, hard disk, mobile hard disk, CD-ROM or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium may also be an integral part of the processor. The processor and the storage medium may be located in the ASIC. In addition, the ASIC may be located in a communication device such as a terminal. Of course, the processor and the storage medium may also exist as discrete components in the communication device.
可以理解,本文中涉及的第一、第二、各种数字编号仅为描述方便进行的区分,并不用来限制本申请实施例的范围。It can be understood that the first, second, and various numbers involved in this specification are only for easy distinction for description, and are not used to limit the scope of the embodiments of the present application.
可以理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It can be understood that, in the various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not imply the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application. The implementation process constitutes any limitation.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可通过计算机程序来指令相关的硬件来完成,该的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可存储程序代码的介质。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The program can be stored in a computer readable storage medium. When the program is executed, , May include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

Claims (27)

  1. 一种设备升级方法,其特征在于,包括:A method for upgrading equipment is characterized in that it comprises:
    建立第一映射关系,所述第一映射关系是指:虚拟开放连接基金会OCF服务模块中的软件更新资源、与节点设备中的空中下载簇OTA Cluster之间的更新映射信息,所述更新映射信息包括更新版本属性的映射关系和更新状态属性的映射关系;The first mapping relationship is established, and the first mapping relationship refers to the update mapping information between the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device, the update mapping The information includes the mapping relationship of update version attributes and the mapping relationship of update status attributes;
    在检测到所述节点设备的升级事件的情况下,获取与所述节点设备相关的软件数据包和所述第一映射关系;In the case of detecting an upgrade event of the node device, acquiring a software data package related to the node device and the first mapping relationship;
    根据所述软件数据包和所述第一映射关系,对所述节点设备进行升级处理。Perform upgrade processing on the node device according to the software data package and the first mapping relationship.
  2. 根据权利要求1所述的方法,其特征在于,所述建立第一映射关系之后,还包括:The method according to claim 1, wherein after the establishing the first mapping relationship, the method further comprises:
    建立所述虚拟OCF设备,其中,所述虚拟OCF设备包括所述软件更新资源;Establishing the virtual OCF device, where the virtual OCF device includes the software update resource;
    将所述节点设备的关联服务器的地址信息作为第一属性添加到所述软件更新资源中;Adding the address information of the associated server of the node device as the first attribute to the software update resource;
    将所述节点设备的关联服务器的签名方法作为第二属性添加到所述软件更新资源中。The signature method of the associated server of the node device is added as the second attribute to the software update resource.
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述软件更新数据包和所述第一映射关系,对所述节点设备进行升级处理,包括:The method according to claim 1, wherein the upgrading the node device according to the software update data package and the first mapping relationship comprises:
    根据所述软件数据包,对所述节点设备进行数据升级处理;Perform data upgrade processing on the node device according to the software data package;
    根据所述第一映射关系,对所述节点设备升级处理过程中的状态进行升级反馈处理。According to the first mapping relationship, upgrade feedback processing is performed on the state during the upgrade processing of the node device.
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述软件数据包,对所述节点设备进行数据升级处理,包括:The method according to claim 3, wherein the performing data upgrade processing on the node device according to the software data package comprises:
    根据所述第一属性包括的地址信息获取所述软件数据包;Acquiring the software data package according to the address information included in the first attribute;
    在接收到第一软件数据包更新请求的情况下,根据所述软件数据包对所述节点设备进行数据升级处理。In the case of receiving the first software data package update request, perform data update processing on the node device according to the software data package.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述第一属性包括的地址信息获取所述软件数据包之前,还包括:The method according to claim 4, wherein before the obtaining the software data package according to the address information included in the first attribute, the method further comprises:
    通过为所述节点设备建立的虚拟节点服务模块向所述节点设备发送升级通知信息,其中,所述节点设备是通过所述虚拟节点服务模块传输数据。Sending upgrade notification information to the node device through a virtual node service module established for the node device, where the node device transmits data through the virtual node service module.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述第一属性包括的地址信息获取所述软件数据包,包括:The method according to claim 5, wherein the acquiring the software data package according to the address information included in the first attribute comprises:
    根据所述第一属性包括的地址信息从所述关联服务器上下载对应的软件数据包,并根据所述第二属性包括的签名方法,对所述软件数据包的进行校验;Download the corresponding software data package from the associated server according to the address information included in the first attribute, and verify the software data package according to the signature method included in the second attribute;
    在校验完成后,将所述软件数据包分为N数据块,每块有M数据页,其中,所述N和M为正整数;After the verification is completed, divide the software data packet into N data blocks, each block has M data pages, where the N and M are positive integers;
    所述在接收到软件数据包更新请求的情况下,根据所述软件数据包对所述节点设备进行数据升级处理,包括:In the case of receiving a software data package update request, performing data update processing on the node device according to the software data package includes:
    接收所述节点设备通过所述虚拟节点服务模块发送的第一软件数据包更新请求,其中,所述第一软件数据包更新请求中包括所需的第一数据块的块标识及对应的数据页的页标识;Receive a first software data package update request sent by the node device through the virtual node service module, where the first software data package update request includes the required block identifier of the first data block and the corresponding data page Page ID;
    响应所述第一软件数据包请求,根据所述块标识及对应的页标识通过虚拟节点服务模块向所述节点设备发送相应数据块下的数据页。In response to the first software data packet request, the data page under the corresponding data block is sent to the node device through the virtual node service module according to the block identifier and the corresponding page identifier.
  7. 根据权利要求4-6任一项所述的方法,其特征在于,所述根据所述第一属性包括的地址信息获取所述软件数据包之后,还包括:The method according to any one of claims 4-6, wherein after the obtaining the software data package according to the address information included in the first attribute, the method further comprises:
    根据第一映射关系中的更新状态属性,将所述软件数据包的下载状态映射为第一映射关系中的更新状态属性;Mapping the download status of the software data package to the update status attribute in the first mapping relationship according to the update status attribute in the first mapping relationship;
    向所述虚拟OCF服务模块发送包括软件数据包下载状态的下载状态反馈信息。Sending the download status feedback information including the download status of the software data package to the virtual OCF service module.
  8. 根据权利要求3所述的方法,其特征在于,所述根据第一映射关系,对所述节点设备升级处理过程中的状态进行反馈处理,包括:The method according to claim 3, wherein the performing feedback processing on the state in the process of upgrading the node device according to the first mapping relationship comprises:
    接收所述节点设备通过所述虚拟节点服务模块发送的反馈信息,所述反馈信息包括:节点设备软件版本信息和节点设备软件更新状态信息;Receiving feedback information sent by the node device through the virtual node service module, the feedback information including: node device software version information and node device software update status information;
    根据第一映射关系中的更新版本属性和更新状态属性,将所述节点设备软件版本信息映射为第一映射关系中的更新版本属性,将节点设备软件更新状态信息映射为第一映射关系中的更新状态属性;According to the update version attribute and the update status attribute in the first mapping relationship, the node device software version information is mapped to the update version attribute in the first mapping relationship, and the node device software update status information is mapped to the update version attribute in the first mapping relationship. Update status attributes;
    向所述虚拟OCF服务模块发送包括虚拟OCF服务模块更新版本属性和虚拟OCF服务模块更新状态属性的升级状态反馈信息。Sending the upgrade status feedback information including the updated version attribute of the virtual OCF service module and the updated status attribute of the virtual OCF service module to the virtual OCF service module.
  9. 根据权利要求4所述的方法,其特征在于,所述根据所述第一属性包括的地址信息获取所述软件数据包之前,还包括:The method according to claim 4, wherein before the obtaining the software data package according to the address information included in the first attribute, the method further comprises:
    在本地存储空间满足软件数据包存储条件的情况下,执行所述根据所述第一属性包括的地址信息获取所述软件数据包;In the case that the local storage space satisfies the software data package storage condition, execute the acquisition of the software data package according to the address information included in the first attribute;
    在本地存储空间不满足软件数据包存储条件的情况下,接收所述节点设备通过所述虚拟节点服务模块发送的第二软件数据包请求,其中,所述第二软件数据包请求包括所需的第二数据块的块标识及对应的数据页的页标识,并根据所述块标识及对应的页标识,从所述关联服务器上下载相应数据块下的数据页。In the case that the local storage space does not meet the software data packet storage condition, receive a second software data packet request sent by the node device through the virtual node service module, where the second software data packet request includes the required The block identifier of the second data block and the page identifier of the corresponding data page, and the data page under the corresponding data block is downloaded from the associated server according to the block identifier and the corresponding page identifier.
  10. 根据权利要求9所述的方法,其特征在于,所述从所述关联服务器上下载相应数据块下的数据页之后,还包括:The method according to claim 9, characterized in that, after downloading the data page under the corresponding data block from the association server, the method further comprises:
    根据所述第二属性包括的签名方法,对所述相应数据块下的数据页进行校验;Verify the data page under the corresponding data block according to the signature method included in the second attribute;
    在校验完成后,响应所述第二软件数据包请求,通过虚拟节点服务模块向所述节点设备发送所述相应数据块下的数据页。After the verification is completed, in response to the second software data packet request, the data page under the corresponding data block is sent to the node device through the virtual node service module.
  11. 根据权利要求1所述的方法,其特征在于,所述已接入节点设备的升级事件是由OCF设备触发的,其中,所述OCF设备是通过所述虚拟OCF服务模块传输数据,所述获取与所述节点设备相关的软件数据包和所述第一映射关系之前,还包括:The method according to claim 1, wherein the upgrade event of the connected node device is triggered by an OCF device, wherein the OCF device transmits data through the virtual OCF service module, and the obtaining Before the software data package related to the node device and the first mapping relationship, the method further includes:
    根据第二映射关系获得所述节点设备的设备信息,其中,所述第二映射关系是指:所述虚拟OCF服务模块与所述节点设备之间的设备信息映射关系;Obtaining the device information of the node device according to a second mapping relationship, where the second mapping relationship refers to: a device information mapping relationship between the virtual OCF service module and the node device;
    根据所述设备信息,通过所述虚拟节点服务模块获取所述节点设备的本地版本信息;Obtaining the local version information of the node device through the virtual node service module according to the device information;
    根据所述第一属性包括的地址信息,获取所述关联服务器上的服务版本信息;Obtaining service version information on the associated server according to the address information included in the first attribute;
    在所述节点设备的本地版本信息低于所述关联服务器上的服务版本信息的情况下,执行所述获取与所述节点设备相关的软件数据包。In a case where the local version information of the node device is lower than the service version information on the associated server, execute the acquisition of the software data package related to the node device.
  12. 根据权利要求1所述的方法,其特征在于,所述已接入节点设备的升级事件是由节点设备触发的,所述获取与所述节点设备相关的软件数据包和所述第一映射关系之前,还包括:The method according to claim 1, wherein the upgrade event of the accessed node device is triggered by the node device, and the obtaining of the software data package related to the node device and the first mapping relationship Before, it also included:
    获取所述节点设备触发所述升级事件时发生的升级请求,其中,所述升级请求包括所述节点设备的本地版本信息;Acquiring an upgrade request that occurs when the node device triggers the upgrade event, where the upgrade request includes local version information of the node device;
    根据所述第一属性包括的地址信息,获取所述关联服务器上的服务版本信息;Obtaining service version information on the associated server according to the address information included in the first attribute;
    在所述节点设备的本地版本信息低于所述关联服务器上的服务版本信息的情况下,执行所述获取与所述节点设备相关的软件数据包。In a case where the local version information of the node device is lower than the service version information on the associated server, execute the acquisition of the software data package related to the node device.
  13. 一种设备升级装置,其特征在于,所述装置包括:An equipment upgrading device, characterized in that the device includes:
    建立单元,用于建立第一映射关系,所述第一映射关系是指:虚拟开放连接基金会OCF服务模块中的软件更新资源、与节点设备中的空中下载簇OTA Cluster之间的更新映射信息,所述更新映射信息包括更新版本属性的映射关系和更新状态属性的映射关系;The establishment unit is used to establish a first mapping relationship, and the first mapping relationship refers to the update mapping information between the software update resource in the OCF service module of the Virtual Open Connection Foundation and the over-the-air download cluster OTA Cluster in the node device , The update mapping information includes the mapping relationship of the update version attribute and the mapping relationship of the update status attribute;
    获取单元,用于在检测到所述节点设备的升级事件的情况下,获取与所述节点设备相关的软件数据包和所述第一映射关系;An obtaining unit, configured to obtain a software data package related to the node device and the first mapping relationship in a case where an upgrade event of the node device is detected;
    升级单元,用于根据所述软件更新数据包和所述第一映射关系,对所述节点设备进行升级处理。The upgrade unit is configured to perform upgrade processing on the node device according to the software update data package and the first mapping relationship.
  14. 根据权利要求13所述的方法,其特征在于,所述建立单元,还用于:The method according to claim 13, wherein the establishing unit is further configured to:
    建立所述虚拟OCF设备,其中,所述虚拟OCF设备包括所述软件更新资源;Establishing the virtual OCF device, where the virtual OCF device includes the software update resource;
    将所述节点设备的关联服务器的地址信息作为第一属性添加到所述软件更新资源中;Adding the address information of the associated server of the node device as the first attribute to the software update resource;
    将所述节点设备的关联服务器的签名方法作为第二属性添加到所述软件更新资源中。The signature method of the associated server of the node device is added as the second attribute to the software update resource.
  15. 根据权利要求13所述的方法,其特征在于,所述升级单元,具体用于:The method according to claim 13, wherein the upgrading unit is specifically configured to:
    根据所述软件数据包,对所述节点设备进行数据升级处理;Perform data upgrade processing on the node device according to the software data package;
    根据所述第一映射关系,对所述节点设备升级处理过程中的状态进行升级反馈处理。According to the first mapping relationship, upgrade feedback processing is performed on the state during the upgrade processing of the node device.
  16. 根据权利要求15所述的方法,其特征在于,所述升级单元,具体用于:The method according to claim 15, wherein the upgrading unit is specifically configured to:
    根据所述第一属性包括的地址信息获取所述软件数据包;Acquiring the software data package according to the address information included in the first attribute;
    在接收到第一软件数据包更新请求的情况下,根据所述软件数据包对所述节点设备进行数据升级处理。In the case of receiving the first software data package update request, perform data update processing on the node device according to the software data package.
  17. 根据权利要求16所述的方法,其特征在于,所述装置还包括:The method according to claim 16, wherein the device further comprises:
    发送单元,用于通过为所述节点设备建立的虚拟节点服务模块向所述节点设备发送升级通知信息,其中,所述节点设备是通过所述虚拟节点服务模块传输数据。The sending unit is configured to send upgrade notification information to the node device through a virtual node service module established for the node device, where the node device transmits data through the virtual node service module.
  18. 根据权利要求17所述的方法,其特征在于,所述获取单元,具体用于:The method according to claim 17, wherein the acquiring unit is specifically configured to:
    根据所述第一属性包括的地址信息从所述关联服务器上下载对应的软件数据包,并根据所述第二属性包括的签名方法,对所述软件数据包的进行校验;Download the corresponding software data package from the associated server according to the address information included in the first attribute, and verify the software data package according to the signature method included in the second attribute;
    在校验完成后,将所述软件数据包分为N数据块,每块有M数据页,其中,所述N和M为正整数;After the verification is completed, divide the software data packet into N data blocks, each block has M data pages, where the N and M are positive integers;
    所述升级单元,具体用于:The upgrading unit is specifically used for:
    接收所述节点设备通过所述虚拟节点服务模块发送的第一软件数据包更新请求,其中,所述第一软件数据包更新请求中包括所需的第一数据块的块标识及对应的数据页的页标识;Receive a first software data package update request sent by the node device through the virtual node service module, where the first software data package update request includes the required block identifier of the first data block and the corresponding data page Page ID;
    响应所述第一软件数据包请求,根据所述块标识及对应的页标识通过虚拟节点服务模块向所述节点设备发送相应数据块下的数据页。In response to the first software data packet request, the data page under the corresponding data block is sent to the node device through the virtual node service module according to the block identifier and the corresponding page identifier.
  19. 根据权利要求16-18任一项所述的方法,其特征在于,所述升级单元,还用于:The method according to any one of claims 16-18, wherein the upgrading unit is further configured to:
    根据第一映射关系中的更新状态属性,将所述软件数据包的下载状态映射为第一映射关系中的更新状态属性;Mapping the download status of the software data package to the update status attribute in the first mapping relationship according to the update status attribute in the first mapping relationship;
    向所述虚拟OCF服务模块发送包括软件数据包下载状态的下载状态反馈信息。Sending the download status feedback information including the download status of the software data package to the virtual OCF service module.
  20. 根据权利要求15所述的方法,其特征在于,所述升级单元,具体用于:The method according to claim 15, wherein the upgrading unit is specifically configured to:
    接收所述节点设备通过所述虚拟节点服务模块发送的反馈信息,所述反馈信息包括:节点设备软件版本信息和节点设备软件更新状态信息;Receiving feedback information sent by the node device through the virtual node service module, the feedback information including: node device software version information and node device software update status information;
    根据第一映射关系中的更新版本属性和更新状态属性,将所述节点设备软件版本信息映射为第一映射关系中的更新版本属性,将节点设备软件更新状态信息映射为第一映射关系中的更新状态属性;According to the update version attribute and the update status attribute in the first mapping relationship, the node device software version information is mapped to the update version attribute in the first mapping relationship, and the node device software update status information is mapped to the update version attribute in the first mapping relationship. Update status attributes;
    向所述虚拟OCF服务模块发送包括虚拟OCF服务模块更新版本属性和虚拟OCF服务模块更新状态属性的升级状态反馈信息。Sending the upgrade status feedback information including the updated version attribute of the virtual OCF service module and the updated status attribute of the virtual OCF service module to the virtual OCF service module.
  21. 根据权利要求16所述的方法,其特征在于,所述升级单元,还用于:The method according to claim 16, wherein the upgrading unit is further configured to:
    在本地存储空间满足软件数据包存储条件的情况下,执行所述根据所述第一属性包括的地址信息获取所述软件数据包;In the case that the local storage space satisfies the software data package storage condition, execute the acquisition of the software data package according to the address information included in the first attribute;
    在本地存储空间不满足软件数据包存储条件的情况下,接收所述节点设备通过所述虚拟节点服务模块发送的第二软件数据包请求,其中,所述第二软件数据包请求包括所需的第二数据块的块标识及对应的数据页的页标识,并根据所述块标识及对应的页标识,从所述关联服务器上下载相应数据块下的数据页。In the case that the local storage space does not meet the software data packet storage condition, receive a second software data packet request sent by the node device through the virtual node service module, where the second software data packet request includes the required The block identifier of the second data block and the page identifier of the corresponding data page, and the data page under the corresponding data block is downloaded from the associated server according to the block identifier and the corresponding page identifier.
  22. 根据权利要求21所述的方法,其特征在于,所述升级单元,还用于:The method according to claim 21, wherein the upgrading unit is further configured to:
    根据所述第二属性包括的签名方法,对所述相应数据块下的数据页进行校验;Verify the data page under the corresponding data block according to the signature method included in the second attribute;
    在校验完成后,响应所述第二软件数据包请求,通过虚拟节点服务模块向所述节点设备发送所述相应数据块下的数据页。After the verification is completed, in response to the second software data packet request, the data page under the corresponding data block is sent to the node device through the virtual node service module.
  23. 根据权利要求13所述的方法,其特征在于,所述获取单元,还用于:The method according to claim 13, wherein the acquiring unit is further configured to:
    根据第二映射关系获得所述节点设备的设备信息,其中,所述第二映射关系是指:所述虚拟OCF服务模块与所述节点设备之间的设备信息映射关系;Obtaining the device information of the node device according to a second mapping relationship, where the second mapping relationship refers to: a device information mapping relationship between the virtual OCF service module and the node device;
    根据所述设备信息,通过所述虚拟节点服务模块获取所述节点设备的本地版本信息;Obtaining the local version information of the node device through the virtual node service module according to the device information;
    根据所述第一属性包括的地址信息,获取所述关联服务器上的服务版本信息;Obtaining service version information on the associated server according to the address information included in the first attribute;
    在所述节点设备的本地版本信息低于所述关联服务器上的服务版本信息的情况下,执行所述获取与所述节点设备相关的软件数据包。In a case where the local version information of the node device is lower than the service version information on the associated server, execute the acquisition of the software data package related to the node device.
  24. 根据权利要求13所述的方法,其特征在于,所述获取单元,还用于:The method according to claim 13, wherein the acquiring unit is further configured to:
    获取所述节点设备触发所述升级事件时发生的升级请求,其中,所述升级请求包括所述节点设备的本地版本信息;Acquiring an upgrade request that occurs when the node device triggers the upgrade event, where the upgrade request includes local version information of the node device;
    根据所述第一属性包括的地址信息,获取所述关联服务器上的服务版本信息;Obtaining service version information on the associated server according to the address information included in the first attribute;
    在所述节点设备的本地版本信息低于所述关联服务器上的服务版本信息的情况下,执行所述获取与所述节点设备相关的软件数据包。In a case where the local version information of the node device is lower than the service version information on the associated server, execute the acquisition of the software data package related to the node device.
  25. 一种智能设备,其特征在于,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-12任一项所述的方法中的步骤的指令。An intelligent device, characterized by comprising a processor, a memory, a communication interface, and one or more programs, the one or more programs are stored in the memory and configured to be executed by the processor, The program includes instructions for performing the steps in the method according to any one of claims 1-12.
  26. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序使得计算机执行如权利要求1-12任一项所述的方法。A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program enables a computer to execute the method according to any one of claims 1-12.
  27. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使得计算机执行如权利要求1-12任一项所述的方法。A computer program product, characterized in that the computer program product includes a computer program stored on a computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes such as The method of any one of claims 1-12.
PCT/CN2020/089281 2020-05-08 2020-05-08 Device upgrading method, smart device, and computer readable storage medium WO2021223247A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080098880.4A CN115335803B (en) 2020-05-08 2020-05-08 Equipment upgrading method, intelligent equipment and computer readable storage medium
PCT/CN2020/089281 WO2021223247A1 (en) 2020-05-08 2020-05-08 Device upgrading method, smart device, and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/089281 WO2021223247A1 (en) 2020-05-08 2020-05-08 Device upgrading method, smart device, and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2021223247A1 true WO2021223247A1 (en) 2021-11-11

Family

ID=78467697

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/089281 WO2021223247A1 (en) 2020-05-08 2020-05-08 Device upgrading method, smart device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN115335803B (en)
WO (1) WO2021223247A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114978905A (en) * 2022-05-25 2022-08-30 重庆长安汽车股份有限公司 Software OTA (over the air) upgrading method based on container
CN115665700A (en) * 2022-10-20 2023-01-31 浙江吉利控股集团有限公司 OTA updating method, device, equipment and storage medium based on vehicle machine
WO2023142053A1 (en) * 2022-01-29 2023-08-03 Oppo广东移动通信有限公司 Device upgrade method and apparatus, and chip, storage medium and computer program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136934A (en) * 2010-10-21 2011-07-27 华为技术有限公司 Method, device and network system for realizing remote upgrading of Zigbee equipment
CN107205055A (en) * 2017-08-01 2017-09-26 海信集团有限公司 Terminal staging method and device
CN109547524A (en) * 2018-09-30 2019-03-29 青岛海尔科技有限公司 User behavior storage method, device, equipment and storage medium based on Physical Network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11316958B2 (en) * 2008-08-11 2022-04-26 Icontrol Networks, Inc. Virtual device systems and methods
CN102387165B (en) * 2010-08-27 2014-11-05 腾讯科技(深圳)有限公司 System and method for upgrading software
CN107347017A (en) * 2016-05-06 2017-11-14 中兴通讯股份有限公司 The method, apparatus and configuration point device of a kind of device upgrade
US20180063879A1 (en) * 2016-08-29 2018-03-01 Electronics And Telecommunications Research Institute Apparatus and method for interoperation between internet-of-things devices
CN110727454A (en) * 2019-10-24 2020-01-24 北京云迹科技有限公司 Updating method and device of intelligent equipment, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136934A (en) * 2010-10-21 2011-07-27 华为技术有限公司 Method, device and network system for realizing remote upgrading of Zigbee equipment
CN107205055A (en) * 2017-08-01 2017-09-26 海信集团有限公司 Terminal staging method and device
CN109547524A (en) * 2018-09-30 2019-03-29 青岛海尔科技有限公司 User behavior storage method, device, equipment and storage medium based on Physical Network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HUANG, XUXIN: "Research on OCF Multi-protocol Access System Technology", CHINESE DOCTORAL DISSERTATIONS FULL-TEXT DATABASE (ELECTRONIC JOURNAL), 30 September 2019 (2019-09-30), CN, pages 1 - 75, XP009531606 *
LI YONGHUA; HUANG XUXIN; WANG SIYE: "Multiple Protocols Interworking With Open Connectivity Foundation in Fog Networks", IEEE ACCESS, IEEE, USA, vol. 7, 1 January 1900 (1900-01-01), USA , pages 60764 - 60773, XP011725131, DOI: 10.1109/ACCESS.2019.2907554 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023142053A1 (en) * 2022-01-29 2023-08-03 Oppo广东移动通信有限公司 Device upgrade method and apparatus, and chip, storage medium and computer program
CN114978905A (en) * 2022-05-25 2022-08-30 重庆长安汽车股份有限公司 Software OTA (over the air) upgrading method based on container
CN115665700A (en) * 2022-10-20 2023-01-31 浙江吉利控股集团有限公司 OTA updating method, device, equipment and storage medium based on vehicle machine

Also Published As

Publication number Publication date
CN115335803B (en) 2024-08-23
CN115335803A (en) 2022-11-11

Similar Documents

Publication Publication Date Title
WO2021223247A1 (en) Device upgrading method, smart device, and computer readable storage medium
JP6444405B2 (en) Software update method, system and device
US11972247B2 (en) Software upgrading method, apparatus, and system
US11856065B2 (en) Data transmission for service integration between a virtual private cloud and an intranet
WO2019076037A1 (en) Firmware updating method and device
WO2015176304A1 (en) Euicc management method, euicc, sm platform and system
CN111324363A (en) Equipment upgrading method, upgrading terminal, equipment and storage medium
WO2017092348A1 (en) Updating method, configuration and system for key-value pair database of client terminal
WO2013091382A1 (en) Method and system for realizing compatibility of electrical appliance, and universal peripheral access gateway
CN113824795B (en) Communication method, device and system of vehicle end and cloud end
CN111866063B (en) Online updating system, method and device for AI algorithm of industrial Internet of things
CN103906087A (en) Access point upgrading method, device and system
WO2022142153A1 (en) Electricity meter upgrading method and system, smart meter, and storage medium
WO2009097776A1 (en) System, device and method for achieving service upgrade
CN101360127A (en) File updating method and transmission system
WO2012174799A1 (en) Method, server and system for downloading and installing upgrade package
CN111147314A (en) Switch upgrading method, device and storage medium
CN115277671A (en) OTA (over the air) upgrading method and device for vehicle, vehicle and storage medium
CN111182611B (en) Communication method and device
WO2022179513A1 (en) Method for automatically upgrading smart devices, and cloud server
CN114553693B (en) Gateway upgrading method and device
CN113194494B (en) Air interface resource control method, device, network side equipment and terminal
CN114866525A (en) Remote online firmware upgrading method and system for one-master multi-slave mode embedded equipment
WO2021203384A1 (en) Device upgrade method and apparatus, and storage medium
US20230214207A1 (en) Device upgrade control method and apparatus, and computer device and storage medium

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: 20934754

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: 20934754

Country of ref document: EP

Kind code of ref document: A1