Upgrade optimization method and system
Through the distributed upgrade network, during the smart terminal upgrade process, the charging time is used to download and store upgrade data in parallel, which solves the problem of large resource occupation and long time during the smart terminal upgrade process, and improves user experience and upgrade efficiency.
Patent Information
- Application Number
- CN202410643649.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-05-23
AI Technical Summary
Smart terminals cannot be used normally during the upgrade process, and the upgrade data occupies hardware resources, resulting in long upgrade times, large resource usage, and affecting user experience.
A distributed upgrade network is used to download and store upgrade data in parallel through multiple IoT terminals, and the charging moment is used to trigger the download and storage of upgrade data, reducing the resource occupation of terminals to be upgraded and shortening the upgrade time.
It shortens the upgrade time, reduces the occupation of intelligent terminal system resources, improves user experience, and ensures the automation and efficiency of the upgrade process.
Smart Images

Figure CN118400384B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent terminals, and in particular to an upgrade optimization method and system. Background Art
[0002] Currently, smart terminal products have been widely used in all aspects of people’s production and life. With the rapid development of Internet technology, embedded technology and other technologies, the software and systems in smart terminals need to be continuously iterated and upgraded to increase and improve the performance of smart terminals and continuously meet people’s growing usage needs and usage experience.
[0003] At present, when smart terminals are upgraded, on the one hand, they cannot be used normally during the upgrade process, that is, they cannot provide services during the upgrade process, and on the other hand, the upgrade data will also occupy the hardware resources of the smart terminal. Therefore, how to shorten the time of each upgrade and reduce the occupation of the system resources of the smart terminal has become a technical problem that needs to be solved urgently in the smart terminal upgrade technology. Summary of the invention
[0004] The present application provides an upgrade optimization method and system to solve the technical problem of how to shorten the time of each upgrade and reduce the occupation of system resources of smart terminals.
[0005] In a first aspect, the present application provides an upgrade optimization method, which is applied to, and the method includes:
[0006] Obtaining a connection signal between the terminal to be upgraded and the charging device;
[0007] In response to the connection signal, determining whether all upgrade data required to upgrade the terminal to be upgraded exists in the distributed upgrade network to which the charging device belongs and / or the terminal to be upgraded, wherein the distributed upgrade network includes at least one storage module, and the storage module is used to store part or all of the upgrade data;
[0008] If only part of the upgrade data exists in the distributed upgrade network and / or the terminal to be upgraded, determining whether the target data missing from upgrading the terminal to be upgraded includes the necessary data for starting the upgrade process;
[0009] If so, the necessary data is downloaded to at least one storage module via the distributed upgrade network and the upgrade process is started;
[0010] If not, the upgrade process is initiated, and the target data is downloaded to at least one storage module through the distributed upgrade network;
[0011] If all upgrade data exists in the distributed upgrade network and / or the terminal to be upgraded, the upgrade process is directly started.
[0012] In this solution, a distributed upgrade network is used to share the download and storage of upgrade data, solving the technical problem of how to shorten the time of each upgrade and reduce the occupation of system resources of smart terminals. Multiple download terminals of the distributed upgrade network download and store multiple data frames of upgrade data respectively, achieving the technical effect of shortening the download time of upgrade data and reducing the resource occupation of the terminal to be upgraded.
[0013] In addition, by monitoring the connection status between the terminal to be upgraded and the charging device in real time, the upgrade data check and download process is automatically triggered to ensure the automation and efficiency of the upgrade process. This method uses the charging time as the upgrade opportunity, which not only saves the user's active operation time, but also reasonably utilizes idle resources during the device charging period, reducing interference with the user's daily use.
[0014] In one possible design, determining whether all upgrade data required to upgrade the terminal to be upgraded exists in the distributed upgrade network to which the charging device belongs and / or the terminal to be upgraded includes:
[0015] Using a preset search model, according to the target upgrade code of the object to be upgraded in the terminal to be upgraded, a data compression package corresponding to the target upgrade code is searched in each storage module of the distributed upgrade network to obtain a search result;
[0016] When there is at least one data compression package in the search result, each data compression package is decompressed to obtain a data set to be combined;
[0017] Using the preset combination model, the data in the data set to be combined is reorganized to obtain a reorganization result;
[0018] Determine whether the reorganization result is all upgraded data.
[0019] In this solution, the preset retrieval model can accurately locate the upgrade data compression package that matches the terminal to be upgraded, and realize the rapid retrieval and preparation of data, thereby speeding up the preparation of upgrade data and improving the accuracy and efficiency of data processing. In addition, the data decompression and reorganization processing mechanism enables rapid integration even if the data is stored in a dispersed manner, ensuring the integrity of the upgrade data.
[0020] In a possible design, the data in the to-be-combined data set are recombined using a preset combination model to obtain a recombined result, including:
[0021] Remove duplicate data in the data set to be combined to obtain multiple data frames to be combined;
[0022] According to the link structure in the header and / or tail of each data frame to be combined, each data frame to be combined is connected in sequence to obtain a recombined result.
[0023] In this solution, deduplication and link-structure-based data reorganization technology reduce unnecessary data redundancy, which not only saves storage space but also speeds up the data reorganization process, improving the efficiency of data processing and the response speed of the system.
[0024] In a possible design, determining whether the target data missing from the terminal to be upgraded includes necessary data for starting the upgrade process includes:
[0025] Determining whether the target frame identification set includes a necessary frame identification, wherein the target frame identification set includes at least one target frame identification, each target frame identification corresponds to one or more target data frames corresponding to the target data, and the necessary frame identification corresponds to one or more necessary data frames corresponding to the necessary data;
[0026] If so, it is determined that the target data includes the necessary data, otherwise the target data does not include the necessary data.
[0027] In this solution, by comparing the target frame identification set with the necessary frame identification, it is possible to quickly identify whether the key data required for the upgrade is available. This precise judgment logic ensures that the upgrade process can be started while ensuring the normal operation of the core functions, avoiding unnecessary waiting time and optimizing the user experience.
[0028] Optional, necessary data, including: at least one of: verification key, patch program, and configuration parameters.
[0029] In this solution, the scope of necessary data (such as verification keys, patches, and configuration parameters) is clearly defined, and the priority download and application of these key data ensures the security and stability of the upgrade process, while reducing the risk of upgrade failure due to missing data.
[0030] In one possible design, downloading necessary data to at least one storage module through a distributed upgrade network includes:
[0031] According to the first remaining storage capacity, current working state, remaining power of the terminal to be upgraded, and the second remaining storage capacity of at least one storage module, determining at least one download terminal for downloading necessary data from the distributed upgrade network and / or the terminal to be upgraded, and the first to-be-downloaded data corresponding to each download terminal;
[0032] Each first data to be downloaded is downloaded through at least one download terminal to obtain necessary data.
[0033] In one possible design, downloading target data to at least one storage module through a distributed upgrade network includes:
[0034] According to the first remaining storage capacity, the current working state, the remaining power of the terminal to be upgraded, and the second remaining storage capacity of at least one storage module, determining at least one download end for downloading target data from the distributed upgrade network and / or the terminal to be upgraded, and the second to-be-downloaded data to be downloaded by each download end;
[0035] Each second data to be downloaded is downloaded through at least one download terminal to obtain target data.
[0036] In this solution, the actual status of the terminal to be upgraded and each storage module in the distributed network (such as remaining storage capacity, working status, power level, etc.) is taken into consideration, and the optimal download endpoint and strategy are dynamically selected to effectively balance the upgrade requirements and the allocation of device resources, prevent device overload, and ensure the smoothness of the entire upgrade process and the normal use of the equipment.
[0037] In a second aspect, the present application provides an upgrade optimization system, comprising:
[0038] An acquisition module, used to acquire a connection signal between the terminal to be upgraded and the charging device;
[0039] Processing modules for:
[0040] In response to the connection signal, determining whether all upgrade data required to upgrade the terminal to be upgraded exists in the distributed upgrade network to which the charging device belongs and / or the terminal to be upgraded, wherein the distributed upgrade network includes at least one storage module, and the storage module is used to store part or all of the upgrade data;
[0041] If only part of the upgrade data exists in the distributed upgrade network and / or the terminal to be upgraded, determining whether the target data missing from upgrading the terminal to be upgraded includes the necessary data for starting the upgrade process;
[0042] If not, then download the necessary data to at least one storage module via the distributed upgrade network and start the upgrade process;
[0043] If so, the upgrade process is initiated, and the target data is downloaded to at least one storage module via the distributed upgrade network;
[0044] If all upgrade data exists in the distributed upgrade network and / or the terminal to be upgraded, the upgrade process is directly started.
[0045] In a third aspect, the present application provides an electronic device, including:
[0046] A memory for storing program instructions;
[0047] The processor is used to call and execute the program instructions in the memory to perform any possible upgrade optimization method provided by the first aspect.
[0048] In a fourth aspect, the present application provides a storage medium, wherein the readable storage medium stores a computer program, and the computer program is used to execute any possible upgrade optimization method provided in the first aspect.
[0049] In a fifth aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements any possible upgrade and optimization system method provided in the first aspect.
[0050] The present application provides an upgrade optimization method and system, which determines whether all the upgrade data required for upgrading the terminal to be upgraded exist in the distributed upgrade network and / or the terminal to be upgraded to which the charging device belongs in response to the connection signal obtained between the terminal to be upgraded and the charging device; if only part of the upgrade data exists in the distributed upgrade network and / or the terminal to be upgraded, it is determined whether the target data missing from upgrading the terminal to be upgraded includes the necessary data for starting the upgrade process; if so, the necessary data is downloaded to at least one storage module through the distributed upgrade network, and the upgrade process is started; if not, the upgrade process is started, and the target data is downloaded to at least one storage module through the distributed upgrade network; if all the upgrade data exists in the distributed upgrade network and / or the terminal to be upgraded, the upgrade process is directly started. The distributed upgrade network is used to share the download and storage of the upgrade data, which solves the technical problem of how to shorten the time of each upgrade and reduce the occupation of the system resources of the smart terminal. The multiple download terminals of the distributed upgrade network download and store multiple data frames of the upgrade data respectively, achieving the technical effect of shortening the download time of the upgrade data and reducing the resource occupation of the terminal to be upgraded. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0052] Figure 1 A schematic diagram of the structure of a distributed upgrade network provided for this application;
[0053] Figure 2 A flowchart of an upgrade optimization method provided in an embodiment of the present application;
[0054] Figure 3 A schematic diagram of the structure of an upgrade optimization system provided in an embodiment of the present application;
[0055] Figure 4 A schematic diagram of the structure of an electronic device provided in this application.
[0056] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work, including but not limited to the combination of multiple embodiments, belong to the scope of protection of this application.
[0058] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0059] Currently, smart terminal products have been widely used in all aspects of people's production and life. With the rapid development of Internet technology, embedded technology and other technologies, the software and systems in smart terminals need to be continuously iterated and upgraded to increase and improve the performance of smart terminals and continuously meet people's growing usage needs and usage experience.
[0060] At present, when smart terminals are upgraded, on the one hand, they cannot be used normally during the upgrade process, that is, they cannot provide services during the upgrade process, and on the other hand, the upgrade data will also occupy the hardware resources of the smart terminal. Therefore, how to shorten the time of each upgrade and reduce the occupation of the system resources of the smart terminal has become a technical problem that needs to be solved urgently in the smart terminal upgrade technology.
[0061] In order to solve the above technical problems, the invention concept of this application is:
[0062] The existing remote upgrade technology (Over-the-Air, OTA for short) generally involves the terminal to be upgraded downloading the upgrade data remotely from the server, temporarily storing the upgrade data in the terminal to be upgraded, and then deleting it after the upgrade is completed. The inventor of this application discovered three problems from the above process. First, the download process of the upgrade data needs to occupy the computing resources of the terminal to be upgraded. Second, the storage of the upgrade data needs to occupy the storage resources of the terminal to be upgraded. Third, running the upgrade program requires exclusive use of the terminal to be upgraded, that is, during the upgrade process, the user cannot use the terminal or the application being upgraded on the terminal. With the increasing frequency of system and application upgrades, the above three aspects have an increasing impact on the user's upgrade experience.
[0063] After careful consideration and rigorous verification, this application proposes using a charging device to trigger the downloading and storage of upgrade data through the local Internet of Things (hereinafter referred to as the distributed upgrade network). In this way, the upgrade method is optimized from three dimensions: time, space, and user use. In terms of time, it no longer occupies or occupies less upgrade time of the terminal to be upgraded, and in terms of space, it no longer occupies or occupies less storage space of the terminal to be upgraded. Users will not experience system or network freezes due to the download of upgrade data, and the waiting time for downloading data after the upgrade program is started is shortened, thereby improving the user experience during the upgrade process.
[0064] The technical solution of this application is introduced below with examples.
[0065] Figure 1 This is a schematic diagram of the structure of a distributed upgrade network provided by this application. Figure 1 As shown, the distributed upgrade network 120 includes multiple IoT terminals 122 , and the charging device 121 is one of the IoT terminals 122 , which is listed separately for illustration.
[0066] Each IoT terminal 122 can transmit data with other IoT terminals 122 in a wired or wireless manner.
[0067] Each IoT terminal 122 can independently execute the task of downloading the upgrade data, download all or part of the upgrade data from the upgrade server, and transmit the upgrade data to the charging device 121. When the upgrade process of the upgraded terminal 110 is started, the complete upgrade data in the charging device 121 can be called for upgrading.
[0068] In one possible design, each IoT terminal 122, charging device 121 and terminal 110 to be upgraded can execute the task of downloading upgrade data, and then transfer the partial upgrade data downloaded by each to the charging device 121 or the terminal 110 to be upgraded for reorganization to obtain complete upgrade data so that the subsequent upgrade process can call it for upgrade.
[0069] It is worth noting that the terminal 110 to be upgraded is Figure 1 Although it is not included in the distributed upgrade network 120, in a possible design, the terminal 110 to be upgraded can also be used as one of the IoT terminals 122 in the distributed upgrade network 120. Those skilled in the art can make settings according to actual conditions when applying the solution of the present application, and the present application does not limit it.
[0070] Figure 2 A flowchart of an upgrade optimization method provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the specific steps of the upgrade optimization method include:
[0071] S201: Acquire a connection signal between the terminal to be upgraded and the charging device.
[0072] In this step, when the terminal to be upgraded is connected to the charging device for charging, that is, when the power interface or charging interface of the terminal to be upgraded is connected to the energy output interface of the charging device, either the upgrade terminal and the charging device generates a connection signal, or both generate a connection signal, and transmit the connection signal to the upgrade management module.
[0073] The upgrade management module may be included in the terminal to be upgraded or in the charging device. Furthermore, the upgrade management module may be implemented by hardware circuit or software.
[0074] It is worth noting that the connection signal includes at least one of: a charging flag position signal, a "Γ" type transition edge signal when a low level jumps to a high level, a charging voltage signal, and a charging current signal.
[0075] S202: In response to the connection signal, determine whether all upgrade data required to upgrade the terminal to be upgraded exists in the distributed upgrade network to which the charging device belongs and / or the terminal to be upgraded.
[0076] In this step, the distributed upgrade network includes at least one storage module, and the storage module is used to store part or all of the upgrade data.
[0077] For example, the storage module is located in Figure 1 In the IoT terminals 122 shown, when each IoT terminal 122 executes the upgrade data download task, it determines whether to download the complete upgrade data or only download part of the upgrade data according to its own remaining storage space and the allocated target download data.
[0078] The IoT terminal 122 stores the downloaded data in the storage module, and then calls the communication module or communication function to send it to the charging device 121 or directly to the terminal 110 to be upgraded.
[0079] If only part of the upgrade data exists in the distributed upgrade network and / or the terminal to be upgraded, step S203 is executed; if all the upgrade data exists in the distributed upgrade network and / or the terminal to be upgraded, the upgrade process is directly started, that is, step S205 is executed.
[0080] Specifically, after the upgrade data is released, the terminal 110 to be upgraded can trigger each IoT terminal 122 in the distributed upgrade network to which the charging device 121 belongs, such as multiple smart terminals in the home (smart speakers, smart refrigerators, smart air conditioners, smart TVs, mobile phones, tablets, smart sockets, etc.), to start the background download program respectively, and download the upgrade data from the remote server to their respective storage modules.
[0081] This achieves at least two technical effects:
[0082] (1) The download of the upgrade data is transferred from the terminal to be upgraded 110 to each IoT terminal 122, thereby avoiding the usage lag of the terminal to be upgraded 110 due to occupying computing space for downloading data, and improving the user experience of the upgraded terminal.
[0083] (2) The more IoT terminals there are in the distributed upgrade network, the smaller the download task amount allocated to each IoT terminal 122, and the smaller the computing resources and storage resources occupied by each IoT terminal 122. This achieves the effect of basically not affecting the performance of the IoT terminal 122 itself. At the same time, since multiple terminals download different parts of the upgrade data in parallel, the download time of the upgrade data can be greatly shortened.
[0084] It should be noted that before the distributed upgrade network starts multiple IoT terminals 122 for parallel downloading each time, it is necessary to confirm the target data to be downloaded. The target data is the data that the terminal 110 to be upgraded lacks for upgrading. It may be all the upgrade data or part of the upgrade data. The executor of confirming the target data may be the terminal 110 to be upgraded or the charging device 121.
[0085] In a possible design, the charging device 121 or the terminal to be upgraded 110 distributes the first target data that needs to be downloaded to at least one IoT terminal 122, and the above target data includes at least one first target data.
[0086] In a possible design, this step specifically includes:
[0087] S2021. Using a preset search model, according to the target upgrade code of the object to be upgraded in the terminal to be upgraded, search for a data compression package corresponding to the target upgrade code in each storage module of the distributed upgrade network to obtain a search result.
[0088] In this step, the target upgrade code includes at least one of a system version number, a software version number, and a software identity.
[0089] For example, when the terminal to be upgraded needs to perform a system upgrade, the target upgrade code is the system version number; when the terminal to be upgraded needs to perform a software upgrade, the target upgrade code includes the software version number and the software identity.
[0090] It is worth noting that the terminal to be upgraded can also upgrade the system and at least one software at the same time. Alternatively, the terminal to be upgraded can upgrade multiple software and / or drivers at the same time. Because the method of the present application can accommodate multiple upgrade threads or upgrade programs to work simultaneously, multiple applications in the terminal to be upgraded 110 can be upgraded simultaneously, for example, during the rest time at night, batch upgrades can be performed, greatly improving the upgrade efficiency, making the user almost unable to feel the upgrade process, and greatly improving the user experience and upgrade efficiency.
[0091] S2022: When there is at least one data compression package in the search result, decompress each data compression package to obtain a data set to be combined.
[0092] S2023. Using a preset combination model, reorganize the data in the to-be-combined data set to obtain a reorganization result.
[0093] In this step, specifically, firstly, duplicate data in the data set to be combined is removed to obtain multiple data frames to be combined; then, according to the link structure in the header and / or tail of each data frame to be combined, each data frame to be combined is sequentially connected to obtain a reorganization result.
[0094] The connection modes between the data frames to be combined include: binary tree structure connection, chain structure connection, etc.
[0095] S2024: Determine whether the reorganization result is all upgraded data.
[0096] In this step, if no, execute step S203, and if yes, directly start the upgrade process, that is, execute step S205.
[0097] Specifically, if the reorganization result can obtain a complete binary tree, or obtain a complete data chain, then it can be determined that it is all the upgraded data, otherwise it is only part of the upgraded data.
[0098] When the reorganization result is a data structure in the form of a binary tree, it can also be judged by the depth of the tree. When it is a chain structure, it can also be judged by the number of breakpoints. For example, when the number of breakpoints is greater than 0, it is not all upgraded data.
[0099] S203: Determine whether the target data missing from the terminal to be upgraded includes necessary data for starting the upgrade process.
[0100] In this step, if yes, execute step S204, if no, execute steps S205 and S206.
[0101] Optionally, the necessary data includes at least one of a verification key, a patch, and configuration parameters.
[0102] In a possible design, the specific implementation of this step includes:
[0103] S2031. Determine whether the target frame identification set includes a necessary frame identification.
[0104] In this step, if yes, execute step S2032, otherwise, execute step S2033.
[0105] It is worth noting that the target frame identifier set includes at least one target frame identifier, each target frame identifier corresponds to one or more target data frames corresponding to the target data, and the necessary frame identifier corresponds to one or more necessary data frames corresponding to the necessary data.
[0106] S2032. Determine whether the target data contains necessary data.
[0107] S2033. Determine that the target data does not contain necessary data.
[0108] It should be noted that the technical effect of step S203 is that it can further shorten the time consumed for upgrading. When it is identified that part of the upgrade data has been downloaded in the previously executed download task in the current distributed upgrade network, and the downloaded data is sufficient to start the upgrade process, that is, when the necessary data is already included, the upgrade process can be started. In this way, it is possible to achieve upgrading while downloading the remaining target data at the same time, further improving the upgrade efficiency.
[0109] It should also be noted that each time the distributed upgrade network executes the download of upgrade data, a download time limit or a download data volume limit can be set to avoid the download of upgrade data from adversely affecting the performance or service of the IoT terminal in the distributed upgrade network. Alternatively, the disconnection signal between the terminal to be upgraded and the charging device can be used as a stop signal or pause signal for the download task.
[0110] S204: Download necessary data to at least one storage module through the distributed upgrade network.
[0111] In this step, at least one IoT terminal in the distributed upgrade network downloads all or part of the necessary data to its built-in storage module according to the download task indication information of the terminal to be upgraded and / or the charging device.
[0112] In a possible design, this step specifically includes:
[0113] S2041. According to the first remaining storage capacity, the current working status, the remaining power of the terminal to be upgraded, and the second remaining storage capacity of at least one storage module, determine at least one download terminal for downloading necessary data from the distributed upgrade network and / or the terminal to be upgraded, and the first data to be downloaded corresponding to each download terminal.
[0114] In this step, when the first remaining storage capacity is lower than the preset first capacity threshold, the terminal to be upgraded does not serve as a download terminal; if the current working state is busy, such as when the CPU occupancy rate is higher than the preset occupancy threshold, the terminal to be upgraded does not serve as a download terminal; when the remaining power is lower than the preset power threshold, the terminal to be upgraded does not serve as a download terminal.
[0115] When the remaining capacity of the second storage is lower than a preset second capacity threshold, the Internet of Things terminal does not serve as a download terminal.
[0116] S2042. Download each first data to be downloaded through at least one download terminal to obtain necessary data.
[0117] S205: Start the upgrade process.
[0118] In this step, one or more upgrade processes can be started, but it should be noted that the started upgrade processes cannot conflict with each other.
[0119] S206: Download the target data to at least one storage module through the distributed upgrade network.
[0120] In this step, at least one IoT terminal in the distributed upgrade network downloads all or part of the target data to its built-in storage module according to the download task indication information of the terminal to be upgraded and / or the charging device.
[0121] In a possible design, this step specifically includes:
[0122] S2061. According to the first remaining storage capacity, the current working status, the remaining power of the terminal to be upgraded, and the second remaining storage capacity of at least one storage module, determine at least one download end for downloading the target data from the distributed upgrade network and / or the terminal to be upgraded, and the second data to be downloaded corresponding to each download end.
[0123] In this step, when the first remaining storage capacity is lower than the preset first capacity threshold, the terminal to be upgraded does not serve as a download terminal; if the current working state is busy, such as when the CPU occupancy rate is higher than the preset occupancy threshold, the terminal to be upgraded does not serve as a download terminal; when the remaining power is lower than the preset power threshold, the terminal to be upgraded does not serve as a download terminal.
[0124] When the remaining capacity of the second storage is lower than a preset second capacity threshold, the Internet of Things terminal does not serve as a download terminal.
[0125] S2062. Download each second data to be downloaded through at least one download terminal to obtain target data.
[0126] For ease of understanding, the application scenarios of the above upgrade optimization method can be of the following types:
[0127] (1) When the terminal to be upgraded is a mobile terminal, the charging device is a smart charger or a smart charging socket, and the connection signal and the data transmission of the upgrade data are triggered through the connection of the USB interface.
[0128] (2) When the terminal to be upgraded is a vehicle or a carrier, the charging device is a smart charging pile or a smart charging gun.
[0129] This embodiment provides an upgrade optimization method, which triggers the download of upgrade data or the start of the upgrade process by connecting the charging device to the terminal to be upgraded, and slices and synchronously downloads the upgrade data through multiple IoT terminals in the distributed upgrade network to which the charging device belongs, thereby greatly shortening the download time of the upgrade data and reducing the storage occupancy rate of the upgrade data in a single terminal, thereby improving the user experience.
[0130] Figure 3 The schematic diagram of the structure of an upgrade optimization device provided in an embodiment of the present application is shown in FIG. The upgrade optimization device 300 can be implemented by software, hardware, or a combination of both.
[0131] like Figure 3 As shown, the upgrade optimization system 300 is applied to a wearable device, and one or more contact arrays are provided on the wearable device, and the contact units in the contact array are arranged into a preset pattern in a preset arrangement form. The upgrade optimization system 300 includes:
[0132] An acquisition module 301 is used to acquire a connection signal between the terminal to be upgraded and the charging device;
[0133] The processing module 302 is used to:
[0134] In response to the connection signal, determining whether all upgrade data required for upgrading the terminal to be upgraded exists in the distributed upgrade network to which the charging device belongs and / or the terminal to be upgraded, wherein the distributed upgrade network includes at least one storage module, and the storage module is used to store part or all of the upgrade data;
[0135] If only part of the upgrade data exists in the distributed upgrade network and / or the terminal to be upgraded, determining whether the target data missing from upgrading the terminal to be upgraded includes the necessary data for starting the upgrade process;
[0136] If not, the necessary data is downloaded to at least one storage module via the distributed upgrade network and the upgrade process is started;
[0137] If so, the upgrade process is initiated, and the target data is downloaded to at least one storage module via the distributed upgrade network;
[0138] If all upgrade data exists in the distributed upgrade network and / or the terminal to be upgraded, the upgrade process is directly started.
[0139] In one possible design, the processing module 302 is configured to:
[0140] Using a preset search model, according to the target upgrade code of the object to be upgraded in the terminal to be upgraded, a data compression package corresponding to the target upgrade code is searched in each storage module of the distributed upgrade network to obtain a search result;
[0141] When there is at least one data compression package in the search result, each data compression package is decompressed to obtain a data set to be combined;
[0142] Using the preset combination model, the data in the data set to be combined is reorganized to obtain a reorganization result;
[0143] Determine whether the reorganization result is all upgraded data.
[0144] In one possible design, the processing module 302 is configured to:
[0145] Remove duplicate data in the data set to be combined to obtain multiple data frames to be combined;
[0146] According to the link structure in the header and / or tail of each data frame to be combined, each data frame to be combined is connected in sequence to obtain a recombined result.
[0147] In one possible design, the processing module 302 is configured to:
[0148] Determining whether the target frame identification set includes a necessary frame identification, wherein the target frame identification set includes at least one target frame identification, each target frame identification corresponds to one or more target data frames corresponding to the target data, and the necessary frame identification corresponds to one or more necessary data frames corresponding to the necessary data;
[0149] If so, it is determined that the target data includes the necessary data, otherwise the target data does not include the necessary data.
[0150] Optional, necessary data, including: at least one of: verification key, patch program, and configuration parameters.
[0151] In one possible design, the processing module 302 is configured to:
[0152] According to the first remaining storage capacity, current working state, remaining power of the terminal to be upgraded, and the second remaining storage capacity of at least one storage module, determining at least one download terminal for downloading necessary data from the distributed upgrade network and / or the terminal to be upgraded, and the first to-be-downloaded data corresponding to each download terminal;
[0153] Each first data to be downloaded is downloaded through at least one download terminal to obtain necessary data.
[0154] In one possible design, the processing module 302 is configured to:
[0155] According to the first remaining storage capacity, the current working state, the remaining power of the terminal to be upgraded, and the second remaining storage capacity of at least one storage module, determining at least one download end for downloading target data from the distributed upgrade network and / or the terminal to be upgraded, and the second to-be-downloaded data to be downloaded by each download end;
[0156] Each second data to be downloaded is downloaded through at least one download terminal to obtain target data.
[0157] It is worth mentioning that Figure 3 The system provided in the illustrated embodiment can execute the method provided in any of the above method embodiments. Its specific implementation principles, technical features, professional terminology explanations and technical effects are similar and will not be repeated here.
[0158] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 400 may include: at least one processor 401 and a memory 402 . Figure 4 An electronic device is shown using a processor as an example.
[0159] The memory 402 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions.
[0160] The memory 402 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0161] The processor 401 is used to execute the computer-executable instructions stored in the memory 402 to implement the methods described in the above method embodiments.
[0162] The processor 401 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0163] Optionally, the memory 402 may be independent or integrated with the processor 401. When the memory 402 is a device independent of the processor 401, the electronic device 400 may further include:
[0164] The bus 403 is used to connect the processor 401 and the memory 402. The bus may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.
[0165] Optionally, in a specific implementation, if the memory 402 and the processor 401 are integrated on a chip, the memory 402 and the processor 401 can communicate through an internal interface.
[0166] The embodiments of the present application also provide a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. Specifically, the computer-readable storage medium stores program instructions, and the program instructions are used in the methods in the above-mentioned method embodiments.
[0167] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in the above-mentioned method embodiments when executed by a processor.
[0168] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An upgrade optimization method, characterized in that: include: Obtaining a connection signal between the terminal to be upgraded and the charging device; In response to the connection signal, determining whether all upgrade data required to upgrade the terminal to be upgraded exists in the distributed upgrade network to which the charging device belongs, wherein the distributed upgrade network includes at least one storage module, and the storage module is used to store part or all of the upgrade data; If only part of the upgrade data exists in the distributed upgrade network, determining whether the target data missing from upgrading the terminal to be upgraded includes necessary data for starting the upgrade process, wherein the necessary data includes: at least one of a verification key, a patch program, and a configuration parameter; If yes, downloading the necessary data to at least one of the storage modules through the distributed upgrade network and starting the upgrade process; If not, starting the upgrade process and downloading the target data to at least one of the storage modules through the distributed upgrade network; If all the upgrade data exist in the distributed upgrade network, the upgrade process is directly started; The determining whether all the upgrade data required for upgrading the terminal to be upgraded exists in the distributed upgrade network to which the charging device belongs, includes: Using a preset search model, according to the target upgrade code of the object to be upgraded in the terminal to be upgraded, searching for a data compression package corresponding to the target upgrade code in each storage module of the distributed upgrade network to obtain a search result; When there is at least one data compression package in the search result, decompress each data compression package to obtain a data set to be combined; Using a preset combination model, the data in the to-be-combined data set are recombined to obtain a recombined result; It is determined whether the reorganization result is all the upgraded data.
2. The upgrade optimization method according to claim 1, characterized in that: The method of using a preset combination model to reorganize the data in the to-be-combined data set to obtain a reorganization result includes: Removing duplicate data from the data sets to be combined to obtain multiple data frames to be combined; According to the link structure in the header and / or tail of each of the data frames to be combined, each of the data frames to be combined is connected in sequence to obtain the reorganization result.
3. The upgrade optimization method according to claim 1 or 2, characterized in that: The determining whether the target data missing from upgrading the terminal to be upgraded includes necessary data for starting the upgrade process includes: Determining whether a target frame identifier set includes a necessary frame identifier, wherein the target frame identifier set includes at least one target frame identifier, each of the target frame identifiers corresponds to one or more target data frames corresponding to the target data, and the necessary frame identifier corresponds to one or more necessary data frames corresponding to the necessary data; If so, it is determined that the target data includes the necessary data; otherwise, the target data does not include the necessary data.
4. The upgrade optimization method according to claim 1 or 2, characterized in that: The downloading of the necessary data to at least one of the storage modules through the distributed upgrade network includes: According to the first remaining storage capacity, current working state, remaining power of the terminal to be upgraded, and the second remaining storage capacity of at least one of the storage modules, determining at least one download terminal for downloading the necessary data from the distributed upgrade network, and the first to-be-downloaded data corresponding to each of the download terminals; The necessary data is obtained by downloading each of the first data to be downloaded through at least one of the download terminals.
5. The upgrade optimization method according to claim 1 or 2, characterized in that: The step of downloading the target data to at least one of the storage modules through the distributed upgrade network includes: According to the first remaining storage capacity, the current working state, the remaining power of the terminal to be upgraded, and the second remaining storage capacity of at least one of the storage modules, determining at least one download terminal for downloading the target data from the distributed upgrade network, and the second to-be-downloaded data corresponding to each of the download terminals; Each of the second data to be downloaded is downloaded through at least one of the download terminals to obtain the target data.
6. An upgrade optimization system, characterized in that: include: An acquisition module, used to acquire a connection signal between the terminal to be upgraded and the charging device; Processing modules for: In response to the connection signal, determining whether all upgrade data required to upgrade the terminal to be upgraded exists in the distributed upgrade network to which the charging device belongs, wherein the distributed upgrade network includes at least one storage module, and the storage module is used to store part or all of the upgrade data; If only part of the upgrade data exists in the distributed upgrade network, determining whether the target data missing from upgrading the terminal to be upgraded includes necessary data for starting the upgrade process, wherein the necessary data includes: at least one of a verification key, a patch program, and a configuration parameter; If not, downloading the necessary data to at least one of the storage modules through the distributed upgrade network, and starting the upgrade process; If yes, start the upgrade process and download the target data to at least one storage module through the distributed upgrade network; If all the upgrade data exist in the distributed upgrade network, the upgrade process is directly started; The processing module is specifically used for: Using a preset search model, according to the target upgrade code of the object to be upgraded in the terminal to be upgraded, a data compression package corresponding to the target upgrade code is searched in each storage module of the distributed upgrade network to obtain a search result; When there is at least one data compression package in the search result, each data compression package is decompressed to obtain a data set to be combined; Using the preset combination model, the data in the data set to be combined is reorganized to obtain a reorganization result; Determine whether the reorganization result is all upgraded data.
7. An electronic device, characterized in that: include: processor; as well as, a memory for storing a computer program for the processor; Wherein, the processor is configured to perform the upgrade optimization method according to any one of claims 1 to 5 by executing the computer program.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the upgrade optimization method according to any one of claims 1 to 5 is implemented.
