CN111427630B - Cold start optimization method and device, electronic equipment and storage medium - Google Patents

Cold start optimization method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111427630B
CN111427630B CN202010241336.2A CN202010241336A CN111427630B CN 111427630 B CN111427630 B CN 111427630B CN 202010241336 A CN202010241336 A CN 202010241336A CN 111427630 B CN111427630 B CN 111427630B
Authority
CN
China
Prior art keywords
cold start
program
starting
stage
optimized
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.)
Active
Application number
CN202010241336.2A
Other languages
Chinese (zh)
Other versions
CN111427630A (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.)
Beijing Jindi Technology Co Ltd
Original Assignee
Beijing Jindi Technology 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 Beijing Jindi Technology Co Ltd filed Critical Beijing Jindi Technology Co Ltd
Priority to CN202010241336.2A priority Critical patent/CN111427630B/en
Publication of CN111427630A publication Critical patent/CN111427630A/en
Application granted granted Critical
Publication of CN111427630B publication Critical patent/CN111427630B/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

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 embodiment of the disclosure discloses a cold start optimization method and device, an electronic device and a storage medium, wherein the method comprises the following steps: responding to the received access request of the user to the application program, and enabling the application program to enter a cold start process; and in the program initialization stage, when constructing the attribute function of the function, the method of the extension protocol is not loaded so as to obtain an optimized cold start process. According to the embodiment of the disclosure, the method for adding the extension protocol and the extension protocol in the program initialization stage in the cold start process is avoided, so that the method for calling the extension protocol is delayed, the time required by cold start of the application program can be effectively shortened, and the user experience is improved.

Description

Cold start optimization method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to terminal equipment technology, in particular to a cold start optimization method and device, electronic equipment and a storage medium.
Background
With the continuous development of mobile terminal technology, the variety of applications on mobile terminals is also increasing. For example, a game application, a social application, a video playing application, an information inquiry application, and the like are simultaneously installed on the mobile terminal. A cold start is when there is no person or process information (including Activity, service, etc.) for an application in the system before the application is started. Such as the first start of an application after the device is powered on, which is an important indicator of the performance of an application, directly determines the first impression of the application software (App) by the user. To improve the user experience, application developers are gradually beginning to pay attention to the time required for application cold starts.
In carrying out the present disclosure, the inventors found that: the application is optimized in a mode of optimizing the code of the application, so that the cold start time cannot be effectively shortened, and the user experience is not facilitated.
Disclosure of Invention
The present disclosure has been made in order to solve the above technical problems. The embodiment of the disclosure provides a cold start optimization method and device, electronic equipment and storage medium.
According to an aspect of the embodiments of the present disclosure, there is provided a cold start optimization method, including:
responding to receiving an access request of a user to an application program, and enabling the application program to enter a cold start process; wherein the cold start process comprises: program initialization phase, program starting phase and page generation phase;
and the program initialization stage does not load an extension protocol and a method of the extension protocol when constructing the attribute function of the function so as to obtain an optimized cold start process.
Optionally, in the above method embodiments of the present disclosure, the method further includes: deleting the framework left by the version iteration in the program initialization stage and/or delaying the integration framework of the multi-inheritance of the calling implementation class so as to obtain an optimized cold start process.
Optionally, in the above method embodiments of the present disclosure, the method further includes: and deleting the class left by program version iteration in the program initialization stage and/or merging the expansion of the class based on the attribute and the method of the class so as to obtain an optimized cold start process.
Optionally, in the above method embodiments of the present disclosure, the method further includes: and uniformly calling functions of the switching methods of the flash back protection of the classes in the program starting stage to obtain an optimized cold starting process.
Optionally, in the above method embodiments of the present disclosure, the method further includes: and suspending starting the introduction function realized based on the user operation in the program starting stage so as to obtain an optimized cold starting process.
Optionally, in the above method embodiments of the present disclosure, the method further includes: based on the main function of the program starting stage, logs calling a plurality of interface functions are recorded, and the position where the flash back is recorded is corrected, so that an optimized cold starting process is obtained.
Optionally, in the above method embodiments of the present disclosure, the method further includes: and carrying out asynchronous processing on the network request information based on an interface function corresponding to the network request information in the program starting stage so as to obtain an optimized cold starting process.
Optionally, in the above method embodiments of the present disclosure, the method further includes: and simplifying the page content of the page generation stage and/or the source file of the page content to obtain an optimized cold start process.
Optionally, in the above method embodiments of the present disclosure, the method further includes: and generating a first screen page based on the code of the source file in the page generation stage so as to obtain an optimized cold start process.
According to another aspect of an embodiment of the present disclosure, there is provided a cold start optimizing apparatus including:
the response module is used for responding to the received access request of the user to the application program, and the application program enters a cold start process; wherein the cold start process comprises: program initialization phase, program starting phase and page generation phase;
and the first optimizing module is used for not loading the extension protocol and the extension protocol method when constructing the attribute function of the function in the program initialization stage so as to obtain an optimized cold start process.
Optionally, in the above device embodiments of the disclosure, the method further includes: and the second optimizing module is used for deleting the frame left by the version iteration in the program initialization stage and/or delaying the multi-inheritance integrated frame of the calling realization class so as to obtain an optimized cold start process.
Optionally, in the above device embodiments of the disclosure, the method further includes: and the third optimization module is used for deleting classes left by program version iteration in the program initialization stage and/or merging the expansion of the classes based on the attributes and the methods of the classes so as to obtain an optimized cold start process.
Optionally, in the above device embodiments of the disclosure, the method further includes: and the third optimization module is used for carrying out unified call on functions of the switching methods of the flash back protection of the classes in the program starting stage so as to obtain an optimized cold starting process.
Optionally, in the above device embodiments of the disclosure, the method further includes: and the fourth optimizing module is used for suspending starting of the introducing function realized based on the user operation in the program starting stage so as to obtain an optimized cold starting process.
Optionally, in the above device embodiments of the disclosure, the method further includes: and the fifth optimizing module is used for recording logs calling a plurality of interface functions based on the main function of the program starting stage and correcting the position where the record flash back happens so as to obtain an optimized cold starting process.
Optionally, in the above device embodiments of the disclosure, the method further includes: and the sixth optimization module is used for asynchronously processing the network request information based on an interface function corresponding to the network request information in the program starting stage so as to obtain an optimized cold starting process.
Optionally, in the above device embodiments of the disclosure, the method further includes: and the seventh optimization module is used for simplifying the page content and/or the source file of the page content in the page generation stage so as to obtain an optimized cold start process.
Optionally, in the above device embodiments of the disclosure, the method further includes: and an eighth optimization module, configured to generate a first screen page based on the code of the source file in the page generation stage, so as to obtain an optimized cold start procedure.
According to yet another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the cold start optimization method according to any one of the above embodiments of the present disclosure.
According to still another aspect of the embodiments of the present disclosure, there is provided an electronic device including: a processor; a memory for storing the processor-executable instructions; the processor is configured to read the executable instruction from the memory and execute the instruction to implement the cold start optimization method according to any one of the foregoing embodiments.
Based on the cold start optimization method and device, the electronic device and the storage medium provided by the embodiments of the present disclosure, in response to receiving an access request of a user to an application program, the application program enters a cold start process; and the program initialization stage does not load an extension protocol and a method of the extension protocol when constructing the attribute function of the function so as to obtain an optimized cold start process. According to the embodiment of the disclosure, the method for adding the extension protocol and the extension protocol in the program initialization stage in the cold start process is avoided, so that the method for calling the extension protocol is delayed, the time required by cold start of the application program can be effectively shortened, and the user experience is improved.
The technical scheme of the present disclosure is described in further detail below through the accompanying drawings and examples.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing embodiments thereof in more detail with reference to the accompanying drawings. The accompanying drawings are included to provide a further understanding of embodiments of the disclosure, and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure, without limitation to the disclosure. In the drawings, like reference numerals generally refer to like parts or steps.
Fig. 1 is a flow chart illustrating a cold start optimization method according to an exemplary embodiment of the present disclosure.
Fig. 2 is a schematic diagram of a cold start procedure of a cold start optimization method according to an exemplary embodiment of the present disclosure.
Fig. 3 is a schematic structural diagram of a cold start optimizing apparatus according to an exemplary embodiment of the present disclosure.
Fig. 4 is a block diagram of an electronic device provided in an exemplary embodiment of the present disclosure.
Detailed Description
Hereinafter, example embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present disclosure and not all of the embodiments of the present disclosure, and that the present disclosure is not limited by the example embodiments described herein.
It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless it is specifically stated otherwise.
It will be appreciated by those of skill in the art that the terms "first," "second," etc. in embodiments of the present disclosure are used merely to distinguish between different steps, devices or modules, etc., and do not represent any particular technical meaning nor necessarily logical order between them.
It should also be understood that in embodiments of the present disclosure, "plurality" may refer to two or more, and "at least one" may refer to one, two or more.
It should also be appreciated that any component, data, or structure referred to in the presently disclosed embodiments may be generally understood as one or more without explicit limitation or the contrary in the context.
In addition, the term "and/or" in this disclosure is merely an association relationship describing an association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the front and rear association objects are an or relationship.
It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and that the same or similar features may be referred to each other, and for brevity, will not be described in detail.
Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
Embodiments of the present disclosure may be applicable to electronic devices such as terminal devices, computer systems, servers, etc., which may operate with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with the terminal device, computer system, server, or other electronic device include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, mainframe computer systems, and distributed cloud computing technology environments that include any of the foregoing, and the like.
Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc., that perform particular tasks or implement particular abstract data types. The computer system/server may be implemented in a distributed cloud computing environment in which tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computing system storage media including memory storage devices.
FIG. 1 is a flow chart of a cold start optimization method provided by an exemplary embodiment of the present disclosure. The embodiment can be applied to an electronic device, as shown in fig. 1, and the cold start optimization method includes the following steps:
s102, responding to the received access request of the user to the application program, and enabling the application program to enter a cold start process.
In an embodiment of the present disclosure, the cold start process may include: program initialization phase, program start phase and page generation phase.
An example of a cold start procedure is shown in fig. 2, where T1 represents the program initialization phase: loading an executable file into a memory, wherein the executable file is a file compiled by codes of an application program, for example, a code file of the executable program in an APP installation package; t2 represents the program start phase: the execution of the method (application: didfinish host options) from the start of executing the main function (main () function) of the executable file to the completion of the startup has been selected in the class (appdelay) of the application-level message; from the completion of the execution of the main function (main () function) to the completion of the loading of the initiator; t3 denotes the page generation phase: from the completion of class execution of the application level message to the generation of the first screen page.
S104, in the program initialization stage, when the attribute function of the function is constructed, the method of the expansion protocol and the expansion protocol is not loaded so as to obtain an optimized cold start process.
For example, in the program initialization stage, lazy loading is used when constructing an attribute function (constructor), i.e. loading of all extension protocols and methods of extension protocols in the constructor stage is directly removed, the extension protocols are postponed until the time of use, and are not added in the constructor, when a class calls the method of the extension protocol which is not found, the class method is called for resolution (resolveClassmethod) or resolution (resolveInstanceMethod) is carried out for the object method, and the method of the extension protocol is injected at this time to reduce the time consumption of the cold-start TI stage.
Based on the cold start optimization method and device, the electronic device and the storage medium provided by the embodiments of the present disclosure, in response to receiving an access request of a user to an application program, the application program enters a cold start process; and the program initialization stage does not load an extension protocol and a method of the extension protocol when constructing the attribute function of the function so as to obtain an optimized cold start process. According to the embodiment of the disclosure, the method for adding the extension protocol and the extension protocol in the program initialization stage in the cold start process is avoided, so that the method for calling the extension protocol is delayed, the time required by cold start of the application program can be effectively shortened, and the user experience is improved.
In some alternative implementations, embodiments of the present disclosure may further include: deleting frames left by version iterations in the program initialization phase and/or delaying tuning into an integrated frame implementing multiple inheritance of classes to obtain an optimized cold start process.
In a specific embodiment, during the program initialization phase of the apple operating system (IOS) cold start process, it is necessary to read the executable files of the application program before loading by the dynamic linker system (dyld) of the apple operating system when dynamically linking the various dynamic link libraries. Other frames (frames) may be relied on in the loading process of the dynamic linker system (dyld), which may be frames that are not used any more because of version iteration, and the embodiments of the present disclosure delete the remaining redundant frames, so as to avoid the corresponding loading process.
In some alternative implementations, embodiments of the present disclosure may further include: class (class of Objective-c language) left by program version iteration in the program initialization stage is deleted, and/or class expansion is combined based on the attribute and method of the class, so that loading of some classes in an executable file can be avoided, and an optimized cold start process is obtained.
In some alternative implementations, embodiments of the present disclosure may further include: and suspending starting the introduction function realized based on the user operation in the program starting stage so as to obtain an optimized cold starting process.
In the program starting stage, a third party Software Development Kit (SDK) introduced in the prior art is analyzed, part of functions are required to be started and executed, for example, flash back crash protection and reporting and statistics of flash back data, and some functions which can be realized based on user operation can be executed after delay, for example: sharing, payment, etc., therefore, the embodiments of the present disclosure prioritize all functions involved in the third party software development kit SDK, and determine the initialization time of specific introduced functions to reduce the running time of the program start phase in the cold start process.
In some alternative implementations, embodiments of the present disclosure may further include: and uniformly calling functions of the switching methods of the flash back protection of the classes in the program starting stage to obtain an optimized cold starting process.
In a specific embodiment, a dispatch_once function may be used to encapsulate all the switching methods of flash retirement protection for multiple classes for unified invocation of functions.
In some alternative implementations, embodiments of the present disclosure may further include: based on the main function of the program starting stage, logs calling a plurality of interface functions are recorded, and the position where the flash back occurs is corrected, so that an optimized cold starting process is obtained.
For example: the flash back occurring position and the running time of each operation are recorded to check the time-consuming operation which is more hidden, a text output-based NSLog mode can be used, a Calendar file can be implicitly created during each printing, and log of each business party at the starting time can be deleted according to the Calendar file.
In some alternative implementations, embodiments of the present disclosure may further include: and carrying out asynchronous processing on the network request information based on an interface function corresponding to the network request information in the program starting stage so as to obtain an optimized cold starting process.
In a specific example, network request information in a program starting stage is checked to determine whether a plurality of requests sent by the network request information have a mutual dependency relationship and a mutual waiting process, interface functions corresponding to the request information are analyzed to determine whether operations capable of being processed simultaneously exist, and the operations capable of being processed simultaneously are determined to be asynchronous operations.
In some alternative implementations, embodiments of the present disclosure may further include: the page content and/or source file of the page content of the page generation phase is simplified to obtain an optimized cold start process. For example: pictures or words in the page content at the program start stage can be reduced.
In some alternative implementations, embodiments of the present disclosure may further include: the first screen page is generated based on the code of the source file in the page generation phase to obtain an optimized cold start process. The code of the source file in the program starting stage is directly used for loading the first page view, so that the process of analyzing the source file into the code by using xib can be avoided.
Any of the cold start optimization methods provided by the embodiments of the present disclosure may be performed by any suitable device having data processing capabilities, including, but not limited to: terminal equipment, servers, etc. Alternatively, any of the cold start optimization methods provided by the embodiments of the present disclosure may be executed by a processor, such as the processor executing any of the cold start optimization methods mentioned by the embodiments of the present disclosure by invoking corresponding instructions stored in a memory. And will not be described in detail below.
Fig. 3 is a schematic structural diagram of a cold start optimizing apparatus according to an exemplary embodiment of the present disclosure. The testing device can be arranged in electronic equipment such as terminal equipment and a server, and the cold start optimization method of any embodiment of the disclosure can be executed. As shown in fig. 3, the cold start optimizing apparatus includes:
the response module is used for responding to the received access request of the user to the application program, and the application program enters a cold start process; wherein the cold start process comprises: program initialization phase, program starting phase and page generation phase;
and the first optimizing module is used for not loading the extension protocol and the extension protocol method when constructing the attribute function of the function in the program initialization stage so as to obtain an optimized cold start process.
Based on the cold start optimizing device provided by the embodiment of the disclosure, responding to the received access request of the user to the application program, and enabling the application program to enter a cold start process; and in the program initialization stage, when constructing the attribute function of the function, the method of the extension protocol is not loaded so as to obtain an optimized cold start process. According to the embodiment of the disclosure, the method for adding the extension protocol and the extension protocol in the program initialization stage in the cold start process is avoided, so that the method for calling the extension protocol is delayed, the time required by cold start of the application program can be effectively shortened, and the user experience is improved.
In some of these embodiments, further comprising: and the second optimizing module is used for deleting the frame left by the version iteration in the program initialization stage and/or delaying the multi-inheritance integrated frame of the calling realization class so as to obtain an optimized cold start process.
In some of these embodiments, further comprising: and the third optimization module is used for deleting classes left by program version iteration in the program initialization stage and/or merging the expansion of the classes based on the attributes and the methods of the classes so as to obtain an optimized cold start process.
In some of these embodiments, further comprising: and the third optimization module is used for carrying out unified call on functions of the switching methods of the flash back protection of the classes in the program starting stage so as to obtain an optimized cold starting process.
In some of these embodiments, further comprising: and the fourth optimizing module is used for suspending starting of the introducing function realized based on the user operation in the program starting stage so as to obtain an optimized cold starting process.
In some of these embodiments, further comprising: and the fifth optimizing module is used for recording logs calling a plurality of interface functions based on the main function of the program starting stage and correcting the position where the record flash back happens so as to obtain an optimized cold starting process.
In some of these embodiments, further comprising: and the sixth optimization module is used for asynchronously processing the network request information based on an interface function corresponding to the network request information in the program starting stage so as to obtain an optimized cold starting process.
In some of these embodiments, further comprising: and the seventh optimization module is used for simplifying the page content and/or the source file of the page content in the page generation stage so as to obtain an optimized cold start process.
In some of these embodiments, further comprising: and an eighth optimization module, configured to generate a first screen page based on the code of the source file in the page generation stage, so as to obtain an optimized cold start procedure.
In addition, the embodiment of the disclosure also provides an electronic device, which comprises: a processor; a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the cold start optimization method according to any one of the embodiments of the present disclosure.
Next, an electronic device according to an embodiment of the present disclosure is described with reference to fig. 4. The electronic device may be either or both of the first device and the second device, or a stand-alone device independent thereof, which may communicate with the first device and the second device to receive the acquired input signals therefrom. Fig. 4 illustrates a block diagram of an electronic device according to an embodiment of the disclosure. As shown in fig. 4, the electronic device includes one or more processors 41 and memory 42.
The processor 41 may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
Memory 42 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that may be executed by the processor 41 to implement the cold start optimization method and/or other desired functions of the software program of the various embodiments of the present disclosure described above. In one example, the electronic device may further include: an input device 43 and an output device 44, which are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
In addition, the input device 43 may also include, for example, a keyboard, a mouse, and the like.
The output device 44 can output various information to the outside. The output device 44 may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, etc.
Of course, only some of the components of the electronic device relevant to the present disclosure are shown in fig. 4 for simplicity, components such as buses, input/output interfaces, etc. being omitted. In addition, the electronic device may include any other suitable components depending on the particular application.
In addition to the methods and apparatus described above, embodiments of the present disclosure may also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform steps in the cold start optimization method of the software program of the various embodiments described herein.
The computer program product may write program code for performing the operations of embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium, having stored thereon computer program instructions, which when executed by a processor, cause the processor to perform steps in a cold start optimization method of a software program of the above-described various embodiments of the present disclosure.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The basic principles of the present disclosure have been described above in connection with specific embodiments, however, it should be noted that the advantages, benefits, effects, etc. mentioned in the present disclosure are merely examples and not limiting, and these advantages, benefits, effects, etc. are not to be considered as necessarily possessed by the various embodiments of the present disclosure. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, since the disclosure is not necessarily limited to practice with the specific details described.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, so that the same or similar parts between the embodiments are mutually referred to. For system embodiments, the description is relatively simple as it essentially corresponds to method embodiments, and reference should be made to the description of method embodiments for relevant points.
The block diagrams of the devices, apparatuses, devices, systems referred to in this disclosure are merely illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, firmware. The above-described sequence of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the sequence specifically described above unless specifically stated otherwise. Furthermore, in some embodiments, the present disclosure may also be implemented as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the apparatus, devices and methods of the present disclosure, components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered equivalent to the present disclosure.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the disclosure to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.

Claims (18)

1. A cold start optimization method, comprising:
responding to receiving an access request of a user to an application program, and enabling the application program to enter a cold start process; wherein the cold start process comprises: program initialization phase, program starting phase and page generation phase;
the program initialization stage does not load an extension protocol and a method of the extension protocol when constructing an attribute function of a function so as to obtain an optimized cold start process;
recording logs calling a plurality of interface functions based on the main function of the program starting stage, implicitly creating a file according to the flash back occurrence position recorded by the logs and the running time of each operation, and deleting the logs of each service party during starting according to the implicitly created file so as to obtain an optimized cold starting process.
2. The method as recited in claim 1, further comprising: deleting the framework left by the version iteration in the program initialization stage and/or delaying the integration framework of the multi-inheritance of the calling implementation class so as to obtain an optimized cold start process.
3. The method according to claim 1 or 2, further comprising: and deleting the class left by program version iteration in the program initialization stage and/or merging the expansion of the class based on the attribute and the method of the class so as to obtain an optimized cold start process.
4. The method according to claim 1 or 2, further comprising: and uniformly calling functions of the switching methods of the flash back protection of the classes in the program starting stage to obtain an optimized cold starting process.
5. The method according to claim 1 or 2, further comprising: and suspending starting the introduction function realized based on the user operation in the program starting stage so as to obtain an optimized cold starting process.
6. The method according to any one of claims 1 or 2, further comprising: and carrying out asynchronous processing on the network request information based on an interface function corresponding to the network request information in the program starting stage so as to obtain an optimized cold starting process.
7. The method according to claim 1 or 2, further comprising: and simplifying the page content of the page generation stage and/or the source file of the page content to obtain an optimized cold start process.
8. The method according to claim 1 or 2, further comprising: and generating a first screen page based on the code of the source file in the page generation stage so as to obtain an optimized cold start process.
9. A cold start optimizing apparatus, comprising:
the response module is used for responding to the received access request of the user to the application program, and the application program enters a cold start process; wherein the cold start process comprises: program initialization phase, program starting phase and page generation phase;
the first optimizing module is used for not loading an expansion protocol and a method of the expansion protocol when the attribute function of the function is constructed in the program initialization stage so as to obtain an optimized cold start process;
and a fifth optimizing module, configured to record logs calling multiple interface functions based on the main function of the program starting stage, implicitly create a file according to the flashing occurrence position of the log record and the running time of each operation, and delete the logs of each service party during starting according to the implicitly created file, so as to obtain an optimized cold starting process.
10. The apparatus as recited in claim 9, further comprising: and the second optimizing module is used for deleting the frame left by the version iteration in the program initialization stage and/or delaying the multi-inheritance integrated frame of the calling realization class so as to obtain an optimized cold start process.
11. The apparatus according to claim 9 or 10, further comprising: and the third optimization module is used for deleting classes left by program version iteration in the program initialization stage and/or merging the expansion of the classes based on the attributes and the methods of the classes so as to obtain an optimized cold start process.
12. The apparatus according to claim 9 or 10, further comprising: and the third optimization module is used for carrying out unified call on functions of the switching methods of the flash back protection of the classes in the program starting stage so as to obtain an optimized cold starting process.
13. The apparatus according to claim 9 or 10, further comprising: and the fourth optimizing module is used for suspending starting of the introducing function realized based on the user operation in the program starting stage so as to obtain an optimized cold starting process.
14. The apparatus according to claim 9 or 10, further comprising: and the sixth optimization module is used for asynchronously processing the network request information based on an interface function corresponding to the network request information in the program starting stage so as to obtain an optimized cold starting process.
15. The apparatus according to claim 9 or 10, further comprising: and the seventh optimization module is used for simplifying the page content and/or the source file of the page content in the page generation stage so as to obtain an optimized cold start process.
16. The apparatus according to claim 9 or 10, further comprising: and an eighth optimization module, configured to generate a first screen page based on the code of the source file in the page generation stage, so as to obtain an optimized cold start procedure.
17. A computer readable storage medium, characterized in that the storage medium stores a computer program for performing the cold start optimization method according to any of the preceding claims 1-8.
18. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the cold start optimization method according to any one of the preceding claims 1-8.
CN202010241336.2A 2020-03-31 2020-03-31 Cold start optimization method and device, electronic equipment and storage medium Active CN111427630B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010241336.2A CN111427630B (en) 2020-03-31 2020-03-31 Cold start optimization method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010241336.2A CN111427630B (en) 2020-03-31 2020-03-31 Cold start optimization method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111427630A CN111427630A (en) 2020-07-17
CN111427630B true CN111427630B (en) 2024-03-22

Family

ID=71549976

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010241336.2A Active CN111427630B (en) 2020-03-31 2020-03-31 Cold start optimization method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111427630B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918235B (en) * 2021-09-17 2023-11-17 贝壳找房(北京)科技有限公司 Application loading method and device and storage medium
CN114647460A (en) * 2022-04-18 2022-06-21 中国工商银行股份有限公司 Application program starting method and device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6324546B1 (en) * 1998-10-12 2001-11-27 Microsoft Corporation Automatic logging of application program launches
CN102214100A (en) * 2011-06-24 2011-10-12 南京中兴新软件有限责任公司 Method and device for performing service
CN102646035A (en) * 2012-02-17 2012-08-22 南京南瑞继保电气有限公司 Visualized code generation method based on combination of API (application programming interface) and script definition
CN103838624A (en) * 2013-12-16 2014-06-04 浪潮电子信息产业股份有限公司 Log processing method based on Linux message queue
CN106445617A (en) * 2016-10-13 2017-02-22 武汉斗鱼网络科技有限公司 Android-based application program cold-start optimization method and Android-based application program cold-start optimization system
CN106874043A (en) * 2017-01-18 2017-06-20 环球智达科技(北京)有限公司 A kind of prioritization scheme of android applications cold start-up
CN107861766A (en) * 2017-06-26 2018-03-30 平安普惠企业管理有限公司 Using startup method, apparatus and computer-readable recording medium
CN109739571A (en) * 2018-12-20 2019-05-10 努比亚技术有限公司 Application program launching method, mobile terminal and computer readable storage medium
CN109753321A (en) * 2019-01-11 2019-05-14 武汉瓯越网视有限公司 Application starting method, apparatus, terminal and storage medium based on protocol registration
CN110333969A (en) * 2019-06-17 2019-10-15 Oppo广东移动通信有限公司 Using starting abnormality eliminating method and device, medium and equipment after system upgrade

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6324546B1 (en) * 1998-10-12 2001-11-27 Microsoft Corporation Automatic logging of application program launches
CN102214100A (en) * 2011-06-24 2011-10-12 南京中兴新软件有限责任公司 Method and device for performing service
CN102646035A (en) * 2012-02-17 2012-08-22 南京南瑞继保电气有限公司 Visualized code generation method based on combination of API (application programming interface) and script definition
CN103838624A (en) * 2013-12-16 2014-06-04 浪潮电子信息产业股份有限公司 Log processing method based on Linux message queue
CN106445617A (en) * 2016-10-13 2017-02-22 武汉斗鱼网络科技有限公司 Android-based application program cold-start optimization method and Android-based application program cold-start optimization system
CN106874043A (en) * 2017-01-18 2017-06-20 环球智达科技(北京)有限公司 A kind of prioritization scheme of android applications cold start-up
CN107861766A (en) * 2017-06-26 2018-03-30 平安普惠企业管理有限公司 Using startup method, apparatus and computer-readable recording medium
CN109739571A (en) * 2018-12-20 2019-05-10 努比亚技术有限公司 Application program launching method, mobile terminal and computer readable storage medium
CN109753321A (en) * 2019-01-11 2019-05-14 武汉瓯越网视有限公司 Application starting method, apparatus, terminal and storage medium based on protocol registration
CN110333969A (en) * 2019-06-17 2019-10-15 Oppo广东移动通信有限公司 Using starting abnormality eliminating method and device, medium and equipment after system upgrade

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Solving cold start problem in tag-based recommender systems using discrete imperialist competitive algorithm;Jafari, M.H. 等;2014 International Congress on Technology, Communication and Knowledge (ICTCK);全文 *
田保军 ; 杜晓娟 ; 杨浒昀 ; 苏依拉 ; .云计算环境下混合协同过滤优化技术研究.计算机应用研究.2017,(第07期),全文. *

Also Published As

Publication number Publication date
CN111427630A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
CN111427630B (en) Cold start optimization method and device, electronic equipment and storage medium
CN111813385B (en) Page plug-in method, device and equipment based on Web application
US20220012050A1 (en) Mini program batch processing method and apparatus, electronic device, and readable storage medium
CN111427579A (en) Plug-in, application program implementing method and system, computer system and storage medium
CN113094085B (en) Component integration method, device, computer readable storage medium and electronic equipment
CN110888972A (en) Sensitive content identification method and device based on Spark Streaming
CN114461223A (en) Code generation method and device and terminal equipment
EP3872630A2 (en) Request processing method and apparatus, electronic device, and computer storage medium
US20210232378A1 (en) Program calling, electronic device, and storage medium
CN112214250A (en) Application program assembly loading method and device
CN117215540A (en) Code generation method, device and system of remote procedure call framework
CN114911541B (en) Processing method and device of configuration information, electronic equipment and storage medium
CN116739524A (en) Business process setting method, device, equipment, storage medium and program product
CN111352644A (en) Applet updating method, device, server and storage medium
US9916391B2 (en) Method, apparatus and terminal for webpage content browsing
CN116362053A (en) Simulation calculation method, device and medium for calling programmable user model
CN113779122B (en) Method and device for exporting data
CN110659062B (en) Front-end scaffold configuration method and device, readable storage medium and electronic equipment
CN110765003B (en) Code detection method, device and equipment and storage medium
CN112882698A (en) Development environment generation method and device, computer storage medium and electronic device
CN113448960A (en) Method and device for importing form file
CN112068814A (en) Method, device, system and medium for generating executable file
CN111782183B (en) Method and device for judging component dependency, electronic device and medium
CN114281273B (en) Method and system for printing OFD electronic invoice format files in batches
CN111562909B (en) Class-based application implementation method and device, electronic equipment and storage medium

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
GR01 Patent grant