A software upgrade method and device
By receiving and parsing the upgrade configuration file, the terminal device determines the upgrade method and selects the appropriate upgrade package or complete software package for upgrade. This solves the problems of low software upgrade efficiency and file consistency in the existing technology, and achieves efficient and successful software upgrades. .
Patent Information
- Application Number
- CN202111426754.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-27
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-11-27
AI Technical Summary
Existing software upgrade methods are inefficient and can easily lead to file loss or non-latest versions, especially when upgrades fail when versions among users are inconsistent.
By receiving the upgrade configuration file sent by the server, it contains the file information and reference identification of each software function file. The terminal device determines the upgrade method based on the configuration file and selects the appropriate upgrade package or complete software package for upgrade to ensure file integrity and effectiveness. sex.
It improves the efficiency and success rate of software upgrades, avoids redundant upgrade processes, ensures the integrity and latestness of files, and saves network resources.
Smart Images

Figure CN114090048B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart cars, and in particular to a software upgrade method and device. Background Art
[0002] With the development of electronic technology, there are more and more various software, and the software is becoming more and more complex, resulting in higher and higher frequency of software releases and updates, and the content that needs to be upgraded is becoming more and more complex.
[0003] In the prior art, there are two common methods for making upgrade packages: the first is to package the entire software file into a complete software package, and the user needs to download the entire file each time to complete the software. The second is to package only the updated or newly added files into an upgrade package, and the user only needs to download the modified or newly added parts when upgrading.
[0004] The first upgrade method is to package the entire software. Users need to download a large amount of data each time they upgrade, which is very inefficient and consumes network resources. The second upgrade method is for users who have not upgraded several versions. When upgrading directly to the latest version, it is easy to lose files or files that are not the latest version, resulting in upgrade failure.
[0005] Therefore, how to improve the software upgrade efficiency and take into account the upgrade effect is a technical problem that technicians in this field are studying. Summary of the invention
[0006] The embodiments of the present application provide a software upgrade method and device, which improve the efficiency of software upgrade.
[0007] In a first aspect, an embodiment of the present application provides a software upgrade method, which is applied to a terminal device, comprising:
[0008] Upon receiving the upgrade prompt information for the target application sent by the server, downloading the upgrade configuration file; the upgrade configuration file includes the file information and reference identifier of each software function file corresponding to the upgraded version of the target application;
[0009] Determining a local upgrade mode of the target application according to the upgrade configuration file;
[0010] The local target application is upgraded according to the determined upgrade method.
[0011] Optionally, the upgrade method includes upgrading the local target application according to an upgrade package, and upgrading the local target application according to a complete software package.
[0012] Optionally, the upgrade package includes update files and newly added files, and the complete software package includes all files of the target application of the upgraded version; the reference identifier is used to indicate that the corresponding file is the update file or other file, and the other file includes the newly added file;
[0013] The step of determining the local upgrade mode of the target application according to the upgrade configuration file includes:
[0014] According to the reference identifiers of each file in the upgrade configuration file, comparing whether the file information recorded in the upgrade configuration file of the target software function file is consistent with the file information recorded in the local configuration file; the target software function file is a file characterized by the reference identifier as the other file; the local configuration file records the file information of each software function file of the target application currently installed locally;
[0015] If they are consistent, the local target application is upgraded through the upgrade package;
[0016] If they are inconsistent, the local target application is upgraded through the complete software package.
[0017] Optionally, comparing whether the file information recorded in the upgrade configuration file of the target software function file is consistent with the file information recorded in the local configuration file includes:
[0018] If the local configuration file lacks file information of at least one of the target software function files, it is determined that the file information of the target software function file recorded in the upgrade configuration file is inconsistent with the file information recorded in the local configuration file.
[0019] Optionally, the file information includes a file version number; the comparison of whether the file information recorded in the upgrade configuration file of the target software function file is consistent with the file information recorded in the local configuration file, further comprising:
[0020] If there is at least one target software function file whose file version number recorded in the upgrade configuration file is inconsistent with the file version number recorded in the local configuration file, it is determined that the file information recorded in the upgrade configuration file of the target software function file is inconsistent with the file information recorded in the local configuration file.
[0021] Optionally, the upgrade configuration file further includes a version number of the target application of the upgraded version, and the local configuration file includes a version number of the currently installed target application; before determining, according to the upgrade configuration file, to upgrade the local target application through an upgrade package or to upgrade the local target application through a complete software package, the method further includes:
[0022] Determine whether the version number of the target application of the upgraded version is higher than the version number of the currently installed target application;
[0023] If so, the step of determining the local upgrade mode of the target application according to the upgrade configuration file and subsequent steps are executed.
[0024] In a second aspect, an embodiment of the present application provides a software upgrade method, which is applied to a server, comprising:
[0025] The server generates an upgrade package and a complete software package corresponding to the upgraded version of the target application;
[0026] The server generates an upgrade configuration file, wherein the upgrade configuration file includes file information and reference identifiers of each software function file corresponding to the target application of the upgraded version; the upgrade configuration file is used by the terminal device to decide the upgrade method of the target application locally on the terminal device;
[0027] The server sends upgrade prompt information for the target application to the terminal device.
[0028] In a third aspect, an embodiment of the present application provides a software upgrade device, which is applied to a terminal device. The upgrade device includes a receiving unit and an upgrade unit, wherein:
[0029] The receiving unit is used to download the upgrade configuration file when receiving the upgrade prompt information for the target application sent by the server; the upgrade configuration file includes the file information and reference identifier of each software function file corresponding to the upgraded version of the target application;
[0030] The determining unit is used to determine the local upgrade mode of the target application according to the upgrade configuration file;
[0031] The upgrading unit is used to upgrade the local target application according to the determined upgrading method.
[0032] In a fourth aspect, an embodiment of the present application provides a software upgrade device, which is applied to a server. The upgrade device includes a generating unit and a sending unit, wherein:
[0033] The generating unit is used to generate an upgrade package and a complete software package corresponding to the upgraded version of the target application; and is also used to generate an upgrade configuration file, wherein the upgrade configuration file includes file information and reference identification of each software function file corresponding to the upgraded version of the target application; the upgrade configuration file is used by the terminal device to decide the upgrade method of the local target application of the terminal device;
[0034] The sending unit is used to send upgrade prompt information for the target application to the terminal device.
[0035] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory; a computer program is stored in the memory; when the processor executes the computer program, the computing device executes the method described in any one of the first or second aspects above.
[0036] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed on at least one processor, the method described in any one of the first or second aspects is implemented.
[0037] In a seventh aspect, the present application provides a computer program product, the computer program product comprising computer instructions, when the instructions are executed on at least one processor, the method described in any one of the first or second aspects is implemented. The computer program product may be a software installation package, and when the aforementioned method is required, the computer program product may be downloaded and executed on a computing device.
[0038] In the method of the first aspect above, the terminal device can download the upgrade configuration file to understand the file information and reference identifier of each software function file corresponding to the target application of the upgraded version included in the upgrade configuration file, so as to know the specific upgrade situation of the target application of this upgraded version, thereby determining which upgrade method is more appropriate for the local target application, and can handle different upgrade situations in a targeted manner to avoid the upgrade process becoming redundant or the upgrade failing, thereby improving the efficiency and success rate of the software upgrade.
[0039] The beneficial effects of the technical methods provided in the second to seventh aspects of the present application can refer to the beneficial effects of the technical solution of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The following is a brief introduction to the drawings required for describing the embodiments.
[0041] Figure 1 It is a schematic diagram of the architecture of a software upgrade system provided in an embodiment of the present application;
[0042] Figure 2 It is a flowchart of a software upgrade method provided in an embodiment of the present application;
[0043] Figure 3 It is a flowchart of a software upgrade method provided in an embodiment of the present application;
[0044] Figure 4 It is a flowchart of another software upgrade method provided in an embodiment of the present application;
[0045] Figure 5 is a structural diagram of a software upgrading device 50 provided in an embodiment of the present application;
[0046] Figure 6 is a structural diagram of a software upgrading device 60 provided in an embodiment of the present application;
[0047] Figure 7 is a schematic diagram of the structure of a terminal device 70 provided in an embodiment of the present application;
[0048] Figure 8 It is a structural diagram of a server 80 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0050] See also Figure 1 , Figure 1 1 is a schematic diagram of the architecture of a software upgrade system provided in an embodiment of the present application, the system includes a server 101 and a terminal device 102, wherein:
[0051] The server 101 may be a server cluster consisting of one server or multiple servers, providing computing or application services for the terminal device 102, thereby implementing the release and update of the software upgrade package.
[0052] The terminal device 102 is a device with processing capabilities and data transmission and reception capabilities. The terminal device 102 can generate and send instructions, receive instructions, or run software, so as to process the software upgrade package and perform related services on the vehicle. For example, the terminal device 102 can be a computer, a laptop, a tablet computer, a PDA, a desktop, a diagnostic instrument, a mobile phone, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. In the embodiment of the present application, the user group corresponding to the user of the terminal device 102 can be a research institute, an after-sales department, a 4S store user, etc., and the above corresponding user groups all have the authority to upgrade the software.
[0053] The method of the embodiment of the present application is described in detail below.
[0054] See also Figure 2 , Figure 2 is a flowchart of a software upgrade method provided in an embodiment of the present application. The method can be based on Figure 1 The method is implemented based on the system architecture shown in the figure, and can also be implemented based on other system architectures. Specifically, the method is applied to a terminal device, and includes but is not limited to the following steps:
[0055] Step S201: upon receiving upgrade prompt information for a target application sent by a server, downloading an upgrade configuration file.
[0056] Specifically, when the server receives the software upgrade package, it will send an upgrade prompt message of the target application to the terminal device, and then the terminal device will receive the upgrade prompt message for the target application, and then the terminal device will download the upgrade configuration file from the server to pave the way for subsequent operations, wherein the upgrade configuration file includes the file information and reference identifier of each software function file corresponding to the upgraded version of the target application.
[0057] Step S202: Determine the local upgrade method of the target application according to the upgrade configuration file.
[0058] Specifically, the terminal device can download the upgrade configuration file to understand the file information and reference identifier of each software function file corresponding to the target application of the upgraded version included in the upgrade configuration file, so as to know the specific upgrade status of the target application of this upgraded version, and thus determine which upgrade method is more appropriate for the local target application. Different upgrade situations can be handled in a targeted manner to avoid the upgrade process becoming redundant or the upgrade failing, thereby improving the efficiency and success rate of software upgrades.
[0059] Step S203: Upgrading the local target application according to the determined upgrading method.
[0060] Specifically, the upgrade method includes upgrading the local target application according to the upgrade package and upgrading the local target application according to the complete software package. The terminal device can upgrade the local target application accordingly through these two upgrade methods respectively.
[0061] See also Figure 3 , Figure 3 is a flowchart of a software upgrade method provided in an embodiment of the present application. The method can be based on Figure 1 The method is implemented based on the system architecture shown in the figure, and can also be implemented based on other system architectures. The method includes but is not limited to the following steps:
[0062] Step S301: upon receiving upgrade prompt information for a target application sent by a server, downloading an upgrade configuration file.
[0063] Specifically, when the server receives the software upgrade package, it will send an upgrade prompt message of the target application to the terminal device, and then the terminal device will receive the upgrade prompt message for the target application, and then the terminal device will download the upgrade configuration file from the server's web page to pave the way for subsequent operations, wherein the upgrade configuration file includes the file information and reference identifier of each software function file corresponding to the upgraded version of the target application.
[0064] Step S302: Determine the local upgrade mode of the target application according to the upgrade configuration file.
[0065] In an embodiment of the present application, there are two ways to upgrade, including upgrading the local target application according to the upgrade package, and upgrading the local target application according to the complete software package. In an embodiment of the present application, the upgrade package includes the update files and newly added files of this upgrade. The update files are updated versions of existing files, and the newly added files are files that do not exist in the previous version of the target application. The update files and newly added files are all software function files, such as development and compilation files; the complete software package includes the latest software function files and files that do not need to be modified, such as system files. In the present application, the reference identifier is used to characterize that the corresponding file is an update file or other file, and the other files include the newly added files and files that have not been updated.
[0066] Specifically, the terminal device compares, based on the reference identifiers of each file in the upgrade configuration file, whether the file information recorded in the upgrade configuration file of the target software function file is consistent with the file information recorded in the local configuration file; the target software function file is a file represented by the reference identifier as the other file; the local configuration file records the file information of each software function file of the target application currently installed locally;
[0067] That is, the application compares the newly added files of the upgraded version of the target application and the file information of the unupdated files to see whether they are consistent with those recorded in the local configuration file;
[0068] If they are consistent, the local target application is upgraded through the upgrade package;
[0069] If they are inconsistent, the local target application is upgraded through the complete software package.
[0070] In the embodiment of the present application, the file type (for example, updated file, newly added file and unupdated file) of the software function file of the target application of the upgraded version is marked by a reference identifier, so as to find the newly added file and the unupdated file according to the reference identifier, and judge whether the file information of the newly added file and the unupdated file of the target application of the upgraded version is consistent with the file information recorded in the local configuration file. If the recorded file information is consistent, it means that the local target application only needs to download the updated file, and the program automatically decompresses and replaces the upgrade, without downloading the complete software package every time, saving a lot of network resources. Therefore, if the local target application is upgraded through the upgrade package, if the recorded file information is inconsistent, it means that the local target application may lack the newly added file or the unupdated file of the upgraded version, or the content of the file is inconsistent, then the local target application cannot be upgraded directly through the upgrade package, and it is very likely to fail to upgrade, then choose to upgrade the local target application through the complete software package, download the complete software package from the server, automatically decompress and upgrade, and ensure that the upgrade is successful and the file is complete. Therefore, the embodiment of the present application can select the appropriate upgrade method for different situations, which can save network resources and ensure that each file is complete and up-to-date, which can greatly improve the efficiency and success rate of software upgrade.
[0071] After the after-sales technicians have made the corresponding upgrade package and complete software package for the target application of the upgraded version each time, they also set the corresponding upgrade configuration file, which records the file information and reference identifiers of all software function files of this upgraded version. In the embodiment of the present application, the reference identifiers of the above-mentioned other files (i.e., including newly added files and unupdated files, etc.) are set to "1", and the reference identifiers of the updated files are set to "0". Setting the file reference identifier to "1" or "0" is only for the convenience of exemplifying the following, and is not limited to being set to "1" and "0". There may also be other or multiple situations.
[0072]
[0073] Table 1
[0074] In an embodiment of the present application, the comparison of whether the file information recorded in the upgrade configuration file of the target software function file is consistent with the file information recorded in the local configuration file includes: if the local configuration file lacks file information of at least one of the target software function files, then determining that the file information recorded in the upgrade configuration file of the target software function file is inconsistent with the file information recorded in the local configuration file.
[0075] Taking Table 1 as an example, Table 1 records the files AD, where the identification of file C is "0", indicating that file C is an updated file of the upgraded version of the target application, files A and B are files that have not been updated, and file D may be a newly added file. In Table 1, it is only necessary to compare the file information corresponding to the file with the reference identification of 1, that is, it is only necessary to compare whether the information of files A, B and D in the local configuration file and the upgraded configuration file is consistent. Obviously, if the information of file D is not recorded in the local configuration file, the local target application does not include file D. File D may be a newly added file, or it may be because the local application was not updated in time before, and some versions of upgrades were missed, so the local application does not have file D. Since the upgrade package does not include system files and other files that support the operation of software function files, the local version of the target application cannot directly achieve the normal operation of file D by downloading the upgrade package, and it is very likely to fail to upgrade. In this case, the terminal device will select a complete software package to upgrade the local application. The complete software package includes file AD and some files that do not need to be modified, such as system files.
[0076] In some embodiments, the comparing of whether the file information recorded in the upgrade configuration file of the target software function file is consistent with the file information recorded in the local configuration file may also include: if there is at least one target software function file whose file version number recorded in the upgrade configuration file is inconsistent with the file version number recorded in the local configuration file, then determining that the file information recorded in the upgrade configuration file of the target software function file is inconsistent with the file information recorded in the local configuration file.
[0077] In this embodiment, even if the file with the reference identifier "1" recorded in the upgrade configuration file can find the corresponding file in the local configuration file, when the version numbers are different, it is still necessary to upgrade through the complete software package.
[0078] Take Table 2 of the following table as an example for illustration:
[0079]
[0080] Table 2
[0081] Taking Table 2 as an example, Table 2 records files AC, where the identifier of file C is "0", indicating that file C is an updated file of the upgraded version of the target application, and file A and file B are files that have not been updated. In Table 2, it is only necessary to compare the file information corresponding to the file with reference identifier 1, that is, it is only necessary to compare whether the information of file A and file B in the local configuration file and the upgraded configuration file is consistent. It can be seen that the version number of file A of the upgraded version of the target application is higher than the version number of the local file. At the same time, the version number of file B of the upgraded version of the target application is higher than the version number of file B of the local application. However, the upgrade package only includes file C with version number V2.0, and does not include files that have not been updated, that is, the upgrade package does not include file A and file B. Therefore, the local version of the target application cannot directly upgrade the local application by downloading the upgrade package. In this case, the terminal device will select the complete software package to upgrade the local application.
[0082] In some embodiments, the files recorded in the upgrade configuration file can all find corresponding files in the local configuration file, and the version numbers are the same. In this case, the terminal device only needs to select the upgrade package for upgrade.
[0083] Take Table 3 of the following table as an example for illustration:
[0084]
[0085] Table 3
[0086] In the embodiment of the present application, it is only necessary to compare file A and file B. Obviously, the information recorded in file A and file B in the upgrade configuration file is the same as the information recorded in the local configuration file. Therefore, it is only necessary to download the upgrade package (including file C with version number V2.0) for upgrading.
[0087] Step S303: Upgrading the local target application according to the determined upgrading method.
[0088] Through this solution, each time the technician releases an upgrade package, he only needs to distinguish the reference identifiers and file version numbers of each file in the upgrade package, so that the client can automatically verify the integrity and effectiveness of the local software. Even if the client is the most basic version and has not been upgraded in the middle, it will automatically check according to the logic when it is upgraded again. There is no need to download a complete software package every time an upgrade is performed, which greatly saves network resources and improves after-sales efficiency.
[0089] In some embodiments, the upgrade configuration file further includes the version number of the target application of the upgraded version, and the local configuration file includes the version number of the currently installed target application; before determining to upgrade the local target application through an upgrade package or to upgrade the local target application through a complete software package according to the upgrade configuration file, the method further includes:
[0090] Determine whether the version number of the target application of the upgraded version is higher than the version number of the currently installed target application; if so, determine the upgrade method of the local target application according to the upgrade configuration file and upgrade the local application according to the determined upgrade method.
[0091] In an embodiment of the present application, first determining that the version number of the target application of the upgraded version is higher than the version number of the local target application is a prerequisite step for a series of subsequent operations such as reference identification and determining whether the file information of the upgraded configuration file is consistent with that of the local configuration file. Only when the version number of the upgraded version is higher than the local version number does it indicate that the local target application needs to be upgraded. Otherwise, no upgrade is required.
[0092] See also Figure 4 , Figure 4 is a flowchart of another software upgrade method provided in an embodiment of the present application. The method can be based on Figure 1 The method is implemented based on the system architecture shown in the figure, and can also be implemented based on other system architectures. The method is applied to the server, including but not limited to the following steps:
[0093] Step S401: The server generates an upgrade package and a complete software package corresponding to the upgraded version of the target application;
[0094] In the embodiment of the present application, the update package contains the updated and newly added files, while the complete software package includes all the files of the target application of the upgraded version. For example, if the only file that needs to be updated this time is file A, the technician will only place the upgraded file A in the upgrade package. Therefore, the technician needs to first package the updated files into an upgrade package on the server, and then use the upgrade package to make a complete software package for updating, to ensure that the software package downloaded by the terminal device on the server is the latest and complete. The prior art does not distinguish between upgrade packages and software packages, but downloads the complete software package every time the software is updated. Compared with the prior art, the operation of this application can improve the efficiency of software upgrades.
[0095] Step S402: The server generates an upgrade configuration file.
[0096] Specifically, the upgrade configuration file includes file information and reference identifiers of each software function file corresponding to the upgraded version of the target application; the upgrade configuration file is used by the terminal device to decide the upgrade method of the local target application of the terminal device.
[0097] After the server generates the upgrade configuration file, the terminal can obtain the file information and reference identifier of each software function file corresponding to the upgraded version of the target application by downloading the upgrade configuration file, so that the upgrade method of the local target application can be clearly determined through subsequent operations (such as whether it is necessary to download the complete software package to update the local software package or only download the upgrade package to update the local file), and then upgrade the local target application according to the determined upgrade method. This can ensure that the file is complete and up-to-date, and improve the efficiency of software upgrades.
[0098] Step S403: the server sends upgrade prompt information for the target application to the terminal device.
[0099] In an embodiment of the present application, after the server completes the above steps of upgrading the upgrade package and the complete software package, it sends an upgrade prompt message to the terminal device indicating that the files for the local target application need to be upgraded, prompting the terminal device that the target application has content that needs to be upgraded.
[0100] In the prior art, the terminal device needs to download a complete software package every time to upgrade the software package of the local target application, and does not specifically handle the upgrade situation of different files. In the above method, the terminal device can download the upgrade configuration file, and through the file information and reference identifier of each software function file corresponding to the upgraded version of the target application included in the upgrade configuration file, know whether the file of the local target application needs to be upgraded and in what upgrade mode, so as to be able to specifically choose to download the upgrade package or download the complete software package. By upgrading the local target application according to the upgrade package and upgrading the local target application according to the complete software package, different upgrade situations can be handled in a targeted manner to avoid the upgrade process becoming redundant, thereby improving the efficiency of software upgrades.
[0101] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.
[0102] It can be understood that the multiple devices provided in the embodiments of the present application, such as the software upgrade device, include hardware structures, software modules, or a combination of hardware structures and software structures corresponding to executing each function in order to implement the functions in the above method embodiments.
[0103] Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different device implementations to implement the aforementioned method embodiments in different usage scenarios, and different implementations of the device should not be considered to exceed the scope of the embodiments of the present application.
[0104] The embodiment of the present application can divide the device into functional modules. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one functional module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0105] For example, in the case of dividing the functional modules of the device in an integrated manner, the present application cites several possible processing devices.
[0106] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a software upgrade device 50 provided in an embodiment of the present application. The software upgrade device 50 is applied to a terminal device and can be a device in the terminal device, such as a chip, a software module, an integrated circuit, etc. The software upgrade device 50 is used to implement the aforementioned software upgrade method, for example Figure 3 The software upgrade method in the embodiment.
[0107] In a possible implementation, the software upgrading device 50 may include a receiving unit 501 , a determining unit 502 , an upgrading unit 503 and a judging unit 504 .
[0108] The receiving unit 501 is used to download an upgrade configuration file upon receiving upgrade prompt information for a target application sent by a server; the upgrade configuration file includes file information and a reference identifier of each software function file corresponding to the upgraded version of the target application;
[0109] A determining unit 502 is used to determine an upgrade mode of the local target application according to the upgrade configuration file, wherein the upgrade mode includes upgrading the local target application according to an upgrade package and upgrading the local target application according to a complete software package;
[0110] The upgrading unit 503 is used to upgrade the local target application according to the determined upgrading method.
[0111] In the prior art, the terminal device needs to download a complete software package every time to upgrade the software package of the local target application, and does not specifically handle the upgrade situation of different files. In the above method, the terminal device can download the upgrade configuration file, and through the file information and reference identifier of each software function file corresponding to the upgraded version of the target application included in the upgrade configuration file, know whether the file of the local target application needs to be upgraded and in what upgrade mode, so as to be able to specifically choose to download the upgrade package or download the complete software package. By upgrading the local target application according to the upgrade package and upgrading the local target application according to the complete software package, different upgrade situations can be handled in a targeted manner to avoid the upgrade process becoming redundant, thereby improving the efficiency of software upgrades.
[0112] Optionally, the upgrade method includes upgrading the local target application according to an upgrade package, and upgrading the local target application according to a complete software package.
[0113] Specifically, the upgrade method includes upgrading the local target application according to the upgrade package and upgrading the local target application according to the complete software package. The terminal device can upgrade the local target application accordingly through these two upgrade methods respectively.
[0114] Optionally, the upgrade package includes update files and newly added files, and the complete software package includes all files of the target application of the upgraded version; the reference identifier is used to indicate that the corresponding file is the update file or other file, and the other file includes the newly added file;
[0115] In determining the upgrade mode of the local target application according to the upgrade configuration file, the determining unit 502 is specifically used to:
[0116] According to the reference identifiers of each file in the upgrade configuration file, comparing whether the file information recorded in the upgrade configuration file of the target software function file is consistent with the file information recorded in the local configuration file; the target software function file is a file characterized by the reference identifier as the other file; the local configuration file records the file information of each software function file of the target application currently installed locally;
[0117] If they are consistent, the local target application is upgraded through the upgrade package;
[0118] If they are inconsistent, the local target application is upgraded through the complete software package.
[0119] In an embodiment of the present application, comparing the file information recorded in the upgrade configuration file of the target software function file with the file information recorded in the local configuration file by reference identifiers of each file in the upgrade configuration file to see whether they are consistent is a pre-processing to determine whether the file needs to be upgraded. If the recorded file information is consistent, it indicates that the terminal device upgrades the local target application through the upgrade package. If the recorded file information is inconsistent, it indicates that the terminal device upgrades the local target application through the complete software package. By comparing the information recorded in the upgrade configuration file with the local configuration file, it can be specifically determined whether each file needs to be updated or newly added, so as to perform targeted operations for different situations to ensure that each file is complete and up-to-date. Performing operations in steps can greatly improve the efficiency of software upgrades.
[0120] Optionally, the determining unit 502 is further configured to:
[0121] If the local configuration file lacks file information of at least one of the target software function files, it is determined that the file information of the target software function file recorded in the upgrade configuration file is inconsistent with the file information recorded in the local configuration file.
[0122] In an embodiment of the present application, if, when comparing the file information recorded in the upgrade configuration file with the local configuration file, it is found that the local configuration file lacks the file information contained in the upgrade configuration file (for example, file A does not exist on the terminal device, but file A has been newly added to the files that need to be updated this time on the server), it indicates that there is a new file in this upgrade, but the file is not included locally, indicating that the file information recorded in the upgrade configuration file is inconsistent with the local configuration file, then the complete software package is downloaded to update the local software package to ensure that each file is up to date and complete.
[0123] Optionally, the determining unit 502 is further configured to:
[0124] If there is at least one target software function file whose file version number recorded in the upgrade configuration file is inconsistent with the file version number recorded in the local configuration file, it is determined that the file information recorded in the upgrade configuration file of the target software function file is inconsistent with the file information recorded in the local configuration file.
[0125] In an embodiment of the present application, when comparing the file information recorded in the upgrade configuration file with the file information recorded in the local configuration file, it is found that one or more file version numbers recorded in the upgrade configuration file are inconsistent with the local configuration file (for example, there are files A, B, and C in the server's software package, and there are also files A, B, and C in the local software package, but the version numbers of files B and C on the server are V4.0, while the version numbers of local files B and C are V1.0 and V2.0 respectively, but files B and C are not placed in the upgrade package), which indicates that the file information recorded in the upgrade configuration file is inconsistent with the local configuration file, and the complete software package needs to be downloaded to update the local target application.
[0126] Optionally, a judgment unit 504 is further included, and the judgment unit 504 is used to:
[0127] Determine whether the version number of the target application of the upgraded version is higher than the version number of the currently installed target application;
[0128] If so, the determining unit is triggered to execute the operation of determining the upgrade mode of the local target application according to the upgrade configuration file and subsequent operations.
[0129] In an embodiment of the present application, first determining that the version number of the target application of the upgraded version is higher than the version number of the local target application is the precondition for a series of subsequent operations such as reference identification and determining whether the file information of the upgraded configuration file is consistent with that of the local configuration file. Only when the version number of the upgraded version is higher than the local version number does it mean that the target application needs to be upgraded. Otherwise, it does not need to be upgraded.
[0130] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a software upgrade device 60 provided in an embodiment of the present application. The software upgrade device 60 is applied to a server, and can also be a device in the server, such as a chip, a software module, an integrated circuit, etc. The software upgrade device 60 is used to implement the aforementioned software upgrade method, for example Figure 4 The software upgrade method in the embodiment.
[0131] In a possible implementation manner, the software upgrading device 60 may include a generating unit 601 and a sending unit 602 .
[0132] The generating unit 601 is used to generate an upgrade package and a complete software package corresponding to the upgraded version of the target application;
[0133] The generating unit 601 is further configured to generate an upgrade configuration file, wherein the upgrade configuration file includes file information and reference identifiers of each software function file corresponding to the target application of the upgraded version; the upgrade configuration file is used by the terminal device to decide the upgrade method of the target application locally on the terminal device;
[0134] The sending unit 602 is used to send upgrade prompt information for the target application to the terminal device.
[0135] In an embodiment of the present application, the server adds an upgrade package so that the user can choose to download the upgrade package or the complete software package on the terminal device in a targeted manner. For example, for files that need to be upgraded, the upgrade package can be directly downloaded to replace the local target software. For cases where there are missing or incomplete files, the latest complete software package is downloaded to upgrade the local target software, ensuring that all local files are the latest and complete. The upgrade is divided into two situations: downloading only the upgrade package and downloading the complete software package. Different implementations can be carried out accordingly to avoid the upgrade process becoming redundant, thereby improving the efficiency of software upgrades.
[0136] Optionally, the generating unit 601 is further configured to generate an upgrade package corresponding to the upgraded version of the target application;
[0137] The server upgrades the current software package of the target application through the upgrade package to obtain a new complete software package of the target application.
[0138] In the embodiment of the present application, the server needs to first package the upgraded files into an upgrade package, and then use the upgrade package to upgrade the software package of the local target application to ensure that the software package downloaded by the terminal device on the server is the latest and complete. The prior art does not adopt the method of separating the upgrade package and the software package, but downloads the complete software package every time the software is updated. Compared with the prior art, the operation of the present application can improve the efficiency of software upgrades.
[0139] See also Figure 7 , Figure 7 70 is a schematic diagram of the structure of a terminal device 70 provided in an embodiment of the present application. The terminal device 70 may be an independent device (e.g., one or more of a server or a user device, etc.), or a component inside an independent device (e.g., a chip, a software module, or a hardware module, etc.). The terminal device 70 may include at least one processor 801. Optionally, it may also include at least one memory 703. Further optionally, the terminal device 70 may also include a communication interface 702. Further optionally, it may also include a bus 704, wherein the processor 701, the communication interface 702, and the memory 703 are connected via the bus 704.
[0140] Among them, the processor 701 is a module that performs arithmetic operations and / or logical operations, and can specifically be a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a complex programmable logic device (CPLD), a coprocessor (assisting the central processing unit to complete corresponding processing and applications), a microcontroller unit (MCU) and other processing modules or a combination of multiple thereof.
[0141] The communication interface 702 may be used to provide information input or output for the at least one processor. And / or, the communication interface 702 may be used to receive data sent externally and / or send data externally, and may be a wired link interface including an Ethernet cable, etc., or a wireless link (Wi-Fi, Bluetooth, general wireless transmission, vehicle-mounted short-range communication technology, and other short-range wireless communication technologies, etc.) interface. Optionally, the communication interface 702 may also include a transmitter (such as a radio frequency transmitter, an antenna, etc.) coupled to the interface, or a receiver, etc.
[0142] The memory 703 is used to provide a storage space in which data such as an operating system and a computer program can be stored. The memory 703 can be a random access memory (Random Access Memory, RAM), a read-only memory (Read-only Memory, ROM), an erasable programmable read-only memory (Erasable Programmable Read-only Memory, EPROM), or a portable read-only memory (Compact Disc Read-only Memory, CD-ROM), etc., or a combination of multiple thereof.
[0143] At least one processor 701 in the terminal device 70 is used to execute the aforementioned method, for example Figure 3 The method described in the embodiment.
[0144] Optionally, the processor 701 may be a processor specifically used to execute these methods (referred to as a dedicated processor for convenience of distinction), or may be a processor that executes these methods by calling a computer program, such as a general-purpose processor. Optionally, at least one processor may include both a dedicated processor and a general-purpose processor. Optionally, in the case where the computing device includes at least one memory 703, the above-mentioned computer program may be stored in the memory 703.
[0145] Optionally, at least one processor 701 in the terminal device 70 is used to execute the calling computer instruction to execute Figure 3 The software upgrade method shown.
[0146] See also Figure 8 , Figure 8 80 is a schematic diagram of the structure of a server 80 provided in an embodiment of the present application. The server 80 may be an independent device (e.g., one or more of user devices, etc.), or a component inside an independent device (e.g., a chip, a software module, or a hardware module, etc.). The server 80 may include at least one processor 801. Optionally, it may also include at least one memory 803. Further optionally, the server 80 may also include a communication interface 802. Further optionally, it may also include a bus 804, wherein the processor 801, the communication interface 802, and the memory 803 are connected via the bus 804.
[0147] Among them, the processor 801 is a module that performs arithmetic operations and / or logical operations, and can specifically be a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a complex programmable logic device (CPLD), a coprocessor (assisting the central processing unit to complete corresponding processing and applications), a microcontroller unit (MCU) and other processing modules or a combination of multiple thereof.
[0148] The communication interface 802 may be used to provide information input or output for the at least one processor. And / or, the communication interface 802 may be used to receive data sent externally and / or send data externally, and may be a wired link interface including an Ethernet cable, etc., or a wireless link (Wi-Fi, Bluetooth, general wireless transmission, vehicle-mounted short-range communication technology, and other short-range wireless communication technologies, etc.) interface. Optionally, the communication interface 802 may also include a transmitter (such as a radio frequency transmitter, an antenna, etc.) coupled to the interface, or a receiver, etc.
[0149] The memory 803 is used to provide a storage space in which data such as an operating system and a computer program can be stored. The memory 803 can be a random access memory (Random Access Memory, RAM), a read-only memory (Read-only Memory, ROM), an erasable programmable read-only memory (Erasable Programmable Read-only Memory, EPROM), or a portable read-only memory (Compact Disc Read-only Memory, CD-ROM), etc., or a combination of multiple thereof.
[0150] At least one processor 801 in the server 80 is used to execute the aforementioned method, for example Figure 4 The method described in the embodiment.
[0151] Optionally, the processor 801 may be a processor specifically used to execute these methods (referred to as a dedicated processor for convenience of distinction), or may be a processor that executes these methods by calling a computer program, such as a general-purpose processor. Optionally, at least one processor may include both a dedicated processor and a general-purpose processor. Optionally, in the case where the computing device includes at least one processor 801, the above-mentioned computer program may be stored in the memory 803.
[0152] Optionally, at least one processor 801 in the server 80 is used to execute the calling computer instruction to execute Figure 4 The software upgrade method shown.
[0153] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on at least one processor, the aforementioned software upgrade method is implemented, for example Figure 3 The method described.
[0154] The present application also provides a computer program product, which includes computer instructions, and when executed by a computing device, implements the aforementioned software upgrade method, for example Figure 3 The method described.
[0155] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0156] The "at least one" mentioned in the embodiments of the present application refers to one or more, and "plurality" refers to two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, (a and b), (a and c), (b and c), or (a and b and c), where a, b, c can be single or multiple. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can be represented by: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0157] Furthermore, unless otherwise specified, the ordinal numbers such as "first" and "second" used in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects. For example, the first device and the second device are only for the convenience of description, and do not represent the difference in structure, importance, etc. between the first device and the second device. In some embodiments, the first device and the second device can also be the same device.
[0158] In the above embodiments, the term "when..." can be interpreted as meaning "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modification, equivalent substitution, improvement, etc. made within the concept and principle of the present application shall be included in the protection scope of the present application.
[0159] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0160] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A software upgrade method, characterized in that: Applied to terminal equipment, including: Upon receiving the upgrade prompt information for the target application sent by the server, downloading the upgrade configuration file; the upgrade configuration file includes the file information and reference identifier of each software function file corresponding to the upgraded version of the target application; Determining an upgrade mode of the local target application according to the upgrade configuration file, the upgrade mode including upgrading the local target application according to the upgrade package and upgrading the local target application according to the complete software package, the upgrade package including update files and newly added files, the upgrade package excluding unchanged files and deleted files, and the complete software package including all files of the upgraded version of the target application; the reference identifier is used to indicate that the corresponding file is the update file or other files, and the other files include the newly added files; Upgrading the local target application according to the determined upgrading method; The step of determining the local upgrade mode of the target application according to the upgrade configuration file includes: According to the reference identifiers of each file in the upgrade configuration file, comparing whether the file information recorded in the upgrade configuration file of the target software function file is consistent with the file information recorded in the local configuration file; the target software function file is a file characterized by the reference identifier as the other file; the local configuration file records the file information of each software function file of the target application currently installed locally; If they are consistent, the local target application is upgraded through the upgrade package; If they are inconsistent, the local target application is upgraded through the complete software package.
2. The method according to claim 1, characterized in that The comparison of whether the file information recorded in the upgrade configuration file of the target software function file is consistent with the file information recorded in the local configuration file includes: If the local configuration file lacks file information of at least one of the target software function files, it is determined that the file information of the target software function file recorded in the upgrade configuration file is inconsistent with the file information recorded in the local configuration file.
3. The method according to claim 1, characterized in that: The file information includes a file version number; whether the file information recorded in the upgrade configuration file of the comparison target software function file is consistent with the file information recorded in the local configuration file, and further includes: If there is at least one target software function file whose file version number recorded in the upgrade configuration file is inconsistent with the file version number recorded in the local configuration file, it is determined that the file information recorded in the upgrade configuration file of the target software function file is inconsistent with the file information recorded in the local configuration file.
4. The method according to claim 1, characterized in that The upgrade configuration file also includes the version number of the target application of the upgrade version, and the local configuration file includes the version number of the currently installed target application; Before determining, according to the upgrade configuration file, to upgrade the local target application through an upgrade package, or to upgrade the local target application through a complete software package, the method further includes: Determine whether the version number of the target application of the upgraded version is higher than the version number of the currently installed target application; If so, the step of determining the local upgrade mode of the target application according to the upgrade configuration file and subsequent steps are executed.
5. A software upgrade method, characterized in that: Applicable to servers, including: The server generates an upgrade package and a complete software package corresponding to the upgraded version of the target application, wherein the upgrade package includes update files and newly added files, the upgrade package does not include unchanged files and deleted files, and the complete software package includes all files of the upgraded version of the target application; The server generates an upgrade configuration file, wherein the upgrade configuration file includes file information and reference identifiers of each software function file corresponding to the target application of the upgraded version; the upgrade configuration file is used by the terminal device to decide the upgrade method of the target application locally on the terminal device, the upgrade method includes comparing, based on the reference identifiers of each file in the upgrade configuration file, whether the file information recorded in the upgrade configuration file of the target software function file is consistent with the file information recorded in the local configuration file, if they are consistent, upgrading the local target application according to the upgrade package, and if they are inconsistent, upgrading the local target application according to the complete software package, the reference identifier is used to indicate that the corresponding file is the update file or other file, the other file includes the newly added file, the target software function file is a file indicated by the reference identifier as the other file, and the local configuration file records the file information of each software function file of the target application currently installed locally; The server sends upgrade prompt information for the target application to the terminal device.
6. A software upgrade device, characterized in that: Applied to a terminal device, the software upgrade device comprises a receiving unit and an upgrade unit, wherein: The receiving unit is configured to download an upgrade configuration file upon receiving upgrade prompt information for a target application sent by a server; the upgrade configuration file includes file information and a reference identifier of each software function file corresponding to the upgraded version of the target application; determine an upgrade method of the local target application according to the upgrade configuration file, the upgrade method including upgrading the local target application according to an upgrade package and upgrading the local target application according to a complete software package, the upgrade package including update files and newly added files, the upgrade package not including unchanged files and deleted files, and the complete software package including all files of the upgraded version of the target application; the reference identifier is used to indicate that the corresponding file is the update file or other files, and the other files include the newly added files; The upgrading unit is used to upgrade the local target application according to the determined upgrading method; In the aspect of determining the upgrade mode of the local target application according to the upgrade configuration file, the receiving unit is specifically used for: According to the reference identifiers of each file in the upgrade configuration file, comparing whether the file information recorded in the upgrade configuration file of the target software function file is consistent with the file information recorded in the local configuration file; the target software function file is a file characterized by the reference identifier as the other file; the local configuration file records the file information of each software function file of the target application currently installed locally; If they are consistent, the local target application is upgraded through the upgrade package; If they are inconsistent, the local target application is upgraded through the complete software package.
7. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is used to store computer instructions, and the processor is used to call the computer instructions to implement the method according to any one of claims 1 to 4 or the method according to claim 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on at least one processor, the method according to any one of claims 1 to 4 or the method according to claim 5 is implemented.
Citation Information
Patent Citations
Operating system upgrading method and device
CN102541596A
Software updating method and equipment
CN103699408A
XML based software upgrade file configuration method
CN105224344A
Method and system for upgrading Android software
CN106528086A
Application program upgrading method and device, mobile terminal and storage medium
CN108509211A
