Equipment upgrading method and device, equipment and storage medium
By responding to the upgrade instructions in the terminal device and issuing the first address, the smart device can download the upgrade package from the terminal device, solving the problem of low upgrade efficiency caused by weak signals on the installation and maintenance of the site, and achieving efficient equipment upgrades.
Patent Information
- Application Number
- CN202311555096.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2025-05-20
AI Technical Summary
During the whole-house installation and maintenance process, the poor network signal or no signal of the operators at the installation and maintenance site leads to extremely low success rate of upgrades of smart devices, which seriously affects the efficiency of whole-house installation and maintenance.
By responding to the upgrade instruction in the terminal device, sending a first message, receiving a response packet from the smart device, determining the first smart device, and sending the first address to the device, allowing the smart device to download the device upgrade packet from the terminal device without passing through the uplink network.
This method improves the upgrade efficiency of smart devices, reduces resource waste, and maintains an efficient equipment upgrade process in a weak signal environment at the installation and maintenance site.
Smart Images

Figure CN120021204A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of terminal devices, and particularly to a device upgrade method, device, equipment and storage medium. Background Art
[0002] With the development of whole-house intelligence, improving the efficiency of whole-house installation and maintenance delivery has become the focus of the entire whole-house intelligence industry. During the installation and maintenance stage, the device has no uplink network, but the device needs to be upgraded. Therefore, for the upgrade, the installation and maintenance engineer needs to carry the Customer Premise Equipment (CPE) to the installation and maintenance site. When the operator network signal at the installation and maintenance site is poor or there is no signal, the upgrade success rate of the intelligent device will be extremely low, seriously affecting the efficiency of whole-house installation and maintenance. Summary of the Invention
[0003] The purpose of the present invention is to provide a device upgrade method, device, equipment and storage medium to solve the technical problems in the prior art.
[0004] In a first aspect, an embodiment of the present application provides a device upgrade method, which is applied to a terminal device. The method includes:
[0005] In response to an upgrade instruction, send a first message; receive response packets sent by at least one intelligent device; based on the received response packets, determine at least one first intelligent device; and send a first address to the first intelligent device. The first address is used to indicate the storage address of the device upgrade package of the first intelligent device stored in the terminal device.
[0006] In the embodiment of the present application, only the first address is sent to the first intelligent device, avoiding the waste of resources caused by sending addresses to all intelligent devices. In the present application, the first intelligent device downloads the device upgrade package from the terminal device without going through the uplink network, and multiple first intelligent devices can download the device upgrade package simultaneously for upgrade, improving the upgrade efficiency of the intelligent device.
[0007] In some possible embodiments, based on the received response packets, determining at least one first intelligent device includes: for each received response packet, perform: obtain the second address carried in the response packet; and determine the intelligent device as the first intelligent device according to the second address.
[0008] In the present application, the first intelligent device is determined through the second address, avoiding the waste of resources caused by establishing communication connections with all intelligent devices subsequently.
[0009] In some possible embodiments, the first message carries a list of intelligent devices, and the list of intelligent devices is used to match the intelligent devices that send the response packets.
[0010] In this application, a list of intelligent devices is carried in the first message. Therefore, the device that receives the first message can determine whether to send a response packet by matching it with the list of intelligent devices.
[0011] In some possible embodiments, before the first address is sent to the first intelligent device, the method further includes: determining a local port, a local address, and a storage path of the device upgrade package; generating a first address based on the local port, the local address, and the storage path.
[0012] In this application, the terminal device generates a first address according to the local port, the local address, and the storage path of the device upgrade package, ensuring that the first intelligent device can accurately download the device upgrade package.
[0013] In some possible embodiments, the method further includes: obtaining a device upgrade package; sending the device upgrade package to a second intelligent device so that the second intelligent device performs an upgrade operation on the first intelligent device.
[0014] In this application, a second intelligent device can be used to perform an upgrade operation on the first intelligent device. By this method, multiple second intelligent devices can respectively perform upgrades on their corresponding first intelligent devices, further ensuring the efficiency of device upgrades.
[0015] In some possible embodiments, the second intelligent device includes any one of the following: a router, a switch, a host, a central control screen.
[0016] In some possible embodiments, after determining at least one first intelligent device based on the received response packet, the method further includes: establishing a communication connection with the first intelligent device based on the second address of the first intelligent device, and using the communication connection for communication between the first intelligent device and the terminal device.
[0017] In some possible embodiments, establishing a communication connection with the first intelligent device based on the second address of the first intelligent device includes: establishing a communication connection with the first intelligent device based on the SPEKE protocol and the second address; or, establishing a communication connection with the first intelligent device based on the Bluetooth protocol and the second address.
[0018] In a second aspect, an embodiment of this application provides a device upgrade method, which is applied to an intelligent device. The method includes:
[0019] Receiving a first message sent by a terminal device, generating a response packet; sending the response packet to the terminal device; receiving a first address sent by the terminal device, and downloading a device upgrade package from the terminal device according to the first address; the first address is used to indicate the storage address of the device upgrade package of the first intelligent device stored in the terminal device; performing a device upgrade based on the device upgrade package.
[0020] In some possible embodiments, before receiving the first address sent by the receiving terminal device, the method further includes: establishing a communication connection with the terminal device based on a second address.
[0021] In some possible embodiments, establishing a communication connection with the terminal device based on a second address includes: establishing a communication connection with the terminal device based on the SPEKE protocol and the second address; or, establishing a communication connection with the terminal device based on the Bluetooth protocol and the second address.
[0022] In some possible embodiments, receiving the first message sent by the terminal device includes: determining whether its own identification information is in the smart device list based on the smart device list carried in the first message; if it is in the smart device list, generating a response packet.
[0023] In some possible embodiments, performing device upgrade based on a device upgrade package includes: determining the upgrade progress according to a preset period; sending the upgrade progress to the terminal device according to a preset period.
[0024] In a third aspect, an embodiment of the present application provides a device upgrade apparatus, which is applied to a terminal device. The apparatus includes:
[0025] A response module, configured to send a first message in response to an upgrade instruction;
[0026] A receiving module, configured to receive response packets sent by at least one smart device;
[0027] A first smart device determination module, configured to determine at least one first smart device based on the received response packets;
[0028] An address distribution module, configured to distribute a first address to the first smart device, where the first address is used to indicate the storage address of the device upgrade package of the first smart device stored in the terminal device.
[0029] In some possible embodiments, the first smart device determination module is specifically configured to: for each received response packet, execute: obtain the second address carried in the response packet; determine the smart device as the first smart device according to the second address.
[0030] In some possible embodiments, the first message carries a smart device list, and the smart device list is used to match the smart device that sends the response packet.
[0031] In some possible embodiments, the address distribution module is further configured to: determine a local port, a local address, and a storage path of the device upgrade package; generate a first address based on the local port, the local address, and the storage path.
[0032] In some possible embodiments, the response module is further configured to: obtain a device upgrade package; send the device upgrade package to a second intelligent device so that the second intelligent device performs an upgrade operation on the first intelligent device.
[0033] In some possible embodiments, the second intelligent device includes any one of the following: a router, a switch, a host, a central control screen.
[0034] In some possible embodiments, the address sending module is further configured to:
[0035] receive the upgrade progress sent by the first intelligent device and display the upgrade progress.
[0036] In some possible embodiments, the first intelligent device determination module is further configured to: establish a communication connection with the first intelligent device based on a second address of the first intelligent device, where the communication connection is used for the first intelligent device to communicate with a terminal device.
[0037] In some possible embodiments, the first intelligent device determination module is specifically configured to: establish a communication connection with the first intelligent device based on the SPEKE protocol and the second address; or, establish a communication connection with the first intelligent device based on the Bluetooth protocol and the second address.
[0038] Fourthly, an embodiment of the present application provides a device upgrade device applied to an intelligent device. The device includes:
[0039] a first message receiving module, configured to receive a first message sent by a terminal device and generate a response packet;
[0040] a sending module, configured to send the response packet to the terminal device;
[0041] an address receiving module, configured to receive a first address sent by the terminal device and download a device upgrade package from the terminal device; the first address is used to indicate a storage address of the device upgrade package of the first intelligent device stored in the terminal device;
[0042] an upgrade module, configured to perform device upgrade based on the device upgrade package.
[0043] In some possible embodiments, the address receiving module is further configured to: establish a communication connection with the terminal device based on a second address.
[0044] In some possible embodiments, the address receiving module is specifically configured to: establish a communication connection with the terminal device based on the SPEKE protocol and the second address; or, establish a communication connection with the terminal device based on the Bluetooth protocol and the second address.
[0045] In some possible embodiments, the first message receiving module is specifically configured to: determine whether its own identification information is in the list of intelligent devices based on the list of intelligent devices carried in the first message; if it is in the list of intelligent devices, generate a response packet.
[0046] In some possible embodiments, the upgrade module is specifically configured to: determine the upgrade progress according to a preset period; send the upgrade progress to the terminal device according to a preset period.
[0047] In a fifth aspect, another embodiment of the present application further provides an electronic device, including at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method provided in the embodiment of the first aspect of the present application.
[0048] In a sixth aspect, another embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is used to cause a computer to execute any method provided in the embodiment of the first aspect of the present application.
[0049] Other features and advantages of the present application will be described in the subsequent specification, and part of them will become obvious from the specification, or be understood by implementing the present application. The objectives and other advantages of the present application can be achieved and obtained by the structures specifically pointed out in the written specification, claims, and drawings. Description of the Drawings
[0050] Figure 1A It is a method for device upgrade in the related art provided by the embodiment of the present application;
[0051] Figure 1B It is a schematic diagram of an application scenario of a device upgrade method provided by the embodiment of the present application;
[0052] Figure 2 It is a schematic diagram of the overall process of a device upgrade method provided by the embodiment of the present application, where the execution subject is a terminal device;
[0053] Figure 3 It is a schematic diagram of the process of determining whether an intelligent device is a first intelligent device in a device upgrade method provided by the embodiment of the present application;
[0054] Figure 4A It is a schematic diagram of the process of determining whether the second address of an intelligent device is in a preset whitelist in a device upgrade method provided by the embodiment of the present application;
[0055] Figure 4BSchematic diagram of the process of determining whether the device identifier of an intelligent device is in a preset whitelist for a device upgrade method provided by an embodiment of the present application;
[0056] Figure 5 Schematic diagram of the process of generating a first address for a device upgrade method provided by an embodiment of the present application;
[0057] Figure 6 Schematic diagram of the process of displaying the upgrade progress for a device upgrade method provided by an embodiment of the present application;
[0058] Figure 7 Schematic diagram of the display of the upgrade progress for a device upgrade method provided by an embodiment of the present application;
[0059] Figure 8 Schematic diagram of the overall process of a device upgrade method provided by an embodiment of the present application, where the execution entity is an intelligent device;
[0060] Figure 9 Schematic diagram of the process of sending the upgrade progress to a terminal device for a device upgrade method provided by an embodiment of the present application;
[0061] Figure 10 Interaction flowchart between a terminal device and an intelligent device for a device upgrade method provided by an embodiment of the present application;
[0062] Figure 11 Interaction flowchart between a router / switch and an intelligent device for a device upgrade method provided by an embodiment of the present application;
[0063] Figure 12 Interaction flowchart between a host / central control screen and an intelligent device for a device upgrade method provided by an embodiment of the present application;
[0064] Figure 13 Schematic diagram of a device for a device upgrade method provided by an embodiment of the present application, where the execution entity is a terminal device;
[0065] Figure 14 Schematic diagram of a device for a device upgrade method provided by an embodiment of the present application, where the execution entity is an intelligent device;
[0066] Figure 15 Schematic diagram of an electronic device for a device upgrade method provided by an embodiment of the present application. Detailed implementation manners
[0067] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0068] To better understand the technical solution of the present application, the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0069] It should be clear that the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts belong to the scope of protection of the present application.
[0070] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms of "a", "the" and "said" used in the embodiments of the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0071] It should be understood that the term " / and" used herein is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, a and / or b can represent: a exists alone, a and b exist simultaneously, and b exists alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after.
[0072] The inventor's research found that with the development of whole-house intelligence, improving the delivery efficiency of whole-house installation and maintenance has become the focus of the entire whole-house intelligence industry. There is no uplink network for the equipment during the installation and maintenance stage, but the equipment needs to be upgraded. Therefore, for the upgrade, the installation and maintenance engineer needs to carry a CPE to the installation and maintenance site. When the operator network signal at the installation and maintenance site is poor or there is no signal, the upgrade success rate of intelligent devices will be extremely low, seriously affecting the efficiency of whole-house installation and maintenance.
[0073] As Figure 1A shown, the specific implementation in the related technology for whole-house installation and maintenance is as follows: The intelligent device to be upgraded is connected to the management cloud / gateway, and then the technician logs in to the management cloud / gateway through the installation and maintenance application; after the login is successful, the management cloud / gateway will feedback a connection success signal. After the technician receives the login success signal, the upgrade command is issued through the installation and maintenance application. The upgrade command is sent to the intelligent device through the management cloud / gateway; after the intelligent device receives the upgrade command sent by the management cloud / gateway, it downloads the device upgrade package from the server through the preset download address and upgrades the device according to the device upgrade package; after the intelligent device finishes the upgrade, it reports the upgrade result to the management cloud / gateway, and the management cloud / gateway prompts the technician of the upgrade result of the intelligent device through the installation and maintenance application.
[0074] In the related art, when performing whole-house installation and maintenance, it relies on the upstream network and depends on intelligent devices to connect to the upgrade server for upgrading. If the intelligent device has no upstream network, it cannot be upgraded. Moreover, it depends on the upgrade operation to log in to the management cloud of the device or the gateway device through the installation and maintenance application. Only one account or the intelligent devices under the gateway can be upgraded at a time. In the scenario of whole-house delivery, even if there is an upstream network, the quality and bandwidth of the upstream network will affect the upgrade efficiency of the devices.
[0075] In view of the above problems, the embodiments of the present application provide a device upgrade method, device, equipment, and storage medium to solve the above problems. The inventive concept of the present application can be summarized as: in response to an upgrade instruction, send a first message; receive response packets sent by at least one intelligent device; based on the received response packets, determine at least one first intelligent device; and send the first address to the first intelligent device, where the first address is used to indicate the storage address of the device upgrade package of the first intelligent device stored in the terminal device. In the embodiments of the present application, only the first address is sent to the first intelligent device, avoiding the waste of resources caused by sending addresses to all intelligent devices. In the present application, the first intelligent device can download the device upgrade package from the terminal device without going through the upstream network, and multiple first intelligent devices can download the device upgrade package simultaneously for upgrading, improving the upgrade efficiency of the intelligent devices.
[0076] As Figure 1B shown, it is a schematic diagram of an application scenario of an upgrade method provided by an embodiment of the present application, which includes: technician 10, terminal device 20, intelligent devices 30, and intelligent devices 30 include first intelligent devices 301 and other intelligent devices 302; where:
[0077] The terminal device 20, in response to the upgrade instruction triggered by the technician 10, sends a first message; receives response packets sent by at least one intelligent device 30; based on the received response packets, determines at least one first intelligent device 301; and sends the first address to the first intelligent device 301, where the first address is used to indicate the storage address of the device upgrade package of the first intelligent device 301 stored in the terminal device 20.
[0078] As Figure 2 shown, it is a schematic flowchart of a device upgrade method provided by an embodiment of the present application, and the execution entity is the terminal device, where:
[0079] In step 201: In response to the upgrade instruction, send a first message.
[0080] In this application, a technician can trigger an upgrade instruction in a terminal device. If the technician triggers the upgrade instruction, it indicates that there is an intelligent device to be upgraded. Therefore, after the technician triggers the upgrade instruction, the terminal device first responds to the upgrade instruction and scans within a preset range to detect the intelligent device, and then sends a first message to the detected intelligent device.
[0081] In some possible embodiments, in order to enable communication between the intelligent device and the terminal device without going through the uplink network, therefore, in response to the upgrade instruction, the intelligent devices within the preset range are scanned. Specifically, it can be implemented as: in response to the upgrade instruction, the preset range corresponding to the local area network connected to the terminal device is scanned to detect the intelligent devices within the preset range. That is, in this application, the communication between the terminal device and the intelligent device can be achieved through the local area network without going through the uplink network. When the terminal device performs the scan, it only scans the local area network it is connected to and regards the devices scanned in this local area network as the intelligent devices within the detected preset range.
[0082] In some possible embodiments, the terminal device first needs to generate a first message before sending the first message. When generating the first message, it can be generated based on a preset list of intelligent devices. That is, in this application, the first message carries the list of intelligent devices, and the list of intelligent devices is used to match the intelligent device that sends the response packet.
[0083] It should be noted that when generating the first message based on the list of intelligent devices, a part of the data packet corresponding to the first message can be used to carry the list of intelligent devices, or a new field can be added to the data packet corresponding to the first message to carry the list of intelligent devices. This application does not limit the way the first message carries the list of intelligent devices.
[0084] In this application, by carrying the list of intelligent devices in the first message, the intelligent device can determine whether to send a response packet according to the list of intelligent devices. Among them, the list of intelligent devices records the identification information of at least one intelligent device to be connected to the terminal device.
[0085] That is, in this application, in order to reduce waste of resources, a list of intelligent devices is set. The identification information of the intelligent devices recorded in the list of intelligent devices is the identification information of the intelligent devices that need to be connected to the terminal device. Therefore, after generating the first message according to the list of intelligent devices, the intelligent device can confirm whether it needs to be connected to the terminal device according to the list of intelligent devices carried in the first message. If it needs to be connected to the terminal device, it sends a response packet to the terminal device, and if it does not need to be connected to the terminal device, it does not need to send a response packet to the terminal device.
[0086] In step 202: Receive response packets sent by at least one intelligent device.
[0087] In this application, after the intelligent device receives the communication connection request sent by the terminal device, the intelligent device will send a response packet so that the terminal device can determine the first intelligent device according to the response packet.
[0088] In step 203: Based on the received response packet, determine at least one first intelligent device.
[0089] Since there may be intelligent devices that do not need to be upgraded among the intelligent devices scanned by the terminal device, in order to avoid wasting resources caused by interacting with intelligent devices that do not need to be upgraded, it is necessary to determine the first intelligent device.
[0090] In some possible embodiments, based on the received response packet, determining at least one first intelligent device can be specifically implemented as the steps shown in Figure 3 as follows, where:
[0091] In step 301: Obtain the second address carried in the response packet.
[0092] In some possible embodiments, the second address may be the MAC (Media Access Control Address) address of the intelligent device, or may be other addresses that uniquely identify the intelligent device. This application does not make any limitations in this regard.
[0093] It should be noted that a part of the fields in the response packet can be used to carry the second address, or a new field can be added to the response packet to carry the second address. This application does not make any limitations on the way the response packet carries the second address.
[0094] In step 302: Based on the second address, determine that the intelligent device is the first intelligent device.
[0095] That is, in this application, it can be determined whether the first intelligent device is the first intelligent device based on the second address.
[0096] For example: The terminal device receives the response packets sent by intelligent device 1, intelligent device 2, and intelligent device 3; based on the second address in the response packet, it is determined that the first intelligent devices include intelligent device 1 and intelligent device 2. Then the terminal device sends the first address to intelligent device 1 and intelligent device 2 so that intelligent device 1 and intelligent device 2 can download the device upgrade package from the terminal device according to the first address and perform device upgrade.
[0097] In some possible embodiments, when determining whether an intelligent device is the first intelligent device based on the second address, it can be specifically implemented as the steps shown in Figure 4A as follows:
[0098] Step 401: Compare the second address of the intelligent device with the second address in the preset whitelist.
[0099] That is, in this application, the terminal device compares the second address of the intelligent device obtained with the second address in the preset whitelist stored in advance.
[0100] In order to reduce the time consumed in the device upgrade stage, before upgrading the device, that is, before the technician triggers the upgrade instruction based on the terminal device, first implement: obtain the preset whitelist and store the preset whitelist. Among them, the preset whitelist is constructed by the technician according to the second address of the device to be upgraded.
[0101] Step 402: If the second address of the intelligent device exists in the preset whitelist, it is determined that the intelligent device is in the preset whitelist.
[0102] Step 403: If the second address of the intelligent device does not exist in the preset whitelist, it is determined that the intelligent device is not in the preset whitelist.
[0103] For example: The preset whitelist includes: the second address of intelligent device 1, the second address of intelligent device 2, the second address of intelligent device 3. The intelligent devices scanned by the terminal device include: intelligent device 1, intelligent device 2, intelligent device 3, intelligent device 4. Then it can be determined that intelligent device 1 is in the preset whitelist, intelligent device 2 is in the preset whitelist, intelligent device 3 is in the preset whitelist, and intelligent device 4 is not in the preset whitelist.
[0104] In some other possible embodiments, in addition to determining whether the intelligent device is the first intelligent device according to the second address, it is also possible to determine whether the intelligent device is the first intelligent device according to the device identifier of the intelligent device. Specifically, it can be implemented as Figure 4B shown in the steps, where:
[0105] In step 411: Obtain the identification information carried in the response packet.
[0106] In this application, there is no limitation on the identification information of the device. As long as the information that can uniquely identify the intelligent device can be used as the identification information of the intelligent device in this application. For example: the identity identification of the device, the device name, etc.
[0107] In step 412: Compare the identification information of the intelligent device with the identification information in the preset whitelist.
[0108] That is, in this application, the terminal device compares the identification information of the intelligent device obtained with the identification information in the preset whitelist stored in advance.
[0109] In order to reduce the time consumed during the device upgrade phase, before upgrading the device, that is, before the technician triggers the upgrade instruction based on the terminal device, the following is implemented first: obtaining a preset whitelist and storing the preset whitelist.
[0110] It should be noted that the preset whitelist is constructed by the technician according to the identification information of the device to be upgraded.
[0111] In step 413: If the identification information of the intelligent device exists in the preset whitelist, it is determined that the intelligent device is in the preset whitelist.
[0112] In step 414: If the identification information of the intelligent device does not exist in the preset whitelist, it is determined that the intelligent device is not in the preset whitelist.
[0113] For example: The preset whitelist includes: the identification information of intelligent device 1, the identification information of intelligent device 2, the identification information of intelligent device 3, and the intelligent devices scanned by the terminal device include: intelligent device 1, intelligent device 2, intelligent device 3, and intelligent device 4. Then it can be determined that intelligent device 1 is in the preset whitelist, intelligent device 2 is in the preset whitelist, intelligent device 3 is in the preset whitelist, and intelligent device 4 is not in the preset whitelist.
[0114] In this application, a preset whitelist is set based on the identification information of the intelligent device to be upgraded, and the device identification of the intelligent device to be upgraded is recorded in the preset whitelist. That is, when it is determined that the intelligent device is in the preset whitelist, it indicates that the intelligent device is the intelligent device to be upgraded. Therefore, only the first address needs to be sent to the intelligent devices in the preset whitelist.
[0115] In the embodiment of this application, in order to realize the communication between the first intelligent device and the terminal device, after the first intelligent device is determined, a communication connection needs to be established with the first intelligent device based on the second address of the first intelligent device, and the communication connection is used for the communication between the first intelligent device and the terminal device.
[0116] Since the operator network signal at the installation and maintenance site is very poor, or the lack of signal will lead to low upgrade efficiency of the intelligent device. Therefore, in this application, when the terminal device establishes communication with the intelligent device, it can be implemented as: establishing a communication connection with the first intelligent device based on the SPEKE protocol and the second address; or, establishing a communication connection with the first intelligent device based on the Bluetooth protocol and the second address.
[0117] In step 204: The first address is sent to the first intelligent device, and the first address is used to indicate the storage address of the device upgrade package of the first intelligent device stored in the terminal device.
[0118] In order to ensure that the intelligent device can accurately obtain the device upgrade package, therefore, in this application, it can be adopted asFigure 5 Generate the first address according to the steps shown below:
[0119] In step 501: Determine the local port, local address, and the storage path of the device upgrade package.
[0120] In this application, in order to further improve the upgrade efficiency of the intelligent device, before upgrading the intelligent device, it is first necessary to download the device upgrade package and store the device upgrade package.
[0121] It should be noted that when the terminal device downloads the device upgrade package, in order to avoid reducing the number of downloads and achieve one-time download and multiple uses, the full amount of the device upgrade package can be downloaded at one time. If it is to reduce the resources consumed when downloading the device upgrade package, only the device upgrade packages of the intelligent devices in the preset whitelist can be downloaded. This application does not limit this.
[0122] In step 502: Generate the first address based on the local port, local address, and storage path.
[0123] In this application, the first address generated by the terminal device through the local port, local address, and storage path can ensure that the intelligent device accurately finds the device upgrade package according to the first address and downloads it.
[0124] In order to ensure that technicians can understand the upgrade status of the intelligent device in real time, the following implementation methods are set in this application: Figure 6 As shown below:
[0125] In step 601: Respond to the upgrade instruction and send the first message.
[0126] The specific implementation method of this step is the same as that of step 201, and will not be elaborated here.
[0127] In step 602: Receive response packets sent by at least one intelligent device.
[0128] The specific implementation method of this step is the same as that of step 202, and will not be elaborated here.
[0129] In step 603: Based on the received response packets, determine at least one first intelligent device.
[0130] The specific implementation method of this step is the same as that of step 203, and will not be elaborated here.
[0131] In step 604: Send the first address to the first intelligent device, where the first address is used to indicate the storage address of the device upgrade package of the first intelligent device stored in the terminal device.
[0132] The specific implementation of this step is the same as that of step 204, and will not be elaborated here.
[0133] In step 605: Receive the upgrade progress sent by the intelligent device and display the upgrade progress.
[0134] In this application, the terminal device receives the upgrade progress sent by each intelligent device and displays it to the user. The user can intuitively understand the upgrade progress of each intelligent device from the upgrade progress displayed by the terminal device.
[0135] For example: If the terminal device receives that the upgrade progress sent by intelligent device 1 is 10%, the upgrade progress sent by intelligent device 2 is 15%, and the upgrade progress sent by intelligent device 3 is 15%, then the display of the upgrade progress of the intelligent devices is as Figure 7 shown.
[0136] In some possible embodiments, intelligent devices in two relatively distant areas may need to be upgraded simultaneously. In this case, in order to save the upgrade time of the intelligent devices, for each area, a technician can select an intelligent device with sufficient resources from the intelligent devices as the second intelligent device. For example, if it is determined that the intelligent devices with sufficient resources include routers, switches, hosts, and central control screens, any one of them can be selected as the second intelligent device. Then, use the second intelligent device to perform device upgrade on the first intelligent device.
[0137] In some possible embodiments, when using the second device to upgrade the first intelligent device, after the terminal device obtains the preset whitelist, it needs to send the preset whitelist to the second intelligent device. Similarly, after the terminal device obtains the device upgrade package, it also needs to send the device upgrade package to the second intelligent device.
[0138] That is, in this application, when the intelligent device has a need for device upgrade, the terminal device can pre-download the device upgrade package from the server through the uplink network and obtain the preset whitelist; then send the preset whitelist and the device upgrade package to the second intelligent device through the terminal device. By this method, the device upgrade efficiency will not be affected when the uplink network quality at the installation and maintenance site is poor, and the intelligent devices in multiple areas can be upgraded simultaneously.
[0139] It should be noted that the process of using the second intelligent device to perform device upgrade on the intelligent device is the same as the Figure 2 steps shown, and will not be elaborated here.
[0140] In summary, the device upgrade method provided by the embodiments of the present application does not require an uplink network and only needs a local area network or a Bluetooth connection to complete the upgrade of intelligent devices. Moreover, the device upgrade method provided by the embodiments of the present application does not require logging in to the management cloud / gateway of the device. The terminal device can directly connect to the intelligent device to issue the first address, and then complete the upgrade of the intelligent device, making the device upgrade more efficient and reliable.
[0141] The embodiments of the present application further provide a device upgrade method, and the execution subject is an intelligent device, as Figure 8 shown, wherein:
[0142] In step 801: Receive a first message sent by the terminal device and generate a response packet.
[0143] In some possible embodiments, the first message sent by the terminal device carries a list of intelligent devices, and the list of intelligent devices records the identification information of at least one intelligent device to be connected to the terminal device. The list of intelligent devices is used to match the intelligent device that sends the response packet. Therefore, after the intelligent device receives the communication connection request, it can compare its own identification information with the identification information of the intelligent devices in the list of intelligent devices to determine whether it is in the list of intelligent devices. If the intelligent device determines that its own identification information is in the list of intelligent devices, it means that the intelligent device needs to establish a communication connection with the terminal device. To facilitate establishing a communication connection with the terminal device, the intelligent device generates a response packet based on its own second address.
[0144] In step 802: Send the response packet to the terminal device.
[0145] After the intelligent device sends the response packet to the terminal device, the terminal device will determine whether the intelligent device is the first intelligent device according to the second address in the response packet. When the terminal device determines that the intelligent device is the first intelligent device, it will establish a communication connection with the intelligent device and then send the first address to the intelligent device.
[0146] Since the operator network signal at the installation and maintenance site is very poor or there is no signal, which will lead to low upgrade efficiency of intelligent devices. Therefore, in some possible embodiments, the establishment of a communication connection between the intelligent device and the terminal device based on the second address is specifically implemented as: establishing a communication connection with the terminal device based on the SPEKE protocol and the second address; or, establishing a communication connection with the terminal device based on the Bluetooth protocol and the second address.
[0147] In step 803: Receive the first address sent by the terminal device and download the device upgrade package from the terminal device; the first address is used to indicate the storage address of the device upgrade package of the first intelligent device in the terminal device.
[0148] In this application, if the intelligent device receives the first address sent by the terminal device, it indicates that the intelligent device has established a communication connection with the terminal device and has a requirement for device upgrade. The intelligent device then downloads the device upgrade package according to the received first address.
[0149] In some possible embodiments, if the intelligent device receives an upgrade instruction sent by the terminal device, the intelligent device needs to obtain the first address from the upgrade instruction. The intelligent device can determine to start the steps of device upgrade according to the upgrade instruction, and can accurately download the device upgrade package through the first address to perform device upgrade.
[0150] In step 804: Perform device upgrade based on the device upgrade package.
[0151] In order to ensure that technicians can understand the upgrade situation of the intelligent device in real time, therefore, during the implementation of the steps as Figure 8 shown, the steps as Figure 9 shown can be implemented, where:
[0152] In step 901: Determine the upgrade progress according to a preset period.
[0153] In step 902: Send the upgrade progress to the terminal device according to a preset period.
[0154] In this application, the terminal device receives the upgrade progress sent by each intelligent device according to a preset period and displays it to the user. The user can intuitively understand the upgrade progress of each intelligent device through the upgrade progress displayed by the terminal device.
[0155] To facilitate a further understanding of a device upgrade method provided by an embodiment of this application, the following describes the interaction process between the terminal device and the intelligent device:
[0156] When the terminal device upgrades the intelligent device, the interaction process between the terminal device and the intelligent device is as Figure 10 shown:
[0157] In step 1001: The terminal device obtains the device upgrade package.
[0158] In step 1002: The terminal device responds to the upgrade instruction and sends the first message.
[0159] The specific implementation manner of this step is the same as that of step 201 and will not be elaborated here.
[0160] In step 1003: The terminal device receives response packets sent by at least one intelligent device.
[0161] The specific implementation manner of this step is the same as that of step 202 and will not be elaborated here.
[0162] In step 1004: The terminal device obtains the second address based on the response packet.
[0163] The specific implementation of this step is the same as that of step 301, and will not be elaborated here.
[0164] In step 1005: The terminal device determines whether the smart device corresponding to the response packet is the first smart device based on the second address.
[0165] The specific implementation of this step is the same as that of step 302, and will not be elaborated here.
[0166] In step 1006: The terminal device establishes a communication connection with the first smart device.
[0167] In step 1007: The terminal device generates a first address based on the local port, local address, and storage path, and sends the first address to the first smart device.
[0168] The specific implementation of this step is the same as that of step 502, and will not be elaborated here.
[0169] In step 1008: The smart device downloads the device upgrade package from the terminal device according to the first address.
[0170] The specific implementation of this step is the same as that of step 803, and will not be elaborated here.
[0171] In step 1009: The smart device performs device upgrade.
[0172] The specific implementation of this step is the same as that of step 804, and will not be elaborated here.
[0173] In step 1010: The smart device determines the upgrade progress according to the preset period, and sends the upgrade progress to the terminal device according to the preset period.
[0174] The specific implementation of this step is the same as that of step 902, and will not be elaborated here.
[0175] In step 1011: The terminal device receives the upgrade progress sent by the smart device and displays the upgrade progress.
[0176] The specific implementation of this step is the same as that of step 605, and will not be elaborated here.
[0177] When using a router / switch as the second smart device to perform device upgrade on the smart device, the interaction process between the second smart device and the smart device is as Figure 11 shown:
[0178] In step 1101: The router / switch (the second intelligent device) receives the device upgrade package sent by the terminal device.
[0179] In step 1102: The router / switch sends a first message in response to the upgrade instruction.
[0180] The specific implementation of this step is the same as that of step 201, and will not be elaborated here.
[0181] In step 1103: The router / switch receives response packets sent by at least one intelligent device.
[0182] The specific implementation of this step is the same as that of step 202, and will not be elaborated here.
[0183] In step 1104: The router / switch obtains a second address based on the response packet.
[0184] The specific implementation of this step is the same as that of step 301, and will not be elaborated here.
[0185] In step 1105: The router / switch determines whether the intelligent device corresponding to the response packet is the first intelligent device based on the second address.
[0186] The specific implementation of this step is the same as that of step 302, and will not be elaborated here.
[0187] In step 1106: The router / switch establishes a communication connection with the first intelligent device.
[0188] In step 1107: The router / switch generates a first address based on the local port, local address, and storage path, and sends the first address to the intelligent device.
[0189] The specific implementation of this step is the same as that of step 502, and will not be elaborated here.
[0190] In step 1108: The intelligent device downloads the device upgrade package from the router / switch according to the first address.
[0191] The specific implementation of this step is the same as that of step 803, and will not be elaborated here.
[0192] In step 1109: The intelligent device performs device upgrade.
[0193] The specific implementation of this step is the same as that of step 804, and will not be elaborated here.
[0194] In step 1110: The intelligent device determines the upgrade progress according to a preset period, and sends the upgrade progress to the router / switch according to the preset period.
[0195] The specific implementation of this step is the same as that of step 902, and will not be elaborated here.
[0196] In step 1111: The router / switch receives the upgrade progress sent by the intelligent device and displays the upgrade progress.
[0197] The specific implementation of this step is the same as that of step 605, and will not be elaborated here.
[0198] When using the host / central control screen as the second intelligent device to upgrade the intelligent device, the interaction process between the second intelligent device and the intelligent device is as Figure 12 shown:
[0199] In step 1201: The host / central control screen (second intelligent device) receives the device upgrade package sent by the terminal device.
[0200] In step 1202: The host / central control screen responds to the upgrade instruction and sends the first message.
[0201] The specific implementation of this step is the same as that of step 201, and will not be elaborated here.
[0202] In step 1203: The host / central control screen receives the response packets sent by at least one intelligent device.
[0203] The specific implementation of this step is the same as that of step 202, and will not be elaborated here.
[0204] In step 1204: The host / central control screen obtains the second address based on the response packet.
[0205] The specific implementation of this step is the same as that of step 301, and will not be elaborated here.
[0206] In step 1205: The host / central control screen determines whether the intelligent device corresponding to the response packet is the first intelligent device based on the second address.
[0207] The specific implementation of this step is the same as that of step 302, and will not be elaborated here.
[0208] In step 1206: The host / central control screen establishes a communication connection with the first intelligent device.
[0209] In step 1207: The host / central control screen generates the first address based on the local port, local address, and storage path, and sends the first address to the intelligent device.
[0210] The specific implementation of this step is the same as that of step 502, and will not be elaborated here.
[0211] In step 1208: The intelligent device downloads the device upgrade package from the terminal device according to the first address.
[0212] The specific implementation of this step is the same as that of step 803, and will not be elaborated here.
[0213] In step 1209: The intelligent device performs device upgrade.
[0214] The specific implementation of this step is the same as that of step 804, and will not be elaborated here.
[0215] In step 1210: The intelligent device determines the upgrade progress according to a preset period, and sends the upgrade progress to the host / central control screen according to the preset period.
[0216] The specific implementation of this step is the same as that of step 902, and will not be elaborated here.
[0217] In step 1211: The host / central control screen receives the upgrade progress sent by the intelligent device and displays the upgrade progress.
[0218] The specific implementation of this step is the same as that of step 605, and will not be elaborated here.
[0219] Based on the same inventive concept, after introducing a device upgrade method provided by an embodiment of the present application, as Figure 13 shown, a device upgrade device 1300 provided by an embodiment of the present application will be described below. Applied to a terminal device, the device includes:
[0220] A response module 13001, configured to send a first message in response to an upgrade instruction;
[0221] A receiving module 13002, configured to receive response packets sent by at least one intelligent device;
[0222] A first intelligent device determination module 13003, configured to determine at least one first intelligent device based on the received response packets;
[0223] An address sending module 13004, configured to send a first address to the first intelligent device, where the first address is used to indicate the storage address of the device upgrade package of the first intelligent device stored in the terminal device.
[0224] In some possible embodiments, the first intelligent device determination module 13003 is specifically configured to: for each received response packet, execute: obtain a second address carried in the response packet; determine the intelligent device as the first intelligent device according to the second address.
[0225] In some possible embodiments, the first message carries a list of intelligent devices, and the list of intelligent devices is used to match the intelligent devices that send response packets.
[0226] In some possible embodiments, the address distribution module 13004 is further configured to: determine the local port, the local address, and the storage path of the device upgrade package; generate a first address based on the local port, the local address, and the storage path.
[0227] In some possible embodiments, the response module 13001 is further configured to: obtain the device upgrade package; send the device upgrade package to the second intelligent device so that the second intelligent device performs an upgrade operation on the first intelligent device.
[0228] In some possible embodiments, the second intelligent device includes any one of the following: router, switch, host, central control screen.
[0229] In some possible embodiments, the address distribution module 13004 is further configured to:
[0230] Receive the upgrade progress sent by the first intelligent device and display the upgrade progress.
[0231] In some possible embodiments, the first intelligent device determination module 13003 is further configured to: establish a communication connection with the first intelligent device based on the second address of the first intelligent device, and the communication connection is used for the first intelligent device to communicate with the terminal device.
[0232] In some possible embodiments, the first intelligent device determination module 13003 is specifically configured to: establish a communication connection with the first intelligent device based on the SPEKE protocol and the second address; or, establish a communication connection with the first intelligent device based on the Bluetooth protocol and the second address.
[0233] Based on the same inventive concept, after introducing a device upgrade method provided by an embodiment of the present application, as Figure 14 shown, a device upgrade device 1400 provided by an embodiment of the present application is described below. The device is applied to an intelligent device, and the device includes:
[0234] A first message receiving module 14001, configured to receive a first message sent by a terminal device and generate a response packet;
[0235] A sending module 14002, configured to send the response packet to the terminal device;
[0236] An address receiving module 14003, configured to receive a first address sent by a terminal device and download a device upgrade package from the terminal device according to the first address; the first address is used to indicate the storage address of the device upgrade package of the first intelligent device stored in the terminal device;
[0237] An upgrade module 14004, configured to perform device upgrade based on the device upgrade package.
[0238] In some possible embodiments, the address receiving module 14003 is further configured to: establish a communication connection with the terminal device based on the second address.
[0239] In some possible embodiments, the address receiving module 14003 is specifically configured to: establish a communication connection with the terminal device based on the SPEKE protocol and the second address; or, establish a communication connection with the terminal device based on the Bluetooth protocol and the second address.
[0240] In some possible embodiments, the first message receiving module 14001 is specifically configured to: determine whether its own identification information is in the smart device list based on the smart device list carried in the first message; if it is in the smart device list, then generate a response packet.
[0241] In some possible embodiments, the upgrade module 14004 is specifically configured to: determine the upgrade progress according to a preset period; send the upgrade progress to the terminal device according to a preset period.
[0242] Corresponding to the above embodiments, the present application further provides an electronic device. Figure 15 FIG. is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. The electronic device 1500 may include: a processor 1501, a memory 1502, and a communication unit 1503. These components communicate through one or more buses. Those skilled in the art can understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiments of the present invention. It can be a bus structure, a star structure, and may also include more or fewer components than shown in the figure, or combine certain components, or different component arrangements.
[0243] Among them, the communication unit 1503 is used to establish a communication channel, so that the electronic device can communicate with other devices. Receive user data sent by other devices or send user data to other devices.
[0244] The processor 1501 is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and lines, and by running or executing software programs and / or modules stored in the memory 1502, and calling data stored in the memory, to execute various functions of the electronic device and / or process data. The processor may be composed of an integrated circuit (IC). For example, it may be composed of a single packaged IC, or may be composed of connecting multiple packaged ICs with the same or different functions. For example, the processor 1501 may only include a central processing unit (CPU). In the embodiment of the present invention, the CPU may be a single arithmetic core or may include multiple arithmetic cores.
[0245] The memory 1502 is used to store the execution instructions of the processor 1501. The memory 1502 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disc.
[0246] When the execution instructions in the memory 1502 are executed by the processor 1501, the electronic device 1500 is enabled to execute Figure 2 Some or all of the steps in the illustrated embodiments.
[0247] In a specific implementation, the present invention further provides a computer storage medium. The computer storage medium can store a program, and when the program is executed, it can include some or all of the steps in the various embodiments of the device upgrade method provided by the present invention. The storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM), a random access memory (RAM), or the like.
[0248] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution in the embodiments of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments of the present invention.
[0249] For the same or similar parts among the various embodiments in this specification, reference can be made to each other. In particular, for the device embodiments and the terminal embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the descriptions in the method embodiments.
Claims
1. A device upgrading method, characterized in that: Applied to a terminal device, the method comprises: In response to the upgrade instruction, sending a first message; receiving a response packet sent by at least one smart device; Based on the received response packet, determining at least one first smart device; A first address is sent to the first smart device, where the first address is used to indicate a storage address of a device upgrade package of the first smart device stored in the terminal device.
2. The method according to claim 1, characterized in that The determining of at least one first smart device based on the received response packet includes: For each response packet received, execute: Obtaining a second address carried by the response packet; The smart device is determined to be a first smart device according to the second address.
3. The method according to claim 1, characterized in that The first message carries a list of smart devices, and the list of smart devices is used to match the smart device that sends the response packet.
4. The method according to claim 1, characterized in that: Before sending the first address to the first smart device, the method further includes: Determine the local port, local address and storage path of the device upgrade package; The first address is generated based on the local port, the local address, and the storage path.
5. The method according to claim 1, characterized in that The method further comprises: Get device upgrade package; The device upgrade package is sent to the second smart device, so that the second smart device performs an upgrade operation on the first smart device.
6. The method according to claim 5, characterized in that The second smart device includes any one of the following: a router, a switch, a host, and a central control screen.
7. The method according to claim 1, characterized in that After sending the first address to the first smart device, the method further includes: Receive the upgrade progress sent by the first smart device, and display the upgrade progress.
8. The method according to claim 1, characterized in that After determining at least one first smart device based on the received response packet, the method further includes: A communication connection is established with the first smart device based on the second address of the first smart device, where the communication connection is used for the first smart device to communicate with the terminal device.
9. The method according to claim 8, characterized in that The establishing a communication connection with the first smart device based on the second address of the first smart device includes: Establishing a communication connection with the first smart device based on the SPEKE protocol and the second address; or, A communication connection is established between the second address and the first smart device based on the Bluetooth protocol.
10. A device upgrade method, characterized in that: Applied to a first smart device, the method includes: receiving a first message sent by a terminal device, and generating a response packet; Sending the response packet to the terminal device; Receiving a first address sent by a terminal device, and downloading a device upgrade package from the terminal device according to the first address; the first address is used to indicate a storage address of the device upgrade package of the first smart device stored in the terminal device; The device is upgraded based on the device upgrade package.
11. The method according to claim 10, characterized in that Before receiving the first address sent by the terminal device, the method further includes: A communication connection is established with the terminal device based on the second address.
12. The method according to claim 11, characterized in that The establishing a communication connection with the terminal device based on the second address includes: Establishing a communication connection with the terminal device based on the SPEKE protocol and the second address; or, A communication connection is established with the terminal device based on the Bluetooth protocol and the second address.
13. The method according to claim 10, characterized in that The receiving a first message sent by a terminal device includes: Based on the list of smart devices carried in the first message, determining whether the identification information of the smart device is in the list of smart devices; If it is in the list of smart devices, a response packet is generated.
14. The method according to claim 10, characterized in that The performing device upgrade based on the device upgrade package includes: Determine the upgrade progress according to the preset cycle; The upgrade progress is sent to the terminal device according to the preset period.
15. An electronic device, characterized in that: It comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method described in any one of claims 1-9 or 10-14.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 9 or 10 to 14.