CN114221866A - Method, device and medium for upgrading terminal - Google Patents

Method, device and medium for upgrading terminal Download PDF

Info

Publication number
CN114221866A
CN114221866A CN202111524874.3A CN202111524874A CN114221866A CN 114221866 A CN114221866 A CN 114221866A CN 202111524874 A CN202111524874 A CN 202111524874A CN 114221866 A CN114221866 A CN 114221866A
Authority
CN
China
Prior art keywords
upgrading
terminal
network
related data
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111524874.3A
Other languages
Chinese (zh)
Inventor
倪连财
贾伟强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology 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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202111524874.3A priority Critical patent/CN114221866A/en
Publication of CN114221866A publication Critical patent/CN114221866A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The application discloses a method, a device and a medium for upgrading a terminal, which are applied to a server and comprise the following steps: the method comprises the steps of sending network upgrading related data to a target upgrading terminal through a preset protocol, obtaining a verification result of the terminal for the network upgrading related data, judging whether the terminal is normally upgraded according to the verification result, if not, judging whether the number of times of sending the network upgrading related data reaches the preset number, if not, resending the network upgrading related data to the terminal, and if so, terminating upgrading and determining upgrading failure. Therefore, according to the technical scheme provided by the invention, the server sends the upgrading related data to the target upgrading terminal through the preset protocol to realize the upgrading of the terminal, so that the problem of a large amount of labor cost caused by manually carrying storage media such as a computer or a U disk to a production field to upgrade the terminal one by one is avoided, the time consumed by a large amount of repeated operation during manual upgrading is saved, and the upgrading efficiency of the terminal is improved.

Description

Method, device and medium for upgrading terminal
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, and a medium for upgrading a terminal.
Background
At present, in the field of production testing, upgrading of a terminal often requires that a tester carries a computer or storage media such as a U disk and an SD card to a production field to upgrade the terminal one by one, and during upgrading, due to the fact that connection is tedious and repeated operations are multiple, upgrading efficiency of the terminal is low, subsequent upgrading maintenance is time-consuming and labor-consuming, and great workload is brought to the tester.
Therefore, how to improve the upgrading efficiency of the terminal is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a terminal upgrading method, a terminal upgrading device and a terminal upgrading medium.
In order to solve the above technical problem, the present application provides a method for upgrading a terminal, which is applied to a server, and includes:
sending network upgrading related data to a target upgrading terminal through a preset protocol;
acquiring a verification result of the target upgrading terminal on the network upgrading related data;
and judging whether the target upgrading terminal is normally upgraded according to the verification result, if not, judging whether the frequency of sending the network upgrading related data to the target upgrading terminal through the preset protocol reaches a preset frequency, if not, entering the step of sending the network upgrading related data to the target upgrading terminal through the preset protocol, and if so, terminating upgrading.
Preferably, the number of the target upgrading terminals is multiple.
Preferably, the sending of the network upgrade related data to the target upgrade terminal through the preset protocol further includes:
acquiring attribute information of a whole network terminal;
and determining the target upgrading terminal according to the attribute information.
Preferably, before the determining whether the target upgrade terminal is upgraded normally according to the verification result, the method further includes:
judging whether the verification result is obtained within a preset time;
if yes, the step of judging whether the target upgrading terminal is upgraded normally according to the verification result is carried out;
if not, judging whether the frequency of sending the network upgrading related data to the target upgrading terminal through the preset protocol reaches the preset frequency or not, if not, entering the step of sending the network upgrading related data to the target upgrading terminal through the preset protocol, and if so, terminating upgrading.
In order to solve the above technical problem, the present application further provides a method for upgrading a terminal, which is applied to the terminal and includes:
receiving network upgrading related data sent by a server through a preset protocol;
checking whether the network upgrading related data is legal or not, and sending a checking result to the server;
if the network upgrading related data are illegal, judging whether the frequency of executing the network upgrading related data sent by the preset protocol receiving server reaches a preset frequency, if not, entering the step of receiving the network upgrading related data sent by the server through the preset protocol, and if so, terminating upgrading.
Preferably, the verifying whether the network upgrade related data is legal includes:
acquiring the IP address of the server, and determining whether the data source related to the network upgrading is legal or not according to the IP address;
if the source is legal, judging whether the network upgrading related data is expected network upgrading related data or not, if so, determining that the network upgrading related data is legal, otherwise, determining that the network upgrading related data is illegal;
and if the source is illegal, determining that the related data of the network upgrading is illegal.
In order to solve the above technical problem, the present application further provides a device for upgrading a terminal, which is applied to a server, and includes:
the sending module is used for sending the network upgrading related data to the target upgrading terminal through a preset protocol;
the first acquisition module is used for acquiring a verification result of the target upgrading terminal on the network upgrading related data;
and the judging module is used for judging whether the target upgrading terminal is normally upgraded according to the checking result, judging whether the number of times of calling the sending module reaches the preset number of times if the target upgrading terminal is not normally upgraded, calling the sending module if the target upgrading terminal does not reach the preset number of times, and terminating the terminal upgrading if the target upgrading terminal reaches the preset number of times.
In order to solve the above technical problem, the present application further provides a device for upgrading a terminal, which is applied to the terminal, and includes:
the second acquisition module is used for receiving the network upgrading related data sent by the server through a preset protocol;
the verification module is used for verifying whether the network upgrading related data is legal or not and sending a verification result to the server;
if the related data of the network upgrading is illegal, judging whether the number of times of calling the acquisition module reaches a preset number of times, if not, calling the acquisition module, and if so, terminating the upgrading.
In order to solve the above technical problem, the present application further provides a device for upgrading a terminal, including a memory for storing a computer program;
a processor for implementing the steps of the method of upgrading a terminal as described when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for upgrading a terminal as described.
The method for upgrading the terminal, which is applied to the server, comprises the following steps: the method comprises the steps of sending network upgrading related data to a target upgrading terminal through a preset protocol, obtaining a verification result of the target upgrading terminal on the network upgrading related data, judging whether the target upgrading terminal is normally upgraded or not according to the verification result, judging whether the number of times of sending the network upgrading related data reaches the preset number of times or not if the target upgrading terminal is not normally upgraded, resending the network upgrading related data to the target upgrading terminal if the number of times of sending the network upgrading related data reaches the preset number of times, so that upgrading of the target terminal is realized, terminating upgrading and determining upgrading failure. Therefore, according to the technical scheme provided by the invention, the server sends the upgrading related data to the target upgrading terminal through the preset protocol to realize the upgrading of the terminal, so that the great labor cost consumed by carrying computers or storage media such as a U disk, an SD card and the like to a production field to upgrade the terminal one by one is avoided, meanwhile, the time consumed by a great amount of repeated operation during the manual upgrading of the terminal is saved, and the efficiency of the upgrading of the terminal is further improved.
In addition, the invention also provides a device and a medium for upgrading the terminal, and the effect is the same as the above.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is a diagram illustrating a hardware architecture according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for upgrading a terminal according to an embodiment of the present invention;
fig. 3 is a structural diagram of a device for upgrading a terminal according to an embodiment of the present invention;
fig. 4 is a diagram of a device architecture for upgrading a terminal according to another embodiment of the present invention;
fig. 5 is a block diagram of a device for upgrading a terminal according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a method, a device and a medium for upgrading a terminal, wherein network upgrading related data are transmitted to the terminal through a preset protocol through a server, so that the terminal is upgraded conveniently, and the problem that a large amount of time is consumed due to a large amount of same operations when storage media such as a computer, a U disk, an SD card and the like are manually carried to a field to upgrade all terminals one by one is avoided.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
With the continuous development of communication technology, upgrading a terminal is an extremely important thing in the field of production testing, currently, when the terminal is upgraded, a worker needs to carry a computer or storage media such as a U disk and an SD card to an upgrading site to upgrade the terminal one by one, a plurality of repetitive operations occur in the upgrading process, further, a large amount of time is consumed for upgrading, unnecessary terminals may be upgraded when the terminal is upgraded manually, and the upgrading efficiency of the terminal is further reduced.
Therefore, in order to improve the upgrading efficiency of the terminal, the present invention provides a method for upgrading a terminal, where a server transmits data related to network upgrading to a target upgrading terminal through a preset protocol, so as to upgrade the terminal, and for convenience of understanding, a hardware structure of the technical solution provided by the present invention will be described below, and fig. 1 is a schematic diagram of a hardware architecture provided in an embodiment of the present invention, where as shown in fig. 1, the structure includes a plurality of terminal devices, and each terminal is connected to the server, where the server may be one or a plurality of servers, and the present invention is not limited thereto. Of course, one server may upgrade one terminal device, or one server may upgrade multiple terminals, and the present invention is not limited thereto, and the server transmits the network upgrade related data to each terminal through a preset protocol to upgrade each terminal.
Fig. 2 is a flowchart of a method for upgrading a terminal according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
s10: and sending the network upgrading related data to the target upgrading terminal through a preset protocol.
S11: and acquiring a verification result of the target upgrading terminal on the network upgrading related data.
S12: and judging whether the target upgrading terminal is upgraded normally according to the verification result, if so, entering step S14, and if not, entering step S13.
S13: it is determined whether the number of times of executing the step S10 reaches a preset number, and if not, the process proceeds to a step S10, and if so, the process proceeds to a step S14.
S14: and (6) ending.
In step S10, the server transmits the data related to the network upgrade to the target upgrade terminal via a preset Protocol, where the preset Protocol may be a User data packet Protocol (UDP), or other protocols, which is not limited in the present invention. In addition, it should be noted that, before the server sends the data related to the network upgrade, the server first obtains attribute information of the terminals in the whole network, and determines the target upgrade terminal to be upgraded according to the attribute information of each terminal, where the terminal attribute information to be obtained by the server includes information such as the name of the terminal, the current version number of the terminal software, the IP address and the MAC address of the terminal. Of course, the target upgrade terminal may be one or more.
After the network upgrading related data are transmitted to the target upgrading terminal, after a preset time, a checking result of the target upgrading terminal on the legality of the network upgrading related data is obtained, so that the server can determine whether the target upgrading terminal is upgraded normally, if the target upgrading terminal is not upgraded normally, the step S13 is carried out, whether the number of times of executing the step S10 reaches a preset number of times is judged, if the preset number of times is reached, the step S14 is carried out to finish upgrading of the terminal, if the preset number of times is not reached, the step S10 is carried out, the network upgrading related data are re-sent to the target upgrading terminal, it needs to be noted that when the target upgrading terminals are multiple, if the checking result is abnormal after the preset time of the multiple terminals, the server only needs to re-send the network upgrading related data to the target upgrading terminal with the abnormal upgrading result.
In a specific embodiment, after the target upgrade terminal verifies the network upgrade related data sent by the server, the verification result is transmitted to the server so as to be conveniently checked by a user. When the target upgrade terminal verifies the network upgrade related data, it first verifies whether the IP address of the server sending the network upgrade related data is legal, i.e. whether the IP address is the network upgrade related data sent by the target server, and then verifies whether the network upgrade related data is completed and whether the IP address is the expected data, and the specific verification method is described below.
It should be noted that, when the target upgrade terminal determines that the received network upgrade related data is legal, the target upgrade terminal stores the network upgrade related data in the designated memory area and automatically writes the upgrade flag into the memory, and completes the upgrade process after restarting, and simultaneously transmits the verification result of the network upgrade related data to the server for the user to check. It should be further noted that, during the process of upgrading the target upgrading terminal, the server may check the progress of upgrading in real time, and certainly, may terminate the upgrading process at any time. In addition, it should be noted that, in order to improve data transmission efficiency and further improve upgrade efficiency, the transmitted data related to network upgrade is compressed and transmitted in the form of a data packet.
The method for upgrading the terminal provided by the embodiment of the invention is applied to a server and comprises the following steps: the method comprises the steps of sending network upgrading related data to a target upgrading terminal through a preset protocol, obtaining a verification result of the target upgrading terminal on the network upgrading related data, judging whether the target upgrading terminal is normally upgraded or not according to the verification result, judging whether the number of times of sending the network upgrading related data reaches a preset number or not if the target upgrading terminal is not normally upgraded, resending the network upgrading related data to the target upgrading terminal if the number of times of sending the network upgrading related data does not reach the preset number so as to conveniently realize upgrading of the target terminal, and terminating upgrading and determining upgrading failure if the number of times of sending the network upgrading related data reaches the preset number. Therefore, according to the technical scheme provided by the invention, the server sends the upgrading related data to the target upgrading terminal through the preset protocol to realize the upgrading of the terminal, so that the great labor cost consumed by carrying computers or storage media such as a U disk, an SD card and the like to a production field to upgrade the terminal one by one is avoided, meanwhile, the time consumed by a great amount of repeated operation during the manual upgrading of the terminal is saved, and the efficiency of the upgrading of the terminal is further improved.
In a specific embodiment, one server may upgrade one target upgrade terminal, or one server may upgrade multiple target upgrade terminals, and in addition, the server may upgrade terminals of the same type, or terminals of different types, and when one server upgrades terminals of different types, it is sufficient to send corresponding network upgrade related data to the corresponding target upgrade terminal. In order to improve the upgrading efficiency, it is preferable that one server upgrades a plurality of terminals in the same class.
According to the terminal upgrading method provided by the embodiment of the invention, the server can send the network upgrading related data to the plurality of target upgrading terminals of the same type through the preset protocol to upgrade the terminals, so that time and labor for manually upgrading the terminals one by one are avoided, and the terminal upgrading efficiency is further improved.
In the specific implementation, all terminals in the whole network do not need to be upgraded, so that when the server upgrades the terminals, a target upgrade terminal, that is, the terminal needing to be upgraded, needs to be determined. Therefore, the method for upgrading the terminal provided by the invention provides that the server acquires the attribute information of the terminal in the whole network before sending the relevant data of the network upgrade, wherein the attribute information comprises the name of the terminal, the current version number of the terminal software, the IP address of the terminal, the MAC address and other information, and further acquires the current version of each terminal in the whole network, the IP address of the terminal and other information so as to judge whether the corresponding terminal needs to be upgraded or not. It should be noted that, whether the terminal needs to be upgraded or not may be judged, the server may display the acquired attribute information of the terminal in the whole network on the display screen, so that the user can select the terminal needing to be upgraded by himself or herself and determine to which version the corresponding terminal needs to be upgraded, of course, the server may also judge by himself or herself whether the current version of the terminal is the latest version or not, if the current version is the latest version, the terminal does not need to be upgraded, otherwise, the corresponding terminal is determined to be the target upgrade terminal, that is, the terminal needing to be upgraded.
In addition, it should be noted that, after receiving an instruction that the server needs to acquire the attribute information, the terminal transmits the attribute information to the server through a preset protocol, and the server may display the attribute information in a list form or a block diagram form, where the present invention is not limited to the display mode of the attribute information of the terminal.
According to the terminal upgrading method provided by the embodiment of the invention, in order to ensure that the server only upgrades the terminal needing to be upgraded, the server acquires the attribute information of all the terminals before sending the network upgrading related data, determines the target upgrading terminal according to the attribute information, and sends the network upgrading related data to the target upgrading terminal for upgrading, so that the terminal needing no upgrading is prevented from being upgraded, and the upgrading efficiency of the terminal is further improved.
On the basis of the above embodiment, in order to further improve the upgrade efficiency, after the server sends the network upgrade related data to the target upgrade terminal, the server waits for a preset time, if the preset time is up, the server does not obtain the verification of the network upgrade related data by the target upgrade terminal, and determines whether the number of times of sending the network upgrade related data reaches the preset number of times, if the preset number of times is not reached, the network upgrade related data is resent to the target upgrade related data, and if the preset number of times is reached, the upgrade is terminated. It should be noted that, when a plurality of target upgrade terminals are provided, if one or more target upgrade terminals that have not obtained the verification result are provided after the preset time, when the network upgrade related data is retransmitted, each target upgrade terminal does not need to be transmitted, and only the target upgrade terminal corresponding to the verification result that has not been received needs to be transmitted.
Further, if the verification result of the target upgrading terminal is received within the preset time, determining whether the upgrading is normal according to the verification result, if the upgrading is not normal, similarly, firstly judging whether the number of times of currently sending the network upgrading related data reaches the preset number of times, if the number of times does not reach the preset number of times, resending the network upgrading related data to the target upgrading terminal to attempt upgrading, and if the number of times reaches the preset number of times, terminating the upgrading, namely determining that the upgrading fails. Of course, after the server obtains the verification result, the server only needs to resend the network upgrading related data to the target upgrading terminal with abnormal upgrading.
According to the terminal upgrading method provided by the embodiment of the invention, after the server sends the network upgrading related data, if the verification result of the target upgrading terminal on the network upgrading related data is not obtained within the preset time, the network upgrading related data is sent to the target upgrading terminal again to try upgrading again, and the upgrading efficiency of the terminal is further improved.
In the foregoing embodiment, a method applied to a server-side terminal upgrade is described in detail, and the present application also provides an embodiment corresponding to a device for terminal upgrade. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one is based on the functional module, and the other is based on the hardware structure.
Fig. 3 is a structural diagram of a device for upgrading a terminal according to an embodiment of the present invention, and as shown in fig. 3, the device includes:
and the sending module 10 is configured to send the network upgrade related data to the target upgrade terminal through a preset protocol.
The first obtaining module 11 is configured to obtain a verification result of the target upgrade terminal on the network upgrade related data.
And the judging module 12 is configured to judge whether the target upgrade terminal is upgraded normally according to the verification result, judge whether the number of times of calling the sending module 10 reaches a preset number of times if the target upgrade terminal is not upgraded normally, call the sending module 10 if the target upgrade terminal does not reach the preset number of times, and terminate the upgrade if the target upgrade terminal reaches the preset number of times.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
The device for upgrading the terminal provided by the embodiment of the invention is applied to a server and comprises the following components: the method comprises the steps of sending network upgrading related data to a target upgrading terminal through a preset protocol, obtaining a verification result of the target upgrading terminal on the network upgrading related data, judging whether the target upgrading terminal is normally upgraded or not according to the verification result, judging whether the number of times of sending the network upgrading related data reaches a preset number or not if the target upgrading terminal is not normally upgraded, resending the network upgrading related data to the target upgrading terminal if the number of times of sending the network upgrading related data does not reach the preset number so as to conveniently realize upgrading of the target terminal, and terminating upgrading and determining upgrading failure if the number of times of sending the network upgrading related data reaches the preset number. Therefore, according to the technical scheme provided by the invention, the server sends the upgrading related data to the target upgrading terminal through the preset protocol to realize the upgrading of the terminal, so that the great labor cost consumed by carrying computers or storage media such as a U disk, an SD card and the like to a production field to upgrade the terminal one by one is avoided, meanwhile, the time consumed by a great amount of repeated operation during the manual upgrading of the terminal is saved, and the efficiency of the upgrading of the terminal is further improved.
In the above embodiments, the method for upgrading the terminal is described in detail from the server side, and the present invention also provides an embodiment corresponding to the method for upgrading the terminal at the terminal side. The terminal receives the network upgrading related data sent by the server through a preset protocol, checks whether the received network upgrading related data is legal or not, and sends a checking result to the server. And when the verification result is that the network upgrading related data is illegal, judging whether the frequency of re-receiving the network upgrading related data reaches a preset frequency, if not, entering the step of receiving the network upgrading related data to re-receive new network upgrading related data, and if so, terminating upgrading.
It can be understood that the method for upgrading the terminal based on the angle of the server side and the method for upgrading the terminal based on the angle of the terminal side correspond to each other, so the specific implementation manner refers to the above description, and the details are not repeated in this embodiment.
The method for upgrading the terminal provided by the embodiment of the invention is applied to the terminal and comprises the following steps: and receiving the network upgrading related data sent by the server through a preset protocol, verifying the received network upgrading related data, judging whether the network auditing related data are legal or not, and sending a verification result to the server. And when the verification result is that the network upgrading related data is illegal, judging whether the frequency of re-receiving the network upgrading related data reaches a preset frequency, if not, entering the step of receiving the network upgrading related data to re-receive new network upgrading related data, and if so, terminating upgrading. Therefore, according to the technical scheme provided by the invention, the server sends the upgrading related data to the target upgrading terminal through the preset protocol to realize the upgrading of the terminal, so that the great labor cost consumed by carrying computers or storage media such as a U disk, an SD card and the like to a production field to upgrade the terminal one by one is avoided, meanwhile, the time consumed by a great amount of repeated operation during the manual upgrading of the terminal is saved, and the efficiency of the upgrading of the terminal is further improved.
In the specific implementation, after receiving the network upgrade related data sent by the server, the terminal needs to verify the network upgrade related data, and first obtains the IP address of the server corresponding to the network upgrade related data to be sent, and judges whether the source of the received network upgrade related data is legal or not according to the IP address, that is, whether the received network upgrade related data is sent by the expected server or not. If the source of the network upgrading related data is legal, judging whether the network upgrading related data is expected data, if the network upgrading related data is the expected data, determining that the network upgrading related data is legal, otherwise, determining that the network upgrading related data is illegal, and sending a verification result to a server. It should be noted that, whether the network upgrade related data is legal is checked, whether the network upgrade related data is complete is first determined, and whether the data content is modified is determined.
According to the terminal upgrading method provided by the embodiment of the invention, after the terminal acquires the network upgrading related data sent by the server, the legality of the network upgrading related data is checked, and the terminal is upgraded after the network upgrading related data is checked, so that the terminal upgrading accuracy is improved.
In the foregoing embodiment, the method for upgrading a terminal is applied to the terminal, and detailed description is given, and the present application also provides an embodiment corresponding to the apparatus for upgrading a terminal. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one is based on the functional module, and the other is based on the hardware structure.
Fig. 4 is a structural diagram of a device for upgrading a terminal according to another embodiment of the present invention, as shown in fig. 4, the device includes:
and the second obtaining module 40 is configured to receive, through a preset protocol, network upgrade related data sent by a server.
The checking module 41 is configured to check whether the relevant network upgrade data is legal, and send a check result to the server, where if the relevant network upgrade data is illegal, it is determined whether the number of times of calling the obtaining module 20 reaches a preset number of times, if the number of times does not reach the preset number of times, the obtaining module 20 is called, and if the number of times reaches the preset number of times, the upgrade is terminated.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
The device for upgrading the terminal provided by the embodiment of the invention is applied to the terminal and comprises the following components: and receiving the network upgrading related data sent by the server through a preset protocol, verifying the received network upgrading related data, judging whether the network auditing related data are legal or not, and sending a verification result to the server. And when the verification result is that the network upgrading related data is illegal, judging whether the frequency of re-receiving the network upgrading related data reaches a preset frequency, if not, entering the step of receiving the network upgrading related data to re-receive new network upgrading related data, and if so, terminating upgrading. Therefore, according to the technical scheme provided by the invention, the server sends the upgrading related data to the target upgrading terminal through the preset protocol to realize the upgrading of the terminal, so that the great labor cost consumed by carrying computers or storage media such as a U disk, an SD card and the like to a production field to upgrade the terminal one by one is avoided, meanwhile, the time consumed by a great amount of repeated operation during the manual upgrading of the terminal is saved, and the efficiency of the upgrading of the terminal is further improved.
Finally, in order to make the technical solution of the present invention more clearly understood by the original person, the following describes the upgrading process of the terminal in detail by way of example.
For example, the preset protocol is a UDP protocol, the server obtains attribute information of all terminals through the UDP protocol, where the attribute information includes a name of the terminal, a current version number of terminal software, an IP address and an MAC address of the terminal, and determines the target upgrade terminal according to the attribute information. The server loads the upgrade data and compresses the upgrade data into data packets, for example, the network upgrade related data is in a DTX data packet format, it should be noted that one or more DTX data packets may be required for terminal upgrade, when there are multiple DTX data packets, the DTX data packets need to be sequenced, and the sequence number of the data packets required for each terminal upgrade is continuous. For example, the upgrade data packet corresponding to a certain terminal is DTX0-DTX3, i.e. four DTX data packets with consecutive sequence numbers from sequence number 0 to sequence number 3.
When the server transmits the DTX data packets to the terminal, the first DTX data packet in each DTX data packet should include information such as the data type of the data packet, the serial number of the current data packet, the total number of the data packets to be transmitted, the total length of the data packets to be transmitted, the check result and the like. And the check result is the check result of whether the current DTX data packet is complete. The rest DTX data packets only need to contain the data type of the current data packet, the sequence number of the current data packet and the check result.
Table 1 shows the first DTX data packet structure provided in this embodiment, referring to table 1, for example, when the upgrade data packet corresponding to a certain terminal is DTX0-DTX3, DTX0 should include a data type, a data sequence number, a total number of data packets to be transmitted, a total length of data to be transmitted, and a check result, and the DTX1-3 data packet may include a data type, a data sequence number, and a check result.
When data interaction is performed through the UDP protocol, the apparatus further includes two data packets, which are an uplink UDP data packet and a downlink UDP data packet, respectively, and table 2 shows an uplink UDP data packet structure provided in the embodiment of the present invention, where the uplink UDP data packet is a data packet sent by the server to the terminal, and stores a data type, a data sequence number, data, a data length, and a verification result of the data transmitted by the UDP protocol, where the data is upgrade data itself required by the terminal upgrade, and the verification result is whether the DTX data packet is modified during transmission.
Table 3 shows a structure of a downlink UDP data packet according to the embodiment of the present invention, where downlink UDP data is a data packet sent by a terminal to a server, and the data packet stores a data type, a data sequence number, a data length, and a verification result of the data transmitted by a UDP protocol, where the verification result stores whether a received current data packet is an expected data packet and a next expected data sequence number, and when the verification result indicates that an expected data packet is not received, the data type, the data sequence number, and the data length are all null.
Table 1 first DTX packet structure
Figure BDA0003409836370000121
Table 2 uplink UDP packet structure
Data type Data sequence number Data length Data of Verification result
Table 3 downlink UDP packet structure
Data type Data sequence number Data length Verification result
In a specific implementation, after the server sends the DTX data packet to the target upgrade terminal, within a preset time, for example, within 3 seconds, if the verification result sent by the terminal is received, the upgrade is continued. If the check result is not received, judging whether the frequency of sending the DTX data packet reaches a preset frequency, for example, the preset frequency is 3, if not, resending the DTX data packet to the terminal, and if so, terminating the upgrade and determining that the upgrade fails.
If the verification result received within 3 seconds is abnormal upgrading, wherein the abnormal upgrading comprises that the source of the DTX data packet acquired by the terminal is illegal, namely the acquired DTX data packet is not the data packet expected to be sent by the server, the abnormal upgrading also comprises that the DTX data packet is incomplete or the DTX data packet is not the expected data packet, wherein the incomplete DTX data packet comprises incomplete data packet sequence numbers, for example, the DTX2 is lost in the DTX0-3, and in addition, the incomplete DTX data packet also comprises whether the data content of each data packet is complete or not. And when the verification result received within 3 seconds is that the upgrading is abnormal, judging whether the frequency of sending the DTX data packet reaches a preset frequency, if not, resending the DTX data packet, and if so, terminating the upgrading and determining that the upgrading fails.
Therefore, according to the terminal upgrading method provided by the embodiment of the invention, the server sends the upgrading related data to the target upgrading terminal through the preset protocol to realize the upgrading of the terminal, so that a large amount of labor cost consumed by a tester carrying a computer or a storage medium such as a U disk, an SD card and the like to a production field to upgrade the terminal one by one is avoided, and meanwhile, the time consumed by a large amount of repeated operations during the manual upgrading of the terminal is saved, and the terminal upgrading efficiency is further improved.
Fig. 5 is a structural diagram of a terminal upgrading apparatus according to another embodiment of the present application, and as shown in fig. 5, the terminal upgrading apparatus includes: a memory 20 for storing a computer program;
a processor 21 for implementing the steps of the method for upgrading a terminal (applied to a server and/or a terminal) as mentioned in the above embodiments when executing the computer program.
The device for upgrading the terminal provided by the embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, or a desktop computer.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with an image processor (GPU), and the GPU is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 21 may further include an Artificial Intelligence (AI) processor for processing computing operations related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing the following computer program 201, wherein after the computer program is loaded and executed by the processor 21, the relevant steps of the method for upgrading the terminal disclosed in any of the foregoing embodiments can be implemented. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. The data 203 may include, but is not limited to, data involved in the method of terminal upgrade, and the like.
In some embodiments, the device for upgrading the terminal may further include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in fig. 5 does not constitute a limitation of the means for upgrading the terminal and may include more or less components than those shown.
The device for upgrading the terminal provided by the embodiment of the application comprises a memory and a processor, wherein when the processor executes a program stored in the memory, the following method can be realized: provided is a terminal upgrading method.
Therefore, according to the terminal upgrading device provided by the embodiment of the invention, the server sends the upgrading related data to the target upgrading terminal through the preset protocol to realize the upgrading of the terminal, so that the labor cost consumed by a tester carrying a computer or a storage medium such as a U disk, an SD card and the like to a production field to upgrade the terminal one by one is avoided, meanwhile, the time consumed by a large amount of repeated operations during the manual upgrading of the terminal is saved, and the terminal upgrading efficiency is further improved.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium stores thereon a computer program which, when executed by a processor, implements the steps described in the above-described method embodiments (which may be a server-side corresponding method, a terminal-side corresponding method, or a server-side and terminal-side corresponding method).
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The method, the device and the medium for upgrading the terminal provided by the application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method for upgrading a terminal is applied to a server and comprises the following steps:
sending network upgrading related data to a target upgrading terminal through a preset protocol;
acquiring a verification result of the target upgrading terminal on the network upgrading related data;
and judging whether the target upgrading terminal is normally upgraded according to the checking result, if not, judging whether the frequency of sending the network upgrading related data to the target upgrading terminal through the preset protocol reaches a preset frequency, if not, entering the step of sending the network upgrading related data to the target upgrading terminal through the preset protocol, and if so, terminating the terminal upgrading.
2. The method for upgrading a terminal according to claim 1, wherein the target upgrading terminal is multiple.
3. The method for upgrading a terminal according to claim 1, further comprising, before the step of sending the network upgrade related data to the target upgrade terminal through a preset protocol:
acquiring attribute information of a whole network terminal;
and determining the target upgrading terminal according to the attribute information.
4. The method for upgrading a terminal according to claim 1, wherein before the determining whether the target upgrading terminal is normally upgraded according to the checking result, the method further comprises:
judging whether the verification result is obtained within a preset time;
if yes, the step of judging whether the target upgrading terminal is upgraded normally according to the verification result is carried out;
if not, entering the step of judging whether the frequency of executing the network upgrading related data sent to the target upgrading terminal through the preset protocol reaches the preset frequency, if not, entering the step of sending the network upgrading related data to the target upgrading terminal through the preset protocol, and if so, terminating the upgrading.
5. A method for upgrading a terminal is applied to the terminal and comprises the following steps:
receiving network upgrading related data sent by a server through a preset protocol;
checking whether the network upgrading related data is legal or not, and sending a checking result to the server;
if the network upgrading related data are illegal, judging whether the frequency of executing the network upgrading related data sent by the preset protocol receiving server reaches a preset frequency, if not, entering the step of receiving the network upgrading related data sent by the server through the preset protocol, and if so, terminating upgrading.
6. The method for upgrading a terminal according to claim 5, wherein the verifying whether the data related to the network upgrade is legal comprises:
acquiring the IP address of the server, and determining whether the data source related to the network upgrading is legal or not according to the IP address;
if the source is legal, judging whether the network upgrading related data is expected network upgrading related data or not, if so, determining that the network upgrading related data is legal, otherwise, determining that the network upgrading related data is illegal;
and if the source is illegal, determining that the related data of the network upgrading is illegal.
7. A device for upgrading a terminal is applied to a server and comprises:
the sending module is used for sending the network upgrading related data to the target upgrading terminal through a preset protocol;
the first acquisition module is used for acquiring a verification result of the target upgrading terminal on the network upgrading related data;
and the judging module is used for judging whether the target upgrading terminal is normally upgraded according to the checking result, judging whether the number of times of calling the sending module reaches the preset number of times if the target upgrading terminal is not normally upgraded, calling the sending module if the target upgrading terminal does not reach the preset number of times, and terminating the terminal upgrading if the target upgrading terminal reaches the preset number of times.
8. A device for upgrading a terminal is applied to the terminal and comprises:
the second acquisition module is used for receiving the network upgrading related data sent by the server through a preset protocol;
the verification module is used for verifying whether the network upgrading related data is legal or not and sending a verification result to the server;
if the related data of the network upgrading is illegal, judging whether the number of times of calling the acquisition module reaches a preset number of times, if not, calling the acquisition module, and if so, terminating the upgrading.
9. An apparatus for upgrading a terminal, comprising a memory for storing a computer program;
a processor for implementing the steps of the method of upgrading a terminal as claimed in any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of upgrading a terminal according to any one of claims 1 to 6.
CN202111524874.3A 2021-12-14 2021-12-14 Method, device and medium for upgrading terminal Pending CN114221866A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111524874.3A CN114221866A (en) 2021-12-14 2021-12-14 Method, device and medium for upgrading terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111524874.3A CN114221866A (en) 2021-12-14 2021-12-14 Method, device and medium for upgrading terminal

Publications (1)

Publication Number Publication Date
CN114221866A true CN114221866A (en) 2022-03-22

Family

ID=80701654

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111524874.3A Pending CN114221866A (en) 2021-12-14 2021-12-14 Method, device and medium for upgrading terminal

Country Status (1)

Country Link
CN (1) CN114221866A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115374488A (en) * 2022-10-25 2022-11-22 广州万协通信息技术有限公司 Vehicle-mounted terminal program checking method and device
CN116737193A (en) * 2022-09-23 2023-09-12 荣耀终端有限公司 Software upgrading method, electronic equipment and communication system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546784A (en) * 2011-12-29 2012-07-04 深圳市迈进科技有限公司 Method based on controller area network (CAN) bus and used for conducting batch upgrading for device firmware
KR20140079980A (en) * 2012-12-20 2014-06-30 주식회사 케이티 Method for upgrading software of mobile terminal and mobile terminal device using the same
CN106027580A (en) * 2015-03-18 2016-10-12 青岛海尔空调电子有限公司 Program remote upgrading method
CN112994938A (en) * 2021-02-08 2021-06-18 成都康特电子科技股份有限公司 Optical network unit upgrading system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546784A (en) * 2011-12-29 2012-07-04 深圳市迈进科技有限公司 Method based on controller area network (CAN) bus and used for conducting batch upgrading for device firmware
KR20140079980A (en) * 2012-12-20 2014-06-30 주식회사 케이티 Method for upgrading software of mobile terminal and mobile terminal device using the same
CN106027580A (en) * 2015-03-18 2016-10-12 青岛海尔空调电子有限公司 Program remote upgrading method
CN112994938A (en) * 2021-02-08 2021-06-18 成都康特电子科技股份有限公司 Optical network unit upgrading system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737193A (en) * 2022-09-23 2023-09-12 荣耀终端有限公司 Software upgrading method, electronic equipment and communication system
CN115374488A (en) * 2022-10-25 2022-11-22 广州万协通信息技术有限公司 Vehicle-mounted terminal program checking method and device

Similar Documents

Publication Publication Date Title
CN114221866A (en) Method, device and medium for upgrading terminal
CN106484453B (en) Method and device for realizing system upgrading
CN108563579B (en) White box testing method, device and system and storage medium
CN105897461A (en) Multi-system OTA upgrading method and multi-system device
CN109391673A (en) A kind of method, system and the terminal device of management update file
CN105786636B (en) A kind of system repair and device
CN111736866A (en) One-to-one and one-to-many compatible online upgrading method and terminal equipment
CN109189419B (en) System upgrading method, device and system, server and client
CN111158716B (en) Version upgrade calling method and device, computer system and readable storage medium
CN110198222A (en) A kind of distribution power automation terminal plug and play test method and test main website
CN112286565A (en) Embedded system differential upgrading method based on storage container
CN112256557A (en) Program regression testing method, device, system, computer equipment and storage medium
CN110147246A (en) Version checking method and device, storage medium and the terminal of space download technology
CN111176693B (en) Upgrading method of digital television system
CN110225097B (en) Information processing method, device and storage medium
CN111586484A (en) Method, device and equipment for upgrading auxiliary screen system of display equipment and storage medium
CN112312212A (en) Upgrading method of digital television system and related device
CN112152841B (en) Verification method, verification device, switch, equipment and storage medium
CN115686569A (en) OTA upgrading method and related components thereof
CN115268971B (en) Updating method, device, equipment and storage medium of signal processing system
CN110018838B (en) Method and system for configuring programs in android medical terminal
CN115904435A (en) Firmware upgrading method and device for GPU expansion box and computer readable storage medium
CN108667676B (en) Wireless cable modem upgrading method
CN107783774B (en) Ticket selling interface updating method and device and computer readable storage medium
CN113535271A (en) Loading method and device of algorithm model, storage medium and electronic device

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