CN112865990B - File upgrading method, system and device - Google Patents

File upgrading method, system and device Download PDF

Info

Publication number
CN112865990B
CN112865990B CN201911175644.3A CN201911175644A CN112865990B CN 112865990 B CN112865990 B CN 112865990B CN 201911175644 A CN201911175644 A CN 201911175644A CN 112865990 B CN112865990 B CN 112865990B
Authority
CN
China
Prior art keywords
channel
upgrade
file
rate
gateway
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.)
Active
Application number
CN201911175644.3A
Other languages
Chinese (zh)
Other versions
CN112865990A (en
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.)
Hangzhou Ezviz Software Co Ltd
Original Assignee
Hangzhou Ezviz Software 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 Hangzhou Ezviz Software Co Ltd filed Critical Hangzhou Ezviz Software Co Ltd
Priority to CN201911175644.3A priority Critical patent/CN112865990B/en
Publication of CN112865990A publication Critical patent/CN112865990A/en
Application granted granted Critical
Publication of CN112865990B publication Critical patent/CN112865990B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0002Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/0091Signaling for the administration of the divided path
    • H04L5/0094Indication of how sub-channels of the path are allocated
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/69Spread spectrum techniques
    • H04B1/713Spread spectrum techniques using frequency hopping
    • H04B1/7136Arrangements for generation of hop frequencies, e.g. using a bank of frequency sources, using continuous tuning or using a transform

Abstract

The application provides a file upgrading method, a system and a device, which are applied to gateway equipment, wherein the method comprises the following steps: after receiving the upgrade task, negotiating a second channel which is available and is currently in an idle state with other gateway equipment; all terminal devices connected with the gateway device are controlled to switch the working channel from the current first channel to the second channel, and the working rate is switched from the current first rate to the second rate; and determining target terminal equipment to be subjected to file upgrading from all terminal equipment connected with the gateway equipment, and sending an upgrading instruction to the target terminal equipment under the second channel so that the target terminal equipment receiving the upgrading instruction can execute file upgrading according to the upgrading instruction. The method can realize batch upgrading of the terminal equipment and effectively avoid the phenomenon of signal interference.

Description

File upgrading method, system and device
Technical Field
The present disclosure relates to the field of wireless communications technologies, and in particular, to a method, a system, and an apparatus for upgrading a file.
Background
Currently, various terminal devices are widely used in various industries for convenience, safety, creativity, interactivity, and other advantages. With the continuous development and progress of technology, terminal devices are also subject to upgrades, such as system upgrades, in order to better serve users.
Taking the intelligent lock as an example, in some industry projects, such as community construction, office building construction and the like, the intelligent lock is in batch. If the intelligent locks existing in batches are upgraded one by one in the prior art, a great deal of labor cost and time cost are definitely consumed.
Disclosure of Invention
In view of this, the present application provides a method, a system and a device for upgrading files, so as to solve the problem that in the prior art, upgrading terminal devices existing in batches in a way of upgrading one by one will consume a great deal of labor cost and time cost.
According to a first aspect of embodiments of the present application, there is provided a method for upgrading a file, where the method is applied to a gateway device, and includes:
after receiving the upgrade task, negotiating a second channel which is available and is currently in an idle state with other gateway equipment;
all terminal devices connected with the gateway device are controlled to switch the working channel from the current first channel to the second channel, and the working rate is switched from the current first rate to the second rate;
and determining target terminal equipment to be subjected to file upgrading from all terminal equipment connected with the gateway equipment, and sending an upgrading instruction to the target terminal equipment under the second channel so that the target terminal equipment receiving the upgrading instruction can execute file upgrading according to the upgrading instruction.
According to a second aspect of embodiments of the present application, there is provided a file upgrading method, applied to a terminal device, the method including:
switching the working channel of the terminal equipment from the current first channel to the second channel according to the control of the gateway equipment, and switching the working rate from the current first rate to the second rate;
receiving an upgrade instruction sent by the gateway equipment under the second channel;
and executing file upgrading according to the upgrading instruction.
According to a third aspect of embodiments of the present application, there is provided a file upgrade system, the system comprising: gateway equipment and terminal equipment connected with the gateway equipment;
the gateway equipment is used for negotiating a second channel which is available and is currently in an idle state with other gateway equipment after receiving the upgrading task; all terminal devices connected with the gateway device are controlled to switch the working channel from the current first channel to the second channel, and the working rate is switched from the current first rate to the second rate; determining target terminal equipment to be subjected to file upgrading from all terminal equipment connected with the gateway equipment, and sending an upgrading instruction to the target terminal equipment under the second channel so that the target terminal equipment receiving the upgrading instruction can execute file upgrading according to the upgrading instruction;
The terminal equipment is used for switching the working channel of the terminal equipment from the current first channel to the second channel and switching the working rate from the current first rate to the second rate according to the control of the gateway equipment; receiving an upgrade instruction sent by the gateway equipment under the second channel; and executing file upgrading according to the upgrading instruction.
According to a fourth aspect of embodiments of the present application, there is provided a file upgrading apparatus, where the apparatus is applied to a gateway device, including:
the channel negotiation module is used for negotiating a second channel which is available and is currently in an idle state with other gateway equipment after receiving the upgrading task;
the channel control module is used for controlling all terminal equipment connected with the gateway equipment to switch the working channel from the current first channel to the second channel and switch the working rate from the current first rate to the second rate;
and the upgrade control module is used for determining target terminal equipment to be subjected to file upgrade from all terminal equipment connected with the gateway equipment, and sending an upgrade instruction to the target terminal equipment under the second channel so that the target terminal equipment receiving the upgrade instruction can execute file upgrade according to the upgrade instruction.
According to a fifth aspect of embodiments of the present application, there is provided a file upgrading apparatus, where the apparatus is applied to a terminal device, including:
the channel switching module is used for switching the working channel of the terminal equipment from the current first channel to the second channel and switching the working rate from the current first rate to the second rate according to the control of the gateway equipment;
the instruction receiving module is used for receiving the upgrade instruction sent by the gateway equipment under the second channel;
and the file upgrading module is used for executing file upgrading according to the upgrading instruction.
According to a sixth aspect of embodiments of the present application, there is provided an electronic device comprising a readable storage medium and a processor;
wherein the readable storage medium is for storing machine executable instructions;
the processor is configured to read the machine executable instructions on the readable storage medium and execute the instructions to implement the steps of the file upgrade method provided in any embodiment of the present application.
By applying the embodiment of the application, after receiving the upgrade task, the gateway device negotiates with other gateway devices a second channel which is available and is currently in an idle state, controls all the gateway devices connected with the gateway device to switch the working channel from a current first channel to the second channel, switches the working rate from the current first rate to a second rate, determines the target terminal device to be subjected to file upgrade from all the terminal devices connected with the gateway device, and sends an upgrade instruction to the target terminal device under the second channel, so that the target terminal device receiving the upgrade instruction executes file upgrade according to the upgrade instruction, batch upgrade of the terminal devices can be realized, and because the second channel which is available and is currently in the idle state is negotiated with other gateway devices in advance, different gateway devices can correspond to different second channels, and further, the different gateway devices control the terminal devices connected with the gateway devices respectively to execute file upgrade through the different second channels, thereby effectively avoiding the phenomenon of signal interference.
Drawings
FIG. 1 is a schematic diagram of a networking architecture for implementing a file upgrade method as proposed in the present application;
FIG. 2 is a schematic diagram of an upgrade file batch selection interface;
FIG. 3 is a flowchart of an embodiment of a method for upgrading a file according to an exemplary embodiment of the present application;
FIG. 4 is a flowchart illustrating an implementation of step 301 according to an exemplary embodiment of the present application;
FIG. 5 is a flowchart illustrating an implementation of step 302 according to an exemplary embodiment of the present application;
FIG. 6 is a flowchart of an implementation after step 501 provided in an exemplary embodiment of the present application;
FIG. 7 is a flowchart of an implementation of step 303 provided in an exemplary embodiment of the present application;
FIG. 8 is a flowchart of an implementation of step 303 provided in an exemplary embodiment of the present application;
FIG. 9 is a flowchart of an implementation after step 802 provided in an exemplary embodiment of the present application;
FIG. 10 is a flowchart of an embodiment of a method for upgrading a file according to another exemplary embodiment of the present application;
FIG. 11 is a flowchart illustrating an implementation process before step 1002 according to an exemplary embodiment of the present application;
FIG. 12 is a flowchart illustrating an implementation of step 1003 according to an exemplary embodiment of the present application;
FIG. 13 is a block diagram of an embodiment of a file upgrade apparatus according to an exemplary embodiment of the present application;
FIG. 14 is a block diagram of an embodiment of a file upgrade apparatus according to an exemplary embodiment of the present application;
FIG. 15 is a block diagram of an embodiment of a file upgrade system according to an exemplary embodiment of the present application;
fig. 16 is a hardware configuration diagram of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
For ease of understanding, a networking architecture implementing the document upgrading method set forth in the present application will be described first.
As shown in fig. 1, the networking architecture includes an upgrade management server 110, a gateway device 120, a gateway device 130, and terminal devices 140 to 160.
As an example, in the networking architecture illustrated in fig. 1, the upgrade management server 110 is communicatively connected to the gateway device 120 and the gateway device 130 based on ethernet. The gateway device 120 and the gateway device 130 are communicatively coupled based on ethernet or radio frequency technology. The gateway device 120 and the terminal devices 140 to 160 are communicatively connected based on radio frequency technology.
It should be noted that, in fig. 1, only two gateway devices are taken as an example, in practical application, the networking architecture may include multiple gateway devices, and the number of gateway devices that the upgrade management server 110 may be connected to is not limited in this application.
Accordingly, in fig. 1, only one gateway device is connected to 3 terminal devices as an example, and in practical application, the number of connectable terminal devices may be set according to the bearing capacity of the gateway device, which is not limited in this application. Meanwhile, the terminal device in fig. 1 only takes the smart lock as an example, and in practical application, the terminal device may also be other devices, for example, a smart television, a smart phone, etc., which is not limited in this application.
Based on the networking architecture illustrated in FIG. 1, upgrade management server 110 may initiate an installed batch upgrade tool (not shown in FIG. 1) based on user operations. After the batch upgrade tool is started, all online gateway devices under the whole networking framework are scanned, and the scanned gateway devices are provided for users.
The user may select at least one gateway device from all gateway devices provided by the upgrade management server 110 as a gateway device involved in the current file upgrade process. As one example, the batch upgrade tool may present the spatial location of the gateway device, e.g., 3 1 units, to the user when providing the scanned gateway device to the user. Through the processing, the user can intuitively select the gateway equipment involved in the current file upgrading process.
Thereafter, the upgrade management server 110 may further provide the user with an upgrade file batch selection interface illustrated in fig. 2, so that the user may select an upgrade file involved in the current upgrade process from upgrade files included in the interface.
Finally, after detecting that the upgrade button in the interface is triggered, the upgrade management server 110 may issue an upgrade task to the gateway device involved in the current file upgrade process. After receiving the upgrade task, the gateway device can execute the file upgrade method provided by the application to control the connected terminal device to upgrade the file.
The file upgrading method provided by the application is described in detail below from the gateway device side and the terminal device side respectively:
first, a method for upgrading a file proposed in the present application is described from a gateway device side:
referring to fig. 3, a flowchart of an embodiment of a method for upgrading a file according to an exemplary embodiment of the present application is provided, and in one example, the method may be applied to a gateway device, such as the gateway device 120 or 130 illustrated in fig. 1.
As shown in fig. 3, the method comprises the following steps:
step 301: after receiving the upgrade task, the gateway device negotiates with other gateway devices a second channel that is available and is currently in an idle state.
In the application, the upgrade management server 110 may issue an upgrade task to the gateway device connected thereto, and after receiving the upgrade task, the gateway device may control the terminal device connected thereto to perform file upgrade.
In this embodiment of the present application, taking a gateway device as an example, after receiving an upgrade task, the gateway device may first negotiate a channel (hereinafter referred to as a second channel) with other gateway devices, where the second channel meets the following conditions: available and currently in an idle state.
Since the second channel is available and currently in an idle state, different gateway devices correspond to different second channels. As to how the gateway device negotiates the second channel with other gateway devices, the following is shown by way of example, and is not repeated here.
Step 302: the gateway equipment controls all terminal equipment connected with the gateway equipment to switch the working channel from the current first channel to the second channel, and switches the working rate from the current first rate to the second rate.
In this embodiment of the present application, after step 301 is performed and a second channel is negotiated with another gateway device, the gateway device may control all terminal devices connected to the gateway device to switch a working channel from a current channel (hereinafter referred to as a first channel) to the second channel, and switch a working rate from a current rate (hereinafter referred to as a first rate) to a rate corresponding to the second channel (hereinafter referred to as a second rate).
By doing so, it is possible to realize that the gateway apparatus communicates with the terminal apparatus to which it is connected based on the second channel. As to how the gateway device controls all terminal devices connected to the gateway device to switch the working channel from the current first channel to the second channel and switch the working rate from the current first rate to the second rate, it is shown by way of example hereinafter and will not be described in detail herein.
Step 303: the gateway equipment determines target terminal equipment to be subjected to file upgrading from all terminal equipment connected with the gateway equipment, and sends an upgrading instruction to the target terminal equipment under a second channel so that the target terminal equipment receiving the upgrading instruction can execute file upgrading according to the upgrading instruction.
In an application, since not all terminal devices connected to the gateway device are currently in a upgradeable state, for example, in a case where the terminal device fails or the terminal device has been upgraded before, the terminal device is in a non-upgradeable state.
Based on this, in step 303, the gateway device may determine a terminal device to be subjected to file upgrade (hereinafter referred to as a target terminal device) from all the connected terminal devices, and then send an upgrade instruction to the target terminal device under the second channel, so that the target terminal device that receives the upgrade instruction performs file upgrade according to the upgrade instruction.
As to how the gateway device determines the target terminal device to perform the file upgrade from all the connected terminal devices, and how the gateway device sends the upgrade instruction to the target terminal device under the second channel, it is described in the following by different embodiments, and the description is omitted herein.
Thus, the description of the flow shown in fig. 3 is completed.
According to the embodiment, after receiving the upgrade task, the gateway device negotiates with other gateway devices a second channel which is available and is currently in an idle state, controls all the gateway devices connected with the gateway device to switch the working channel from a current first channel to the second channel, switches the working rate from the current first rate to the second rate, determines the target terminal device to be subjected to file upgrade from all the terminal devices connected with the gateway device, and sends an upgrade instruction to the target terminal device under the second channel, so that the target terminal device receiving the upgrade instruction executes file upgrade according to the upgrade instruction, batch upgrade of the terminal devices can be realized, and because the second channel which is available and is currently in an idle state is negotiated with other gateway devices in advance, different gateway devices can be correspondingly different second channels, further, the different gateway devices can control the terminal devices connected with the gateway devices respectively to execute file upgrade through the different second channels, and therefore the phenomenon of signal interference can be effectively avoided.
How the gateway device negotiates the above-mentioned second channel with other gateway devices is described below by means of the embodiment shown in fig. 4.
Referring to fig. 4, a process for implementing step 301 according to an exemplary embodiment of the present application includes the following steps:
step 401: the gateway device selects one of the candidate channels as a target channel.
In the embodiment of the present application, the candidate channel is other channels than the first channel that is currently operating.
As one example, the gateway device may randomly select one channel among the candidate channels as the target channel.
As an example, the gateway apparatus may select a channel that has not been selected before as the target channel in the order of the set candidate channels, starting from the candidate channel that is ranked first.
It should be noted that the foregoing is merely an exemplary description of selecting, by the gateway device, one channel from the candidate channels as the target channel, and in practical application, the gateway device may also select, by other means, one channel from the candidate channels as the target channel, which is not limited in this application.
Step 402: the gateway device sends a broadcast message under the target channel, wherein the broadcast message carries the identification of the target channel so as to instruct other gateway devices to judge whether the current working channel is the target channel.
As an example, the gateway device may send a broadcast message on the target channel selected in step 401, and the other gateway devices may receive the broadcast message on the target channel.
As an example, the broadcast message may carry an identification of the target channel. After receiving the broadcast message, the other gateway device can determine whether the current working channel is the target channel according to the identification of the target channel.
Step 403: receiving a judgment result sent by other gateway equipment, and executing step 404 if the judgment result indicates that the current working channel of the other gateway equipment is not a target channel; otherwise, go back to step 401.
Step 404: the target channel is determined to be the second channel.
The following collectively describes steps 403 and 404:
in the application, after judging whether the current working channel is the target channel according to the identification of the target channel, other gateway devices can send the judging result to the gateway device. As one example, the other gateway device may send the determination result under the target channel, so that the present gateway device may receive the determination result under the target channel.
If the judging result indicates that the current working channel of the other gateway equipment is not the target channel, the gateway equipment can consider that the target channel is in an idle state currently, and the gateway equipment sends a broadcast message under the target channel and receives the judging result under the target channel, so that the target channel is available. It can be seen that the target channel selected in step 401 satisfies the above condition: available and currently in an idle state, so that in step 404 the target channel may be determined to be the second channel.
Otherwise, if the judging result indicates that the current working channel of the other gateway device is the target channel, it may be determined that the target channel selected in step 401 does not meet the above condition, and at this time, the gateway device may return to execute step 401 to implement negotiation with the other gateway device to obtain a second channel.
Thus, the description of the flow shown in fig. 4 is completed.
Through the flow shown in fig. 4, it is finally realized that the gateway device negotiates a second channel with other gateway devices, and because the second channel is available and is currently in an idle state, different gateway devices correspond to different second channels, and further, different gateway devices control respective connected terminal devices to perform file upgrading through different second channels, so that the phenomenon of signal interference can be effectively avoided.
The following describes how the gateway device controls the gateway device and all terminal devices connected to the gateway device to switch the working channel from the current first channel to the second channel and switch the working rate from the current first rate to the second rate by means of the embodiment shown in fig. 5.
Referring to fig. 5, a process for implementing step 302 according to an exemplary embodiment of the present application includes the following steps:
Step 501: and the gateway equipment sends a frequency hopping command to all terminal equipment connected with the gateway equipment under a first channel.
In this embodiment of the present application, the gateway device may send, to all connected terminal devices on the first channel that is currently operating, a frequency hopping command that carries at least the channel identifier (hereinafter referred to as the second channel identifier) and the second rate of the second channel negotiated in step 301.
After receiving the frequency hopping command, the terminal device can reinitialize the built-in radio frequency small plate so as to switch the working channel from the current first channel to the second channel and switch the working rate from the current first rate to the second rate.
Step 502: the gateway device switches the working channel from the current first channel to the second channel and switches the working rate from the current first rate to the second rate.
Thus, the description of the flow shown in fig. 5 is completed.
Through the flow shown in fig. 5, it is finally realized that the gateway device controls all the gateway devices and all the terminal devices connected with the gateway device to switch the working channel from the current first channel to the second channel, and switches the working rate from the current first rate to the second rate, so as to prepare for the subsequent gateway device to control the terminal device to execute file upgrading through the second channel.
In addition, on the basis of the flow shown in fig. 5, after the above step 501 is performed, the flow shown in fig. 6 may also be performed:
referring to fig. 6, a implementation flow after step 501 provided in an exemplary embodiment of the present application includes the following steps:
step 601: the gateway equipment detects whether a frequency hopping response returned by the terminal equipment is received in a first set time after a frequency hopping command is sent to the terminal equipment aiming at each connected terminal equipment.
Step 602: if not, when the frequency hopping command sending times are smaller than the preset value, the gateway equipment sends the frequency hopping command to the terminal equipment again under the first channel, the frequency hopping command carries a second channel identifier and a second rate, so that the terminal equipment receiving the frequency hopping command switches the working channel from the first channel to the second channel corresponding to the second channel identifier, and switches the working rate from the current first rate to the second rate.
The following collectively describes steps 601 and 602:
as an example, after receiving the frequency hopping command and successfully switching the working channel from the current first channel to the second channel according to the frequency hopping command and switching the working rate from the current first rate to the second rate, the terminal device may return a frequency hopping response to the gateway device under the first channel or the second channel.
The gateway device may then detect whether a frequency hopping response returned by the terminal device has been received within a first set time, e.g. 3 seconds. If no frequency hopping response is received, the gateway device may continue to compare the frequency hopping command transmission number with a preset value, for example, 3 times. When the frequency hopping command sending times are smaller than the preset value, the gateway device can send the same frequency hopping command to the terminal device again under the first channel, so that the terminal device receiving the frequency hopping command switches the working channel from the first channel to a second channel corresponding to the second channel identifier, and switches the working rate from the current first rate to the second rate.
Thus, the description of the flow shown in fig. 6 is completed.
By the flow shown in fig. 6, when the frequency hopping response returned by the terminal device is not received, the frequency hopping command is repeatedly sent to the terminal device for a plurality of times, so that the success rate of switching the working channel from the current first channel to the second channel and switching the working rate from the current first rate to the second rate by the terminal device can be improved.
In addition, as an example, after receiving the frequency hopping response returned by the terminal device within the first set time, the gateway device may send the frequency hopping command to the terminal device again under the second channel, after receiving the frequency hopping command, the terminal device may return the frequency hopping response to the terminal device under the second channel, and after receiving the frequency hopping response, the gateway device may confirm that the terminal device has completed switching between the working channel and the working rate.
The gateway device will now be described by way of an embodiment shown in fig. 7, how it determines a target terminal device from all terminal devices connected to it, for which a file upgrade is to be performed.
Referring to fig. 7, a process for implementing step 303 according to an exemplary embodiment of the present application includes the following steps:
step 701: and the gateway equipment sends an upgrade starting instruction to all connected terminal equipment under the second channel so that the terminal equipment receiving the upgrade starting instruction determines whether to upgrade according to the upgrade starting instruction.
Step 702: the gateway device receives an upgrade response message on the second channel, where the upgrade response message is used to indicate that an upgrade needs to be performed.
Step 703: the gateway device determines the terminal device sending the upgrade response message as the target terminal device for executing the file upgrade.
The following collectively describes steps 701 to 703:
since the gateway device has switched the working channel from the current first channel to the second channel after performing step 302, the gateway device may send an upgrade initiation instruction to all terminal devices connected under the second channel in step 701. After receiving the upgrade starting instruction, the terminal equipment can determine whether to upgrade according to the upgrade starting instruction, and after determining to upgrade, returns an upgrade response message for indicating that the upgrade needs to be executed to the gateway equipment. The gateway device may then determine the terminal device sending the upgrade response message as the target terminal device for performing the file upgrade.
As to how the terminal device determines whether to upgrade according to the upgrade initiation instruction, the following is illustrated by way of example, and is not repeated here.
Thus, the description of the flow shown in fig. 7 is completed.
By the flow shown in fig. 7, the gateway device determines the target terminal device to be subjected to file upgrade from all the connected terminal devices. Because the target terminal equipment is the terminal equipment which needs to execute the file upgrading, the success rate of the terminal equipment for executing the file upgrading can be improved.
The following describes how the gateway device sends an upgrade instruction to the target terminal device on the second channel by means of the embodiment shown in fig. 8:
referring to fig. 8, a process for implementing step 303 according to an exemplary embodiment of the present application includes the following steps:
step 801: the gateway device sends a first message carrying an upgrade file under a second channel.
As an example, the gateway device may first compare the size of the upgrade file with the set threshold, and if the comparison results in the size of the upgrade file being greater than the set threshold, the upgrade file may be divided into a plurality of upgrade packages, and the first message carrying the upgrade packages may be sequentially transmitted under the second channel. Through the processing, the phenomenon of file damage or file packet loss caused by oversized file sent at a time can be avoided.
As one example, the data size of each upgrade package does not exceed a set threshold.
Step 802: after the gateway device sends the first message carrying the upgrade file, the gateway device sends a second message under a second channel, where the second message is used to indicate that the upgrade file has been sent, so that the target terminal device that receives the second message performs file upgrade according to the upgrade file.
As one example, after sending the upgrade file, the gateway device may send a second message on a second channel indicating that the file upgrade has been sent. After receiving the second message, the target terminal device can start to execute file upgrading according to the upgrading file.
As to how the target terminal device performs the file upgrade according to the upgrade file, the following is illustrated by way of example, and will not be described in detail here.
Thus, the description of the flow shown in fig. 8 is completed.
Through the flow shown in fig. 8, it is finally achieved that the gateway device sends the upgrade instruction to the target terminal device under the second channel.
In addition, on the basis of the flow shown in fig. 8, after the step 802 is performed, the flow shown in fig. 9 may also be performed:
referring to fig. 9, a implementation flow after step 802 provided in an exemplary embodiment of the present application includes the following steps:
Step 901: and the gateway equipment sends an upgrade ending instruction to the target terminal equipment within a second set time after the second message is sent, so that the target terminal equipment which receives the upgrade ending instruction returns an upgrade result.
Step 902: and the gateway equipment receives an upgrade result returned by the target terminal equipment, and if the upgrade result indicates that the upgrade fails, the gateway equipment retransmits the upgrade file when the transmission times of the upgrade file are smaller than the set times, so that the target terminal equipment which fails to be upgraded is successfully upgraded.
The following collectively describes steps 901 and 902:
as an example, the gateway device may send an upgrade end instruction to the target terminal device after performing step 802. After receiving the upgrade ending instruction, the terminal equipment can return an upgrade result to the target terminal equipment. The upgrade result may be an upgrade result for indicating that the upgrade was successful, or an upgrade result for indicating that the upgrade failed to the user.
As an example, when the upgrade result is used to indicate upgrade failure, the upgrade result may also carry reasons for upgrade failure, such as lower upgrade file version, damaged upgrade file, missing upgrade file, etc.
As an embodiment, when the upgrade result is used to indicate upgrade failure, after receiving the upgrade result, the gateway device may further compare the number of times of sending the upgrade file with the set number of times, for example, 5 times, and when the number of times of sending the upgrade file is compared to be smaller than the set number of times, send the upgrade file to the target terminal device again under the second channel, so that the target terminal device with upgrade failure is successfully upgraded.
Thus, the description of the flow shown in fig. 9 is completed.
By the embodiment shown in fig. 9, since the upgrade file is repeatedly sent to the terminal device multiple times when the upgrade of the terminal device fails, the upgrade success rate of the terminal device can be improved.
So far, the related description of the file upgrading method provided by the application from the gateway equipment side is completed.
Secondly, the file upgrading method provided by the application is explained from the terminal equipment side:
referring to fig. 10, a flowchart of an embodiment of a method for upgrading a file according to another exemplary embodiment of the present application is provided, and in one example, the method may be applied to a terminal device, such as the terminal devices 140 to 160 illustrated in fig. 1.
As shown in fig. 10, the method comprises the following steps:
step 1001: the terminal equipment switches the working channel of the terminal equipment from the current first channel to the second channel according to the control of the gateway equipment, and switches the working rate from the current first rate to the second rate.
Based on the above embodiment of the gateway device side, the terminal device may switch the working channel from the current first channel to the second channel and switch the working rate from the current first rate to the second rate according to the control of the gateway device.
As one example, the terminal device may receive a frequency hopping command sent by the gateway device under the first channel, the frequency hopping command carrying a second channel identification and a second rate of the second channel. Based on the above, the terminal device can switch the working channel from the current first channel to the second channel corresponding to the second channel identifier according to the frequency hopping command, and switch the working rate from the current first rate to the second rate.
Step 1002: and the terminal equipment receives the upgrade instruction sent by the gateway equipment under the second channel. Step 1003: and the terminal equipment performs file upgrading according to the upgrading instruction.
Based on the above embodiment of the gateway device side, it can be seen that the upgrade instruction sent by the gateway device to the terminal device may carry an upgrade file. After receiving the upgrade instruction, the terminal device can execute file upgrade. As to how the terminal device performs file upgrade according to the upgrade instruction, the following is illustrated by way of example, and is not repeated here.
Thus, the description of the flow shown in fig. 10 is completed.
According to the embodiment, the terminal equipment switches the working channel from the current first channel to the second channel according to the control of the gateway equipment, switches the working rate from the current first rate to the second rate, then receives the upgrade instruction sent by the gateway equipment under the second channel, and performs file upgrade according to the upgrade instruction, so that batch upgrade of the terminal equipment can be realized, and different gateway equipment controls the terminal equipment connected with each other to perform file upgrade through different second channels, so that the phenomenon of signal interference can be effectively avoided.
In an embodiment, the terminal device may also perform the flow shown in fig. 11 before performing step 1002.
Referring to fig. 11, a implementation flow before step 1002 provided in an exemplary embodiment of the present application includes the following steps:
step 1101: and the terminal equipment receives the upgrade starting instruction sent by the gateway equipment under the second channel.
Based on the above embodiment of the gateway device side, the gateway device may first send an upgrade start instruction to all connected terminal devices on the second channel, so that the terminal device may receive the upgrade start instruction sent by the gateway device on the second channel.
As an example, the upgrade start instruction carries at least version information of an upgrade file (hereinafter referred to as first version information).
As one example, the upgrade initiation instruction also carries a file check parameter, such as a CRC check value, of the upgrade file.
As for the specific function of the upgrade initiation instruction carrying the file verification parameter, the following embodiments will be described in detail, which is omitted herein.
Step 1102: the terminal equipment compares the second version information and the first version information of the current program operation, and if the second version information is higher than or equal to the first version information, step 1104 is executed; if the second version information is lower than the first version information, step 1103 is executed.
Step 1103: and the terminal equipment compares the cached third version information with the first version information, and if the third version information is the same as the first version information, an upgrade response message is sent under a second channel to inform the gateway equipment that the terminal equipment needs to execute upgrade.
Step 1104: the terminal device determines that no upgrade is required.
The following collectively describes steps 1102 to 1104:
as an example, the terminal device may first compare version information of the current program operation (hereinafter referred to as second version information) with the first version information, and if the second version information is compared to be higher than or equal to the first version information, that is, the version of the current program operation is higher, the terminal device may determine that no upgrade is required.
Otherwise, if the second version information is not higher than the first version information, as an example, the terminal device may further check whether the upgrade file is cached, if so, the cached version information (hereinafter referred to as third version information) is compared with the first version information, and if the third version information is the same as the first version information, that is, the cached version is the same as the version of the upgrade, the reason for this may be that: an exception occurs during the last upgrade resulting in an upgrade suspension. At this time, the terminal device may transmit an upgrade response message under the second channel to inform the gateway device that the upgrade needs to be performed.
In addition, if the terminal device compares the third version information with the first version information, the terminal device may delete the cached upgrade file.
So far, the description of the flow shown in fig. 11 is completed.
Through the flow shown in fig. 11, it can be realized that the target terminal device for the current file upgrade to be executed is selected from all the terminal devices connected with the gateway device.
How the terminal device performs file upgrade according to the upgrade instruction is described below by way of an embodiment shown in fig. 12.
Referring to fig. 12, a process for implementing step 1003 according to an exemplary embodiment of the present application includes the following steps:
Step 1201: the terminal equipment detects whether the received upgrade file and file verification parameters meet the consistency requirement; if not, executing step 1205; if so, step 1202 is performed.
As can be seen from the above description, the upgrade start instruction also carries the file verification parameters of the upgrade file. Based on this, the terminal device may detect whether the received upgrade file and the file verification parameter meet the consistency requirement, if so, execute step 1202, and if not, consider that the received upgrade file is damaged, execute step 1205.
Step 1202: the terminal equipment detects whether a missing file exists in the received upgrade file, if not, the step 1203 is executed; if so, step 1204 is performed.
Based on the above embodiment of the gateway device side, the gateway device may divide the upgrade file into a plurality of upgrade packages and sequentially transmit the upgrade packages to the terminal device. Based on the above, the terminal device can detect whether the packet sequence numbers of the received upgrade packets are continuous, and if the packet sequence numbers are detected to be continuous, it can be determined that the received upgrade files have no missing files; if a discontinuity in the packet sequence number is detected, it may be determined that there is a missing file in the received upgrade file, and step 1204 is performed.
As an example, the missing file is an upgrade package corresponding to a package number of the discarded upgrade package.
As an example, the missing file may also be an upgrade package that is lost during the transfer.
Step 1203: and the terminal equipment performs file upgrading according to the received upgrading file.
Step 1204: the terminal equipment requests the gateway equipment to resend the missing file until the missing file in the upgrade file is received, and the file is upgraded according to the received upgrade file; ending the flow.
As an example, the terminal device may request the gateway device to resend the missing file according to the packet sequence number of the recorded missing file, and after receiving the packet sequence number of the missing file, the terminal device may resend the upgrade packet with the packet sequence number.
Step 1205: the upgrade file is discarded.
As an example, if the terminal device receives an upgrade packet divided from the upgrade file, the terminal device may further record the packet number of the discarded upgrade packet, so that the terminal device may request the gateway device to resend the missing file in step 1204.
Thus, the description of the flow shown in fig. 12 is completed.
Through the flow shown in fig. 12, the terminal device performs file upgrade according to the upgrade instruction.
Corresponding to the embodiment of the file upgrading method, the application also provides an embodiment of the file upgrading device.
The file upgrading device provided by the application is described in detail below from the gateway device side and the terminal device side respectively:
first, the file upgrading device proposed in the present application is described from the gateway device side:
referring to fig. 13, a block diagram of an embodiment of a file upgrading apparatus according to an exemplary embodiment of the present application is provided, and in one example, the apparatus may be applied to a gateway device, such as the gateway device 120 or 130 illustrated in fig. 1.
As shown in fig. 13, the apparatus includes: a channel negotiation module 1301, a channel control module 1302, and an upgrade control module 1303.
The channel negotiation module 1301 is configured to negotiate with other gateway devices to obtain a second channel that is available and is currently in an idle state after receiving the upgrade task;
a channel control module 1302, configured to control all terminal devices connected to the gateway device and the gateway device to switch a working channel from a current first channel to the second channel, and switch a working rate from a current first rate to a second rate;
And the upgrade control module 1303 is configured to determine a target terminal device to be subjected to file upgrade from all terminal devices connected to the gateway device, and send an upgrade instruction to the target terminal device under the second channel, so that the target terminal device that receives the upgrade instruction performs file upgrade according to the upgrade instruction.
In an embodiment, the negotiating a second channel that is available and is currently in an idle state by the channel negotiating module 1301 and other gateway devices includes:
selecting one channel from candidate channels as a target channel, wherein the candidate channels are other channels except a first channel which works currently; transmitting a broadcast message under the target channel, wherein the broadcast message carries an identifier of the target channel so as to instruct other gateway equipment to judge whether the current working channel is the target channel; and receiving a judging result sent by other gateway equipment, if the judging result indicates that the current working channel of the other gateway equipment is not the target channel, determining the target channel as the second channel, otherwise, returning to the step of selecting one channel from candidate channels as the target channel.
In an embodiment, the channel control module 1302 controls all terminal devices connected to the gateway device to switch the working channel from the current first channel to the second channel, and the switching the working rate from the current first rate to the second rate includes:
transmitting a frequency hopping command to all terminal devices connected with the gateway device under a first channel, wherein the frequency hopping command carries a second channel identifier and a second rate of the second channel, so that the terminal device receiving the frequency hopping command switches a working channel from a current first channel to a second channel corresponding to the second channel identifier, and switches the working rate from the current first rate to the second rate; and switching the working channel of the gateway equipment from the current first channel to the second channel, and switching the working rate from the current first rate to the second rate.
In one embodiment, the apparatus further comprises (not shown in fig. 13): the device comprises a first detection module and a first retransmission module.
The first detection module is used for detecting whether a frequency hopping response returned by the terminal equipment is received in a first set time after the frequency hopping command is sent to the terminal equipment for each terminal equipment connected with the gateway equipment;
And the first retransmission module is used for retransmitting the frequency hopping command to the terminal equipment under the first channel if the frequency hopping response is not received within the first set time, and when the frequency hopping command transmission frequency is smaller than a preset value, the frequency hopping command carries the second channel identifier and the second rate, so that the terminal equipment receiving the frequency hopping command switches the working channel from the first channel to the second channel corresponding to the second channel identifier, and switches the working rate from the current first rate to the second rate.
In an embodiment, the determining, by the upgrade control module 1303, the target terminal device to perform the file upgrade from all the terminal devices connected to the gateway device includes:
transmitting an upgrade starting instruction to all terminal equipment connected with the gateway equipment under the second channel, so that the terminal equipment receiving the upgrade starting instruction determines whether to upgrade according to the upgrade starting instruction; receiving an upgrade response message under the second channel, wherein the upgrade response message is used for indicating that upgrade needs to be executed; and determining the terminal equipment sending the upgrade response message as target terminal equipment for executing file upgrade.
In an embodiment, the step of sending, by the upgrade control module 1303, an upgrade instruction to the target terminal device under the second channel includes:
sending a first message under the second channel, wherein the first message carries an upgrade file; and after the first message carrying the upgrade file is sent, sending a second message under the second channel, wherein the second message is used for indicating that the upgrade file is sent completely, so that the target terminal equipment receiving the second message executes file upgrade according to the upgrade file.
In an embodiment, the upgrade control module 1303 sending the first message over the second channel includes:
if the size of the upgrade file is larger than a set threshold, dividing the upgrade file into a plurality of upgrade packages, wherein the data size of each upgrade package does not exceed the set threshold; and sequentially sending first messages carrying upgrade packages under the second channel.
In one embodiment, the apparatus further comprises (not shown in fig. 13):
the first sending submodule is used for sending an upgrade ending instruction to the target terminal equipment in a second set time after the second message is sent, so that the target terminal equipment which receives the upgrade ending instruction returns an upgrade result;
And the second retransmission module is used for receiving an upgrade result returned by the target terminal equipment, and retransmitting the upgrade file when the upgrade file transmission times are smaller than the set times if the upgrade result indicates that the upgrade fails, so that the target terminal equipment which fails to upgrade is successfully upgraded.
Secondly, the file upgrading method provided by the application is explained from the terminal equipment side:
referring to fig. 14, a block diagram of an embodiment of a file upgrading apparatus according to an exemplary embodiment of the present application is provided. In one example, the method may be applied to a terminal device, such as terminal devices 140-160 illustrated in FIG. 1.
As shown in fig. 14, the apparatus includes: channel switching module 1401, instruction receiving module 1402, and file upgrading module 1403.
The channel switching module 1401 is configured to switch, according to control of the gateway device, an operation channel of the terminal device from a current first channel to a second channel, and switch an operation rate from the current first rate to the second rate;
an instruction receiving module 1402, configured to receive an upgrade instruction sent by the gateway device under the second channel;
the file upgrade module 1403 is configured to execute a file upgrade according to the upgrade instruction.
In an embodiment, the channel switching module 1401 switches the working channel of the terminal device from the current first channel to the second channel according to the control of the gateway device, and the switching the working rate from the current first rate to the second rate includes:
receiving a frequency hopping command sent by the gateway equipment under a first channel, wherein the frequency hopping command carries a second channel identifier and a second rate of a second channel; and switching the working channel of the terminal equipment from the current first channel to a second channel corresponding to the second channel identifier according to the frequency hopping command, and switching the working rate from the current first rate to the second rate.
In one embodiment, the apparatus further comprises (not shown in fig. 14): the device comprises a second receiving module, a first comparing module, a second comparing module, a first determining module and a second sending module.
The second receiving module is configured to receive an upgrade starting instruction sent by the gateway device under the second channel, where the upgrade starting instruction at least carries first version information of an upgrade file;
the first comparison module is used for comparing the second version information of the current program operation of the terminal equipment with the first version information;
The first determining module is used for determining that the terminal equipment does not need to be updated if the second version information is higher than or equal to the first version information;
the second comparison module is used for comparing the cached third version information of the terminal equipment with the first version information if the second version information is lower than the first version information;
and the second sending module is used for sending an upgrade response message under the second channel if the third version information is the same as the first version information so as to inform the gateway equipment that the terminal equipment needs to execute upgrade.
In an embodiment, the upgrade instruction carries an upgrade file;
the upgrade starting instruction also carries file verification parameters of the upgrade file;
the file upgrade module 1403 performs file upgrade according to the upgrade instruction, including:
detecting whether the received upgrade file and the file verification parameters meet the consistency requirement; if not, discarding the upgrade file; if yes, detecting whether the received upgrade file has a missing file, if not, executing file upgrade according to the received upgrade file, and if yes, requesting the gateway equipment to resend the missing file until the missing file in the upgrade file is received, and executing file upgrade according to the received upgrade file.
In an embodiment, the upgrade file is composed of a plurality of upgrade packages;
the file upgrade module 1403 detects whether there is a missing file in the received upgrade file, including:
detecting whether the packet sequence numbers of the received upgrade packets are continuous; if the packet sequence number is detected to be continuous, determining that a missing file does not exist in the received upgrade file; if the packet sequence number is detected to be discontinuous, determining that a missing file exists in the received upgrade file, wherein the missing file is an upgrade packet corresponding to the packet sequence number of the discarded upgrade packet.
Corresponding to the embodiment of the file upgrading method, the application also provides an embodiment of a file upgrading system.
Referring to fig. 15, a block diagram of an embodiment of a file upgrade system according to an exemplary embodiment of the present application is provided.
As shown in fig. 15, the system includes: gateway device 1501, and terminal device 1502 connected to gateway device 1501.
The gateway device 1501 is configured to negotiate with other gateway devices a second channel that is available and is currently in an idle state after receiving the upgrade task; all terminal devices connected with the gateway device are controlled to switch the working channel from the current first channel to the second channel, and the working rate is switched from the current first rate to the second rate; determining target terminal equipment to be subjected to file upgrading from all terminal equipment connected with the gateway equipment, and sending an upgrading instruction to the target terminal equipment under the second channel so that the target terminal equipment receiving the upgrading instruction can execute file upgrading according to the upgrading instruction;
A terminal device 1502, configured to switch, according to control of the gateway device, an operation channel of the terminal device from a current first channel to a second channel, and switch an operation rate from a current first rate to a second rate; receiving an upgrade instruction sent by the gateway equipment under the second channel; and executing file upgrading according to the upgrading instruction.
With continued reference to fig. 16, the present application also provides an electronic device including a processor 1601, a communication interface 1602, a memory 1603, and a communication bus 1604.
The processor 1601, the communication interface 1602, and the memory 1603 communicate with each other via a communication bus 1604;
a memory 1603 for storing a computer program;
the processor 1601 is configured to execute a computer program stored on the memory 1603, where the processor 1601 executes the computer program to implement the steps of providing a file upgrading method according to the embodiment of the present application.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the file upgrade method provided by the embodiments of the present application.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
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 the element.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims (13)

1. A method for upgrading a file, the method being applied to a gateway device and comprising:
after receiving the upgrade task, selecting one channel from candidate channels as a target channel, wherein the candidate channels are other channels except the first channel which works currently;
Transmitting a broadcast message under the target channel, wherein the broadcast message carries an identifier of the target channel so as to instruct other gateway equipment to judge whether the current working channel is the target channel;
receiving a judging result sent by other gateway equipment, if the judging result indicates that the current working channel of the other gateway equipment is not the target channel, determining the target channel as a second channel, otherwise, returning to the step of selecting one channel from candidate channels as the target channel;
all terminal devices connected with the gateway device are controlled to switch the working channel from the current first channel to the second channel, and the working rate is switched from the current first rate to the second rate;
transmitting an upgrade starting instruction to all terminal equipment connected with the gateway equipment under the second channel, so that the terminal equipment receiving the upgrade starting instruction determines whether to upgrade according to the upgrade starting instruction;
receiving an upgrade response message under the second channel, wherein the upgrade response message is used for indicating that upgrade needs to be executed;
and determining the terminal equipment which sends the upgrade response message as target terminal equipment for executing file upgrade, and sending an upgrade instruction to the target terminal equipment under the second channel so that the target terminal equipment which receives the upgrade instruction executes file upgrade according to the upgrade instruction.
2. The method of claim 1, wherein said controlling all terminal devices connected to the gateway device to switch the operating channel from the current first channel to the second channel and to switch the operating rate from the current first rate to the second rate comprises:
transmitting a frequency hopping command to all terminal devices connected with the gateway device under a first channel, wherein the frequency hopping command carries a second channel identifier and a second rate of the second channel, so that the terminal device receiving the frequency hopping command switches a working channel from a current first channel to a second channel corresponding to the second channel identifier, and switches the working rate from the current first rate to the second rate;
and switching the working channel of the gateway equipment from the current first channel to the second channel, and switching the working rate from the current first rate to the second rate.
3. The method according to claim 2, characterized in that the method further comprises:
for each terminal device connected with the gateway device, detecting whether a frequency hopping response returned by the terminal device is received in a first set time after the frequency hopping command is sent to the terminal device;
If not, when the sending frequency of the frequency hopping command is smaller than the preset value, the frequency hopping command is sent to the terminal equipment again under the first channel, the frequency hopping command carries the second channel identifier and the second rate, so that the terminal equipment receiving the frequency hopping command switches the working channel from the first channel to the second channel corresponding to the second channel identifier, and the working rate is switched from the current first rate to the second rate.
4. The method of claim 1, wherein the sending an upgrade instruction to a target terminal device over the second channel comprises:
sending a first message under the second channel, wherein the first message carries an upgrade file;
and after the first message carrying the upgrade file is sent, sending a second message under the second channel, wherein the second message is used for indicating that the upgrade file is sent completely, so that the target terminal equipment receiving the second message executes file upgrade according to the upgrade file.
5. The method of claim 4, wherein said transmitting a first message over said second channel comprises:
if the size of the upgrade file is larger than a set threshold, dividing the upgrade file into a plurality of upgrade packages, wherein the data size of each upgrade package does not exceed the set threshold;
And sequentially sending first messages carrying upgrade packages under the second channel.
6. The method according to claim 4, characterized in that the method further comprises:
sending an upgrade ending instruction to the target terminal equipment within a second set time after the second message is sent, so that the target terminal equipment which receives the upgrade ending instruction returns an upgrade result;
and receiving an upgrade result returned by the target terminal equipment, and if the upgrade result indicates upgrade failure, retransmitting the upgrade file when the transmission times of the upgrade file are smaller than the set times, so that the target terminal equipment which fails to upgrade is successfully upgraded.
7. A method for upgrading a file, applied to a terminal device, the method comprising:
switching the working channel of the terminal equipment from the current first channel to the second channel according to the control of the gateway equipment, and switching the working rate from the current first rate to the second rate; the second channel is negotiated by the gateway device and other gateway devices, specifically, the gateway device selects one channel from candidate channels as a target channel, wherein the candidate channels are other channels except the first channel which works currently; transmitting a broadcast message under the target channel, wherein the broadcast message carries an identifier of the target channel so as to instruct other gateway equipment to judge whether the current working channel is the target channel; receiving a judging result sent by other gateway equipment, if the judging result indicates that the current working channel of the other gateway equipment is not the target channel, determining the target channel as a second channel, otherwise, returning to the step of selecting one channel from candidate channels as the target channel;
Receiving an upgrade starting instruction sent by the gateway equipment under the second channel, and determining whether to upgrade according to the upgrade starting instruction;
when it is determined that the file needs to be upgraded, an upgrade response message is sent under the second channel, so that the gateway device can determine the terminal device sending the upgrade response message as a target terminal device for file upgrade to be executed, and the upgrade response message is used for indicating that the upgrade needs to be executed;
receiving an upgrade instruction sent by the gateway equipment under the second channel;
and executing file upgrading according to the upgrading instruction.
8. The method of claim 7, wherein switching the operating channel of the terminal device from the current first channel to the second channel and switching the operating rate from the current first rate to the second rate according to the control of the gateway device comprises:
receiving a frequency hopping command sent by the gateway equipment under a first channel, wherein the frequency hopping command carries a second channel identifier and a second rate of a second channel;
and switching the working channel of the terminal equipment from the current first channel to a second channel corresponding to the second channel identifier according to the frequency hopping command, and switching the working rate from the current first rate to the second rate.
9. The method of claim 7, wherein prior to receiving the upgrade instruction sent by the gateway device over the second channel, the method further comprises:
receiving an upgrade starting instruction sent by the gateway equipment under the second channel, wherein the upgrade starting instruction at least carries first version information of an upgrade file;
comparing the second version information of the current program operation of the terminal equipment with the first version information, and if the second version information is higher than or equal to the first version information, determining that the terminal equipment does not need to be upgraded; and if the second version information is lower than the first version information, comparing the cached third version information with the first version information, and if the third version information is the same as the first version information, sending an upgrade response message under the second channel to inform the gateway equipment that the terminal equipment needs to execute upgrade.
10. The method of claim 9, wherein the upgrade instruction carries an upgrade file;
the upgrade starting instruction also carries file verification parameters of the upgrade file;
the step of executing the file upgrade according to the upgrade instruction comprises the following steps:
Detecting whether the received upgrade file and the file verification parameters meet the consistency requirement;
if not, discarding the upgrade file;
if yes, detecting whether the received upgrade file has a missing file, if not, executing file upgrade according to the received upgrade file, and if yes, requesting the gateway equipment to resend the missing file until the missing file in the upgrade file is received, and executing file upgrade according to the received upgrade file.
11. The method of claim 10, wherein the upgrade file is comprised of a plurality of upgrade packages;
detecting whether a missing file exists in the received upgrade file includes:
detecting whether the packet sequence numbers of the received upgrade packets are continuous;
if the packet sequence number is detected to be continuous, determining that a missing file does not exist in the received upgrade file;
if the packet sequence number is detected to be discontinuous, determining that a missing file exists in the received upgrade file, wherein the missing file is an upgrade packet corresponding to the packet sequence number of the discarded upgrade packet.
12. A file upgrade system, the system comprising: gateway equipment and terminal equipment connected with the gateway equipment;
The gateway equipment is used for selecting one channel from candidate channels as a target channel after receiving an upgrade task, wherein the candidate channels are other channels except a first channel which works currently; transmitting a broadcast message under the target channel, wherein the broadcast message carries an identifier of the target channel so as to instruct other gateway equipment to judge whether the current working channel is the target channel; receiving a judging result sent by other gateway equipment, if the judging result indicates that the current working channel of the other gateway equipment is not the target channel, determining the target channel as a second channel, otherwise, returning to the step of selecting one channel from candidate channels as the target channel; all terminal devices connected with the gateway device are controlled to switch the working channel from the current first channel to the second channel, and the working rate is switched from the current first rate to the second rate; transmitting an upgrade starting instruction to all terminal equipment connected with the gateway equipment under the second channel, so that the terminal equipment receiving the upgrade starting instruction determines whether to upgrade according to the upgrade starting instruction; receiving an upgrade response message under the second channel, wherein the upgrade response message is used for indicating that upgrade needs to be executed; determining the terminal equipment sending the upgrade response message as target terminal equipment for executing file upgrade, and sending an upgrade instruction to the target terminal equipment under the second channel so that the target terminal equipment receiving the upgrade instruction executes file upgrade according to the upgrade instruction;
The terminal equipment is used for switching the working channel of the terminal equipment from the current first channel to the second channel and switching the working rate from the current first rate to the second rate according to the control of the gateway equipment; receiving an upgrade instruction sent by the gateway equipment under the second channel; and executing file upgrading according to the upgrading instruction.
13. An electronic device comprising a readable storage medium and a processor;
wherein the readable storage medium is for storing machine executable instructions;
the processor is configured to read the machine executable instructions on the readable storage medium and execute the instructions to implement the steps of the method of any one of claims 1-6 or 7-11.
CN201911175644.3A 2019-11-26 2019-11-26 File upgrading method, system and device Active CN112865990B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911175644.3A CN112865990B (en) 2019-11-26 2019-11-26 File upgrading method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911175644.3A CN112865990B (en) 2019-11-26 2019-11-26 File upgrading method, system and device

Publications (2)

Publication Number Publication Date
CN112865990A CN112865990A (en) 2021-05-28
CN112865990B true CN112865990B (en) 2023-04-25

Family

ID=75984921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911175644.3A Active CN112865990B (en) 2019-11-26 2019-11-26 File upgrading method, system and device

Country Status (1)

Country Link
CN (1) CN112865990B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115296958B (en) * 2022-06-28 2024-03-22 青岛海尔科技有限公司 Distribution method and device of equipment control tasks, storage medium and electronic device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2330774A1 (en) * 2008-09-22 2011-06-08 Huawei Device Co., Ltd. Method, device and system for multicasting upgrade files
CN109358870A (en) * 2018-09-11 2019-02-19 熊猫电子集团有限公司 Remote online update method and device suitable for satellite communication equipment software

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1230761B1 (en) * 1999-11-17 2005-10-19 Telefonaktiebolaget LM Ericsson (publ) Acceleration dependent channel switching in mobile telecommunications
EP1244255A1 (en) * 2001-03-20 2002-09-25 Telefonaktiebolaget L M Ericsson (Publ) Method and apparatus for enhanceing a data throughput
US10516740B2 (en) * 2014-05-30 2019-12-24 Apple Inc. Dynamic transport switching in inter-device communication

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2330774A1 (en) * 2008-09-22 2011-06-08 Huawei Device Co., Ltd. Method, device and system for multicasting upgrade files
CN109358870A (en) * 2018-09-11 2019-02-19 熊猫电子集团有限公司 Remote online update method and device suitable for satellite communication equipment software

Also Published As

Publication number Publication date
CN112865990A (en) 2021-05-28

Similar Documents

Publication Publication Date Title
EP3614786B1 (en) Data transmission method and apparatus
CN111031565B (en) Method and device for identifying off-line state of ZigBee device
KR102141389B1 (en) Method and apparatus for sending radio link control status report for sending in a communication system based on a multi-radio access technologies
CN110995554A (en) Method and device for configuring and accessing intelligent household electrical appliance network and storage medium
US8898242B2 (en) Apparatus and method of controlling the same in a system for communications between a priority terminal and a non-priority terminal
US20070280273A1 (en) Method and apparatus to perform handover enhancing throughput
CN107547619B (en) Timer parameter negotiation method and device
US20050265295A1 (en) Server apparatus, client apparatus, and communication control method
CN111064552B (en) Intelligent device control method and device, electronic device and storage medium
CN112865990B (en) File upgrading method, system and device
US20090106401A1 (en) System and method for Intra Network Internet Protocol (IP) address modification by dual controller
CN107508916B (en) Server link management method for intelligent robot
CN110535733B (en) Control method and device of household appliance, computer equipment and storage medium
CN113784388A (en) Data transmission method, device, equipment and storage medium
CN109246166B (en) Communication method and device and unmanned aerial vehicle
CN110677302B (en) Communication control method, device and system
CN107454676B (en) Robot communication and control method and device
CN108462984A (en) A kind of method and terminal carrying out access network management
CN105704210B (en) Charging pile information updating method and system
EP3065445B1 (en) Method, cse, and system for transmitting m2m application request
CN110750327A (en) Virtual network function management method and system, agent device, and storage medium
CN111246447A (en) eUICC signed data management method, eUICC signed data management module, eUICC signed data management terminal and eUICC signed data management storage medium
EP1422885A2 (en) Method and apparatus of exchanging transfer parameters in a mobile communication system
CN112469087B (en) Method for adjusting communication rate of air conditioning equipment, terminal and storage medium
KR101391833B1 (en) Method, apparatus and system of concurrent control for user device using TR-069 protocol

Legal Events

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