Application program updating method, device, storage medium and electronic device

By determining and managing the running time of the target subroutine in the application, the problem of low application update monitoring efficiency is solved, and effective monitoring and management of the running time of each subroutine is realized, which improves update efficiency and avoids performance deterioration.

CN113791801BActive Publication Date: 2024-12-24ZHEJIANG SUNWAVE LEAPWAVE NETWORK CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111044708.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-07
Publication Date
2024-12-24
Estimated Expiration
2041-09-07

AI Technical Summary

Technical Problem

In the prior art, the monitoring efficiency of application updates is low, and it is impossible to effectively measure and meet the processing delay requirements of the MAC layer scheduling module, resulting in difficult time solving performance problems.

Method used

By obtaining the update request, the target run time of the target subroutine is determined, and the subroutines in the initial application are updated under the time conditions that the initial subroutine is met, so as to monitor and manage the run time of each subroutine of the application.

Benefits of technology

Improve the monitoring efficiency of application updates, ensure that the running time of each subprogram meets the requirements, avoids performance deterioration, and simplifies the code optimization and adjustment process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113791801B_ABST
    Figure CN113791801B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides an application updating method, device, storage medium and electronic device, wherein the method comprises: obtaining an update request, wherein the update request is used to request to update an initial subprogram in an initial application to a target subprogram, wherein the multiple subprograms divided by the initial application include the initial subprogram; determining the target running time of the target subprogram according to the initial application and the target subprogram; when the target running time satisfies the initial time condition corresponding to the initial subprogram, responding to the update request, updating the initial subprogram in the initial application to the target subprogram, and obtaining the target application. Through the present invention, the problem of low monitoring efficiency of application updating existing in the related art is solved, thereby achieving the effect of improving the monitoring efficiency of application updating.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computers, and in particular, to a method, device, storage medium and electronic device for updating an application program. Background Art

[0002] Compared with traditional macro base stations, due to the limitation of product size and cost control, the hardware platform selected for pico base stations is relatively poor in computing power and storage performance. This requires the software module to achieve the highest possible processing performance under limited computing power and storage performance. The MAC layer in the base station protocol stack is responsible for the scheduling of air interface resources. Under the TDD standard, due to the requirements of the frame structure, the scheduling module of the MAC layer is required to strictly meet the timing requirements in terms of processing delay. If the scheduling processing is not completed at a specific time, it will affect the performance indicators of the pico base station product.

[0003] The traditional software development process conducts manual functional testing after development to verify whether the product performance meets the requirements. This method lacks the measurement of the processing delay of the scheduling module and cannot intuitively grasp the margin of the current processing delay. If the product performance cannot meet the requirements, it usually means that the software processing flow has deteriorated to a level that is difficult to repair. At this time, it can only be remedied by spending a lot of effort to optimize and adjust the code architecture.

[0004] With regard to the problem of low efficiency in monitoring updates of application programs existing in the related art, no effective solution has been proposed so far. Summary of the invention

[0005] Embodiments of the present invention provide a method, device, storage medium and electronic device for updating an application program, so as to at least solve the problem of low efficiency in monitoring the update of the application program existing in the related art.

[0006] According to one embodiment of the present invention, there is provided a method for updating an application, comprising: obtaining an update request, wherein the update request is used to request that an initial subprogram in an initial application be updated to a target subprogram, wherein a plurality of subprograms divided by the initial application include the initial subprogram; determining a target running time of the target subprogram based on the initial application and the target subprogram; and in a case where the target running time satisfies an initial time condition corresponding to the initial subprogram, responding to the update request, updating the initial subprogram in the initial application to the target subprogram, and obtaining a target application.

[0007] Optionally, based on the initial application and the target subprogram, determining the target running time of the target subprogram includes: merging the target subprogram with the initial application to obtain a test program; testing the test program in a simulated running environment to obtain a test result; and extracting the target running time from the test result.

[0008] Optionally, extracting the target running time from the test result includes: determining a first code corresponding to a first label and a second code corresponding to a second label in the program code of the test program, wherein the first label is used to mark the start code of the program code of the target subroutine in the program code of the test program, and the second label is used to mark the end code of the program code of the target subroutine in the program code of the test program; obtaining a first running time of the first code and a second running time of the second code from the test result; and determining the difference between the second running time and the first running time as the target running time.

[0009] Optionally, updating the initial subprogram in the initial application to the target subprogram to obtain the target application includes: acquiring the target subprogram according to the update request; and replacing the initial subprogram in the initial application with the target subprogram to obtain the target application.

[0010] Optionally, in response to the update request, the initial subprogram in the initial application is updated to the target subprogram, and before the target application is obtained, the method also includes: obtaining a target reference time corresponding to the initial subprogram from subprograms and reference times having a corresponding relationship; when the target reference time is greater than or equal to the target running time, determining that the target running time satisfies the initial time condition corresponding to the initial subprogram; when the target reference time is less than the target running time, determining that the target running time does not satisfy the initial time condition corresponding to the initial subprogram.

[0011] Optionally, after determining the target running time of the target subprogram based on the initial application and the target subprogram, the method further includes: rejecting the update request if the target running time does not satisfy the initial time condition corresponding to the initial subprogram; and sending an alarm message to the initiator of the update request, wherein the alarm message is used to indicate that the update request is rejected because the target running time does not satisfy the initial time condition corresponding to the initial subprogram.

[0012] Optionally, in response to the update request, the initial subprogram in the initial application is updated to the target subprogram to obtain the target application, and the method further includes: updating the target running time corresponding to the target subprogram to the historical update record to obtain a current update record, wherein the historical update record is used to indicate the historical running time of the historically updated subprogram obtained after executing a historical update request on a subprogram among the multiple subprograms; and adjusting the time conditions corresponding to each subprogram among the multiple subprograms according to the running time recorded in the current update record.

[0013] According to another embodiment of the present invention, there is also provided an application updating device, comprising: a first acquisition module, used to obtain an update request, wherein the update request is used to request to update an initial subprogram in an initial application to a target subprogram, and a plurality of subprograms divided by the initial application include the initial subprogram; a first determination module, used to determine a target running time of the target subprogram based on the initial application and the target subprogram; and a first update module, used to respond to the update request, if the target running time satisfies an initial time condition corresponding to the initial subprogram, and to update the initial subprogram in the initial application to the target subprogram to obtain a target application.

[0014] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.

[0015] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0016] Through the present invention, an update request is obtained, wherein the update request is used to request that an initial subprogram in an initial application be updated to a target subprogram, and the multiple subprograms divided by the initial application include the initial subprogram; the target running time of the target subprogram is determined according to the initial application and the target subprogram; when the target running time satisfies the initial time condition corresponding to the initial subprogram, the update request is responded to, the initial subprogram in the initial application is updated to the target subprogram, and the target application is obtained, that is, the initial application includes multiple subprograms, and the update request can update the subprogram in the initial application, and the initial subprogram among the multiple subprograms in the initial application is updated to the target subprogram, and the running time of the updated subprogram will also change, and then the target running time of the target subprogram obtained by the update request can be determined according to the initial application and the target subprogram, different subprograms will correspond to different time conditions, and only when the target running time of the target subprogram satisfies the initial time condition corresponding to the initial subprogram, the update request is responded to update the initial subprogram in the initial application to the target subprogram, thereby realizing the monitoring of the running time of each subprogram contained in the application, and therefore, the problem of low monitoring efficiency of application update existing in the related art is solved, and the effect of improving the monitoring efficiency of application update is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a block diagram of the hardware structure of a mobile terminal of the method for updating an application program according to an embodiment of the present invention;

[0018] Figure 2 is a flowchart of a method for updating an application according to an embodiment of the present invention;

[0019] Figure 3 is an optional runtime monitoring flow chart according to an embodiment of the present application;

[0020] Figure 4 4 is a structural block diagram of an application updating device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0023] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1FIG. 1 is a block diagram of the hardware structure of a mobile terminal of the method for updating an application program according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0024] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the updating method of the application program in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal 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.

[0025] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0026] In this embodiment, a method for updating an application is provided. Figure 2 is a flow chart of a method for updating an application according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0027] Step S202, obtaining an update request, wherein the update request is used to request to update an initial subprogram in an initial application to a target subprogram, wherein the initial application is divided into a plurality of subprograms including the initial subprogram;

[0028] Step S204, determining a target running time of the target subprogram according to the initial application program and the target subprogram;

[0029] Step S206, when the target running time satisfies the initial time condition corresponding to the initial subprogram, respond to the update request, update the initial subprogram in the initial application to the target subprogram, and obtain the target application.

[0030] Through the above steps, the initial application includes multiple subprograms, and the update request can update the subprograms in the initial application, and update the initial subprogram among the multiple subprograms in the initial application to the target subprogram. The running time of the updated subprogram will also change, and then the target running time of the target subprogram updated by the update request can be determined according to the initial application and the target subprogram. Different subprograms will correspond to different time conditions. When the target running time of the target subprogram meets the initial time condition corresponding to the initial subprogram, the update request will be responded to, and the initial subprogram in the initial application will be updated to the target subprogram, thereby realizing the monitoring of the running time of each subprogram contained in the application. Therefore, the problem of low monitoring efficiency of application updates existing in the related art is solved, and the effect of improving the monitoring efficiency of application updates is achieved.

[0031] In the technical solution provided in the above step S202, the initial application may be, but is not limited to, in the form of a code library, and the code stored in the code library may be, but is not limited to, divided into multiple code segments according to the functions implemented by each part, thereby obtaining multiple subroutines.

[0032] Optionally, in this embodiment, the update request can be an update to the code of the subroutine, such as updating one or more lines of code in the initial subroutine to other code, replacing all the code of the initial subroutine with the code of the target subroutine, adding code to a specific location in the initial subroutine, etc. This solution does not limit this.

[0033] Optionally, in this embodiment, the change request may be generated by an account corresponding to a program operator. When the program operator submits a program code that needs to be changed for a subprogram, a change request is generated.

[0034] In the technical solution provided in the above step S204, the target running time of the target subroutine may be determined by running the program in a simulated running environment, and the running times obtained by running the program in different simulated running environments are different.

[0035] Optionally, in this embodiment, the running time of the target subroutine can be obtained by running the target subroutine in the running environment. Labels or breakpoints can also be set at the starting position and the ending position of the target subroutine code, and the target subroutine can be merged into the initial application. The running time of the target subroutine can be determined by running the merged initial application and based on the absolute running time to the label or breakpoint. This solution does not limit this.

[0036] In the technical solution provided in the above step S206, the initial time condition may be a time threshold range that the delay of the initial subroutine needs to fall within, which is pre-set for the initial subroutine. The time threshold range may be set according to demand or requirements for the initial subroutine, and different subroutines may correspond to different time conditions.

[0037] Optionally, in this embodiment, the target subprogram can be obtained by updating the initial subprogram according to an update request. In this embodiment, after obtaining the update request, the corresponding initial subprogram can be first copied to a specific storage space, which can be the same as or different from the storage space for storing the initial application. The initial subprogram is updated in the storage space according to the update request to obtain the target subprogram, and the initial subprogram in the initial application is replaced with the target subprogram when the running time of the target subprogram meets the corresponding initial time condition, or the initial subprogram in the initial application is updated to the target subprogram according to the update request.

[0038] As an optional embodiment, determining the target running time of the target subprogram according to the initial application program and the target subprogram includes:

[0039] S11, merging the target subprogram with the initial application program to obtain a test program;

[0040] S12, testing the test program in a simulated running environment to obtain a test result;

[0041] S13, extracting the target running time from the test result.

[0042] Alternatively, in this embodiment, merging the target subprogram and the initial application may include replacing all the codes of the initial subprogram corresponding to the target subprogram in the initial application with the codes of the target subprogram, or may include comparing the codes of the initial subprogram and the target subprogram and replacing the codes in the initial subprogram that are different from the target subprogram with the codes of the target subprogram.

[0043] Optionally, in this embodiment, the test result may include only the running time of the target subprogram, or may include the running time of the target subprogram and the running time of other subprograms included in the initial application program, which is not limited in this solution.

[0044] Optionally, in this embodiment, labels can be set at the code start position and code end position of each subroutine. When the initial application is running, the execution time of the code corresponding to the label can be detected, and then the running time of each subroutine can be determined based on the label, thereby extracting the target running time from the test results.

[0045] As an optional embodiment, extracting the target running time from the test result includes:

[0046] S21, determining a first code corresponding to a first label and a second code corresponding to a second label in the program code of the test program, wherein the first label is used to mark the start code of the program code of the target subroutine in the program code of the test program, and the second label is used to mark the end code of the program code of the target subroutine in the program code of the test program;

[0047] S22, acquiring a first running time of the first code and a second running time of the second code from the test result;

[0048] S23: Determine a difference between the second running time and the first running time as the target running time.

[0049] Optionally, in this embodiment, the first code can be one or more consecutive codes at the starting position of the program code. For example, the first code at the starting position of the program code can be set as the first code, and the first line of code at the starting position of the program code can also be set as the first code. This solution does not limit this.

[0050] Optionally, in this embodiment, the second code may be one or more codes at the termination position of the program code. For example, the last code of the program code may be set as the second code, or the last line of the program code may be set as the second code. This solution does not limit this.

[0051] Optionally, in this embodiment, the first running time of the first code may represent the time when the target subprogram starts running, and the second running time of the second code may represent the time when the target subprogram finishes running. The target running time of the target subprogram can be obtained by calculating the difference between the two.

[0052] As an optional embodiment, updating the initial subprogram in the initial application program to the target subprogram to obtain the target application program includes:

[0053] S31, acquiring the target subprogram according to the update request;

[0054] S32, replacing the initial subprogram in the initial application with the target subprogram to obtain the target application.

[0055] Optionally, in this embodiment, the update request may include a target subprogram to be updated, and the target subprogram may be directly obtained in the update request by parsing the update request. The update request may also only include part of the code of the initial subprogram that needs to be updated, and the corresponding code in the initial subprogram is updated to the content included in the update request to obtain the target subprogram. This scheme does not limit the method for obtaining the target subprogram according to the update request.

[0056] As an optional embodiment, before responding to the update request and updating the initial subprogram in the initial application program to the target subprogram to obtain the target application program, the method further includes:

[0057] S41, obtaining a target reference time corresponding to the initial subroutine from subroutines and reference times having a corresponding relationship;

[0058] S42, when the target reference time is greater than or equal to the target running time, determining that the target running time satisfies the initial time condition corresponding to the initial subroutine;

[0059] S43: When the target reference time is less than the target running time, determine that the target running time does not satisfy the initial time condition corresponding to the initial subroutine.

[0060] Optionally, in this embodiment, the reference time can be but is not limited to being used to represent the maximum acceptable delay during the execution of the subroutine. For example, the reference time can be set to 1 second, 1.1 seconds, 1.5 seconds, 2 seconds, etc. This solution does not specifically limit the value of the reference time.

[0061] Optionally, in this embodiment, the reference time corresponding to each subroutine can be flexibly set according to requirements or characteristics of each subroutine, and different subroutines correspond to different reference times.

[0062] As an optional embodiment, after determining the target running time of the target subprogram according to the initial application program and the target subprogram, the method further includes:

[0063] S51, rejecting the update request if the target running time does not satisfy the initial time condition corresponding to the initial subroutine;

[0064] S52: Send a warning message to the initiator of the update request, wherein the warning message is used to indicate that the update request is rejected because the target running time does not satisfy the initial time condition corresponding to the initial subroutine.

[0065] Optionally, in this embodiment, the warning message may be a message in the form of audio, reminder text, etc. For example, when the update request is rejected, the client of the initiator of the update request will receive a warning message that "the current changes do not meet the runtime requirements".

[0066] As an optional embodiment, after responding to the update request, updating the initial subprogram in the initial application program to the target subprogram, and obtaining the target application program, the method further includes:

[0067] S61, updating the target running time corresponding to the target subprogram to the historical update record to obtain a current update record, wherein the historical update record is used to indicate the historical running time of the historically updated subprogram obtained after executing a historical update request on a subprogram among the multiple subprograms;

[0068] S62: adjusting a time condition corresponding to each subprogram of the plurality of subprograms according to the running time recorded in the current update record.

[0069] Optionally, in this embodiment, the reference time of each subroutine can be adjusted by increasing or decreasing the reference time by a certain amplitude. For example, when it is detected that the historical running time of a subroutine of the initial application program for a certain number of times is less than the reference time of the subroutine, the reference time value of the subroutine is reduced by a certain amplitude.

[0070] Figure 3 This is an optional runtime monitoring flow chart according to an embodiment of the present application, which can be applied to, but not limited to, monitoring the runtime of applications in a pico base station, such as Figure 3As shown, the initial application includes multiple subroutines, each of which is set with a corresponding reference running time. The reference running time is usually determined by factors such as frame structure configuration, communication delay between MAC and RLC, and processing capacity of PHY, and needs to be determined in combination with the specific implementation of the initial application. The reference running time is divided into the overall reference running time and the sub-reference running time of each subroutine. The overall reference running time is usually 90% of the maximum available scheduling time, and the sub-reference running time of each subroutine is proportionally allocated according to the time consumption of each subroutine's code flow; the monitoring module checks the code changes, and triggers the process when the code changes are detected. When there is a functional change, the initiator of the request submits the code flow. The monitoring module detects the code change and starts the system work. The code changes are first merged with the current code base code, and a new test version is constructed and sent to the data acquisition module for the next step; the data acquisition module executes the scheduling process, counts and records the running time data of each subroutine, and the data acquisition module receives the test version sent by the monitoring module and loads the test version into the simulation operation Run environment, execute test actions, the built-in breakpoints of the test version can output the processing start and end time of each subroutine, and save the execution results to the database. If there is no record in the database, the current result will be set as the baseline data. If there is a historical record in the database, the data will be summarized and the decision module process will be triggered; the decision module makes a decision result based on the comparison of the results reported by the data acquisition module with the baseline data. The decision module receives the test result data and calculates the decision result according to the preset decision model. If the result exceeds the corresponding sub-reference time, an alarm is issued and the update request is rejected, otherwise the update request is approved; the statistical module reads the results of the data acquisition module and the decision module in the database, organizes the data, and outputs the program operation monitoring report. The delay monitoring report can be generated through the statistical module to display the running time statistical details of the historical version, including the overall running time of the initial application and the actual running time of each subroutine, the running time margin between the actual running time of each subroutine and the sub-reference running time, and the change of the sub-reference running time of each subroutine.

[0071] Through the above embodiments, firstly, the automatic collection of the application's runtime data can be realized. After setting the reference runtime, no manual intervention is required, and the operation results can be automatically analyzed and output as reports. Secondly, the delay performance of the application of the scheduling module can be warned and guarded to avoid gradual performance deterioration. In addition, the runtime data of the application is modularized and visualized to provide guidance for function development and code optimization. In addition, the decision module can consider the importance of function changes and comprehensively coordinate function implementation and performance requirements.

[0072] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0073] In this embodiment, a device for updating an application is also provided. Figure 4 is a structural block diagram of an application updating device according to an embodiment of the present invention, such as Figure 4 As shown, the device includes: a first acquisition module 42, used to obtain an update request, wherein the update request is used to request to update an initial subprogram in an initial application to a target subprogram, and a plurality of subprograms divided by the initial application include the initial subprogram; a first determination module 44, used to determine a target running time of the target subprogram based on the initial application and the target subprogram; and a first update module 46, used to respond to the update request, if the target running time satisfies an initial time condition corresponding to the initial subprogram, and update the initial subprogram in the initial application to the target subprogram to obtain a target application.

[0074] Optionally, the first determination module includes: a merging unit, used to merge the target subroutine with the initial application program to obtain a test program; a testing unit, used to test the test program in a simulated running environment to obtain a test result; and an extraction unit, used to extract the target running time from the test result.

[0075] Optionally, the extraction unit is used to: determine a first code corresponding to a first label and a second code corresponding to a second label in the program code of the test program, wherein the first label is used to mark the start code of the program code of the target subroutine in the program code of the test program, and the second label is used to mark the end code of the program code of the target subroutine in the program code of the test program; obtain a first running time of the first code and a second running time of the second code from the test result; and determine the difference between the second running time and the first running time as the target running time.

[0076] Optionally, the first update module includes: an acquisition unit, configured to acquire the target subprogram according to the update request; and a replacement unit, configured to replace the initial subprogram in the initial application with the target subprogram to obtain the target application.

[0077] Optionally, the device also includes: a second acquisition module, used to update the initial subprogram in the initial application to the target subprogram in response to the update request, and before obtaining the target application, obtain the target reference time corresponding to the initial subprogram from the subprograms and reference times with corresponding relationships; a second determination module, used to determine that the target running time satisfies the initial time condition corresponding to the initial subprogram when the target reference time is greater than or equal to the target running time; and a third determination module, used to determine that the target running time does not satisfy the initial time condition corresponding to the initial subprogram when the target reference time is less than the target running time.

[0078] Optionally, the device also includes: a processing module, used to reject the update request after determining the target running time of the target subprogram based on the initial application and the target subprogram, if the target running time does not meet the initial time condition corresponding to the initial subprogram; a sending module, used to send an alarm message to the initiator of the update request, wherein the alarm message is used to indicate that the update request is rejected because the target running time does not meet the initial time condition corresponding to the initial subprogram.

[0079] Optionally, the device also includes: a second update module, used to update the initial subprogram in the initial application to the target subprogram in response to the update request, and after obtaining the target application, update the target running time corresponding to the target subprogram to the historical update record to obtain a current update record, wherein the historical update record is used to indicate the historical running time of the historical update subprogram obtained after executing a historical update request on a subprogram among the multiple subprograms; an adjustment module, used to adjust the time conditions corresponding to each subprogram among the multiple subprograms according to the running time recorded in the current update record.

[0080] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0081] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0082] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0083] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0084] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0085] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0086] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0087] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for updating an application, characterized in that: The method is applied to update the application of the pico base station, and includes: Obtaining an update request, wherein the update request is used to request that an initial subprogram in an initial application be updated to a target subprogram, wherein a plurality of subprograms divided by the initial application include the initial subprogram, wherein the target subprogram is obtained by: responding to the update request, copying the initial subprogram to a target storage space; updating the initial subprogram in response to the update request in the target storage space to obtain the target subprogram, wherein updating the initial subprogram in response to the update request in the target storage space to obtain the target subprogram includes: in the case of determining that the updated subprogram will satisfy an initial time condition corresponding to the initial subprogram, updating the initial subprogram to the target subprogram in response to the update request; Determining a target running time of the target subprogram according to the initial application program and the target subprogram; Wherein, determining the target running time of the target subprogram according to the initial application and the target subprogram comprises: merging the target subprogram with the initial application to obtain a test program; testing the test program in a simulated running environment to obtain a test result; extracting the target running time from the test result; Extracting the target running time from the test result includes: determining a first code corresponding to a first label and a second code corresponding to a second label in the program code of the test program, wherein the first label is used to mark the start code of the program code of the target subroutine in the program code of the test program, and the second label is used to mark the end code of the program code of the target subroutine in the program code of the test program; obtaining a first running time of the first code and a second running time of the second code from the test result; and determining the difference between the second running time and the first running time as the target running time; In a case where the target running time satisfies the initial time condition corresponding to the initial subprogram, responding to the update request, updating the initial subprogram in the initial application program to the target subprogram, and obtaining a target application program; After the target application is obtained by updating the initial subprogram in the initial application to the target subprogram in response to the update request, the method further includes: updating the target running time corresponding to the target subprogram to a historical update record to obtain a current update record, wherein the historical update record is used to indicate the historical running time of the historically updated subprogram obtained after executing the historical update request on a subprogram among the multiple subprograms; adjusting the time condition corresponding to each subprogram among the multiple subprograms according to the running time recorded in the current update record; In response to the update request, before updating the initial subprogram in the initial application to the target subprogram and obtaining the target application, the method further includes: obtaining a target reference time corresponding to the initial subprogram from the subprograms and reference times having a corresponding relationship; determining that the target running time satisfies the initial time condition corresponding to the initial subprogram when the target reference time is greater than or equal to the target running time; and determining that the target running time does not satisfy the initial time condition corresponding to the initial subprogram when the target reference time is less than the target running time; After determining the target running time of the target subprogram according to the initial application and the target subprogram, the method further includes: rejecting the update request if the target running time does not satisfy the initial time condition corresponding to the initial subprogram; sending a warning message to the initiator of the update request, wherein the warning message is used to indicate that the update request is rejected because the target running time does not satisfy the initial time condition corresponding to the initial subprogram; When it is detected that a certain number of historical running times of the target subprogram in the initial application program is less than the reference time of the target subprogram, the reference time of the target subprogram is reduced by a certain amount.

2. The method according to claim 1, characterized in that Updating the initial subprogram in the initial application program to the target subprogram to obtain the target application program includes: Acquire the target subprogram according to the update request; The initial subprogram in the initial application is replaced by the target subprogram to obtain the target application.

3. An application updating device, characterized in that: include: A first acquisition module is used to acquire an update request, wherein the update request is used to request to update an initial subprogram in an initial application to a target subprogram, wherein the multiple subprograms divided by the initial application include the initial subprogram, wherein the target subprogram is obtained by: responding to the update request, copying the initial subprogram to a target storage space; updating the initial subprogram in response to the update request in the target storage space to obtain the target subprogram, wherein updating the initial subprogram in response to the update request in the target storage space to obtain the target subprogram includes: in the case of determining that the updated subprogram will meet the initial time condition corresponding to the initial subprogram, updating the initial subprogram to the target subprogram in response to the update request; A first determining module, configured to determine a target running time of the target subprogram according to the initial application program and the target subprogram; A first updating module, configured to respond to the update request and update the initial subprogram in the initial application program to the target subprogram to obtain a target application program when the target running time satisfies the initial time condition corresponding to the initial subprogram; The device further comprises: a second updating module, configured to update the initial subprogram in the initial application to the target subprogram in response to the update request, and after obtaining the target application, update the target running time corresponding to the target subprogram to a historical update record to obtain a current update record, wherein the historical update record is used to indicate the historical running time of the historically updated subprogram obtained after executing the historical update request on a subprogram in the plurality of subprograms; an adjusting module, configured to adjust the time condition corresponding to each subprogram in the plurality of subprograms according to the running time recorded in the current update record; The first determination module further includes: a merging unit for merging the target subprogram with the initial application program to obtain a test program; a testing unit for testing the test program in a simulated running environment to obtain a test result; and an extraction unit for extracting the target running time from the test result. The extraction unit is further used to: determine, in the program code of the test program, a first code corresponding to a first label and a second code corresponding to a second label, wherein the first label is used to mark the start code of the program code of the target subroutine in the program code of the test program, and the second label is used to mark the end code of the program code of the target subroutine in the program code of the test program; obtain a first running time of the first code and a second running time of the second code from the test result; and determine the difference between the second running time and the first running time as the target running time; The device further comprises: an acquisition module, configured to update the initial subprogram in the initial application program to the target subprogram in response to the update request, and before obtaining the target application program, acquire the target reference time corresponding to the initial subprogram from the subprograms and reference times having a corresponding relationship; a second determination module, configured to determine that the target running time satisfies the initial time condition corresponding to the initial subprogram when the target reference time is greater than or equal to the target running time; and a third determination module, configured to determine that the target running time does not satisfy the initial time condition corresponding to the initial subprogram when the target reference time is less than the target running time; The device further includes: a rejection module, configured to, after determining the target running time of the target subprogram according to the initial application and the target subprogram, reject the update request if the target running time does not satisfy the initial time condition corresponding to the initial subprogram; a sending module, configured to send an alarm message to the initiator of the update request, wherein the alarm message is used to indicate that the update request is rejected because the target running time does not satisfy the initial time condition corresponding to the initial subprogram; When it is detected that a certain number of historical running times of the target subprogram in the initial application program is less than the reference time of the target subprogram, the reference time of the target subprogram is reduced by a certain amount.

4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 2 when executed by a processor.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 2 are implemented.