OTA-based device upgrade method, device, equipment, medium and system
By centrally managing the upgrade of terminal devices through the central server, the problem of complicated upgrade process in a multi-server environment is solved, intelligent upgrades across servers are realized, and operation and maintenance costs are reduced.
Patent Information
- Application Number
- CN202210381796.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-12
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-04-12
Smart Images

Figure CN114741101B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular to an OTA-based device upgrade method, apparatus, device, medium, and system. Background Art
[0002] Currently, due to various requirements, such as policy, data management security and efficiency, and regional specialized service provisioning, multiple terminal devices with the same application installed may connect to different, isolated servers. For example, terminal A may be registered with a server deployed in region A, while terminal B may be registered with a server deployed in region B. The primary application functions on terminal A and terminal B are identical; they only access different domain names and authorized servers.
[0003] In this scenario, when an application on a terminal device needs to be upgraded, the legitimacy of the terminal device must be ensured during the upgrade process. Since a terminal device is only considered legitimate on its registered server, the terminal device can only be upgraded by logging into its registered server. This requires deploying the same application upgrade logic on each server, resulting in duplicate deployment of upgrade functionality across multiple servers. This complicates the terminal device upgrade process and increases server-side operation and maintenance costs. Summary of the Invention
[0004] In order to solve the above technical problems, the present invention provides an OTA-based device upgrade method, apparatus, device, medium and system.
[0005] In a first aspect, the present invention provides an OTA-based device upgrade method, which is applied to a general server, comprising:
[0006] Receiving a device upgrade request sent by a terminal device; wherein the device upgrade request carries a device identification of the terminal device;
[0007] Based on the device identification, sending a device verification request to each sub-server, so that the sub-server verifies whether the terminal device is a registered device;
[0008] receiving device verification results fed back by each of the sub-servers, and determining a target home server for the terminal device based on each of the device verification results;
[0009] Based on the target home server, device upgrade information is sent to the terminal device; wherein the device upgrade information is used to instruct the terminal device to perform a device upgrade.
[0010] In some embodiments, determining the target home server of the terminal device based on the verification results of each device includes:
[0011] If the device verification results include a verification pass result, the sub-server corresponding to the verification pass result is determined as the target home server.
[0012] In some embodiments, determining the target home server of the terminal device based on the verification results of each device includes:
[0013] If each of the device verification results includes multiple verification pass results, determining the sub-servers corresponding to each of the verification pass results as candidate home servers;
[0014] The target home server is determined based on additional information in the device verification result corresponding to each candidate home server; wherein the additional information includes a record version number of the application to be upgraded and / or device access time information.
[0015] In some embodiments, when the additional information is the record version number, the device upgrade request also includes the current version number of the application to be upgraded;
[0016] The determining the target home server based on the additional information in the device verification result corresponding to each candidate home server includes:
[0017] If the current version number successfully matches one of the record version numbers corresponding to each candidate home server, the candidate home server corresponding to the successfully matched record version number is determined as the target home server.
[0018] In some embodiments, when the additional information further includes the device access time information, determining the target home server based on the additional information in the device verification result corresponding to each candidate home server includes:
[0019] If the current version number successfully matches multiple of the record version numbers corresponding to the candidate home servers, then the candidate home servers corresponding to the record version numbers that successfully match are selected from the candidate home servers;
[0020] The target home server is determined based on the device access time information corresponding to each of the screened candidate home servers.
[0021] In some embodiments, when the additional information is the device access time information, determining the target home server based on the additional information in the device verification result corresponding to each candidate home server includes:
[0022] Determine the time difference between the last device access time in each device access time information and the current system time, and determine the candidate home server corresponding to the smallest time difference as the target home server;
[0023] Alternatively, the accumulated access information in each device access time information is determined, and the candidate home server corresponding to the largest accumulated access information is determined as the target home server; wherein the accumulated access information includes accumulated access duration or accumulated access times.
[0024] In a second aspect, the present invention provides an OTA-based device upgrade apparatus, which is configured on a general server and includes:
[0025] A device upgrade request receiving module, configured to receive a device upgrade request sent by a terminal device; wherein the device upgrade request carries a device identifier of the terminal device;
[0026] A device verification request sending module, configured to send a device verification request to each sub-server based on the device identification, so that the sub-server verifies whether the terminal device is a registered device;
[0027] A target belonging server determining module is used to receive the device verification results fed back by each of the sub-servers, and determine the target belonging server of the terminal device based on each of the device verification results;
[0028] The device upgrade information sending module is used to send device upgrade information to the terminal device based on the target home server; wherein the device upgrade information is used to instruct the terminal device to perform a device upgrade.
[0029] In some embodiments, the target home server determination module is specifically configured to:
[0030] If the device verification results include a verification pass result, the sub-server corresponding to the verification pass result is determined as the target home server.
[0031] In some other embodiments, the target home server determination module includes:
[0032] a candidate home server determining submodule, configured to, if each of the device verification results includes a plurality of verification pass results, determine the sub-server corresponding to each of the verification pass results as a candidate home server;
[0033] The target home server determination submodule is used to determine the target home server based on the additional information in the device verification result corresponding to each candidate home server; wherein the additional information includes the record version number of the application to be upgraded and / or device access time information.
[0034] In some embodiments, when the additional information is the record version number, the device upgrade request also includes the current version number of the application to be upgraded;
[0035] Accordingly, the target attribution server determination submodule is specifically used to:
[0036] If the current version number successfully matches one of the record version numbers corresponding to each candidate home server, the candidate home server corresponding to the successfully matched record version number is determined as the target home server.
[0037] Furthermore, the target attribution server determination submodule is specifically used to:
[0038] In a case where the additional information further includes the device access time information, if the current version number successfully matches multiple of the record version numbers corresponding to the candidate home servers, then filtering out the candidate home servers corresponding to the record version numbers that successfully match from the candidate home servers;
[0039] The target home server is determined based on the device access time information corresponding to each of the screened candidate home servers.
[0040] In some other embodiments, the target home server determination submodule is specifically configured to:
[0041] In a case where the additional information is the device access time information, determining the time difference between the last device access time in each of the device access time information and the current system time, and determining the candidate home server corresponding to the smallest time difference as the target home server;
[0042] Alternatively, when the additional information is the device access time information, the cumulative access information in each device access time information is determined, and the candidate home server corresponding to the largest cumulative access information is determined as the target home server; wherein the cumulative access information includes the cumulative access duration or the cumulative number of visits.
[0043] In a third aspect, the present invention provides an electronic device, comprising:
[0044] processor and memory;
[0045] The processor is configured to execute the steps of the OTA-based device upgrade method described in any embodiment of the present invention by calling the program or instruction stored in the memory.
[0046] In a fourth aspect, the present invention provides a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute the steps of the OTA-based device upgrade method described in any embodiment of the present invention.
[0047] In a fifth aspect, the present invention provides an OTA-based device upgrade system, the system comprising: a main server, multiple sub-servers, and multiple terminal devices;
[0048] The terminal device is communicatively connected to the general server, configured to send a device upgrade request to the general server, receive device upgrade information fed back by the general server, and perform a device upgrade based on the device upgrade information; wherein the device upgrade request carries a device identifier of the terminal device;
[0049] The sub-server is communicatively connected with the main server and the registered terminal device, and is used to receive a device verification request sent by the main server, verify whether the terminal device corresponding to the device verification request is a registered device, and feedback the device verification result to the main server;
[0050] The main server is used to receive the device upgrade request sent by the terminal device, and send a device verification request to each sub-server based on the device identification, and receive the device verification results fed back by each sub-server; and determine the target belonging server of the terminal device based on each device verification result, and send device upgrade information to the terminal device based on the target belonging server.
[0051] The OTA-based device upgrade method, apparatus, device, medium and system provided by the embodiments of the present invention can respond to a device upgrade request sent by a terminal device and containing a device identification of the terminal device, send a device verification request to each sub-server to verify whether the terminal device is a registered device, and after receiving the device verification results fed back by each sub-server, determine the target affiliation server of the terminal device based on the verification results of each device, and send device upgrade information to the terminal device based on the target affiliation server to instruct the terminal device to perform a device upgrade; there is no need to repeatedly deploy the upgrade logic in each sub-server, only one set of upgrade logic needs to be deployed in the main server, and the upgrade of each terminal device can be performed across the sub-servers, thereby improving the intelligence level of the terminal device upgrade process and saving the operation and maintenance costs of the sub-servers. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0054] Figure 1 This is a system architecture diagram of an OTA-based device upgrade system provided by an embodiment of the present invention;
[0055] Figure 2 This is a flow chart of an OTA-based device upgrade method provided by an embodiment of the present invention;
[0056] Figure 3 This is a data flow diagram of another OTA-based device upgrade method provided by an embodiment of the present invention;
[0057] Figure 4 1 is a schematic structural diagram of an OTA-based device upgrade apparatus provided by an embodiment of the present invention;
[0058] Figure 5 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to more clearly understand the above-mentioned objectives, features and advantages of the present invention, the scheme of the present invention will be further described in detail below. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features therein can be combined with each other.
[0060] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present invention, rather than all the embodiments.
[0061] For ease of understanding, the embodiments of the present invention first briefly describe a device upgrade system based on Over-the-Air Technology (OTA). Explanations of the terms and steps involved can be found in the detailed description of the subsequent method embodiments.
[0062] Figure 1 This is a system architecture diagram of an OTA-based device upgrade system provided by an embodiment of the present invention. Figure 1 As shown, the OTA-based device upgrade system includes: a main server 110, multiple sub-servers 120 and multiple terminal devices 130.
[0063] The terminal device 130 is a device that has the application to be upgraded installed and is in communication with the main server 110. The terminal device 130 may include, but is not limited to, mobile terminals such as smartphones, laptops, personal digital assistants (PDAs), tablet personal computers (Tablet PCs), portable multimedia players (PMPs), wearable devices, and fixed terminals such as digital televisions, desktop computers, and smart home devices.
[0064] The terminal device 130 is at least used to send a device upgrade request including the device identification of the terminal device 130 to the general server 110, receive device upgrade information fed back by the general server 110, and perform device upgrade based on the device upgrade information.
[0065] Sub-server 120 is a terminal that deploys services corresponding to the application to be upgraded. It can isolate data and differentiate functions for the application to be upgraded by region, or by other dimensions such as user level. Sub-server 120 can be a laptop, desktop computer, single server, or server cluster, etc.
[0066] The sub-server 120 is in communication with the main server 110 and the registered terminal device 130, and is at least used to receive a device verification request sent by the main server 110, verify whether the terminal device 130 corresponding to the device verification request is a registered device, and feedback the device verification result to the main server 110.
[0067] The main server 110 is a terminal that manages each sub-server 120 and performs upgrade management on each terminal device 130. It is in communication with each sub-server 120 and each terminal device 130. The main server 110 can be a laptop, a desktop computer, a single server, a server cluster, etc.
[0068] The main server 110 is at least used to receive a device upgrade request including a device identification of the terminal device 130 sent by the terminal device 130, and send a device verification request to each sub-server 120 based on the device identification, and receive the device verification results fed back by each sub-server 120; and determine the target affiliation server of the terminal device 130 based on the verification results of each device, and send device upgrade information to the terminal device 130 based on the target affiliation server.
[0069] The above-mentioned OTA-based device upgrade system provided by the embodiment of the present invention can respond to the device upgrade request sent by the terminal device and containing the device identification of the terminal device through the main server to send a device verification request to each sub-server to verify whether the terminal device is a registered device, and after receiving the device verification results fed back by each sub-server, determine the target affiliation server of the terminal device based on the verification results of each device, and send device upgrade information to the terminal device based on the target affiliation server to instruct the terminal device to perform a device upgrade; there is no need to repeatedly deploy the upgrade logic in each sub-server, only one set of upgrade logic needs to be deployed in the main server, and each terminal device can be upgraded across the sub-servers, thereby improving the intelligence level of the terminal device upgrade process and saving the operation and maintenance costs of the sub-servers.
[0070] It should be noted that the above-mentioned OTA-based device upgrade system can also implement the technical solution of the OTA-based device upgrade method provided in any embodiment of the present invention.
[0071] First, combine Figure 2-3 The OTA-based device upgrade method provided in the embodiment of this aspect is described.
[0072] The OTA-based device upgrade method provided in an embodiment of the present invention is primarily applicable to scenarios where applications connected to different sub-servers are upgraded via wireless communication, such as application upgrades for smart city development. The OTA-based device upgrade method provided in an embodiment of the present invention can be executed by an OTA-based device upgrade device, which can be implemented in software and / or hardware and integrated into a master server.
[0073] Figure 2 This is a flow chart of a device upgrade method based on OTA provided by an embodiment of the present invention. Figure 2 , the OTA-based device upgrade method specifically includes:
[0074] S210: Receive a device upgrade request sent by a terminal device.
[0075] The device upgrade request carries the device identification of the terminal device. The device identification is information used to uniquely identify a terminal device, such as a product serial number (SN), a MAC address, or a custom device unique identifier.
[0076] Specifically, in order to centrally manage the upgrade of applications (such as firmware, drivers, or application software) installed in various terminal devices connected to different sub-servers, an embodiment of the present invention provides a master server to connect each terminal device and each sub-server. In this way, each terminal device can perform device upgrades through the master server, eliminating the need to frequently switch between connected sub-servers for verification and upgrade operations. This simplifies the upgrade process and eliminates the need to set up upgrade logic in each sub-server, reducing server operation and maintenance costs.
[0077] In specific implementations, the terminal device periodically initiates a device upgrade request to the central server. Alternatively, the central server periodically sends an upgrade notification to the terminal device, or when it determines that an application has an updated version. The terminal device responds to the upgrade notification and initiates a device upgrade request to the central server.
[0078] Since the device upgrade request is the only basis for the general server to subsequently upgrade the application program on the terminal device, the device upgrade request includes a device identifier so that the general server can accurately and safely upgrade the application program on the terminal device.
[0079] S220: Based on the device identification, send a device verification request to each sub-server, so that the sub-server verifies whether the terminal device is a registered device.
[0080] The device verification request is a request for verifying whether the terminal device is a registered legal device (ie, a registered device), and at least includes the above-mentioned device identification.
[0081] Specifically, during the application upgrade process, to ensure the security of both the terminal device and the server, the legitimacy of the terminal device can be verified. Because the terminal device is registered through a sub-server, it is considered legitimate only within that sub-server. Based on this, in this embodiment of the present invention, after obtaining the device identification of the terminal device, the main server generates a device verification request using the device identification as a request parameter and sends it to each sub-server.
[0082] After receiving the device verification request, each sub-server parses it to obtain the device identification. The sub-server then matches the device identification with the device identification list of registered devices stored therein. If the match is successful, it means that the terminal device corresponding to the device identification has been registered in the sub-server, that is, the terminal device is a registered device in the sub-server. Then, the sub-server generates a verification pass result and sends it to the main server as a device verification result. If the match fails, it means that the terminal device corresponding to the device identification is not registered in the sub-server, and it is an illegal device of the sub-server. At this time, the sub-server generates a verification failure result and sends it to the main server as a device verification result.
[0083] S230: Receive device verification results fed back by each sub-server, and determine the target server of the terminal device based on the verification results of each device.
[0084] The target attribution server is a sub-server to which the terminal device belongs and which is most suitable for upgrading.
[0085] Specifically, given the different configurations of each sub-server, there will be some differences in the upgrade packages for their corresponding applications. Therefore, to ensure that the terminal device receives the most suitable upgrade package and avoid application upgrade failures or even usage errors, the main server can analyze the device verification results fed back by each sub-server and determine the target server that best matches the terminal device, thereby ensuring the accuracy of subsequent application upgrades.
[0086] In one embodiment provided by the present invention, if the verification results of each device only include one verification pass result, the main server can determine the sub-server corresponding to the verification pass result as the target attribution server of the terminal device, that is, determining the target attribution server of the terminal device based on the verification results of each device in S230 includes: if the verification results of each device include one verification pass result, then the sub-server corresponding to the verification pass result is determined as the target attribution server.
[0087] In another embodiment provided by the present invention, determining the target affiliation server of the terminal device based on the verification results of each device in S230 includes: if each device verification result contains multiple verification pass results, then the sub-server corresponding to each verification pass result is determined as a candidate affiliation server, and the target affiliation server is determined based on the additional information in the device verification results corresponding to each candidate affiliation server.
[0088] The candidate home server refers to the sub-server obtained after a screening of each sub-server. Additional information refers to information in the device verification result other than whether the terminal device is a registered device, and is used to assist in determining whether the terminal device should belong to a particular sub-server. Therefore, the additional information includes at least some information related to operations performed by the terminal device during access to the sub-server. In an embodiment of the present invention, the additional information includes the recorded version number of the application to be upgraded and / or device access time information. The application to be upgraded is the application installed in the terminal device that needs to be upgraded this time. The recorded version number refers to the version number of the application stored in the sub-server, which is reported by the terminal device to the sub-server. Device access time information refers to information related to the time when the terminal device accesses the sub-server. For example, it can be the specific start time of each access of the terminal device to the sub-server (i.e., the device access time), the sum of the duration of each access of the terminal device to the sub-server since registration (i.e., the cumulative access duration), or the sum of the number of visits of the terminal device to the sub-server since registration (i.e., the cumulative number of visits).
[0089] Specifically, if the main server determines that the verification results of each device contain multiple verification pass results, it means that the terminal device has been registered in multiple sub-servers, that is, the terminal device is a registered device in multiple sub-servers. At this time, the main server can determine the sub-server corresponding to each verification pass result as a candidate attribution server. Then, the main server can randomly select one from each candidate attribution server as the target attribution server for the terminal device. However, in order to improve the accuracy of the target attribution server, thereby further improving the accuracy of the application upgrade, in an embodiment of the present invention, the main server does not adopt a random selection method, but obtains additional information in the device verification result corresponding to each candidate attribution server, and further performs a secondary screening of each candidate attribution server based on this additional information to determine the target attribution server.
[0090] In some embodiments, when the additional information is a record version number, the device upgrade request also includes the current version number of the application to be upgraded. That is, the terminal device uses the current version number of the application to be upgraded as a request parameter, combined with the device identification, to generate the device upgrade request. This allows the central server to obtain both the device identification and the current version number of the application to be upgraded on the terminal device.
[0091] In the case of the above embodiment, the above determination of the target affiliation server based on the additional information in the device verification results corresponding to each candidate affiliation server includes: if the current version number successfully matches one of the record version numbers corresponding to each candidate affiliation server, the candidate affiliation server corresponding to the successfully matched record version number is determined as the target affiliation server.
[0092] Specifically, the recorded version number is uploaded to a sub-server during a terminal device's access to it. If a terminal device registers with a sub-server and uploads its application version number once, but then no longer accesses that sub-server, the recorded version number in that sub-server will be the version number originally uploaded, not the latest version number of the application being upgraded on the terminal device. This means that the current version number and the recorded version number are inconsistent. Based on this, when the main server obtains the current version number and multiple recorded version numbers, it can first match the current version number with each recorded version number.
[0093] If each record version number fails to match, it means that the terminal device may not have uploaded the current version number to any candidate home server. In this case, a secondary screening process of each candidate home server can be performed based on the device access time information in the additional information.
[0094] If only one record version number is matched successfully, it means that the candidate home server corresponding to the record version number is the sub-server most recently accessed by the terminal device, and it can be used as the target home server of the terminal device.
[0095] If multiple record version numbers are successfully matched, it means that the candidate home servers corresponding to the successfully matched record version numbers are all sub-servers that the terminal device has recently accessed. In this case, a random selection can be made from the candidate home servers corresponding to the successfully matched record version numbers as the target home server for the terminal device.
[0096] In some embodiments, when the additional information also includes device access time information, the above-mentioned determination of the target affiliation server based on the additional information in the device verification results corresponding to each candidate affiliation server includes: if the current version number successfully matches multiple record version numbers corresponding to each candidate affiliation server, then the candidate affiliation server corresponding to the successfully matched record version number is filtered out from each candidate affiliation server; based on the device access time information corresponding to each filtered candidate affiliation server, the target affiliation server is determined.
[0097] Specifically, according to the above description, if multiple record version numbers successfully match the current version number, then the candidate home servers corresponding to each successfully matched record version number may be the target home server for the terminal device. In this embodiment, to further improve the accuracy of the target home server, random selection is not used. Instead, the candidate home servers corresponding to each successfully matched record version number are further screened using the device access time information in the additional information. The process of this third screening can be found in the subsequent embodiment of determining the target home server based on device access time information.
[0098] In some embodiments, when the additional information is device access time information, the above-mentioned determination of the target home server based on the additional information in the device verification results corresponding to each candidate home server includes: determining the time difference between the last device access time in each device access time information and the current system time, and determining the candidate home server corresponding to the smallest time difference as the target home server.
[0099] Specifically, in this embodiment, the central server determines the candidate home server most recently accessed by the terminal device as the target home server. This is because recent access behavior can, to a certain extent, indicate the user's intention to use the terminal device, meaning that the user is likely to continue accessing the recently accessed sub-server using the terminal device. Therefore, the central server upgrades the application to be upgraded corresponding to the recently accessed sub-server, which can, to a certain extent, meet the user's upgrade needs and further improve the upgrade accuracy of the application to be upgraded.
[0100] In specific implementations, the master server obtains the last device access time from the device access time information of each candidate home server. It then calculates the time difference between each last device access time and the current system time. The minimum of these time differences represents the most recent access. Therefore, the candidate home server corresponding to the minimum time difference is determined as the target home server.
[0101] In other embodiments, when the additional information is device access time information, the above-mentioned determination of the target attribution server based on the additional information in the device verification results corresponding to each candidate attribution server includes: determining the cumulative access information in each device access time information, and determining the candidate attribution server corresponding to the largest cumulative access information as the target attribution server.
[0102] The cumulative access information includes the cumulative access duration or the cumulative number of accesses.
[0103] Specifically, in this embodiment, the master server identifies the candidate home server most frequently accessed by the terminal device as the target home server. This is because the most frequently accessed behavior can also indicate, to a certain extent, the user's intention to use the terminal device, namely, the user is likely to continue to use the terminal device to access the most frequently accessed sub-server. Therefore, the master server upgrades the application to be upgraded corresponding to the most frequently accessed sub-server, which can also meet the user's upgrade needs to a certain extent, ensuring that the application to be upgraded on the user's most frequently used terminal device is the latest version, thereby further improving the upgrade accuracy of the application to be upgraded.
[0104] In specific implementations, the master server retrieves the cumulative access duration or cumulative number of visits corresponding to each candidate home server from the device access time information of the candidate home server. The longer the cumulative access duration or the greater the cumulative number of visits, the more frequently the terminal device accesses the candidate home server. The master server then determines the candidate home server corresponding to the longest cumulative access duration or the greatest cumulative number of visits as the target home server.
[0105] S240: Send device upgrade information to the terminal device based on the target home server.
[0106] The device upgrade information is used to instruct the terminal device to perform a device upgrade.
[0107] Specifically, the master server obtains the upgrade data (such as upgrade package or upgrade link) of the application to be upgraded corresponding to the target home server, and generates device upgrade information using the upgrade data and upgrade verification information. Then, the device upgrade information is sent to the terminal device.
[0108] The terminal device receives and parses the device upgrade information, obtaining the upgrade data and upgrade verification information. If the upgrade data is an upgrade link, the upgrade package is downloaded based on the upgrade link. The terminal device then uses the upgrade verification information to verify the integrity and legitimacy of the upgrade package. Once verified, the terminal device uses the upgrade package to upgrade the application to be upgraded. After the upgrade is complete, the terminal device sends a notification of upgrade success and the current version number to the main server and / or the target server, so that the corresponding server can maintain the latest version number of the application to be upgraded for the terminal device.
[0109] In some embodiments, the central server triggers execution of S240 if it determines that the upgrade version number of the application to be upgraded corresponding to the target home server is greater than the current version number. In this way, the central server determines whether the application to be upgraded in the terminal device needs to be upgraded, and if it is determined that an upgrade is required, it sends device upgrade information to the terminal device. This can avoid the problem of sending device upgrade information to the terminal device when an upgrade is not required, resulting in the terminal device executing an invalid upgrade process, thereby improving upgrade efficiency.
[0110] The above-mentioned OTA-based device upgrade method provided by the embodiment of the present invention can respond to the device upgrade request sent by the terminal device and containing the device identification of the terminal device, send a device verification request to each sub-server to verify whether the terminal device is a registered device, and after receiving the device verification results fed back by each sub-server, determine the target affiliation server of the terminal device based on the verification results of each device, and send device upgrade information to the terminal device based on the target affiliation server to instruct the terminal device to perform the device upgrade; there is no need to repeatedly deploy the upgrade logic in each sub-server, only one set of upgrade logic needs to be deployed in the main server, and the upgrade of each terminal device can be performed across the sub-servers, thereby improving the intelligence level of the terminal device upgrade process and saving the operation and maintenance costs of the sub-servers.
[0111] Figure 3 This is a data flow diagram of an OTA-based device upgrade method provided by an embodiment of the present invention. Figure 3 , the OTA-based device upgrade method specifically includes:
[0112] S310 , the terminal device 130 sends a device upgrade request to the main server 110 .
[0113] S320 : The main server 110 obtains the device identification of the terminal device 130 and the current version number of the application to be upgraded based on the device upgrade request.
[0114] S330 : The main server 110 generates a device verification request based on the device identification.
[0115] S340 , the main server 110 sends the device verification request to each sub-server 120 respectively.
[0116] S350 , each sub-server 120 matches the device identification in the device verification request with the stored device identification list, and generates a device verification result.
[0117] S360 , each sub-server 120 sends the device verification result to the main server 110 .
[0118] S370 , the general server 110 determines the target server of the terminal device 130 based on the verification results of each device.
[0119] S380: The main server 110 generates device upgrade information based on the current version number and the upgrade version number and upgrade data corresponding to the target server.
[0120] S390 , the main server 110 sends the device upgrade information to the terminal device 130 .
[0121] S3100. The terminal device 130 upgrades the application to be upgraded based on the device upgrade information, and completes the upgrade of the application to be upgraded.
[0122] Figure 4 1 is a schematic diagram of the structure of an OTA-based device upgrade device provided by an embodiment of the present invention. The OTA-based device upgrade device 400 is configured at the main server. Figure 4 The OTA-based device upgrade apparatus 400 specifically includes:
[0123] The device upgrade request receiving module 410 is configured to receive a device upgrade request sent by a terminal device; wherein the device upgrade request carries a device identifier of the terminal device;
[0124] The device verification request sending module 420 is used to send a device verification request to each sub-server based on the device identification, so that the sub-server verifies whether the terminal device is a registered device;
[0125] The target server determination module 430 is configured to receive the device verification results fed back by each sub-server and determine the target server of the terminal device based on the verification results of each device;
[0126] The device upgrade information sending module 440 is used to send device upgrade information to the terminal device based on the target home server; wherein the device upgrade information is used to instruct the terminal device to perform device upgrade.
[0127] The above-mentioned OTA-based device upgrade device provided by the embodiment of the present invention can respond to the device upgrade request sent by the terminal device and containing the device identification of the terminal device, send a device verification request to each sub-server to verify whether the terminal device is a registered device, and after receiving the device verification results fed back by each sub-server, determine the target attribution server of the terminal device based on the verification results of each device, and send device upgrade information to the terminal device based on the target attribution server to instruct the terminal device to perform the device upgrade; there is no need to repeatedly deploy the upgrade logic in each sub-server, only one set of upgrade logic needs to be deployed in the main server, and the upgrade of each terminal device can be performed across the sub-servers, thereby improving the intelligence level of the terminal device upgrade process and saving the operation and maintenance costs of the sub-servers.
[0128] In some embodiments, the target home server determination module 430 is specifically configured to:
[0129] If the verification results of each device include a verification pass result, the sub-server corresponding to the verification pass result is determined as the target home server.
[0130] In some other embodiments, the target home server determination module 430 includes:
[0131] A candidate home server determination submodule is configured to determine, if the verification results of each device include multiple verification pass results, the sub-server corresponding to each verification pass result as a candidate home server;
[0132] The target home server determination submodule is used to determine the target home server based on the additional information in the device verification result corresponding to each candidate home server; wherein the additional information includes the recorded version number of the application to be upgraded and / or the device access time information.
[0133] In some embodiments, when the additional information is a record version number, the device upgrade request also includes the current version number of the application to be upgraded;
[0134] Accordingly, the target attribution server determination submodule is specifically used to:
[0135] If the current version number successfully matches one of the record version numbers corresponding to the candidate home servers, the candidate home server corresponding to the successfully matched record version number is determined as the target home server.
[0136] Furthermore, the target attribution server determination submodule is specifically used to:
[0137] In the case where the additional information also includes device access time information, if the current version number successfully matches multiple record version numbers corresponding to the candidate home servers, the candidate home server corresponding to the record version number that successfully matches is selected from the candidate home servers;
[0138] The target home server is determined based on the device access time information corresponding to each of the screened candidate home servers.
[0139] In some other embodiments, the target home server determination submodule is specifically configured to:
[0140] In the case where the additional information is device access time information, determining the time difference between the last device access time in each device access time information and the current system time, and determining the candidate home server corresponding to the smallest time difference as the target home server;
[0141] Alternatively, when the additional information is device access time information, the cumulative access information in each device access time information is determined, and the candidate home server corresponding to the largest cumulative access information is determined as the target home server; wherein the cumulative access information includes the cumulative access duration or the cumulative number of accesses.
[0142] It is worth noting that in the above-mentioned embodiment of the OTA-based device upgrade apparatus, the various modules and sub-modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional modules / sub-modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0143] Figure 5 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 5 The electronic device 500 provided in an embodiment of the present invention includes: a processor 520 and a memory 510; the processor 520 calls the program or instructions stored in the memory 510 to execute the steps of the OTA-based device upgrade method provided in any embodiment of the present invention.
[0144] Figure 5 The electronic device 500 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0145] like Figure 5 As shown, electronic device 500 is implemented as a general-purpose computing device. Components of electronic device 500 may include, but are not limited to, one or more processors 520, memory 510, and a bus 550 connecting various system components (including memory 510 and processor 520).
[0146] Bus 550 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0147] The electronic device 500 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 500, including volatile and non-volatile media, removable and non-removable media.
[0148] The memory 510 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 511 and / or cache memory 512. The electronic device 500 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 513 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 Not shown, often called a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 550 via one or more data medium interfaces. Memory 510 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.
[0149] A program / utility 514 having a set (at least one) of program modules 515 may be stored, for example, in memory 510. Such program modules 515 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 515 generally perform the functions and / or methods of any of the embodiments described herein.
[0150] The electronic device 500 may also communicate with one or more external devices 560 (e.g., a keyboard, a pointing device, a display 570, etc.), one or more devices that enable a user to interact with the electronic device 500, and / or any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed through an input / output interface (I / O interface) 530. Furthermore, the electronic device 500 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 540. Figure 5 As shown, the network adapter 540 communicates with other modules of the electronic device 500 via the bus 550. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0151] An embodiment of the present invention further provides a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute the steps of the OTA-based device upgrade method provided by any embodiment of the present invention.
[0152] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0153] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0154] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0155] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0156] It should be noted that the terms used in the present invention are only for describing specific embodiments and are not intended to limit the scope of this application. As shown in the present specification and claims, unless the context clearly indicates an exception, the words "one", "an", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The term "and / or" includes any one and all combinations of one or more relevant listed items. The term "includes", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method or device comprising a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements that are inherent to such process, method or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method or device comprising the elements.
[0157] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments described herein, but is to be construed in the widest manner consistent with the principles and novel features disclosed herein.
Claims
1. A device upgrade method based on OTA, characterized in that: Applied to the main server, which is the terminal that manages each sub-server and performs upgrade management on each terminal device, including: Receiving a device upgrade request sent by the terminal device; wherein the device upgrade request carries a device identification of the terminal device; the terminal device is a device on which the application to be upgraded is installed; Based on the device identification, sending a device verification request to each of the sub-servers to enable the sub-server to verify whether the terminal device is a registered device; wherein the sub-server is a terminal on which the service corresponding to the application to be upgraded is deployed; receiving device verification results fed back by each of the sub-servers, and determining a target home server for the terminal device based on each of the device verification results; Based on the upgrade data of the application to be upgraded corresponding to the target home server, the general server sends device upgrade information to the terminal device; wherein the device upgrade information is used to instruct the terminal device to perform a device upgrade.
2. The method according to claim 1, characterized in that Determining the target home server of the terminal device based on the verification results of each device includes: If the device verification results include a verification pass result, the sub-server corresponding to the verification pass result is determined as the target home server.
3. The method according to claim 1, characterized in that Determining the target home server of the terminal device based on the verification results of each device includes: If each of the device verification results includes multiple verification pass results, determining the sub-servers corresponding to each of the verification pass results as candidate home servers; The target home server is determined based on additional information in the device verification result corresponding to each candidate home server; wherein the additional information includes a record version number of the application to be upgraded and / or device access time information.
4. The method according to claim 3, characterized in that In the case where the additional information is the record version number, the device upgrade request further includes the current version number of the application to be upgraded; The determining the target home server based on the additional information in the device verification result corresponding to each candidate home server includes: If the current version number successfully matches one of the record version numbers corresponding to each candidate home server, the candidate home server corresponding to the successfully matched record version number is determined as the target home server.
5. The method according to claim 4, characterized in that In a case where the additional information further includes the device access time information, determining the target home server based on the additional information in the device verification result corresponding to each candidate home server includes: If the current version number successfully matches multiple of the record version numbers corresponding to the candidate home servers, then the candidate home servers corresponding to the record version numbers that successfully match are selected from the candidate home servers; The target home server is determined based on the device access time information corresponding to each of the screened candidate home servers.
6. The method according to claim 3, characterized in that In a case where the additional information is the device access time information, determining the target home server based on the additional information in the device verification result corresponding to each candidate home server includes: Determine the time difference between the last device access time in each device access time information and the current system time, and determine the candidate home server corresponding to the smallest time difference as the target home server; Alternatively, the accumulated access information in each device access time information is determined, and the candidate home server corresponding to the largest accumulated access information is determined as the target home server; wherein the accumulated access information includes accumulated access duration or accumulated access times.
7. A device upgrade device based on OTA, characterized in that: Configured on the main server, the main server is the terminal that manages each sub-server and performs upgrade management on each terminal device, including: a device upgrade request receiving module, configured to receive a device upgrade request sent by the terminal device; wherein the device upgrade request carries a device identification of the terminal device; the terminal device is a device on which the application to be upgraded is installed; a device verification request sending module, configured to send a device verification request to each of the sub-servers based on the device identifier, so that the sub-server can verify whether the terminal device is a registered device; wherein the sub-server is a terminal on which the service corresponding to the application to be upgraded is deployed; A target belonging server determining module is used to receive the device verification results fed back by each of the sub-servers, and determine the target belonging server of the terminal device based on each of the device verification results; The device upgrade information sending module is used to send device upgrade information from the general server to the terminal device based on the upgrade data of the application to be upgraded corresponding to the target home server; wherein, the device upgrade information is used to instruct the terminal device to perform a device upgrade.
8. An electronic device, characterized in that: The electronic device comprises: processor and memory; The processor is configured to execute the steps of the OTA-based device upgrade method according to any one of claims 1 to 6 by calling the program or instructions stored in the memory.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program or instruction, which enables a computer to execute the steps of the OTA-based device upgrade method according to any one of claims 1 to 6.
10. A device upgrade system based on OTA, characterized in that: The system includes: a main server, multiple sub-servers and multiple terminal devices; The terminal device is a device installed with the application to be upgraded, is in communication with the central server, is configured to send a device upgrade request to the central server, receive device upgrade information fed back by the central server, and perform a device upgrade based on the device upgrade information; wherein the device upgrade request carries a device identifier of the terminal device; The sub-server is a terminal on which the service corresponding to the application to be upgraded is deployed, and is in communication with the main server and the registered terminal device, and is configured to receive a device verification request sent by the main server, verify whether the terminal device corresponding to the device verification request is a registered device, and feed back a device verification result to the main server; The main server is a terminal that manages each of the sub-servers and performs upgrade management on each of the terminal devices. It is used to receive the device upgrade request sent by the terminal device, and send a device verification request to each sub-server based on the device identification, and receive the device verification results fed back by each of the sub-servers; and determine the target affiliation server of the terminal device based on each of the device verification results, and send device upgrade information to the terminal device based on the upgrade data of the application to be upgraded corresponding to the target affiliation server.
Citation Information
Patent Citations
Firmware upgrading method
CN114143198A