CN117421068A - Application cold start method, system, device, computer equipment and storage medium - Google Patents

Application cold start method, system, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117421068A
CN117421068A CN202311482495.1A CN202311482495A CN117421068A CN 117421068 A CN117421068 A CN 117421068A CN 202311482495 A CN202311482495 A CN 202311482495A CN 117421068 A CN117421068 A CN 117421068A
Authority
CN
China
Prior art keywords
starting
target
core
target application
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311482495.1A
Other languages
Chinese (zh)
Other versions
CN117421068B (en
Inventor
周博立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shuhang Technology Beijing Co ltd
Original Assignee
Shuhang Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shuhang Technology Beijing Co ltd filed Critical Shuhang Technology Beijing Co ltd
Priority to CN202311482495.1A priority Critical patent/CN117421068B/en
Publication of CN117421068A publication Critical patent/CN117421068A/en
Application granted granted Critical
Publication of CN117421068B publication Critical patent/CN117421068B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure discloses an application cold start method, system, device, computer equipment and storage medium, the method comprising: acquiring starting data of cold starting of a target application and a cold starting result of the target application; if the cold start result is that the cold start fails, acquiring target configuration data from historical start data of the target application based on start key information of the target application, wherein the start key information comprises: at least one of target starting time consumption, target core starting task starting success rate and target non-core starting task starting success rate; and responding to a cold start request of the target application, and carrying out cold start on the target application according to the target configuration data. When the cold start of the target application fails, the target configuration data is obtained based on the start key information and the historical start data corresponding to the target application, and then the target application is cold started according to the target configuration data, so that continuous cold start failure of the application can be avoided, and the time consumption of the cold start of the application can be reduced.

Description

Application cold start method, system, device, computer equipment and storage medium
Technical Field
The disclosure relates to the technical field of application control, and in particular relates to an application cold start method, an application cold start system, an application cold start device, computer equipment and a storage medium.
Background
In the process of cold start application, the client side needs to request differentiated or incremental configuration data from the server side according to the stored configuration parameters, and then cold start is performed based on the configuration data; however, when the configuration data has errors, the application cold start fails, and when the client performs cold start again, if the configuration data is issued after being corrected, the client performs incremental pulling, but the time is later than the time when the core task group reads the cached configuration information, so that the task group reads the error data stored last time again and flashes back again, and the continuous cold start failure of the client is caused;
the existing scheme is that configuration data is preferentially pulled and consumed every time of cold start, then a core task and a subsequent task group are executed, or auditing and verification are carried out when the configuration data is issued by a server, gray scale and testing are carried out in advance, and the issued configuration data is ensured to be correct, but the existing scheme can cause the increase of time consumption of cold start application and influence user experience.
Therefore, how to avoid continuous cold start failure of the client and reduce the time consumption of application cold start is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the disclosure provides an application cold start method, an application cold start system, an application cold start device, computer equipment and a storage medium, which can avoid continuous cold start failure of a client and reduce time consumption of application cold start.
In a first aspect, an embodiment of the present disclosure provides an application cold start method, the method including:
receiving starting data of cold starting of a target application;
evaluating the starting data according to a preset evaluation rule, and judging whether the target application fails cold starting according to an evaluation result;
if the target application fails to be cold started, acquiring target configuration data based on historical starting data corresponding to the target application;
and responding to the cold start request of the target application, and carrying out cold start on the target application according to the target configuration data.
In a second aspect, embodiments of the present disclosure provide an application cold start system comprising: the client and the server are in communication connection, and the application cold start system is used for executing the following steps:
the client is used for acquiring starting data of the cold start of the target application and a cold start result of the target application;
The server is used for obtaining target configuration data from historical starting data of the target application based on starting key information of the target application, wherein the starting key information comprises: at least one of the time consumption of target starting, the starting success rate of target core starting tasks and the starting success rate of target non-core starting tasks, and sending target configuration data to a client of the target application;
and the client is used for receiving the target configuration data, responding to the cold start request of the target application and carrying out cold start on the target application according to the target configuration data.
In a third aspect, an embodiment of the present disclosure provides an application cold start apparatus including:
the receiving unit is used for receiving starting data of cold starting of the target application;
the evaluation unit is used for evaluating the starting data according to a preset evaluation rule and judging whether the target application fails cold start according to an evaluation result;
the obtaining unit is used for obtaining target configuration data based on the historical starting data corresponding to the target application if the target application fails to be cold started;
and the starting unit is used for responding to the cold start request of the target application and carrying out cold start on the target application according to the target configuration data.
In a fourth aspect, embodiments of the present disclosure further provide a computer device, including a client and/or a server, the computer device configured with a processor and a memory, the memory storing a plurality of instructions; the processor loads instructions from the memory to perform any of the steps of applying the cold start method provided by the embodiments of the present disclosure.
In a fifth aspect, embodiments of the present disclosure further provide a storage medium, where the storage medium is a computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform any of the steps of applying the cold start method provided by the embodiments of the present disclosure.
In a sixth aspect, the disclosed embodiments also provide a computer program product comprising a computer program or instructions which, when executed by a processor, implement steps in any of the application cold start methods provided by the disclosed embodiments.
By adopting the scheme of the application embodiment, the starting data of the cold start of the target application and the cold start result of the target application are obtained; if the cold start result is that the cold start fails, acquiring target configuration data from historical start data of the target application based on start key information of the target application, wherein the start key information comprises: at least one of target starting time consumption, target core starting task starting success rate and target non-core starting task starting success rate; and responding to a cold start request of the target application, and carrying out cold start on the target application according to the target configuration data. When the cold start of the target application fails, the target configuration data is obtained based on the start key information and the historical start data corresponding to the target application, and then the target application is cold started according to the target configuration data, so that continuous cold start failure of the application can be avoided, and the time consumption of the cold start of the application can be reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to those skilled in the art.
FIG. 1 is a schematic flow diagram of one embodiment of an application cold start method provided in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of application cold start system client and server interactions provided in an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of a specific implementation of the application cold start method provided in an embodiment of the disclosure;
FIG. 4 is a schematic diagram of a structure of an application cold start device provided in an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an application cold start system provided in an embodiment of the present disclosure.
Detailed Description
The following description of the technical solutions in the embodiments of the present disclosure will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of the disclosure. Meanwhile, in the description of the embodiments of the present disclosure, the terms "first", "second", and the like are used solely to distinguish the description and are not to be construed as indicating or implying relative importance. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present disclosure, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The embodiment of the disclosure provides an application cold start method, a system, a device, computer equipment and a storage medium.
Specifically, embodiments of the present disclosure will be described from the perspective of a computer device, which may specifically include a smart phone, a smart computer, a back-end smart terminal, and the like, that is, embodiments of the present disclosure apply a cold start method to be executed by the computer device.
The following detailed description is given with reference to the accompanying drawings, in which embodiments of the disclosure take a computer device as an example. The following description of the embodiments is not intended to limit the preferred embodiments. Although a logical order is depicted in the flowchart, in some cases the steps shown or described may be performed in an order different than depicted in the figures.
Referring to fig. 1, an embodiment of the method for applying cold start specifically includes the following steps:
step 101, receiving starting data of cold starting of a target application;
step 102, if the cold start result is a cold start failure, obtaining target configuration data from historical start data of the target application based on start key information of the target application, where the start key information includes: at least one of target starting time consumption, target core starting task starting success rate and target non-core starting task starting success rate;
And step 103, responding to the cold start request of the target application, and carrying out cold start on the target application according to the target configuration data.
In this embodiment, when a user cold starts a target application, a computer device receives start data of cold start of the target application, where the computer device may be a smart phone, a smart computer, or other devices (client device) used by the user, or may be a back-end smart terminal (server device) corresponding to the target application; the computer equipment evaluates the starting data according to a preset evaluation rule, judges whether the target application fails cold start according to an evaluation result, and if the target application fails cold start, obtains target configuration data from historical starting data of the target application based on starting key information of the target application, wherein the starting key information comprises: at least one of target starting time consumption, target core starting task starting success rate and target non-core starting task starting success rate; and the computer equipment responds to a cold start request sent by a user based on the target application, and performs cold start on the target application according to the target configuration data, so that the cold start of the target application is successful. It should be noted that the target configuration data is the optimal configuration data in all configuration data of the successful cold start of the target application in the history, or the optimal configuration data obtained by integrating all configuration data of the successful cold start of the target application in the history by the computer device.
The computer equipment of the embodiment obtains starting data of cold starting of the target application and a cold starting result of the target application; if the cold start result is that the cold start fails, acquiring target configuration data from historical start data of the target application based on start key information of the target application, wherein the start key information comprises: at least one of target starting time consumption, target core starting task starting success rate and target non-core starting task starting success rate; and responding to a cold start request of the target application, and carrying out cold start on the target application according to the target configuration data. When the cold start of the target application fails, the target configuration data is obtained based on the start key information and the historical start data corresponding to the target application, and then the target application is cold started according to the target configuration data, so that continuous cold start failure of the application can be avoided, and the time consumption of the cold start of the application can be reduced.
Specifically, each step is described in detail below:
step 101, acquiring starting data of cold starting of a target application and a starting result of the target application;
in the step, when a user starts a target application in a cold mode, the computer equipment receives starting data of the target application in the cold mode, and evaluates a core starting task and a non-core starting task of the target application in the cold starting process based on the starting data according to a preset evaluation rule to obtain a starting result of the target application.
It should be noted that, cold start is that the client device is triggered by clicking the target application by the user under the condition that the client device does not cache any historical starting and loading information, and the client device opens up a temporary random memory space and an independent process for the target application and distributes the temporary random memory space and the independent process to the target application for starting; in the cold start process of the target application, loading binary files of the target application in a memory and a process allocated by a system, dynamically linking system library binary files and capability library binary files of some client devices to the binary files of the target application along with loading of the binary files of the target application, and simultaneously linking configuration data issued by a background server to the binary files of the target application, namely splicing and integrating the data of the parts into a binary file, uniformly placing the binary files in the memory opened by the client device for the target application to run, so that the target application executes core start tasks and non-core start tasks in the memory, and at the moment, the data generated after the target application executes the core start tasks and the non-core start tasks according to the configuration data in the binary files are the start data of the cold start of the target application, namely, whether the core start tasks and the non-core start tasks are successfully executed or not can generate corresponding start data, and the core start history tasks and the non-core start tasks are successfully executed or not generate corresponding start data to be added into the start data, so that the target configuration data can be conveniently obtained later.
It should be noted that, the core start task is a key start task in the process of cold start of the target application, and only if each core start task is successfully executed, the target application can be successfully cold started, and the core start task includes: a security mode loading task, a thermal repair module loading task, a buried point module loading task, a configuration data loading task, an experimental data loading task and the like; the non-core starting task is a non-key starting task in the cold starting process of the target application, and even if a small number of unimportant non-core starting tasks fail to be executed, the success of the cold starting of the target application is not affected, and the non-core starting task comprises: dynamic module loading task, long link module loading task, RN module loading task, service starting task group, advertisement service loading task, community service loading task, electric service loading task, live service loading task and the like.
Specifically, since the target application is generally downloaded in the client device, when the computer device executing the method is a smart phone, a smart computer or other devices used by a user, the computer device can directly obtain the start data of the cold start of the target application, and when the computer device executing the method is a back-end smart terminal corresponding to the target application, the client device is required to send the start data of the cold start of the target application to the computer device.
Specifically, step 101 includes:
step 1011, obtaining core starting data in the starting data, and judging whether the target application has a core starting task with execution failure according to the core starting data;
in the step, the computer equipment acquires core starting data in starting data, and judges whether a core starting task which fails to be executed exists in the cold starting process of the target application according to the core starting data; it should be noted that, the core startup data is startup data generated when the target application executes the core startup task in the cold startup process, and the execution of the core startup task generates startup data corresponding to the core startup task no matter successful or failed. The core starting data comprise the execution time of the core starting task, the execution identification indicating the successful or failed execution of the core starting task and the like, optionally, the computer equipment directly judges whether the target application has the core starting task with the failed execution according to the execution identification, and optionally, the computer equipment comprehensively judges whether the target application has the core starting task with the failed execution according to the execution identification, the execution time and the like.
Further, judging whether the target application has a core starting task with execution failure according to the core starting data, including:
Step 10111, obtaining an execution identifier of each core starting task corresponding to the target application in the core starting data;
step 10112, if the execution flag indicates that the execution fails, determining that the target application has a core start task with the execution failure;
in step 10111 to step 10112, the computer device obtains the execution identifier of each core start task corresponding to the target application in the core start data, and if the execution identifier is execution failure, determines that the target application has the core start task with execution failure; it will be appreciated that the execution flag is used to indicate the execution result of the core boot task, and typically the execution flag is denoted as 1 or 0,1 represents the execution success of the core boot task, and 0 represents the execution failure of the core boot task.
Step 10113, if the execution flag is that the execution is successful, acquiring an execution duration of each core start task corresponding to the target application in the core start data;
in the step, the computer equipment acquires the execution identification of each core starting task corresponding to the target application in the core starting data, and if the execution identification corresponding to each core starting task is successful in execution, acquires the execution duration of each core starting task corresponding to the target application in the core starting data.
Step 10114, if the execution duration is greater than a preset duration threshold, determining that the target application has a core start task with execution failure;
step 10115, if the execution duration is not greater than the preset duration threshold, determining that the target application does not have a core start task with execution failure.
In steps 10114 to 10115, after obtaining the execution duration of each core start task, the computer device compares the execution duration of each core start task with a preset duration threshold, if the execution duration is greater than the preset duration threshold, determines that the target application has a core start task with execution failure, and if the execution duration is not greater than the preset duration threshold, determines that the target application does not have a core start task with execution failure. It can be understood that there are two conditions for judging whether there are core start tasks with execution failure, namely, the execution is identified as the execution failure, and the execution is identified as the execution success, but the execution time is longer than the preset time threshold.
Step 1012, if the target application has a core startup task with failed execution, determining that the cold startup result of the target application is cold startup failure;
in the step, if the computer equipment determines that the target application has a core starting task with execution failure, determining that the target application fails to be cold started; it can be understood that, since the core startup task is a key startup task in the cold startup process of the target application, only if each core startup task is successfully executed, the cold startup of the target application can be successful, so long as the cold startup result of one of the core startup tasks corresponding to the target application is an execution failure, the target application must be a cold startup failure.
Step 1013, if the target application does not have a core starting task with failure execution, acquiring non-core starting data in the starting data, and acquiring a cold starting result of the target application according to a non-core starting task set of the non-core starting data to the target application.
In the step, if the computer equipment determines that the target application does not have the core starting task with the execution failure, acquiring non-core starting data in the starting data, grading a non-core starting task set of the target application according to the non-core starting data, and determining a cold starting result of the target application according to the grading result. It can be understood that the non-core starting task is a non-critical starting task in the cold starting process of the target application, and even if a small number of non-important non-core starting tasks fail to execute, the cold starting success of the target application is not affected, but a large number of important non-core starting tasks fail to execute and can cause the cold starting failure of the target application, so that an executing result of each non-core starting task in the non-core starting task set is required, different preset weights are set for the non-important non-core starting task and the important non-core starting task, the non-core starting task set of the target application is scored according to the executing result and the preset weights, and the cold starting result of the target application is determined according to the scoring result.
Specifically, according to the uncore starting data, obtaining a cold starting result of the target application for the uncore starting task set of the target application, including:
step 10131, determining a first number of non-core starting tasks failing to execute the non-core starting task set and a second number of non-core starting tasks successful to execute according to the non-core starting data;
in the step, the computer equipment acquires an execution identifier and execution duration of each non-core starting task in a non-core starting task set corresponding to a target application in non-core starting data, judges whether each non-core starting task fails to execute or succeeds in executing according to the execution identifier and the execution duration, and further counts the first number of the non-core starting tasks which fail to execute and the second number of the non-core starting tasks which succeed in executing.
Step 10132, obtaining a preset weight corresponding to each non-core starting task, and determining a score of a non-core starting task set according to the preset weight, the first number and the second number;
in the step, the computer equipment acquires preset weights corresponding to the non-core starting tasks, and determines scores of a non-core starting task set according to the preset weights, the first quantity and the second quantity; specifically, a first number of non-core starting tasks which are failed to be executed are scored according to a preset scoring rule, a second number of non-core starting tasks which are successful to be executed are scored, the score of each non-core starting task which is failed to be executed is multiplied by a preset weight corresponding to each non-core starting task which is failed to be executed, the first number is multiplied to obtain a first score value, the score of each non-core starting task which is successful to be executed is multiplied by the preset weight corresponding to each non-core starting task which is successful to be executed, the second number is multiplied to obtain a second score value, and finally the first score value and the second score value are added to obtain the score of the non-core starting task set.
In a possible example, the computer device scores the non-core starting task with the execution failure as 0 score according to the preset scoring rule, scores the non-core starting task with the execution success as 0.03 score, and the preset weight of each non-core starting task is the same, that is, only the score of each non-core starting task with the execution success is multiplied by the preset weight corresponding to each non-core starting task with the execution success and then multiplied by the second number to obtain the second scoring value; assuming that the second number is 8, the preset weight is 0.5, and the second score value is 0.3×0.5×0.8=0.12.
In another possible example, the computer device determines that the target application does not have a core startup task with execution failure in the previous step, scores 0.6 score for the computer device for the set of core startup tasks with execution failure according to a preset scoring rule, scores 0 score for the non-core startup task with execution failure, scores 0.03 score for the non-core startup task with execution failure, multiplies the score of the set of core startup tasks with execution failure by a preset weight corresponding to each non-core startup task with execution success, multiplies the score of each non-core startup task with execution success by a second number to obtain a second score value, and further judges a cold startup result of the target application based on the total score.
Step 10133, if the score is smaller than a preset score threshold, determining that the target application fails to be cold started;
step 10134, if the score is not less than the preset score threshold, determining that the target application is successfully cold-started.
In steps 10133 to 10134, after obtaining the score of the non-core starting task set, the computer device compares the score with a preset score threshold, determines that the target application cold start fails if the score is smaller than the preset score threshold, and determines that the target application cold start is successful if the score is not smaller than the preset score threshold.
Optionally, after obtaining the total score of the core starting task and the non-core starting task, the computer device compares the total score with a preset score threshold, if the total score is smaller than the preset score threshold, determines that the target application cold start fails, and if the total score is not smaller than the preset score threshold, determines that the target application cold start succeeds.
Further, no matter whether the cold start result of the target application is cold start failure or cold start success, the computer device acquires the configuration data corresponding to the start data of the cold start, sets the configuration data as locking configuration data, and the configuration is locked, which means that the configuration cannot be used by the cold start process again, and the configuration can only be used for data analysis and reporting, but cannot be used for cold start code reading and execution.
Step 102, if the cold start result is a cold start failure, obtaining target configuration data from historical start data of the target application based on start key information of the target application, where the start key information includes: at least one of target starting time consumption, target core starting task starting success rate and target non-core starting task starting success rate;
in the step, if the computer equipment determines that the cold start result of the target application is cold start failure, acquiring target configuration data from historical start data of the target application based on start key information of the target application, wherein the start key information comprises: at least one of a target launch time, a target core launch task launch success rate, and a target non-core launch task launch success rate. It should be noted that, the starting key information is target data that needs to be reached when the target application performs cold start, that is, the cold start time of the target application needs to reach the target start time, the core start task start success rate needs to reach the target core start task start success rate, and the non-core start task start success rate needs to reach the target non-core start task start success rate.
Further, if the computer equipment determines that the cold start result of the target application is cold start failure, at this time, the computer equipment acquires preset default configuration data, enables the cold start of the target application to be successful based on the default configuration data, facilitates a user to use the target application in time, obtains the target configuration data from the historical start data of the target application based on the start key information of the target application after the target application is started, enables the target application to be cold started based on the target configuration data in the next cold start, and enables the cold start to be successful.
Specifically, step 102 includes:
step 1021, if the cold start result is a cold start failure, acquiring a historical start time consumption, a historical core start task start success rate and a historical non-core start task start success rate corresponding to the historical start data of the target application;
in the step, if the computer equipment determines that the cold start result of the target application is cold start failure, the historical start time consumption, the historical core start task start success rate and the historical non-core start task start success rate corresponding to each piece of historical start data of the target application are obtained. It will be appreciated that the startup data generated by the computer device for each cold startup of the target application is stored as historical startup data.
Step 1022, determining a target score of the historical starting data according to the historical starting time consumption, the historical core starting task starting success rate and the historical non-core starting task starting success rate, and the target starting time consumption, the target core starting task starting success rate and the target non-core starting task starting success rate in the starting key information;
in the step, the computer equipment calculates the target score of each historical starting data according to the historical starting time consumption, the historical core starting task starting success rate and the historical non-core starting task starting success rate corresponding to each historical starting data, and the target starting time consumption, the target core starting task starting success rate and the target non-core starting task starting success rate in the starting key information.
Optionally, the computer device performs the execution results of the core startup task and the non-core startup task when the target application performs cold startup each time, scores startup data generated by performing cold startup on the target application each time, binds the score with corresponding startup data, stores the score as historical startup data, and can directly acquire the target score of the historical startup data.
Further, step 1022 includes:
step 10221, calculating a first difference value between the historical starting time consumption and the target starting time consumption, calculating a second difference value between the historical core starting task starting success rate and the target core starting task starting success rate, and calculating a third difference value between the historical non-core starting task starting success rate and the target non-core starting task starting success rate;
step 10222, determining a first score of the historical starting time consuming according to the first difference value and a first preset weight, determining a second score of the historical non-core starting task starting success rate according to the second difference value and a second preset weight, and determining a third score of the historical non-core starting task starting success rate according to the third difference value and a third preset weight;
step 10223, determining a target score of the historical startup data according to the first score, the second score and the third score.
In steps 10221 to 10223, for each historical launch data, the computer device calculates a first difference between the historical launch time and the target launch time, a second difference between the historical core launch task launch success rate and the target core launch task launch success rate, and a third difference between the historical non-core launch task launch success rate and the target non-core launch task launch success rate; determining a first score of the time consuming of the historical starting according to the first difference value and the first preset weight, determining a second score of the starting success rate of the historical non-core starting task according to the second difference value and the second preset weight, and determining a third score of the starting success rate of the historical non-core starting task according to the third difference value and the third preset weight; and adding the first score, the second score and the third score to obtain a target score of the historical starting data. It should be noted that, in the starting key information corresponding to the starting data of the target application, the target starting time consumption, the starting success rate of the target core starting task and the weight corresponding to the starting success rate of the target non-core starting task may be specified correspondingly, the computer device may determine the first preset weight according to the weight of the target starting time consumption, determine the second preset weight according to the weight of the starting success rate of the target core starting task, and determine the third preset weight according to the weight of the starting success rate of the target non-core starting task.
Step 1023, obtaining target configuration data according to the target scores and the historical starting data.
In the step, the computer equipment compares the target scores corresponding to the historical starting data, and the historical starting data with the highest target score is determined as target historical starting data; and determining historical configuration data corresponding to the target historical starting data as target configuration data, and silencing and transmitting the target configuration data to a target application for caching in a long-link mode. Further, the computer equipment selects the historical starting data with the target score larger than a preset scoring threshold value corresponding to each historical starting data as target historical starting data, and performs integration analysis on the historical configuration data corresponding to all the target historical starting data to generate target configuration data.
Further, step 1023 includes:
step 10231, comparing the target scores corresponding to the historical starting data, and determining the historical starting data with the highest target score as target historical starting data;
step 10232, determining the historical configuration data corresponding to the target historical starting data as target configuration data.
In steps 10231 to 10232, the computer device performs a core startup task and a non-core startup task each time the target application performs cold startup, performs a score on startup data generated by each time the target application performs cold startup, binds the score with corresponding startup data, and stores the score as historical startup data, and the computer device can directly obtain a target score of the historical startup data; the computer equipment can take the history starting data with the last target score larger than a preset score threshold value as target history starting data, and determine the history configuration data corresponding to the target history starting data as target configuration data; the computer equipment can take the history starting data with the highest last target score and larger than a preset score threshold value as target history starting data, and determine the history configuration data corresponding to the target history starting data as target configuration data; if the target scores of all the historical starting data are smaller than the preset score threshold value, the computer equipment determines default configuration data as target configuration data.
And step 103, responding to the cold start request of the target application, and carrying out cold start on the target application according to the target configuration data.
In the step, the computer equipment responds to a cold start request of a user on the target application, and obtains target configuration data corresponding to the target application to cold start the target application.
The computer equipment of the embodiment obtains starting data of cold starting of the target application and a cold starting result of the target application; if the cold start result is that the cold start fails, acquiring target configuration data from historical start data of the target application based on start key information of the target application, wherein the start key information comprises: at least one of target starting time consumption, target core starting task starting success rate and target non-core starting task starting success rate; and responding to a cold start request of the target application, and carrying out cold start on the target application according to the target configuration data. When the cold start of the target application fails, the target configuration data is obtained based on the start key information and the historical start data corresponding to the target application, and then the target application is cold started according to the target configuration data, so that continuous cold start failure of the application can be avoided, and the time consumption of the cold start of the application can be reduced.
The embodiment also provides an application cold start system, which includes: and the application cold start system is used for executing the following steps:
the client is used for acquiring starting data of the cold start of the target application and a cold start result of the target application;
the server is used for obtaining target configuration data from historical starting data of the target application based on starting key information of the target application, wherein the starting key information comprises: at least one of the time consumption of target starting, the starting success rate of target core starting tasks and the starting success rate of target non-core starting tasks, and sending target configuration data to a client of the target application;
and the client is used for receiving the target configuration data, responding to the cold start request of the target application and carrying out cold start on the target application according to the target configuration data.
Specifically, referring to fig. 2, a client responds to a cold start request of a target application, receives configuration data issued by a server, performs cold start on the target application based on the configuration data, acquires start data of cold start of the target application, and a cold start result of the target application, if the cold start result of the target application is cold start failure, the client performs cold start on the target application based on default configuration data, so that the cold start of the target application is successful, and uploads the start data of cold start failure of the target application to the server after the cold start of the target application is successful, and the server obtains the target configuration data from historical start data of the target application based on start key information in the start data corresponding to the target application, wherein the start key information includes: at least one of the time consumption of target starting, the success rate of starting the target core starting task and the success rate of starting the target non-core starting task, and the target configuration data is silently issued to the client in a long-link mode, the client stores the target configuration data in the target application, and when the client responds to the cold starting request of the target application again, the target application is cold started based on the target configuration data to enable the target application to be cold started successfully.
In an alternative example, the client is further configured to:
acquiring core starting data in the starting data, and judging whether the target application has a core starting task with execution failure according to the core starting data;
if the target application has a core starting task with failed execution, determining that the cold starting result of the target application is cold starting failure;
if the target application does not have the core starting task with the execution failure, acquiring non-core starting data in the starting data, and acquiring a cold starting result of the target application according to a non-core starting task set of the target application by the non-core starting data.
In an alternative example, the client is further configured to:
acquiring an execution identifier of each core starting task corresponding to the target application in the core starting data;
if the execution mark is the execution failure, determining that the target application has a core starting task with the execution failure;
if the execution mark is successful, acquiring the execution duration of each core starting task corresponding to the target application in the core starting data;
if the execution duration is greater than a preset duration threshold, determining that the target application has a core starting task with execution failure;
And if the execution duration is not greater than a preset duration threshold, determining that the target application does not have the core starting task with the execution failure.
In an alternative example, the client is further configured to:
determining a first number of uncore starting tasks failing to be executed by the uncore starting task set and a second number of uncore starting tasks successful to be executed according to the uncore starting data;
acquiring preset weights corresponding to the non-core starting tasks, and determining scores of a non-core starting task set according to the preset weights, the first quantity and the second quantity;
if the score is smaller than a preset score threshold, determining that the target application fails to be cold started;
and if the score is not smaller than a preset score threshold, determining that the target application is successful in cold start.
In an alternative example, the server is further configured to:
if the cold start result is cold start failure, acquiring historical start time consumption, historical core start task start success rate and historical non-core start task start success rate corresponding to the historical start data of the target application;
determining a target score of the historical starting data according to the historical starting time consumption, the historical core starting task starting success rate and the historical non-core starting task starting success rate, and the target starting time consumption, the target core starting task starting success rate and the target non-core starting task starting success rate in the starting key information;
And obtaining target configuration data according to the target scores and the historical starting data.
In an alternative example, the server is further configured to:
calculating a first difference value between the historical starting time consumption and the target starting time consumption, calculating a second difference value between the historical core starting task starting success rate and the target core starting task starting success rate, and calculating a third difference value between the historical non-core starting task starting success rate and the target non-core starting task starting success rate;
determining a first score of the historical starting time consuming according to the first difference value and a first preset weight, determining a second score of the historical non-core starting task starting success rate according to the second difference value and a second preset weight, and determining a third score of the historical non-core starting task starting success rate according to the third difference value and a third preset weight;
and determining a target score of the historical starting data according to the first score, the second score and the third score.
In an alternative example, the server is further configured to:
comparing the target scores corresponding to the historical starting data, and determining the historical starting data with the highest target score as target historical starting data;
And determining the historical configuration data corresponding to the target historical starting data as target configuration data.
Therefore, when the cold start of the target application fails, the target configuration data is obtained based on the start key information and the historical start data corresponding to the target application, and then the target application is cold started according to the target configuration data, so that continuous cold start failure of the application can be avoided, and the time consumption of the cold start of the application can be reduced.
Referring to fig. 3, in implementation, assuming that the first cold start of the target application fails, the second cold start of the target application triggers a safe cold start, and the third cold start of the target application is successful.
In the first cold start process of the target application, the client responds to a cold start request of the target application, receives new configuration data issued by the server, stores the new configuration data in a memory space corresponding to the target application, reads the configuration data, judges whether the target application has locking configuration data, and because the target application is cold started for the first time, the target application does not have the locking configuration data, and judges whether the target application has the new configuration data, and because the new configuration data is received in each cold start, the client executes a start code of the target application according to the new configuration data to cold start the target application and locks the used new configuration data; when the client determines that the first cold start of the target application fails, the client performs a second cold start on the target application.
In the second cold start process of the target application, the client judges whether the target application has locking configuration data, and the client determines that the target application has the locking configuration data because of the failure of the first cold start, at the moment, the client reads the default configuration data of the target application, executes the start code of the target application based on the default configuration data to perform safe cold start on the target application, and the default configuration data can ensure that the target application is successfully cold started in the most basic and safest mode, namely, the target application is safely cold started, and after the safe cold start of the target application is successful, the client reads service start configuration and executes service execution codes to enable the target application to normally operate; further, after the target application is successfully cold started, the client judges whether to trigger safe cold start, and because the second cold start of the target application is safe cold start, the client determines to trigger safe cold start, the client deletes the locking configuration data generated during the first cold start and reports the safe cold start event to the server, the server identifies the safe cold start event and triggers an alarm, the server acquires target configuration data from the historical start data, the target configuration data is issued to the client, and the client stores new configuration data in a memory space corresponding to the target application.
After the target application is closed, when the client responds to a new cold start request of the target application, the client performs cold start on the target application for the third time.
In the third cold start process of the target application, the client reads the configuration data, judges whether the target application has locking configuration data, and because the locking configuration data is deleted in the second cold start, the client further judges whether the target application has new configuration data, and because the server issues the target configuration data in the second cold start, the client executes the start code of the target application according to the target configuration data to perform cold start on the target application and lock the used target configuration data. The target configuration data is the configuration data capable of ensuring the success of the cold start of the target application, the target application is successfully cold started at the moment, and after the safe cold start of the target application is successful, the client reads the service start configuration and executes the service execution code, so that the target application operates normally. Further, after the target application is successfully cold started, the client judges whether to trigger the safe cold start, and because the third cold start of the target application does not adopt default configuration data, the client determines that the safe cold start is not triggered, the client reads the locking configuration data, and scores a core start task and a non-core start task of the target application during the third cold start based on the locking configuration data, wherein the non-core start task comprises a basic task and a business task, and the specific scoring process is as follows: i) The core starting tasks are fully divided into 0.6 points, the execution result of the core starting tasks is judged according to the execution time consumption and the execution identification of each core starting task, when the execution result of any one core starting task is failure, the score of the core starting task is 0 point, and when the execution result of all the core starting tasks is successful, the score of the core starting task is 0.6 point; ii) the basic tasks are fully divided into 0.3 points, failure tasks can exist, the total points of 0.3 points are distributed evenly, for example, 10 basic tasks are divided into 0.03 points for each task, the failure is 0 point, and the success is added with 0.03 point; iii) The service tasks are fully scored by 0.3 score, and the scoring standard is the same as the basic tasks. The client reports the safe cold start event to the server, reports the scoring result and start data corresponding to the target application cold start to the server, and the server adds the start data to the historical start data. And the server acquires scoring results of all the historical starting data, takes the historical starting data with the latest historical scores being larger than a preset scoring threshold value as target historical starting data, takes the historical configuration data corresponding to the target historical starting data as target configuration data, or takes the historical starting data with the latest historical scores being full as target historical starting data, takes the historical configuration data corresponding to the target historical starting data as target configuration data, or takes default configuration data as target configuration data if the historical scores corresponding to the historical starting data are lower than the preset scoring threshold value, the server transmits the target configuration data to the client, the client stores the target configuration data in the target application, and when the client responds to the cold starting request of the target application again, cold starting is carried out on the target application based on the target configuration data so that the cold starting of the target application is successful.
In specific implementation, examples of scenarios for live applications are:
in the cold start process of the live broadcast application, the client side needs to request differentiated or incremental configuration data from the server side according to the configuration parameters stored in the live broadcast application, and then cold start is carried out on the live broadcast application based on the configuration data; however, when the configuration data has errors, the live application cold start failure is caused, when the client side carries out cold start on the live application again, the time for issuing after the configuration data is corrected by the server is later than the time for the client side to read the cached configuration information, so that the client side reads the last stored error data again to cause the live application cold start failure again, and the live application continuous cold start failure is caused by repeated operations. For the problem of continuous cold start failure of live broadcast application, the following method is adopted:
in the cold start process of the live broadcast application, the client responds to a cold start request of the live broadcast application, and receives new configuration data issued by a server, wherein the configuration data comprises: live network configuration data and application function configuration data; the client executes the start code of the live broadcast application according to the live broadcast network configuration data and the application function configuration data to perform cold start on the live broadcast application, locks the used live broadcast network configuration data and the application function configuration data, and performs safe cold start on the live broadcast application when the client determines that the cold start of the live broadcast application fails.
In the safe cold start process of the live broadcast application, the client reads default live broadcast network configuration data and default application function configuration data of the live broadcast application, and executes a start code of the live broadcast application based on the default live broadcast network configuration data and the default application function configuration data to perform safe cold start on the live broadcast application, so that the live broadcast application is successfully subjected to safe cold start, and after the safe cold start of the target application is successful, the client reads service start configuration and executes service execution codes to enable the live broadcast application to normally run; further, after the live broadcast application is successfully cold started, the server acquires target live broadcast network configuration data and target application function configuration data from the historical starting data, the target live broadcast network configuration data and the target application function configuration data are issued to the client, and the client stores the target live broadcast network configuration data and the target application function configuration data in a memory space corresponding to the live broadcast application.
After the live application is closed, when the client responds to a new cold start request of the live application, the client performs cold start on the live application.
In the third cold start process of the live broadcast application, the client reads the configuration data, judges whether the target application has the locking configuration data, and because the locking configuration data is deleted during the safe cold start, the client does not have the locking configuration data, and then judges whether the live broadcast application has new configuration data, and because the server issues the target live broadcast network configuration data and the target application function configuration data during the safe cold start, the client has the new configuration data, executes the start code of the live broadcast application according to the target live broadcast network configuration data and the target application function configuration data to cold start the live broadcast application, and locks the used target live broadcast network configuration data and the target application function configuration data. The target live broadcast network configuration data and the live broadcast application function configuration data are configuration data capable of ensuring successful cold start of the target application, at the moment, the live broadcast application is successfully cold started, and after the live broadcast application is successfully cold started safely, the client reads service start configuration and executes service execution codes, so that the live broadcast application operates normally. Further, after the live application is successfully cold-started, the client reports starting data of the live application, which is successfully cold-started, to the server, and the server adds the starting data into the historical starting data. And the server acquires target historical starting data from all the historical starting data, acquires target live broadcast network configuration data and target application function configuration data from the target historical starting data and transmits the target live broadcast network configuration data and the target application function configuration data to the client, the client stores the target live broadcast network configuration data and the target application function configuration data in the live broadcast application, and when the client responds to a cold starting request of the live broadcast application again, the target application is cold started based on the target configuration data so that the cold starting of the target application is successful.
In this embodiment, after the live broadcast application fails to be cold started, the live broadcast application is safely cold started, and after the safe cold start, the server issues target live broadcast network configuration data and target application function configuration data capable of ensuring that the live broadcast application is cold started successfully to be stored in the live broadcast application, and when the live broadcast application is cold started again, the live broadcast application is cold started directly according to the target live broadcast network configuration data and the target application function configuration data, so that the live broadcast application is cold started successfully, and the problem of continuous cold start failure of the live broadcast application is solved.
The embodiment also provides an application cold start device, where the application cold start device may specifically include a background server corresponding to various application programs with comment functions, as shown in fig. 4, and the application cold start device may include:
an obtaining unit 1001, configured to obtain start data of a cold start of a target application, and a cold start result of the target application;
the obtaining unit 1002 is configured to obtain, if the cold start result is a cold start failure, target configuration data from historical start data of the target application based on start key information of the target application, where the start key information includes: at least one of target starting time consumption, target core starting task starting success rate and target non-core starting task starting success rate;
And a starting unit 1003, configured to respond to a cold start request of the target application, and perform cold start on the target application according to the target configuration data.
In an alternative example, the obtaining unit is further configured to:
acquiring core starting data in the starting data, and judging whether the target application has a core starting task with execution failure according to the core starting data;
if the target application has a core starting task with failed execution, determining that the cold starting result of the target application is cold starting failure;
if the target application does not have the core starting task with the execution failure, acquiring non-core starting data in the starting data, and acquiring a cold starting result of the target application according to a non-core starting task set of the target application by the non-core starting data.
In an alternative example, the obtaining unit is further configured to:
acquiring an execution identifier of each core starting task corresponding to the target application in the core starting data;
if the execution mark is the execution failure, determining that the target application has a core starting task with the execution failure;
if the execution mark is successful, acquiring the execution duration of each core starting task corresponding to the target application in the core starting data;
If the execution duration is greater than a preset duration threshold, determining that the target application has a core starting task with execution failure;
and if the execution duration is not greater than a preset duration threshold, determining that the target application does not have the core starting task with the execution failure.
In an alternative example, the obtaining unit is further configured to:
determining a first number of uncore starting tasks failing to be executed by the uncore starting task set and a second number of uncore starting tasks successful to be executed according to the uncore starting data;
acquiring preset weights corresponding to the non-core starting tasks, and determining scores of a non-core starting task set according to the preset weights, the first quantity and the second quantity;
if the score is smaller than a preset score threshold, determining that the target application fails to be cold started;
and if the score is not smaller than a preset score threshold, determining that the target application is successful in cold start.
In an alternative example, the obtaining unit is further configured to:
if the cold start result is cold start failure, acquiring historical start time consumption, historical core start task start success rate and historical non-core start task start success rate corresponding to the historical start data of the target application;
Determining a target score of the historical starting data according to the historical starting time consumption, the historical core starting task starting success rate and the historical non-core starting task starting success rate, and the target starting time consumption, the target core starting task starting success rate and the target non-core starting task starting success rate in the starting key information;
and obtaining target configuration data according to the target scores and the historical starting data.
In an alternative example, the obtaining unit is further configured to:
calculating a first difference value between the historical starting time consumption and the target starting time consumption, calculating a second difference value between the historical core starting task starting success rate and the target core starting task starting success rate, and calculating a third difference value between the historical non-core starting task starting success rate and the target non-core starting task starting success rate;
determining a first score of the historical starting time consuming according to the first difference value and a first preset weight, determining a second score of the historical non-core starting task starting success rate according to the second difference value and a second preset weight, and determining a third score of the historical non-core starting task starting success rate according to the third difference value and a third preset weight;
And determining a target score of the historical starting data according to the first score, the second score and the third score.
In an alternative example, the obtaining unit is further configured to:
comparing the target scores corresponding to the historical starting data, and determining the historical starting data with the highest target score as target historical starting data;
and determining the historical configuration data corresponding to the target historical starting data as target configuration data.
By adopting the scheme of the embodiment, when the cold start of the target application fails, the target configuration data is obtained based on the start key information and the historical start data corresponding to the target application, and then the target application is cold started according to the target configuration data, so that continuous cold start failure of the application can be avoided, and the time consumption of the cold start of the application can be reduced.
Correspondingly, the embodiment of the disclosure further provides a computer device, as shown in fig. 5, and fig. 5 is a schematic structural diagram of the computer device provided in the embodiment of the disclosure. The computer device 1100 clients and/or servers include a processor 1101 having one or more processing cores, a memory 1102 having one or more computer readable storage media, and a computer program stored on the memory 1102 and executable on the processor. The processor 1101 is electrically connected to the memory 1102. It will be appreciated by those skilled in the art that the computer device structure shown in the figures is not limiting of the computer device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The processor 1101 is a control center of the computer device 1100, connects various parts of the entire electronic device 1100 using various interfaces and lines, and performs various functions of the electronic device 1100 and processes data by running or loading software programs and/or units stored in the memory 1102 and invoking data stored in the memory 1102, thereby overall monitoring the computer device 1100. The processor 1101 may be a processor CPU, a graphics processor GPU, a network processor (Network Processor, NP), etc., that may implement or perform the methods, steps and logic blocks disclosed in the embodiments of the present disclosure.
In the embodiment of the disclosure, the processor 1101 in the computer device 1100 loads instructions corresponding to the processes of one or more application programs into the memory 1102 according to the following steps, and the processor 1101 executes the application programs stored in the memory 1102, thereby implementing various functions.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Optionally, as shown in fig. 5, the computer device 1100 further includes: a touch display 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106, and a power supply 1107. The processor 1101 is electrically connected to the touch display 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106, and the power supply 1107, respectively. Those skilled in the art will appreciate that the computer device structure shown in fig. 4 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The touch display 1103 may be used to display a graphical user interface and receive an operation instruction generated by a user acting on the graphical user interface. The touch display 1103 may include a display panel and a touch panel. Wherein the display panel may be used to display information entered by a user or provided to a user as well as various graphical user interfaces of the electronic device, which may be composed of graphics, text, icons, video, and any combination thereof. Alternatively, the display panel may be configured in the form of a liquid crystal display (LCD, liquid Crystal Display), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations on or near the user (such as operations on or near the touch panel by the user using any suitable object or accessory such as a finger, stylus, etc.), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 1101, and can receive and execute commands sent from the processor 1101. The touch panel may overlay the display panel, and upon detection of a touch operation thereon or thereabout, the touch panel is passed to the processor 1101 to determine the type of touch event, and the processor 1101 then provides a corresponding visual output on the display panel based on the type of touch event. In the embodiment of the present disclosure, the touch panel and the display panel may be integrated into the touch display 1103 to realize the input and output functions. In some embodiments, however, the touch panel and the touch panel may be implemented as two separate components to perform the input and output functions. I.e. the touch screen 1103 may also implement an input function as part of the input unit 1106.
The rf circuit 1104 may be configured to receive and transmit rf signals to and from a network device or other electronic device via wireless communication to and from the network device or other electronic device.
The audio circuit 1105 may be used to provide an audio interface between the user and the electronic device through a speaker, microphone. The audio circuit 1105 may transmit the received electrical signal after audio data conversion to a speaker, where the electrical signal is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 1105 and converted into audio data, which are processed by the audio data output processor 1101, and transmitted to, for example, another electronic device via the radio frequency circuit 1104, or the audio data are output to the memory 1102 for further processing. The audio circuit 1105 may also include an ear bud jack to provide communication of the peripheral headphones with the electronic device.
The input unit 1106 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
A power supply 1107 is used to power the various components of the electronic device 1100. Alternatively, the power supply 1107 may be logically connected to the processor 1101 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system. The power supply 1107 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown in fig. 5, the electronic device 1100 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which are not described herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, the disclosed embodiments provide a computer readable storage medium having stored therein a plurality of computer programs that can be loaded by a processor to perform any of the application cold start methods provided by the disclosed embodiments. The computer program may perform the steps of applying a cold start method.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because the computer program stored in the computer readable storage medium can execute any application cold start method provided by the embodiments of the present disclosure, the beneficial effects that any application cold start method provided by the embodiments of the present disclosure can be achieved, which are detailed in the previous embodiments and are not described herein.
According to one aspect of the present disclosure, there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions to cause the electronic device to perform the methods provided in the various alternative implementations of the embodiments described above.
In the embodiments of the application cold start apparatus, the computer readable storage medium, the application cold start system and the computer program product, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments. It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process and the beneficial effects of the application cold start apparatus, the computer readable storage medium, the computer program product, the application cold start system and the corresponding units described above may refer to the description of the application cold start method in the above embodiments, which is not repeated herein.
The foregoing has outlined some of the principles and implementations of the present disclosure with specific examples being used to facilitate an understanding of the method and core concepts thereof; meanwhile, as those skilled in the art will appreciate from the idea of the present disclosure, there are variations in the specific embodiments and the application scope, and in light of the above, the present disclosure should not be construed as being limited to the present disclosure.

Claims (11)

1. An application cold start method, which is characterized by comprising the following steps:
acquiring starting data of cold starting of a target application and a cold starting result of the target application;
if the cold start result is that the cold start fails, acquiring target configuration data from historical start data of the target application based on start key information of the target application, wherein the start key information comprises: at least one of target starting time consumption, target core starting task starting success rate and target non-core starting task starting success rate;
And responding to the cold start request of the target application, and carrying out cold start on the target application according to the target configuration data.
2. The application cold start method according to claim 1, wherein the obtaining start data of the target application cold start and a cold start result of the target application include:
acquiring core starting data in the starting data, and judging whether the target application has a core starting task with execution failure according to the core starting data;
if the target application has a core starting task with failed execution, determining that the cold starting result of the target application is cold starting failure;
if the target application does not have the core starting task with the execution failure, acquiring non-core starting data in the starting data, and acquiring a cold starting result of the target application according to a non-core starting task set of the target application by the non-core starting data.
3. The application cold start method according to claim 2, wherein the determining whether the target application has a core start task with execution failure according to the core start data includes:
Acquiring an execution identifier of each core starting task corresponding to the target application in the core starting data;
if the execution mark is the execution failure, determining that the target application has a core starting task with the execution failure;
if the execution mark is successful, acquiring the execution duration of each core starting task corresponding to the target application in the core starting data;
if the execution duration is greater than a preset duration threshold, determining that the target application has a core starting task with execution failure;
and if the execution duration is not greater than a preset duration threshold, determining that the target application does not have the core starting task with the execution failure.
4. The method for cold starting an application according to claim 2, wherein the obtaining the cold starting result of the target application according to the non-core starting task set of the target application by the non-core starting data includes:
determining a first number of uncore starting tasks failing to be executed by the uncore starting task set and a second number of uncore starting tasks successful to be executed according to the uncore starting data;
acquiring preset weights corresponding to the non-core starting tasks, and determining scores of a non-core starting task set according to the preset weights, the first quantity and the second quantity;
If the score is smaller than a preset score threshold, determining that the target application fails to be cold started;
and if the score is not smaller than a preset score threshold, determining that the target application is successful in cold start.
5. The method for cold starting an application according to claim 1, wherein if the cold start result is a cold start failure, obtaining target configuration data from historical starting data of the target application based on starting key information of the target application includes:
if the cold start result is cold start failure, acquiring historical start time consumption, historical core start task start success rate and historical non-core start task start success rate corresponding to the historical start data of the target application;
determining a target score of the historical starting data according to the historical starting time consumption, the historical core starting task starting success rate and the historical non-core starting task starting success rate, and the target starting time consumption, the target core starting task starting success rate and the target non-core starting task starting success rate in the starting key information;
and obtaining target configuration data according to the target scores and the historical starting data.
6. The method according to claim 5, wherein determining the target score of the historical startup data according to the historical startup time consumption, the historical core startup task startup success rate, and the historical non-core startup task startup success rate, and the target startup time consumption, the target core startup task startup success rate, and the target non-core startup task startup success rate in the startup key information comprises:
calculating a first difference value between the historical starting time consumption and the target starting time consumption, calculating a second difference value between the historical core starting task starting success rate and the target core starting task starting success rate, and calculating a third difference value between the historical non-core starting task starting success rate and the target non-core starting task starting success rate;
determining a first score of the historical starting time consuming according to the first difference value and a first preset weight, determining a second score of the historical non-core starting task starting success rate according to the second difference value and a second preset weight, and determining a third score of the historical non-core starting task starting success rate according to the third difference value and a third preset weight;
And determining a target score of the historical starting data according to the first score, the second score and the third score.
7. The method for cold start of application according to claim 5, wherein said obtaining target configuration data based on said target score and said historical start data comprises:
comparing the target scores corresponding to the historical starting data, and determining the historical starting data with the highest target score as target historical starting data;
and determining the historical configuration data corresponding to the target historical starting data as target configuration data.
8. An application cold start system, the application cold start system comprising: and the application cold start system is used for executing the following steps:
the client is used for acquiring starting data of the cold start of the target application and a cold start result of the target application;
the server is used for obtaining target configuration data from historical starting data of the target application based on starting key information of the target application, wherein the starting key information comprises: at least one of the time consumption of target starting, the starting success rate of target core starting tasks and the starting success rate of target non-core starting tasks, and sending target configuration data to a client of the target application;
And the client is used for receiving the target configuration data, responding to the cold start request of the target application and carrying out cold start on the target application according to the target configuration data.
9. An application cold start apparatus, the apparatus comprising:
the system comprises an acquisition unit, a control unit and a control unit, wherein the acquisition unit is used for acquiring starting data of cold starting of a target application and a cold starting result of the target application;
the obtaining unit is configured to obtain, if the cold start result is a cold start failure, target configuration data from historical start data of the target application based on start key information of the target application, where the start key information includes: at least one of target starting time consumption, target core starting task starting success rate and target non-core starting task starting success rate;
and the starting unit is used for responding to the cold start request of the target application and carrying out cold start on the target application according to the target configuration data.
10. A computer device comprising a client and/or a server, the computer device being configured with a processor and a memory, the memory storing a plurality of instructions, the processor loading instructions from the memory to perform the steps of applying a cold start method according to any of claims 1-8.
11. A storage medium, characterized in that the storage medium is a computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor for performing the steps of applying a cold start method according to any of claims 1-8.
CN202311482495.1A 2023-11-08 2023-11-08 Application cold start method, system, device, computer equipment and storage medium Active CN117421068B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311482495.1A CN117421068B (en) 2023-11-08 2023-11-08 Application cold start method, system, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311482495.1A CN117421068B (en) 2023-11-08 2023-11-08 Application cold start method, system, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117421068A true CN117421068A (en) 2024-01-19
CN117421068B CN117421068B (en) 2024-06-21

Family

ID=89526374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311482495.1A Active CN117421068B (en) 2023-11-08 2023-11-08 Application cold start method, system, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117421068B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120324481A1 (en) * 2011-06-16 2012-12-20 Samsung Electronics Co. Ltd. Adaptive termination and pre-launching policy for improving application startup time
CN105630543A (en) * 2015-12-21 2016-06-01 北京奇虎科技有限公司 Application cold start acceleration method and apparatus
US20180293079A1 (en) * 2015-08-31 2018-10-11 Mitsubishi Electric Corporation Application execution apparatus and application execution method
CN109521926A (en) * 2018-11-28 2019-03-26 青岛海信电器股份有限公司 A kind of starting method and device of application program
CN110109737A (en) * 2019-03-18 2019-08-09 平安普惠企业管理有限公司 Starting method, apparatus, computer equipment and the storage medium of application program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120324481A1 (en) * 2011-06-16 2012-12-20 Samsung Electronics Co. Ltd. Adaptive termination and pre-launching policy for improving application startup time
US20180293079A1 (en) * 2015-08-31 2018-10-11 Mitsubishi Electric Corporation Application execution apparatus and application execution method
CN105630543A (en) * 2015-12-21 2016-06-01 北京奇虎科技有限公司 Application cold start acceleration method and apparatus
CN109521926A (en) * 2018-11-28 2019-03-26 青岛海信电器股份有限公司 A kind of starting method and device of application program
CN110109737A (en) * 2019-03-18 2019-08-09 平安普惠企业管理有限公司 Starting method, apparatus, computer equipment and the storage medium of application program

Also Published As

Publication number Publication date
CN117421068B (en) 2024-06-21

Similar Documents

Publication Publication Date Title
CN114328132A (en) Method, device, equipment and medium for monitoring state of external data source
CN111142900A (en) Program updating method and device and terminal equipment
CN112965799B (en) Task state prompting method and device, electronic equipment and medium
CN117421068B (en) Application cold start method, system, device, computer equipment and storage medium
US20150156132A1 (en) Determining Available User Interface Functionality Based on Backend Server Load
CN117269946A (en) Distance determining method and device between Bluetooth devices, electronic device and medium
CN111209054A (en) Configuration method of terminal equipment, terminal management equipment and electronic equipment
CN112426722B (en) Method and device for thermally updating node map, storage medium and computer equipment
CN115311764A (en) Door lock safety evaluation method and related equipment
CN113568645B (en) Software updating method, device, electronic equipment and storage medium
CN114726849B (en) File transmission method, device, server and computer readable storage medium
CN114222361A (en) Information acquisition method and device, computer equipment and computer readable storage medium
CN116303573A (en) Data query method, device, computer equipment and storage medium
CN117033084B (en) Virtual machine backup method and device, electronic equipment and storage medium
CN117872890A (en) Device control method, device, electronic device, and computer-readable storage medium
CN114329000A (en) Resource recommendation method and device, storage medium and electronic equipment
CN115098024A (en) Disk file cleaning method and device, electronic equipment and storage medium
CN117850564A (en) Data backhaul processing method, device, electronic equipment and readable storage medium
CN115509936A (en) Program testing method, device, medium and equipment
CN117724628A (en) Performance analysis chart acquisition method and device, electronic equipment and storage medium
CN114925309A (en) Page abnormal information acquisition method and device, computer equipment and storage medium
CN117632184A (en) Software version updating method and device, electronic equipment and storage medium
CN116149696A (en) System interface migration method and device, computer equipment and storage medium
CN116382800A (en) Data processing method, device, electronic equipment and storage medium
CN117202146A (en) Display control method, device and medium for NFC passive display equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant