A method and system for writing numbers
By obtaining device information when an IoT device writes an authorized serial number and requesting a unique serial number from the authorized server, the write errors and code scrambling problems are solved, ensuring the accuracy and efficiency of firmware upgrades.
Patent Information
- Application Number
- CN202111028420.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-02
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2041-09-02
AI Technical Summary
There are errors and code scrambling problems during the process of writing authorization serial numbers in the Internet of Things devices, which leads to some devices not being able to upgrade normally during firmware upgrades.
The write number terminal obtains the device information of the Internet of Things device and sends a request to the authorized server. The authorized server generates and issues a unique authorized serial number based on the device information. The write number terminal writes it to the device to ensure the accuracy of the authorized serial number. sex.
It effectively avoids the authorized serial number of the Internet of Things devices being written into the wrong, improves the accuracy and efficiency of firmware upgrades, reduces manual intervention, and is suitable for large-scale IoT device management.
Smart Images

Figure CN113794787B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a number writing method and system. Background Art
[0002] With the rise and development of the Internet of Things, IoT devices that integrate a large number of sensors and can access the Internet have entered people's lives. IoT devices usually have firmware burned in them that determines their functions and performance. Over time, the firmware in the IoT device may no longer meet the user's usage needs, so the firmware needs to be upgraded. The firmware upgrade of IoT devices is usually carried out using OTA (Over The Air, air download technology) upgrade. The OTA upgrade process is to interact with the authorized server through the authorization serial number written in the IoT device, so as to obtain the OTA upgrade package for firmware upgrade issued by the authorized server, and then use the OTA upgrade package to upgrade the firmware of the IoT device. It can be seen that the authorization serial number written in the IoT device is an important basis for the firmware upgrade of the IoT device.
[0003] At present, in the process of writing authorization serial numbers to IoT devices, the number writing terminal usually reads an Excel spreadsheet or other storage files that store the authorization serial numbers of multiple IoT devices, and then the number writing terminal burns the read authorization serial numbers into each IoT device in turn. However, in this process, it cannot be guaranteed that the storage file is completely correct, and in the case of a large number of IoT devices, it cannot be guaranteed that the authorization serial numbers written into the IoT devices are not cross-coded. If cross-coding occurs, at least two IoT devices will have duplicate numbers, which will result in subsequent IoT devices performing OTA upgrades. When the authorization server pushes the OTA upgrade package, only one of the IoT devices with the duplicate number will receive the OTA upgrade package for firmware upgrade, while other IoT devices will not be able to perform firmware upgrades. Summary of the invention
[0004] In view of this, the present invention proposes a number writing method and system, the main purpose of which is to prevent the Internet of Things device from being written with an erroneous authorization serial number.
[0005] In order to achieve the above object, the present invention mainly provides the following technical solutions:
[0006] In a first aspect, the present invention provides a number writing method, the method comprising:
[0007] When determining that the IoT device needs to be numbered, the number writing terminal obtains device information of the IoT device;
[0008] The number writing terminal sends a serial number issuance request carrying the device information to the authorization server;
[0009] The authorization server generates an authorization serial number based on the device information under the serial number issuance request, and issues the authorization serial number to the number writing terminal, wherein the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs OTA upgrade;
[0010] The number writing terminal writes the authorization serial number issued by the authorization service end into the Internet of Things device.
[0011] In a second aspect, the present invention provides a number writing system, the system comprising:
[0012] The number writing terminal is used to obtain the device information of the IoT device when it is determined that the IoT device needs to be numbered; send a serial number issuance request carrying the device information; receive an authorization serial number, and write the authorization serial number into the IoT device;
[0013] The authorization server is used to receive a serial number issuance request carrying the device information, generate an authorization serial number based on the device information, and issue the authorization serial number to the number writing terminal, wherein the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs an OTA upgrade.
[0014] In a third aspect, the present invention provides a computer-readable storage medium, the storage medium comprising a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute: when it is determined that the IoT device needs to write a number, obtain the device information of the IoT device; send a serial number issuance request carrying the device information to an authorization server; write the authorization serial number fed back by the authorization server into the IoT device, wherein the authorization serial number is generated by the authorization server based on the device information carried in the serial number issuance request, and the authorization serial number is the basis for obtaining an OTA upgrade package when the IoT device performs an OTA upgrade;
[0015] or,
[0016] The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute: when a serial number issuance request carrying the device information is received from a number writing terminal, an authorization serial number is generated based on the device information, and the authorization serial number is issued to the number writing terminal, wherein the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs an OTA upgrade.
[0017] In a fourth aspect, the present invention provides a storage management device, the storage management device comprising:
[0018] Memory, used to store programs;
[0019] A processor, coupled to the memory, is used to run the program to execute: when it is determined that the IoT device needs to write a number, obtain the device information of the IoT device; send a serial number issuance request carrying the device information to the authorization server; write the authorization serial number fed back by the authorization server into the IoT device, wherein the authorization serial number is generated by the authorization server based on the device information carried in the serial number issuance request, and the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs an OTA upgrade;
[0020] or,
[0021] The storage management device comprises:
[0022] Memory, used to store programs;
[0023] A processor, coupled to the memory, is used to run the program to execute: when receiving a serial number issuance request carrying the device information sent by a number writing terminal, an authorization serial number is generated based on the device information, and the authorization serial number is issued to the number writing terminal, wherein the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs an OTA upgrade.
[0024] By means of the above technical scheme, the present invention provides a number writing method and system. When the number writing terminal determines that the IoT device needs to be written, it obtains the device information of the IoT device and sends a serial number issuance request carrying the device information to the authorization server. Under the serial number issuance request, the authorization server generates an authorization serial number based on the device information and sends the authorization serial number to the number writing terminal. The number writing terminal writes the authorization serial number issued by the authorization server into the IoT device, so that the IoT device uses the authorization serial number as the basis for obtaining the OTA upgrade package when performing an OTA upgrade. It can be seen that in the scheme provided by the present invention, only when the IoT device needs to be written, the number writing terminal uses the device information corresponding to the IoT device to request the authorization serial number from the authorization server, and the authorization server sends the authorization serial number that needs to be written to the IoT device to the number writing terminal according to the request of the number writing terminal. Therefore, the accuracy of the authorization serial number written into the IoT device can be guaranteed.
[0025] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 A flowchart of a number writing method provided by an embodiment of the present invention is shown;
[0028] Figure 2 A flowchart of a number writing method provided by another embodiment of the present invention is shown;
[0029] Figure 3 A schematic diagram of the structure of a number writing system provided by an embodiment of the present invention is shown;
[0030] Figure 4 A schematic structural diagram of a number writing system provided by another embodiment of the present invention is shown. DETAILED DESCRIPTION
[0031] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0032] IoT devices are usually burned with firmware that determines their functions and performance. Over time, the firmware in IoT devices may no longer meet the user's usage requirements, so the firmware needs to be upgraded. At present, firmware upgrades in IoT devices are usually completed based on the authorization serial number of the IoT device. The authorization serial number is issued by the authorization server that provides firmware upgrade services and is stored in the non-volatile memory (NVM) or other storage media of the IoT device. When the firmware of an IoT device needs to be upgraded OTA, it interacts with the authorization server through the authorization serial number to obtain an OTA upgrade package for firmware upgrade. It can be seen that the authorization serial number is an important basis for firmware upgrades of IoT devices.
[0033] At present, when writing authorization serial numbers to IoT devices, the writing terminal usually reads an Excel spreadsheet or other storage files that store the authorization serial numbers of multiple IoT devices, and then burns the read authorization serial numbers into each IoT device in turn. However, in this process, it cannot be guaranteed that the storage file is completely correct, and in the case of a large number of IoT devices, it cannot be guaranteed that the authorization serial numbers written into the IoT devices are not cross-coded. If cross-coding occurs, at least two IoT devices will have duplicate numbers, which will result in that when the subsequent authorization server pushes the OTA upgrade package, only one of the IoT devices with the duplicate number will receive the OTA upgrade package for firmware upgrade, while the other IoT devices will not be able to perform firmware upgrades due to incorrect authorization serial numbers.
[0034] In order to overcome the problem of errors in the authorization serial number written into the IoT device mentioned above, an embodiment of the present invention proposes a number writing method and system, which are specifically described below.
[0035] like Figure 1 As shown, an embodiment of the present invention provides a number writing method, which mainly includes:
[0036] 101. When determining that an IoT device needs to have its number written, the number writing terminal obtains device information of the IoT device.
[0037] The number writing terminal is to request the authorization serial number for the IoT device from the authorization server, and write the requested authorization serial number to the terminal of the IoT device. In order to prevent the number writing terminal from being used maliciously, the number writing terminal needs to be logged in with the correct username and password when it is used. The username and password can be issued to the user by the authorization server.
[0038] In order to prevent the wrong authorization serial number from being written into the IoT device, the number writing terminal will only obtain the device information of the IoT device when it determines that the IoT device to be written needs to be written, and use the device information to apply for the authorization serial number for the IoT device from the authorization server.
[0039] The following is an explanation of the method by which the number writing terminal determines that an IoT device needs to be numbered. The method includes the following two methods:
[0040] First, if the number writing terminal detects that the IoT device is connected to the preset interface through the serial port, it determines that the IoT device needs to be numbered.
[0041] When an IoT device is connected to a preset interface via a serial port, it indicates that the IoT device has a number writing requirement, and it is determined that the IoT device needs to write a number.
[0042] When the IoT device is connected to the preset interface via the serial port, in order to ensure that the authorization serial number can be written to the IoT device, the IoT device needs to be powered on normally. In addition, the preset interface described here is the interface bound to the number writing terminal, for example, it can be an interface deployed on the computer of the number writing terminal.
[0043] Second, when the number writing terminal receives an authorization serial number writing instruction for an IoT device, it determines that the IoT device needs to have a number written.
[0044] When there is a need to write a number to an IoT device, the IoT device itself or the business personnel sends an authorization serial number writing instruction to the number writing terminal through a terminal that can be operated by the business personnel. If the number writing terminal receives the authorization serial number writing instruction, it determines that the IoT device needs to write a number.
[0045] The specific form of the authorization serial number writing instruction described here can be determined based on business requirements, and this embodiment does not make any specific limitation.
[0046] When the number writing terminal determines that the IoT device needs to be numbered, it obtains the device information of the IoT device. When obtaining the device information, the number writing terminal can obtain the device information through a pre-set interactive command. Exemplarily, the number writing terminal and the IoT device pre-agree on the interactive command, and when the number writing terminal sends the interactive command to the IoT device, the IoT device provides the device information stored in itself to the number writing terminal.
[0047] Device information may include the following: the name of the manufacturer to which the IoT device belongs, the version number of the firmware running inside the IoT device, the version number of the IoT device hardware, the MAC address of the IoT device, and the project name of the project to which the IoT device belongs. The project name is the name that the IoT device manufacturer assigns to the IoT device when mass-producing the IoT device. For example, if different projects are assigned to the same product type, each IoT device under a project corresponds to the project name of the project.
[0048] 102. The number writing terminal sends a serial number issuance request carrying the device information to the authorization server.
[0049] In order to enable the authorization server to generate authorization serial numbers for IoT devices in a targeted manner, the number writing terminal sends a serial number issuance request carrying device information to the authorization server.
[0050] 103. The authorization server generates an authorization serial number based on the device information in response to the serial number issuance request, and sends the authorization serial number to the number writing terminal, wherein the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs an OTA upgrade.
[0051] The authorization server is a terminal that distributes authorization serial numbers to IoT devices. When it receives a serial number issuance request sent by a number writing terminal, it needs to parse out the device information carried in the serial number issuance request, and then use the device information to generate an authorization serial number. The above-mentioned parsing method is not specifically limited in this embodiment. For example, the device information carried in the serial number issuance request is parsed through the HTTP GET method.
[0052] After obtaining the device information of the IoT device, the authorization server needs to use the device information to generate an authorization serial number. There are two methods for generating the authorization serial number:
[0053] First, the authorization serial number generation method includes steps 1 and 2:
[0054] Step 1: The authorization server creates a device record entry for the IoT device based on the device information.
[0055] When the authorization server generates an authorization serial number for an IoT device, it needs to first create a device record entry for the IoT device. The purpose of creating a device record entry is to facilitate the subsequent push of OTA upgrade packages to the IoT device. The device record entry contains: the name of the manufacturer to which the IoT device belongs, the version number of the firmware running inside the IoT device, the version number of the IoT device hardware, the MAC address of the IoT device, and the project name of the project to which the IoT device belongs.
[0056] Step 2: The authorization server processes the device information using a preset algorithm to generate an authorization serial number corresponding to the device record entry.
[0057] When generating an authorization serial number, the authorization service end needs to determine the content involved in the operation in the device information, which can be at least one of the following items: the manufacturer name of the IoT device, the version number of the firmware running inside the IoT device, the version number of the IoT device hardware, the MAC address of the IoT device, and the project name of the project to which the IoT device belongs. After determining the content involved in the operation, a preset algorithm is used to calculate the determined content to generate an authorization serial number corresponding to the device record entry. The authorization serial number is unique and is the basis for obtaining the OTA upgrade package when the IoT device is OTA upgraded. It should be noted that the preset algorithm mentioned here can be determined based on business needs, and this embodiment does not limit it. Optionally, the preset algorithm can be a hash algorithm.
[0058] The correspondence between the device record entry and the authorized serial number is to facilitate the authorization server to push the OTA upgrade package to the IoT device in the future.
[0059] The second method for generating the authorization serial number includes steps 1 and 2:
[0060] Step 1: The authorization server creates a device record entry for the IoT device based on the device information.
[0061] Step 2: The authorization server uses a serial number generator to generate an authorization serial number corresponding to the device record entry.
[0062] When the authorization serial number needs to be generated, the authorization server calls the serial number generator, which generates the authorization serial number and establishes a correspondence between the authorization serial number and the device record entry. The specific type of the serial number generator described here is not specifically limited in this embodiment, and it can generate a unique serial number.
[0063] After generating the authorization serial number, the authorization server sends the authorization serial number to the number writing terminal through the HTTP protocol, so that the number writing terminal writes the authorization serial number into the IoT device.
[0064] 104. The number writing terminal writes the authorization serial number issued by the authorization server into the Internet of Things device.
[0065] After receiving the authorization serial number issued by the authorization server, the number writing terminal writes the authorization serial number into the non-volatile memory of the IoT device through a preset interactive command with the IoT device, so that the IoT device can use the authorization serial number for OTA upgrades later.
[0066] When performing OTA upgrades, IoT devices can obtain the OTA upgrade package sent by the authorized server based on the authorized serial number, and then use the obtained OTA upgrade package to upgrade the firmware.
[0067] In the number writing method provided by the embodiment of the present invention, when the number writing terminal determines that the IoT device needs to be written, it obtains the device information of the IoT device and sends a serial number issuance request carrying the device information to the authorization server. Under the serial number issuance request, the authorization server generates an authorization serial number based on the device information, and sends the authorization serial number to the number writing terminal. The number writing terminal writes the authorization serial number issued by the authorization server into the IoT device, so that the IoT device uses the authorization serial number as the basis for obtaining the OTA upgrade package when performing an OTA upgrade. It can be seen that in the scheme provided by the embodiment of the present invention, only when the IoT device needs to be written, the number writing terminal uses the device information corresponding to the IoT device to request the authorization serial number from the authorization server, and the authorization server sends the authorization serial number that needs to be written to the IoT device to the number writing terminal according to the request of the number writing terminal. Therefore, the accuracy of the authorization serial number written into the IoT device can be guaranteed.
[0068] Further, according to Figure 1Another embodiment of the present invention also provides a number writing method, such as Figure 2 As shown, the method mainly includes:
[0069] 201. When the number writing terminal determines that the IoT device needs to write a number, it obtains the authorization license of the IoT device.
[0070] In order to ensure that authorized serial numbers are distributed to legitimate IoT devices, when the number writing terminal determines that the IoT device needs to be written, it needs to obtain the authorization license of the IoT device, so that subsequent number writing operations can be performed only when the authorization license is available.
[0071] The authorization license is a string of M bits in length generated by the authorization server through an algorithm based on the manufacturer name and project name of the IoT device, which corresponds to the device type of the IoT device. The specific value of M can be determined based on business requirements, for example, 385.
[0072] The authorization license is a certificate issued by the IoT device manufacturer when the IoT device manufacturer mass produces IoT devices. The IoT devices of the same device type are divided into different projects. The same project is assigned multiple authorization licenses by the authorized server. One authorization license can be bound to authorize N devices. In other words, the authorization license is a certificate that authorizes the server to issue authorization serial numbers for N IoT devices.
[0073] 202. The authorization server determines whether there is still a quota for issuing authorization serial numbers in the authorization license, and executes step 203 or step 204.
[0074] The authorization server contains the authorization license, the project name of the IoT device, and the binding relationship between the IoT devices. After the authorization server issues an authorization serial number to an IoT device, the number of people under the authorization license will be reduced by one.
[0075] Since each authorization license has a limited number of corresponding places, the authorization server needs to determine whether there are still places for issuing authorization serial numbers in the authorization license after receiving the authorization license.
[0076] 203. If the authorization server determines that the authorization license does not have a quota for issuing an authorization serial number, it performs exception processing and ends the current process.
[0077] If the authorization server determines that the authorization license does not have the quota for issuing authorization serial numbers, it means that the quota for the authorization license has been used up and the authorization license can no longer be used to generate authorization serial numbers for IoT devices, and exception handling is required.
[0078] The above exception handling process can be of the following two types:
[0079] First, if the authorization service end determines that the authorization license does not have a quota for issuing an authorization serial number, it notifies the number writing terminal to replace the authorization license of the Internet of Things device.
[0080] When the authorization server determines that the authorization license does not have the quota for issuing the authorization serial number, it means that the quota of the authorization license has been used up and the authorization license can no longer be used to generate the corresponding authorization serial number for the IoT device. Then, it is necessary to notify the number writing terminal to update the authorization license of the IoT device. The notification can be displayed in the form of a prompt on the graphical interface.
[0081] Second, if the authorization service end determines that the authorization license does not have a quota for issuing an authorization serial number, a new authorization license is allocated to the IoT device, and the new authorization license is issued to the number writing terminal.
[0082] When the authorization server determines that the authorization license does not have the quota for issuing the authorization serial number, it means that the quota of the authorization license has been exhausted and the authorization license can no longer be used to generate the corresponding authorization serial number for the IoT device. Therefore, it is necessary to allocate a new authorization license to the IoT device and issue the new authorization license to the number writing terminal so that the number writing terminal can use the new authorization license to request the authorization serial number for the IoT device.
[0083] Here, the method for allocating a new authorization license certificate to the IoT device may be: a new string of M bits in length is generated by an algorithm according to the manufacturer name of the IoT device and the project name of the IoT device.
[0084] 204. If the authorization server determines that there is still room for issuing authorization serial numbers in the authorization license, the authorization server feeds back the device type corresponding to the authorization license to the number writing terminal.
[0085] In order to prevent IoT devices from being written with authorization serial numbers that do not match their device types, the authorization server will feedback the device type corresponding to the authorization license to the number writing terminal when it determines that there are still vacancies for issuing authorization serial numbers in the authorization license.
[0086] 205. The number writing terminal compares the device type sent by the authorization server with the device type of the IoT device and executes 206 or 207.
[0087] 206. If the number writing terminal finds that the device type issued by the authorization server is different from the device type of the IoT device, a prompt to replace the authorization license certificate is issued and the current process ends.
[0088] If the number writing terminal compares the device type issued by the authorization server and finds that it is different from the device type of the IoT device, it means that the IoT device may be written with an authorization serial number that does not match its device type. Therefore, it is necessary to issue a prompt to replace the authorization license certificate so that the number writing terminal can use the authorization license certificate that matches the device type of the IoT device to request an authorization serial number for the IoT device.
[0089] 207. If the device type fed back by the authorization server is found to be the same as the device type of the IoT device, the number writing terminal obtains the device information of the IoT device.
[0090] If the number writing terminal compares the device type sent by the authorization server and finds that it is the same as the device type of the IoT device, it means that the possibility of the IoT device being written with an authorization serial number that does not match its device type is low, so the device information of the IoT device can be directly obtained.
[0091] 208. The number writing terminal sends a serial number issuance request carrying the device information to the authorization server.
[0092] In order to enable the authorization server to generate an authorization serial number for the IoT device in a targeted manner, the number writing terminal sends a serial number issuance request carrying device information to the authorization server.
[0093] Furthermore, after the number writing terminal sends the serial number issuance request carrying the device information to the authorization server, due to network failure and other situations, the serial number issuance request cannot be successfully sent to the authorization server. Therefore, the number writing terminal needs to monitor whether the serial number issuance request is successfully sent to the authorization server. If the number writing terminal detects that the serial number issuance request is not successfully sent to the authorization server, an alarm is issued so that the business personnel can handle the exception according to the alarm.
[0094] Furthermore, after the number writing terminal sends a serial number issuance request carrying the device information to the authorization server, the authorization server may be abnormal, which may cause the authorization server to fail to generate the authorization serial number. Therefore, the number writing terminal needs to monitor whether it has received a notification of authorization serial number generation failure feedback from the authorization server. If the number writing terminal receives a notification of authorization serial number generation failure feedback from the authorization server, an alarm is issued so that the business personnel can handle the exception according to the alarm.
[0095] 209. The authorization server generates an authorization serial number based on the device information in response to the serial number sending request, and sends the authorization serial number to the number writing terminal, wherein the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs an OTA upgrade.
[0096] 210. The number writing terminal writes the authorization serial number issued by the authorization server into the Internet of Things device.
[0097] After receiving the authorization serial number issued by the authorization server, the number writing terminal writes the authorization serial number into the non-volatile memory of the IoT device through a preset interactive command with the IoT device, so that the IoT device can use the authorization serial number for OTA upgrades later.
[0098] Furthermore, after the number writing terminal writes the authorization serial number sent by the authorization service end into the IoT device, an exception may occur, resulting in the failure of the authorization serial number to be successfully written into the IoT device. Therefore, the number writing terminal needs to monitor whether the authorization serial number is successfully written into the IoT device. If the number writing terminal detects that the authorization serial number is not successfully written into the IoT device, an alarm is issued so that the business personnel can handle the exception according to the alarm.
[0099] Furthermore, after the number writing terminal writes the authorization serial number into the IoT device, in order to facilitate subsequent technicians to query and track the authorization status of the IoT device, an authorization record is added to the database of the number writing terminal. The authorization record includes the device information, authorization date, and authorization serial number of the IoT device. From the authorization record, the technician can understand when the IoT device was authorized and which authorization serial number the IoT device used for OTA upgrade. Each time the IoT device is subsequently upgraded OTA, an authorization information is added to the authorization record. The authorization information includes the upgrade date, the firmware version before the upgrade, and the firmware version after the upgrade.
[0100] In the prior art, when writing numbers for IoT devices, the number writing terminal reads an Excel spreadsheet or other format of an authorization serial number storage file that stores the authorization serial numbers of multiple IoT devices, and then writes the read authorization serial number into the connected IoT device. There are accuracy issues when writing numbers for IoT devices in this way, and it cannot guarantee that the IoT device will be written with an accurate authorization serial number. At the same time, this method requires manual creation of an authorization serial number storage file on the authorization server, and then downloading the authorization serial number storage file to the number writing terminal. The number writing terminal can then obtain the authorization serial number from the authorization serial number storage file. It can be seen that this operation is cumbersome, involves a lot of manual intervention, and has low writing efficiency. In order to overcome the above-mentioned defects, the above-mentioned method is provided. Figure 2In the number writing method shown, only when the IoT device needs to write a number, the number writing terminal uses the device information corresponding to the IoT device to request the authorization serial number from the authorization server, and the authorization server sends the authorization serial number that needs to be written to the IoT device to the number writing terminal according to the request of the number writing terminal. Therefore, the probability of the IoT device being written with an erroneous authorization serial number can be reduced, thereby ensuring the accuracy of the authorization serial number written to the IoT device. In addition, when the IoT device needs to write a number, the number writing terminal directly triggers the authorization server to generate an authorization serial number for the IoT device, and sends the authorization serial number to the number writing terminal, so that the number writing terminal can write the authorization serial number into the IoT device. This process does not require manual intervention, which can improve the number writing efficiency.
[0101] Further, according to the above method embodiment, another embodiment of the present invention also provides a number writing system, such as Figure 3 As shown, the system comprises:
[0102] The number writing terminal 31 is used to obtain the device information of the IoT device when it is determined that the IoT device needs to be numbered; send a serial number issuance request carrying the device information; receive an authorization serial number, and write the authorization serial number into the IoT device;
[0103] The authorization server 32 is used to receive a serial number issuance request carrying the device information, generate an authorization serial number based on the device information, and issue the authorization serial number to the number writing terminal, wherein the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs an OTA upgrade.
[0104] In the number writing system provided by the embodiment of the present invention, when the number writing terminal determines that the IoT device needs to be number written, it obtains the device information of the IoT device and sends a serial number issuance request carrying the device information to the authorization server. Under the serial number issuance request, the authorization server generates an authorization serial number based on the device information and sends the authorization serial number to the number writing terminal. The number writing terminal writes the authorization serial number issued by the authorization server into the IoT device, so that the IoT device uses the authorization serial number as the basis for obtaining the OTA upgrade package when performing an OTA upgrade. It can be seen that in the scheme provided by the embodiment of the present invention, only when the IoT device needs to be number written, the number writing terminal uses the device information corresponding to the IoT device to request the authorization serial number from the authorization server, and the authorization server sends the authorization serial number that needs to be written to the IoT device to the number writing terminal according to the request of the number writing terminal. Therefore, the accuracy of the authorization serial number written into the IoT device can be guaranteed.
[0105] Optional, such as Figure 4 As shown,
[0106] The number writing terminal 31 comprises:
[0107] The obtaining unit 311 is used to obtain the authorization license of the IoT device, wherein the authorization license is a certificate of the authorization server 32 issuing the authorization serial number to the IoT devices with a preset number;
[0108] The authorization server 32 includes:
[0109] The judgment unit 321 is used to judge whether the authorization license still has quota for issuing authorization serial numbers; if the authorization server 32 determines that the authorization license still has quota for issuing authorization serial numbers, it triggers the number writing terminal 31 to obtain the device information of the Internet of Things device.
[0110] Optional, such as Figure 4 As shown, the authorization server 32 also includes: a notification unit 322, which is used to notify the number writing terminal 31 to replace the authorization license of the Internet of Things device if the judgment unit 321 determines that the authorization license does not have a quota for issuing an authorization serial number.
[0111] Optional, such as Figure 4 As shown, the authorization server 32 also includes: an allocation unit 323, which is used to allocate a new authorization license to the Internet of Things device if the judgment unit 321 determines that the authorization license does not have a quota for issuing an authorization serial number, and issue the new authorization license to the number writing terminal 31.
[0112] Optional, such as Figure 4 As shown, the number writing terminal 31 includes:
[0113] The comparison unit 312 is used to obtain the authorization license of the IoT device, wherein the authorization license is the certificate for the authorization server 32 to issue an authorization serial number to the IoT device; if the device type fed back by the authorization server 32 is the same as the device type of the IoT device, the device information of the IoT device is obtained.
[0114] The authorization server 32 further includes a feedback unit 324 for feeding back the device type corresponding to the authorization license to the number writing terminal 31 .
[0115] Optional, such as Figure 4 As shown, the authorization server 32 is specifically used to create a device record entry for the IoT device based on the device information; use a serial number generator, or use a preset algorithm to process the device information to generate an authorization serial number corresponding to the device record entry.
[0116] Optional, such as Figure 4 As shown, the number writing terminal 31 includes:
[0117] A first determining unit 313 is configured to determine that the IoT device needs to be numbered if it is detected that the IoT device is connected to a preset interface via a serial port;
[0118] Optional, such as Figure 4 As shown, the number writing terminal 31 includes:
[0119] The second determining unit 314 is configured to determine that the IoT device needs to write a serial number if a command for writing an authorization serial number for the IoT device is received.
[0120] Optional, such as Figure 4 As shown, the number writing terminal 31 includes:
[0121] The first alarm unit 315 is used to generate an alarm if it is detected that the serial number request is not sent to the authorization server 32 .
[0122] Optional, such as Figure 4 As shown, the number writing terminal 31 includes:
[0123] The second alarm unit 316 is used to generate an alarm when receiving a notification of authorization serial number generation failure fed back by the authorization server 32 .
[0124] Optional, such as Figure 4 As shown, the number writing terminal 31 includes:
[0125] The third alarm unit 317 is used to generate an alarm if it is detected that the authorization serial number is not successfully written into the IoT device.
[0126] In the number writing system provided by the embodiment of the present invention, the detailed description of the method used in the operation process of each functional module can be found in Figure 1-Figure 2 The corresponding method of the method embodiment is explained in detail and will not be repeated here.
[0127] Further, based on the above embodiment, another embodiment of the present invention also provides a computer-readable storage medium, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute: when it is determined that the Internet of Things device needs to write a number, obtain the device information of the Internet of Things device; send a serial number issuance request carrying the device information to the authorization server; write the authorization serial number fed back by the authorization server into the Internet of Things device, wherein the authorization serial number is generated by the authorization server based on the device information carried in the serial number issuance request, and the authorization serial number is the basis for obtaining the OTA upgrade package when the Internet of Things device performs an OTA upgrade.
[0128] When the program is running, the device controlling the storage medium can also execute the above Figure 1 and Figure 2 The methods related to the writing terminal will not be described here. For details, see the above Figure 1 and Figure 2 Description.
[0129] or,
[0130] The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute: when a serial number issuance request carrying the device information is received from a number writing terminal, an authorization serial number is generated based on the device information, and the authorization serial number is issued to the number writing terminal, wherein the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs an OTA upgrade.
[0131] When the program is running, the device controlling the storage medium can also execute the above Figure 1 and Figure 2 The methods related to the authorization server will not be described here. For details, see the above Figure 1 and Figure 2 Description.
[0132] Further, according to the above embodiment, another embodiment of the present invention further provides a storage management device, the storage management device comprising:
[0133] Memory, used to store programs;
[0134] A processor, coupled to the memory, is used to run the program to execute: when it is determined that the IoT device needs to write a number, obtain the device information of the IoT device; send a serial number issuance request carrying the device information to an authorization server; write the authorization serial number fed back by the authorization server into the IoT device, wherein the authorization serial number is generated by the authorization server based on the device information carried in the serial number issuance request, and the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs an OTA upgrade.
[0135] The processor can also execute the above-mentioned program Figure 1 and Figure 2 The methods related to the writing terminal will not be described here. For details, see the above Figure 1 and Figure 2 Description.
[0136] or,
[0137] The storage management device comprises:
[0138] Memory, used to store programs;
[0139] A processor, coupled to the memory, is used to run the program to execute: when receiving a serial number issuance request carrying the device information sent by a number writing terminal, an authorization serial number is generated based on the device information, and the authorization serial number is issued to the number writing terminal, wherein the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs an OTA upgrade.
[0140] The processor can also execute the above-mentioned program Figure 1 and Figure 2 The methods related to the authorization server will not be described here. For details, see the above Figure 1 and Figure 2 Description.
[0141] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0142] It is understandable that the related features in the above methods and devices can be referenced to each other. In addition, the "first", "second" and the like in the above embodiments are used to distinguish the embodiments, but do not represent the advantages and disadvantages of the embodiments.
[0143] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0144] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0145] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0146] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0147] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0148] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0149] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the operating method, device, and framework of the deep neural network model according to an embodiment of the present invention. The present invention may also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0150] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
Claims
1. A method of writing numbers. It is characterized in that The method comprises: When determining that the IoT device needs to be numbered, the number writing terminal obtains device information of the IoT device; The number writing terminal sends a serial number issuance request carrying the device information to the authorization server; The authorization server generates an authorization serial number based on the device information under the serial number issuance request, and issues the authorization serial number to the number writing terminal, wherein the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs OTA upgrade; The number writing terminal writes the authorization serial number issued by the authorization server into the Internet of Things device; Before the number writing terminal obtains the device information of the Internet of Things device, the method further includes: The number writing terminal obtains the authorization license of the IoT device, wherein the authorization license is the certificate that the authorization service end issues the authorization serial number to the IoT devices with a preset number; The authorization server determines whether there is still a quota for issuing authorization serial numbers in the authorization license; If the authorization service end determines that there is still room for issuing authorization serial numbers in the authorization license, the number writing terminal is triggered to obtain the device information of the Internet of Things device.
2. The method according to claim 1, It is characterized in that The method further comprises: If the authorization service end determines that the authorization license does not have a quota for issuing authorization serial numbers, the number writing terminal is notified to replace the authorization license of the Internet of Things device; and / or, If the authorization service end determines that the authorization license does not have a quota for issuing an authorization serial number, a new authorization license is allocated to the Internet of Things device, and the new authorization license is issued to the number writing terminal.
3. The method according to claim 1, It is characterized in that After the number writing terminal determines that the IoT device needs to write a number, and before obtaining the device information of the IoT device, the method further includes: The number writing terminal obtains the authorization license of the Internet of Things device, wherein the authorization license is the certificate for the authorization service end to issue the authorization serial number to the Internet of Things device; The authorization server feeds back the device type corresponding to the authorization license to the number writing terminal; If the number writing terminal compares the device type fed back by the authorization server with the device type of the IoT device and finds that the device type is the same, the device information of the IoT device is obtained.
4. The method according to any one of claims 1 to 3, It is characterized in that The authorization server generates an authorization serial number based on the device information in response to the serial number sending request, including: The authorization server creates a device record entry for the IoT device according to the device information; The authorization server uses a serial number generator, or the authorization server uses a preset algorithm to process the device information to generate an authorization serial number corresponding to the device record entry.
5. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: If the number writing terminal detects that the IoT device is connected to the preset interface via the serial port, it determines that the IoT device needs to be numbered; or, If the number writing terminal receives an authorization serial number writing instruction for the Internet of Things device, it determines that the Internet of Things device needs to write a number.
6. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: If the number writing terminal detects that the serial number request has not been sent to the authorization server, an alarm is issued; and / or, When the number writing terminal receives a notification from the authorization server indicating that the authorization serial number generation has failed, an alarm is raised; and / or, If the number writing terminal detects that the authorization serial number has not been successfully written into the Internet of Things device, an alarm is issued.
7. A number writing system, It is characterized in that The system comprises: The number writing terminal is used to obtain the device information of the IoT device when it is determined that the IoT device needs to be numbered; send a serial number issuance request carrying the device information; receive an authorization serial number, and write the authorization serial number into the IoT device; An authorization server is used to receive a serial number issuance request carrying the device information, generate an authorization serial number based on the device information, and issue the authorization serial number to the number writing terminal, wherein the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs an OTA upgrade; The number writing terminal is further used to obtain the authorization license of the Internet of Things device before obtaining the device information of the Internet of Things device, wherein the authorization license is the certificate of the authorization server issuing the authorization serial number for the preset number of Internet of Things devices; The authorization server is also used to determine whether the authorization license still has quota for issuing authorization serial numbers; if it is determined that the authorization license still has quota for issuing authorization serial numbers, the number writing terminal is triggered to obtain the device information of the Internet of Things device.
8. A computer-readable storage medium, It is characterized in that The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute: When it is determined that the IoT device needs to be numbered, the device information of the IoT device is obtained; a serial number issuance request carrying the device information is sent to the authorization server; the authorization serial number fed back by the authorization server is written into the IoT device, wherein the authorization serial number is generated by the authorization server based on the device information carried in the serial number issuance request, and the authorization serial number is the basis for the IoT device to obtain the OTA upgrade package when performing an OTA upgrade; before obtaining the device information of the IoT device, the authorization license of the IoT device is obtained so that the authorization server can determine whether the authorization license still has quota for issuing authorization serial numbers, and the authorization license is the certificate for the authorization server to issue authorization serial numbers to IoT devices with a preset quota; if a trigger from the authorization server is received, the device information of the IoT device is obtained, and the trigger is issued when the authorization server determines that the authorization license still has quota for issuing authorization serial numbers; or, Upon receiving a serial number issuance request carrying the device information sent by a number writing terminal, an authorization serial number is generated based on the device information, and the authorization serial number is issued to the number writing terminal, wherein the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs OTA upgrade; upon receiving the authorization license certificate of the IoT device sent by the number writing terminal, it is determined whether the authorization license certificate still has quota for issuing authorization serial numbers; if it is determined that the authorization license certificate still has quota for issuing authorization serial numbers, the number writing terminal is triggered to obtain the device information of the IoT device; the authorization license certificate is a certificate for the authorization server to issue authorization serial numbers to IoT devices with a preset quota.
9. A storage management device, It is characterized in that The storage management device comprises: Memory, used to store programs; A processor, coupled to the memory, configured to run the program to perform: When it is determined that the IoT device needs to be numbered, the device information of the IoT device is obtained; a serial number issuance request carrying the device information is sent to the authorization server; the authorization serial number fed back by the authorization server is written into the IoT device, wherein the authorization serial number is generated by the authorization server based on the device information carried in the serial number issuance request, and the authorization serial number is the basis for the IoT device to obtain the OTA upgrade package when performing an OTA upgrade; before obtaining the device information of the IoT device, the authorization license of the IoT device is obtained so that the authorization server can determine whether the authorization license still has quota for issuing authorization serial numbers, and the authorization license is the certificate for the authorization server to issue authorization serial numbers to IoT devices with a preset quota; if a trigger from the authorization server is received, the device information of the IoT device is obtained, and the trigger is issued when the authorization server determines that the authorization license still has quota for issuing authorization serial numbers; or, Upon receiving a serial number issuance request carrying device information from a number writing terminal, an authorization serial number is generated based on the device information, and the authorization serial number is issued to the number writing terminal, wherein the authorization serial number is the basis for obtaining the OTA upgrade package when the IoT device performs an OTA upgrade; upon receiving the authorization license of the IoT device sent by the number writing terminal, it is determined whether the authorization license still has quota for issuing authorization serial numbers; if it is determined that the authorization license still has quota for issuing authorization serial numbers, the number writing terminal is triggered to obtain the device information of the IoT device; the authorization license is a certificate that authorizes the server to issue authorization serial numbers to IoT devices with a preset quota.
