Module updating method and device, terminal equipment and computer readable storage medium
Through interface information checksum compatibility detection, the compatibility problem during module update process is solved, ensuring the stability of the operating system and the success of the update.
Patent Information
- Application Number
- CN202510316692.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-07-11
AI Technical Summary
Traditional operating systems are prone to compatibility problems during module updates, resulting in system exceptions.
By obtaining the interface information of the module to be updated, the interface checksum compatibility detection is performed to ensure that the upgraded data packet is compatible with the target operating system before the update is performed.
It avoids compatibility issues during module update process, reduces the possibility of system exceptions, and ensures the stability of the update process.
Smart Images

Figure CN120295650A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technologies, and particularly to a method, device, terminal device, and computer-readable storage medium for module update. Background Art
[0002] Traditional operating systems achieve system upgrades by updating system images. With the development of technologies, it has been possible to support the operating system to be updated by modules. For example, some modules in the system can be updated while other modules remain unchanged, so that the functions within the modules are updated through the module updates.
[0003] Since the image files for update and the updatable modules are independently updated, it is easy to have the problem that the modules are not compatible with the current operating system, thus leading to system anomalies. Summary of the Invention
[0004] This application provides a method for module update, which can avoid compatibility problems during module update.
[0005] In a first aspect, this application provides a method for module update, the method including:
[0006] Obtaining first interface information and second interface information of a module upgrade package corresponding to a module to be updated;
[0007] Determining whether the upgrade data packet is compatible with a target operating system according to the first interface information and the second interface information;
[0008] If the upgrade data packet is compatible with the target operating system, performing an update process on the module to be updated according to the module upgrade package.
[0009] In some embodiments of this application, the determining whether the upgrade data packet is compatible with a target operating system according to the first interface information and the second interface information includes:
[0010] Obtaining third interface information of the module to be updated;
[0011] Performing an interface check on the first interface information based on the third interface information to obtain first check result information;
[0012] Determining whether the upgrade data packet is compatible with a target operating system based on the first check result information and the second interface information.
[0013] In some embodiments of this application, the determining whether the upgrade data packet is compatible with a target operating system based on the first check result information and the second interface information includes:
[0014] If the first verification result information is the first result information, obtain the fourth interface information corresponding to the first module and the fifth interface information corresponding to the second module in the target operating system; the first result information indicates that the verification of the first interface information passes, the first module is a module in the target operating system that cannot be upgraded, and the second module is other upgradable modules in the target operating system except the module to be upgraded;
[0015] Perform a verification process on the second interface information based on the fourth interface information and the fifth interface information to obtain second verification result information;
[0016] Based on the second verification result information, determine whether the upgrade data packet is compatible with the target operating system.
[0017] In some embodiments of the present application, the performing an interface verification on the first interface information based on the third interface information to obtain first verification result information includes:
[0018] Perform an intersection operation on the third interface information and the first interface information to obtain sixth interface information;
[0019] If the sixth interface information is exactly the same as the third interface information, determine that the first verification result information is the first result information;
[0020] If the sixth interface information is not exactly the same as the third interface information, determine that the first verification result information is the second result information; the second result information indicates that the verification of the first interface information fails.
[0021] In some embodiments of the present application, the performing a verification process on the second interface information based on the fourth interface information and the fifth interface information to obtain second verification result information includes:
[0022] Perform a union operation on the fourth interface information and the fifth interface information to obtain seventh interface information;
[0023] Perform an intersection operation on the seventh interface information and the second interface information to obtain eighth interface information;
[0024] If the eighth interface information is exactly the same as the second interface information, determine that the second verification result information is the third result information; the third result information indicates that the verification of the second interface information passes;
[0025] If the eighth interface information is not exactly the same as the second interface information, determine that the second verification result information is the fourth result information; the fourth result information indicates that the verification of the second interface information fails.
[0026] In some embodiments of the present application, determining whether the upgrade data packet is compatible with the target operating system based on the second verification result information includes:
[0027] If the second verification result information is the third result information, determining that the upgrade data packet is compatible with the target operating system; the third result information indicates that the verification of the second interface information passes;
[0028] If the second verification result information is the fourth result information, determining that the upgrade data packet is not compatible with the target operating system; the fourth result information indicates that the verification of the second interface information fails.
[0029] In some embodiments of the present application, after determining whether the upgrade data packet is compatible with the target operating system according to the first interface information and the second interface information, the method further includes:
[0030] If the upgrade data packet is not compatible with the target operating system, intercepting and processing the module upgrade package.
[0031] In a second aspect, the present application further provides a module update device, which includes:
[0032] An acquisition unit, configured to acquire the first interface information and the second interface information of a module upgrade package corresponding to a module to be updated;
[0033] A determination unit, configured to determine whether the upgrade data packet is compatible with the target operating system according to the first interface information and the second interface information;
[0034] A processing unit, configured to, if the upgrade data packet is compatible with the target operating system, perform update processing on the module to be updated according to the module upgrade package.
[0035] In a third aspect, the present application further provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps in any one of the module update methods.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the steps in any one of the module update methods.
[0037] The module update method provided by this application determines whether the upgrade data packet is compatible with the target operating system through the first interface information and the second interface information after obtaining the first interface information and the second interface information of the module upgrade package corresponding to the module to be updated. If it is determined that the upgrade data packet is compatible with the target operating system, the module to be updated can be updated to avoid compatibility problems that may cause the system to malfunction. Brief Description of the Drawings
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0039] Figure 1 is a schematic diagram of the scenario of the module update system provided in the embodiment of this application;
[0040] Figure 2 is a schematic flowchart of an embodiment of the module update method in the embodiment of this application;
[0041] Figure 3 is a schematic diagram of a functional module of the module update device in the embodiment of this application;
[0042] Figure 4 is a schematic diagram of the structure of the terminal device in the embodiment of this application. Detailed Embodiments
[0043] The following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the drawings in the embodiments of this application. Obviously, the described embodiments are only some embodiments of this application, rather than all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative efforts fall within the scope of protection of this application.
[0044] In the description of this application, it should be understood that the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of this application, "a plurality" means two or more, unless otherwise specifically defined.
[0045] In this application, the term "exemplary" is used to mean "serving as an example, illustration, or instance". Any embodiment described as "exemplary" in this application is not necessarily to be construed as more preferred or advantageous than other embodiments. At the same time, it can be understood that in the specific implementation of this application, regarding relevant data such as user information and user data, when the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0046] The following description is provided to enable any person skilled in the art to make and use this application. In the following description, details are set forth for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that this application can be implemented without these specific details. In other instances, well-known structures and processes are not elaborated in detail to avoid obscuring the description of this application with unnecessary details. Therefore, this application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed in this application.
[0047] This application provides a module update method, apparatus, device, and storage medium, which will be described in detail below.
[0048] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the scenario of the module update system provided by the embodiment of this application. The module update system may include a terminal device 100 and a server 200, and the server 200 can transmit data to the terminal device 100. As Figure 1 the terminal device 100 in
[0049] can obtain the module upgrade package sent by the server 200 to execute the module update method in this application.
[0050] In the embodiment of this application, the terminal device 100 may include, but is not limited to, a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a tablet computer, a wireless terminal device, an embedded device, etc.
[0051] In an embodiment of the present application, the terminal device 100 and the server 200 can communicate with each other through any communication method, including but not limited to, mobile communication based on the 3rd Generation Partnership Project (3GPP), Long Term Evolution (LTE), Worldwide Interoperability for Microwave Access (WiMAX), or computer network communication based on the TCP / IP Protocol Suite (TCP / IP), User Datagram Protocol (UDP), etc.
[0052] It should be noted that Figure 1 The schematic diagram of the scenario of the module update system shown is only an example. The module update system and scenario described in the embodiments of the present application are for more clearly explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those of ordinary skill in the art can know that with the evolution of the module update system and the emergence of new service scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
[0053] As Figure 2 shown, Figure 2 It is a schematic flowchart of an embodiment of the module update method in the embodiments of the present application. The module update method may include the following steps 201 to 203:
[0054] 201. Obtain the first interface information and the second interface information of the module upgrade package corresponding to the module to be updated.
[0055] In an embodiment of the present application, the terminal device may include multiple modules, and each module is used for different functions. In actual situations, the terminal device can communicate and connect with the server through the network. The server can detect the version information of each module in the terminal device to determine whether the module needs to be upgraded. If there is a module that needs to be upgraded in the terminal device, the server can send an upgrade prompt message to the terminal device to prompt the user whether to choose to upgrade. In the case where the user chooses to upgrade, the terminal device can request the server to download the module upgrade package corresponding to the module to be updated. When the download of the module upgrade package is completed, the upgrade package corresponding to the module to be updated can be obtained.
[0056] It should be noted that when data interacts with the system of the device, it does so through interface information. In other words, in the embodiments of the present application, there is also interface information for interaction between the module upgrade package and the system of the terminal device. When the interface information does not match, data interaction will be abnormal, and incompatibility issues will occur between the system of the terminal device and the upgrade package.
[0057] Based on this, after obtaining the module upgrade package, the module upgrade package can be parsed to obtain the interface information included in the module upgrade package. Among them, the first interface information can be the interface information that the module upgrade package can provide, which can be named the first provide interface information. The first interface information is used to be provided to the system of the terminal device, and the system can verify this first interface information; the second interface information can be the interface information required by the upgrade package, which can be named the first require interface information. The second interface information can request the system to provide the corresponding interface information for the module upgrade package to verify.
[0058] 202. Determine whether the upgrade data packet is compatible with the target operating system according to the first interface information and the second interface information.
[0059] According to the above steps, after obtaining the first interface information and the second interface information of the module upgrade package, verification can be performed according to the interface information. At this time, after the module upgrade package provides the first interface information, the system of the terminal device can detect according to the first interface information provided by the module upgrade package to determine whether the system requires the first interface information provided by the module upgrade package. For example: If the module upgrade package can provide the first interface information A, and the system also requires the first interface information A, it can be proved at this time that the first interface information provided by the module upgrade package is valid. At the same time, the module upgrade package can also request the system for the second interface information. If the system can provide the corresponding second interface information, it can be determined that the second interface information is valid. For example: If the module upgrade package requests the second interface information A, and the system can also provide the second interface information A at this time, the verification of the second interface information is completed at this time.
[0060] Based on this, when the verification of both the first interface information and the second interface information is completed, it proves that the update data can interact through the interface information. When the interface information is correct, the module upgrade package will not cause compatibility problems.
[0061] 203. If the upgrade data packet is compatible with the target operating system, update the module to be updated according to the module upgrade package.
[0062] After completing the compatibility detection by verifying the interface information, if the module upgrade package is compatible with the current target operating system of the terminal device, the terminal device can decompress the module upgrade package and execute the installation program to complete the update of the module to be updated. The specific update method can refer to any technology, and the embodiments of the present application will not elaborate on it.
[0063] For the module update method provided by the present application, after obtaining the first interface information and the second interface information of the module upgrade package corresponding to the module to be updated, it is determined whether the upgrade data packet is compatible with the target operating system through the first interface information and the second interface information. If it is determined that the upgrade data packet is compatible with the target operating system, the module to be updated can be updated to avoid compatibility problems and system anomalies.
[0064] In order to better implement the embodiments of the present application, in one embodiment of the present application, determining whether the upgrade data packet is compatible with the target operating system according to the first interface information and the second interface information includes:
[0065] Obtain the third interface information of the module to be updated; perform interface verification on the first interface information based on the third interface information to obtain the first verification result information; determine whether the upgrade data packet is compatible with the target operating system based on the first verification result information and the second interface information.
[0066] The above embodiments provide a method according to the first interface information and the second interface information of the module to be updated. In order to further improve the detection effect of compatibility, the embodiments of the present application also provide a solution for verification according to the third interface information of the module to be updated.
[0067] Among them, in the embodiments of the present application, the third interface information of the module to be updated is introduced to perform interface verification with the first interface information first. Since there are also certain differences between the module itself and the system, if the interface information of the module to be updated can match the interface information of the update package, it means that there is no compatibility problem between the update package and the module to be updated. Specifically, the third interface information of the module to be updated can be the interface information that the module to be updated itself can provide, which can be denoted as the second provide interface information. After obtaining the upgrade data packet of the module to be updated, the third interface information that the module to be updated can provide can be parsed, and the third interface information is compared with the first interface information to obtain the first verification result information. If the first verification result information indicates that the third interface information is the same as the first interface information, it proves that there is the same interface information, and there is no compatibility problem between the module to be updated and the upgrade data packet.
[0068] On this basis, by performing the same interface verification as in the above embodiments using the second interface information and the first interface information, it can be further verified that there is no compatibility between the upgrade data packet and the system.
[0069] Through two - stage verification, it is possible to further ensure that there are no compatibility issues and further reduce the possibility of anomalies occurring after the upgrade.
[0070] In order to better implement the embodiments of the present application, in one embodiment of the present application, based on the first verification result information and the second interface information, determining whether the upgrade data packet is compatible with the target operating system includes:
[0071] If the first verification result information is the first result information, obtain the fourth interface information corresponding to the first module and the fifth interface information corresponding to the second module in the target operating system; the first result information indicates that the verification of the first interface information passes, the first module is a module in the target operating system that cannot be upgraded, and the second module is other upgradable modules in the target operating system except the module to be upgraded; perform verification processing on the second interface information based on the fourth interface information and the fifth interface information to obtain the second verification result information; based on the second verification result information, determine whether the upgrade data packet is compatible with the target operating system.
[0072] Based on the above - mentioned embodiment's compatibility verification solution, the embodiments of the present application also provide a better compatibility verification solution.
[0073] In actual situations, in addition to the module to be updated in the system, there are also non - updated modules. For example, if the module to be updated is module A, there is also a module B that cannot be updated, that is, the first module; and a module C that does not need to be updated currently, that is, the second module. The first module, the second module, and the module to be updated are all part of the system. Therefore, in order to further ensure that the upgrade data packet will not affect the compatibility of other modules in the system, the embodiments of the present application can also verify the interface information of other modules. It should be noted that the number of the first module and the second module can be multiple.
[0074] Among them, the first result information can be understood as the result information passing the first verification, that is, the third interface information is the same as the first interface information. At this time, parse the interface information of the first module and the second module to obtain the fourth interface information corresponding to the first module, which can be denoted as the third provide interface information; and the fifth interface information corresponding to the second module, denoted as the fourth provide interface information. At this time, it can be detected whether the second interface information is the same as the fourth interface information and the fifth interface information respectively to obtain the second verification result information. If they are the same respectively, it is determined that the second verification result information passes the inspection. Then, combined with the implementation method in the above - mentioned embodiment, it is possible to determine whether the upgrade data packet will cause compatibility problems for each module in the system.
[0075] In order to better implement the embodiments of the present application, in one embodiment of the present application, performing interface verification on the first interface information based on the third interface information to obtain the first verification result information includes:
[0076] Perform an intersection operation on the third interface information and the first interface information to obtain the sixth interface information; if the sixth interface information is exactly the same as the third interface information, determine that the first verification result information is the first result information; if the sixth interface information is not exactly the same as the third interface information, determine that the first verification result information is the second result information; the second result information indicates that the verification of the first interface information fails.
[0077] The above embodiment provides a method for verification by detecting whether the third interface information is the same as the first interface information. However, in actual situations, if the third interface information can be found in the first interface information, that is, if an intersection operation is performed on the third interface information and the first interface information, and the obtained sixth interface information indicates that the third interface information belongs to the first interface information, then it can still be determined that the first verification result information is the first result information indicating successful verification. The specific reason is that new functions may be added to the data upgrade package, and the new functions can correspond to new call interfaces. And the upgrade data package also includes the original interface information, that is, it also includes the third interface information of the module to be updated, which proves that the upgrade data package can still match the module to be updated, so there is still no compatibility problem.
[0078] On the contrary, if the obtained sixth interface information is not exactly the same as the third interface information, it means that the original interface information in the upgrade data package is not exactly the same as the interface information of the module to be updated, and there is a compatibility problem at this time.
[0079] To better implement the embodiments of the present application, in one embodiment of the present application, the second interface information is verified based on the fourth interface information and the fifth interface information to obtain the second verification result information, including:
[0080] Perform a union operation on the fourth interface information and the fifth interface information to obtain the seventh interface information; perform an intersection operation on the seventh interface information and the second interface information to obtain the eighth interface information; if the eighth interface information is exactly the same as the second interface information, determine that the second verification result information is the third result information; the third result information indicates that the verification of the second interface information passes; if the eighth interface information is not exactly the same as the second interface information, determine that the second verification result information is the fourth result information; the fourth result information indicates that the verification of the second interface information fails.
[0081] Similarly, the above embodiment provides a method for verification by detecting whether the fourth interface information and the fifth interface information are the same as the second interface information respectively. However, in actual situations, a union operation can be performed on the fourth interface information and the fifth interface information to obtain the seventh interface information. If the second interface information can be found in the seventh interface information, that is, if an intersection operation is performed on the second interface information and the seventh interface information and the resulting eighth interface information indicates that the second interface information belongs to the seventh interface information, then it can still be determined that the second verification result information is the third result information that passes the verification. The specific reason is that since there are multiple non-update modules, if the required interface information corresponding to the data upgrade package does not come from the same non-update module but from different modules, it means that different modules can be called separately to cooperate with the corresponding functions in the upgrade data package, so there is no compatibility problem either.
[0082] Conversely, if the obtained eighth interface information is not exactly the same as the second interface information, it means that the original interface information in the upgrade data package is not exactly the same as the interface information of the non-update module. At this time, there are new functions that need to call modules that do not exist in the system for task cooperation, so there is a compatibility problem.
[0083] To better implement the embodiments of the present application, in an embodiment of the present application, based on the second verification result information, determining whether the upgrade data package is compatible with the target operating system includes:
[0084] If the second verification result information is the third result information, it is determined that the upgrade data package is compatible with the target operating system; the third result information indicates that the second interface information passes the verification; if the second verification result information is the fourth result information, it is determined that the upgrade data package is not compatible with the target operating system; the fourth result information indicates that the second interface information fails the verification.
[0085] Based on the above embodiment, it can be obtained that the third result information is the result of passing the verification in the second verification result. Therefore, there is also the fourth result information that fails the verification in the second verification result. After obtaining the fourth result information, it is only necessary to determine that the second verification fails and determine that there is a compatibility problem. The specific details will not be elaborated here.
[0086] To better implement the embodiments of the present application, in an embodiment of the present application, after determining whether the upgrade data package is compatible with the target operating system according to the first interface information and the second interface information, the method further includes:
[0087] If the upgrade data package is not compatible with the target operating system, intercept the module upgrade package.
[0088] Based on the above embodiments, if any incompatible result information is obtained, the update can be intercepted. The specific interception method can refer to any technology, and the embodiments of the present application do not limit it.
[0089] To better implement the module update method in the embodiments of the present application, on top of the module update method, the embodiments of the present application also provide a module update device, as Figure 3 shown. The device 300 includes:
[0090] An acquisition unit 301, configured to acquire first interface information and second interface information of a module upgrade package corresponding to a module to be updated;
[0091] A determination unit 302, configured to determine whether an upgrade data packet is compatible with a target operating system according to the first interface information and the second interface information;
[0092] A processing unit 303, configured to, if the upgrade data packet is compatible with the target operating system, perform an update process on the module to be updated according to the module upgrade package.
[0093] The module update device provided by the present application can, after the acquisition unit 301 acquires the first interface information and the second interface information of the module upgrade package corresponding to the module to be updated, enable the determination unit 302 to determine whether the upgrade data packet is compatible with the target operating system through the first interface information and the second interface information. If it is determined that the upgrade data packet is compatible with the target operating system, the processing unit 303 can perform an update process on the module to be updated, avoiding compatibility problems that may cause the system to malfunction.
[0094] In some embodiments of the present application, the determination unit 302 is specifically configured to:
[0095] Acquire third interface information of the module to be updated;
[0096] Perform interface verification on the first interface information based on the third interface information to obtain first verification result information;
[0097] Determine whether the upgrade data packet is compatible with the target operating system based on the first verification result information and the second interface information.
[0098] In some embodiments of the present application, the determination unit 302 is further specifically configured to:
[0099] If the first verification result information is the first result information, acquire fourth interface information of a first module in the target operating system and fifth interface information of a second module; the first result information indicates that the first interface information passes the verification, the first module is a module in the target operating system that cannot be upgraded, and the second module is other modules in the target operating system that can be upgraded except the module to be upgraded;
[0100] Verify the second interface information based on the fourth interface information and the fifth interface information to obtain the second verification result information;
[0101] Based on the second verification result information, determine whether the upgrade data packet is compatible with the target operating system.
[0102] In some embodiments of the present application, the determining unit 302 is specifically further configured to:
[0103] Perform an intersection operation on the third interface information and the first interface information to obtain the sixth interface information;
[0104] If the sixth interface information is exactly the same as the third interface information, determine that the first verification result information is the first result information;
[0105] If the sixth interface information is not exactly the same as the third interface information, determine that the first verification result information is the second result information; the second result information indicates that the verification of the first interface information fails.
[0106] In some embodiments of the present application, the determining unit 302 is specifically further configured to:
[0107] Perform a union operation on the fourth interface information and the fifth interface information to obtain the seventh interface information;
[0108] Perform an intersection operation on the seventh interface information and the second interface information to obtain the eighth interface information;
[0109] If the eighth interface information is exactly the same as the second interface information, determine that the second verification result information is the third result information; the third result information indicates that the verification of the second interface information passes;
[0110] If the eighth interface information is not exactly the same as the second interface information, determine that the second verification result information is the fourth result information; the fourth result information indicates that the verification of the second interface information fails.
[0111] In some embodiments of the present application, the determining unit 302 is specifically further configured to:
[0112] If the second verification result information is the third result information, determine that the upgrade data packet is compatible with the target operating system; the third result information indicates that the verification of the second interface information passes;
[0113] If the second verification result information is the fourth result information, determine that the upgrade data packet is not compatible with the target operating system; the fourth result information indicates that the verification of the second interface information fails.
[0114] In some embodiments of the present application, the processing unit 303 is specifically further configured to:
[0115] If the upgrade data packet is not compatible with the target operating system, intercept the module upgrade packet.
[0116] An embodiment of the present application further provides a terminal device. The terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the steps in the module update method according to any one of the embodiments of the present application. Among them, the terminal device integrates any one of the module update methods provided by the embodiments of the present application, such as Figure 4 shown, which shows a schematic structural diagram of the terminal device involved in the embodiments of the present application. Specifically:
[0117] The terminal device may include a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, an input unit 404, and other components. Those skilled in the art can understand that Figure 4 the structure of the terminal device shown in does not constitute a limitation on the terminal device, and it may include more or fewer components than shown in the figure, or combine some components, or arrange different components. Among them:
[0118] The processor 401 is the control center of the terminal device, connecting various parts of the entire terminal device through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, it executes various functions of the terminal device and processes data, thereby monitoring the terminal device as a whole. Optionally, the processor 401 may include one or more processing cores; the processor 401 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Preferably, the processor 401 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 401 either.
[0119] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the terminal device. In addition, the memory 402 can include high-speed random access memory and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 402 can also include a memory controller to provide the processor 401 with access to the memory 402.
[0120] The terminal device also includes a power supply 403 for powering each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
[0121] The terminal device can also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0122] Although not shown, the terminal device can also include a display unit, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 401 in the terminal device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402 to implement various functions, such as:
[0123] Obtain the first interface information and the second interface information of the module upgrade package corresponding to the module to be updated;
[0124] Determine whether the upgrade data packet is compatible with the target operating system according to the first interface information and the second interface information;
[0125] If the upgrade data packet is compatible with the target operating system, update the module to be updated according to the module upgrade package.
[0126] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware through instructions. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0127] For this reason, an embodiment of the present application provides a computer-readable storage medium, which may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), a magnetic disk, an optical disc, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any one of the module update methods provided by the embodiments of the present application. For example, when the computer program is loaded by the processor, the following steps may be executed:
[0128] Obtain the first interface information and the second interface information of the module upgrade package corresponding to the module to be updated;
[0129] Determine whether the upgrade data packet is compatible with the target operating system according to the first interface information and the second interface information;
[0130] If the upgrade data packet is compatible with the target operating system, update the module to be updated according to the module upgrade package.
[0131] In the above embodiments, the descriptions of the respective embodiments have their own focuses. For parts not detailed in a certain embodiment, reference may be made to the detailed descriptions of other embodiments above, and details will not be repeated here.
[0132] In specific implementation, the above-mentioned units or structures can be implemented as independent entities, or can be combined arbitrarily to be implemented as the same or several entities. The specific implementation of the above-mentioned units or structures can refer to the method embodiments above, and details will not be repeated here.
[0133] The specific implementation of each of the above operations can refer to the previous embodiments, and details will not be repeated here.
[0134] The above has introduced in detail a module update method and device provided by an embodiment of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A module update method, characterized in that, The method includes: Obtaining first interface information and second interface information of a module upgrade package corresponding to a module to be updated; Determining whether the upgrade data packet is compatible with the target operating system according to the first interface information and the second interface information; If the upgrade data packet is compatible with the target operating system, updating the module to be updated according to the module upgrade package.
2. The module update method according to claim 1, wherein The determining whether the upgrade data packet is compatible with the target operating system according to the first interface information and the second interface information includes: Obtaining third interface information of the module to be updated; Performing interface verification on the first interface information based on the third interface information to obtain first verification result information; Determining whether the upgrade data packet is compatible with the target operating system based on the first verification result information and the second interface information.
3. The module update method according to claim 2, characterized in that The determining whether the upgrade data packet is compatible with the target operating system based on the first verification result information and the second interface information includes: If the first verification result information is first result information, obtaining fourth interface information of a first module and fifth interface information of a second module in the target operating system; the first result information indicates that the verification of the first interface information passes, the first module is a module in the target operating system that cannot be upgraded, and the second module is other upgradeable modules in the target operating system except the module to be upgraded; Performing verification processing on the second interface information based on the fourth interface information and the fifth interface information to obtain second verification result information; Determining whether the upgrade data packet is compatible with the target operating system based on the second verification result information.
4. The module update method according to claim 2, characterized in that The performing interface verification on the first interface information based on the third interface information to obtain first verification result information includes: Performing an intersection operation on the third interface information and the first interface information to obtain sixth interface information; If the sixth interface information is exactly the same as the third interface information, determining that the first verification result information is first result information; If the sixth interface information is not exactly the same as the third interface information, determining that the first verification result information is second result information; the second result information indicates that the verification of the first interface information fails.
5. The module update method according to claim 3, characterized in that The performing verification processing on the second interface information based on the fourth interface information and the fifth interface information to obtain second verification result information includes: Performing a union operation on the fourth interface information and the fifth interface information to obtain seventh interface information; Performing an intersection operation on the seventh interface information and the second interface information to obtain eighth interface information; If the eighth interface information is exactly the same as the second interface information, determining that the second verification result information is third result information; the third result information indicates that the verification of the second interface information passes; If the eighth interface information is not exactly the same as the second interface information, determining that the second verification result information is fourth result information; the fourth result information indicates that the verification of the second interface information fails.
6. The module update method according to claim 3, wherein Determining whether the upgrade data packet is compatible with the target operating system based on the second verification result information includes: If the second verification result information is the third result information, determining that the upgrade data packet is compatible with the target operating system; the third result information indicates that the verification of the second interface information passes; If the second verification result information is the fourth result information, determining that the upgrade data packet is not compatible with the target operating system; the fourth result information indicates that the verification of the second interface information fails.
7. The module update method according to claim 1, wherein After determining whether the upgrade data packet is compatible with the target operating system according to the first interface information and the second interface information, the method further includes: If the upgrade data packet is not compatible with the target operating system, intercepting the module upgrade package.
8. A module update device, characterized in that, The device includes: An acquisition unit, configured to acquire first interface information and second interface information of a module upgrade package corresponding to a module to be updated; A determination unit, configured to determine whether the upgrade data packet is compatible with the target operating system according to the first interface information and the second interface information; A processing unit, configured to, if the upgrade data packet is compatible with the target operating system, update the module to be updated according to the module upgrade package.
9. A terminal device, characterized in that, The terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps in the module update method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and the computer program is executed by the processor to implement the steps in the module update method according to any one of claims 1 to 7.