CN117971257A - Device firmware upgrading method, device firmware upgrading system and electronic device - Google Patents

Device firmware upgrading method, device firmware upgrading system and electronic device Download PDF

Info

Publication number
CN117971257A
CN117971257A CN202311781419.0A CN202311781419A CN117971257A CN 117971257 A CN117971257 A CN 117971257A CN 202311781419 A CN202311781419 A CN 202311781419A CN 117971257 A CN117971257 A CN 117971257A
Authority
CN
China
Prior art keywords
equipment
version number
update time
upgraded
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311781419.0A
Other languages
Chinese (zh)
Inventor
郭颖珊
陈锦俊
谢俊杰
唐杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202311781419.0A priority Critical patent/CN117971257A/en
Publication of CN117971257A publication Critical patent/CN117971257A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The application provides an equipment firmware upgrading method, an equipment firmware upgrading system and electronic equipment, wherein the method comprises the following steps: receiving first version data sent by a target server, and determining whether equipment to be upgraded exists in a total equipment set according to the first version data, wherein the total equipment set comprises all intelligent equipment; under the condition that the equipment to be upgraded exists in the total equipment set, receiving a plurality of second version data sent by a target server, and determining a target sub-equipment set with the equipment to be upgraded from the sub-equipment sets according to the second version data, wherein one sub-equipment set comprises at least one intelligent equipment; and verifying all intelligent devices in the target sub-device set to determine the device to be upgraded, and upgrading the firmware of the device to be upgraded. According to the method, whether the equipment to be upgraded exists or not is judged in a grading mode, and firmware upgrading is carried out on the equipment to be upgraded, so that the operation workload of inquiring whether the equipment firmware version is the latest version in a whole quantity can be greatly reduced.

Description

Device firmware upgrading method, device firmware upgrading system and electronic device
Technical Field
The present application relates to the field of device firmware upgrade, and in particular, to a device firmware upgrade method, a device firmware upgrade system, and an electronic device.
Background
The host computer of whole house intelligent house needs to connect a plurality of smart devices in the house, when there is some smart devices in the house to need the upgrading, need inquire the smart device version number of each one by one, and efficiency is very low, and consumes the server resource.
Disclosure of Invention
The application mainly aims to provide an upgrading method of equipment firmware, an upgrading system of equipment firmware and electronic equipment, which at least solve the problems that in the prior art, server resources are consumed greatly and efficiency is lower in an upgrading method of some intelligent equipment connected with a host.
In order to achieve the above object, according to one aspect of the present application, there is provided an upgrade method of device firmware, applied to a host in an upgrade system of device firmware, the upgrade system of device firmware further including a target server and a plurality of intelligent devices, the host being communicatively connected to the target server and each of the intelligent devices, respectively, the method comprising: receiving first version data sent by the target server, and determining whether equipment to be upgraded exists in a total equipment set according to the first version data, wherein the total equipment set comprises all intelligent equipment; receiving a plurality of second version data sent by the target server under the condition that the equipment to be upgraded exists in the total equipment set, and determining a target sub-equipment set with the equipment to be upgraded from at least one sub-equipment set according to the second version data, wherein one sub-equipment set comprises at least one intelligent equipment; and verifying all the intelligent devices in the target sub-device set to determine the device to be upgraded, and upgrading the firmware of the device to be upgraded.
Optionally, the first version data includes a first latest version number and a first latest update time, the first latest version number is a latest version number characterizing the total device set, the first latest update time characterizes the update time of the first latest version number, and determining whether a device to be upgraded exists in the total device set according to the first version data includes: acquiring a first current version number and a first current update time, wherein the first current version number represents the version number of the total equipment set at the current time, and the first current update time represents the update time of the first current version number; comparing the magnitudes of the first latest version number and the first current version number and the magnitudes of the first latest update time and the first current update time; and determining that the device to be upgraded exists in the total device set under the condition that the first latest version number is larger than the first current version number and the first latest update time is later than the first current update time.
Optionally, before receiving the plurality of second version data sent by the target server, in the case that the device to be upgraded exists in the total device set, the method further includes: acquiring brands of the intelligent devices and communication protocol types of the intelligent devices; placing the intelligent devices with the same brands and the same communication protocol type in the same subset; setting set codes corresponding to the sub-device sets; and sending each set code to the target server so that the target server invokes the corresponding second version data to send to the host, wherein the set codes are in one-to-one correspondence with the second version data.
Optionally, the second version data includes a second latest version number and a second latest update time, where the second latest version number characterizes a latest version number of the corresponding subset, the second latest update time characterizes an update time of the second latest version number, and determining, according to each second version data, a target subset set in which the device to be upgraded exists from at least one subset includes: acquiring a second current version number of the sub-device set and a second current update time of the sub-device set, wherein the second current version number represents the version number of the sub-device set at the current time, and the second current update time represents the update time of the second current version number; comparing the magnitudes of the second latest version number and the second current version number and the magnitudes of the second latest update time and the second current update time; and determining the corresponding sub-device set as the target sub-device set under the condition that the second latest version number is larger than the second current version number and the second latest update time is later than the second current update time.
Optionally, verifying all the smart devices in the target subset of devices to determine the device to be upgraded includes: obtaining a class number, a third current version number and a third current update time of each intelligent device in the target subset device set, wherein the third current version number is a version number of the intelligent device at a current time, the third current update time is an update time of the third current version number, the class number is an identification for uniquely characterizing the intelligent device, and one intelligent device corresponds to one third current version number and one third current update time; sending each class number in the target subset device set to the target server, so that the target server invokes a corresponding third latest version number of the intelligent device and a third latest update time, wherein the third latest version number represents the latest version number of the intelligent device, and the third latest update time represents the update time of the third latest version number; comparing the magnitudes of the third latest version number and the third current version number and the magnitudes of the third latest update time and the third current update time; and determining that the corresponding intelligent device is the device to be upgraded under the condition that the third latest version number is larger than the third current version number and the third latest update time is later than the third current update time.
Optionally, the method further comprises: acquiring a preset interval duration; and starting to receive the first version data sent by the target server every other preset interval duration.
Optionally, the to-be-upgraded device has a plurality of to-be-upgraded devices, and each to-be-upgraded device is in communication connection with each other, so as to upgrade the firmware of the to-be-upgraded device, including: acquiring a firmware upgrading data packet of each device to be upgraded from the target server; and respectively sending each firmware upgrading data packet to the corresponding equipment to be upgraded so as to upgrade the firmware of the equipment to be upgraded.
According to another aspect of the present application, there is provided an upgrade method of device firmware, applied to a mobile terminal in an upgrade system of device firmware, where the upgrade system of device firmware further includes a target server and a plurality of intelligent devices, and the mobile terminal is communicatively connected to the target server and each of the intelligent devices, respectively, the method including: selecting a target set code from a plurality of set codes, and sending the target set code to the target server, so that the target server invokes corresponding second version data to send to the mobile terminal, wherein one target set code corresponds to one sub-device set, and one sub-device set comprises at least one intelligent device; determining whether the sub-device set corresponding to the target set code is a target sub-device set with equipment to be upgraded according to the second version data; and under the condition that the sub-equipment set corresponding to the target set code is the target sub-equipment set, checking all intelligent equipment in the target sub-equipment set to determine the equipment to be upgraded, and upgrading the firmware of the equipment to be upgraded.
According to another aspect of the present application, there is provided an upgrade system of device firmware, the upgrade system comprising: the mobile terminal is used for executing the upgrading method of the equipment firmware; the host is used for executing any one of the upgrading methods of the device firmware; the target server is respectively in communication connection with the mobile terminal and the host; and the intelligent devices are respectively in communication connection with the mobile terminal and the host.
According to another aspect of the present application, there is provided an electronic apparatus including: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising an upgrade method for executing any one of the device firmware.
By applying the technical scheme of the application, the method for upgrading the equipment firmware is applied to a host in an equipment firmware upgrading system, the equipment firmware upgrading system also comprises a target server and a plurality of intelligent equipment, the host is respectively in communication connection with the target server and each intelligent equipment, the method firstly receives first version data sent by the target server, and determines whether equipment to be upgraded exists in a total equipment set according to the first version data, wherein the total equipment set comprises all the intelligent equipment; then under the condition that the equipment to be upgraded exists in the total equipment set, receiving a plurality of second version data sent by a target server, and determining a target sub-equipment set with the equipment to be upgraded from the sub-equipment sets according to the second version data, wherein one sub-equipment set comprises at least one intelligent equipment; and finally, checking all intelligent devices in the target sub-device set to determine the device to be upgraded, and upgrading the firmware of the device to be upgraded. According to the method, whether the total equipment set comprises equipment to be upgraded or not is firstly judged, whether each sub equipment set comprises equipment to be upgraded or not is then respectively judged, finally, the equipment to be upgraded is determined, whether the firmware version of the full-quantity query equipment is the running workload of the latest version or not can be greatly reduced, and the problems that in the prior art, the server resource consumption is high and the efficiency is low in an upgrading method of some intelligent equipment connected with a host are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
Fig. 1 is a block diagram showing a hardware configuration of a mobile terminal for performing an upgrade method of device firmware according to an embodiment of the present application;
FIG. 2 is a flow chart illustrating a method for upgrading firmware of a device according to an embodiment of the present application;
FIG. 3 is a flow chart illustrating another method for upgrading device firmware according to an embodiment of the present application;
FIG. 4 illustrates a schematic diagram of an upgrade system for device firmware provided in accordance with an embodiment of the present application;
fig. 5 shows a block diagram of a host provided according to an embodiment of the present application.
Wherein the above figures include the following reference numerals:
102. a processor; 104. a memory; 106. a transmission device; 108. and an input/output device.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the application herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As described in the background art, when some intelligent devices need to be upgraded in the prior art, the version numbers of the intelligent devices of each intelligent device need to be queried one by one, so that the efficiency is very low, and server resources are consumed.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of a mobile terminal of a method for upgrading device firmware according to an embodiment of the present application. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for upgrading firmware of a device in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104, thereby performing various functional applications and data processing, that is, implementing the method described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as a NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In the present embodiment, there is provided an upgrade method of device firmware running on a mobile terminal, a computer terminal, or a similar computing device, it should be noted that the steps illustrated in the flowcharts of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different from that herein.
Fig. 2 is a flowchart of a method of upgrading device firmware according to an embodiment of the present application. As shown in fig. 2, a host applied to an upgrade system of device firmware, where the upgrade system of device firmware further includes a target server and a plurality of intelligent devices, and the host is communicatively connected to the target server and each of the intelligent devices, respectively, and the method includes the following steps:
step S201, receiving first version data sent by the target server, and determining whether equipment to be upgraded exists in a total equipment set according to the first version data, wherein the total equipment set comprises all the intelligent equipment;
specifically, the data stored in the target server includes the latest version firmware data of each intelligent device, so that the current version firmware data of each intelligent device stored in the host is compared with the latest version firmware data of each intelligent device stored in the target server, if the data are different, the presence of the device with upgrading in the total device set is proved, and if the data are the same, the update is not needed, the intelligent devices in the total device set are proved to be the latest version.
The first version data includes a first latest version number and a first latest update time, the first latest version number is a latest version number representing the total device set, the first latest update time represents the update time of the first latest version number, and whether a device to be upgraded exists in the total device set is determined according to the first version data, including the following steps:
Step 2011, obtaining a first current version number and a first current update time, wherein the first current version number represents the version number of the total equipment set at the current time, and the first current update time represents the update time of the first current version number;
Step S2012, comparing the first latest version number with the first current version number, and the first latest update time with the first current update time;
Step S2013, determining that the device to be upgraded exists in the total device set when the first latest version number is greater than the first current version number and the first latest update time is later than the first current update time.
Specifically, a total device set has only a first current version number, and the first current version number is obtained by a total coded query local to the host. The first current version number characterizes the version states of all intelligent devices in the total device set, and if intelligent devices in the total device set are upgraded to new versions, the first current version number is changed correspondingly. And the first latest version number is the latest version state of all intelligent devices in the characterization total device set in the target server, namely the first current version number is the same as the first latest version number, or the first current version number is smaller than the first latest version number, and under the condition that the first current version number and the first latest version number are the same, the total device set is considered to have no device to be upgraded.
Therefore, through the first latest version number and the first current version number, the first latest update time and the first current update time, whether the equipment to be upgraded exists in the total equipment set can be accurately determined, and subsequent judgment is performed under the condition that the equipment to be upgraded exists, so that the operation workload of whether the firmware version of the full-quantity query equipment is the latest version can be greatly reduced.
Wherein, before receiving the plurality of second version data sent by the target server, the method further comprises the following steps if the device to be upgraded exists in the total device set:
Step S301, obtaining brands of the intelligent devices and communication protocol types of the intelligent devices;
step S302, the intelligent devices with the same brands and the same communication protocol type are placed in the same sub-device set;
step S303, set codes corresponding to the sub-device sets are set;
Step S304, each set code is sent to the target server, so that the target server invokes the corresponding second version data to send to the host, and the set codes are in one-to-one correspondence with the second version data.
Specifically, each intelligent device is divided into different sub-device sets through brands of each intelligent device and communication protocol types of each intelligent device, so that whether the device to be upgraded exists in the set can be judged by directly calling data corresponding to one set later, and if the device to be upgraded does not exist, the specific intelligent device data is not required to be called, so that the operation workload of whether the firmware version of the full-quantity query device is the latest version is greatly reduced.
Step S202, receiving a plurality of second version data sent by the target server under the condition that the equipment to be upgraded exists in the total equipment set, and determining a target sub-equipment set of the equipment to be upgraded from at least one sub-equipment set according to the second version data, wherein one sub-equipment set comprises at least one intelligent equipment;
Specifically, the total equipment set is a first-stage screening layer, the sub-equipment set is a second-stage screening layer, whether the total equipment set has equipment to be upgraded or not is judged firstly, whether the sub-equipment set has equipment to be upgraded or not is judged, finally, the data of all intelligent equipment in the target sub-equipment set with the sub-equipment set is directly called to determine the equipment to be upgraded, the data of all intelligent equipment is not required to be called for detection, and the operation workload of whether the firmware version of the full-quantity query equipment is the latest version is greatly reduced.
The second version data includes a second latest version number and a second latest update time, the second latest version number represents a latest version number of the corresponding subset, the second latest update time represents an update time of the second latest version number, and a target subset set of the device to be upgraded is determined from at least one subset according to each second version data, and the method includes the following steps:
Step S2021, obtaining a second current version number of the subset and a second current update time of the subset, where the second current version number represents a version number of the subset at a current time, and the second current update time represents an update time of the second current version number;
Step S2022, comparing the magnitudes of the second latest version number and the second current version number, and the magnitudes of the second latest update time and the second current update time;
step S2023, where the second latest version number is greater than the second current version number and the second latest update time is later than the second current update time, determines the corresponding subset as the target subset.
Specifically, a subset of devices has only a second current version number. The second current version number characterizes the version states of all intelligent devices in the subset, and if the intelligent devices in the subset are upgraded to new versions, the second current version number is changed correspondingly. And the second latest version number is the latest version state of all intelligent devices in the characterization sub-device set in the target server, namely the second current version number is the same as the second latest version number, or the second current version number is smaller than the second latest version number, and under the condition that the second current version number is the same as the second latest version number, the sub-device set is considered to have no device to be upgraded.
Therefore, by the second latest version number and the second current version number, and the second latest update time and the second current update time, the target sub-device set of the device to be upgraded can be accurately determined, and subsequent judgment can be performed, so that the operation workload of whether the firmware version of the full-quantity query device is the latest version can be greatly reduced.
The second current version number is also obtained according to encoding, and the specific attribute structure of each intelligent device is shown in table 1:
TABLE 1 specific Property Structure Table of Intelligent device
Branding Communication protocol Products and products Resource package Updating version number Update time Encoding
Step S203, verifying all the intelligent devices in the target subset to determine the device to be upgraded, and upgrading the firmware of the device to be upgraded.
Specifically, by firstly judging whether the total equipment set comprises equipment to be upgraded or not, then respectively judging whether each sub equipment set comprises equipment to be upgraded or not, and finally determining the equipment to be upgraded, the running workload of whether the firmware version of the full-quantity query equipment is the latest version can be greatly reduced, and the problems of high server resource consumption and lower efficiency of the upgrading method of some intelligent equipment connected with the host in the prior art are solved.
The method comprises the following steps of:
Step S2031, obtaining a class number, a third current version number, and a third current update time of each of the intelligent devices in the target subset device set, where the third current version number is a version number of the intelligent device at the current time, the third current update time is an update time of the third current version number, the class number is an identifier for uniquely characterizing the intelligent device, and one of the intelligent devices corresponds to one of the third current version number and one of the third current update time;
Step S2032, transmitting each class number in the target subset to the target server, so that the target server invokes a corresponding third latest version number of the intelligent device and a third latest update time, where the third latest version number indicates a latest version number of the intelligent device, and the third latest update time indicates an update time of the third latest version number, to the host;
Step S2033 of comparing the third latest version number and the third current version number, and the third latest update time and the third current update time;
Step S2034 is executed to determine that the corresponding intelligent device is the device to be upgraded if the third latest version number is greater than the third current version number and the third latest update time is later than the third current update time.
Specifically, whether the total equipment set comprises equipment to be upgraded is judged firstly, then whether all the sub equipment sets comprise the equipment to be upgraded is judged respectively, finally, the equipment to be upgraded is determined by detecting the data of all intelligent equipment in the target sub equipment set comprising the equipment to be upgraded, the range of the equipment to be upgraded is narrowed layer by layer, the equipment to be upgraded can be determined without detecting the data of all the intelligent equipment, the running workload of whether the firmware version of the full-quantity query equipment is the latest version can be greatly reduced, and the problems of high resource consumption and lower efficiency of a server of an upgrading method of some intelligent equipment connected with a host in the prior art are solved.
The device to be upgraded has a plurality of devices to be upgraded, each device to be upgraded is in communication connection with each other, and the device to be upgraded is used for upgrading firmware, and the device to be upgraded comprises: acquiring a firmware upgrading data packet of each device to be upgraded from the target server; and respectively sending the firmware upgrading data packets to the corresponding equipment to be upgraded so as to upgrade the firmware of the equipment to be upgraded.
Specifically, under the condition that a plurality of devices to be upgraded are provided, the target server can send the firmware upgrading data packets corresponding to the devices to be upgraded in parallel, so that the upgrading efficiency can be improved. In addition, all the intelligent devices are in communication connection through Gnet Bluetooth or WIFI, the target server can also transmit all the firmware upgrading data packets to at least one first-stage device, and then the first-stage device transmits all the firmware upgrading data packets to the corresponding devices to be upgraded respectively. It should be noted that the first-stage device may include a device to be upgraded, and similarly, the transmission path may also pass through the second-stage device and the third-stage device … … nth-stage device.
Wherein, the method further comprises the following steps: acquiring a preset interval duration; and starting to receive the first version data sent by the target server every other preset interval duration.
Specifically, the automatic upgrading of the equipment can be realized, and the state of the equipment is not required to be monitored by a user at any time.
In addition, networking between the device and the host and mobile terminal via Gnet bluetooth or direct connection of the wired device to the host is required before executing the logic of the above embodiments.
The method for upgrading the equipment firmware is applied to a host in an equipment firmware upgrading system, the equipment firmware upgrading system further comprises a target server and a plurality of intelligent equipment, the host is respectively in communication connection with the target server and each intelligent equipment, first version data sent by the target server are received, whether equipment to be upgraded exists in a total equipment set is determined according to the first version data, and the total equipment set comprises all the intelligent equipment; then under the condition that the equipment to be upgraded exists in the total equipment set, receiving a plurality of second version data sent by a target server, and determining a target sub-equipment set with the equipment to be upgraded from the sub-equipment sets according to the second version data, wherein one sub-equipment set comprises at least one intelligent equipment; and finally, checking all intelligent devices in the target sub-device set to determine the device to be upgraded, and upgrading the firmware of the device to be upgraded. According to the method, whether the total equipment set comprises equipment to be upgraded or not is firstly judged, whether each sub equipment set comprises equipment to be upgraded or not is then respectively judged, finally, the equipment to be upgraded is determined, whether the firmware version of the full-quantity query equipment is the running workload of the latest version or not can be greatly reduced, and the problems that in the prior art, the server resource consumption is high and the efficiency is low in an upgrading method of some intelligent equipment connected with a host are solved.
FIG. 3 is a flow chart of another method of upgrading device firmware according to an embodiment of the application. As shown in fig. 3, a mobile terminal applied to an upgrade system of device firmware, where the upgrade system of device firmware further includes a target server and a plurality of intelligent devices, where the mobile terminal is respectively connected to the target server and each of the intelligent devices in a communication manner, and the method includes the following steps:
Step S401, selecting a target set code from a plurality of set codes, and sending the target set code to the target server, so that the target server invokes corresponding second version data to send to the mobile terminal, wherein one target set code corresponds to one sub-device set, and one sub-device set comprises at least one intelligent device;
Step S402, determining whether the sub-device set corresponding to the target set code is a target sub-device set with a device to be upgraded according to the second version data;
step S403, when the subset set corresponding to the target set code is the target subset set, checking all the intelligent devices in the target subset set to determine the device to be upgraded, and upgrading firmware of the device to be upgraded.
The method for upgrading the equipment firmware is applied to the mobile terminal in an equipment firmware upgrading system, the equipment firmware upgrading system further comprises a target server and a plurality of intelligent equipment, the mobile terminal is respectively in communication connection with the target server and each intelligent equipment, the method comprises the steps of firstly selecting one target set code from a plurality of set codes, and sending the target set code to the target server, so that the target server can call corresponding second version data to be sent to the mobile terminal, one target set code corresponds to one sub-equipment set, and one sub-equipment set comprises at least one intelligent equipment; then determining whether the sub-device set corresponding to the target set code is a target sub-device set with the device to be upgraded according to the second version data; and finally, under the condition that the sub-equipment set corresponding to the target set code is the target sub-equipment set, checking all intelligent equipment in the target sub-equipment set to determine equipment to be upgraded, and upgrading the firmware of the equipment to be upgraded. According to the method, whether the total equipment set comprises equipment to be upgraded or not is firstly judged, whether each sub equipment set comprises equipment to be upgraded or not is then respectively judged, finally, the equipment to be upgraded is determined, whether the firmware version of the full-quantity query equipment is the running workload of the latest version or not can be greatly reduced, and the problems that in the prior art, the server resource consumption is high and the efficiency is low in an upgrading method of some intelligent equipment connected with a host are solved.
FIG. 4 is a schematic diagram of an upgrade system for device firmware according to an embodiment of the present application. As shown in fig. 4, the upgrade system includes: the mobile terminal is used for executing the method for upgrading the equipment firmware; the host is used for executing any one of the above updating methods of the device firmware; the target server is respectively connected with the mobile terminal and the host in a communication way; and the intelligent devices are respectively connected with the mobile terminal and the host in a communication way.
Firstly, using mobile terminal login account information, carrying out Gnet Bluetooth searching equipment, searching for a hot spot of a home host, and registering the account and host information to a server. The wired device is connected to the host, and the socket of the wired device is inserted into the host. Adding a wireless device to a host: the mobile terminal is used for searching Gnet Bluetooth devices, and the searched Gnet Bluetooth devices are added to the account uniformly. And uploading resource packages of products of different brands and different communication protocol types in the management platform. Finally, the home agent requests the server. And inquiring the total version number and the updating time according to the local total code of the main body, and returning the total version number by the server and updating the date. And the home host compares the total version number returned by the server with the local total version number and the update date, and if the total version number returned by the server is higher and the update date is newer, the next verification is performed. If the version numbers and the update dates are consistent, stopping checking downwards. And checking the version and the updating time of each brand and each communication protocol type, comparing the version number of each brand returned by the server with the local version number, and if the version number returned by the server is higher, performing the next check. If the version numbers and the update dates of the two are consistent, the brand and the communication protocol type stop checking downwards, and the later brand and the communication protocol type are checked continuously. And checking the version number of the specific class and updating the date. If the total version number returned by the server is higher and the update date is newer, the firmware is updated. And acquiring the latest firmware resource package address to the intelligent equipment of the target upgrade, downloading the firmware by the intelligent equipment, and installing the upgrade.
The upgrade system of the device firmware of the application comprises: the mobile terminal is used for executing the method for upgrading the equipment firmware; the host is used for executing any one of the above updating methods of the device firmware; the target server is respectively connected with the mobile terminal and the host in a communication way; and the intelligent devices are respectively connected with the mobile terminal and the host in a communication way. The system can greatly reduce the operation workload of whether the firmware version of the full-quantity query device is the latest version by firstly judging whether the total device set comprises the device to be upgraded or not, then respectively judging whether each sub device set comprises the device to be upgraded or not and finally determining the device to be upgraded or not, and solves the problems of high resource consumption and low efficiency of a server in the upgrading method of some intelligent devices connected with a host in the prior art.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides a host, and the host of the embodiment of the application can be used for executing the upgrading method for the equipment firmware. The host is used to implement the foregoing embodiments and preferred embodiments, and will not be described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The following describes a host provided by an embodiment of the present application.
Fig. 5 is a schematic diagram of a host according to an embodiment of the application. As shown in fig. 5, the host includes a first receiving unit 10, a second receiving unit 20, and an upgrade unit 30, where the first receiving unit 10 is configured to receive first version data sent by the target server, and determine, according to the first version data, whether a device to be upgraded exists in a total device set, where the total device set includes all the intelligent devices; the second receiving unit 20 is configured to receive, when it is determined that the device to be upgraded exists in the total device set, a plurality of second version data sent by the target server, and determine, according to each of the second version data, a target subset of devices that exists in the device to be upgraded from at least one subset, where one subset includes at least one of the intelligent devices; the upgrade unit 30 is configured to verify all the smart devices in the target subset device set to determine the device to be upgraded, and upgrade firmware of the device to be upgraded.
The host computer comprises a first receiving unit, a second receiving unit and an upgrading unit, wherein the first receiving unit is used for receiving first version data sent by a target server and determining whether equipment to be upgraded exists in a total equipment set according to the first version data, and the total equipment set comprises all intelligent equipment; the second receiving unit is used for receiving a plurality of second version data sent by the target server under the condition that the equipment to be upgraded exists in the total equipment set, and determining a target sub-equipment set with the equipment to be upgraded from the sub-equipment sets according to the second version data, wherein one sub-equipment set comprises at least one intelligent equipment; the upgrading unit is used for verifying all intelligent devices in the target sub-device set to determine the device to be upgraded and upgrading the firmware of the device to be upgraded. The host computer judges whether the total equipment set comprises equipment to be upgraded firstly, then judges whether each sub equipment set comprises equipment to be upgraded respectively, and finally determines the equipment to be upgraded, so that the running workload of whether the firmware version of the full-quantity query equipment is the latest version can be greatly reduced, and the problems of high server resource consumption and lower efficiency of an upgrading method of some intelligent equipment connected with the host computer in the prior art are solved.
In some optional examples, the first version data includes a first latest version number and a first latest update time, the first latest version number is a latest version number representing the total device set, the first latest update time represents an update time of the first latest version number, the first receiving unit includes a first acquisition module, a first comparison module and a first determination module, the first acquisition module is configured to acquire a first current version number and a first current update time, where the first current version number represents a version number of the total device set at a current time, and the first current update time represents an update time of the first current version number; the first comparison module is used for comparing the first latest version number with the first current version number, and comparing the first latest update time with the first current update time; the first determining module is configured to determine that the device to be upgraded exists in the total device set when the first latest version number is greater than the first current version number and the first latest update time is later than the first current update time.
In some optional examples, the apparatus further includes a second obtaining module, a placement module, a setting module, and a first sending module, where the second obtaining module is configured to obtain, before determining that the device to be upgraded exists in the total device set, a brand of each of the intelligent devices and a communication protocol type of each of the intelligent devices, where the second obtaining module receives a plurality of second version data sent by the target server; the placement module is used for placing the intelligent devices with the same brands and the same communication protocol type in the same sub-device set; the setting module is used for setting set codes corresponding to the sub-equipment sets; the first sending module is configured to send each set code to the target server, so that the target server invokes the corresponding second version data to send the second version data to the host, where the set codes are in one-to-one correspondence with the second version data.
In some optional examples, the second version data includes a second latest version number and a second latest update time, where the second latest version number indicates a latest version number of the corresponding subset, the second latest update time indicates an update time of the second latest version number, and the second receiving unit includes a third acquisition module, a second comparison module, and a second determination module, where the third acquisition module is configured to acquire a second current version number of the subset and a second current update time of the subset, the second current version number indicates a version number of the subset at a current time, and the second current update time indicates an update time of the second current version number; the second comparison module is used for comparing the second latest version number with the second current version number, and the second latest update time with the second current update time; the second determining module is configured to determine the corresponding subset device set as the target subset device set when the second latest version number is greater than the second current version number and the second latest update time is later than the second current update time.
In this embodiment, the upgrade unit includes a fourth obtaining module, a second sending module, a third comparing module, and a third determining module, where the fourth obtaining module is configured to obtain a class number, a third current version number, and a third current update time of each of the intelligent devices in the target subset device set, where the third current version number is a version number of the intelligent device at a current time, and the third current update time is an update time of the third current version number, and the class number is an identifier for uniquely characterizing the intelligent device, where one of the intelligent devices corresponds to one of the third current version number and one of the third current update times; the second sending module is configured to send each class number in the target subset device set to the target server, so that the target server invokes a corresponding third latest version number of the intelligent device and a third latest update time, where the third latest version number indicates a latest version number of the intelligent device, and the third latest update time indicates an update time of the third latest version number; the third comparing module is configured to compare the third latest version number with the third current version number, and the third latest update time with the third current update time; the third determining module is configured to determine that the corresponding intelligent device is the device to be upgraded when the third latest version number is greater than the third current version number and the third latest update time is later than the third current update time.
An optional scheme, the device further comprises a fifth acquisition module and a receiving module, wherein the fifth acquisition module is used for acquiring a preset interval duration; the receiving module is used for starting to receive the first version data sent by the target server every other preset interval duration.
As an alternative scheme, the plurality of devices to be upgraded are in communication connection with each other, and the upgrading unit comprises a sixth obtaining module and an upgrading module, wherein the sixth obtaining module is used for obtaining firmware upgrading data packets of the devices to be upgraded from the target server; the upgrade module is used for respectively sending the firmware upgrade data packets to the corresponding equipment to be upgraded so as to upgrade the firmware of the equipment to be upgraded.
The host includes a processor and a memory, the first receiving unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions. The modules are all located in the same processor; or the above modules may be located in different processors in any combination.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one kernel, and the problems of high server resource consumption and low efficiency of an upgrading method of some intelligent devices connected with a host in the prior art are solved by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the invention provides a computer readable storage medium, which comprises a stored program, wherein the program is used for controlling a device where the computer readable storage medium is located to execute the method for upgrading the device firmware.
Specifically, the method for upgrading the device firmware comprises the following steps:
step S201, receiving first version data sent by the target server, and determining whether equipment to be upgraded exists in a total equipment set according to the first version data, wherein the total equipment set comprises all the intelligent equipment;
specifically, the data stored in the target server includes the latest version firmware data of each intelligent device, so that the current version firmware data of each intelligent device stored in the host is compared with the latest version firmware data of each intelligent device stored in the target server, if the data are different, the presence of the device with upgrading in the total device set is proved, and if the data are the same, the update is not needed, the intelligent devices in the total device set are proved to be the latest version.
Step S202, receiving a plurality of second version data sent by the target server under the condition that the equipment to be upgraded exists in the total equipment set, and determining a target sub-equipment set of the equipment to be upgraded from at least one sub-equipment set according to the second version data, wherein one sub-equipment set comprises at least one intelligent equipment;
Specifically, the total equipment set is a first-stage screening layer, the sub-equipment set is a second-stage screening layer, whether the total equipment set has equipment to be upgraded or not is judged firstly, whether the sub-equipment set has equipment to be upgraded or not is judged, finally, the data of all intelligent equipment in the target sub-equipment set with the sub-equipment set is directly called to determine the equipment to be upgraded, the data of all intelligent equipment is not required to be called for detection, and the operation workload of whether the firmware version of the full-quantity query equipment is the latest version is greatly reduced.
Step S203, verifying all the intelligent devices in the target subset to determine the device to be upgraded, and upgrading the firmware of the device to be upgraded.
Specifically, by firstly judging whether the total equipment set comprises equipment to be upgraded or not, then respectively judging whether each sub equipment set comprises equipment to be upgraded or not, and finally determining the equipment to be upgraded, the running workload of whether the firmware version of the full-quantity query equipment is the latest version can be greatly reduced, and the problems of high server resource consumption and lower efficiency of the upgrading method of some intelligent equipment connected with the host in the prior art are solved.
Optionally, the first version data includes a first latest version number and a first latest update time, the first latest version number is a latest version number representing the total device set, the first latest update time represents an update time of the first latest version number, and determining whether a device to be upgraded exists in the total device set according to the first version data includes: acquiring a first current version number and a first current update time, wherein the first current version number represents the version number of the total equipment set at the current time, and the first current update time represents the update time of the first current version number; comparing the first latest version number with the first current version number in size, and comparing the first latest update time with the first current update time in size; and determining that the device to be upgraded exists in the total device set under the condition that the first latest version number is larger than the first current version number and the first latest update time is later than the first current update time.
Optionally, before receiving the plurality of second version data sent by the target server, in the case that the device to be upgraded exists in the total device set, the method further includes: obtaining brands of the intelligent devices and communication protocol types of the intelligent devices; placing the intelligent devices with the same brands and the same communication protocol type in the same sub-device set; setting set codes corresponding to the sub-equipment sets; and transmitting each set code to the target server so that the target server calls the corresponding second version data and transmits the second version data to the host, wherein the set codes are in one-to-one correspondence with the second version data.
Optionally, the second version data includes a second latest version number and a second latest update time, where the second latest version number indicates a latest version number of the corresponding subset, the second latest update time indicates an update time of the second latest version number, and determining, from at least one subset according to each of the second version data, a target subset of the devices to be upgraded, including: acquiring a second current version number of the sub-device set and a second current update time of the sub-device set, wherein the second current version number represents the version number of the sub-device set at the current time, and the second current update time represents the update time of the second current version number; comparing the second latest version number with the second current version number in size, and comparing the second latest update time with the second current update time in size; and determining the corresponding sub-device set as the target sub-device set when the second latest version number is greater than the second current version number and the second latest update time is later than the second current update time.
Optionally, verifying all the intelligent devices in the target subset of devices to determine the device to be upgraded includes: obtaining a class number, a third current version number and a third current update time of each intelligent device in the target subset device set, wherein the third current version number is a version number of the intelligent device at a current time, the third current update time is an update time of the third current version number, the class number is an identification for uniquely characterizing the intelligent device, and one intelligent device corresponds to one third current version number and one third current update time; transmitting each class number in the target subset to the target server, so that the target server invokes a corresponding third latest version number of the intelligent device and a third latest update time, wherein the third latest version number represents a latest version number of the intelligent device, and the third latest update time represents an update time of the third latest version number; comparing the third latest version number with the third current version number in size, and comparing the third latest update time with the third current update time in size; and determining that the corresponding intelligent device is the device to be upgraded under the condition that the third latest version number is larger than the third current version number and the third latest update time is later than the third current update time.
Optionally, the method further comprises: acquiring a preset interval duration; and starting to receive the first version data sent by the target server every other preset interval duration.
Optionally, the to-be-upgraded device has a plurality of to-be-upgraded devices, and each to-be-upgraded device is in communication connection with each other, and upgrades the firmware of the to-be-upgraded device, including: acquiring a firmware upgrading data packet of each device to be upgraded from the target server; and respectively sending the firmware upgrading data packets to the corresponding equipment to be upgraded so as to upgrade the firmware of the equipment to be upgraded.
The embodiment of the invention provides a processor, which is used for running a program, wherein the upgrading method of the equipment firmware is executed when the program runs.
Specifically, the method for upgrading the device firmware comprises the following steps:
step S201, receiving first version data sent by the target server, and determining whether equipment to be upgraded exists in a total equipment set according to the first version data, wherein the total equipment set comprises all the intelligent equipment;
specifically, the data stored in the target server includes the latest version firmware data of each intelligent device, so that the current version firmware data of each intelligent device stored in the host is compared with the latest version firmware data of each intelligent device stored in the target server, if the data are different, the presence of the device with upgrading in the total device set is proved, and if the data are the same, the update is not needed, the intelligent devices in the total device set are proved to be the latest version.
Step S202, receiving a plurality of second version data sent by the target server under the condition that the equipment to be upgraded exists in the total equipment set, and determining a target sub-equipment set of the equipment to be upgraded from at least one sub-equipment set according to the second version data, wherein one sub-equipment set comprises at least one intelligent equipment;
Specifically, the total equipment set is a first-stage screening layer, the sub-equipment set is a second-stage screening layer, whether the total equipment set has equipment to be upgraded or not is judged firstly, whether the sub-equipment set has equipment to be upgraded or not is judged, finally, the data of all intelligent equipment in the target sub-equipment set with the sub-equipment set is directly called to determine the equipment to be upgraded, the data of all intelligent equipment is not required to be called for detection, and the operation workload of whether the firmware version of the full-quantity query equipment is the latest version is greatly reduced.
Step S203, verifying all the intelligent devices in the target subset to determine the device to be upgraded, and upgrading the firmware of the device to be upgraded.
Specifically, by firstly judging whether the total equipment set comprises equipment to be upgraded or not, then respectively judging whether each sub equipment set comprises equipment to be upgraded or not, and finally determining the equipment to be upgraded, the running workload of whether the firmware version of the full-quantity query equipment is the latest version can be greatly reduced, and the problems of high server resource consumption and lower efficiency of the upgrading method of some intelligent equipment connected with the host in the prior art are solved.
Optionally, the first version data includes a first latest version number and a first latest update time, the first latest version number is a latest version number representing the total device set, the first latest update time represents an update time of the first latest version number, and determining whether a device to be upgraded exists in the total device set according to the first version data includes: acquiring a first current version number and a first current update time, wherein the first current version number represents the version number of the total equipment set at the current time, and the first current update time represents the update time of the first current version number; comparing the first latest version number with the first current version number in size, and comparing the first latest update time with the first current update time in size; and determining that the device to be upgraded exists in the total device set under the condition that the first latest version number is larger than the first current version number and the first latest update time is later than the first current update time.
Optionally, before receiving the plurality of second version data sent by the target server, in the case that the device to be upgraded exists in the total device set, the method further includes: obtaining brands of the intelligent devices and communication protocol types of the intelligent devices; placing the intelligent devices with the same brands and the same communication protocol type in the same sub-device set; setting set codes corresponding to the sub-equipment sets; and transmitting each set code to the target server so that the target server calls the corresponding second version data and transmits the second version data to the host, wherein the set codes are in one-to-one correspondence with the second version data.
Optionally, the second version data includes a second latest version number and a second latest update time, where the second latest version number indicates a latest version number of the corresponding subset, the second latest update time indicates an update time of the second latest version number, and determining, from at least one subset according to each of the second version data, a target subset of the devices to be upgraded, including: acquiring a second current version number of the sub-device set and a second current update time of the sub-device set, wherein the second current version number represents the version number of the sub-device set at the current time, and the second current update time represents the update time of the second current version number; comparing the second latest version number with the second current version number in size, and comparing the second latest update time with the second current update time in size; and determining the corresponding sub-device set as the target sub-device set when the second latest version number is greater than the second current version number and the second latest update time is later than the second current update time.
Optionally, verifying all the intelligent devices in the target subset of devices to determine the device to be upgraded includes: obtaining a class number, a third current version number and a third current update time of each intelligent device in the target subset device set, wherein the third current version number is a version number of the intelligent device at a current time, the third current update time is an update time of the third current version number, the class number is an identification for uniquely characterizing the intelligent device, and one intelligent device corresponds to one third current version number and one third current update time; transmitting each class number in the target subset to the target server, so that the target server invokes a corresponding third latest version number of the intelligent device and a third latest update time, wherein the third latest version number represents a latest version number of the intelligent device, and the third latest update time represents an update time of the third latest version number; comparing the third latest version number with the third current version number in size, and comparing the third latest update time with the third current update time in size; and determining that the corresponding intelligent device is the device to be upgraded under the condition that the third latest version number is larger than the third current version number and the third latest update time is later than the third current update time.
Optionally, the method further comprises: acquiring a preset interval duration; and starting to receive the first version data sent by the target server every other preset interval duration.
Optionally, the to-be-upgraded device has a plurality of to-be-upgraded devices, and each to-be-upgraded device is in communication connection with each other, and upgrades the firmware of the to-be-upgraded device, including: acquiring a firmware upgrading data packet of each device to be upgraded from the target server; and respectively sending the firmware upgrading data packets to the corresponding equipment to be upgraded so as to upgrade the firmware of the equipment to be upgraded.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program stored in the memory and capable of running on the processor, wherein the processor realizes at least the following steps when executing the program:
step S201, receiving first version data sent by the target server, and determining whether equipment to be upgraded exists in a total equipment set according to the first version data, wherein the total equipment set comprises all the intelligent equipment;
step S202, receiving a plurality of second version data sent by the target server under the condition that the equipment to be upgraded exists in the total equipment set, and determining a target sub-equipment set of the equipment to be upgraded from at least one sub-equipment set according to the second version data, wherein one sub-equipment set comprises at least one intelligent equipment;
step S203, verifying all the intelligent devices in the target subset to determine the device to be upgraded, and upgrading the firmware of the device to be upgraded.
The device herein may be a server, PC, PAD, cell phone, etc.
Optionally, the first version data includes a first latest version number and a first latest update time, the first latest version number is a latest version number representing the total device set, the first latest update time represents an update time of the first latest version number, and determining whether a device to be upgraded exists in the total device set according to the first version data includes: acquiring a first current version number and a first current update time, wherein the first current version number represents the version number of the total equipment set at the current time, and the first current update time represents the update time of the first current version number; comparing the first latest version number with the first current version number in size, and comparing the first latest update time with the first current update time in size; and determining that the device to be upgraded exists in the total device set under the condition that the first latest version number is larger than the first current version number and the first latest update time is later than the first current update time.
Optionally, before receiving the plurality of second version data sent by the target server, in the case that the device to be upgraded exists in the total device set, the method further includes: obtaining brands of the intelligent devices and communication protocol types of the intelligent devices; placing the intelligent devices with the same brands and the same communication protocol type in the same sub-device set; setting set codes corresponding to the sub-equipment sets; and transmitting each set code to the target server so that the target server calls the corresponding second version data and transmits the second version data to the host, wherein the set codes are in one-to-one correspondence with the second version data.
Optionally, the second version data includes a second latest version number and a second latest update time, where the second latest version number indicates a latest version number of the corresponding subset, the second latest update time indicates an update time of the second latest version number, and determining, from at least one subset according to each of the second version data, a target subset of the devices to be upgraded, including: acquiring a second current version number of the sub-device set and a second current update time of the sub-device set, wherein the second current version number represents the version number of the sub-device set at the current time, and the second current update time represents the update time of the second current version number; comparing the second latest version number with the second current version number in size, and comparing the second latest update time with the second current update time in size; and determining the corresponding sub-device set as the target sub-device set when the second latest version number is greater than the second current version number and the second latest update time is later than the second current update time.
Optionally, verifying all the intelligent devices in the target subset of devices to determine the device to be upgraded includes: obtaining a class number, a third current version number and a third current update time of each intelligent device in the target subset device set, wherein the third current version number is a version number of the intelligent device at a current time, the third current update time is an update time of the third current version number, the class number is an identification for uniquely characterizing the intelligent device, and one intelligent device corresponds to one third current version number and one third current update time; transmitting each class number in the target subset to the target server, so that the target server invokes a corresponding third latest version number of the intelligent device and a third latest update time, wherein the third latest version number represents a latest version number of the intelligent device, and the third latest update time represents an update time of the third latest version number; comparing the third latest version number with the third current version number in size, and comparing the third latest update time with the third current update time in size; and determining that the corresponding intelligent device is the device to be upgraded under the condition that the third latest version number is larger than the third current version number and the third latest update time is later than the third current update time.
Optionally, the method further comprises: acquiring a preset interval duration; and starting to receive the first version data sent by the target server every other preset interval duration.
Optionally, the to-be-upgraded device has a plurality of to-be-upgraded devices, and each to-be-upgraded device is in communication connection with each other, and upgrades the firmware of the to-be-upgraded device, including: acquiring a firmware upgrading data packet of each device to be upgraded from the target server; and respectively sending the firmware upgrading data packets to the corresponding equipment to be upgraded so as to upgrade the firmware of the equipment to be upgraded.
The application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with at least the following method steps:
step S201, receiving first version data sent by the target server, and determining whether equipment to be upgraded exists in a total equipment set according to the first version data, wherein the total equipment set comprises all the intelligent equipment;
step S202, receiving a plurality of second version data sent by the target server under the condition that the equipment to be upgraded exists in the total equipment set, and determining a target sub-equipment set of the equipment to be upgraded from at least one sub-equipment set according to the second version data, wherein one sub-equipment set comprises at least one intelligent equipment;
step S203, verifying all the intelligent devices in the target subset to determine the device to be upgraded, and upgrading the firmware of the device to be upgraded.
Optionally, the first version data includes a first latest version number and a first latest update time, the first latest version number is a latest version number representing the total device set, the first latest update time represents an update time of the first latest version number, and determining whether a device to be upgraded exists in the total device set according to the first version data includes: acquiring a first current version number and a first current update time, wherein the first current version number represents the version number of the total equipment set at the current time, and the first current update time represents the update time of the first current version number; comparing the first latest version number with the first current version number in size, and comparing the first latest update time with the first current update time in size; and determining that the device to be upgraded exists in the total device set under the condition that the first latest version number is larger than the first current version number and the first latest update time is later than the first current update time.
Optionally, before receiving the plurality of second version data sent by the target server, in the case that the device to be upgraded exists in the total device set, the method further includes: obtaining brands of the intelligent devices and communication protocol types of the intelligent devices; placing the intelligent devices with the same brands and the same communication protocol type in the same sub-device set; setting set codes corresponding to the sub-equipment sets; and transmitting each set code to the target server so that the target server calls the corresponding second version data and transmits the second version data to the host, wherein the set codes are in one-to-one correspondence with the second version data.
Optionally, the second version data includes a second latest version number and a second latest update time, where the second latest version number indicates a latest version number of the corresponding subset, the second latest update time indicates an update time of the second latest version number, and determining, from at least one subset according to each of the second version data, a target subset of the devices to be upgraded, including: acquiring a second current version number of the sub-device set and a second current update time of the sub-device set, wherein the second current version number represents the version number of the sub-device set at the current time, and the second current update time represents the update time of the second current version number; comparing the second latest version number with the second current version number in size, and comparing the second latest update time with the second current update time in size; and determining the corresponding sub-device set as the target sub-device set when the second latest version number is greater than the second current version number and the second latest update time is later than the second current update time.
Optionally, verifying all the intelligent devices in the target subset of devices to determine the device to be upgraded includes: obtaining a class number, a third current version number and a third current update time of each intelligent device in the target subset device set, wherein the third current version number is a version number of the intelligent device at a current time, the third current update time is an update time of the third current version number, the class number is an identification for uniquely characterizing the intelligent device, and one intelligent device corresponds to one third current version number and one third current update time; transmitting each class number in the target subset to the target server, so that the target server invokes a corresponding third latest version number of the intelligent device and a third latest update time, wherein the third latest version number represents a latest version number of the intelligent device, and the third latest update time represents an update time of the third latest version number; comparing the third latest version number with the third current version number in size, and comparing the third latest update time with the third current update time in size; and determining that the corresponding intelligent device is the device to be upgraded under the condition that the third latest version number is larger than the third current version number and the third latest update time is later than the third current update time.
Optionally, the method further comprises: acquiring a preset interval duration; and starting to receive the first version data sent by the target server every other preset interval duration.
Optionally, the to-be-upgraded device has a plurality of to-be-upgraded devices, and each to-be-upgraded device is in communication connection with each other, and upgrades the firmware of the to-be-upgraded device, including: acquiring a firmware upgrading data packet of each device to be upgraded from the target server; and respectively sending the firmware upgrading data packets to the corresponding equipment to be upgraded so as to upgrade the firmware of the equipment to be upgraded.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
1) The method is applied to a host in an upgrading system of the equipment firmware, the upgrading system of the equipment firmware also comprises a target server and a plurality of intelligent devices, the host is respectively in communication connection with the target server and each intelligent device, the method firstly receives first version data sent by the target server, and determines whether equipment to be upgraded exists in a total equipment set according to the first version data, and the total equipment set comprises all the intelligent devices; then under the condition that the equipment to be upgraded exists in the total equipment set, receiving a plurality of second version data sent by a target server, and determining a target sub-equipment set with the equipment to be upgraded from the sub-equipment sets according to the second version data, wherein one sub-equipment set comprises at least one intelligent equipment; and finally, checking all intelligent devices in the target sub-device set to determine the device to be upgraded, and upgrading the firmware of the device to be upgraded. According to the method, whether the total equipment set comprises equipment to be upgraded or not is firstly judged, whether each sub equipment set comprises equipment to be upgraded or not is then respectively judged, finally, the equipment to be upgraded is determined, whether the firmware version of the full-quantity query equipment is the running workload of the latest version or not can be greatly reduced, and the problems that in the prior art, the server resource consumption is high and the efficiency is low in an upgrading method of some intelligent equipment connected with a host are solved.
2) The method comprises the steps of firstly selecting a target set code from a plurality of set codes and sending the target set code to the target server so that the target server can call corresponding second version data to be sent to the mobile terminal, wherein one target set code corresponds to one sub-device set, and the sub-device set comprises at least one intelligent device; then determining whether the sub-device set corresponding to the target set code is a target sub-device set with the device to be upgraded according to the second version data; and finally, under the condition that the sub-equipment set corresponding to the target set code is the target sub-equipment set, checking all intelligent equipment in the target sub-equipment set to determine equipment to be upgraded, and upgrading the firmware of the equipment to be upgraded. According to the method, whether the total equipment set comprises equipment to be upgraded or not is firstly judged, whether each sub equipment set comprises equipment to be upgraded or not is then respectively judged, finally, the equipment to be upgraded is determined, whether the firmware version of the full-quantity query equipment is the running workload of the latest version or not can be greatly reduced, and the problems that in the prior art, the server resource consumption is high and the efficiency is low in an upgrading method of some intelligent equipment connected with a host are solved.
3) The upgrade system of the device firmware of the application comprises: the mobile terminal is used for executing the method for upgrading the equipment firmware; the host is used for executing any one of the above updating methods of the device firmware; the target server is respectively connected with the mobile terminal and the host in a communication way; and the intelligent devices are respectively connected with the mobile terminal and the host in a communication way. The system can greatly reduce the operation workload of whether the firmware version of the full-quantity query device is the latest version by firstly judging whether the total device set comprises the device to be upgraded or not, then respectively judging whether each sub device set comprises the device to be upgraded or not and finally determining the device to be upgraded or not, and solves the problems of high resource consumption and low efficiency of a server in the upgrading method of some intelligent devices connected with a host in the prior art.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. An upgrade method of device firmware is characterized by being applied to a host in an upgrade system of device firmware, wherein the upgrade system of device firmware further comprises a target server and a plurality of intelligent devices, the host is respectively in communication connection with the target server and each intelligent device, and the method comprises the following steps:
Receiving first version data sent by the target server, and determining whether equipment to be upgraded exists in a total equipment set according to the first version data, wherein the total equipment set comprises all intelligent equipment;
Receiving a plurality of second version data sent by the target server under the condition that the equipment to be upgraded exists in the total equipment set, and determining a target sub-equipment set with the equipment to be upgraded from at least one sub-equipment set according to the second version data, wherein one sub-equipment set comprises at least one intelligent equipment;
And verifying all the intelligent devices in the target sub-device set to determine the device to be upgraded, and upgrading the firmware of the device to be upgraded.
2. The upgrade method of claim 1, wherein the first version data comprises a first latest version number and a first latest update time, the first latest version number being a latest version number characterizing the total device set, the first latest update time characterizing the update time of the first latest version number, and determining whether a device to be upgraded exists in the total device set according to the first version data comprises:
acquiring a first current version number and a first current update time, wherein the first current version number represents the version number of the total equipment set at the current time, and the first current update time represents the update time of the first current version number;
Comparing the magnitudes of the first latest version number and the first current version number and the magnitudes of the first latest update time and the first current update time;
And determining that the device to be upgraded exists in the total device set under the condition that the first latest version number is larger than the first current version number and the first latest update time is later than the first current update time.
3. The upgrade method of claim 1, wherein, in the case where it is determined that the device to be upgraded exists in the total device set, before receiving the plurality of second version data sent by the target server, the method further comprises:
Acquiring brands of the intelligent devices and communication protocol types of the intelligent devices;
Placing the intelligent devices with the same brands and the same communication protocol type in the same subset;
Setting set codes corresponding to the sub-device sets;
and sending each set code to the target server so that the target server invokes the corresponding second version data to send to the host, wherein the set codes are in one-to-one correspondence with the second version data.
4. The upgrade method of claim 1, wherein the second version data includes a second latest version number and a second latest update time, the second latest version number representing a latest version number of the corresponding subset of devices, the second latest update time representing an update time of the second latest version number, and determining, from at least one subset of devices according to each of the second version data, that a target subset of devices to be upgraded exists includes:
Acquiring a second current version number of the sub-device set and a second current update time of the sub-device set, wherein the second current version number represents the version number of the sub-device set at the current time, and the second current update time represents the update time of the second current version number;
comparing the magnitudes of the second latest version number and the second current version number and the magnitudes of the second latest update time and the second current update time;
and determining the corresponding sub-device set as the target sub-device set under the condition that the second latest version number is larger than the second current version number and the second latest update time is later than the second current update time.
5. The upgrade method of claim 1, wherein verifying all of the smart devices in the set of target sub-devices to determine the device to be upgraded comprises:
Obtaining a class number, a third current version number and a third current update time of each intelligent device in the target subset device set, wherein the third current version number is a version number of the intelligent device at a current time, the third current update time is an update time of the third current version number, the class number is an identification for uniquely characterizing the intelligent device, and one intelligent device corresponds to one third current version number and one third current update time;
Sending each class number in the target subset device set to the target server, so that the target server invokes a corresponding third latest version number of the intelligent device and a third latest update time, wherein the third latest version number represents the latest version number of the intelligent device, and the third latest update time represents the update time of the third latest version number;
comparing the magnitudes of the third latest version number and the third current version number and the magnitudes of the third latest update time and the third current update time;
And determining that the corresponding intelligent device is the device to be upgraded under the condition that the third latest version number is larger than the third current version number and the third latest update time is later than the third current update time.
6. The upgrade method according to claim 1, further comprising:
acquiring a preset interval duration;
And starting to receive the first version data sent by the target server every other preset interval duration.
7. The method for upgrading according to claim 1, wherein the plurality of devices to be upgraded are connected in communication, and the firmware of the devices to be upgraded is upgraded, including:
acquiring a firmware upgrading data packet of each device to be upgraded from the target server;
and respectively sending each firmware upgrading data packet to the corresponding equipment to be upgraded so as to upgrade the firmware of the equipment to be upgraded.
8. The method for upgrading the equipment firmware is characterized by being applied to a mobile terminal in an equipment firmware upgrading system, wherein the equipment firmware upgrading system further comprises a target server and a plurality of intelligent devices, and the mobile terminal is respectively in communication connection with the target server and each intelligent device, and the method comprises the following steps:
Selecting a target set code from a plurality of set codes, and sending the target set code to the target server, so that the target server invokes corresponding second version data to send to the mobile terminal, wherein one target set code corresponds to one sub-device set, and one sub-device set comprises at least one intelligent device;
determining whether the sub-device set corresponding to the target set code is a target sub-device set with equipment to be upgraded according to the second version data;
And under the condition that the sub-equipment set corresponding to the target set code is the target sub-equipment set, checking all intelligent equipment in the target sub-equipment set to determine the equipment to be upgraded, and upgrading the firmware of the equipment to be upgraded.
9. An upgrade system for device firmware, said upgrade system comprising:
A mobile terminal for performing the method for upgrading device firmware of claim 8;
A host for executing the method of upgrading device firmware according to any one of claims 1 to 7;
the target server is respectively in communication connection with the mobile terminal and the host;
And the intelligent devices are respectively in communication connection with the mobile terminal and the host.
10. An electronic device, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising an upgrade method for performing the device firmware of any of claims 1-8.
CN202311781419.0A 2023-12-21 2023-12-21 Device firmware upgrading method, device firmware upgrading system and electronic device Pending CN117971257A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311781419.0A CN117971257A (en) 2023-12-21 2023-12-21 Device firmware upgrading method, device firmware upgrading system and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311781419.0A CN117971257A (en) 2023-12-21 2023-12-21 Device firmware upgrading method, device firmware upgrading system and electronic device

Publications (1)

Publication Number Publication Date
CN117971257A true CN117971257A (en) 2024-05-03

Family

ID=90852378

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311781419.0A Pending CN117971257A (en) 2023-12-21 2023-12-21 Device firmware upgrading method, device firmware upgrading system and electronic device

Country Status (1)

Country Link
CN (1) CN117971257A (en)

Similar Documents

Publication Publication Date Title
CN109151805B (en) eSIM card configuration method and system based on Internet of things
US11140543B1 (en) Embedded subscriber identity module (eSIM) profile adaptation based on context
CN112764797B (en) Software compatibility detection method and device, electronic device and storage medium
CN101917706A (en) Processing method and device for upgrading FOTA (Firmware Over the Air)
CN110543324B (en) Plug-in increment updating method and device for application program
CN108681504A (en) Automated testing method, test server and computer readable storage medium
CN113672441B (en) Method and device for testing intelligent equipment
CN106339273A (en) Application program restoration method, terminal and server
KR20190061060A (en) Profile-based content and services
CN113434293A (en) Method and apparatus for processing repeat request, storage medium, and electronic apparatus
CN110888658A (en) Dynamic method and device for functional module in application program and storage medium
CN104360858A (en) Method and device for calculating hotness of application
CN103686821A (en) Control method for application program traffic statistics according to unique identification of mobile terminal
CN111190625A (en) APP version upgrading method, server, client and computer readable storage medium
CN110990381B (en) Processing method and device of server, storage medium and electronic device
CN104703206A (en) Network protocol performance test bed system for wireless sensor network and testing method
CN117971257A (en) Device firmware upgrading method, device firmware upgrading system and electronic device
CN115335803A (en) Equipment upgrading method, intelligent equipment and computer readable storage medium
CN112532664A (en) Data upgrading method and device
CN111372224A (en) Method, device and equipment for sharing seed code number by eSIM (embedded subscriber identity Module)
CN108647139B (en) System test method, device, storage medium and electronic device
US20220078701A1 (en) Communication device, server, control method, and communication system
CN113992739B (en) Local area network OTA firmware upgrading device, method and system
CN111427603B (en) Application program upgrading method and device
CN112436974B (en) CDN data resource consistency detection method and device and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination