CN111443930B - Upgrading method and device of cascade terminal, storage medium and electronic terminal - Google Patents
Upgrading method and device of cascade terminal, storage medium and electronic terminal Download PDFInfo
- Publication number
- CN111443930B CN111443930B CN202010218197.1A CN202010218197A CN111443930B CN 111443930 B CN111443930 B CN 111443930B CN 202010218197 A CN202010218197 A CN 202010218197A CN 111443930 B CN111443930 B CN 111443930B
- Authority
- CN
- China
- Prior art keywords
- terminal
- current terminal
- upgrade
- upgrading
- current
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses an upgrading method, an upgrading device, a storage medium and an electronic terminal of a cascade terminal, wherein the upgrading method comprises the following steps: the current terminal receives an upgrade file sent by a previous-stage terminal of the current terminal; the current terminal sends an upgrade file to a next-stage terminal of the current terminal; the current terminal receives feedback information of a next-stage terminal of the current terminal; and the current terminal upgrades the software version by using the upgrade file according to the feedback information. According to the invention, the current terminal in the cascade terminal receives the upgrade file sent by the previous terminal, and sends the upgrade file to the next terminal cascaded with the current terminal, and version upgrade is carried out according to the feedback information and the upgrade file, so that the situation that each terminal is re-wired and the mobile equipment carries out upgrade operation in the upgrade process of the cascade terminal is avoided, the upgrade efficiency is improved, and the upgrade is carried out after the feedback information is received, the upgrade stability of the system is improved, and further the maintenance cost of the system is reduced.
Description
Technical Field
The invention relates to the technical field of terminal version upgrading, in particular to an upgrading method and device of a cascade terminal, a storage medium and an electronic terminal.
Background
With the rapid rise of the internet of things technology, the method integrates the functions of video, audio, environment quantity detection, internet phone, intelligent linkage control and the like, and realizes the integrated control of each terminal through cascading, so that the system deployment and use become more convenient and flexible, but the multi-terminal cascading mode makes the upgrading of each terminal very difficult.
The traditional upgrading method of the cascade mode is usually that an external terminal such as a notebook is directly accessed into a subsystem or a specific terminal, a customized upgrading tool is adopted to upgrade a certain subsystem or a specific terminal, the terminal does not support network upgrading, for example, in a video conference, conference cameras are all installed on a wall or a television, a large conference room may be provided with a plurality of cameras, the cameras are connected through serial port lines, when a new version of the camera is updated, one camera is needed to be upgraded, in this case, a professional is needed to go to the terminal for implementation, the terminal which needs to be upgraded is inconvenient to be directly connected with the terminal, and therefore the system maintenance cost is high, and the implementation is difficult.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a storage medium, and an electronic terminal for upgrading a cascade terminal, so as to solve the problem in the prior art that a terminal does not support network upgrade, which results in high maintenance cost in an upgrade process of the cascade terminal.
In order to achieve the purpose, the invention provides the following technical scheme:
in a first aspect, an embodiment of the present invention provides a method for upgrading a cascade terminal, including: the method comprises the steps that a current terminal receives an upgrade file sent by a previous-stage terminal of the current terminal, wherein the upgrade file is used for upgrading a software version on a cascade terminal, and the current terminal is any one of the cascade terminals; after the current terminal receives the upgrade file, the current terminal sends the upgrade file to a next-stage terminal of the current terminal so that the next-stage terminal of the current terminal finishes software version upgrade; the current terminal receives feedback information of a next-stage terminal of the current terminal, wherein the feedback information is used for indicating that the next-stage terminal of the current terminal receives the upgrade file; and the current terminal utilizes the upgrade file to upgrade the software version according to the feedback information.
In an embodiment, the receiving, by the current terminal, an upgrade file sent by a previous terminal of the current terminal includes: the current terminal receives an upgrading instruction sent by a previous terminal of the current terminal; the current terminal starts a receiving protocol for receiving the upgrade file based on the upgrade instruction; and the current terminal receives the upgrading file sent by the upper-level terminal of the current terminal based on the receiving protocol.
In an embodiment, after the current terminal receives an upgrade instruction sent by a previous terminal of the current terminal, the method further includes: the current terminal changes the baud rate of the current terminal from a default baud rate to a preset baud rate, wherein the preset baud rate is the baud rate for transmitting the upgrade file; after the current terminal receives the upgrade file sent by the previous terminal of the current terminal based on the receiving protocol, the method further includes: and the current terminal changes the baud rate of the current terminal from the preset baud rate to the default baud rate.
In an embodiment, the sending, by the current terminal, the upgrade file to a next-stage terminal of the current terminal includes: the current terminal sends an upgrading instruction to a next-stage terminal of the current terminal, and simultaneously starts a sending protocol for sending the upgrading file, wherein the upgrading instruction is used for controlling the next-stage terminal of the current terminal to start a receiving protocol for receiving the upgrading file; and the current terminal sends the upgrade file to a next-stage terminal of the current terminal based on the sending protocol.
In an embodiment, if the next-stage terminal of the current terminal is the last upgraded terminal in the cascade terminal, the next-stage terminal of the current terminal directly uses the upgrade file to upgrade the software version; and if the next-stage terminal of the current terminal is not the last upgraded terminal in the cascade terminal, determining the next-stage terminal of the current terminal as the current terminal, and returning to execute the step that the current terminal receives the upgrade file sent by the previous-stage terminal of the current terminal.
In an embodiment, the upgrade method for a cascade terminal further includes: after any one of the cascade terminals finishes upgrading, the upgraded information is uploaded to an external upgrading terminal step by step, the external upgrading terminal is a previous-stage terminal of a first terminal in the cascade terminals and is used for sending the upgrading file to the first terminal, and the first terminal is a terminal connected with the external upgrading terminal.
In an embodiment, the upgrading file is a file package formed by packaging multiple types of software version files, and the upgrading of the software version by the current terminal according to the feedback information using the upgrading file includes: decompressing the upgrade file by the current terminal to obtain the software version files of the plurality of models; the current terminal inquires corresponding software version files from the software version files of the multiple models according to the model of the current terminal; and the current terminal carries out software version upgrading by using the inquired software version file.
In a second aspect, an embodiment of the present invention provides an upgrade apparatus for a cascade terminal, including the following modules: the receiving module is arranged on the current terminal and used for receiving the upgrading file; the sending module is arranged on the current terminal and used for sending the upgrade file; the feedback module is arranged on the current terminal and used for receiving feedback information; and the upgrading module is arranged on the current terminal and used for upgrading the software version by utilizing the upgrading file according to the feedback information.
In a third aspect, an embodiment of the present invention provides an electronic device, including: the system comprises at least one processor and a memory which is connected with the at least one processor in a communication mode, wherein the memory stores instructions which can be executed by the at least one processor, and the instructions are executed by the at least one processor so as to enable the at least one processor to execute the upgrade method of the cascading terminal in the first aspect of the embodiment of the invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer instructions are stored, and the computer instructions are configured to enable a computer to execute the upgrade method for a cascading terminal according to the first aspect of the present invention.
The technical scheme of the invention has the following advantages:
1. the method, the device, the electronic terminal and the storage medium for upgrading the cascade terminal receive the upgrade file by taking any terminal which is convenient to operate in the cascade terminal as the current terminal, send the upgrade file to the next-stage terminal cascaded with the current terminal, and then upgrade the software version of the current terminal according to the feedback information of the next-stage terminal on the receiving condition of the upgrade file and the upgrade file. The upgrading method has the advantages that the condition that each terminal is reconnected and the mobile device is upgraded in the upgrading process of the cascade terminal is avoided, upgrading efficiency is improved, the current terminal confirms that the next-level terminal receives the upgrading file and then carries out upgrading operation, the condition that the upgrading file is changed and cannot be matched with the next-level terminal to carry out upgrading operation after the current terminal is directly upgraded is avoided, or the upgrading file is directly deleted and subsequent upgrading of other cascade terminals cannot be carried out after the current terminal is upgraded, in order to save terminal memory, the upgrading file is directly deleted, the stability of system upgrading is improved, and the cost of system maintenance is further reduced.
2. According to the upgrading method and device of the cascade terminal, the electronic terminal and the storage medium, the upgrading file is sent and received through the upgrading instruction and the corresponding transmission protocol in a matching mode; the upgrade file is transmitted by adopting a preset baud rate, so that the influence on the transmission of other files or data is avoided, or the influence on the transmission of other files or data is received, and the stability of version upgrade is further improved; the external upgrading terminal receives the information of upgrading completion of each cascade terminal, so that the problem that the upgrading file cannot be successfully obtained again after the upgrading of the individual terminal fails is avoided, and the upgrading accuracy and reliability of the cascade terminal are improved; whether the terminal is the last terminal of the cascade is judged through the cascade terminal, so that the problems that the terminal cannot be upgraded after receiving feedback information of the next-stage terminal in the upgrading process or the waiting time is too long are avoided, and the safety and the stability of the system are ensured; by packaging and transmitting the upgrade files of different models, the upgrade process is adaptive to the cascade terminals of various models, and the upgrade operation is simplified.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a specific example of an upgrading method for a cascading terminal according to an embodiment of the present invention;
fig. 2 is a flowchart of a specific example that the current terminal receives an upgrade file according to an embodiment of the present invention;
fig. 3 is a flowchart of a specific example of transmission of an upgrade file with a preset baud rate in a version upgrade process according to an embodiment of the present invention;
fig. 4 is a flowchart of a specific example that a current terminal sends an upgrade file to a next-stage terminal of the current terminal according to an embodiment of the present invention;
fig. 5 is a flowchart of another specific example of an upgrading method for a cascading terminal according to an embodiment of the present invention;
fig. 6 is a flowchart of a specific example of a current terminal upgrading a software version using an upgrade file according to feedback information according to the embodiment of the present invention;
fig. 7 is a schematic diagram of an upgrading apparatus for a cascade terminal according to an embodiment of the present invention;
fig. 8 is a composition diagram of a specific example of an electronic terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. 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.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in a specific case to those of ordinary skill in the art.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Example 1
The embodiment of the invention provides an upgrading method of a cascade terminal, which can be applied to upgrading a plurality of cascade terminals, for example, the situation that all cascade cameras in a conference room are upgraded simultaneously. In the embodiment of the present invention, as shown in fig. 1, the method for upgrading a cascade terminal in the embodiment of the present invention includes the following steps:
step S1: the current terminal receives an upgrade file sent by a previous-stage terminal of the current terminal, wherein the upgrade file is used for upgrading a software version on the cascade terminal, and the current terminal is any one of the cascade terminals.
In the embodiment of the invention, the current terminal receives an upgrade file which is used for upgrading the software version on the cascade terminal, wherein the current terminal is any one of the cascade terminals, because the embodiment of the invention mainly solves the problems of high upgrade maintenance cost and inconvenient operation of the cascade terminal, the cascade terminal needing to be upgraded is at least two terminals, if the current terminal is the second terminal in the cascade terminal, the last-stage terminal of the current terminal is the first terminal in the cascade terminal, and if the current terminal is the first terminal in the cascade terminal, the last-stage terminal of the current terminal is the external upgrade terminal of the upgrade cascade terminal.
In the embodiment of the invention, a plurality of cascaded cameras in a conference room are taken as an example for explanation, the plurality of cascaded cameras are upgraded under the condition of ensuring the positions of the cameras to be still, external equipment is connected in series with any one of the cameras which are convenient to operate in a cascade terminal through a serial port line, the problem that the camera is installed too high and is inconvenient to be directly connected with the external equipment is avoided, the first camera terminal receives an upgrade file, the external equipment and a connector lug of each camera are not required to be connected in a plug-in mode, and the stability of a conference environment is ensured. It should be noted that, in the embodiment of the present invention, only the cascaded cameras are taken as an example to describe the upgrade of the cascaded terminal, in practical applications, the cascaded terminal may also be another cascaded terminal, and the external device connected in series with the cascaded terminal may also be an external terminal or a server, which is not limited to this.
Step S2: and after the current terminal receives the upgrade file, the current terminal sends the upgrade file to a next-stage terminal of the current terminal so as to enable the next-stage terminal of the current terminal to complete software version upgrade.
In the embodiment of the invention, after the current terminal receives the upgrade file, the upgrade file is directly sent to the next-stage terminal of the current terminal, so that the next-stage terminal of the current terminal finishes the software version upgrade, wherein the next-stage terminal of the current terminal is the next-stage terminal cascaded with the current terminal. The method includes that a current terminal is any one of the cascaded multiple cameras, after a first camera receives a visca instruction sent by an external upgrading device connected with the first camera through a serial port, the first camera starts an Xmodem receiving protocol of the camera, the external device starts an Xmodem sending protocol of the first camera, an upgrading file is sent to the first camera through the Xmodem protocol, and after the first camera receives the upgrading file, the upgrading file is sent to a second camera, so that the second camera finishes software version upgrading.
It should be noted that, in the embodiment of the present invention, only the cascaded cameras are taken as an example for description, and the visca instruction is also a common control instruction of the general-purpose camera, and when the cascaded terminal is other terminal equipment, the cascaded terminal may also be other corresponding control instructions, where the Xmodem serial port protocol may also be other serial port protocols, such as Xmodem _1k/Ymodem and other serial port protocols, which may be selected according to actual system requirements, and the present invention is not limited to this.
And step S3: and the current terminal receives feedback information of a next-stage terminal of the current terminal, wherein the feedback information is used for indicating that the next-stage terminal of the current terminal receives the upgrade file.
In the embodiment of the invention, after the next-stage terminal of the current terminal receives the upgrade file sent by the current terminal, the next-stage terminal of the current terminal sends a feedback message to the current terminal, wherein the feedback message is the message that the next-stage terminal of the current terminal has received the upgrade file. For example, after the second camera of the multiple cascaded cameras in the conference room receives the upgrade file sent by the first camera, the second camera sends feedback information that the upgrade file is received to the first camera, so that the first camera can be upgraded.
And step S4: and the current terminal upgrades the software version by using the upgrade file according to the feedback information.
In the embodiment of the invention, after the current terminal receives the feedback information of the next-stage terminal of the current terminal, the current terminal is upgraded by using the upgrade file. For convenience of understanding, the multiple cascaded cameras are also described as an example, after the external upgrade device and the first camera are configured, a visca instruction is sent to the first camera connected to the external upgrade device, a receiving protocol of the first camera is started, an upgrade file sent by the external device is received, then, an initialization operation of upgrading can be performed on the external device, and at the moment that the first camera is powered off and then powered on, the state of the first camera is changed into a ready state, at this moment, the first camera sends the upgrade file to a next terminal of the cascade connection, that is, to the second camera, when the second camera sends feedback information to the first camera, the first camera can be upgraded, meanwhile, the second camera sends the upgrade file to a next camera of the second camera, and so on, until all the cascaded cameras are upgraded. It should be noted that, in the embodiment of the present invention, a complete upgrade process is illustrated by cascading cameras, and this process is also applicable to other cascading terminals, and the present invention is not limited thereto.
The upgrading method of the cascade terminal provided by the invention receives the upgrading file by taking any terminal which is convenient to operate in the cascade terminal as the current terminal, sends the upgrading file to the next-stage terminal cascaded with the current terminal, and then upgrades the software version of the current terminal according to the feedback information of the next-stage terminal on the receiving condition of the upgrading file and the upgrading file. The upgrading method has the advantages that the condition that each terminal is reconnected and the mobile device is upgraded in the upgrading process of the cascade terminal is avoided, upgrading efficiency is improved, the current terminal confirms that the next-level terminal receives the upgrading file and then carries out upgrading operation, the condition that the upgrading file is changed and cannot be matched with the next-level terminal to carry out upgrading operation after the current terminal is directly upgraded is avoided, or the upgrading file is directly deleted and subsequent upgrading of other cascade terminals cannot be carried out after the current terminal is upgraded, in order to save terminal memory, the upgrading file is directly deleted, the stability of system upgrading is improved, and the cost of system maintenance is further reduced.
In a specific embodiment, as shown in fig. 2, the step of receiving, by the current terminal, the upgrade file sent by the previous terminal of the current terminal includes the following steps:
step S11: and the current terminal receives an upgrading instruction sent by a previous-stage terminal of the current terminal.
In the embodiment of the present invention, a previous terminal of a current terminal sends an upgrade instruction to the current terminal, where the previous terminal of the current terminal is a previous terminal cascaded with the current terminal, that is, assuming that there are 4 cascaded cameras in a conference room, a first camera receives an upgrade instruction and an upgrade file of an external device, the first camera sends the upgrade file to a second camera, the second camera feeds back the upgrade file to the first camera after receiving the upgrade file, and then the first camera performs an upgrade operation, and at this time, the first camera sends the upgrade instruction to the second camera. It should be noted that, in the embodiment of the present invention, a relationship between a current terminal and a terminal at a previous stage of the current terminal is described by taking 4 cascaded cameras as an example, which is not limited in practical application.
Step S12: and the current terminal starts a receiving protocol for receiving the upgrade file based on the upgrade instruction.
In the embodiment of the invention, after the current terminal receives the upgrade instruction sent by the previous terminal of the current terminal, the receiving protocol for receiving the upgrade file is started, 4 cascaded cameras are continuously arranged in a conference room, before the first camera sends the upgrade file to the second camera, the first camera sends the upgrade instruction to the second camera, so that the second camera starts the receiving protocol for receiving the upgrade file, and the first camera sends the upgrade file to the second camera.
Step S13: and the current terminal receives the upgrade file sent by the upper-level terminal of the current terminal based on the receiving protocol.
In the embodiment of the invention, after the current terminal starts the receiving protocol for receiving the upgrading file according to the received upgrading instruction, the current terminal receives the upgrading file sent by the previous-stage terminal of the current terminal according to the receiving protocol. Further, taking an example that 4 cascaded cameras are provided in the conference room as an example, the second camera is equivalent to the current terminal, the first camera of the previous terminal is equivalent to the previous terminal of the current terminal, when the first camera sends an upgrade instruction to the second camera, the second camera starts a receiving protocol, and then the second camera receives the upgrade file sent by the first camera according to the receiving protocol.
In a specific embodiment, as shown in fig. 3, in the process of version upgrade, the upgrade file is transmitted at a preset baud rate, so that influence on transmission of other files or data is avoided, or influence on transmission of other files or data is received, and thus stability of version upgrade is improved.
After the present terminal receives the upgrade order sent by the previous terminal of the present terminal, the embodiment of the present invention further includes the following steps:
step S012: the current terminal changes the baud rate of the current terminal from the default baud rate to a preset baud rate, and the preset baud rate is the baud rate for transmitting the upgrade file.
In the embodiment of the invention, the current terminal changes the baud rate of the current terminal from the default baud rate to the preset baud rate, wherein the preset baud rate is the baud rate for transmitting the upgrade file, the baud rate indicates the number of code element symbols transmitted every second, and is an index for measuring the data transmission rate, and the baud rate is represented by the frequency of carrier modulation state change in unit time. In an information transmission channel, a signal unit carrying data information is called a symbol, and the number of symbols transmitted through the channel per second is called a symbol transmission rate, which is referred to as a baud rate for short. The baud rate is an indicator of the bandwidth of the transmission channel. In practical application, the rate of a single chip or a computer during serial port communication refers to the change of a signal in unit time after being modulated, i.e., the number of times of carrier parameter change in unit time, for example, the data transmission rate is 240b/s, each character format includes 10 bits (1 start bit, 1 stop bit, 8 valid data bits), the baud rate at this time is 240baud, the baud rate can be understood as how many symbols data are transmitted (or received) by a device in one second, which is a measure of the symbol transmission rate, and 1 baud refers to 1 symbol transmitted (through different modulation modes, multiple bit information can be loaded on one symbol).
After the present terminal receives the upgrade file sent by the previous terminal of the present terminal based on the receiving protocol, the embodiment of the present invention further comprises the following steps:
step S003: the current terminal changes the baud rate of the current terminal from the preset baud rate to the default baud rate.
In the embodiment of the invention, after the current terminal sends the upgrade file, the current terminal changes the baud rate of the current terminal from the preset baud rate to the default baud rate so as to complete the upgrade operation of the current terminal without being confused with other terminals.
It should be noted that, in the embodiment of the present invention, the preset baud rate and the default baud rate are set according to the system and the practical application of the terminal, and the present invention is not limited thereto.
In a specific embodiment, as shown in fig. 4, the step of sending the upgrade file to the next-stage terminal of the current terminal by the current terminal includes the following steps:
step S21: the current terminal sends an upgrading instruction to a next-stage terminal of the current terminal, and simultaneously starts a sending protocol for sending the upgrading file, wherein the upgrading instruction is used for controlling the next-stage terminal of the current terminal to start a receiving protocol for receiving the upgrading file.
In the embodiment of the present invention, the current terminal sends an upgrade instruction to the next-stage terminal of the current terminal, the current terminal starts a sending protocol for sending an upgrade file, and the next-stage terminal of the current terminal receives the upgrade instruction and starts a receiving protocol for receiving the upgrade file.
Step S22: and the current terminal sends the upgrade file to the next-stage terminal of the current terminal based on the sending protocol.
In practical application, after the next-stage terminal of the current terminal receives the upgrade file, the next-stage terminal of the current terminal first determines whether the next-stage terminal of the current terminal is the last upgraded terminal in the cascade terminal, so as to confirm whether the upgrade file needs to be sent to the next-stage terminal or the upgrade operation needs to be directly performed.
In a specific embodiment, as shown in fig. 5, when sending the upgrade file to the next-stage terminal, it needs to first determine whether the next-stage terminal of the current terminal is the last upgraded terminal in the cascade terminal.
Step S5: and if the next-stage terminal of the current terminal is the last upgraded terminal in the cascade terminals, directly upgrading the software version by using the upgrade file.
In the embodiment of the invention, if the next-stage terminal of the current terminal is the last upgraded terminal in the cascade terminals, the next-stage terminal of the current terminal directly utilizes the upgrade file to upgrade the software version after waiting for a period of time. Taking a plurality of cascading cameras in a conference room as an example, under the condition that the next-stage terminal of the current terminal is the last upgraded terminal in the cascading terminals, the fact that two cascading cameras exist in the conference room at the moment is shown, and the external equipment is connected with the first camera through a serial port line. It should be noted that, in the embodiment of the present invention, the updating after waiting for a period of time is performed to prevent the judgment information from being incorrect until the next-stage terminal of the current terminal is determined to be the last terminal, and then the updating is performed, so that the accuracy of the updating process is ensured, which is not limited in the present invention.
Step S6: and if the next-stage terminal of the current terminal is not the last upgraded terminal in the cascade terminal, determining the next-stage terminal of the current terminal as the current terminal, and returning to execute the step that the current terminal receives the upgrade file sent by the previous-stage terminal of the current terminal.
In practical application, if the next-stage terminal of the current terminal is not the last upgraded terminal in the cascade terminal, the next-stage terminal of the current terminal is determined as the current terminal, and the upgrading work of the subsequent cascade terminal is continuously completed. Taking a plurality of cascading cameras in a conference room as an example, under the condition that a next-stage terminal of a current terminal is not the last upgraded terminal in the cascading terminals, the cascading terminals are at least three cameras at the moment, after receiving an upgrade file, a second camera sends the upgrade file to a third camera, and after receiving feedback information of the third camera, the second camera starts to upgrade the version of the camera by using the upgrade file.
In a specific embodiment, in order to ensure that all terminals in the cascade terminals are upgraded, after any one of the cascade terminals is upgraded, the upgraded message is uploaded to an external upgrade terminal step by step, the external upgrade terminal is a previous-stage terminal of a first terminal in the cascade terminals and is used for sending an upgrade file to the first terminal, and the first terminal is a terminal connected with the external upgrade terminal. For example, there are 4 cascaded cameras in a conference room, an external upgrade terminal is connected to a first camera, an upgrade file is sent to the first camera, the first camera returns a message carrying the upgrade completion of the information of the camera to the external upgrade terminal after completing the upgrade, the message carrying the upgrade completion of the information of the second camera is sent to the first camera first and then returned to the external upgrade terminal through the first camera after completing the upgrade of the second camera, and similarly, the third and fourth cameras need to transmit the message carrying the upgrade completion step by step to the upper one-level terminal until the message is sent to the external upgrade terminal. Therefore, after the external upgrading terminal receives the message of the last terminal after upgrading, the terminal which does not return the message of upgrading completion can be found, and direct connection upgrading or the upgrading operation is carried out on the terminal which does not complete upgrading according to the circumstances, so that the upgrading completion accuracy and reliability of all the cascade terminals are ensured.
In a specific embodiment, as shown in fig. 6, an upgrade file in the embodiment of the present invention is a file package formed by packaging multiple types of software version files, and a current terminal performs software version upgrade using the upgrade file according to feedback information, including the following steps:
step S41: and the current terminal decompresses the upgrade file to obtain software version files of multiple models.
In the embodiment of the invention, after the current terminal receives the feedback information of the next-stage terminal of the current terminal, the terminal upgrading operation is started by using the upgrading file, when the models of all the terminals are different, all the required versions are packaged into one upgrading file package, and each terminal obtains the files of the software versions of a plurality of models after decompressing by decompressing the upgrading file, so that the terminal can be matched with the corresponding upgrading file. It should be noted that, if all the cascading terminal models are consistent, the terminal can be upgraded by directly using an upgrade file, and the problem of mismatch does not exist.
Step S42: and the current terminal inquires corresponding software version files from the software version files of multiple models according to the model of the current terminal.
In the embodiment of the invention, when the models of the cascade terminals are different and files of software versions of a plurality of models are obtained by decompression, the current terminal inquires corresponding software version files from the files of the software versions of the plurality of models according to the model of the current terminal, wherein the current terminal can search the names of the decompressed upgrade files in a traversing manner, find the upgrade files corresponding to the model of the current terminal and then upgrade the current terminal.
In practical application, when the external device packages upgrade files of all versions and models, the upgrade files are omitted or other upgrade files are packaged incorrectly, when the current terminal performs traversal search on the name of the decompressed upgrade file, the upgrade file corresponding to the current terminal model is not found after traversal is finished, and then information of upgrade failure of the external device is returned, so that upgrade failure of the current terminal is indicated, and new upgrade files need to be packaged and sent again.
It should be noted that, the embodiment of the present invention only illustrates that traversal search is performed through file names, and in practical applications, search may also be performed through other identifiers for distinguishing upgrade files of different models, such as a special field or an ID, which is not limited by the present invention.
Step S43: and the current terminal utilizes the inquired software version file to upgrade the software version.
In the embodiment of the invention, after the current terminal obtains the upgrade file matched with the model of the current terminal, the version of the current terminal can be upgraded by using the upgrade file.
According to the upgrading method of the cascade terminal, the upgrading instruction is matched with the corresponding transmission protocol, so that the sending and receiving of the upgrading file are realized; the upgrade file is transmitted by adopting a preset baud rate, so that the influence on the transmission of other files or data is avoided, or the influence on the transmission of other files or data is received, and the stability of version upgrade is further improved; the external upgrading terminal receives the information of upgrading completion of each cascade terminal, so that the problem that the upgrading file cannot be successfully obtained again after the upgrading of the individual terminal fails is avoided, and the upgrading accuracy and reliability of the cascade terminal are improved; whether the terminal is the last terminal of the cascade is judged through the cascade terminal, so that the problems that the terminal cannot be upgraded after receiving feedback information of the next-stage terminal in the upgrading process or the waiting time is too long are avoided, and the safety and the stability of the system are ensured; by packaging and transmitting the upgrade files of different models, the upgrade process is adaptive to the cascade terminals of various models, and the upgrade operation is simplified.
Example 2
An embodiment of the present invention provides an upgrade apparatus for a cascade terminal, which is disposed on each cascade terminal, and as shown in fig. 7, the upgrade apparatus for a cascade terminal includes:
the receiving module 1 is arranged on the current terminal and used for receiving an upgrade file sent by a previous-stage terminal of the current terminal, wherein the upgrade file is used for upgrading a software version on the cascade terminal, and the current terminal is any one of the cascade terminals.
And the sending module 2 is arranged on the current terminal and used for sending the upgrade file to the next-stage terminal of the current terminal after the current terminal receives the upgrade file, so that the next-stage terminal of the current terminal finishes software version upgrade.
And the feedback module 3 is arranged on the current terminal and used for receiving feedback information of a next-stage terminal of the current terminal, wherein the feedback information is used for indicating that the next-stage terminal of the current terminal receives the upgrade file.
And the upgrading module 4 is arranged on the current terminal and is used for upgrading the software version by utilizing the upgrading file according to the feedback information.
In other embodiments, the upgrade apparatus of the cascade terminal may further implement the steps of any of the specific embodiments of the upgrade method of the cascade terminal described above, and implement the same functions as those of the method embodiments, which are not described herein again.
The upgrading device of the cascade terminal provided by the invention receives the upgrading file by taking any terminal which is convenient to operate in the cascade terminal as the current terminal, sends the upgrading file to the next-stage terminal cascaded with the current terminal, and then upgrades the software version of the current terminal according to the feedback information of the next-stage terminal on the receiving condition of the upgrading file and the upgrading file. The method avoids rewiring of each terminal and upgrading operation of the mobile equipment in the upgrading process of the cascade terminal, and improves the upgrading efficiency; the current terminal firstly confirms that the next-stage terminal receives the upgrade file and then carries out upgrade operation, so that the situation that the upgrade file cannot be matched with the next-stage terminal for upgrade due to the fact that the upgrade file is changed after the current terminal is directly upgraded is avoided, or in order to save the internal memory of the terminal after the current terminal is upgraded, the upgrade file is directly deleted and the subsequent upgrade of other cascade terminals cannot be carried out, the upgrade file is transmitted by adopting a preset baud rate, the influence on the transmission of other files or data is avoided, or the influence on the transmission of other files or data is received, and the stability of version upgrade is further improved; the external upgrading terminal receives the information of upgrading completion of each cascade terminal, so that the problem that the upgrading file cannot be successfully obtained again after the upgrading of the individual terminal fails is avoided, and the upgrading accuracy and reliability of the cascade terminal are improved; whether the terminal is the last terminal of the cascade is judged through the cascade terminal, so that the problems that the terminal cannot be upgraded after receiving feedback information of the next-stage terminal in the upgrading process or the waiting time is too long are avoided, and the safety and the stability of the system are ensured; by packaging and transmitting the upgrade files of different models, the upgrade process is adaptive to the cascade terminals of various models, the upgrade operation is simplified, the stability of system upgrade is improved, and the cost of system maintenance is reduced.
Example 3
An embodiment of the present invention provides an electronic terminal, which is any one of cascade terminals, as shown in fig. 8, and includes: at least one processor 401, such as a CPU (Central Processing Unit), at least one communication interface 403, memory 404, and at least one communication bus 402. Wherein a communication bus 402 is used to enable connective communication between these components. The communication interface 403 may include a Display (Display) and a Keyboard (Keyboard), and the optional communication interface 403 may also include a standard wired interface and a standard wireless interface. The Memory 404 may be a RAM (random Access Memory) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 404 may optionally be at least one memory device located remotely from the processor 401. Wherein the processor 401 may execute the upgrade method of the tandem terminal of embodiment 1. A set of program codes is stored in the memory 404, and the processor 401 calls the program codes stored in the memory 404 for executing the upgrade method of the tandem terminal of embodiment 1.
The communication bus 402 may be a PerIPheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 402 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one line is shown in FIG. 8, but this does not represent only one bus or one type of bus.
The memory 404 may include a volatile memory (RAM), such as a random-access memory (RAM); the memory may also include a non-volatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (english: hard disk drive, abbreviated: HDD) or a solid-state drive (english: SSD); the memory 404 may also comprise a combination of memories of the kind described above.
The processor 401 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP.
The processor 401 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Optionally, the memory 404 is also used to store program instructions. The processor 401 may call a program instruction to implement the upgrade method of the cascading terminal in embodiment 1 as this application.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer-executable instruction is stored on the computer-readable storage medium, and the computer-executable instruction can execute the upgrade method of the cascade terminal in embodiment 1. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid-State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications of the invention may be made without departing from the spirit or scope of the invention.
Claims (8)
1. An upgrade method for a cascade terminal, comprising:
the method comprises the steps that a current terminal receives an upgrade file sent by a previous-stage terminal of the current terminal, wherein the upgrade file is used for upgrading a software version on the cascade terminal, and the current terminal is any terminal in the cascade terminal;
after the current terminal receives the upgrade file, the current terminal sends the upgrade file to a next-stage terminal of the current terminal so that the next-stage terminal of the current terminal finishes software version upgrade;
the current terminal receives feedback information of a next-stage terminal of the current terminal, wherein the feedback information is used for indicating that the next-stage terminal of the current terminal receives the upgrade file;
the current terminal utilizes the upgrade file to upgrade the software version according to the feedback information;
the method for receiving the upgrade file sent by the previous-stage terminal of the current terminal by the current terminal comprises the following steps:
the current terminal receives an upgrading instruction sent by a previous terminal of the current terminal; the current terminal starts a receiving protocol for receiving the upgrade file based on the upgrade instruction; the current terminal receives the upgrade file sent by a previous-stage terminal of the current terminal based on the receiving protocol;
after the current terminal receives the upgrade instruction sent by the previous-stage terminal of the current terminal, the method further comprises the following steps: the current terminal changes the baud rate of the current terminal from a default baud rate to a preset baud rate, wherein the preset baud rate is the baud rate for transmitting the upgrade file;
after the current terminal receives the upgrade file sent by the previous terminal of the current terminal based on the receiving protocol, the method further includes: and the current terminal changes the baud rate of the current terminal from the preset baud rate to the default baud rate.
2. The method for upgrading a cascading terminal according to claim 1, wherein the step of sending the upgrade file to a terminal next to the current terminal by the current terminal includes:
the current terminal sends an upgrading instruction to a next-stage terminal of the current terminal, and simultaneously starts a sending protocol for sending the upgrading file, wherein the upgrading instruction is used for controlling the next-stage terminal of the current terminal to start a receiving protocol for receiving the upgrading file;
and the current terminal sends the upgrade file to a next-stage terminal of the current terminal based on the sending protocol.
3. The upgrade method of a cascading terminal of claim 1,
if the next-stage terminal of the current terminal is the last upgraded terminal in the cascade terminals, the next-stage terminal of the current terminal directly utilizes the upgrade file to upgrade the software version;
and if the next-stage terminal of the current terminal is not the last upgraded terminal in the cascade terminal, determining the next-stage terminal of the current terminal as the current terminal, and returning to execute the step that the current terminal receives the upgrade file sent by the previous-stage terminal of the current terminal.
4. The upgrade method for a cascading terminal as claimed in claim 1, wherein the method further comprises:
after any terminal in the cascade terminals finishes upgrading, the upgraded information is uploaded to an external upgrading terminal step by step, the external upgrading terminal is a previous-stage terminal of a first terminal in the cascade terminals and used for sending the upgrading file to the first terminal, and the first terminal is a terminal connected with the external upgrading terminal.
5. The method for upgrading a cascading terminal according to claim 1, wherein the upgrade file is a file package formed by packaging software version files of multiple models, and the current terminal upgrades the software version by using the upgrade file according to the feedback information, including:
the current terminal decompresses the upgrade file to obtain the software version files of the multiple models;
the current terminal inquires corresponding software version files from the software version files of the multiple models according to the model of the current terminal;
and the current terminal carries out software version upgrading by using the inquired software version file.
6. An upgrade apparatus of a cascade terminal, comprising:
the receiving module is arranged on the current terminal and used for receiving the upgrading file;
the sending module is arranged on the current terminal and used for sending the upgrade file;
the feedback module is arranged on the current terminal and used for receiving feedback information;
the upgrading module is arranged on the current terminal and used for upgrading the software version by utilizing the upgrading file according to the feedback information;
the receiving module is specifically configured to receive an upgrade instruction sent by a previous-stage terminal of the current terminal, start a receiving protocol for receiving the upgrade file based on the upgrade instruction, and receive the upgrade file sent by the previous-stage terminal of the current terminal based on the receiving protocol;
the system also comprises a module for changing the baud rate of the system self from the default baud rate to a preset baud rate and from the preset baud rate to the default baud rate, wherein the preset baud rate is the baud rate for transmitting the upgrade file.
7. A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions which, when executed by a processor, implement the upgrade method of a cascading terminal as recited in any one of claims 1-5.
8. An electronic terminal, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the upgrade method for a cascading terminal as recited in any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010218197.1A CN111443930B (en) | 2020-03-25 | 2020-03-25 | Upgrading method and device of cascade terminal, storage medium and electronic terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010218197.1A CN111443930B (en) | 2020-03-25 | 2020-03-25 | Upgrading method and device of cascade terminal, storage medium and electronic terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111443930A CN111443930A (en) | 2020-07-24 |
CN111443930B true CN111443930B (en) | 2023-02-28 |
Family
ID=71629604
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010218197.1A Active CN111443930B (en) | 2020-03-25 | 2020-03-25 | Upgrading method and device of cascade terminal, storage medium and electronic terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111443930B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114077440A (en) * | 2020-08-19 | 2022-02-22 | 珠海优特智厨科技有限公司 | Equipment updating method and device and computer equipment |
CN113608759B (en) * | 2021-07-15 | 2023-07-07 | 福建星云电子股份有限公司 | Charging pile upgrading method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108848163B (en) * | 2018-06-15 | 2022-04-05 | 歌尔科技有限公司 | Upgrading method of TWS earphone and TWS earphone |
CN110769057A (en) * | 2019-10-25 | 2020-02-07 | 广东博智林机器人有限公司 | Automatic upgrading method, device and system based on cascade system |
-
2020
- 2020-03-25 CN CN202010218197.1A patent/CN111443930B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN111443930A (en) | 2020-07-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10474452B2 (en) | Firmware upgrade through GPIO port via UART protocol | |
US10412207B2 (en) | Mobile terminal, power adapter, and upgrade method thereof | |
US20050246703A1 (en) | Method and apparatus for programming updates from a network unit to a mobile device | |
CN111443930B (en) | Upgrading method and device of cascade terminal, storage medium and electronic terminal | |
EP3196761A1 (en) | Mobile terminal, power supply adapter, and upgrading method thereof | |
CN112035135A (en) | Method, apparatus and storage medium for updating firmware program of slave station apparatus | |
US20160266912A1 (en) | External devices, electronic devices, methods for starting external devices, and methods for data processing | |
CN113094064A (en) | Gateway software module upgrading method, device, equipment and storage medium | |
CN115002941A (en) | Communication method of Bluetooth electric energy meter | |
CN112615916A (en) | File deployment method and device, electronic equipment and storage medium | |
CN105378692A (en) | Universal serial bus data routing | |
CN114442590A (en) | Vehicle diagnosis method, apparatus, diagnosis communication device, server, and storage medium | |
KR20180039387A (en) | Reprogramming apparatus, electronic control unit, and reprogramming method using thereof | |
CN113760577B (en) | Dynamic connection answering device, processing method, control device and storage medium | |
CN114579198B (en) | Memory chip starting method and device, computer equipment and storage medium | |
CN114489852B (en) | Memory chip starting method and device, computer equipment and storage medium | |
CN210924550U (en) | Projector upgrading device, projector and projector upgrading system | |
CN117560285B (en) | Intelligent control internet of things OTA upgrading method, client and server | |
CN114338358B (en) | Data interaction method, device, storage medium and PLC | |
CN116974599A (en) | Firmware upgrading method and device, electronic equipment and storage medium | |
CN118642737A (en) | Equipment upgrading method, client equipment, camera and camera upgrading system | |
CN114326666A (en) | Vehicle parameter configuration method and device, electronic equipment and storage medium | |
US6298402B1 (en) | Method for rewriting data including program in an information processing apparatus and an information processing apparatus capable of rewriting data including program | |
CN114356994A (en) | Display method of equipment data, Internet of things equipment, server and display system | |
CN117478576A (en) | Batch upgrading method, system, electronic equipment and medium |
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 |