CN110543349B - Application starting acceleration method and device and computer readable storage medium - Google Patents

Application starting acceleration method and device and computer readable storage medium Download PDF

Info

Publication number
CN110543349B
CN110543349B CN201910847245.0A CN201910847245A CN110543349B CN 110543349 B CN110543349 B CN 110543349B CN 201910847245 A CN201910847245 A CN 201910847245A CN 110543349 B CN110543349 B CN 110543349B
Authority
CN
China
Prior art keywords
application
database
query
interface
instruction
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
CN201910847245.0A
Other languages
Chinese (zh)
Other versions
CN110543349A (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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201910847245.0A priority Critical patent/CN110543349B/en
Publication of CN110543349A publication Critical patent/CN110543349A/en
Application granted granted Critical
Publication of CN110543349B publication Critical patent/CN110543349B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • 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/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Mathematical Physics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides an application starting acceleration method, an application starting acceleration device and a computer readable storage medium, and when an application is started, a database pre-reading instruction is triggered; calling a corresponding query statement through a database pre-reading instruction, and then querying corresponding execution data from a database according to the query statement and caching the execution data; and after the process loading interface component of the application completes the interface layout, loading execution data in the interface layout for complete display of the application interface. By implementing the scheme, in the process of starting the terminal application, a database pre-reading mechanism is adopted to carry out parallel query and cache execution data, so that the database query operation flow is advanced, the application starting time is effectively reduced, and the application starting speed is accelerated.

Description

Application starting acceleration method and device and computer readable storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a method and an apparatus for accelerating application startup, and a computer-readable storage medium.
Background
The starting process of the application program of the terminal comprises the whole process from the starting of the application to the complete display of the application interface, and the time consumed in the starting process of the application has a great influence on the use experience of a user.
At present, in the process of starting an application program, after the application program is started, an application program file is read first, an application process is loaded based on the program file, then the application process is waited for interface layout, a database query instruction is triggered after the interface layout is completed, content data required under the current interface layout is queried in a database, and finally, a complete application interface is displayed based on the queried content data. Therefore, the currently adopted application program starting process is a serial starting process, the flow execution time sequence is strict, and the application starting time is long.
Disclosure of Invention
The embodiment of the application provides an application starting acceleration method, an application starting acceleration device and a computer readable storage medium, and at least the problem that application starting time is long due to the fact that a serial mode is strictly adopted for application program starting in the related art can be solved.
A first aspect of an embodiment of the present application provides an application start acceleration method, including:
triggering a database pre-reading instruction while the application is started;
calling a corresponding query statement through the database pre-reading instruction, and then querying and caching corresponding execution data from a database according to the query statement;
and after the process loading interface component of the application finishes interface layout, loading the execution data in the interface layout to completely display the application interface.
A second aspect of the embodiments of the present application provides an application start accelerating apparatus, including:
the triggering module is used for triggering a database pre-reading instruction while the application is started;
the pre-reading module is used for calling a corresponding query statement through the database pre-reading instruction, and then querying and caching corresponding execution data from a database according to the query statement;
and the loading module is used for loading the execution data in the interface layout to completely display the application interface after the process loading interface component of the application finishes the interface layout.
A third aspect of embodiments of the present application provides an electronic apparatus, including: the application start acceleration method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the application start acceleration method provided in the first aspect of the embodiment of the present application when executing the computer program.
A fourth aspect of the present embodiment provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the application start acceleration method provided in the first aspect of the present embodiment.
Therefore, according to the application starting acceleration method, the application starting acceleration device and the computer readable storage medium provided by the scheme of the application, the database pre-reading instruction is triggered while the application is started; calling a corresponding query statement through a database pre-reading instruction, and then querying corresponding execution data from a database according to the query statement and caching the execution data; and after the process loading interface component of the application completes the interface layout, loading execution data in the interface layout for complete display of the application interface. By implementing the scheme, in the process of starting the terminal application, a database pre-reading mechanism is adopted to carry out parallel query and cache execution data, so that the database query operation flow is advanced, the application starting time is effectively reduced, and the application starting speed is accelerated.
Drawings
Fig. 1 is a schematic basic flowchart of an application start acceleration method according to a first embodiment of the present application;
fig. 2 is a schematic flowchart of a method for executing data loading according to a first embodiment of the present application;
fig. 3 is a detailed flowchart of an application start acceleration method according to a second embodiment of the present application;
fig. 4 is a schematic diagram of program modules of an application startup accelerating device according to a third embodiment of the present application;
fig. 5 is a schematic diagram of program modules of another application startup accelerating device according to a third embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present invention more apparent and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to solve the defect of long application start time caused by strictly adopting a serial manner to start an application program in the related art, a first embodiment of the present application provides an application start acceleration method, for example, fig. 1 is a basic flowchart of the application start acceleration method provided by this embodiment, and the application start acceleration method includes the following steps:
step 101, triggering a database pre-reading instruction while starting an application.
Specifically, in the present embodiment, unlike the related art in which the database query operation is started after the page layout is completed, the present embodiment triggers the database pre-read operation in advance. It should be understood that, in this embodiment, the time node triggered by the database read-ahead instruction is not limited to the time when the application starts to be started, but may also be a specific time after the application starts to be started, and only needs to be guaranteed during the application starting process.
Optionally, before triggering the database pre-reading instruction, the method further includes: and judging whether the application meets a preset acceleration triggering condition or not.
Specifically, in practical application, the application start acceleration process of this embodiment is not applicable in any application scenario, and in order to avoid waste of terminal data processing performance and an application start error, in this embodiment, it is first determined whether a currently started application meets the application start acceleration trigger condition of this embodiment, and when the application start acceleration trigger condition is met, a subsequent step of triggering a database pre-read instruction is executed.
Further optionally, the determining whether the application satisfies the preset acceleration trigger condition includes: counting statement types of query statements called when an application is started each time in a historical time period; and determining whether the number of the repeated statement types is less than or equal to a preset number threshold according to the statistical result.
Specifically, in practical applications, the query statement is called to access the database every time the application is started, the access to the database may be the same or may be different every time the application is started, and if the query statement changes frequently, it indicates that the database access behavior when the application is started is relatively irregular, and it is difficult for the pre-query executed by the database pre-reading mechanism to ensure the rationality of the query result.
Based on the above analysis, the present embodiment determines that the preset acceleration trigger condition is satisfied when the number is less than or equal to the number threshold. In this embodiment, the historical start-up behavior of the application is monitored, the types of query statements called by each start of the current application in the historical time period are counted, and if the same query statement is always used for the start of the application in the historical time period or a small number of different query statements are repeatedly used for the start of the application in the historical time period, it is determined that the database pre-reading mechanism of this embodiment can be better applied to the current application start-up scenario, and the application start-up acceleration process of this embodiment is triggered.
And 102, calling a corresponding query statement through a database pre-reading instruction, and then querying corresponding execution data from the database according to the query statement and caching the execution data.
Specifically, in practical applications, the Query statement may be a Structured Query Language (SQL) statement, such as a Query statement select msg from db initiated during the startup process of the information application, and is used to Query the information storage database for the effective content required by the complete display of the information interface. In this embodiment, a database pre-reading mechanism is used to perform a database query process in advance, and to cache the data queried in advance in a data buffer, where the data buffer may be a cursor of the database.
Optionally, the application start acceleration method of this embodiment further includes: and establishing a mapping relation between the query statement of the repeated statement type and the applied database pre-reading instruction.
Specifically, in this embodiment, when monitoring the historical start-up behavior of the application and determining that the application is started in the historical time period, the database query is repeatedly performed by using one or a small number of types of query statements, and then the determined query statements are bound to the database read-ahead instruction currently applied.
Correspondingly, when the corresponding query statement is called through the database pre-reading instruction, the query statement corresponding to the database pre-reading instruction is determined and called based on the database pre-reading instruction and the mapping relation, that is, the query statement learned from the historical application starting behavior is used as the query statement adopted by the database pre-reading mechanism.
Optionally, when there are a plurality of query statements corresponding to the database pre-reading instruction, invoking the corresponding query statement through the database pre-reading instruction includes: determining invocation priorities of a plurality of query statements corresponding to database read-ahead instructions; and calling the query statement with the highest calling priority.
Specifically, in practical application, if the query statement corresponding to the database pre-reading instruction is unique, the query statement can be directly called, and when the database pre-reading instruction corresponds to a plurality of query statements at the same time, the calling mode can be unified calling or unique calling, wherein the unified calling is that all the query statements are called, and the unique calling is that one of the query statements is called.
In this embodiment, the query statement unique call under the condition that the database pre-reading instruction corresponds to multiple query statements is realized based on the call priorities of different query statements, in this example, the call priorities of different query statements may be determined in real time, and then the query statement with the highest priority is determined as the target call query statement. It should be noted that, in other embodiments of this embodiment, different call priorities may also be preset for different query statements, then a corresponding call priority is determined based on an instruction attribute of the database read-ahead instruction or an application attribute of the current application, and then the corresponding query statement is called based on the determined call priority.
Further optionally, determining the call priority of the plurality of query statements corresponding to the database read-ahead instruction comprises: acquiring a current starting attribute of an application which starts to be started; call priorities of a plurality of query statements corresponding to the database read-ahead instructions are determined based on the launch attributes.
Specifically, in this embodiment, the call priorities of different query statements are confirmed based on a start attribute of the currently started application, where the start attribute is a parameter that uniquely identifies the current start behavior of the application, such as the start time of the application.
And 103, after the process loading interface component of the application completes interface layout, loading execution data in the interface layout to perform complete display of the application interface.
Specifically, in this embodiment, a database pre-reading mechanism is enabled, when an application is just started, the database pre-reading mechanism immediately initiates a database query request, and a query statement is called through a database pre-reading instruction to query corresponding execution data, so that a database query behavior of the database is queried after an interface component is loaded by the application in a default application starting flow, and the database query flow is greatly advanced. In the application starting process, the database pre-reading is executed in parallel while other processes (such as loading interface components) of the non-database query process are executed, so that the database query is not required to be independently consumed for carrying out the database query, the execution time sequence of the processes is more flexible and reasonable, and the application starting is accelerated.
It should be noted that, in this embodiment, if there are multiple query statements and execution data corresponding to the multiple query statements are cached at the same time, at this time, when the execution data is loaded in the interface layout, only the target execution data should be loaded, then the method for determining the target execution data in this embodiment is to trigger a conventional database query instruction after the interface layout is completed, and then call the target query statement corresponding to the database query instruction, because the query statement corresponding to the database query instruction is unique, in this case, the target execution data can be determined from the cached multiple execution data based on the target query statement.
As shown in fig. 2, which is a schematic flow chart of the method for executing data loading according to the embodiment, optionally, after the process loading interface component of the application completes the interface layout, the method specifically includes the following steps:
step 201, acquiring a database query instruction triggered after interface layout is completed;
step 202, determining whether the query statements respectively corresponding to the database query instruction and the database read-ahead instruction are the same; if yes, go to step 203, if no, go to step 204;
step 203, loading the cached execution data in the interface layout to perform complete display of the application interface;
and step 204, inquiring execution data from the database according to the query statement corresponding to the database query instruction, and then loading the execution data corresponding to the database query instruction in the interface layout to completely display the application interface.
Specifically, in the application start acceleration process in this embodiment, a database query instruction in a conventional process may still be triggered, on one hand, whether the execution data determined by the database pre-reading mechanism is expected data may be checked based on the database query instruction, that is, a query statement corresponding to the database query instruction is matched with a query statement called by the previous database pre-reading, so that after the matching is successful, the previous pre-read data is determined to be correct data, and the pre-read data is directly loaded on the interface layout, an application interface with complete content is displayed, and the start of the application is completed.
On the other hand, if the query statement corresponding to the database query instruction fails to match the query statement called by the previous database pre-reading, it indicates that the previous database pre-reading behavior is incorrect, and the loading of the pre-read data cannot achieve normal startup of the application, so that the execution data needs to be determined again.
Optionally, in another embodiment, before loading the execution data in the interface layout for complete display of the application interface, the method further includes: preloading the cached execution data in the interface layout; determining whether the application interface which is preloaded is a target application interface meeting preset interface display conditions; and if so, executing the step of loading the execution data in the interface layout to perform the complete display of the application interface. Therefore, the embodiment determines whether the pre-read execution data is correct data or not by preloading the execution data, so that application starting errors caused by loading wrong data in the interface layout can be avoided.
Based on the technical scheme of the embodiment of the application, the database pre-reading instruction is triggered while the application is started; calling a corresponding query statement through a database pre-reading instruction, and then querying corresponding execution data from a database according to the query statement and caching the execution data; and after the process loading interface component of the application completes the interface layout, loading execution data in the interface layout for complete display of the application interface. Through the implementation of the scheme, in the terminal application starting process, the database pre-reading mechanism is adopted to carry out parallel query and cache execution data, so that the database query operation flow is advanced, the application starting time is effectively reduced, the application starting speed is accelerated, and the user experience is improved.
The method in fig. 3 is a refined application start-up acceleration method provided in a second embodiment of the present application, where the application start-up acceleration method includes:
step 301, when the application starts to start, counting statement types of query statements called by the application each time the application starts in a historical time period.
In this embodiment, it is first determined whether the currently started application meets the application start acceleration trigger condition, and when the application start acceleration trigger condition is met, the step of triggering the database pre-read instruction is executed.
And step 302, determining whether the number of the repeated statement types is less than or equal to a preset number threshold according to the statistical result.
For example, if 100 current applications are started in the historical time period, wherein 50 repeated calls are query statements of type a, 30 repeated calls are query statements of type B, and 20 repeated calls are query statements of type C, the number of repeated statement types in this embodiment is 3, that is, only 3 different query statements are reused in all database query operations in this embodiment.
Step 303, when the number is less than or equal to the number threshold, triggering a database pre-reading instruction.
Specifically, the embodiment monitors the historical start-up behavior of the application, counts the types of query statements called by the current application in each start-up in the historical time period, and determines that the database pre-reading mechanism of the embodiment is well applicable to the current application start-up scenario if the application is started up in the historical time period always using the same query statement or repeatedly using a small number of different query statements, thereby triggering the subsequent application start-up acceleration process of the embodiment.
And step 304, calling a corresponding query statement through a database pre-reading instruction, and then querying and caching corresponding execution data from the database according to the query statement.
Specifically, the embodiment performs the database query process in advance through the database pre-reading mechanism, and caches the data queried in advance in the data buffer, where the data buffer may be a cursor of the database.
Step 305, after the process of the application loads the interface component and completes the interface layout, triggering a database query instruction.
Step 306, determining whether the query statements respectively corresponding to the database query instruction and the database read-ahead instruction are the same; if yes, go to step 307, otherwise go to step 308.
Specifically, in the application start acceleration process in this embodiment, a database query instruction in the conventional process is still triggered after the interface layout is completed, and based on the database query instruction, it may be checked whether the execution data determined by the database read-ahead mechanism is the expected data.
And 307, loading the cached execution data in the interface layout to perform complete display of the application interface.
In this embodiment, after the query statements corresponding to the database query instruction and the database pre-read instruction are successfully matched, the pre-read data is determined to be correct data, and then the pre-read data is directly loaded on the interface layout, so as to display the application interface with complete content, and complete the start of the application. Because the database pre-reading is executed in parallel, the database query is not required to be carried out by independently consuming redundant time, the execution time sequence of the process is more flexible and reasonable, and the starting of the application is accelerated.
And 308, inquiring execution data from the database according to the query statement corresponding to the database query instruction, and then loading the execution data corresponding to the database query instruction in the interface layout to completely display the application interface.
In this embodiment, after the query statements corresponding to the database query instruction and the database pre-read instruction respectively fail to be matched, the data query is performed again in the database according to the query statement corresponding to the database query instruction, and then the target execution data corresponding to the database query instruction obtained by re-query is loaded in the interface layout to complete normal startup of the application.
It should be understood that, the size of the serial number of each step in this embodiment does not mean the execution sequence of the step, and the execution sequence of each step should be determined by its function and inherent logic, and should not be limited uniquely to the implementation process of the embodiment of the present application.
The embodiment of the application discloses an application starting acceleration method, which is used for confirming whether a current application is a target application or not when the application is started; if so, triggering a database pre-reading instruction, calling a corresponding query statement through the database pre-reading instruction, and querying and caching corresponding execution data from the database according to the query statement; after the interface layout is completed by loading the interface component by the application process, triggering a database query instruction; and when the query statements respectively corresponding to the database query instruction and the database pre-reading instruction are the same, loading the cached execution data in the interface layout to completely display the application interface. Through the implementation of the scheme, in the terminal application starting process, the database pre-reading mechanism is adopted to carry out parallel query and cache execution data, so that the database query operation flow is advanced, the application starting time is effectively reduced, the application starting speed is accelerated, and the user experience is improved.
Fig. 4 is a diagram illustrating an application start accelerating device according to a third embodiment of the present application. The application starting accelerating device can be used for realizing the application starting accelerating method in the embodiment. As shown in fig. 4, the application start accelerating device mainly includes:
the triggering module 401 is configured to trigger a database pre-reading instruction while the application is started;
a pre-reading module 402, configured to call a corresponding query statement through a database pre-reading instruction, and then query and cache corresponding execution data from the database according to the query statement;
and a loading module 403, configured to load execution data in the interface layout to perform complete display of the application interface after the process loading interface component of the application completes the interface layout.
As shown in fig. 5, another application start accelerating device provided in this embodiment is an optional implementation manner of this embodiment, where the application start accelerating device further includes: the determining module 404 is configured to determine whether the application satisfies a preset acceleration triggering condition. Correspondingly, when the acceleration trigger condition is satisfied, the trigger module 401 executes a function of triggering a database pre-read instruction.
Further, in an optional implementation manner of this embodiment, the determining module 404 is specifically configured to count statement types of query statements invoked by the application each time the application is started in a historical time period; and determining whether the number of the repeated statement types is less than or equal to a preset number threshold according to the statistical result. And when the number is smaller than or equal to the number threshold, meeting a preset acceleration triggering condition. .
Further, in an optional implementation manner of this embodiment, the application starting accelerating apparatus further includes: the establishing module 405 is configured to establish a mapping relationship between the query statement of the repeat statement type and the database read-ahead instruction of the application. Correspondingly, the pre-reading module 402 is specifically configured to determine and call an inquiry statement corresponding to the database pre-reading instruction based on the database pre-reading instruction and the mapping relationship.
In an optional implementation manner of this embodiment, when there are multiple query statements corresponding to the database pre-reading instruction, the pre-reading module 402 is specifically configured to determine the call priority of the multiple query statements corresponding to the database pre-reading instruction; and calling the query statement with the highest calling priority.
Further, in an optional implementation manner of this embodiment, when executing the function of determining the call priority of the multiple query statements corresponding to the database read-ahead instruction, the read-ahead module 402 is specifically configured to obtain a current start attribute of the application that starts to be started; call priorities of a plurality of query statements corresponding to the database read-ahead instructions are determined based on the launch attributes.
Further, in an optional implementation manner of this embodiment, the application starting accelerating apparatus further includes: the processing module 406 is configured to, after the process of the application loads the interface component and completes the interface layout, obtain a database query instruction triggered after the interface layout is completed; and determining whether the query statements respectively corresponding to the database query instruction and the database read-ahead instruction are the same. When the query statement corresponding to the database query instruction and the database read-ahead instruction are the same, the loading module 403 executes a function of loading execution data in the interface layout to perform complete display of the application interface; when the database query instruction is different from the query statement corresponding to the database pre-read instruction, the loading module 403 is configured to query execution data from the database according to the query statement corresponding to the database query instruction, and then load the execution data corresponding to the database query instruction in the interface layout to perform complete display of the application interface.
It should be noted that, the application start accelerating methods in the first and second embodiments can be implemented based on the application start accelerating device provided in this embodiment, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the application start accelerating device described in this embodiment may refer to the corresponding process in the foregoing method embodiment, and details are not described here again.
According to the application starting accelerating device provided by the embodiment, when the application is started, a database pre-reading instruction is triggered; calling a corresponding query statement through a database pre-reading instruction, and then querying corresponding execution data from a database according to the query statement and caching the execution data; and after the process loading interface component of the application completes the interface layout, loading execution data in the interface layout for complete display of the application interface. Through the implementation of the scheme, in the terminal application starting process, the database pre-reading mechanism is adopted to carry out parallel query and cache execution data, so that the database query operation flow is advanced, the application starting time is effectively reduced, the application starting speed is accelerated, and the user experience is improved.
Referring to fig. 6, fig. 6 is an electronic device according to a fourth embodiment of the present disclosure. The electronic device can be used for realizing the application starting acceleration method in the embodiment. As shown in fig. 6, the electronic device mainly includes:
memory 601, processor 602, bus 603, and computer programs stored on memory 601 and executable on processor 602, memory 601 and processor 602 connected by bus 603. The processor 602, when executing the computer program, implements the application start acceleration method in the foregoing embodiments. Wherein the number of processors may be one or more.
The Memory 601 may be a high-speed Random Access Memory (RAM) Memory, or a non-volatile Memory (non-volatile Memory), such as a disk Memory. The memory 601 is used for storing executable program code, and the processor 602 is coupled with the memory 601.
Further, an embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium may be provided in an electronic device in the foregoing embodiments, and the computer-readable storage medium may be the memory in the foregoing embodiment shown in fig. 6.
The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the application start-up acceleration method in the foregoing embodiments. Further, the computer-readable storage medium may be various media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a RAM, a magnetic disk, or an optical disk.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a logical division, and other divisions may be realized in practice, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a readable storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned readable storage medium comprises: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
It should be noted that for simplicity and convenience of description, the above-described method embodiments are described as a series of combinations of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders and/or concurrently. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the application start-up acceleration method, the electronic device and the computer-readable storage medium provided by the present application, those skilled in the art will recognize that changes may be made in the embodiments and applications of the application based on the concepts of the embodiments of the present application.

Claims (9)

1. An application start acceleration method, comprising:
when the application starts to be started, counting statement types of query statements called during each starting of the application in a historical time period;
when the number of the repeated statement types is determined to be smaller than or equal to a preset number threshold according to the statistical result, triggering a database pre-reading instruction;
calling a corresponding query statement through the database pre-reading instruction, and then querying and caching corresponding execution data from a database according to the query statement;
and after the process loading interface component of the application completes interface layout, loading the execution data in the interface layout for complete display of the application interface.
2. The application startup acceleration method according to claim 1, further comprising, before loading the execution data in the interface layout for a complete display of an application interface:
preloading the cached execution data in the interface layout;
determining whether the application interface which is preloaded is a target application interface meeting preset interface display conditions;
and if so, loading the execution data in the interface layout to perform the complete display of the application interface.
3. The application start acceleration method according to claim 1, characterized by further comprising:
establishing a mapping relation between the query statement of the repeated statement type and the applied database pre-reading instruction;
the calling the corresponding query statement through the database pre-reading instruction comprises:
and determining and calling a query statement corresponding to the database pre-reading instruction based on the database pre-reading instruction and the mapping relation.
4. The method according to claim 1, wherein when there are a plurality of query statements corresponding to the database read-ahead instruction, the invoking the corresponding query statement by the database read-ahead instruction comprises:
determining a call priority of a plurality of query statements corresponding to the database read-ahead instruction;
and calling the query statement with the highest calling priority.
5. The application launch acceleration method of claim 4, wherein said determining a call priority of a plurality of query statements corresponding to the database read-ahead instructions comprises:
acquiring the current starting attribute of the application which starts to be started;
determining a call priority of a plurality of query statements corresponding to the database read-ahead instruction based on the launch attribute.
6. The application starting acceleration method according to any one of claims 1 to 5, characterized in that after the process loading interface component of the application completes the interface layout, the method further comprises:
acquiring a database query instruction triggered after interface layout is completed;
determining whether the query statements respectively corresponding to the database query instruction and the database pre-reading instruction are the same;
when the query statements corresponding to the database query instruction and the database pre-reading instruction are the same, the step of loading the execution data in the interface layout for complete display of an application interface is executed;
and when the query statements corresponding to the database query instruction and the database pre-reading instruction are different, querying execution data from a database according to the query statement corresponding to the database query instruction, and then loading the execution data corresponding to the database query instruction in the interface layout to completely display an application interface.
7. An application start accelerating device, comprising:
the judging module is used for counting statement types of query statements called when the application is started every time in a historical time period; determining whether the number of the repeated statement types is less than or equal to a preset number threshold according to the statistical result; when the number of the repeated statement types is smaller than or equal to a number threshold value, the application meets a preset acceleration triggering condition;
the triggering module is used for triggering a database pre-reading instruction when the application meets the acceleration triggering condition after the application is started;
the pre-reading module is used for calling a corresponding query statement through the database pre-reading instruction, and then querying and caching corresponding execution data from a database according to the query statement;
and the loading module is used for loading the execution data in the interface layout to perform complete display of the application interface after the process loading interface component of the application completes the interface layout.
8. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201910847245.0A 2019-09-09 2019-09-09 Application starting acceleration method and device and computer readable storage medium Active CN110543349B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910847245.0A CN110543349B (en) 2019-09-09 2019-09-09 Application starting acceleration method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910847245.0A CN110543349B (en) 2019-09-09 2019-09-09 Application starting acceleration method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110543349A CN110543349A (en) 2019-12-06
CN110543349B true CN110543349B (en) 2023-02-28

Family

ID=68713117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910847245.0A Active CN110543349B (en) 2019-09-09 2019-09-09 Application starting acceleration method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110543349B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11494119B2 (en) * 2020-09-10 2022-11-08 Micron Technology, Inc. Memory searching component

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739453A (en) * 2009-12-17 2010-06-16 中国电力科学研究院 Method and device for carrying out condition query on database table
CN104035923A (en) * 2013-03-04 2014-09-10 阿里巴巴集团控股有限公司 Data inquiry method and device
CN105426411A (en) * 2015-10-31 2016-03-23 南京南瑞继保电气有限公司 Access trend prediction based time series database cache management method
CN108762848A (en) * 2018-05-31 2018-11-06 努比亚技术有限公司 The quick loading method of Activity data, intelligent terminal and computer readable storage medium
CN110134707A (en) * 2019-04-12 2019-08-16 平安普惠企业管理有限公司 A kind of data query method, apparatus, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140236884A1 (en) * 2013-02-15 2014-08-21 Sap Ag Analysis of datasets without predefined dimensions

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739453A (en) * 2009-12-17 2010-06-16 中国电力科学研究院 Method and device for carrying out condition query on database table
CN104035923A (en) * 2013-03-04 2014-09-10 阿里巴巴集团控股有限公司 Data inquiry method and device
CN105426411A (en) * 2015-10-31 2016-03-23 南京南瑞继保电气有限公司 Access trend prediction based time series database cache management method
CN108762848A (en) * 2018-05-31 2018-11-06 努比亚技术有限公司 The quick loading method of Activity data, intelligent terminal and computer readable storage medium
CN110134707A (en) * 2019-04-12 2019-08-16 平安普惠企业管理有限公司 A kind of data query method, apparatus, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Android中连接MySql数据库获取数据的简单实现;邹奇;《https://blog.csdn.net/csdnzouqi/article/details/87382143》;20190220;第1至10页 *

Also Published As

Publication number Publication date
CN110543349A (en) 2019-12-06

Similar Documents

Publication Publication Date Title
EP3860043A2 (en) Method and apparatus for implementing smart contract based on blockchain
CN112667405B (en) Information processing method, device, equipment and storage medium
CN108512930B (en) Shared file management method, device, server and storage medium
CN109359060B (en) Data extraction method, device, computing equipment and computer storage medium
US20120227057A1 (en) Driver Shimming
CN110543349B (en) Application starting acceleration method and device and computer readable storage medium
CN118250206A (en) High concurrency pressure testing method and related device based on flow playback
CN111294377A (en) Network request sending method of dependency relationship, terminal device and storage medium
CN113608742A (en) Detection method, code packet processing method, operation control method and computing device
CN110334034B (en) Mapping table dynamic loading method and device, computer equipment and storage medium
US20240168798A1 (en) Automatic synchronous or asynchronous execution of requests
CN111930528A (en) Message writing method, device and equipment of message middleware and readable storage medium
CN111611058A (en) Task execution method and device and electronic equipment
CN108062224B (en) Data reading and writing method and device based on file handle and computing equipment
WO2023016485A1 (en) Method for acquiring function call information, and apparatus, electronic device and medium
CN115858668A (en) Distributed transaction processing method, device, electronic device and storage medium
CN107632893B (en) Message queue processing method and device
CN114637656A (en) Redis-based monitoring method, device, storage medium and equipment
CN108874325B (en) Data printing method and system
CN112231290A (en) Method, device and equipment for processing local log and storage medium
CN111736970B (en) Service processing method, device, equipment and computer readable storage medium
CN110471750B (en) Timing task control method, device, medium and computer equipment
CN111930475B (en) Method and device for starting ETT operation
CN108984450B (en) Data transmission method, device and equipment
CN118631919A (en) Equipment capability acquisition method, device, client 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