Application updating method, file package generation method and electronic equipment
By automatically updating other applications that a user depends on when updating one application, the cumbersome application update process in existing technologies is solved, improving user experience and device efficiency.
Patent Information
- Application Number
- CN202411118851.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, after an application software is updated, users need to manually update multiple dependent applications, which leads to cumbersome operations and a reduced user experience.
When a user updates an application, other applications that the application depends on are automatically updated to ensure that all dependent applications are up to date, thus enabling multiple applications to be updated at once.
It improves the reliability of application functions and user experience, reduces the tediousness of manual operation, and enhances the efficiency of electronic devices.
Smart Images

Figure CN121635939A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of electronic devices, and in particular, to an application updating method, a file package generating method, and an electronic device. BACKGROUND
[0002] At present, electronic devices can realize more and more rich functions, greatly facilitating people's work and life. In order to meet the user's constantly updated needs and repair the existing problems, the application software will be upgraded and updated after a period of time. The version of the application software after the update will have better performance and more functions than the original version, and the optimized application software can also provide better experience for users.
[0003] However, there are some problems that the application software after the update cannot use all the functions. SUMMARY
[0004] The embodiments of the present application provide an application updating method, a file package generating method, and an electronic device, which are used to improve the reliability of application internal function use after the application is updated.
[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, an application updating method is provided. The application updating method is applied to an electronic device. The method comprises: in response to an update instruction for a first application, the electronic device updates the first application and a second application. At least one function in the first application depends on the second application.
[0007] In the present application, when a user updates an application, other applications dependent on the application are also updated. In this way, the user can complete the update of multiple applications through one manual update of the application, and can experience the new functions of the updated application, thereby improving the reliability of application function use and improving the user experience.
[0008] In some possible implementation manners of the first aspect, the electronic device updates the first application and the second application, comprising: the electronic device updates the first application. The electronic device extracts dependency information from the process of updating the first application; the dependency information comprises identification data of the second application. The electronic device updates the second application.
[0009] In the present embodiment, the electronic device can obtain the identification information of the second application during the updating of the first application, which can enable the electronic device to accurately obtain the identification information of the second application, and can improve the accuracy of the updating of the second application by the electronic device.
[0010] In some feasible embodiments of the first aspect, updating the second application by the electronic device includes: the electronic device launching the updated first application in response to a launch command for the updated first application; the updated first application acquiring dependency information; and the updated first application sending an update command for the second application to an application market application, so that the application market application updates the second application.
[0011] In this embodiment, updating the second application only after the user launches the updated first application avoids wasting user data by updating the second application when the first application is being updated but the user doesn't need to use it. Updating the second application only when the user launches the first application ensures the reliability of the first application's functionality and improves the user experience.
[0012] In some feasible implementations of the first aspect, the dependency information also includes version data of the second application. Updating the second application by the electronic device includes: the electronic device checking the dependency information of the second application and obtaining a check result. If the check result indicates that the version data of the second application is lower than the version data dependent on by the updated first application, the electronic device updates the second application.
[0013] If the version data of the second application currently installed on the electronic device is equal to or higher than the version data that the updated first application depends on, the second application currently installed on the electronic device can support the new features of the first application. In this case, there is no need to update the second application.
[0014] An update to the second application is only necessary if the version of the second application currently installed on the electronic device is lower than the version of the first application after the update. In such cases, the second application cannot support the new features of the first application.
[0015] In this embodiment, by comparing the version data of the second application currently installed on the electronic device with the version data that the updated first application depends on, unnecessary updates to the second application can be avoided and the load on the electronic device can be reduced if the version data of the second application currently installed on the electronic device is equal to or higher than the version data that the updated first application depends on.
[0016] In some feasible implementations of the first aspect, if the check result indicates that the version data of the second application is lower than the version data on which the updated first application depends, the electronic device updates the second application, including: displaying an update confirmation window to prompt the user to update the second application. In response to an update instruction for the second application, the electronic device updates the second application.
[0017] This update confirmation window prompts the user that upgrading the second application is required to use some functions of the first application. After seeing the update confirmation window, the user can manually launch the app store application on their electronic device and initiate the update command for the second application through the app store application.
[0018] In this embodiment, by displaying an update confirmation window, users can choose whether to update the video editing application and the smart vision application, avoiding the problems caused by automatic updates on the phone and improving the user experience.
[0019] In some feasible implementations of the first aspect, updating the second application by the electronic device includes: updating the second application to the latest version.
[0020] Typically, a newer version of an application will override the functionality of the older version. In other words, the newer version will have all the features of the older version, and may also have additional features. Thus, a second application, which is actually a newer version than the second application in the dependency information, can also be depended upon by the first application, enabling the first application to perform all its functions.
[0021] In addition, updating the second application to the latest version can reduce the need for subsequent updates to the second application, avoid multiple updates to the second application, and improve the efficiency of electronic devices.
[0022] In some feasible implementations of the first aspect, the dependency information also includes the dependency type corresponding to the second application. Updating the second application by the electronic device includes: the electronic device checking the dependency information of the second application and obtaining a check result. If the check result indicates that the dependency type between the first application and the second application is a necessary dependency type, the electronic device updates the second application.
[0023] In this embodiment, by adding a judgment on whether the dependency type between the first application and the second application is a necessary dependency, unnecessary updates to the second application are avoided when the dependency type between the first application and the second application is a non-necessary dependency, thereby reducing the load on the electronic device.
[0024] Secondly, a method for generating a file package is provided. This method includes: obtaining the base code file of a first application, which includes dependencies; using a preset matching library to convert the dependencies in the base code file into dependency information, which includes the identifier data of a second application; and generating an application package for the first application, which includes the dependency information.
[0025] The application package generation method described in this application generates an installation package containing dependency information for the new version of the application. This allows electronic devices to accurately update the second applications that the first application depends on after installing the new version, enabling users to experience the new features of the new version of the application and improving the user experience.
[0026] In some feasible implementations of the second aspect, the dependency information also includes at least one of the version data of the second application and the dependency type of the first application on the second application.
[0027] In some feasible implementations of the second aspect, the dependencies include dependency library information of the first application. The matching library includes the mapping relationship between libraries and applications. Converting the dependencies in the base code file into dependency information includes: obtaining the dependency library information of the first application; determining at least one piece of second application information that has a mapping relationship with the dependency library information from the matching library; and generating dependency information, which includes the mapping relationship between the first application and the second application information.
[0028] Thirdly, an electronic device is provided. The electronic device includes a memory and one or more processors. The memory is coupled to the processors. Computer program code, including computer instructions, is stored in the memory. When the computer instructions are executed by the processor, the electronic device performs the methods described in any of the first aspects.
[0029] The beneficial effects of the third aspect can be referenced from the beneficial effects of the working method of the RF chip in any of the first aspects, and will not be elaborated here.
[0030] Fourthly, a computer-readable storage medium is provided. The computer-readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any of the first aspects; or, to perform the method as described in any of the second aspects.
[0031] The beneficial effects of the third and fourth aspects can be referenced from the beneficial effects of the working method of the RF chip in any of the first aspects, and will not be elaborated here. Attached Figure Description
[0032] Figure 1 A schematic diagram of the interface for displaying the desktop on an electronic device;
[0033] Figure 2 This is a schematic diagram of the interface for an app store application.
[0034] Figure 3 A diagram illustrating how one application depends on two other applications;
[0035] Figure 4This is a diagram illustrating the update relationships among multiple applications in the app store.
[0036] Figure 5 This diagram illustrates three update scenarios for application A, application B, and application C.
[0037] Figure 6 This is a logical schematic diagram illustrating the application of the update method in some embodiments of this application;
[0038] Figure 7 This is a logical schematic diagram illustrating the application of the update method in some other embodiments of this application;
[0039] Figure 8 A logical schematic diagram of a file package generation method provided for some embodiments of this application;
[0040] Figure 9 This is a mapping diagram between some function libraries and applications in the matching library;
[0041] Figure 10 This is a diagram showing the relationship between dependent applications, function libraries, and dependent applications in some embodiments of this application;
[0042] Figure 11 This is a schematic diagram of the structure of an electronic device in some embodiments of this application. Detailed Implementation
[0043] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application are within the scope of protection of this application.
[0044] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this application, unless otherwise stated, "a plurality of" means two or more.
[0045] Furthermore, in this application, directional terms such as "upper," "lower," "left," and "right" may be defined relative to the orientation of the components shown in the accompanying drawings. It should be understood that these directional terms can be relative concepts, used for relative description and clarification, and may change accordingly depending on the orientation of the components in the accompanying drawings.
[0046] In describing some embodiments, the terms "connected," "linked," and their derivative expressions may be used. For example, the term "connected" may be used to indicate that two or more components are in direct or indirect physical contact with each other. For example, "A and B are connected" can mean that A and B are connected directly, or it can mean that A and B are connected through other components. Furthermore, the term "coupled" can refer to an electrical connection that enables signal transmission; coupling can indicate direct coupling or indirect coupling.
[0047] "At least one of A, B and C" has the same meaning as "at least one of A, B or C", both including the following combinations of A, B and C: only A, only B, only C, combinations of A and B, combinations of A and C, combinations of B and C, and combinations of A, B and C.
[0048] "A and / or B" includes the following three combinations: A only, B only, and a combination of A and B.
[0049] As used herein, “about,” “approximately,” or “approximately” includes the stated value and the average value within an acceptable range of deviation from the given value, wherein the acceptable range of deviation is determined by a person skilled in the art taking into account the measurement under discussion and the error associated with the measurement of the given quantity (i.e., the limitations of the measurement system).
[0050] For ease of understanding, the technical terms used in this application will be explained and described below.
[0051] Application software (APP, or simply application): This refers to a collection of applications written in various programming languages that users can use. It is divided into application software packages and user programs. An application software package is a collection of programs designed to solve a specific type of problem using a computer, and is available for user use.
[0052] An Android application package (APK) is the installation package for an application within the Android system. In Android application development, developers package their code, resource files, images, etc., into an APK file, and then distribute this file to app stores or users' devices. The APK file contains all the information about the application, including its code, resource files, icon, application name, and so on.
[0053] Software Development Kit (SDK): This contains a series of application programming interfaces (APIs), tools, and documentation to help developers build applications. In Android development, the SDK is one of the essential tools for developers.
[0054] A middle platform, as part of a system framework, is a connecting platform between the front-end platform (such as the application layer that directly interacts with users) and the back-end platform (such as core data that is not perceived by users). The middle platform can improve the efficiency between the front-end and back-end platforms. For example, a middle platform can handle some data processing capabilities. A middle platform is also a type of application software.
[0055] Photo album applications are software applications used by electronic devices to store and manage materials (pictures or videos).
[0056] The Smart Video Creation feature is a function within photo album applications (also known as gallery applications). It allows users to edit at least two clips stored within the photo album application to create a new video. This feature requires the photo album application's ability to store clips, as well as the video editing and smart vision capabilities of the platform.
[0057] It should be noted that the embodiments of this application are illustrated using the Android system as an example. However, the Android system scenario should not be considered as limiting the scope of protection of this application. The embodiments provided in this application can also be applied to other operating systems such as HarmonyOS and iOS. Accordingly, the technical terms mentioned below are only used in the context of the Android system. For example, the installation package of application software is referred to as APK, but it may be called by other names in other operating systems. These will not be listed here; it is only stated that the embodiments of this application can be applied to multiple operating systems.
[0058] Figure 1 A schematic diagram of the desktop interface displayed on an electronic device is shown; Figure 2 A schematic diagram of the app store application interface is shown.
[0059] like Figure 1As shown, electronic devices all have an app market (also known as a software store, app store, etc., which is not limited here) installed. The app market provides users with a variety of application software APK resources for download or update. For example, the service providers of each application software upload the latest version of their application software APK to the app market. Users can access the app market and find the corresponding operation controls for the application software. If the application software is not installed on the electronic device, such as… Figure 2 As shown, users can click on the installation control 021 to download and install new versions of application software to their electronic devices through the application market; or, if the application software is an application software already installed on the electronic device, such as... Figure 2 As shown, users can click on the update control 022 to update the application software to the latest version through the application market.
[0060] Each application in the app store is independent and does not affect the others. If a user wants to install or update multiple applications, they need to find the corresponding operation controls for each application in the app store separately to install or update them.
[0061] In recent years, with the continuous improvement of application software development, applications are no longer limited to single-function applications such as making calls, sending text messages, taking photos, or accessing third-party applications for shopping or watching videos. More and more scenario-based features are being designed and developed. These scenario-based features rely on certain capabilities of electronic devices, which often require the collaborative implementation of multiple applications. Understandably, some functions of an application depend on the capabilities of other applications, working together to achieve their intended purpose.
[0062] Figure 3 This diagram illustrates an application that depends on two other applications. Figure 4 This shows the update relationships between multiple applications in the app store.
[0063] like Figure 3 As shown, application A, version V2.0, depends on application B, version V2.0, and application C, version V2.0. Understandably, at least one new feature of application A, version V2.0, requires some capabilities of application B, version V2.0, and some capabilities of application C, version V2.0.
[0064] Assume that initially, application A is version V1.0, application B is version V1.5, and application C is version V1.1. To use the new features of application A, the user needs to manually update applications A, B, and C to version V2.0 in the app store. There are two scenarios for manually updating the applications.
[0065] Scenario 1: The user is unaware of the dependency relationship between app A's new features and apps B and C. In this case, the user will assume that updating app A will allow them to experience the new features. However, since apps B and C are not updated to version V2.0, app A cannot experience the new features, causing app A to become unresponsive or even crash, thus degrading the user experience.
[0066] Scenario 2: The user is aware that a new feature in application A depends on the relationship between applications B and C. Based on this, such as... Figure 4 As shown, the user first updates application A (version V1.0) to version V2.0 in the app store. Then, the user needs to update application B (version V1.5) to version V2.0 in the app store. Finally, the user needs to update application C (version V1.1) to version V2.0 in the app store. In this way, by manually updating application A, B, and C three times, the user can experience the new features of application A by running version V2.0 of application A.
[0067] Scenario 2, while allowing users to experience the new features of application A, requires users to go through the cumbersome process of updating multiple applications in the app store, which also reduces the user experience.
[0068] Figure 5 This illustrates three update scenarios for application A, application B, and application C. For example... Figure 5 As shown in (a), application A's version number has been updated to V2.0, but application B's version number is V1.5 and application C's version number is V1.1. Therefore, the new feature of application A cannot be implemented. Figure 5 As shown in (b), application B's version number has been updated to V2.0, but application A's version number is V1.0 and application C's version number is V1.1. Therefore, the new feature of application A cannot run. Figure 5 As shown in (c), the new features of application A can only run if application A's version number is updated to V2.0, application B's version number is updated to V2.0, and application C's version number is updated to V2.0.
[0069] The three manual updates performed by the user may have a long interval between updates. Each application update is also subject to various limitations such as network conditions (e.g., Wi-Fi status), the device's battery level, and the user-defined update time period. This can result in situations where application A, application B, and application C cannot be updated to V2.0 simultaneously. In other words, three manual updates may also lead to…Figure 5 In cases (a) and (b), users are unable to experience the new features of application A, which reduces the user experience.
[0070] It is clear that the current solutions, whether in scenario one or scenario two, both result in a reduced user experience.
[0071] Based on this, embodiments of this application provide an application update method and an electronic device. When a user updates one application, other applications that the application depends on are also updated. In this way, the user can update multiple applications with a single manual update and experience the reliability of the new application features, thereby improving the user experience.
[0072] The electronic devices provided in the embodiments of this application may include, but are not limited to, mobile phones, tablets, laptops, handheld computers, netbooks, personal digital assistants (PDAs), wearable electronic devices (smartwatches, smart bracelets, smart rings, etc.), virtual reality devices, etc., and the embodiments of this application are not limited thereto. The following description uses a mobile phone as an example, but it is not limited to mobile phones.
[0073] The following example illustrates how the Smart Photo Maker feature in the photo album app relies on the capabilities of both the video editing and smart vision apps. It involves the user updating both the photo album, video editing, and smart vision apps on their phone to enable the Smart Photo Maker feature.
[0074] It should be noted that the embodiments of this application are not limited to the example of a photo album application's smart photo editing function relying on the capabilities of a video editing application and a smart vision application. Other examples could include a photo album application's smart image removal function relying on the capabilities of an image processing application and a smart vision application; or a camera application's video recording function relying on the capabilities of a voice processing application, and so on. These will not be listed here. This article only uses the example of a photo album application's smart photo editing function relying on the capabilities of a video editing application and a smart vision application for illustration.
[0075] In some embodiments, the user operates the phone to update the photo album application, and before the new version of the photo album application is launched, the phone automatically updates the video editing application and the smart vision application, so that the user can immediately use the smart photo editing function of the photo album application after opening the new version of the photo album application.
[0076] Figure 6 The diagram illustrates the logic of the update method applied in some embodiments of this application. For example... Figure 6As shown, the application update method may include steps S101 to S107.
[0077] Step S101: In response to the update command for the photo album application, the mobile phone sends a request to the cloud to obtain the APK of the new version of the photo album application.
[0078] Users can tap the app store icon on the home screen to launch the app store application. The phone responds to this launch by launching the app store and displaying its interface. Users can then locate the photo album application and tap the corresponding update control. The phone responds to this touch, receiving an update command for the photo album application.
[0079] In response to an update command for the photo album application, the phone sends a request to the cloud to obtain the APK for the new version of the photo album application.
[0080] Step S102: The phone downloads the new version of the photo album application APK from the cloud.
[0081] Download the album app APK from the cloud. This new version of the album app APK is a higher version than the currently installed album app on your phone.
[0082] Step S103: After the phone parses the APK of the photo album application, it installs the new version of the photo album application.
[0083] For example, after the mobile phone obtains the APK of the photo album application, it opens the APK using an integrated development environment (IDE) or other development tools. Then, it performs some modifications and optimizations on the APK file to ensure that the processed file package meets the requirements of the application software. Afterwards, the processed file package is recompiled, and the new version of the photo album application is packaged after compilation.
[0084] In some examples, during the process of opening an APK using development tools, the dependency information originally stored in the APK can be parsed. This dependency information may include identification information for the video editing application and the smart vision application. This dependency information can be used to indicate that the photo album application depends on both the video editing application and the smart vision application. Understandably, when the phone parses the photo album application's APK, it can obtain the identification information for both the video editing application and the smart vision application.
[0085] In this embodiment, the mobile phone can parse the identification information of the video editing application and the smart vision application from the APK of the photo album application. This enables the mobile phone to accurately obtain the identification information of the dependent applications and improves the accuracy of the mobile phone's updates to the dependent applications.
[0086] Step S104: In response to the identification information of the video editing application and the identification information of the smart vision application, the mobile phone sends a request to the cloud to obtain the APK of the new version of the video editing application and a request to obtain the APK of the new version of the smart vision application.
[0087] After parsing the APK of the photo album application and obtaining the identification information of the video editing application and the smart vision application, the mobile phone, in response to the identification information of the video editing application, sends a request to the cloud to obtain the new version of the video editing application APK; at the same time, in response to the identification information of the smart vision application, it sends a request to the cloud to obtain the new version of the smart vision application APK.
[0088] Step S105: The phone downloads the new versions of the video editing application APK and the smart vision application APK from the cloud.
[0089] The APK of the video editing application downloaded from the cloud to the phone is a higher version than the currently installed video editing application on the phone. The APK of the smart vision application is also a higher version than the currently installed smart vision application on the phone.
[0090] In some examples, the dependency information described above includes not only the identification information of the video editing application but also its version number. Similarly, the dependency information described above includes not only the identification information of the smart vision application but also its version number.
[0091] If the dependency information includes the identification information and version number of the video editing application, the version number of the video editing application APK downloaded by the mobile phone from the cloud in step S104 can be the same as the version number of the video editing application in the dependency information.
[0092] Similarly, if the dependency information includes the identification information and version number of the smart vision application, the version number of the smart vision application APK downloaded by the mobile phone from the cloud in step S104 can be the same as the version number of the smart vision application in the dependency information.
[0093] Furthermore, newer versions of applications typically override the features of older versions. In other words, the newer version has all the features of the older version, and may also have additional features. Thus, a video editing application that is actually newer than the version number of the video editing application in the dependency information can also be used by the photo album application to enable the photo album application's smart photo editing function.
[0094] Therefore, in step S105, the version number of the video editing application APK downloaded by the mobile phone from the cloud can be higher than the version number of the video editing application in the dependency information. Similarly, in step S105, the version number of the smart vision application APK downloaded by the mobile phone from the cloud can also be higher than the version number of the smart vision application in the dependency information.
[0095] In this way, updating the second application to a version higher than the video editing application version number in the dependency information can reduce the need for subsequent updates to the second application, avoid multiple updates to the second application, and improve the efficiency of electronic devices.
[0096] Step S106: After the phone parses the APK of the video editing application, it installs the new version of the video editing application.
[0097] After obtaining the video editing application's APK on the phone, open the APK using an integrated development environment (IDE) or other development tools. Then, modify and optimize the APK file to ensure it meets the application's requirements. Next, recompile the processed file, and finally package it to obtain the new version of the video editing application.
[0098] Step S107: After the mobile phone parses the APK of the Smart Vision application, it installs the new version of the Smart Vision application.
[0099] After obtaining the APK file of the smart vision application on the mobile phone, the APK is opened using an integrated development environment (IDE) or other development tools. Then, the APK file is modified and optimized to ensure it meets the application software requirements. Next, the modified file is recompiled, and the resulting package is packaged to obtain the new version of the smart vision application.
[0100] It should be noted that, Figure 6 The two app market applications shown can actually be a single application software. Figure 6 To distinguish the different steps, the text is presented multiple times.
[0101] After steps S101 to S107 are completed, the user launches the photo album application and can experience its smart video creation function. For example, the phone receives a touch operation from the user on the photo album application icon, launches the application, and displays its corresponding interface. When the phone receives a touch operation from the user on the smart video creation control within the interface, it can edit at least two materials (images or videos) stored in the photo album application to create a new video. In this way, the photo album application can rely on the capabilities of a video editing application to edit at least two materials and utilize a smart vision application to visually enhance the edited video, resulting in a newly created video.
[0102] In other embodiments, the user operates the phone to update the photo album application, and after the user manually launches the new version of the photo album application, the phone begins to update the video editing application and the smart vision application. After the video editing application and the smart vision application are updated, the user can use the smart photo editing function of the photo album application.
[0103] Figure 7 The following are logical schematic diagrams illustrating the application of the update method in some other embodiments of this application. For example... Figure 7 As shown, the application update method may include steps S201 to S211.
[0104] Step S201: In response to the update command for the photo album application, the mobile phone sends a request to the cloud to obtain the APK of the new version of the photo album application.
[0105] Step S202: The phone downloads the new version of the photo album application APK from the cloud.
[0106] Step S203: After the phone parses the APK of the photo album application, it installs the new version of the photo album application.
[0107] The explanations of steps S201 to S203 can be found in the explanations of steps S101 to S103, and will not be repeated here.
[0108] In some examples, during the process of opening an APK using development tools, the dependency information originally stored in the APK can be parsed. This dependency information may include identification information for the video editing application and the smart vision application. This dependency information can be used to indicate that the photo album application depends on both the video editing application and the smart vision application. Understandably, when the phone parses the photo album application's APK, it can obtain the identification information for both the video editing application and the smart vision application.
[0109] After obtaining the identification information of the video editing application and the smart vision application, the mobile phone can store the identification information of the video editing application and the smart vision application in a preset storage area.
[0110] Step S204: The phone responds to the launch command for the photo album application and launches the photo album application.
[0111] The phone receives a touch operation from the user on the application icon of the new version of the photo album application, launches the new version of the photo album application, and displays the corresponding operation interface of the photo album application.
[0112] Step S205: The phone checks the dependency information in the preset storage area.
[0113] In some examples, the dependency information includes not only the identification information of the video editing application, but also the version number of the video editing application; similarly, the dependency information includes not only the identification information of the smart vision application, but also the version number of the smart vision application.
[0114] After obtaining the dependency information, the phone acquires the identification information and version number of the video editing application, as well as the identification information and version number of the smart vision application. Based on this, the phone obtains the version number of the currently installed video editing application and the version number of the currently installed smart vision application.
[0115] The phone compares the version number of the video editing application in the dependency information with the version number of the video editing application currently installed on the phone; similarly, the phone compares the version number of the smart vision application in the dependency information with the version number of the smart vision application currently installed on the phone. Through these comparisons, the check results for the dependency information are obtained.
[0116] If the check results indicate that the version number of the video editing application listed in the dependency information is higher than the version number of the currently installed video editing application on the phone, then the version number of the currently installed video editing application is too low and cannot support the smart photo editing function in the album. Therefore, the phone needs to upgrade (update the version number) the currently installed video editing application.
[0117] If the check results indicate that the version number of the video editing application in the dependency information is equal to or lower than the version number of the video editing application currently installed on the phone, then the version number of the currently installed video editing application is appropriate and can support the smart photo editing function in the album. Therefore, the phone does not need to upgrade the currently installed video editing application. This avoids unnecessary updates to the video editing application and reduces the load on the electronic device.
[0118] Similarly, if the check results indicate that the version number of the smart vision application in the dependency information is higher than the version number of the smart vision application currently installed on the phone, then the version number of the currently installed smart vision application is too low and cannot support the smart photo editing function in the album. Therefore, the phone needs to upgrade (update the version number) the currently installed smart vision application.
[0119] If the check results indicate that the version number of the smart vision application in the dependency information is equal to or lower than the version number of the smart vision application currently installed on the phone, then the version number of the currently installed smart vision application is appropriate and can support the smart photo editing function in the album. Therefore, the phone does not need to upgrade the currently installed smart vision application. This avoids unnecessary updates to the smart vision application and reduces the load on the electronic device.
[0120] In other examples, the dependency information mentioned above includes not only the identification information of the video editing application, but also the dependency type between the photo album application and the video editing application. Similarly, the dependency information mentioned above includes not only the identification information of the smart vision application, but also the dependency type between the photo album application and the smart vision application.
[0121] Dependency types include necessary dependencies and unnecessary dependencies. A necessary dependency means that a new feature of the application must rely on the capabilities of another application; without the capabilities of that other application, the new feature cannot function. A unnecessary dependency means that a new feature of the application requires the capabilities of another application, but the new feature can still function even without those capabilities, although the user experience will be slightly worse.
[0122] For example, the dependency type of a mobile game application on the gyroscope can be a non-essential dependency, while the dependency type of a game application on touch functionality can be an essential dependency.
[0123] If the dependency information includes the identification information of the video editing application and the dependency type between the photo album application and the video editing application, step S205 may include the mobile phone checking whether the dependency type between the photo album application and the video editing application is a necessary dependency; and the mobile phone checking whether the dependency type between the photo album application and the smart vision application is a necessary dependency.
[0124] If the check results indicate that the dependency between the photo album application and the video editing application is a necessary dependency, the application update method executes step S206 to continue updating the video editing application. If the check results indicate that the dependency between the photo album application and the video editing application is a non-essential dependency, the application update method can skip step S206 and cancel the update of the video editing application. This avoids unnecessary updates to the video editing application and reduces the load on the electronic device.
[0125] Similarly, if the check result indicates that the dependency type between the photo album application and the smart vision application is a necessary dependency, the application update method executes step S209 to continue updating the smart vision application. If the check result indicates that the dependency type between the photo album application and the smart vision application is a non-necessary dependency, the application update method can skip step S209 and cancel the update of the smart vision application. This avoids unnecessary updates to the smart vision application and reduces the load on the electronic device.
[0126] Step S206: If the version number of the video editing application in the dependency information indicates that the check result is higher than the version number of the video editing application currently installed on the phone, the phone sends a request to the cloud to obtain the APK of the new version of the video editing application.
[0127] In some examples, such as Figure 7 As shown, step S206 may include steps S2061 and S2062.
[0128] Step S2061: If the version number of the video editing application in the dependency information of the check result is higher than the version number of the video editing application currently installed on the phone, the phone displays an update confirmation window.
[0129] This update confirmation window prompts the user that an update to the video editing application is required to use the Smart Editing feature. This confirmation window can appear in either the photo album application or the phone's operating system; neither is explicitly stated here. After seeing the update confirmation window, the user can manually launch the app store application on their phone and initiate the update command for the video editing application through the app store.
[0130] The update confirmation window may also include an update control. Users can trigger an update command for the video editing application by tapping the update control. Alternatively, the update confirmation window may include a cancel control. Users can cancel the update to the video editing application by tapping the cancel control.
[0131] In this example, by displaying an update confirmation window, users can choose whether to update the video editing application and the smart vision application, avoiding the problems caused by automatic updates on the phone and improving the user experience.
[0132] Step S2062: In response to the update instruction for the video editing application, the mobile phone sends a request to the cloud to obtain the APK of the new version of the video editing application.
[0133] In response to an update request for the video editing application, the phone sends an update message to the app store. The phone then sends a request to the cloud to retrieve the new version of the video editing application's APK.
[0134] Step S207: The phone downloads the new version of the video editing application APK from the cloud.
[0135] The APK version of the video editing application downloaded from the cloud to the phone is higher than the version of the video editing application currently installed on the phone.
[0136] Step S208: After the phone parses the APK of the video editing application, it installs the new version of the video editing application.
[0137] After obtaining the APK file of the new video editing application on your phone, open the APK using an integrated development environment (IDE) or other development tools. Then, modify and optimize the APK file to ensure it meets the application's requirements. Next, recompile the processed file, and finally package it to obtain the new version of the video editing application.
[0138] Step S209: If the version number of the smart vision application in the dependency information indicates that the check result is higher than the version number of the smart vision application currently installed on the phone, the phone sends a request to the cloud to obtain the APK of the new version of the smart vision application.
[0139] In some examples, such as Figure 7 As shown, step S209 may include steps S2091 and S2092.
[0140] Step S2091: If the version number of the smart vision application in the dependency information of the check result is higher than the version number of the smart vision application currently installed on the phone, the phone displays an update confirmation window.
[0141] This update confirmation window prompts users that an update to the Smart Vision application is required to use the Smart Image Processing feature. This confirmation window can appear in either the photo album application or the phone's operating system; neither is strictly limited here. After seeing the update confirmation window, users can manually launch the app store application on their phone and initiate the update command for the Smart Vision application through the app store.
[0142] The update confirmation window may also include an update control. Users can tap the update control via touch to trigger an update command for the smart vision application. Additionally, the update confirmation window may include a cancel control. Users can tap the cancel control via touch to cancel the update to the smart vision application.
[0143] Step S2092: In response to the update instruction for the smart vision application, the mobile phone sends a request to the cloud to obtain the new version of the smart vision application APK.
[0144] In response to an update command for the smart vision application, the phone sends an update message to the app store. The phone then sends a request to the cloud to retrieve the new version of the smart vision application's APK.
[0145] Step S210: The mobile phone downloads the new version of the Smart Vision application APK from the cloud.
[0146] The APK version of the smart vision application downloaded from the cloud to the phone is higher than the version of the smart vision application currently installed on the phone.
[0147] Step S211: After the mobile phone parses the APK of the Smart Vision application, it installs the new version of the Smart Vision application.
[0148] After obtaining the APK file of the new version of the smart vision application on the mobile phone, open the APK using an integrated development environment (IDE) or other development tools. Then, modify and optimize the APK file to ensure it meets the application software requirements. Next, recompile the processed file package, and finally package it to obtain the new version of the smart vision application.
[0149] After steps S201 to S211 are completed, the user launches the photo album application and can experience its smart video creation function. For example, the phone receives a touch operation from the user on the photo album application icon, launches the application, and displays its corresponding interface. When the phone receives a touch operation from the user on the smart video creation control within the interface, it can edit at least two materials (images or videos) stored in the photo album application to create a new video. In this way, the photo album application can rely on the capabilities of a video editing application to edit at least two materials and utilize a smart vision application to visually enhance the edited video, resulting in a newly created video.
[0150] It should be noted that in some examples, steps S206 to S211 may all be included in the method. In other examples, if the check result indicates that the version number of the smart vision application in the dependency information is lower than or equal to the version number of the smart vision application currently installed on the phone, steps S209 to S211 may be omitted from the method. In still other examples, if the check result indicates that the version number of the video editing application in the dependency information is lower than or equal to the version number of the video editing application currently installed on the phone, steps S206 to S208 may be omitted from the method.
[0151] Understandably, if the check result indicates that the version number of the smart vision application in the dependency information is lower than or equal to the version number of the smart vision application currently installed on the phone, and the check result indicates that the version number of the video editing application in the dependency information is lower than or equal to the version number of the video editing application currently installed on the phone, the method may also exclude steps S206 to S211.
[0152] It should be noted that, Figure 7 The content related to the mobile phone checking dependency information in the illustrated embodiment is also applicable to... Figure 6 The examples shown are used to determine whether the video editing application and the smart vision application need to be updated. To avoid repetition, these details will not be repeated.
[0153] In this embodiment, the video editing and smart vision applications are updated only after the user launches the updated photo album application. This avoids consuming user data by updating the video editing and smart vision applications again when the user is using data to update the photo album application but does not need to use it. Updating the video editing and smart vision applications only when the user launches the photo album application ensures the reliability of the photo album application's functionality and improves the user experience.
[0154] Embodiments of this application also provide a method for generating a file package. During the process of writing the program file for a new version of an application, programmers add code to ensure that the APK of the new version contains dependency information. This allows the phone to accurately update other applications that the new version depends on after installation, enabling users to experience the new features of the new version and improving the user experience.
[0155] Figure 8 The diagram illustrates a logical schematic of a file package generation method provided in some embodiments of this application.
[0156] like Figure 8 As shown, the file package generation method may include steps S301 to S304.
[0157] Step S301: The application build platform obtains the basic code files for the photo album application. The basic code files include dependencies.
[0158] The base code files are located within the code repository. A code repository is a placeholder for storing code. It provides developers with a way to organize and manage code files, making it easier to find, modify, and update code.
[0159] Once developers have defined the library calling logic required by the new version of the photo album app to complete the smart photo creation function, they can add dependency library information to their code files. After the code files are added to the code repository, the repository can include the dependency library information of the new version of the photo album app.
[0160] In some examples, such as Figure 8 As shown, during the coding process, the developers declared that the new version of the photo album application depends on library A, which resulted in the project files written by the developers including information about the dependency on library A.
[0161] In other examples, developers declared dependency logic for the new version of the photo album app as relying on the video editing app and the smart vision app during the code writing process, and encrypted the dependency relationships. The dependency relationships include unique encrypted identifiers.
[0162] It's worth noting that developers can also call the dependency checking SDK in the base code files. For example, developers can add the check and update interfaces provided by the dependency checking SDK to the code segments in the code repository that need to be updated. This way, they can subsequently use the check and update interfaces provided by the dependency checking SDK to obtain dependency library information from the project files.
[0163] Developers upload the basic code files of the photo album application to the application building platform, thereby enabling the application building platform to obtain the basic code files of the photo album application.
[0164] An application build platform is a processing platform that, after obtaining the basic code files of an application, performs a series of processes to form an APK that can be distributed externally. For example, an application build platform might read the basic code files of a photo album application, compile and build it, and generate an executable file (such as the APK for the photo album application).
[0165] Step S302: The application building platform uses a preset matching library to convert the dependency relationships in the base code files into dependency information.
[0166] During the pipeline build phase, the application build platform reads the base code files of the photo album application and parses out the dependency library information from the project files. Then, using a preset matching library, it converts the dependency library information into dependency information.
[0167] In some examples, the matching library can be a mapping between various function libraries and multiple applications. Figure 9 This illustrates the mapping relationships between some function libraries and applications in the matching library. For example... Figure 9 As shown, there is a mapping relationship between function library A and video editing applications. Function library B is mapped to smart vision applications. Function library C is mapped to audio processing applications.
[0168] It's important to note that there's a mapping relationship between function library A and the video editing application. This can be understood as function library A being a subset of program files within the video editing application. Therefore, the photo album application's dependency on function library A means that the photo album application needs to use certain program files from the video editing application.
[0169] like Figure 10As shown, by obtaining the base code files of the photo album application, the dependencies of the photo album application on function library A and function library B can be determined. The application building platform then uses a matching library to determine the mapping relationship between function library A and the video editing application, and the mapping relationship between function library B and the smart vision application. Therefore, the application building platform can obtain dependency information indicating that the photo album application depends on the video editing application and the smart vision application. This dependency information includes the identification data of the video editing application and the smart vision application.
[0170] Furthermore, in addition to including the mapping relationships between various function libraries and multiple applications, the matching library also specifies the relationship between function libraries and application version numbers. For example, function library A has a mapping relationship with a video editing application with version number V2.0 and a smart vision application with version number V2.0.
[0171] In this way, the dependency information obtained using the matching library can also include the version number of the video editing application and the version number of the smart vision application.
[0172] Furthermore, in addition to including the mapping relationships between various function libraries and multiple applications, the matching library also defines the dependency types between function libraries and applications. These dependency types can be categorized as necessary dependencies and unnecessary dependencies. For example, in a mobile game application, the dependency type for the gyroscope can be considered unnecessary, while the dependency type for touch functionality in a game application can be considered necessary.
[0173] In this way, the dependency information obtained using the matching library can also include the dependency types between the photo album app and the video editing app, as well as the dependency types between the photo album app and the smart vision app. This makes it easier for the phone to determine whether the video editing app and the smart vision app need to be updated based on the dependency types.
[0174] In other examples, where dependencies include encrypted information indicating that the photo album app depends on the video editing app and the smart vision app, the matching library can be a mapping between multiple encrypted identifiers and multiple decryption methods. For example, there might be a mapping between encrypted identifier A and a hash algorithm decryption method. Or, for another example, there might be a mapping between encrypted identifier B and a knapsack algorithm decryption method.
[0175] By obtaining the basic code files of the photo album application, the encrypted identifier A of the photo album application's dependencies can be determined. The application building platform then uses a matching library to determine the mapping relationship between the encrypted identifier A and the decryption method corresponding to the hash algorithm. Therefore, by decrypting the dependencies, the application building platform can obtain dependency information indicating that the photo album application depends on the video editing application and the smart vision application. This dependency information includes the identification data of the video editing application and the smart vision application.
[0176] Step S303: The application building platform generates the application package for the photo album application, which includes dependency information.
[0177] After the application building platform completes the compilation and build pipeline for the new version of the photo album application, it can generate the APK of the new version of the photo album application. The APK may include the dependency information obtained in step S302.
[0178] Step S304: Publish the photo album application package to the app store.
[0179] After the app building platform generates the new version of the photo album app's APK, developers can publish the new version of the photo album app's APK to app stores. At this time, the previous version of the photo album app's APK in the app store can be replaced with the new version of the photo album app's APK.
[0180] Users can launch the app store on their phone, find the photo album control, and then download or update the photo album app to make the installed photo album app the latest version. They will also obtain the dependency information of the new version of the photo album app on the video editing app and the smart vision app.
[0181] In this embodiment, by including dependency information in the APK of the new version of the photo album application provided by the app store, the phone can obtain dependency information on the video editing application and the smart vision application when installing the new version of the photo album application. This allows the phone to promptly understand that some functions of the photo album application (such as the smart video creation function) depend on the video editing application and the smart vision application, prompting the phone to update the video editing application and the smart vision application. This prevents older versions of the video editing application and the smart vision application from being unsupported when the user uses the smart video creation function in the photo album application, thus improving the user experience.
[0182] If the dependency information in the APK includes the version numbers of the video editing application and the smart vision application, it can be clearly stated that the version number of the video editing application installed on the phone cannot be lower than the version number of the video editing application in the dependency information, and the version number of the smart vision application installed on the phone cannot be lower than the version number of the smart vision application in the dependency information.
[0183] This ensures that the Smart Video Production function works properly after updating the photo album app, as well as the new video editing app and Smart Vision app, thus improving the user experience.
[0184] When the dependency information in the APK includes the dependency types between the photo album application and the video editing application, as well as the dependency types between the photo album application and the smart vision application, the phone can update applications with necessary dependencies and selectively update applications with non-essential dependencies.
[0185] In this way, by updating the necessary dependent applications, it can be further ensured that the Smart Photo Maker function can be used normally after the phone updates the photo album application and other necessary dependent applications, thus improving the user experience. Furthermore, it reduces the need to update non-essential dependent applications, decreasing the workload of updating the phone and shortening the time users spend using the Smart Photo Maker function, further enhancing the user experience.
[0186] This application also provides an electronic device, such as... Figure 11 As shown, the electronic device includes at least one processor 701 and at least one interface circuit 702. The processor 701 and the interface circuit 702 are interconnected via lines. For example, the interface circuit 702 can be used to receive signals from other devices (e.g., the memory of the electronic device). As another example, the interface circuit 702 can be used to send signals to other devices (e.g., the processor 701 or the screen of the electronic device). Exemplarily, the interface circuit 702 can read instructions stored in the memory and send those instructions to the processor 701. When the instructions are executed by the processor 701, the electronic device can perform the steps in the above embodiments. Of course, the electronic device may also include other discrete components, which are not specifically limited in this application embodiment.
[0187] This application also provides a computer-readable storage medium including computer instructions that, when executed on the aforementioned mobile phone or application building platform, cause the controller to perform various functions or steps of the mobile phone in the above embodiments; or, the controller to perform various functions or steps of the application building platform in the above embodiments.
[0188] This application also provides a computer program product that, when run on a computer, causes the computer to perform various functions or steps of the mobile phone in the above embodiments; or to perform various functions or steps of the application building platform in the above embodiments.
[0189] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0190] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0191] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0192] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0193] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0194] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An application update method characterized by comprising: The method is applied to an electronic device, and the method comprises: In response to an update instruction for a first application, the electronic device updates the first application and a second application; at least one function in the first application depends on the second application.
2. The method of claim 1, wherein, The electronic device updates the first application and the second application, which comprises: The electronic device updates the first application; The electronic device extracts dependency information from the process of updating the first application; the dependency information comprises identification data of the second application; The electronic device updates the second application.
3. The method of claim 2, wherein, The electronic device updates the second application, which comprises: The electronic device starts the updated first application in response to a start instruction for the updated first application; The updated first application acquires the dependency information; The updated first application sends an update instruction for the second application to an application market application, so that the application market application updates the second application.
4. The method according to claim 2 or 3, characterized in that, The dependency information further comprises version data of the second application; The electronic device updates the second application, which comprises: The electronic device checks the dependency information of the second application to obtain a checking result; In a case where the checking result indicates that the version data of the second application is lower than version data that the updated first application depends on, the electronic device updates the second application.
5. The method of claim 4, wherein, In a case where the checking result indicates that the version data of the second application is lower than version data that the updated first application depends on, the electronic device updates the second application, which comprises: In a case where the checking result indicates that the version data of the second application is lower than version data that the updated first application depends on, an update confirmation window is displayed, and the update confirmation window is used to prompt a user to update the second application; In response to an update instruction for the second application, the electronic device updates the second application.
6. The method according to claim 4 or 5, characterized in that, The electronic device updates the second application, which comprises: The electronic device updates the second application to the latest version.
7. The method of claim 2 or 3, wherein, The dependency information further comprises a dependency type corresponding to the second application; The electronic device updates the second application, which comprises: The electronic device checks the dependency information of the second application to obtain a checking result; In a case where the checking result indicates that the dependency type between the first application and the second application belongs to a necessary dependency type, the electronic device updates the second application.
8. A file package generation method characterized by comprising: The method comprises: Obtaining a basic code file of a first application, the basic code file comprising a dependency relationship; Converting the dependency relationship in the basic code file into dependency information by using a preset matching library, the dependency information comprising identification data of the second application; Generating an application program package of the first application, the application program package of the first application comprising the dependency information.
9. The method of claim 8, wherein, The dependency information further comprises at least one of version data of the second application and a dependency type of the second application by the first application.
10. The method of claim 8, wherein, The dependency relationship comprises dependency library information of the first application; The matching library comprises a mapping relationship between the library and the application; The converting the dependency relationship in the base code file into dependency information comprises: obtaining dependency library information of the first application; determining at least one second application information having a mapping relationship with the dependency library information from the matching library; generating the dependency information, the dependency information comprising a mapping relationship between the first application and the second application information.
11. An electronic device, comprising: The electronic device comprises a memory and one or more processors; the memory is coupled with the processor; the memory stores computer program code, the computer program code comprises computer instructions, when the computer instructions are executed by the processor, the electronic device executes the method in any one of claims 1-7, or executes the method in any one of claims 8-10.
12. A computer-readable storage medium, characterized in that, The computer instructions, when executed on an electronic device, cause the electronic device to execute the method in any one of claims 1-7, or execute the method in any one of claims 8-10.