File generation method and device, application updating method and device, electronic equipment and medium

By generating inline configuration files and de-optimizing the process, the problem of low update efficiency after method inlining is solved, efficient updates of applications are achieved, and application performance and efficiency are improved.

CN118689503APending Publication Date: 2024-09-24DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410704108.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

After the method is inlined, the application update efficiency is low, resulting in invalid updates and affecting the application update efficiency.

Method used

By receiving the application package of the target application, the methods to be updated are determined, and an inline configuration file is generated based on the inline relationship, and saved to the server to optimize the target caller and establish a new inline relationship to implement method updates.

Benefits of technology

It improves the effectiveness of method updates, improves application update efficiency, ensures targeted updates, and improves application performance and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689503A
    Figure CN118689503A
Patent Text Reader

Abstract

The invention relates to the technical field of software engineering, and discloses a file generation method and device, an application updating method and device, electronic equipment and a medium. The present disclosure provides a file generation method applied to a first device, comprising: receiving an application package of a target application, and determining a first method to be updated in the application package, the application package comprising a plurality of methods; based on an inline relationship among the multiple methods in the application package, determining an inline first method and a corresponding target calling party to obtain an inline configuration file, the inline configuration file being used for representing the inline relationship between the first method in the target application and the corresponding target calling party; according to the method, the inline configuration file is sent to the server side of the target application, so that the inline configuration file is stored through the server side, targeted updating can be carried out when the first method in the target application is updated in a subsequent online real environment, the effectiveness of method updating is improved, and the updating efficiency of the target application is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of software engineering technology, and in particular to a file generation method, an application update method, a device, an electronic device and a medium. Background Art

[0002] A method is a function defined in a class or object that describes the behavior or operation of the object.

[0003] Method inlining is a compiler optimization technique, which refers to the process of inserting the code of the called method directly into the caller's code for execution when a method call is encountered during the compilation process. However, after inlining, the code added to the caller will not be changed, and when the called method is updated, invalid updates will occur, which will affect the update efficiency of the application. Summary of the invention

[0004] In view of this, the present disclosure provides a file generation method, an application update method, a device, an electronic device and a medium to solve the problem of low efficiency of online application updates.

[0005] In a first aspect, the present disclosure provides a file generation method, which is applied to a first device, and the method includes:

[0006] receiving an application package of a target application, and determining a first method to be updated in the application package, wherein the application package includes a plurality of methods;

[0007] Based on the inline relationship between multiple methods in the application package, determine the first method to be inlined and the corresponding target caller, and obtain an inline configuration file, where the inline configuration file is used to characterize the inline relationship between the first method in the target application and the corresponding target caller;

[0008] Send the inline configuration file to the server of the target application to save it through the server.

[0009] In a second aspect, the present disclosure provides an application update method, which is applied to a second device, and the method includes:

[0010] In response to the target application being started, obtaining an inline configuration file and a second method from a server of the target application, wherein the inline configuration file is used to represent an inline relationship between a first method to be updated in the target application and a corresponding target caller, and the second method is used to replace the first method;

[0011] Deoptimizing the target caller to release the inline relationship between the target caller and the first method;

[0012] An inline relationship is established between the target caller and the second method to obtain an updated target application.

[0013] In a third aspect, the present disclosure provides a file generation device, applied to a first device, the device comprising:

[0014] A first processing module, configured to receive an application package of a target application and determine a first method to be updated in the application package, wherein the application package includes a plurality of methods;

[0015] A second processing module is used to determine the inlined first method and the corresponding target caller based on the inline relationship between the multiple methods in the application package, and obtain an inline configuration file, where the inline configuration file is used to characterize the inline relationship between the first method and the corresponding target caller in the target application;

[0016] The sending module is used to send the inline configuration file to the server of the target application so as to save it through the server.

[0017] In a fourth aspect, the present disclosure provides an application update device, applied to a second device, the device comprising:

[0018] an acquisition module, configured to, in response to the target application being started, acquire an inline configuration file and a second method from a server of the target application, wherein the inline configuration file is used to represent an inline relationship between a first method to be updated in the target application and a corresponding target caller, and the second method is used to replace the first method;

[0019] A third processing module is used to perform a deoptimization process on the target caller to release the inline relationship between the target caller and the first method;

[0020] The update module is used to establish an inline relationship between the target caller and the second method to obtain an updated target application.

[0021] In a fifth aspect, the present disclosure provides an electronic device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the file generation method of the above-mentioned first aspect or any corresponding embodiment thereof or the application update method of the above-mentioned second aspect or any corresponding embodiment thereof by executing the computer instructions.

[0022] In a sixth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the file generation method of the first aspect or any corresponding embodiment thereof or the application update method of the second aspect or any corresponding embodiment thereof.

[0023] In the seventh aspect, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the file generation method of the above-mentioned first aspect or any corresponding embodiment or the application update method of the above-mentioned second aspect or any corresponding embodiment.

[0024] The file generation method provided in this embodiment, after clarifying the target application and the first method to be updated in the application package of the target application, saves the inline configuration file that can characterize the inline relationship between the first method and the corresponding target caller to the server based on the inline relationship between multiple methods in the application package. This helps to perform targeted updates when the first method in the target application is subsequently updated in a real online environment, thereby helping to improve the effectiveness of the method update and facilitating improving the update efficiency of the target application. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0026] Figure 1 It is a schematic diagram of the process of method inlining;

[0027] Figure 2 is a flowchart of a file generation method according to an embodiment of the present disclosure;

[0028] Figure 3 is a flowchart of another file generation method according to an embodiment of the present disclosure;

[0029] Figure 4 is a flowchart of an application update method according to an embodiment of the present disclosure;

[0030] Figure 5 is a structural block diagram of a file generating device according to an embodiment of the present disclosure;

[0031] Figure 6 is a structural block diagram of an application updating device according to an embodiment of the present disclosure;

[0032] Figure 7 It is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0034] In the related art, during the application running process, the execution efficiency of the program can be improved by inlining methods. Figure 1 As shown in the figure, during the running of the application, the number of method calls is reduced by directly copying the code (code) b of the called method (method B) to the code of the caller (method A). However, after inlining, the update of method B does not affect the code of method B added to the code of method A, which will lead to invalid updates, thereby affecting the update efficiency of the application.

[0035] In view of this, according to an embodiment of the present disclosure, a file generation method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0036] In this embodiment, a file generation method is provided, which can be used in a first device, such as a notebook, a computer, etc. Figure 2 is a flowchart of a file generation method according to an embodiment of the present disclosure, such as Figure 2 As shown, the process includes the following steps:

[0037] Step S201: receiving an application package of a target application, and determining a first method to be updated in the application package.

[0038] The target application can be any application (Application, APP) that needs to be updated. The type of the target application can be social, game, office, etc., which is not limited here.

[0039] In order to perform targeted updates on the target application, the application package of the target application is obtained to understand the compilation status of the target application through the application package, and then determine the first method to be updated. Among them, the application package is a compressed or packaged file of the target application, including but not limited to the methods, codes, resources and other related files of the target application. For example: the application package can be an APK file of the Android platform. The first method refers to the function, process or other executable code fragment to be updated in the target application. The determination of the first method depends on the compilation requirements for the target application and is not limited here. The operation to be updated can be replacement or hook (Hook, a system mechanism used to replace the "interrupt" under the disk operating system (Disk Operating System, DOS)).

[0040] In some optional implementation scenarios, for example, the target application is a game, and its application package is an APK file. When the developer finds that a method called "scoreCalculation" (used to calculate the player's score) in the application package has a problem and needs to be updated, it is selected as the first method to be updated.

[0041] Step S202: based on the inline relationship between multiple methods in the application package, determine the first inline method and the corresponding target caller to obtain an inline configuration file.

[0042] The inline configuration file is used to characterize the inline relationship between the first method in the target application and the corresponding target caller. Since the target application needs to rely on the support of various methods during its operation, and there may be inline relationships between different methods. Therefore, in order to determine which methods in the application package are target callers that need to inline the first method during the operation of the target application, the inline relationships between multiple methods in the application package are sorted out and analyzed to clarify the inline relationships between the methods, and then the inline configuration file is obtained. Among them, the method that needs to inline other methods is called the "caller", and the method that inlines the first method is called the target caller. For example, Figure 1 For example, if method B is the first method, method A that inlines method B is the target caller. In some optional examples, the inline relationship between multiple methods can be determined by a third-party tool, a specified algorithm, or a script.

[0043] Step S203: sending the inline configuration file to the server of the target application to be saved by the server.

[0044] After the inline configuration file is obtained, it will be sent to the server of the target application for storage, so that when the application interacts with the server during operation, the inline configuration file can be used to clarify that the first method in the application package needs to be updated, and which methods are the target callers of the inline first method. Subsequently, targeted adjustments can be made based on the inline configuration file to ensure the effectiveness of the method update, thereby achieving the purpose of improving the performance and efficiency of the application.

[0045] The file generation method provided in this embodiment, after clarifying the target application and the first method to be updated in the application package of the target application, saves the inline configuration file that can characterize the inline relationship between the first method and the corresponding target caller to the server based on the inline relationship between multiple methods in the application package. This helps to perform targeted updates when the first method in the target application is subsequently updated in a real online environment, thereby helping to improve the effectiveness of the method update and facilitating improving the update efficiency of the target application.

[0046] In this embodiment, a file generation method is provided, which can be used for the first device mentioned above, such as a notebook, a computer, etc. Figure 3 is a flowchart of a file generation method according to an embodiment of the present disclosure, such as Figure 3 As shown, the process includes the following steps:

[0047] Step S301: receiving an application package of a target application, and determining a first method to be updated in the application package.

[0048] Step S302: Based on the inline relationship between multiple methods in the application package, determine the first inline method and the corresponding target caller to obtain an inline configuration file.

[0049] Specifically, the above step S302 includes:

[0050] Step S3021, traverse the product instructions of the application package to obtain an inline relationship set.

[0051] Among them, product instructions refer to instructions generated by the target application during the compilation or construction process, such as function calls, variable assignments, etc. The inline relationship set includes the inline relationship corresponding to each method. The inline relationship includes the caller and the corresponding inlined party. The caller is a method used to inline other methods, and the callee is a method whose corresponding code needs to be embedded in the caller.

[0052] In order to clarify the inline relationship between methods in the application package, each product instruction is visited one by one to mine and sort out the inline relationship between each method and other methods, and then obtain the inline relationship set. Among them, the same method can be the caller in the current inline relationship or the inlined party in other inline relationships.

[0053] Step S3022: based on the matching result between the first method and each inlined party, determine the target inline relationship, and use the caller in the target inline relationship as the target caller to obtain an inline configuration file.

[0054] When the first method is updated, the code in the target caller needs to be replaced to ensure the validity of the update, and each inline relationship includes a caller and an inlined party. Therefore, in order to effectively identify the target caller, the first method is matched with the inlined party in each inline relationship, and then the target association relationship is screened out from multiple inline relationships based on the matching results. Among them, the target inline relationship refers to the inline relationship in the inline relationship set, where the inlined party is the first method.

[0055] When the target inline relationship is determined, the caller in the target inline relationship is used as the target caller, and then combined with the first method to obtain an inline configuration file. That is, in the inline configuration file, the inline relationship between the first method and its corresponding target caller is recorded. If the number of target inline relationships is 1, the relationship between the first method and the target caller in the inline configuration file is one-to-one; if the number of target inline relationships is multiple, the relationship between the first method and the target caller in the inline configuration file is one-to-many.

[0056] In some optional implementations, based on the matching result between the first method and each inlined party, the process of determining the target inline relationship includes:

[0057] Step a1, matching the first method name of the first method with the method name of the current inlined party to obtain a matching result;

[0058] Step a2: If the matching result indicates that the method name of the current inlined party is the same as the first method name, then the inline relationship corresponding to the current inlined party is determined to be the target inline relationship.

[0059] Specifically, in order to improve the efficiency of the target inline relationship screening, the screening is performed based on the method name matching method. After determining the first method name of the first method, the first method name is matched with the method name of the current inline party, and the two are judged to be the same by string comparison, thereby obtaining a matching result.

[0060] If the matching result indicates that the method name of the current inlined party is the same as the first method name, then the current inlined party can be considered to be the first method, and therefore, the inline relationship corresponding to the current inlined party is set as the target inline relationship.

[0061] In some other optional implementations, if the matching result indicates that the method name of the current inlined party is different from the first method name, then the inline relationship corresponding to the current inlined party is determined to be a non-target inline relationship. That is, if the matching result indicates that the method name of the current inlined party is the same as the first method name, then it can be considered that the current inlined party is not the first method, and therefore, the inline relationship corresponding to the current inlined party is not the desired target inline relationship.

[0062] In some optional implementations, the matching result between the first party and each inlined party may be determined by any one or more of the following methods based on the requirements to determine the target inline relationship, so as to improve the accuracy and reliability of the determination of the target inline relationship:

[0063] The determination is made based on a signature matching method. That is, the first signature (including parameter type and quantity) is compared with the signature of the current inlined party to determine whether the two match. If the matching result indicates that the name of the current inlined party is the same as the first name, the inline relationship corresponding to the current inlined party is determined to be the target inline relationship.

[0064] The determination is made based on code structure matching. That is, the code structures of the first and inlined parties, such as loop structures, conditional judgments, etc., are analyzed to determine whether they are similar or matched. If the matching result indicates that the name of the current inlined party is the same as the first name, the inline relationship corresponding to the current inlined party is determined to be the target inline relationship.

[0065] The determination is made based on a semantic matching approach. That is, the functions and behaviors of the first and inlined parties are checked to determine whether they are semantically related or matched. If the matching result indicates that the name of the current inlined party is the same as the first name, then the inline relationship corresponding to the current inlined party is determined to be the target inline relationship.

[0066] The determination is made based on a dependency analysis method. That is, the dependency between the first and the inlined party is analyzed, such as calls, variable references, etc., to determine whether there is a direct or indirect dependency between them. If the matching result indicates that the name of the current inlined party is the same as the first name, then the inline relationship corresponding to the current inlined party is determined to be the target inline relationship.

[0067] The determination is made based on context analysis. That is, the contextual environment of the first and inlined parties in the code, such as the class, package or module in which they are located, is considered to determine whether they belong to the same context or related functional modules. If the matching result indicates that the name of the current inlined party is the same as the first name, the inline relationship corresponding to the current inlined party is determined to be the target inline relationship.

[0068] The determination is performed based on a regular expression matching method. That is, a regular expression is used to define a matching pattern, and the first and inlined parties are matched according to the pattern. If the matching result indicates that the name of the current inlined party is the same as the first name, then the inline relationship corresponding to the current inlined party is determined to be the target inline relationship.

[0069] The determination is made based on manual review. That is, when a more accurate or complex matching judgment is required, manual review and analysis can be performed to ensure the accuracy of determining the target inline relationship. If the matching result indicates that the name of the current inlined party is the same as the first name, then the inline relationship corresponding to the current inlined party is determined to be the target inline relationship.

[0070] Step S303: Send the inline configuration file to the server of the target application to be saved by the server.

[0071] The file generation method provided in this embodiment, based on the product instructions of the application package, filters the inlined party as the target inline relationship of the first method, and then determines the target caller therefrom to obtain the inline configuration file, which can effectively avoid missed recognition or misidentification, so that the inline configuration file saved on the server is more accurate and reliable, which is helpful for subsequent targeted optimization and debugging of the target application.

[0072] Based on the same inventive concept, the present disclosure also provides an application update method applied to a second device. The second device may be a mobile phone, a tablet computer, etc. Figure 4 is a flowchart of an application updating method according to an embodiment of the present disclosure. Figure 4 As shown, the process includes the following steps:

[0073] Step S401, in response to the target application being started, obtaining an inline configuration file and a second method from a server of the target application.

[0074] The target application needs to run based on the services provided by its corresponding server. Since the first method in the target application is the method to be updated. Therefore, after the target application is started, based on the connection with the server of the target application, the inline configuration file and the second method can be obtained from the server to update the first method based on the inline configuration file and the second method. The inline configuration file is used to characterize the inline relationship between the first method to be updated in the target application and the corresponding target caller, and the second method is used to replace the first method. The operation corresponding to the update can be a replacement or a hook (Hook, a system mechanism used to replace the "interrupt" under the Disk Operating System (DOS)).

[0075] Step S402: Deoptimize the target caller to release the inline relationship between the target caller and the first method.

[0076] Since method inlining belongs to the optimization process of the target caller, in order to improve the effectiveness of the update and avoid invalid updates, the target caller is deoptimized to extract the code of the first method from the target caller, thereby achieving the purpose of removing the inline relationship between the target caller and the first method, so that when the candidate method is updated, it can be guaranteed that the code inlined in the target caller is the code of the second method.

[0077] Step S403: establish an inline relationship between the target caller and the second method to obtain an updated target application.

[0078] By establishing an inline relationship between the target caller and the second method, the target caller can implement an optimized processing process by calling the code of the second method during the operation of the target application, so as to achieve the purpose of updating the first method and obtain the updated target application.

[0079] The application update method provided in this embodiment, during the operation of the target application, specifies the first method to be updated and its corresponding target caller by obtaining an inline configuration file, so that the deoptimization processing on the target caller can be more targeted, thereby making the update method of the first method more flexible, facilitating the target caller to effectively call the code of the second method, achieving the desired optimization effect, ensuring the maintainability and scalability of the code, and making the update method of the target application more convenient and reliable.

[0080] In some optional implementations, the above step S401 includes:

[0081] Step b1, in response to the target application being started, sending a query request to the server of the target application;

[0082] Step b2, receiving a response packet sent by the server, and obtaining an inline configuration file and a second method.

[0083] Specifically, after the target application is started, in order to determine whether the target application needs to be updated, a query request is sent to the server of the target application to determine whether the target application has a method to be updated. The query request is a request for inquiring whether there is a method to be updated in the target application.

[0084] If the target application has a first method that needs to be updated, the response packet sent by the server will contain an inline configuration file corresponding to the first method and a second method for replacing the first method. However, if the target application does not have the first method that needs to be updated, the response packet sent by the server will prompt that the target application does not need to be updated.

[0085] Therefore, the response packet sent by the server can clarify whether the target application needs to be updated. If there is a first method that needs to be updated in the target application, the required inline configuration file and the second method can be obtained through the response packet, thereby making the method update method of the target application more flexible and targeted, and can effectively improve the performance of the target application.

[0086] In some other optional implementations, the above step S402 includes:

[0087] Step c1, calling the deoptimization function from the underlying function of the current operating system;

[0088] Step c2, deoptimizing the target caller through a deoptimization function, so as to convert the way the target caller calls the first method from a code call to an instruction call.

[0089] Specifically, the deoptimization function can be understood as a function used to undo or cancel a previously performed optimization operation. For example, the deoptimization function can be a deoptimize or optimization reversal function.

[0090] The current operating system can be understood as an operating system that is compatible with the target application. By calling the deoptimized function from the underlying function in the current operating system, the overhead of function calling can be effectively reduced, thereby improving the execution efficiency of the program.

[0091] When the target caller is clear, deoptimizing the target caller through the deoptimization function can make the deoptimization process more targeted, effectively avoid the occurrence of global deoptimization, ensure the maintainability and scalability of the code, and make the method update method more flexible and reliable, which helps to improve the optimization effect of the target application.

[0092] As one or more specific application embodiments of the embodiments of the present disclosure, taking the current operating system as an Android system as an example, the target application can be any application that can run on the Android system, and then the process of updating the first method in the target application can be as follows:

[0093] During the compilation of the target application on the first device, the application package of the target application and the first method name of the first method are input into the compilation platform on the first device. By traversing the product instructions of the application package, the target inline relationship including the first method is determined, and then the inlined first method and the corresponding target caller are determined through the target inline relationship, so as to obtain the inline configuration file, and send it to the server of the target application for storage, so as to reduce the complexity of separate maintenance on the client of each target application, so that the server can more conveniently configure and update the target application.

[0094] In the process of the target application running on the second device, in response to the target application being started, the inline configuration file and the second method are obtained from the server of the target application. The deoptimize function is called from the bottom function of the Android system, and the target caller is deoptimized by the deoptimize function to convert the way the target caller calls the first method from a code call to an instruction call, and the inline relationship between the target caller and the first method is released. The first method is replaced with the second method, and the inline relationship between the target caller and the second method is established, so as to obtain an updated target application.

[0095] Through the above application update method, the application running on the Android system can also realize the method replacement function during the operation in the online real environment, thereby achieving the purpose of effective update.

[0096] In this embodiment, a file generation device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0097] This embodiment provides a file generation device, which is applied to a first device, such as Figure 5 As shown, including:

[0098] A first processing module 501 is used to receive an application package of a target application and determine a first method to be updated in the application package, where the application package includes multiple methods;

[0099] The second processing module 502 is used to determine the inlined first method and the corresponding target caller based on the inline relationship between the multiple methods in the application package, and obtain an inline configuration file, where the inline configuration file is used to characterize the inline relationship between the first method and the corresponding target caller in the target application;

[0100] The sending module 503 is used to send the inline configuration file to the server of the target application so as to save it through the server.

[0101] In some optional implementations, the second processing module 502 includes:

[0102] A search unit, used for traversing the product instructions of the application package to obtain an inline relationship set, wherein the inline relationship set includes an inline relationship corresponding to each method, and the inline relationship includes a caller and a corresponding inlined party;

[0103] The screening unit is used to determine a target inline relationship based on a matching result between the first method and each inlined party, and take the caller in the target inline relationship as the target caller to obtain an inline configuration file. The target inline relationship refers to an inline relationship in which the inlined party is the first method in the inline relationship set.

[0104] In some optional embodiments, the screening unit comprises:

[0105] A matching unit, used for matching the first method name of the first method with the method name of the current inlined party to obtain a matching result;

[0106] The first execution unit is configured to determine that the inline relationship corresponding to the current inlined party is a target inline relationship if the matching result indicates that the method name of the current inlined party is the same as the first method name.

[0107] In some optional embodiments, the screening unit further comprises:

[0108] The second execution unit is configured to determine that the inline relationship corresponding to the current inlined party is a non-target inline relationship if the matching result indicates that the method name of the current inlined party is different from the first method name.

[0109] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0110] In this embodiment, a file generation device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0111] This embodiment provides an application update device, which is applied to a second device, such as Figure 6 As shown, including:

[0112] The acquisition module 601 is used to acquire an inline configuration file and a second method from a server of the target application in response to the target application being started, wherein the inline configuration file is used to represent an inline relationship between a first method to be updated in the target application and a corresponding target caller, and the second method is used to replace the first method;

[0113] The third processing module 602 is used to perform a deoptimization process on the target caller to release the inline relationship between the target caller and the first method;

[0114] The updating module 603 is used to establish an inline relationship between the target caller and the second method to obtain an updated target application.

[0115] In some optional implementations, the acquisition module 601 includes:

[0116] A sending unit, configured to send a query request to a server of the target application in response to the target application being started, wherein the query request is used to inquire whether there is a method to be updated in the target application;

[0117] The receiving unit is used to receive the response packet sent by the server and obtain the inline configuration file and the second method.

[0118] In some optional implementations, the third processing module 602 includes:

[0119] A function calling unit, used to call a deoptimization function from a bottom-level function of the current operating system;

[0120] The third execution unit is used to perform deoptimization processing on the target caller through a deoptimization function, so as to convert the way in which the target caller calls the first method from a code calling way to an instruction calling way.

[0121] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0122] The file generation device and application update device in this embodiment are both presented in the form of functional units, where the units refer to ASIC (Application Specific Integrated Circuit) circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0123] The present disclosure also provides an electronic device having the above Figure 5 The file generating device shown or Figure 6 The application update device shown.

[0124] See also Figure 7 , Figure 7is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present disclosure, such as Figure 7 As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0125] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0126] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0127] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0128] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0129] The electronic device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0130] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0131] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0132] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0133] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0134] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0135] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0136] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0137] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A file generation method, characterized in that: Applied to a first device, the method includes: receiving an application package of a target application, and determining a first method to be updated in the application package, wherein the application package includes a plurality of methods; Based on the inline relationship between the multiple methods in the application package, determine the first method to be inlined and the corresponding target caller, and obtain an inline configuration file, where the inline configuration file is used to characterize the inline relationship between the first method in the target application and the corresponding target caller; The inline configuration file is sent to the server of the target application to be saved by the server.

2. The method according to claim 1, characterized in that The determining, based on the inline relationship between the multiple methods in the application package, the first inline method and the corresponding target caller to obtain the inline configuration file includes: Traversing the product instructions of the application package to obtain an inline relationship set, wherein the inline relationship set includes an inline relationship corresponding to each method, and the inline relationship includes a caller and a corresponding inlined party; Based on the matching result between the first method and each inlined party, a target inline relationship is determined, and the caller in the target inline relationship is used as the target caller to obtain the inline configuration file. The target inline relationship refers to the inline relationship in which the inlined party is the first method in the inline relationship set.

3. The method according to claim 2, characterized in that The determining the target inline relationship based on the matching result between the first method and each inlined party includes: Matching the first method name of the first method with the method name of the current inlined party to obtain a matching result; If the matching result indicates that the method name of the current inlined party is the same as the first method name, then the inline relationship corresponding to the current inlined party is determined to be the target inline relationship.

4. The method according to claim 3, characterized in that The step of determining a target inline relationship based on a matching result between the first method and each inlined party further includes: If the matching result indicates that the method name of the current inlined party is different from the first method name, it is determined that the inline relationship corresponding to the current inlined party is a non-target inline relationship.

5. An application update method, characterized in that: Applied to the second device, the method includes: In response to the target application being started, obtaining an inline configuration file and a second method from a server of the target application, wherein the inline configuration file is used to represent an inline relationship between a first method to be updated in the target application and a corresponding target caller, and the second method is used to replace the first method; Deoptimizing the target caller to release the inline relationship between the target caller and the first method; An inline relationship is established between the target caller and the second method to obtain the updated target application.

6. The method according to claim 5, characterized in that In response to the target application being started, obtaining the inline configuration file from the server of the target application includes: In response to the target application being started, sending a query request to the server of the target application, wherein the query request is used to query whether there is a method to be updated in the target application; A response packet sent by the server is received to obtain the inline configuration file and the second method.

7. The method according to claim 5 or 6, characterized in that: The deoptimizing process of the target caller includes: Call the deoptimization function from the underlying function of the current operating system; The target caller is deoptimized by the deoptimization function, so as to convert the way in which the target caller calls the first method from a code calling way into an instruction calling way.

8. A file generating device, characterized in that: Applied to a first device, the apparatus comprises: A first processing module, configured to receive an application package of a target application and determine a first method to be updated in the application package, wherein the application package includes a plurality of methods; A second processing module is used to determine the first method to be inlined and the corresponding target caller based on the inline relationship between the multiple methods in the application package, and obtain an inline configuration file, where the inline configuration file is used to characterize the inline relationship between the first method in the target application and the corresponding target caller; The sending module is used to send the inline configuration file to the server of the target application so as to save it through the server.

9. An application updating device, characterized in that: Applied to a second device, the apparatus comprises: an acquisition module, configured to, in response to a target application being started, acquire an inline configuration file and a second method from a server of the target application, wherein the inline configuration file is used to represent an inline relationship between a first method to be updated in the target application and a corresponding target caller, and the second method is used to replace the first method; A third processing module, configured to perform a deoptimization process on the target caller to release the inline relationship between the target caller and the first method; An updating module is used to establish an inline relationship between the target caller and the second method to obtain the updated target application.

10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the file generation method according to any one of claims 1 to 4 or the application update method according to any one of claims 5 to 7 by executing the computer instructions.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the file generation method according to any one of claims 1 to 4 or the application updating method according to any one of claims 5 to 7.

12. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the file generation method according to any one of claims 1 to 4 or the application update method according to any one of claims 5 to 7.