CN117270917B - Software upgrading method and electronic equipment - Google Patents

Software upgrading method and electronic equipment Download PDF

Info

Publication number
CN117270917B
CN117270917B CN202311563973.1A CN202311563973A CN117270917B CN 117270917 B CN117270917 B CN 117270917B CN 202311563973 A CN202311563973 A CN 202311563973A CN 117270917 B CN117270917 B CN 117270917B
Authority
CN
China
Prior art keywords
data
terminal equipment
server
group
router
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311563973.1A
Other languages
Chinese (zh)
Other versions
CN117270917A (en
Inventor
刘政
员昂昂
裴豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311563973.1A priority Critical patent/CN117270917B/en
Publication of CN117270917A publication Critical patent/CN117270917A/en
Application granted granted Critical
Publication of CN117270917B publication Critical patent/CN117270917B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/164Adaptation or special uses of UDP protocol
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

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

Abstract

The application discloses a software upgrading method and electronic equipment, wherein the method comprises the following steps: the terminal equipment sends a first request to the server, wherein the first request is used for requesting an upgrade package; the upgrade package is used for upgrading the software of the terminal equipment, and comprises N groups of data, wherein N is an integer greater than 1; the terminal equipment receives the ith group of data from the server through a User Datagram Protocol (UDP), wherein the ith group of data is one group of data in N groups of data, and i is not more than N; the terminal equipment receives a first handshake request message from a server through TCP connection; the first handshake request message is used for requesting a receiving result of the ith group of data; the terminal equipment sends a first handshake response message to the server through TCP connection, wherein the first handshake response message comprises a receiving result for indicating successful receiving of the ith group of data; and the terminal equipment upgrades the software based on the upgrade package. The method can upgrade the software of the terminal equipment conveniently and efficiently.

Description

Software upgrading method and electronic equipment
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a software upgrading method and an electronic device.
Background
With the development of terminal technology and the reduction of cost, mobile terminals have become increasingly popular in people's lives. A wide variety of software can be installed in the terminal device, of which the most basic and most important basic system software is the operating system. The terminal device can be used by the user only when the operating system is installed.
In general, software such as an operating system is installed and upgraded by a terminal manufacturer before the terminal device leaves the factory. At present, terminal manufacturers often adopt a wired transmission mode to upgrade software of terminal equipment, and the method specifically comprises the following steps: the terminal equipment is connected with the server through a data line to acquire an upgrade package from the server, wherein equipment such as a clamp, a cabinet and the like are required to be used for connection and fixation, and a communication link is complex; in addition, the data line is inserted and pulled out from the port of the terminal equipment, which is easy to damage the appearance of the terminal equipment.
At present, how to upgrade the software of the terminal equipment conveniently and efficiently is a problem to be solved at present.
Disclosure of Invention
The application provides a software upgrading method and electronic equipment, and the method can upgrade the software of terminal equipment conveniently and efficiently.
In a first aspect, an embodiment of the present application provides a software upgrade method, including: the terminal equipment sends a first request to the server, wherein the first request is used for requesting an upgrade package; the upgrade package is used for upgrading the software of the terminal equipment, and comprises N groups of data, wherein N is an integer greater than 1; the terminal equipment establishes a Transmission Control Protocol (TCP) connection with a server; the terminal equipment receives the ith group of data from the server through a User Datagram Protocol (UDP), wherein the ith group of data is one group of data in N groups of data, and i is not more than N; the terminal equipment receives a first handshake request message from a server through TCP connection; the first handshake request message is used for requesting a receiving result of the ith group of data; the terminal equipment sends a first handshake response message to the server through TCP connection, wherein the first handshake response message comprises a receiving result of the ith group of data, and the receiving result of the ith group of data is used for indicating successful receiving; and the terminal equipment upgrades the software based on the upgrade package.
In the embodiment of the application, the server may send data to at least one terminal device through a user datagram protocol UDP (i.e. multicast mode), and determine the condition that the terminal device receives the data through a TCP connection. Since the UDP protocol is unreliable but has higher transmission efficiency than the TCP protocol, the TCP can secure data and is reliable. In the method, the data to be transmitted (namely the upgrade packet) is grouped by a multicast protocol combining TCP and UDP, then broadcast is issued by the UDP protocol, and meanwhile, a one-to-one TCP connection is established between a server and each terminal device. Furthermore, the method can utilize the protocol of TCP to determine (Acknowledge character, ACK) check and retransmission interaction for the distributed data packets, thereby realizing reliable broadcast transmission. Therefore, the method can ensure the reliability of data transmission and improve the efficiency of data transmission, thereby upgrading the software of the terminal equipment conveniently and efficiently.
With reference to the first aspect, in one possible implementation manner, the software is operating system software.
In the embodiment of the application, since the operating system software (also may be abbreviated as an operating system) in the terminal device needs to be upgraded before the terminal device leaves the factory, a method of transmitting an operating system upgrade package by wire is often adopted at present, which is easy to cause appearance loss of the terminal device and has low upgrade efficiency. According to the method, a multicast protocol is combined with TCP and UDP, the data transmission capacity of a wireless network replaces the original wired transmission mode, and because no USB port is plugged in and pulled out in the whole process, the risk of abnormal interruption possibly occurring in the transmission process of a data line is avoided, and a large amount of computer resources and data lines are not required to be occupied; the influence caused by wired transmission, such as appearance damage caused by port plugging of terminal equipment, can be avoided, the resource consumption and quality risk are reduced, and the efficiency of software upgrading can be improved; the method can ensure the reliability of data transmission and improve the efficiency of data transmission, thereby upgrading the software of the terminal equipment conveniently and efficiently.
The wireless transmission mode can be applied to other whole machine wired connection testing stations in production line production, wired connection is replaced by a wireless mode, investment of hardware resources is reduced, and three damage defects generated in the production process are reduced. In addition, the USB is not needed to be connected with the mobile phone, so that more computer and data line resources are not needed to be occupied.
With reference to the first aspect, in one possible implementation manner, before the terminal device sends the first request to the server, the method further includes: the terminal equipment obtains first information through near field communication NFC, and the first information is used for indicating to obtain an upgrade package.
In the embodiment of the application, the terminal equipment can be triggered by near field communication NFC to acquire the upgrade package of the software. The method has higher stability by NFC triggering and upgrading.
With reference to the first aspect, in one possible implementation manner, the acquiring, by the terminal device, first information through near field communication NFC includes: when the terminal equipment is located on the carrier, first information contained in the NFC tag is acquired through NFC, the NFC tag is arranged on the carrier, and the carrier is used for bearing a plurality of equipment.
In this embodiment of the present application, a carrier may be used to carry a plurality of terminal devices, where the carrier includes an NFC tag, and the plurality of terminal devices may be triggered by first information included in the NFC tag to obtain an upgrade package of software. The method can be suitable for the scene of upgrading the software of the batch of terminal equipment, and the efficiency of upgrading the software of the batch of terminal equipment can be improved.
With reference to the first aspect, in one possible implementation manner, the first information includes router information of the first router and information indicating that the first application is started, and the method further includes: the terminal equipment responds to the first information and starts a first application; the terminal equipment is connected with a first router through a first application; the terminal device sending a first request to the server includes: the terminal device sends a first request to the server through the first router.
According to the method, one or more terminal devices are carried by the carrier, the carrier comprises the NFC tag, and the one or more terminal devices can be triggered to be connected with the designated router (namely the first router) through first information contained in the NFC tag, so that an upgrade package of software is obtained. According to the method, the NFC can be adopted to trigger the WiFi to automatically connect with the production router (namely the first router), identification is stable, the false detection rate is low, specific information can be acquired, expansibility is high, terminal equipment can be triggered to connect with a network conveniently and efficiently to acquire an upgrade package, and the efficiency of software upgrade can be improved.
With reference to the first aspect, in one possible implementation manner, the ith group of data received by the terminal device includes at least one frame of aggregate data frame, where the at least one frame of aggregate data frame is obtained by aggregating multiple frames of data frames in the ith group of data by the first router, and the terminal device communicates with the server through the first router.
According to the method, one or more terminal devices are carried by the carrier, the carrier comprises the NFC tag, and the one or more terminal devices can be triggered to be connected with the designated router (namely the first router) through first information contained in the NFC tag, so that an upgrade package of software is obtained. The first router may aggregate the multi-frame data frames to obtain an aggregate data frame, and then send the aggregate data frame to the terminal device. The method can reduce the data volume of the data transmission between the router and the terminal equipment, reduce the bandwidth of the data transmission between the router and the terminal equipment, and improve the transmission rate, thereby improving the efficiency of software upgrading. With reference to the first aspect, in one possible implementation manner, the N sets of data include a j-th set of data, where j is not greater than N; the method further comprises the steps of:
the terminal equipment receives a second handshake request message from the server through TCP connection; the second handshake request message is used for requesting a receiving result of the j-th group of data;
the terminal equipment sends a second handshake response message to the server through TCP connection, wherein the second handshake response message comprises a receiving result of the j-th group of data, and the receiving result of the j-th group of data is used for indicating receiving failure;
And the terminal equipment receives the j-th group data from the server after sending the second handshake response message.
The embodiment of the application can utilize the protocol of the TCP to carry out ACK check and retransmission interaction on the distributed data packet, thereby realizing reliable broadcast transmission. Therefore, the method can ensure the reliability of data transmission and improve the efficiency of data transmission, thereby upgrading the software of the terminal equipment conveniently and efficiently.
In a second aspect, an embodiment of the present application provides a software upgrade method, including: the method comprises the steps that a server receives a first request sent by terminal equipment, wherein the first request is used for requesting an upgrade package; the upgrade package is used for upgrading the software of the terminal equipment, and comprises N groups of data, wherein N is an integer greater than 1; the server sends the ith group of data to the terminal equipment through a user datagram protocol UDP, wherein the ith group of data is one group of data in the N groups of data, and i is not more than N; the server establishes a Transmission Control Protocol (TCP) connection with the terminal equipment; the server sends a first handshake request message to the terminal equipment through TCP connection; the first handshake request message is used for requesting a receiving result of the ith group of data; the server receives a first handshake response message from the terminal device through the TCP connection, wherein the first handshake response message comprises a receiving result of the ith group of data, and the receiving result of the ith group of data is used for indicating successful receiving.
With reference to the second aspect, in one possible implementation manner, the software is operating system software.
With reference to the second aspect, in one possible implementation manner, the N sets of data include a j-th set of data, where j is not greater than N; the method further comprises the steps of: the server sends a second handshake request message to the terminal equipment through TCP connection; the second handshake request message is used for requesting a receiving result of the j-th group of data; the server receives a second handshake response message from the terminal equipment through TCP connection, wherein the second handshake response message comprises a receiving result of the j-th group of data, and the receiving result of the j-th group of data is used for indicating receiving failure; and after receiving the second handshake response message, the server sends the j-th group of data to the terminal equipment.
With reference to the second aspect, in one possible implementation manner, the ith group of data received by the terminal device includes at least one frame of aggregate data frame, where the at least one frame of aggregate data frame is obtained by aggregating multiple frames of data frames in the ith group of data by a first router, where the first router is a router connected to the terminal device, and the terminal device communicates with the server through the first router.
In a third aspect, the present application provides a functional module for performing the method shown in any one of the above aspects or any possible implementation of any one of the above aspects.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: one or more processors and memory; the memory is coupled to the one or more processors, the memory for storing computer program code comprising computer instructions that the one or more processors invoke the computer instructions to cause the electronic device to perform the method in any of the above aspects or any of the possible implementations of any of the above aspects.
In a fifth aspect, embodiments of the present application provide a chip system, where the chip system is applied to an electronic device, and the chip system includes one or more processors configured to invoke computer instructions to cause the electronic device to perform a method as shown in any of the above aspects or any possible implementation of any of the above aspects.
In a sixth aspect, embodiments of the present application provide a computer readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform a method as shown in any one of the above aspects or any possible implementation of any one of the above aspects.
It will be appreciated that the functional module provided in the third aspect, the electronic device provided in the fourth aspect, the chip system provided in the fifth aspect, and the computer storage medium provided in the sixth aspect are all configured to perform the method provided in the embodiment of the present application. Therefore, the advantages achieved by the method can be referred to as the advantages of the corresponding method, and will not be described herein.
Drawings
Fig. 1 is a schematic diagram of a network architecture of a communication system according to an embodiment of the present application;
fig. 2 is a schematic diagram of a network architecture of another communication system according to an embodiment of the present application;
FIG. 3 is a method flowchart of a software upgrade method provided in an embodiment of the present application;
fig. 4A is a schematic diagram of a carrier for carrying terminal equipment according to an embodiment of the present application;
FIG. 4B is a schematic diagram of launching a first application provided by an embodiment of the present application;
FIG. 4C is a diagram of a user interface for displaying a popup window according to an embodiment of the present application;
fig. 4D is a schematic diagram of data transmission between a first terminal and a server according to an embodiment of the present application;
fig. 5A is a schematic hardware structure of an electronic device according to an embodiment of the present application;
fig. 5B is a schematic software architecture of an electronic device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the present application will be further described with reference to the accompanying drawings.
The terms "first" and "second" and the like in the description, claims and drawings of the present application are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprising," "including," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion. Such as a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to the list of steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art will understand explicitly and implicitly that the embodiments described in this application may be combined with other embodiments.
In the present application, "at least one (item)" means one or more, "a plurality" means two or more, and "at least two (items)" means two or three or more, and/or "for describing an association relationship of an association object, three kinds of relationships may exist, for example," a and/or B "may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of (a) or a similar expression thereof means any combination of these items. For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c".
At present, software such as an operating system and the like is installed and upgraded by a terminal manufacturer before the terminal equipment leaves a factory. Terminal manufacturers often adopt a wired transmission mode to upgrade software of terminal equipment, and the method specifically comprises the following steps: the terminal equipment is connected with the server through the data line to acquire the upgrade package from the server, wherein equipment such as a clamp, a cabinet and the like is required to be used for connection and fixation, the communication link is complex, the communication problems are more, the operation is complex, and the line body occupies a large area. In addition, the wired transmission may have hard contact with the terminal device, for example, the USB port of the terminal device is plugged and unplugged, which easily causes three injuries to the appearance of the terminal device.
In view of this, the embodiment of the application provides a software upgrading method, which automatically triggers a terminal to access a designated path through a wireless network to obtain an upgrading software package through a connection mode of NFC and WIFI, and downloads a software version into a batch of terminals for upgrading through wireless transmission.
According to the method, on one hand, the data transmission capacity of the wireless network can be utilized to replace an original wired transmission mode, and because the USB port is not plugged in and pulled out in the whole process, the risk of abnormal interruption possibly occurring in the transmission process of the data line is avoided, a large amount of computer resources and data lines are not required to be occupied, and the resource consumption and quality risk are reduced; hardware cabinet resources of the production line, clamps and operation working hours of the production line can be saved, so that the effect of saving manufacturing cost is achieved. On the other hand, because the appointed path is accessed through the wireless network, the operation of system upgrading which is carried out by accessing the computer through the data line is avoided, the operation steps are reduced, the operation convenience is improved, the downloading speed is improved, the quality yield of the terminal equipment is improved, and the reliability is improved.
In order to better understand a software upgrading method and related devices provided in the present application, a network architecture to which the embodiments of the present application are applied is described below.
Referring to fig. 1, fig. 1 is a schematic diagram of a network architecture of a communication system according to an embodiment of the present application. As shown in fig. 1, the network architecture may include a terminal device 100 and a server 200.
Wherein, the server 200 is configured to provide an upgrade package to the terminal device 100; the terminal device 100 is configured to receive an upgrade package from the server 200 to upgrade software.
Alternatively, the terminal device 100 may be one terminal device, or may include a plurality of terminal devices (see fig. 2 for details); server 200 (also referred to as a server) may be a device; a server farm may also be provided, such as one that includes an industrial personal computer and a version server (see fig. 2 for details).
Referring to fig. 2, fig. 2 is a schematic diagram of a network architecture of another communication system according to an embodiment of the present application.
As shown in fig. 2, the network architecture may include an industrial personal computer, a version server, a first router, and a plurality of terminal devices. The version server is used for providing an upgrade package for the industrial personal computer; the industrial personal computer is used for distributing the upgrade package to a plurality of terminal devices; the first router is a router connected with the terminal equipment, and the terminal equipment is communicated with the server through the first router. Then, the terminal device may receive the upgrade package from the version server through the router, and further upgrade the software based on the upgrade package.
Optionally, the network architecture may further include a carrier, where the carrier is configured to carry an NFC tag, and the NFC tag is configured to trigger the terminal device to connect to the router and execute a software upgrade procedure.
The terminal device 100 may be a User Equipment (UE), for example, an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a smart television, a wearable device (e.g., a smart watch), a vehicle-mounted device, a smart home device (e.g., a smart speaker), an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a personal digital assistant (personaldigital assistant, PDA), and the like. Exemplary embodiments of the terminal device 100 include, but are not limited to, portable electronic devices with iOS, android, harmony, windows, linux, or other operating systems mounted. The terminal device 100 may also be other portable electronic devices such as a Laptop computer (Laptop) or the like. It should also be appreciated that in other embodiments, the terminal device 100 described above may be a desktop computer or the like instead of a portable electronic device.
The software upgrading method provided by the embodiment of the application is exemplified by the following scenario of operating system upgrading of batch terminal devices in a production environment.
Next, a software upgrading method provided in the embodiment of the present application is described through fig. 3. The functions performed by the terminal device in this embodiment may also be performed by a module (e.g., a chip) in the terminal device, and the functions performed by the server in this application may also be performed by a module (e.g., a chip) in the server.
The method comprises the following partial or total steps:
s301: when a plurality of terminal devices are located on a carrier, first information contained in NFC labels on the carrier is acquired through NFC, and the first information comprises router information of a first router and information indicating to start a first application.
The first information is used for indicating to acquire an upgrade package of the operating system, the NFC label is arranged on a carrier, and the carrier is used for carrying a plurality of devices.
Fig. 4A illustrates a carrier for carrying a terminal device, the carrier comprising a carrier part and NFC tags, fig. 4A illustrates that the carrier comprises 4 NFC tags and 4 positions where the terminal device can be placed. For example, the carrier may be configured to carry 4 folding machines, where when the 4 folding machines are located on the carrier, the first information included in the NFC tag on the carrier is acquired through NFC, and the first information includes router information of the first router and information indicating that the first application is started. It should be understood that the carrier is only an example, and should not be construed as limiting the application, and in other embodiments of the application, the size of the location where the terminal device is placed in the carrier may be changed according to a specific model of the terminal device, which is not limited in the application.
S302: the plurality of terminal devices respectively respond to the information indicating the starting of the first application and start the first application.
Fig. 4B illustrates a schematic diagram of launching a first application. As shown in fig. 4B, the terminal device may acquire NFC card information (i.e., the first information included in the NFC tag); judging NFC information characteristics based on NFC card information, wherein the NFC card information can comprise NFC tag information; if the terminal equipment judges that the NFC tag information is the production tag, the terminal equipment can judge whether to pull up the first application; if the production tag is a tag indicating an upgrade of the operating system (i.e. the information indicating that the first application is started), the terminal device may pull up (i.e. start) the first application; if the production tag is a generated tag of other production requirements, the terminal device may execute a tag forwarding query, for example, display an interface as shown in fig. 4C, where the interface includes a popup 401, and the popup is used to query whether to launch an application corresponding to the tag. Illustratively, this first application may be referred to as the esasist test platform.
It should be appreciated that the NFC tag on the carrier may be one of the production tags described above, in a custom tag format.
S303: the plurality of terminal devices are respectively connected with the first router through the first application based on the router information of the first router, and the plurality of terminal devices are respectively communicated with the server through the first router.
The router information of the first router is identification information of the first router, such as service set identification (Service Set Identifier, ssid) ssid.
In some embodiments, after the first application is started, the router information of the first router may be obtained, and the WiFi application is invoked to connect to the first router.
In an exemplary production environment before the terminal equipment leaves the factory, the automatic connection of the wifi production environment can be realized through the steps. Specifically, the method comprises the following steps: (1) the carrier is equipped with an NFC tag containing router information of the first router and information indicating that the first application is started. (2) After the terminal equipment is placed on the carrier, triggering and acquiring corresponding information through NFC, and automatically starting APK (namely the first application) to connect with WiFi. (3) The terminal device automatically downloads the software version (i.e. the upgrade package) through the WiFi connection and completes the upgrade.
It can be appreciated that, when the NFC tag is sensed, a popup window (as shown in fig. 4C) is displayed at the present time, and the embodiment of the present application may automatically start the first application to implement connection with WiFi and software upgrade, without displaying the popup window to wait for confirmation of the user.
S304: and the plurality of terminal devices respectively send first requests to the server through the first router, wherein the first requests are used for requesting upgrade packages of the operating system.
Accordingly, the server receives a plurality of first requests from a plurality of terminal devices.
The upgrade package of the operating system is used for upgrading the operating system of the terminal equipment.
Alternatively, the first request may include an identification of the terminal device, such as a Serial Number (SN) and an IP address.
S305: and the plurality of terminal devices respectively establish Transmission Control Protocol (TCP) connection with the server.
In some embodiments, the server may establish a TCP connection with the terminal device after receiving the first request from the terminal device.
The embodiment of the application does not limit the specific implementation of establishing the TCP connection.
S306: the server multicasts N groups of data to a plurality of terminal devices through a user datagram protocol UDP, wherein an upgrade package of an operating system comprises N groups of data, and N is an integer larger than 1.
In some embodiments, the server receives the first requests from the plurality of terminal devices in a preset time period, and then the server may group the upgrade packages in packets to obtain N groups of data; further, the N groups of data are multicast to a plurality of terminal devices. In an exemplary embodiment, the server receives a first request from the first terminal at a first time, and a preset period of time is set between the first time and a second time, so that the server may determine that a terminal device that sends the first request to the server between the first time and the second time is the plurality of terminal devices, that is, the server multicasts N groups of data to the server between the first time and the second time.
In some embodiments, the first router may aggregate the multi-frame data frames in each of the N sets of data to obtain multi-frame aggregate data frames corresponding to each set of data; after receiving the N groups of data from the server, the first router may send a multi-frame aggregate data frame corresponding to each group of data to the terminal device. It should be appreciated that in the practical application scenario, UDP has a problem of low transmission rate, because the broadcast frames are not aggregated, and each TX frame needs to be re-subjected to clear channel assessment (ClearChannelAssessment, CCA) CCA, which is inefficient in use of the air interface. The embodiment of the application can reach the transmission rate of 40MB/s by modifying the protocol stack, using aggregation during UDP transmission and adjusting the aggregation degree and the density (density) of the aggregated MAC protocol data units (A-Medium Access Control (MAC) protocol data unit, A-MPDU). The method can reduce the time of data transmission and improve the efficiency of data transmission.
Wherein, the data frame in each group of data may be an MPDU (may be referred to as a subframe), and each component frame in the MPDU has an 802.11 frame header. MPDUs therefore add overhead to each component frame. In the embodiment of the application, by starting the AMPDU through the broadcast frame, a plurality of subframes (i.e. multi-frame data frames in each group of data) can be aggregated to obtain an a-MPDU subframe. Each a-MPDU sub-frame is composed of MPDU deltamite and MPDU entities. For an a-MPDU, the remaining subframes, except the last subframe, have 0-3 bytes of padding field, making the subframe length an integer multiple of 4 bytes. The aggregated data frame reduces the PLCP Preamble and PLCP Header required for transmitting each 802.11 message, thereby improving the throughput of the system.
Alternatively, the first router may be connected to a plurality of terminal devices, and send an upgrade packet to the plurality of terminal devices. According to the embodiment of the application, the multicast does not need to use a shielding box, and the AP (namely the first router) can save AP and space resources by one-to-many.
S307: after multicasting each group of data, the server respectively sends handshake request messages corresponding to the group of data to a plurality of terminal devices through TCP connection; the handshake request message is used for requesting the receiving result of the group of data.
In one implementation, after sending a set of data, the server may send handshake request messages corresponding to the set of data to a plurality of terminal devices through TCP connection respectively; the handshake request message is used for requesting the receiving result of the group of data.
S308: after receiving the handshake request message of each group of data, the plurality of terminal devices respectively send handshake response messages to the server through TCP connection, wherein the handshake response messages comprise the receiving results of the group of data, and the receiving results of the group of data are used for indicating successful or failed receiving.
In one implementation, after receiving a handshake request message of each group of data, the terminal device checks whether the group of data has been received, and if the group of data has been received, sends a receiving result for indicating successful reception to the server; and if the group of data is not received, sending a receiving result for indicating the receiving failure to the server.
In another implementation, after receiving the handshake request message of each group of data, the terminal device checks whether the group of data has been received, and if the group of data has been received, sends a receiving result for indicating successful reception to the server; if the group of data is not received, waiting for preset time, and if the group of data is not received after the preset time, sending a receiving result for indicating the receiving failure to a server; and if the group of data is received after the preset time, sending a receiving result for indicating successful receiving to the server. The method can save transmission resources in case of slow data transmission caused by network delay.
S309: the server determines the reception condition of each group of data based on the handshake response message of each group of data among the N groups of data from the plurality of terminal devices.
In some embodiments, the server maintains receipt of a set of data after receiving a handshake response message for the set of data.
Alternatively, the reception situation of each set of data may include an identification of the terminal device that did not successfully receive the set of data.
The receiving condition of the group of data may be a handshake request message of the group of data from all terminal devices, or may be a handshake response message of only terminal devices that have not successfully received the group of data; but also the identity of the terminal device that did not successfully receive the set of data.
Optionally, if handshake response messages of a certain group of data from multiple terminal devices all indicate successful reception, the server may record that the receiving situation of the group of data is all successful. For example, the group of data is marked by a preset identifier, where the preset identifier is used to indicate that the group of data is received completely successfully.
Optionally, assuming that after the terminal device sends a handshake response message indicating that a certain group of data is received failed to the server, the terminal device receives the group of data before N groups of data are not received, the terminal device may send a handshake response message indicating that the group of data is received successfully to the server; further, the server may update the reception of the set of data.
S310: the server multicasts part or all of the N groups of data based on the receiving condition of each group of data.
In some embodiments, after multicasting N sets of data in turn, the server may perform second multicast on the terminal device that does not receive the data based on the receiving situation of the N sets of data. In the method, the server does not retransmit immediately when the terminal equipment does not receive the data, so that the influence of the fact that the individual terminal equipment does not receive a certain group of data on the software upgrading of a plurality of terminal equipment can be avoided.
The server performs the server on the upgrade package to group the upgrade package in a sub-package manner to obtain N groups of data; after all terminal devices are connected with a server, data distribution is carried out through UDP; all terminal equipment and a server synchronously establish TCP connection, and handshake is carried out on both sides after each group of data is sent; packet loss is generated in the distribution process and retransmission is not performed immediately, and the server can record packet loss information and information of corresponding terminal equipment; after the N groups of data transmission are completed, the terminal equipment which receives the data completely exits from the data reception; and then the server plays back the data corresponding to the recorded packet loss information circularly, and each unfinished terminal device (i.e. the terminal device which does not receive the N groups of data) exits the data receiving after the corresponding packet loss is acquired.
Optionally, if handshake response messages of a certain group of data from the plurality of terminal devices all indicate that the reception is successful, the second multicast group server may not multicast the group of data.
The specific procedure of the second wheel multicast may be referred to as the procedure of steps S306 to S310.
In one implementation, after performing the second multicast, if there are still terminal devices that do not receive part of the data, the server may perform the third multicast.
Optionally, if after m-wheel multicast, if the terminal device still does not receive part of the data, the server and/or the terminal device may display the receiving condition of the terminal device. Where m is an integer greater than 2, e.g., m is 3. In the method, a worker can check the receiving condition of the terminal equipment to check the terminal equipment and the like, and the problem that the whole software upgrading time is too long due to continuous data transmission caused by the fact that part of the terminal equipment fails and the like can be avoided.
S311: and the plurality of terminal devices upgrade the operating system based on the received upgrade packages respectively.
In some embodiments, the terminal device upgrades the operating system based on the N sets of data after receiving the N sets of data.
The following exemplary process of steps S306 to S308 is described with reference to fig. 4D. Assuming that the plurality of terminals includes a first terminal, fig. 4D schematically illustrates data transmission between the first terminal and the server. FIG. 4D illustrates three of the N sets of Data, data1, data2, and Data3, respectively; and exemplarily shows a handshake request message Reguest1 corresponding to Data1, and a handshake response message ACK1 corresponding to Data 1; handshake request message Reguest2 corresponding to Data2, handshake response message ACK2 corresponding to Data 2; data3 corresponds to a handshake request message Reguest3, and Data3 corresponds to a handshake response message ACK3.
As shown in fig. 4D, the server may transmit Data1 to the first terminal through UDP, and transmit eguest1 to the first terminal through a TCP connection after transmitting Data 1; after receiving the provision 1, the first terminal may send ACK1 to the server, where ACK1 is used to indicate whether the first terminal receives Data1. Further, upon receiving the ACK1, the server may transmit Data2 to the first terminal via UDP, and transmit eguest2 to the first terminal via a TCP connection after transmitting Data 2; after receiving the provision 2, the first terminal may send an ACK2 to the server, where the ACK2 is used to indicate whether the first terminal receives Data2. Further, upon receiving the ACK1, the server may transmit Data3 to the first terminal via UDP, and transmit eguest3 to the first terminal via a TCP connection after transmitting Data 3; after receiving the provision 3, the first terminal may send an ACK3 to the server, where the ACK3 is used to indicate whether the first terminal receives Data3.
Optionally, if ACK1 is used to indicate that the first terminal does not receive Data1, the server may store the ACK1; or record that the first terminal did not receive Data1. After multicasting N groups of Data, the server may send Data1 to the first terminal based on the stored ACK1 or information that the first terminal does not receive Data1. It can be understood that if the server retransmits the first terminal immediately when receiving the data of a certain group, the server will affect other terminals to receive the data of the next group, so that the method can avoid affecting the data reception of other terminal devices in the plurality of terminal devices by retransmitting the terminal which does not receive the data of the certain group after multicasting the data of the N groups, which is beneficial to improving the overall data transmission rate.
The embodiment of the application can solve the problem that the wireless transmission scene cannot be one-to-many between the AP and the terminal equipment in a multicast mode. Since the UDP protocol is an ideal protocol for distributing information, but the UDP protocol is connectionless and unreliable, it is not currently used in this scenario. In the method, the multicast protocol is combined with the TCP and UDP, the data to be transmitted are grouped into packets, then broadcast and distributed by the UDP protocol, and meanwhile, one-to-one TCP connection is established between the AP and each terminal device. And carrying out ACK check and retransmission interaction on the distributed data packets by utilizing a TCP protocol, thereby realizing reliable broadcast transmission.
Corresponding to the above embodiment, the present application further provides a terminal device and a server.
First, the terminal device provided in the embodiments of the present application is described by way of example through the form and the software and hardware architecture of the electronic device in fig. 5A and fig. 5B.
The electronic device may be a portable terminal device with an iOS, android, microsoft or other operating system mounted, such as a cell phone, tablet, desktop, laptop, handheld, notebook, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook, as well as a cellular phone, personal digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) device, virtual Reality (VR) device, artificial intelligence (artificial intelligence, AI) device, wearable device, vehicle-mounted device, smart home device and/or smart city device, etc.
Fig. 5A exemplarily shows a hardware structure of an electronic device according to an embodiment of the present application. As shown in fig. 5A, the electronic device may include: processor 110, external memory interface 120, internal memory 126, camera 130, display 140, audio module 150, speaker 150A, receiver 150B, microphone 150C, headset interface 150D, and sensor module 160. Wherein the sensor module 160 may include a pressure sensor 160A, a distance sensor 160F, a proximity light sensor 160G, a touch sensor 160K, an ambient light sensor 160L, etc.
The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can be a neural center and a command center of the electronic device. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
It should be understood that the connection relationship between the modules illustrated in the embodiments of the present application is only illustrative, and does not limit the structure of the electronic device. In other embodiments of the present application, the electronic device may also use different interfacing manners in the foregoing embodiments, or a combination of multiple interfacing manners.
The internal memory 126 may include one or more random access memories (random access memory, RAM) and one or more non-volatile memories (NVM).
The random access memory may include a static random-access memory (SRAM), a dynamic random-access memory (dynamic random access memory, DRAM), a synchronous dynamic random-access memory (synchronous dynamic random access memory, SDRAM), a double data rate synchronous dynamic random-access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as fifth generation DDR SDRAM is commonly referred to as DDR5 SDRAM), etc.;
the nonvolatile memory may include a disk storage device, a flash memory (flash memory).
The FLASH memory may include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. divided according to an operation principle, may include single-level memory cells (SLC), multi-level memory cells (MLC), triple-level memory cells (TLC), quad-level memory cells (QLC), etc. divided according to a storage specification, may include universal FLASH memory (english: universal FLASH storage, UFS), embedded multimedia card (eMMC), etc. divided according to a storage specification.
The random access memory may be read directly from and written to by the processor 110, may be used to store executable programs (e.g., machine instructions) for an operating system or other on-the-fly programs, may also be used to store data for users and applications, and the like.
The nonvolatile memory may store executable programs, store data of users and applications, and the like, and may be loaded into the random access memory in advance for the processor 110 to directly read and write.
The external memory interface 120 may be used to connect external non-volatile memory to enable expansion of the memory capabilities of the electronic device. The external nonvolatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and video are stored in an external nonvolatile memory.
The electronic device implements display functions through the GPU, the display screen 140, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 140 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 140 is used to display images, videos, and the like. The display screen 140 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD). The display panel may also be manufactured using organic light-emitting diode (OLED), active-matrix organic light-emitting diode (AMOLED), flexible light-emitting diode (flex-emitting diode), mini, micro-OLED, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device may include 1 or N display screens 140, N being a positive integer greater than 1.
The electronic device may implement shooting functions through an ISP, a camera 130, a video codec, a GPU, a display screen 140, an application processor, and the like.
The ISP is used to process the data fed back by the camera 130. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, so that the electrical signal is converted into an image visible to naked eyes. ISP can also perform algorithm optimization on noise, brightness and the like of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 130.
The camera 130 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device may include 1 or N cameras 130, N being a positive integer greater than 1.
In the embodiment of the present application, the camera 130 may be a tele camera or a main camera, a wide camera, or the like.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, and so on.
Video codecs are used to compress or decompress digital video. The electronic device may support one or more video codecs. In this way, the electronic device may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent cognition of electronic devices can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The electronic device may implement audio functions through an audio module 150, a speaker 150A, a receiver 150B, a microphone 150C, an earphone interface 150D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 150 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 150 may also be used to encode and decode audio signals. In some embodiments, the audio module 150 may be disposed in the processor 110, or some functional modules of the audio module 150 may be disposed in the processor 110.
The speaker 150A, also referred to as a "horn", is used to convert audio electrical signals into sound signals. The electronic device may listen to music, or to hands-free conversations, through speaker 150A.
A receiver 150B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When the electronic device picks up a phone call or voice message, the voice can be picked up by placing the receiver 150B close to the human ear.
Microphone 150C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 150C through the mouth, inputting a sound signal to the microphone 150C. The electronic device may be provided with at least one microphone 150C. In other embodiments, the electronic device may be provided with two microphones 150C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device may also be provided with three, four, or more microphones 150C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 150D is used to connect a wired earphone. The headset interface 150D may be a USB interface or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic apparatus. In other embodiments of the present application, the electronic device may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. For example, the electronic device may also include keys, motors, indicators, and subscriber identity module (subscriber identification module, SIM) card interfaces, etc. For another example, the sensor module may further include: a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a fingerprint sensor, a temperature sensor, a bone conduction sensor, and the like.
Fig. 5B illustrates a software architecture of an electronic device according to an embodiment of the present application.
As shown in fig. 5B, the layered architecture divides the system into several layers, each with a clear role and division. The layers communicate with each other through a software interface. In some embodiments, the system is divided into four layers, from top to bottom, an application layer, an application framework layer (frame work), a system layer, and a kernel layer, respectively. Wherein:
The application layer (application) may comprise a series of application packages. For example, the application package may include application programs such as a first application, a WiFi application, and an NFC application.
In this embodiment of the present application, the electronic device may obtain NFC information in the NFC tag through the NFC application, for example, the first information includes router information of the first router and information indicating to start the first application; further, the electronic device may pull up the first application based on the information indicating that the first application is started; the electronic device can call the WiFi application to connect with the first router through the first application based on the router information of the first router.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 5B, the application framework layer may include a window manager, a content provider, a view system, a resource manager, and the like. Wherein the window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like. The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc. The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture. The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The Runtime (run time) includes core libraries and virtual machines. Run time is responsible for scheduling and management of the system. The core library consists of two parts: one part is the function that the programming language (e.g., the java language) needs to call, and the other part is the core library of the system. The application layer and the application framework layer run in a virtual machine. The virtual machine executes the programming files (e.g., java files) of the application layer and the application framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), two-dimensional graphics engines (e.g., SGL), etc. The surface manager is used for managing the display subsystem and providing fusion of two-Dimensional (2D) and three-Dimensional (3D) layers for a plurality of applications. Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc. The three-dimensional graphic processing library is used for realizing 3D graphic drawing, image rendering, synthesis, layer processing and the like. The 2D graphics engine is a drawing engine for 2D drawing.
The software architecture may also include a hardware abstraction layer (hardware abstract layer, HAL), not shown in fig. 5B, which is an interface layer between the application framework layer and the kernel layer, providing a virtual hardware platform for the operating system.
The kernel layer is a layer between hardware and software. The kernel layer includes various hardware drivers such as display drivers, camera drivers, audio drivers, and sensor drivers. The kernel layer may also include a digital signal processor driver (not shown), an image processor driver (not shown), and the like. The camera drives an image sensor for driving one or more cameras in the camera module to acquire images and drives an image signal processor to preprocess the images. The digital signal processor driver is used for driving the digital signal processor to process the image. The image processor driver is used for driving the image processor to process the image.
Referring to fig. 6, a schematic structural diagram of a server 200 according to an embodiment of the present application is provided. As shown in fig. 6, the server 200 may include: processor 2001, memory 2002, and communication unit 2003. The components may communicate via one or more buses, and those skilled in the art will appreciate that the structure of server 200 shown in FIG. 6 is not limiting of the embodiments of the present application, and that it may be a bus-like structure, a star-like structure, or may include more or fewer components than shown in FIG. 6, or a combination of certain components, or a different arrangement of components.
Wherein the communication unit 2003 is configured to establish a communication channel, so that the storage device may communicate with other devices. Receiving user data sent by other devices or sending user data to other devices.
The processor 2001, which is a control center of a storage device, connects various parts of the entire server 200 using various interfaces and lines, performs various functions of the server 200 and/or processes data by running or executing software programs and/or modules stored in the memory 2002, and calling data stored in the memory. The processor may be comprised of integrated circuits (integrated circuit, ICs), such as a single packaged IC, or may be comprised of packaged ICs that connect multiple identical or different functions. For example, the processor 2001 may include only a central processing unit (central processing unit, CPU). In the embodiment of the application, the CPU may be a single operation core or may include multiple operation cores.
The memory 2002 for storing instructions for execution by the processor 2001, the memory 2002 may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
The execution instructions in memory 2002, when executed by processor 2001, enable server 200 to perform some or all of the steps of the method embodiments described above.
In a specific implementation, the present application further provides a computer storage medium, where the computer storage medium may store a program, where the program may include some or all of the steps in the embodiments provided herein when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (random access memory, RAM), or the like.
In a specific implementation, the embodiment of the application further provides a computer program product, where the computer program product contains executable instructions, and when the executable instructions are executed on a computer, the executable instructions cause the computer to perform some or all of the steps in the above method embodiments.
As used in the above embodiments, the term "when …" may be interpreted to mean "if …" or "after …" or "in response to determination …" or "in response to detection …" depending on the context. Similarly, the phrase "at the time of determination …" or "if detected (a stated condition or event)" may be interpreted to mean "if determined …" or "in response to determination …" or "at the time of detection (a stated condition or event)" or "in response to detection (a stated condition or event)" depending on the context.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.
The above embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (9)

1. A method of software upgrade, the method comprising:
when the terminal equipment is located on a carrier, acquiring first information contained in an NFC tag through near field communication NFC, wherein the NFC tag is arranged on the carrier, the carrier is used for bearing a plurality of pieces of equipment, and the first information comprises router information of a first router and information for indicating to start a first application;
The terminal equipment responds to the first information and starts the first application;
the terminal equipment is connected with the first router through the first application;
the terminal equipment sends a first request to a server through the first router, wherein the first request is used for requesting an upgrade package; the upgrade package is used for upgrading software of the terminal equipment, and comprises N groups of data, wherein N is an integer greater than 1;
the terminal equipment establishes a Transmission Control Protocol (TCP) connection with the server;
the terminal equipment receives the ith group of data from the server through a User Datagram Protocol (UDP), wherein the ith group of data is one group of data in the N groups of data, and i is not more than N;
the terminal equipment receives a first handshake request message from the server through the TCP connection; the first handshake request message is used for requesting a receiving result of the ith group of data;
the terminal equipment sends a first handshake response message to the server through the TCP connection, wherein the first handshake response message comprises a receiving result of the ith group of data, and the receiving result of the ith group of data is used for indicating successful receiving;
And the terminal equipment upgrades the software based on the upgrade package.
2. The method of claim 1, wherein the software is operating system software.
3. The method of claim 2, wherein the i-th set of data received by the terminal device comprises at least one frame of aggregate data frame, the at least one frame of aggregate data frame being derived by the first router aggregating frames of multi-frame data in the i-th set of data, the terminal device in communication with the server through the first router.
4. A method according to any one of claims 1-3, wherein the N sets of data comprise a j-th set of data, the j being no greater than the N; the method further comprises the steps of:
the terminal equipment receives a second handshake request message from the server through the TCP connection; the second handshake request message is used for requesting a receiving result of the j-th group of data;
the terminal equipment sends a second handshake response message to the server through the TCP connection, wherein the second handshake response message comprises a receiving result of the j-th group of data, and the receiving result of the j-th group of data is used for indicating receiving failure;
And the terminal equipment receives the j-th group data from the server after sending the second handshake response message.
5. A method of software upgrade, the method comprising:
the method comprises the steps that a server receives a first request sent by terminal equipment, wherein the first request is used for requesting an upgrade package; the upgrade package is used for upgrading software of the terminal equipment, and comprises N groups of data, wherein N is an integer greater than 1;
the server sends the ith group of data to the terminal equipment through a User Datagram Protocol (UDP), wherein the ith group of data is one group of data in the N groups of data, and i is not more than N;
the server establishes a Transmission Control Protocol (TCP) connection with the terminal equipment;
the server sends a first handshake request message to the terminal equipment through the TCP connection; the first handshake request message is used for requesting a receiving result of the ith group of data;
the server receives a first handshake response message from the terminal equipment through the TCP connection, wherein the first handshake response message comprises a receiving result of the ith group of data, and the receiving result of the ith group of data is used for indicating successful receiving;
The terminal equipment comprises a first application, wherein the terminal equipment is used for acquiring first information contained in an NFC tag through near field communication NFC when the terminal equipment is positioned on a carrier, starting the first application, connecting a first router through the first application and sending the first request to the server through the first router; the NFC tag is arranged on the carrier, the carrier is used for bearing a plurality of devices, and the first information comprises router information of the first router and information indicating to start the first application.
6. The method of claim 5, wherein the software is operating system software.
7. The method of claim 5, wherein the N sets of data comprise a j-th set of data, the j being no greater than the N; the method further comprises the steps of:
the server sends a second handshake request message to the terminal equipment through the TCP connection; the second handshake request message is used for requesting a receiving result of the j-th group of data;
the server receives a second handshake response message from the terminal equipment through the TCP connection, wherein the second handshake response message comprises a receiving result of the j-th group of data, and the receiving result of the j-th group of data is used for indicating a receiving failure;
And after receiving the second handshake response message, the server sends the j-th group of data to the terminal equipment.
8. The method according to any of claims 5-7, wherein the i-th set of data received by the terminal device comprises at least one frame of aggregate data frame, the at least one frame of aggregate data frame being obtained by aggregating frames of multi-frame data in the i-th set of data by a first router, the first router being a router connected to the terminal device, the terminal device communicating with the server through the first router.
9. An electronic device, the electronic device comprising: one or more processors and memory;
the memory is coupled to the one or more processors, the memory for storing computer program code comprising computer instructions that the one or more processors invoke to cause the electronic device to perform the method of any of claims 1-8.
CN202311563973.1A 2023-11-22 2023-11-22 Software upgrading method and electronic equipment Active CN117270917B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311563973.1A CN117270917B (en) 2023-11-22 2023-11-22 Software upgrading method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311563973.1A CN117270917B (en) 2023-11-22 2023-11-22 Software upgrading method and electronic equipment

Publications (2)

Publication Number Publication Date
CN117270917A CN117270917A (en) 2023-12-22
CN117270917B true CN117270917B (en) 2024-04-12

Family

ID=89208515

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311563973.1A Active CN117270917B (en) 2023-11-22 2023-11-22 Software upgrading method and electronic equipment

Country Status (1)

Country Link
CN (1) CN117270917B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101818977B1 (en) * 2017-06-27 2018-01-16 주식회사 인터엠 Method of providing batch process of software upgrade for pluralities of heterogeneous broadcasting equipments
CN108632324A (en) * 2017-03-24 2018-10-09 深圳市帝迈生物技术有限公司 The multiple instruments of blood cell analyzer synchronize upgrade method, system and IPU terminals
CN210348467U (en) * 2019-10-22 2020-04-17 神经元信息技术(深圳)有限公司 Modular design structure capable of updating MCU software
KR20200076775A (en) * 2018-12-19 2020-06-30 아토디자인 주식회사 theme furniture system for a child
CN112003732A (en) * 2020-07-27 2020-11-27 苏州浪潮智能科技有限公司 Method and system for realizing CPLD (Complex programmable logic device) firmware update in mass servers
CN114090033A (en) * 2021-09-30 2022-02-25 珠海荣邦智能科技有限公司 OTA (over the air) upgrading method and device, electronic equipment and readable medium
CN115348333A (en) * 2022-08-16 2022-11-15 南方电网电力科技股份有限公司 Data transmission method, system and equipment based on UDP (user Datagram protocol) double-end communication interaction

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632324A (en) * 2017-03-24 2018-10-09 深圳市帝迈生物技术有限公司 The multiple instruments of blood cell analyzer synchronize upgrade method, system and IPU terminals
KR101818977B1 (en) * 2017-06-27 2018-01-16 주식회사 인터엠 Method of providing batch process of software upgrade for pluralities of heterogeneous broadcasting equipments
KR20200076775A (en) * 2018-12-19 2020-06-30 아토디자인 주식회사 theme furniture system for a child
CN210348467U (en) * 2019-10-22 2020-04-17 神经元信息技术(深圳)有限公司 Modular design structure capable of updating MCU software
CN112003732A (en) * 2020-07-27 2020-11-27 苏州浪潮智能科技有限公司 Method and system for realizing CPLD (Complex programmable logic device) firmware update in mass servers
CN114090033A (en) * 2021-09-30 2022-02-25 珠海荣邦智能科技有限公司 OTA (over the air) upgrading method and device, electronic equipment and readable medium
CN115348333A (en) * 2022-08-16 2022-11-15 南方电网电力科技股份有限公司 Data transmission method, system and equipment based on UDP (user Datagram protocol) double-end communication interaction

Also Published As

Publication number Publication date
CN117270917A (en) 2023-12-22

Similar Documents

Publication Publication Date Title
CN113726950B (en) Image processing method and electronic equipment
US20220318195A1 (en) Card Rendering Method and Electronic Device
WO2020093988A1 (en) Image processing method and electronic device
US20230021994A1 (en) Cross-Device Content Projection Method and Electronic Device
CN113961157B (en) Display interaction system, display method and equipment
WO2022179275A1 (en) Terminal application control method, terminal device, and chip system
WO2021179990A1 (en) Application server access method and terminal
CN110413420B (en) Data transmission method, device, terminal and storage medium
WO2023179123A1 (en) Bluetooth audio playback method, electronic device, and storage medium
WO2022143258A1 (en) Voice interaction processing method and related apparatus
CN116048933A (en) Fluency detection method
CN117270917B (en) Software upgrading method and electronic equipment
WO2023273766A1 (en) Compilation optimization method and apparatus
WO2022111664A1 (en) Patching method, related apparatus, and system
WO2023016059A1 (en) Data transmission control method and related apparatus
WO2022033355A1 (en) Mail processing method and electronic device
WO2022121988A1 (en) Display synchronization method, electronic device, and readable storage medium
US20240163204A1 (en) Multipath aggregation scheduling method and electronic device
CN114489471A (en) Input and output processing method and electronic equipment
WO2023179682A1 (en) Device collaboration method
WO2023051116A1 (en) Distributed implementation method and system, and electronic device and storage medium
CN113271577B (en) Media data playing system, method and related device
WO2022228102A1 (en) Communication resource scheduling method and electronic device
WO2024093795A1 (en) Device replacement configuration method and apparatus
WO2024067170A1 (en) Device management method 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
GR01 Patent grant
GR01 Patent grant