CN112423321A - Upgrading method and device based on wireless broadcast and electronic equipment - Google Patents

Upgrading method and device based on wireless broadcast and electronic equipment Download PDF

Info

Publication number
CN112423321A
CN112423321A CN202011256436.9A CN202011256436A CN112423321A CN 112423321 A CN112423321 A CN 112423321A CN 202011256436 A CN202011256436 A CN 202011256436A CN 112423321 A CN112423321 A CN 112423321A
Authority
CN
China
Prior art keywords
upgrade
channel
target terminal
data
upgrading
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.)
Granted
Application number
CN202011256436.9A
Other languages
Chinese (zh)
Other versions
CN112423321B (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202011256436.9A priority Critical patent/CN112423321B/en
Publication of CN112423321A publication Critical patent/CN112423321A/en
Application granted granted Critical
Publication of CN112423321B publication Critical patent/CN112423321B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0007Control or signalling for completing the hand-off for multicast or broadcast services, e.g. MBMS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0011Control or signalling for completing the hand-off for data sessions of end-to-end connection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides an upgrading method and device based on wireless broadcast and electronic equipment, comprising the following steps: monitoring the reported information of a plurality of target terminals communicated with the gateway equipment through a first channel, and determining whether the target terminals needing to be upgraded exist; if yes, an upgrade command indicating the upgrade of the target terminal is broadcasted through a first channel, so that the target terminal receives the upgrade command and then converts the current channel from the first channel to a second channel, wherein the second channel is only used for transmitting an upgrade data packet; and starting a second channel to broadcast the upgrade data packet of the target terminal, and closing the second channel when the upgrade data packet is broadcast. The invention can solve the problem that the existing fire alarm system based on wireless can not well meet the requirement of timely reporting of fire alarm by setting the second channel for broadcasting the data packet to the terminal and the first channel for reporting data to the receiving terminal by the gateway equipment.

Description

Upgrading method and device based on wireless broadcast and electronic equipment
Technical Field
The invention relates to the technical field of wireless, in particular to an upgrading method and device based on wireless broadcasting and electronic equipment.
Background
At present, the scheme based on wireless internet of things networking is mature, the wireless internet of things networking is widely applied to the fields of smart cities, smart environments, smart agriculture and the like, for example, in the field of fire fighting, a wireless-based fire alarm system appears along with the development of wireless technology, the system consists of a gateway device and a terminal node, the gateway device is responsible for message forwarding between the terminal node and a server, and the terminal node carries out fire alarm detection at the front end. In the prior art, a wireless communication terminal node is adopted to support a code remote upgrading function, and the terminal node carries out remote upgrading according to an upgrading packet sent by gateway equipment.
Because of the priority of fire alarm, the message of a terminal node is required by fire alarm to be reported to a server within 10 seconds, and because the actual situation of the fire protection industry is not considered in the traditional wireless upgrading scheme, when the gateway equipment issues an upgrading packet to the terminal node, an emergency reporting channel of the fire alarm is not reserved, so that the existing wireless-based fire alarm system cannot well meet the requirement of timely reporting of the fire alarm.
Disclosure of Invention
The invention provides an upgrading method and device based on wireless broadcasting and electronic equipment, which are used for solving the problem that the existing fire alarm system based on wireless cannot well meet the requirement of timely reporting of fire alarm.
According to a first aspect of embodiments of the present application, there is provided a radio broadcast-based upgrade method, including:
monitoring the reported information of a plurality of target terminals communicated with the gateway equipment through a first channel, and determining whether the target terminals needing to be upgraded exist;
if yes, an upgrade command indicating the upgrade of the target terminal is broadcasted through a first channel, so that the target terminal receives the upgrade command and then converts the current channel from the first channel to a second channel, wherein the second channel is only used for transmitting an upgrade data packet;
and starting a second channel to broadcast the upgrade data packet of the target terminal, and closing the second channel when the upgrade data packet is broadcast.
Optionally, starting an upgrade data packet of a second channel broadcast on the target terminal, including:
opening a second channel, and switching the current channel between the first channel and the second channel in turn; or
And opening a second channel, and monitoring the report information of a plurality of target terminals communicated with the gateway equipment through the first channel while broadcasting the upgrade data packet of the target terminal through the second channel.
Optionally, closing the second channel when the upgrade data packet is broadcasted includes:
when the upgrade data is determined to be broadcasted, broadcasting an upgrade ending command to the target terminal through a second channel so that the first target terminal can convert the current channel from the second channel to the first channel;
closing the second channel.
Optionally, starting an upgrade data packet of a second channel broadcast on the target terminal, including:
if the gateway equipment is connected with the target terminal through one channel, switching the current channel between a first channel and a second channel in turn;
and if the gateway equipment is connected with the target terminal through at least two channels, monitoring the reported information of a plurality of target terminals communicated with the gateway equipment by taking one channel as a first channel, and broadcasting the upgrade data packet of the target terminal by taking the other channel as a second channel.
Optionally, the upgrade data packet broadcasted to the target terminal includes at least one of the following:
the frame header is used for carrying control information for indicating the gateway equipment to communicate with the target terminal;
a gateway device address, wherein the gateway device address is an IP address of a gateway device;
the node address is used for indicating that the gateway equipment transmits a data packet in a broadcasting mode;
a frame command type;
a data length for characterizing a size of the data packet;
communication data, wherein the communication data is the upgrading data content of the data packet;
and the checksum is the accumulated sum of data bits in the process of broadcasting the data packet.
Optionally, the target terminal is instructed to be upgraded by an upgrade data packet carrying an upgrade command, and communication data of the upgrade command data packet includes at least one of the following:
an upgrade identifier for indicating the target terminal to start upgrading;
the upgrading type is used for indicating the target terminal to judge whether the upgrading data type is consistent with the type of the target terminal;
the version number of the upgrade data code is used for indicating the target terminal to judge whether the version of the upgrade data is consistent with the version of the target terminal;
the upgrade data sub-packet number is used for indicating the target terminal to judge the upgrade data sub-packet number of the current upgrade state, wherein the upgrade data packet comprises at least one upgrade data sub-packet;
the upgrade data sub-packet total accumulated sum is used for indicating the target terminal to judge whether the data packet is correct or not;
a total CRC16 check value of the upgrade data packet for instructing the target terminal to determine whether the data packet is correct;
and the upgrade timeout time is used for indicating the target terminal to judge that the current upgrade duration exceeds the preset duration and determining the upgrade timeout time for forcibly ending the current upgrade process.
Optionally, the communication data in the upgrade data packet includes at least one of the following:
an upgrade identifier for indicating the target terminal to start upgrading;
the upgrade data sub-packet serial number is used for indicating the current upgrade data state;
upgrade data content for instructing the target terminal to upgrade;
a CRC16 check value of the upgrade packet for instructing the target terminal to determine whether the packet is correct.
Optionally, the upgrade data package includes at least one upgrade data sub-package, and further includes:
sending messages for confirming the upgrading state to at least one target terminal in turn, and receiving an upgrading data table reported by at least one target terminal with upgrading failure, wherein the upgrading data table carries an identifier indicating whether the target terminal successfully receives each upgrading data sub-package;
determining at least one target terminal which fails to be upgraded according to the upgrading data table;
and sending an upgrade data sub-packet carrying the unreceived upgrade data to the at least one target terminal failing in the upgrade through a second channel, and receiving data reported by the at least one target terminal failing in the upgrade through a first channel.
According to a second aspect of embodiments of the present application, there is provided a wireless broadcast-based upgrade apparatus, including:
the monitoring module is used for monitoring the reported information of a plurality of target terminals which are communicated with the gateway equipment through a first channel and determining whether the target terminals which need to be upgraded exist;
the conversion module is used for broadcasting an upgrading command indicating the upgrading of the target terminal through a first channel if the target terminal needing upgrading exists, so that the target terminal converts the current channel from the first channel to a second channel after receiving the upgrading command, wherein the second channel is only used for upgrading data packet transmission;
and the broadcasting module is used for starting a second channel to broadcast the upgrade data packet of the target terminal and closing the second channel when the upgrade data packet is broadcast.
Optionally, the broadcast module is configured to start a second channel to broadcast the upgrade data packet of the target terminal, and specifically configured to:
opening a second channel, and switching the current channel between the first channel and the second channel in turn; or
And opening a second channel, and monitoring the report information of a plurality of target terminals communicated with the gateway equipment through the first channel while broadcasting the upgrade data packet of the target terminal through the second channel.
Optionally, the broadcast module is configured to close the second channel when the upgrade data packet is broadcast, and specifically configured to:
when the upgrade data is determined to be broadcasted, broadcasting an upgrade ending command to the target terminal through a second channel so that the first target terminal can convert the current channel from the second channel to the first channel;
closing the second channel.
Optionally, the broadcast module is configured to start a second channel to broadcast the upgrade data packet of the target terminal, and specifically configured to:
if the gateway equipment is connected with the target terminal through one channel, switching the current channel between a first channel and a second channel in turn;
and if the gateway equipment is connected with the target terminal through at least two channels, monitoring the reported information of a plurality of target terminals communicated with the gateway equipment by taking one channel as a first channel, and broadcasting the upgrade data packet of the target terminal by taking the other channel as a second channel.
Optionally, the broadcast module is configured to broadcast an upgrade data packet to the target terminal, where the upgrade data packet includes at least one of the following:
the frame header is used for carrying control information for indicating the gateway equipment to communicate with the target terminal;
a gateway device address, wherein the gateway device address is an IP address of a gateway device;
the node address is used for indicating that the gateway equipment transmits a data packet in a broadcasting mode;
a frame command type;
a data length for characterizing a size of the data packet;
communication data, wherein the communication data is the upgrading data content of the data packet;
and the checksum is the accumulated sum of data bits in the process of broadcasting the data packet.
Optionally, the conversion module is configured to instruct the target terminal to upgrade through an upgrade data packet carrying an upgrade command, where communication data of the upgrade command data packet includes at least one of the following:
an upgrade identifier for indicating the target terminal to start upgrading;
the upgrading type is used for indicating the target terminal to judge whether the upgrading data type is consistent with the type of the target terminal;
the version number of the upgrade data code is used for indicating the target terminal to judge whether the version of the upgrade data is consistent with the version of the target terminal;
the upgrade data sub-packet number is used for indicating the target terminal to judge the upgrade data sub-packet number of the current upgrade state, wherein the upgrade data packet comprises at least one upgrade data sub-packet;
the upgrade data sub-packet total accumulated sum is used for indicating the target terminal to judge whether the data packet is correct or not;
a total CRC16 check value of the upgrade data packet for instructing the target terminal to determine whether the data packet is correct;
and the upgrade timeout time is used for indicating the target terminal to judge that the current upgrade duration exceeds the preset duration and determining the upgrade timeout time for forcibly ending the current upgrade process.
Optionally, the communication data in the upgrade data packet includes at least one of the following:
an upgrade identifier for indicating the target terminal to start upgrading;
the upgrade data sub-packet serial number is used for indicating the current upgrade data state;
upgrade data content for instructing the target terminal to upgrade;
a CRC16 check value of the upgrade packet for instructing the target terminal to determine whether the packet is correct.
Optionally, the upgrade data package includes at least one upgrade data sub-package, and further includes:
sending messages for confirming the upgrading state to at least one target terminal in turn, and receiving an upgrading data table reported by at least one target terminal with upgrading failure, wherein the upgrading data table carries an identifier indicating whether the target terminal successfully receives each upgrading data sub-package;
determining at least one target terminal which fails to be upgraded according to the upgrading data table;
and sending an upgrade data sub-packet carrying the unreceived upgrade data to the at least one target terminal failing in the upgrade through a second channel, and receiving data reported by the at least one target terminal failing in the upgrade through a first channel.
According to a third aspect of embodiments of the present application, there is provided an electronic device for upgrading based on radio broadcasting, including: a memory, a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program in the memory to implement the method provided by the first aspect described above.
According to a fourth aspect of the embodiments of the present application, there is provided a chip, the chip is coupled with a memory in a user equipment, so that the chip invokes program instructions stored in the memory when running, thereby implementing the above aspects of the embodiments of the present application and any method that may be involved in the aspects.
According to a fifth aspect of the embodiments of the present application, there is provided a computer-readable storage medium storing program instructions, which, when executed on a computer, cause the computer to perform the above aspects of the embodiments of the present application and any of the methods that the aspects relate to.
According to a sixth aspect of embodiments of the present application, there is provided a computer program product, which, when run on an electronic device, causes the electronic device to perform a method of implementing the various aspects of embodiments of the present application and any possible ones of the various aspects.
In addition, for technical effects brought by any one implementation manner of the second aspect to the sixth aspect, reference may be made to technical effects brought by different implementation manners of the first aspect, and details are not described here.
The upgrading method and device based on wireless broadcast and the electronic equipment provided by the invention have the following beneficial effects that:
the invention provides an upgrading method and device based on wireless broadcasting and electronic equipment, which can set a second channel for broadcasting a data packet carrying an upgrading start command or upgrading data to a terminal and a first channel for receiving data reported by the terminal in a gateway device, so that the gateway device can monitor the reported information of a plurality of target terminals communicated with the gateway device through the first channel when broadcasting the data packet to the terminal through the second channel, thus, for example, in the fire industry, the gateway device can timely process and monitor the reported information of the plurality of target terminals communicated with the gateway device, and the problem that the existing wireless-based fire alarm system cannot well meet the requirement of timely reporting of a fire alarm is solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic diagram of an upgrade method based on radio broadcast according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a method for upgrading a terminal by a gateway device in a half-duplex manner according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating that a gateway device upgrades a terminal in a full duplex manner according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an upgrade method based on radio broadcasting according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an upgrade method based on radio broadcasting according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an upgrade apparatus based on radio broadcasting according to an embodiment of the present invention;
fig. 7 is a schematic diagram of an electronic device for upgrading based on radio broadcasting according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The term "and/or" in the embodiments of the present invention describes an association relationship of associated objects, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The application scenario described in the embodiment of the present invention is for more clearly illustrating the technical solution of the embodiment of the present invention, and does not form a limitation on the technical solution provided in the embodiment of the present invention, and it can be known by a person skilled in the art that with the occurrence of a new application scenario, the technical solution provided in the embodiment of the present invention is also applicable to similar technical problems. In the description of the present invention, the term "plurality" means two or more unless otherwise specified.
In the prior art, a terminal node adopting wireless communication supports a code remote upgrading function, the terminal node carries out remote upgrading according to an upgrading packet sent by gateway equipment, and the prior method for carrying out remote upgrading on the terminal comprises the following modes.
The method provides an upgrading method and system based on Long Range Radio (Long Range Radio) communication, and corresponding terminal equipment and a server, so as to solve the problem that the terminal equipment based on Long Range Radio in the prior art does not have an upgrading function. The specific upgrading method comprises the following steps: grouping the terminal devices; responding to the firmware code upgrading task, the server sends an upgrading notification instruction for notifying each group of terminal equipment to open a receiving window at preset time by using a preset spreading factor to each group of terminal equipment, and broadcasts an upgrading packet at the preset spreading factor to each group of terminal equipment at the preset time; and the terminal equipment responds to the upgrading notification instruction sent by the server and receives the upgrading packet broadcasted by the server according to the upgrading notification instruction. Through the mode, the upgrading of the firmware codes of the terminal equipment based on LoRa communication is realized, and the upgrading is carried out by the spreading factor SF based on the grouping of the terminal equipment, so that the upgrading efficiency is improved.
However, the above scheme has the following problems in the equipment upgrading process:
1) in the upgrading process, information time slices are not reserved and used for uploading in an emergency state;
2) in the scheme, the equipment upgrading reception is judged by upgrading overtime time which is issued by gateway equipment, the gateway equipment cannot terminate the upgrading process in advance, and battery resources are wasted for equipment powered by a battery;
3) after the upgrade fails, when the failed node communicates with the node again, the terminal communication node randomly communicates with the gateway device to acquire the information of the failed upgrade package.
Based on the above problems, the embodiment of the present application provides an upgrade method based on wireless broadcasting, which can set a second channel for broadcasting a data packet carrying an upgrade start command or upgrade data to a terminal and a first channel for receiving data reported by the terminal, so that when the gateway device broadcasts the data packet to the terminal through the second channel, the gateway device can monitor the reported information of a plurality of target terminals communicating with the gateway device through the first channel, so that, for example, in the fire industry, the gateway device can process the reported information of the plurality of target terminals monitoring the communication with the gateway device in time, and solve the problem that the existing wireless-based fire alarm system cannot well meet the requirement of timely reporting of a fire alarm, and in the method provided by the present application, when determining that an upgrade abnormal condition is met or the broadcast of all data packets of the upgrade data is completed, and broadcasting the data packet carrying the upgrade ending command to the connected terminal through the second channel, that is, the gateway device can terminate the upgrade flow according to the actual situation, and the terminal can also forcibly end the current upgrade flow when determining that the upgrade time for receiving the data packet carrying the upgrade data exceeds the preset upgrade timeout time.
As shown in fig. 1, an upgrade method based on radio broadcasting provided by an embodiment of the present application includes:
step S101, monitoring the reported information of a plurality of target terminals communicating with the gateway equipment through a first channel, and determining whether the target terminals needing to be upgraded exist;
it should be noted that one gateway device may be connected to multiple target terminals, and the types of the target terminals connected to the gateway device are not completely consistent, specifically, different types of terminals such as smoke sensation and temperature may be included, and in the process of upgrading the terminal, the gateway device can upgrade one type of terminal by using an upgrade data packet broadcasted once, so as to determine whether there is a target terminal to be upgraded through information reported by multiple target terminals as an optional implementation manner;
step S102, if yes, an upgrade command indicating the upgrade of the target terminal is broadcasted through a first channel, so that the target terminal converts the current channel from the first channel to a second channel after receiving the upgrade command, wherein the second channel is only used for transmitting an upgrade data packet;
if there is a target terminal that needs to be upgraded, the gateway device needs to broadcast a data packet to the target terminal through a first channel, and monitors the report information of a plurality of target terminals that communicate with the gateway device through a second channel, and when it is determined that code remote upgrade needs to be performed on a connected terminal, the gateway device needs to broadcast a related data packet to the target terminal through the first channel in a broadcast manner, optionally, the format of the data packet includes at least one of the following:
1) the frame header comprises positioning of a physical address of a host of a receiving party and other network information and is used for distinguishing marks of different data, and optionally, the size of the frame header in the embodiment of the application is 1 byte;
2) a gateway device address, where the gateway device address is an IP address of a device having a routing function, and optionally, the size of the gateway device address in this embodiment is 2 bytes;
3) optionally, in this embodiment of the present application, the node addresses are uniformly set to FFH and FFH, and the size of the node address is 2 bytes;
4) a frame command type, configured to determine a frame type of a current data packet, where optionally, the frame command type in this embodiment is 2 bytes;
5) data length, optionally, the data length in this embodiment is 1 byte;
6) the communication address is an upgrade data content of the data packet, a command with different functions and a corresponding communication data format are different, and specifically, in the embodiment of the present application, the data packet includes an upgrade command for instructing the target terminal to upgrade by broadcasting to the terminal by the gateway device, an upgrade data packet for broadcasting to the terminal by the gateway device, and an upgrade end command for broadcasting to the terminal by the gateway device. The format of the communication data will be specifically described below with reference to a specific command type, which is not described herein again, and optionally, the size of the communication data in this embodiment does not exceed 55 bytes;
7) checksums are used in the field of data processing and data communication to check the sum of a set of data items at a destination. Usually in hexadecimal form. If the checksum value exceeds hexadecimal FF, i.e., 255, its complement is required as the checksum. For ensuring the integrity and accuracy of data in communication, especially long-distance communication, optionally, the size of the checksum in the embodiment of the present application is 1 byte.
Optionally, the size of the content included in the data packet format is only one defined in the embodiment of the present application, and a person skilled in the art may set the size according to actual requirements.
Optionally, the gateway device first broadcasts an upgrade command to the target terminal through the first channel, and for a data packet carrying the upgrade command, a format of the communication data includes at least one of the following:
1) an upgrade identifier for indicating the target terminal to start upgrading, where optionally, the upgrade identifier may be represented by a specific numerical value, specifically, the upgrade identifier may be set to 1 to indicate that the target terminal starts upgrading, and in this embodiment of the present application, the size of the upgrade identifier is 1 byte;
2) the method includes the steps that an upgrade type used for indicating a target terminal to judge whether an upgrade data type is consistent with a type of the target terminal is used, the gateway device is connected with a plurality of target terminals, and the types of the connected target terminals are different, so that when the target terminal receives a data packet broadcasted by the gateway device, whether a current upgrade type is consistent with the type of the target terminal is needed to be judged, for example, if the corresponding upgrade type in the data packet sent by the gateway device is set to be smoke-sensitive, the terminal of the smoke-sensitive type needs to be upgraded at the moment, and the terminal of the non-smoke-sensitive type ignores the upgrade process, wherein in the embodiment of the application, the upgrade type is 1 byte in size;
3) the terminal is used for indicating the target terminal to judge whether the version of the upgrading data code is consistent with the version of the target terminal, because the current code of the terminal corresponds to a certain version number, if the version number of the data packet code broadcasted by the gateway equipment is consistent with the version number corresponding to the terminal code, the terminal does not need to be upgraded at the moment, as an optional implementation mode, when the version number of the data packet code broadcasted by the gateway equipment is lower than the version number of the terminal code, the terminal does not need to be upgraded, and only when the version number of the data packet code broadcasted by the gateway equipment is higher than the version number of the terminal code, the terminal carries out the upgrading process, in the embodiment of the application, the size of the version number of the upgrading data code is;
4) the upgrade data sub-packet number is used for indicating the target terminal to judge the upgrade data sub-packet number of the current upgrade state, wherein the data packet carrying the upgrade data comprises at least one upgrade data sub-packet, optionally, when the upgrade data is large, the gateway device needs to send a plurality of upgrade data sub-packets to the terminal, each upgrade data sub-packet carries a part of upgrade data content, and the terminal can determine the current upgrade state by judging the current upgrade data sub-packet number, in the embodiment of the application, the upgrade data sub-packet number is 2 bytes;
5) the upgrade data sub-package total accumulated sum is used for indicating the target terminal to judge whether the data package is correct or not, when the upgrade is completed, the terminal can judge whether the total accumulated sum of the upgrade data sub-package received currently is consistent with the total accumulated sum of the upgrade data sub-package carried in the data package carrying the name of the start of the upgrade, if not, the current upgrade process fails, and in the embodiment of the application, the size of the total accumulated sum of the upgrade data sub-package is 2 bytes;
6) the total CRC16 check value of the upgrade data packet is used to indicate the target terminal to determine whether the data packet is correct, in this embodiment, the total CRC16 check value of the upgrade data packet is 2 bytes, and optionally, the CRC16, that is, a cyclic redundancy check code, is a most commonly used error checking check code in the field of data communication, and is characterized in that the lengths of the information field and the check field can be arbitrarily selected. Cyclic Redundancy Check (CRC) is a data transmission error detection function that performs polynomial calculation on data and attaches the obtained result to the back of a frame, and a receiving device also executes a similar algorithm to ensure the correctness and integrity of data transmission;
7) the method includes the steps that the target terminal is indicated to judge that the current upgrading time length exceeds the preset time length, the upgrading overtime time for forcibly ending the current upgrading process is determined, when the terminal determines that the current upgrading time length exceeds the preset time length and does not receive a data packet carrying an upgrading ending command, the gateway equipment is considered to be abnormal at the moment, and the terminal can forcibly end the current upgrading process, wherein the upgrading overtime time is 2 bytes.
Optionally, the target terminal may report data through a channel connected to the gateway device, or receive a data packet broadcast by the gateway device, but for a single-channel terminal, only data reporting or data receiving may be performed on the channel at the same time, in a normal operating state, the channel corresponding to the terminal is used as the first channel to report data, and when a data packet carrying an upgrade start command broadcast by the gateway device through the first channel is received, the terminal converts the channel connected as the first channel to receive data by using the channel as the second channel.
Optionally, after receiving a data packet carrying an upgrade start command broadcasted by a gateway device, a terminal determines whether the data packet meets an upgrade requirement by judging the content of the data packet, and when receiving the data packet carrying the upgrade start command broadcasted by the gateway device through a first channel, the terminal may check the gateway device address, the node address, the upgrade identifier, the upgrade type, or the upgrade data code version number, etc. in the data packet, and if it is checked that the information carried in the data packet is accurate or corresponds to the terminal, the current terminal is used as a target terminal, and channel conversion is performed, where the channel conversion is performed by using a connected channel as a first channel to report data, and converting the channel into a channel as a second channel to receive data.
Step S103, a second channel is started to broadcast the upgrade data packet of the target terminal, and the second channel is closed when the upgrade data packet is completely broadcast.
Optionally, when the gateway device broadcasts the data packet and/or receives data, the gateway device may broadcast the upgrade data packet of the target terminal by starting a second channel in a half-duplex mode and a full-duplex mode when performing data transmission in the half-duplex mode and the full-duplex mode, where the two modes are as follows:
1) opening a second channel, and switching the current channel between the first channel and the second channel in turn; specifically, if the gateway device is connected to the target terminal through one channel, the current channel is alternately switched between the first channel and the second channel.
2) Opening a second channel, and monitoring the reported information of a plurality of target terminals communicated with the gateway equipment through the first channel while broadcasting the upgrade data packet of the target terminal through the second channel; specifically, if the gateway device and the target terminal are connected through at least two channels, one of the channels is used as a first channel to monitor the report information of a plurality of target terminals communicating with the gateway device, and the other channel is used as a second channel to broadcast the upgrade data packet of the target terminal.
The following describes in detail a process of broadcasting in half-duplex and full-duplex communication modes in the embodiment of the present application:
1) half duplex mode
When the gateway equipment only supports a single channel for communication, an upgrade data packet is broadcast to a target terminal through a second channel in a half-duplex mode, and reported information of a plurality of target terminals communicated with the gateway equipment is monitored through a first channel, wherein the first channel and the second channel are both the single channel;
specifically, when the gateway device only supports a single channel for communication, the gateway device can only receive data reported by the terminal through the channel or broadcast a data packet carrying upgrade data to the terminal, in the prior art, the single-channel gateway device cannot receive data reported by the current terminal or other terminals when broadcasting the upgrade data to the terminal, but because a fire alarm requires that a message of a terminal node can be reported to a server within 10 seconds, the existing wireless-based fire alarm system cannot well meet the requirement of timely reporting of the fire alarm;
based on this, the embodiment of the present application provides that when the gateway device broadcasts the data packet carrying the upgrade data to the target terminal through the second channel, the gateway device monitors the report information of the multiple target terminals in communication with the gateway device through the first channel in turn, or simultaneously monitors the report information of the multiple target terminals in communication with the gateway device through the first channel, specifically, but not limited to, presetting a timing conversion time, when the time for the gateway device to broadcast the data packet to the target terminal exceeds the timing conversion time, the gateway device converts the current channel into the first channel to monitor the report information of the multiple target terminals in communication with the gateway device, and after a period of receiving time continues, broadcasts the upgrade data packet using the channel as the second channel, and the above processes are repeated until the gateway device broadcasts the upgrade data to the target terminal, and closes the second channel, the specific flow chart is shown in fig. 2.
2) Full duplex mode
When the gateway equipment supports multi-channel communication, a data packet carrying upgrading data is broadcasted to a target terminal through a second channel in a full-duplex mode, and reported information of a plurality of target terminals communicating with the gateway equipment is monitored through a first channel;
specifically, when the gateway device supports multi-channel communication, the gateway device may select one of the channels as a first channel, and select another channel except the first channel as a second channel, so that when the upgrade data packet is broadcast to the target terminal through the second channel, the gateway device monitors the report information of the plurality of target terminals communicating with the gateway device through the first channel, where a specific flowchart is shown in fig. 3.
Optionally, for a data packet carrying upgrade data, a format of the communication data includes at least one of:
1) an upgrade identifier for indicating the target terminal to start upgrading, where optionally, the upgrade identifier may be represented by a specific numerical value, specifically, the upgrade identifier may be set to 1 to indicate that the terminal starts upgrading, and the size of the upgrade identifier in this embodiment of the present application is 1 byte;
2) the upgrade data subpackage serial number is used for indicating the upgrade data state, optionally, the terminal can check the current upgrade data state at any time according to the upgrade data subpackage serial number, in the embodiment of the application, the size of the upgrade data subpackage serial number is 2 bytes;
3) the upgrade data content is used for indicating the upgrade of the target terminal, optionally, the terminal performs specific upgrade operation according to the upgrade data content, in this embodiment, the size of the upgrade data content is 48 bytes;
4) a CRC16 check value, optionally, a CRC16 check value, used to indicate the target terminal to determine whether the data packet is correct, where the CRC16 check value is used to enable the terminal to quickly determine whether the current upgrade data packet is correct, if the current upgrade data packet is correct, the upgrade packet is stored in a specified address location, an upgrade flag is set to 1, and if the upgrade packet is determined to be incorrect, the upgrade packet is discarded, and the upgrade flag is set to 0.
Optionally, when it is determined that the upgrade data is completely broadcast, broadcasting an upgrade end command to the target terminal through a second channel, so that the first target terminal converts the current channel from the second channel to the first channel; as an optional implementation manner, when the upgrade is abnormal, an upgrade end command may also be broadcast to the target terminal through the second channel, so that the first target terminal switches the current channel from the second channel to the first channel, where the upgrade abnormal condition includes but is limited to an abnormal behavior of the gateway device, or an abnormal behavior of the terminal such as power failure.
Optionally, the communication data in the upgrade end command includes an upgrade identifier for instructing the target terminal to end the upgrade, and specifically, the upgrade identifier may be identified by a specific numerical value, for example, setting the upgrade identifier to 0 to indicate the upgrade end command.
And by adopting a broadcast upgrading mode, the upgrading efficiency can be greatly improved. Taking a gateway device connected with 32 terminals as an example, compared with the original traditional point-to-point scheme, under the condition that upgrade failure is not considered, a point-to-point upgrade scheme is adopted, the upgrade time of the gateway device for completing one terminal is assumed to be 5min, the upgrade of all terminals is completed, and the total time required is 5min x 32-160 min. And the embodiment of the application adopts the broadcast mode for upgrading, and because all the terminals receive the upgrading packet data at the same time, the time for completing upgrading is only 5min, and the upgrading efficiency is greatly improved.
Optionally, after the broadcast upgrade is completed, the gateway device sends a message for confirming the upgrade state to at least one target terminal in turn, and receives an upgrade data table reported by at least one target terminal with upgrade failure, wherein the upgrade data table carries an identifier indicating whether each upgrade data sub-package is successfully received by the target terminal;
the gateway equipment determines at least one target terminal which fails in upgrading according to the upgrading data table;
and the gateway equipment transmits an upgrade data sub-packet carrying the unreceived upgrade data to the at least one target terminal failed in the upgrade through a second channel by adopting a half-duplex or full-duplex mode, and receives the data reported by the at least one target terminal failed in the upgrade through a first channel.
Specifically, the upgrade table introduced by the terminal has 175 bytes in total, each byte has 8 bits, each bit represents the state of 1 upgrade package, and can represent the upgrade state of 1400 upgrade packages at most, if the terminal receives the upgrade data package successfully, 1 is set at the corresponding position, otherwise, 0 is set. (an upgrade file of 67K size can be supported, calculated as 48 bytes per upgrade package).
In the prior art, after the upgrade fails, when a failed terminal communicates with the gateway device again, the terminal communication node communicates with the gateway device at random to acquire information of a failed upgrade package, and by adopting the method, the failure of acquiring the upgrade package may occur under the condition that a plurality of terminal communication nodes communicate simultaneously, which is low in efficiency, but the method of the embodiment of the application is summarized.
Optionally, this application embodiment can adopt Semthch's SX 1302's wireless communication chip, and above-mentioned wireless communication chip is inside to have a plurality of radio frequency's passageway, and gateway equipment adopts this wireless chip, can realize when the channel of difference, and full duplex work is supported in simultaneous data transmission and receipt, compares the mode of current single channel, can promote upgrading efficiency.
The upgrade method based on radio broadcasting proposed by the embodiment of the present application is described in detail below with reference to specific embodiments, wherein the upgrade method is explained in terms of single channel communication and dual channel communication respectively from a gateway device.
As shown in fig. 4, when the gateway device is a single channel, the upgrade method based on radio broadcast provided by the present application includes:
step S401, monitoring the reported information of a plurality of target terminals communicating with the gateway equipment through a first channel, and determining whether the target terminals needing to be upgraded exist;
step S402, if yes, an upgrade command indicating the upgrade of the target terminal is broadcasted through a first channel, so that the target terminal converts the current channel from the first channel to a second channel after receiving the upgrade command, wherein the second channel is only used for transmitting an upgrade data packet;
step S403, opening the second channel, and switching the current channel between the first channel and the second channel in turn;
step S404, when it is determined that the upgrade data is broadcasted, an upgrade ending command is broadcasted to the target terminal through a second channel, so that the first target terminal converts the current channel from the second channel to the first channel, and closes the second channel;
step S405, sending messages for confirming the upgrading state to at least one target terminal in turn, and receiving an upgrading data table reported by at least one target terminal with upgrading failure, wherein the upgrading data table carries an identifier indicating whether the target terminal successfully receives each upgrading data sub-package;
step S406, determining at least one target terminal which fails in upgrading according to the upgrading data table;
step S407, sending an upgrade data sub-packet carrying unsuccessful reception to the at least one target terminal failing to upgrade through a second channel, and receiving data reported by the at least one target terminal failing to upgrade through a first channel.
As shown in fig. 5, when the gateway device is a multi-channel device, the upgrade method based on wireless broadcast provided by the present application includes:
step S501, monitoring the reported information of a plurality of target terminals communicating with the gateway equipment through a first channel, and determining whether the target terminals needing to be upgraded exist;
step S502, an upgrade order indicating the upgrade of the target terminal is broadcasted through a first channel, so that the target terminal converts the current channel from the first channel to a second channel after receiving the upgrade order, wherein the second channel is only used for transmitting an upgrade data packet;
step S503, a second channel is opened, and the reporting information of a plurality of target terminals communicating with the gateway device is monitored through the first channel while the upgrade data packet of the target terminal is broadcasted through the second channel;
step S504, when it is determined that the upgrade data is broadcasted, an upgrade ending command is broadcasted to the target terminal through a second channel, so that the first target terminal converts the current channel from the second channel to the first channel, and closes the second channel;
step S505, sending messages for confirming the upgrading state to at least one target terminal in turn, and receiving an upgrading data table reported by at least one target terminal with upgrading failure, wherein the upgrading data table carries an identifier indicating whether the target terminal successfully receives each upgrading data sub-package;
step S506, determining at least one target terminal which fails in upgrading according to the upgrading data table;
step S507, sending an upgrade data sub-packet carrying unsuccessful reception to the at least one target terminal failing to upgrade through the second channel, and receiving data reported by the at least one target terminal failing to upgrade through the first channel.
The upgrade method based on the radio broadcasting according to the present invention is explained above, and the apparatus for performing the upgrade based on the radio broadcasting is explained below.
Please refer to fig. 6, which illustrates an apparatus for upgrading based on radio broadcasting according to an embodiment of the present invention, including:
a monitoring module 601, configured to monitor, through a first channel, report information of multiple target terminals communicating with the gateway device, and determine whether a target terminal that needs to be upgraded exists;
a conversion module 602, configured to broadcast, if there is a target terminal that needs to be upgraded, an upgrade command indicating that the target terminal is upgraded through a first channel, so that after receiving the upgrade command, the target terminal converts a current channel from the first channel to a second channel, where the second channel is only used for upgrade data packet transmission;
the broadcasting module 603 is configured to start a second channel to broadcast the upgrade data packet of the target terminal, and close the second channel when the upgrade data packet is completely broadcast.
Optionally, the broadcast module is configured to start a second channel to broadcast the upgrade data packet of the target terminal, and specifically configured to:
opening a second channel, and switching the current channel between the first channel and the second channel in turn; or
And opening a second channel, and monitoring the report information of a plurality of target terminals communicated with the gateway equipment through the first channel while broadcasting the upgrade data packet of the target terminal through the second channel.
Optionally, the broadcast module is configured to close the second channel when the upgrade data packet is broadcast, and specifically configured to:
when the upgrade data is determined to be broadcasted, broadcasting an upgrade ending command to the target terminal through a second channel so that the first target terminal can convert the current channel from the second channel to the first channel;
closing the second channel.
Optionally, the broadcast module is configured to start a second channel to broadcast the upgrade data packet of the target terminal, and specifically configured to:
if the gateway equipment is connected with the target terminal through one channel, switching the current channel between a first channel and a second channel in turn;
and if the gateway equipment is connected with the target terminal through at least two channels, monitoring the reported information of a plurality of target terminals communicated with the gateway equipment by taking one channel as a first channel, and broadcasting the upgrade data packet of the target terminal by taking the other channel as a second channel.
Optionally, the broadcast module is configured to broadcast an upgrade data packet to the target terminal, where the upgrade data packet includes at least one of the following:
the frame header is used for carrying control information for indicating the gateway equipment to communicate with the target terminal;
a gateway device address, wherein the gateway device address is an IP address of a gateway device;
the node address is used for indicating that the gateway equipment transmits a data packet in a broadcasting mode;
a frame command type;
a data length for characterizing a size of the data packet;
communication data, wherein the communication data is the upgrading data content of the data packet;
and the checksum is the accumulated sum of data bits in the process of broadcasting the data packet.
Optionally, the conversion module is configured to instruct the target terminal to upgrade through an upgrade data packet carrying an upgrade command, where communication data of the upgrade command data packet includes at least one of the following:
an upgrade identifier for indicating the target terminal to start upgrading;
the upgrading type is used for indicating the target terminal to judge whether the upgrading data type is consistent with the type of the target terminal;
the version number of the upgrade data code is used for indicating the target terminal to judge whether the version of the upgrade data is consistent with the version of the target terminal;
the upgrade data sub-packet number is used for indicating the target terminal to judge the upgrade data sub-packet number of the current upgrade state, wherein the upgrade data packet comprises at least one upgrade data sub-packet;
the upgrade data sub-packet total accumulated sum is used for indicating the target terminal to judge whether the data packet is correct or not;
a total CRC16 check value of the upgrade data packet for instructing the target terminal to determine whether the data packet is correct;
and the upgrade timeout time is used for indicating the target terminal to judge that the current upgrade duration exceeds the preset duration and determining the upgrade timeout time for forcibly ending the current upgrade process.
Optionally, the communication data in the upgrade data packet includes at least one of the following:
an upgrade identifier for indicating the target terminal to start upgrading;
the upgrade data sub-packet serial number is used for indicating the current upgrade data state;
upgrade data content for instructing the target terminal to upgrade;
a CRC16 check value of the upgrade packet for instructing the target terminal to determine whether the packet is correct.
Optionally, the upgrade data package includes at least one upgrade data sub-package, and further includes:
sending messages for confirming the upgrading state to at least one target terminal in turn, and receiving an upgrading data table reported by at least one target terminal with upgrading failure, wherein the upgrading data table carries an identifier indicating whether the target terminal successfully receives each upgrading data sub-package;
determining at least one target terminal which fails to be upgraded according to the upgrading data table;
and sending an upgrade data sub-packet carrying the unreceived upgrade data to the at least one target terminal failing in the upgrade through a second channel, and receiving data reported by the at least one target terminal failing in the upgrade through a first channel.
The above describes a radio broadcast based upgrade apparatus in the present embodiment from the perspective of a modular functional entity, and the following describes an electronic device for radio broadcast based upgrade in the present embodiment from the perspective of hardware processing.
Referring to fig. 7, in an embodiment of the present application, an electronic device for upgrading based on radio broadcasting includes:
at least one processor 701 and at least one memory 702, and a bus system 709;
wherein the memory stores program code that, when executed by the processor, causes the processor to perform the following:
monitoring the reported information of a plurality of target terminals communicated with the gateway equipment through a first channel, and determining whether the target terminals needing to be upgraded exist;
if yes, an upgrade command indicating the upgrade of the target terminal is broadcasted through a first channel, so that the target terminal receives the upgrade command and then converts the current channel from the first channel to a second channel, wherein the second channel is only used for transmitting an upgrade data packet;
and starting a second channel to broadcast the upgrade data packet of the target terminal, and closing the second channel when the upgrade data packet is broadcast.
Fig. 7 is a schematic diagram of an upgraded electronic device based on wireless broadcasting according to an embodiment of the present disclosure, where the device 700 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPU) 701 (e.g., one or more processors) and a memory 702, and one or more storage media 703 (e.g., one or more mass storage devices) for storing applications 704 or data 705. Memory 702 and storage medium 703 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 703 may include one or more modules (not shown), and each module may include a series of instructions operating on the information processing apparatus. Further, the processor 701 may be configured to communicate with the storage medium 703 to execute a series of instruction operations in the storage medium 703 on the device 700.
The device 700 may also include one or more wired or wireless network interfaces 707, one or more input-output interfaces 708, and/or one or more operating systems 706, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
Optionally, the processor is configured to start a second channel to broadcast the upgrade data packet of the target terminal, and specifically configured to:
opening a second channel, and switching the current channel between the first channel and the second channel in turn; or
And opening a second channel, and monitoring the report information of a plurality of target terminals communicated with the gateway equipment through the first channel while broadcasting the upgrade data packet of the target terminal through the second channel.
Optionally, the processor is configured to close the second channel when the upgrade data packet is broadcast, and specifically configured to:
when the upgrade data is determined to be broadcasted, broadcasting an upgrade ending command to the target terminal through a second channel so that the first target terminal can convert the current channel from the second channel to the first channel;
closing the second channel.
Optionally, the processor is configured to start a second channel to broadcast the upgrade data packet of the target terminal, and specifically configured to:
if the gateway equipment is connected with the target terminal through one channel, switching the current channel between a first channel and a second channel in turn;
and if the gateway equipment is connected with the target terminal through at least two channels, monitoring the reported information of a plurality of target terminals communicated with the gateway equipment by taking one channel as a first channel, and broadcasting the upgrade data packet of the target terminal by taking the other channel as a second channel.
Optionally, the upgrade data packet broadcasted to the target terminal includes at least one of the following:
the frame header is used for carrying control information for indicating the gateway equipment to communicate with the target terminal;
a gateway device address, wherein the gateway device address is an IP address of a gateway device;
the node address is used for indicating that the gateway equipment transmits a data packet in a broadcasting mode;
a frame command type;
a data length for characterizing a size of the data packet;
communication data, wherein the communication data is the upgrading data content of the data packet;
and the checksum is the accumulated sum of data bits in the process of broadcasting the data packet.
Optionally, the target terminal is instructed to be upgraded by an upgrade data packet carrying an upgrade command, and communication data of the upgrade command data packet includes at least one of the following:
an upgrade identifier for indicating the target terminal to start upgrading;
the upgrading type is used for indicating the target terminal to judge whether the upgrading data type is consistent with the type of the target terminal;
the version number of the upgrade data code is used for indicating the target terminal to judge whether the version of the upgrade data is consistent with the version of the target terminal;
the upgrade data sub-packet number is used for indicating the target terminal to judge the upgrade data sub-packet number of the current upgrade state, wherein the upgrade data packet comprises at least one upgrade data sub-packet;
the upgrade data sub-packet total accumulated sum is used for indicating the target terminal to judge whether the data packet is correct or not;
a total CRC16 check value of the upgrade data packet for instructing the target terminal to determine whether the data packet is correct;
and the upgrade timeout time is used for indicating the target terminal to judge that the current upgrade duration exceeds the preset duration and determining the upgrade timeout time for forcibly ending the current upgrade process.
Optionally, the communication data in the upgrade data packet includes at least one of the following:
an upgrade identifier for indicating the target terminal to start upgrading;
the upgrade data sub-packet serial number is used for indicating the current upgrade data state;
upgrade data content for instructing the target terminal to upgrade;
a CRC16 check value of the upgrade packet for instructing the target terminal to determine whether the packet is correct.
Optionally, the upgrade data package includes at least one upgrade data sub-package, and further includes:
sending messages for confirming the upgrading state to at least one target terminal in turn, and receiving an upgrading data table reported by at least one target terminal with upgrading failure, wherein the upgrading data table carries an identifier indicating whether the target terminal successfully receives each upgrading data sub-package;
determining at least one target terminal which fails to be upgraded according to the upgrading data table;
and sending an upgrade data sub-packet carrying the unreceived upgrade data to the at least one target terminal failing in the upgrade through a second channel, and receiving data reported by the at least one target terminal failing in the upgrade through a first channel.
Embodiments of the present invention also provide a computer-readable storage medium, which includes instructions that, when executed on a computer, cause the computer to perform the method for upgrading based on radio broadcasting provided in the foregoing embodiments.
The embodiment of the present application further provides a computer program product, which includes a computer program, where the computer program includes program instructions, and when the program instructions are executed by an electronic device, the electronic device is caused to execute the upgrade method based on radio broadcast provided in the foregoing embodiment.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The technical solutions provided by the present application are introduced in detail, and the present application applies specific examples to explain the principles and embodiments of the present application, and the descriptions of the above examples are only used to help understand the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (11)

1. An upgrade method based on wireless broadcast is applied to gateway equipment, and the method comprises the following steps:
monitoring the reported information of a plurality of target terminals communicated with the gateway equipment through a first channel, and determining whether the target terminals needing to be upgraded exist;
if yes, an upgrade command indicating the upgrade of the target terminal is broadcasted through a first channel, so that the target terminal receives the upgrade command and then converts the current channel from the first channel to a second channel, wherein the second channel is only used for transmitting an upgrade data packet;
and starting a second channel to broadcast the upgrade data packet of the target terminal, and closing the second channel when the upgrade data packet is broadcast.
2. The method of claim 1, wherein enabling a second channel to broadcast the upgrade data package of the target terminal comprises:
opening a second channel, and switching the current channel between the first channel and the second channel in turn; or
And opening a second channel, and monitoring the report information of a plurality of target terminals communicated with the gateway equipment through the first channel while broadcasting the upgrade data packet of the target terminal through the second channel.
3. The method of claim 2, wherein closing the second channel when the upgrade packet is broadcast comprises:
when the upgrade data is determined to be broadcasted, broadcasting an upgrade ending command to the target terminal through a second channel so that the first target terminal can convert the current channel from the second channel to the first channel;
closing the second channel.
4. The method of claim 2, wherein enabling a second channel to broadcast the upgrade data package of the target terminal comprises:
if the gateway equipment is connected with the target terminal through one channel, switching the current channel between a first channel and a second channel in turn;
and if the gateway equipment is connected with the target terminal through at least two channels, monitoring the reported information of a plurality of target terminals communicated with the gateway equipment by taking one channel as a first channel, and broadcasting the upgrade data packet of the target terminal by taking the other channel as a second channel.
5. The method of claim 1, wherein the upgrade data packet broadcast to the target terminal comprises at least one of:
the frame header is used for carrying control information for indicating the gateway equipment to communicate with the target terminal;
a gateway device address, wherein the gateway device address is an IP address of a gateway device;
the node address is used for indicating that the gateway equipment transmits a data packet in a broadcasting mode;
a frame command type;
a data length for characterizing a size of the data packet;
communication data, wherein the communication data is the upgrading data content of the data packet;
and the checksum is the accumulated sum of data bits in the process of broadcasting the data packet.
6. The method according to claim 5, wherein the target terminal is instructed to upgrade by an upgrade data packet carrying an upgrade command, and the communication data of the upgrade command data packet includes at least one of:
an upgrade identifier for indicating the target terminal to start upgrading;
the upgrading type is used for indicating the target terminal to judge whether the upgrading data type is consistent with the type of the target terminal;
the version number of the upgrade data code is used for indicating the target terminal to judge whether the version of the upgrade data is consistent with the version of the target terminal;
the upgrade data sub-packet number is used for indicating the target terminal to judge the upgrade data sub-packet number of the current upgrade state, wherein the upgrade data packet comprises at least one upgrade data sub-packet;
the upgrade data sub-packet total accumulated sum is used for indicating the target terminal to judge whether the data packet is correct or not;
a total CRC16 check value of the upgrade data packet for instructing the target terminal to determine whether the data packet is correct;
and the upgrade timeout time is used for indicating the target terminal to judge that the current upgrade duration exceeds the preset duration and determining the upgrade timeout time for forcibly ending the current upgrade process.
7. The method of claim 5, wherein the communication data in the upgrade data packet comprises at least one of:
an upgrade identifier for indicating the target terminal to start upgrading;
the upgrade data sub-packet serial number is used for indicating the current upgrade data state;
upgrade data content for instructing the target terminal to upgrade;
a CRC16 check value of the upgrade packet for instructing the target terminal to determine whether the packet is correct.
8. The method of claim 1, wherein the upgrade data package comprises at least one upgrade data sub-package, further comprising:
sending messages for confirming the upgrading state to at least one target terminal in turn, and receiving an upgrading data table reported by at least one target terminal with upgrading failure, wherein the upgrading data table carries an identifier indicating whether the target terminal successfully receives each upgrading data sub-package;
determining at least one target terminal which fails to be upgraded according to the upgrading data table;
and sending an upgrade data sub-packet carrying the unreceived upgrade data to the at least one target terminal failing in the upgrade through a second channel, and receiving data reported by the at least one target terminal failing in the upgrade through a first channel.
9. An upgrade apparatus based on wireless broadcasting, the apparatus comprising:
the monitoring module is used for monitoring the reported information of a plurality of target terminals which are communicated with the gateway equipment through a first channel and determining whether the target terminals which need to be upgraded exist;
the conversion module is used for broadcasting an upgrading command indicating the upgrading of the target terminal through a first channel if the target terminal needing upgrading exists, so that the target terminal converts the current channel from the first channel to a second channel after receiving the upgrading command, wherein the second channel is only used for upgrading data packet transmission;
and the broadcasting module is used for starting a second channel to broadcast the upgrade data packet of the target terminal and closing the second channel when the upgrade data packet is broadcast.
10. An upgraded electronic device based on wireless broadcasting, comprising: a memory, a processor;
wherein the memory is used for storing programs;
the processor is configured to execute a program in the memory to implement the method of any one of claims 1 to 8.
11. A computer-readable storage medium comprising computer program instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 8.
CN202011256436.9A 2020-11-11 2020-11-11 Upgrading method and device based on wireless broadcast and electronic equipment Active CN112423321B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011256436.9A CN112423321B (en) 2020-11-11 2020-11-11 Upgrading method and device based on wireless broadcast and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011256436.9A CN112423321B (en) 2020-11-11 2020-11-11 Upgrading method and device based on wireless broadcast and electronic equipment

Publications (2)

Publication Number Publication Date
CN112423321A true CN112423321A (en) 2021-02-26
CN112423321B CN112423321B (en) 2022-07-19

Family

ID=74781695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011256436.9A Active CN112423321B (en) 2020-11-11 2020-11-11 Upgrading method and device based on wireless broadcast and electronic equipment

Country Status (1)

Country Link
CN (1) CN112423321B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113194461A (en) * 2021-04-30 2021-07-30 清华四川能源互联网研究院 Firmware over-the-air upgrading method and device, computer equipment and storage medium
CN113220328A (en) * 2021-05-17 2021-08-06 深圳市元征科技股份有限公司 Upgrading method and device, computer equipment and storage medium
CN113485735A (en) * 2021-07-22 2021-10-08 三维通信股份有限公司 Equipment upgrading method and device, storage medium and electronic device
CN114024847A (en) * 2021-09-28 2022-02-08 浙江大华技术股份有限公司 Road side unit upgrading method, vehicle wireless communication information broadcasting method and related device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017221104A1 (en) * 2016-06-24 2017-12-28 Unified Messaging Systems As Methods and systems for managing location based alert messages
CN108768709A (en) * 2018-05-18 2018-11-06 深圳国人通信股份有限公司 A kind of serial ports remote upgrade method of the network equipment
CN108845820A (en) * 2018-09-20 2018-11-20 广东美的暖通设备有限公司 firmware batch upgrading method, system and air conditioner
WO2020036524A1 (en) * 2018-08-17 2020-02-20 Telefonaktiebolaget Lm Ericsson (Publ) First network node, second network node, wireless device and methods performed thereby for handling a link switch
CN111327454A (en) * 2020-01-20 2020-06-23 深圳市广和通无线股份有限公司 File upgrading method and device, computer equipment and storage medium
CN111432400A (en) * 2020-02-19 2020-07-17 成都四相致新科技有限公司 Cluster OTA upgrading method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017221104A1 (en) * 2016-06-24 2017-12-28 Unified Messaging Systems As Methods and systems for managing location based alert messages
CN108768709A (en) * 2018-05-18 2018-11-06 深圳国人通信股份有限公司 A kind of serial ports remote upgrade method of the network equipment
WO2020036524A1 (en) * 2018-08-17 2020-02-20 Telefonaktiebolaget Lm Ericsson (Publ) First network node, second network node, wireless device and methods performed thereby for handling a link switch
CN108845820A (en) * 2018-09-20 2018-11-20 广东美的暖通设备有限公司 firmware batch upgrading method, system and air conditioner
CN111327454A (en) * 2020-01-20 2020-06-23 深圳市广和通无线股份有限公司 File upgrading method and device, computer equipment and storage medium
CN111432400A (en) * 2020-02-19 2020-07-17 成都四相致新科技有限公司 Cluster OTA upgrading method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113194461A (en) * 2021-04-30 2021-07-30 清华四川能源互联网研究院 Firmware over-the-air upgrading method and device, computer equipment and storage medium
CN113220328A (en) * 2021-05-17 2021-08-06 深圳市元征科技股份有限公司 Upgrading method and device, computer equipment and storage medium
CN113485735A (en) * 2021-07-22 2021-10-08 三维通信股份有限公司 Equipment upgrading method and device, storage medium and electronic device
CN113485735B (en) * 2021-07-22 2024-07-02 三维通信股份有限公司 Equipment upgrading method and device, storage medium and electronic device
CN114024847A (en) * 2021-09-28 2022-02-08 浙江大华技术股份有限公司 Road side unit upgrading method, vehicle wireless communication information broadcasting method and related device
CN114024847B (en) * 2021-09-28 2024-04-12 浙江大华技术股份有限公司 Road side unit upgrading and vehicle wireless communication information broadcasting method and related device

Also Published As

Publication number Publication date
CN112423321B (en) 2022-07-19

Similar Documents

Publication Publication Date Title
CN112423321B (en) Upgrading method and device based on wireless broadcast and electronic equipment
US11550561B2 (en) Method for upgrading energy storage system remotely, energy management system, and battery management system
US8098682B2 (en) System and method for interfacing with a management system
US11115303B2 (en) Network connectable device and a method for monitoring a service-state of a network connected device
EP2528274A1 (en) Method and system for upgrading network device
CN1633647B (en) System and method for managing data transfers in a network
CN113721966B (en) Node upgrading method and device, storage medium and electronic device
US11082317B2 (en) Detection block sending and receiving method, and network device and system
CN107483262A (en) Fault handling method and equipment
US10931529B2 (en) Terminal device management method, server, and terminal device for managing terminal devices in local area network
CN112214441A (en) Communication switching method, equipment and system based on serial bus polling protocol
CN111711680A (en) File breakpoint continuous transmission method and device based on UDP (user Datagram protocol)
JP7185054B2 (en) Resource cycle configuration method and device, link processing and establishment method and device
CN113542057B (en) Communication fault detection method, device and system based on redundant device
CN101686144A (en) Method and system for processing data and node device
EP1952592A1 (en) Communication apparatus and method
EP3672189B1 (en) Data transmission method, device and system
CN112671575B (en) Working link switching method and device, storage medium and electronic device
US6996124B1 (en) Mechanism to strip LARQ header and regenerate FCS to support sleep mode wake up
Cisco Configuring the OC3 POS Line Card
WO2023103985A1 (en) Microwave device-based data transmission method and apparatus, storage medium, and electronic device
WO2021047483A1 (en) Protection switching method, node device and storage medium
JP2015180011A (en) Wireless lan terminal device, wireless lan system, life-and-death monitoring method of wireless lan chip, and program
CN117811702A (en) Communication data processing method, device and system
CN114268979A (en) Safe communication method for north interface of network management terminal

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