CN108829469B - Application page display method and device - Google Patents

Application page display method and device Download PDF

Info

Publication number
CN108829469B
CN108829469B CN201810350669.1A CN201810350669A CN108829469B CN 108829469 B CN108829469 B CN 108829469B CN 201810350669 A CN201810350669 A CN 201810350669A CN 108829469 B CN108829469 B CN 108829469B
Authority
CN
China
Prior art keywords
logic
execution
configuration file
priority
page
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
CN201810350669.1A
Other languages
Chinese (zh)
Other versions
CN108829469A (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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201810350669.1A priority Critical patent/CN108829469B/en
Publication of CN108829469A publication Critical patent/CN108829469A/en
Application granted granted Critical
Publication of CN108829469B publication Critical patent/CN108829469B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • G06F9/4818Priority circuits therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and a device for displaying an application program page, and belongs to the technical field of terminals. The method comprises the following steps: receiving a starting instruction of an application program; reading a preset priority configuration file, wherein the priority configuration file comprises the execution priority of each service logic; distributing corresponding delay time length for each service logic according to the priority configuration file; and displaying an application program page, and executing the corresponding service logic according to each delay time length. The invention sets different execution priorities for different service logics of the application program page to form different priority sequences, and sequentially executes the service logics with different priorities when the page is displayed, thereby ensuring that the service logics with high priorities are preferentially executed and the service logics with low priorities are sequentially delayed to be executed, avoiding resource occupation and disorder caused by parallel execution of the service logics and improving the fluency of page loading display.

Description

Application page display method and device
Technical Field
The invention belongs to the technical field of terminals, and particularly relates to a method and a device for displaying an application program page.
Background
With the development and progress of mobile application technology, the functions of various apps are no longer single and are more and more abundant, for example, functions of shopping, listening to music, watching videos and the like are integrated in social chat apps.
However, the increase of the functions in the App causes the application to load more content in the using process, consumes a large amount of CPU or IO resources of the terminal, and causes the App page to be loaded with a pause, and particularly in the starting process, the loading content is more during initialization, the page pause is more significant, the use interest and experience of the user are reduced, and the loss of the user amount is caused.
Disclosure of Invention
The invention provides an application program page display method and device, and aims to solve the problem that a page is jammed in an App using process.
According to a first aspect of the present invention, there is provided an application page display method, including:
receiving a starting instruction of an application program;
reading a preset priority configuration file, wherein the priority configuration file comprises the execution priority of each service logic;
distributing corresponding delay time length for each service logic according to the priority configuration file;
and displaying an application program page, and executing the corresponding service logic according to each delay time length.
Optionally, the displaying the application page, executing the corresponding service logic according to each delay time duration, includes:
executing basic page logic except the business logic through an interface provided by an application program to load a page;
and after the page is loaded and displayed, executing the corresponding service logic according to each delay time length.
Optionally, the executing the corresponding service logic according to each delay time duration includes:
and executing each service function by the thread corresponding to the application program page according to each delay time, wherein one service function corresponds to one delay time, each service function independently expresses corresponding service logic, and the service logic is positioned in a Presenter constructed in an MVP mode.
Optionally, the executing the corresponding service logic according to each delay time duration includes:
executing foreground execution logic in the main thread of the application program according to the delay duration;
executing background execution logic in a background management thread according to the delay time;
the foreground execution logic and the background execution logic are classification performed on the business logic in advance.
Optionally, the method further includes:
dynamically updating the priority configuration file;
and adjusting the execution priority of the service logic according to the updated priority configuration file.
Optionally, the dynamically adjusting the execution priority of the service logic includes:
counting and collecting the execution time of each business logic and the actual application time of the business corresponding to each business logic;
calculating a time difference between the execution time and the actual application time;
uploading the time difference to a background server;
generating a dynamic configuration file according to the time difference, wherein the dynamic configuration file is generated by a background server, the dynamic configuration file comprises execution delay corresponding to each service logic, and the execution delay represents the execution priority of each service logic;
receiving the dynamic configuration file;
replacing the priority profile with the dynamic profile; or
Merging the priority profile with the dynamic profile.
According to a second aspect of the present invention, there is provided an application page presentation apparatus, comprising:
the instruction receiving module is used for receiving a starting instruction of the application program;
the device comprises a configuration file reading module, a priority configuration file processing module and a configuration file processing module, wherein the configuration file reading module is used for reading a preset priority configuration file, and the priority configuration file comprises the execution priority of each service logic;
the delay allocation module is used for allocating corresponding delay time length for each service logic according to the priority configuration file;
and the page display module is used for displaying an application program page and executing the corresponding service logic according to each delay time length.
Optionally, the page display module includes:
the first logic execution module is used for executing basic page logic except the business logic through an interface provided by an application program so as to load a page;
and the second logic execution module is used for executing the corresponding service logic according to each delay time length after page loading and displaying.
Optionally, the second logic execution module includes:
and the function execution submodule is used for executing each service function by the thread corresponding to the application program page according to each delay time, wherein one service function corresponds to one delay time, each service function independently expresses corresponding service logic, and the service logic is positioned in a Presenter constructed in an MVP mode.
Optionally, the second logic execution module includes:
the main thread module is used for executing foreground execution logic in the main thread of the application program according to the delay duration;
the background management thread module is used for executing background execution logic according to the delay time length in a background management thread;
the foreground execution logic and the background execution logic are classification performed on the business logic in advance.
Optionally, the apparatus further comprises:
the priority configuration file updating module is used for dynamically updating the priority configuration file;
and the dynamic adjusting module is used for adjusting the execution priority of the service logic according to the updated priority configuration file.
Optionally, the priority profile updating module includes:
the statistic collection submodule is used for counting and collecting the execution time of each business logic and the actual application time of the business corresponding to each business logic;
the computing submodule is used for computing the time difference between the execution time and the actual application time;
the uploading sub-module is used for uploading the time difference to a background server;
the generating submodule is used for generating a dynamic configuration file according to the time difference, wherein the dynamic configuration file is generated by a background server, the dynamic configuration file comprises execution delay corresponding to each service logic, and the execution delay represents the execution priority of each service logic;
the receiving submodule is used for receiving the dynamic configuration file;
a replacement submodule, configured to replace the priority profile with the dynamic profile; or
And the merging submodule is used for merging the priority configuration file and the dynamic configuration file.
Aiming at the prior art, the invention has the following advantages:
according to the application program page display method and device provided by the invention, different execution priorities are set for different service logics of the application program page to form the priority order of execution of the different service logics, and when the page is displayed, the service logics with different priorities are sequentially executed according to the delay time, so that the service logics with high priorities are preferentially executed, the service logics with low priorities are sequentially delayed to be executed, the resource occupation and disorder caused by parallel execution of the service logics are avoided, and the page loading display fluency is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of an application page display method according to an embodiment of the present invention;
FIG. 2 is a flowchart of an application page display method according to a second embodiment of the present invention;
FIG. 3 is a block diagram of an apparatus for displaying application pages according to a third embodiment of the present invention;
fig. 4 is a block diagram of an application page displaying apparatus according to a fourth embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Example one
Fig. 1 is a flowchart of steps of a method for displaying an application page according to an embodiment of the present invention, which is applied to a mobile terminal, and as shown in fig. 1, the method may include:
step 101, receiving a starting instruction of an application program.
The starting instruction in the embodiment of the present invention may be a monitored click starting behavior of a user on a target application program, or may be a monitored calling behavior of other application programs on the target application program, for example: when the user uses the video App, the shopping App is started by clicking the advertisement link to call. The starting instruction also comprises the storage path information of the priority configuration file after decompression and installation, so that when a user uses App, the application program can access the priority configuration file according to the storage path information through the starting instruction.
Step 102, reading a preset priority configuration file, wherein the priority configuration file comprises an execution priority of each service logic.
In the embodiment of the invention, after receiving the starting instruction, the application program starts to read the preset priority configuration file according to the starting instruction, wherein the priority configuration file comprises the execution priority of each service logic. And the developer allocates corresponding execution priority for each business logic in advance according to the importance of different business logic to form a configuration file, and the configuration file is packaged in an installation package of the application program. Specifically, in the page display process, at least basic page logic and business logic are involved, the basic page logic refers to program logic responsible for loading basic frames and elements of the page, and the business logic refers to program logic closely related to business operated by a user (for example, in the process that the user watches videos by using a video App, behaviors such as judging whether needed video resources exist in a video library and loading the video resources are business logic, and behaviors such as calling and loading of page constituent elements are basic page logic outside the business logic).
When assigning a corresponding execution priority to each service logic, the following policy configuration priorities may be referenced: the notification reminding logic marked by the red dots can be considered to be more important, and a first priority is allocated to the notification reminding logic; the skin package emoticon downloading logic is of lesser importance and is assigned a second priority. Another priority configuration strategy is: the logic corresponding to the playing record used by the user is probably earlier and relatively important, so the page needs to be executed immediately after being displayed, so that the user can be prompted to continue watching the video in time, and a first priority can be allocated to the user; for the logic corresponding to the information such as the uploaded crash logs, the importance is weak because the user cannot perceive the logic and occupies the network and the IO, and a second priority can be allocated to the logic. According to the above example, according to the importance of each service logic, a high priority is assigned to the service logic with high importance, and a low priority is assigned to the service logic with low importance.
And 103, distributing corresponding delay time for each service logic according to the priority configuration file.
In the embodiment of the present invention, because the priority configuration file includes the execution priority of each service logic, a corresponding delay duration may be allocated to each service logic according to the execution priority of each service logic. Such as: the service logic A has the highest importance, the execution priority of the service logic A is the first priority, and then the service logic A is allocated with 0s delay time length, namely is not delayed and is immediately executed; the service logic B is higher in importance, the execution priority of the service logic B is the second priority, 2s of delay time is allocated to the service logic B, namely 2s of delay is executed, corresponding delay is allocated to each service logic in sequence, therefore, each service logic can be executed in sequence according to the order of importance, and resource occupation and disorder caused by parallel execution of the service logics are avoided.
And 104, displaying an application program page, and executing the corresponding service logic according to each delay time length.
In the embodiment of the invention, after the file is configured according to the priority and the delay time is allocated to each service logic, the page of the application program is preliminarily displayed by executing the most basic logic related to the page UI in the application program, and then the corresponding service logics are executed one by one according to the corresponding delay time, so that the execution orderliness of the service logics is ensured, the load of a CPU and the occupation of IO are reduced, and the page loading display fluency is improved.
In summary, in the application page display method provided in the embodiment of the present invention, different execution priorities are set for different service logics of an application page, so as to form priority sequences for executing the different service logics, and when the page is displayed, the service logics with different priorities are sequentially executed according to a delay time, so that the service logics with high priorities are preferentially executed, the service logics with low priorities are sequentially delayed to be executed, resource occupation and disorder caused by parallel execution of the service logics are avoided, and smoothness of page loading display is improved.
Example two
Fig. 2 is a flowchart of another method for displaying an application page according to a second embodiment of the present invention, which is applied to a mobile terminal, and as shown in fig. 2, the method may include:
step 201, receiving a starting instruction of an application program.
The starting instruction in the embodiment of the present invention may be a monitored click starting behavior of a user on a target application program, or may be a monitored calling behavior of other application programs on the target application program, for example: when the user uses the video App, the shopping App is started by clicking the advertisement link to call. The starting instruction also comprises the storage path information of the priority configuration file after decompression and installation, so that when a user uses App, the application program can access the priority configuration file according to the storage path information through the starting instruction.
Step 202, reading a preset priority configuration file, wherein the priority configuration file includes an execution priority of each service logic.
In the embodiment of the invention, after receiving the starting instruction, the application program starts to read the preset priority configuration file according to the starting instruction, wherein the priority configuration file comprises the execution priority of each service logic. And the developer allocates corresponding execution priority for each business logic in advance according to the importance of different business logic to form a configuration file, and the configuration file is packaged in an installation package of the application program. Specifically, in the page display process, at least basic page logic and business logic are involved, the basic page logic refers to program logic responsible for loading basic frames and elements of the page, and the business logic refers to program logic closely related to business operated by a user (for example, in the process that the user watches videos by using a video App, behaviors such as judging whether needed video resources exist in a video library and loading the video resources are business logic, and behaviors such as calling and loading of page constituent elements are basic page logic outside the business logic).
When assigning a corresponding execution priority to each service logic, the following policy configuration priorities may be referenced: the notification reminding logic marked by the red dots can be considered to be more important, and a first priority is allocated to the notification reminding logic; the skin package emoticon downloading logic is of lesser importance and is assigned a second priority. Another priority configuration strategy is: the logic corresponding to the playing record used by the user is probably earlier and relatively important, so the page needs to be executed immediately after being displayed, so that the user can be prompted to continue watching the video in time, and a first priority can be allocated to the user; for the logic corresponding to the information such as the uploaded crash logs, the importance is weak because the user cannot perceive the logic and occupies the network and the IO, and a second priority can be allocated to the logic. According to the above example, according to the importance of each service logic, a high priority is assigned to the service logic with high importance, and a low priority is assigned to the service logic with low importance.
Step 203, allocating a corresponding delay time for each service logic according to the priority configuration file.
In the embodiment of the present invention, because the priority configuration file includes the execution priority of each service logic, a corresponding delay duration may be allocated to each service logic according to the execution priority of each service logic. Such as: the service logic A has the highest importance, the execution priority of the service logic A is the first priority, and then the service logic A is allocated with 0s delay time length, namely is not delayed and is immediately executed; the service logic B is higher in importance, the execution priority of the service logic B is the second priority, 2s of delay time is allocated to the service logic B, namely 2s of delay is executed, corresponding delay is allocated to each service logic in sequence, therefore, each service logic can be executed in sequence according to the order of importance, and resource occupation and disorder caused by parallel execution of the service logics are avoided.
And step 204, executing basic page logic except the business logic through an interface provided by an application program to load a page.
In the embodiment of the invention, the application program itself is provided with rich data communication interfaces, for example, basic page logic except business logic is executed to read and call resources such as UI elements necessary for page display through an interface related to a first screen page, so as to realize initial loading of the page and initial page display.
And step 205, after the page is loaded and displayed, executing the corresponding service logic according to each delay time length.
And when the page is displayed after the other logic is initially loaded, sequentially executing the corresponding service logics according to the delay time length allocated to each service logic. Such as: the delay durations of the service logic A, B, C, D are 0s, 2s, 4s, and 6s, respectively, then with the time of the page display as a reference, the service logic a is executed while the page display is performed, the service logic B is executed after the delay of 2s, the service logic C is executed after the delay of 4s, and the service logic D is executed after the delay of 6 s. Specifically, the call to each business logic may be implemented with reference to the following format:
Figure GDA0003080121620000091
wherein, "… …" represents the service functions corresponding to each service logic to be called and executed, and each service function is executed in sequence according to a certain delay time. Of course, the delay time length of the embodiment is only used as an example, and the actually set delay time length is not limited by the present invention.
The specific implementation of step 205 is as described in step 2051 or steps 2052 to 2053.
And step 2051, the thread corresponding to the application page executes each service function according to each delay time, wherein one service function corresponds to one delay time, each service function independently expresses a corresponding service logic, and the service logic is located in a Presenter built in an MVP mode.
In the embodiment of the invention, based on MVP mode (Model-View-Presenter, Model, reading, storing, network, database and other related operations of local data, showing of View and UI, updating of UI interface, obtaining of user input, where Presenter places business logic, scheduling View and Model to realize business logic), business logic is extracted in advance and placed in the Presenter in a unified manner, each business logic in an application program is expressed by a corresponding business function independently, namely, the business functions are all located in the Presenter, the independence among the business functions ensures the weak relevance of the business logic, is beneficial to independently distributing corresponding delay time for each business logic, and is more convenient for calling and managing the business logic. And executing each service function by the thread corresponding to the page in the application program according to each delay time length, realizing the ordered execution of each service logic and improving the fluency of page loading.
Step 2052, executing foreground execution logic in the main thread of the application program according to the delay duration;
step 2053, executing background execution logic in the background management thread according to the delay time;
the foreground execution logic and the background execution logic are classification performed on the business logic in advance.
In the embodiment of the invention, the application program is a multi-thread running working mode and at least comprises an application program main thread and a background management thread, the application program main thread executes foreground execution logic according to the delay time, and the background management thread executes background execution logic according to the delay time. The foreground execution logic and the background execution logic are classification of the business logic in advance. The foreground execution logic mainly comprises UI communication and logic which needs to avoid the problem of multithreading confusion, the background logic comprises IO operation, network operation and other asynchronous operation logic, and particularly the logic related to IO needs to be executed through a background management thread. Therefore, the service logic is divided into the foreground execution logic and the background execution logic which are managed and executed by different threads respectively, so that mutual interference in the service logic execution process is avoided.
And step 206, dynamically updating the priority configuration file.
In the embodiment of the present invention, after step 205, the preset priority configuration file may be dynamically updated according to the data accumulated in the previous page display process, so as to further optimize the execution sequence of each service logic and improve the page loading display efficiency. The updated policy is as described in steps 2061 to 2065.
Step 2061, counting and collecting the execution time of each service logic and the actual application time of the service corresponding to each service logic;
step 2062, calculating the time difference between the execution time and the actual application time;
step 2063, uploading the time difference to a background server;
step 2064, generating a dynamic configuration file according to the time difference, wherein the dynamic configuration file is generated by a background server, the dynamic configuration file includes an execution delay corresponding to each service logic, and the execution delay represents an execution priority of each service logic;
step 2065, receiving the dynamic configuration file;
step 2066, replacing the priority configuration file with the dynamic configuration file; or
Step 2067, merging the priority configuration file and the dynamic configuration file.
The service logic corresponding to each specific service has a corresponding execution time and actual application time, for example: in the video App, a user needs to publish an emotion package in a bullet screen, the time for downloading the emotion package is the execution time of the service logic, the time for the user to use the emotion package is the actual application time of the service logic, the execution time of each service logic is not necessarily the same as the actual application time, and the same is true for other service logics. Therefore, the execution time of each service logic and the actual application time of the corresponding service are counted and collected, the time difference between the execution time of each service logic and the actual application time of the corresponding service is calculated, and the execution time difference of each service logic can be accurately obtained. And uploading the time difference to a background server corresponding to the App, and generating a new dynamic configuration file in the background server, wherein the dynamic configuration file is the configuration of delay time which is redistributed for each service logic in sequence according to the short-to-long sequence of the execution time difference on the basis of the uploaded execution time difference, and the delay time is also used for representing the execution priority of each service logic. When the App is used again, the terminal can receive the dynamic configuration file, directly use the dynamic configuration file to replace and cover the original preset priority configuration file, or combine the dynamic configuration file and the original preset priority configuration file for use. Of course, the two files can be combined and used by considering the difference of the importance of the two files, and a certain weight proportion is given to the two files, so that the obtained new priority is calculated, and the specific algorithm rule adopted in the combination and use is not limited by the invention.
And step 207, adjusting the execution priority of the service logic according to the updated priority configuration file.
Whether the dynamic configuration file is used in a replacement mode or in a combined mode, when the dynamic configuration file is applied to the dynamic configuration file, the original preset priority configuration file is updated, the execution delay of each service logic can be redistributed according to the new execution delay contained in the dynamic configuration file, the execution priority of the service logic is adjusted, the execution sequence of each service logic is optimized, and page loading smoothness is improved.
In summary, the application page display method provided in the second embodiment of the present invention can respectively execute foreground and background execution logics based on different threads, accumulate the time difference data of the service logic loaded on the page in the application process, dynamically adjust and update the preset fixed execution priority, ensure the relative independence of the execution of each service logic, avoid the interference and confusion of the multi-thread execution service logic, and improve the fluency of page loading and display.
EXAMPLE III
Fig. 3 is a block diagram of an application page display apparatus according to a third embodiment of the present invention, and as shown in fig. 3, the apparatus may include:
an instruction receiving module 301, configured to receive a start instruction of an application program;
a configuration file reading module 302, configured to read a preset priority configuration file, where the priority configuration file includes an execution priority of each service logic;
a delay allocation module 303, configured to allocate, according to the priority configuration file, a corresponding delay duration for each service logic;
and a page display module 304, configured to display an application page, and execute the corresponding service logic according to each delay time.
In summary, in the application page display apparatus provided in the third embodiment of the present invention, different execution priorities are set for different service logics of an application page, so as to form priority sequences for executing the different service logics, and when the page is displayed, the service logics with different priorities are sequentially executed according to a delay time, so as to ensure that the service logics with high priorities are preferentially executed and the service logics with low priorities are sequentially delayed for execution, thereby avoiding resource occupation and disorder caused by parallel execution of the service logics, and improving fluency of page loading and displaying.
Example four
Fig. 4 is a block diagram of an application page display apparatus according to a fourth embodiment of the present invention, and as shown in fig. 4, the apparatus may include:
an instruction receiving module 401, configured to receive a start instruction of an application;
a configuration file reading module 402, configured to read a preset priority configuration file, where the priority configuration file includes an execution priority of each service logic;
a delay allocation module 403, configured to allocate, according to the priority configuration file, a corresponding delay duration for each service logic;
a first logic execution module 404, configured to execute, through an interface provided by an application program, basic page logic other than the business logic to load a page;
and a second logic execution module 405, configured to execute the corresponding service logic according to each delay time after the page is loaded and displayed.
Optionally, the second logic executing module 405 may include:
the function execution submodule 4051 is configured to execute each service function according to each delay time by the thread corresponding to the application page, where one service function corresponds to one delay time, each service function separately expresses a corresponding service logic, and the service logic is located in the Presenter built in the MVP mode. Or
A main thread module 4052, configured to execute a foreground execution logic in the main thread of the application according to the delay duration;
a background management thread module 4053, configured to execute a background execution logic in a background management thread according to the delay time;
the foreground execution logic and the background execution logic are classification performed on the business logic in advance.
Optionally, the apparatus further comprises:
a priority profile updating module 406, configured to dynamically update the priority profile;
the dynamic adjustment module 407 adjusts the execution priority of the service logic according to the updated priority configuration file.
Optionally, the priority profile updating module 406 includes:
the statistics collecting submodule 4061 is configured to statistically collect the execution time of each service logic and the actual application time of the service corresponding to each service logic;
a calculating submodule 4062, configured to calculate a time difference between the execution time and the actual application time;
the uploading sub-module 4063 is configured to upload the time difference to the background server;
a generating submodule 4064, configured to generate a dynamic configuration file according to the time difference, where the dynamic configuration file is generated by a background server, the dynamic configuration file includes an execution delay corresponding to each service logic, and the execution delay represents an execution priority of each service logic;
receiving submodule 4065, configured to receive the dynamic configuration file;
a replacement submodule 4066, configured to replace the priority configuration file with the dynamic configuration file; or
The merge submodule 4067 is configured to merge the priority configuration file with the dynamic configuration file.
In summary, in the application page display apparatus provided in the fourth embodiment of the present invention, the main thread module and the background management thread module can respectively execute foreground and background execution logics, and the priority configuration file updating module can accumulate time difference data of service logics loaded on a page in the application use process, and dynamically adjust and update the preset fixed execution priority, so as to ensure the relative independence of execution of each service logic, avoid the interference and confusion of the multi-thread execution service logics, and improve the smoothness of page loading and displaying. For the above device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As is readily imaginable to the person skilled in the art: any combination of the above embodiments is possible, and thus any combination between the above embodiments is an embodiment of the present invention, but the present disclosure is not necessarily detailed herein for reasons of space.
The application page exposure methods provided herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The structure required to construct a system incorporating aspects of the present invention will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the application page presentation method according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (8)

1. An application page display method is characterized by comprising the following steps:
receiving a starting instruction of an application program;
reading a preset priority configuration file, wherein the priority configuration file comprises the execution priority of each service logic;
distributing corresponding delay time length for each service logic according to the priority configuration file;
displaying an application program page, and executing the corresponding service logic according to each delay time;
the method further comprises the following steps:
dynamically updating the priority configuration file;
adjusting the execution priority of the service logic according to the updated priority configuration file;
the dynamically updating the priority profile includes:
counting and collecting the execution time of each business logic and the actual application time of the business corresponding to each business logic;
calculating a time difference between the execution time and the actual application time;
uploading the time difference to a background server;
generating a dynamic configuration file according to the time difference, wherein the dynamic configuration file is generated by a background server, the dynamic configuration file comprises execution delay corresponding to each service logic, and the execution delay represents the execution priority of each service logic;
receiving the dynamic configuration file;
replacing the priority profile with the dynamic profile; or
Merging the priority profile with the dynamic profile.
2. The method of claim 1, wherein said displaying the application page, and executing the corresponding business logic according to each of the delay durations, comprises:
executing basic page logic except the business logic through an interface provided by an application program to load a page;
and after the page is loaded and displayed, executing the corresponding service logic according to each delay time length.
3. The method of claim 2, wherein said executing the corresponding service logic according to each of the delay durations comprises:
and executing each service function by the thread corresponding to the application program page according to each delay time, wherein one service function corresponds to one delay time, each service function independently expresses corresponding service logic, and the service logic is positioned in a Presenter constructed in an MVP mode.
4. The method of claim 2, wherein said executing the corresponding service logic according to each of the delay durations comprises:
executing foreground execution logic in the main thread of the application program according to the delay duration;
executing background execution logic in a background management thread according to the delay time;
the foreground execution logic and the background execution logic are classification performed on the business logic in advance.
5. An apparatus for application page presentation, the apparatus comprising:
the instruction receiving module is used for receiving a starting instruction of the application program;
the device comprises a configuration file reading module, a priority configuration file processing module and a configuration file processing module, wherein the configuration file reading module is used for reading a preset priority configuration file, and the priority configuration file comprises the execution priority of each service logic;
the delay allocation module is used for allocating corresponding delay time length for each service logic according to the priority configuration file;
and the page display module is used for displaying an application program page and executing the corresponding service logic according to each delay time length.
6. The apparatus of claim 5, wherein the page presentation module comprises:
the first logic execution module is used for executing basic page logic except the business logic through an interface provided by an application program so as to load a page;
the second logic execution module is used for executing the corresponding service logic according to each delay time length after page loading and displaying;
the device further comprises:
the priority configuration file updating module is used for dynamically updating the priority configuration file;
the dynamic adjustment module is used for adjusting the execution priority of the service logic according to the updated priority configuration file;
the priority profile updating module comprises:
the statistic collection submodule is used for counting and collecting the execution time of each business logic and the actual application time of the business corresponding to each business logic;
the computing submodule is used for computing the time difference between the execution time and the actual application time;
the uploading sub-module is used for uploading the time difference to a background server;
the generating submodule is used for generating a dynamic configuration file according to the time difference, wherein the dynamic configuration file is generated by a background server, the dynamic configuration file comprises execution delay corresponding to each service logic, and the execution delay represents the execution priority of each service logic;
the receiving submodule is used for receiving the dynamic configuration file;
a replacement submodule, configured to replace the priority profile with the dynamic profile; or
And the merging submodule is used for merging the priority configuration file and the dynamic configuration file.
7. The apparatus of claim 6, wherein the second logic execution module comprises:
and the function execution submodule is used for executing each service function by the thread corresponding to the application program page according to each delay time, wherein one service function corresponds to one delay time, each service function independently expresses corresponding service logic, and the service logic is positioned in a Presenter constructed in an MVP mode.
8. The apparatus of claim 6, wherein the second logic execution module comprises:
the main thread module is used for executing foreground execution logic in the main thread of the application program according to the delay duration;
the background management thread module is used for executing background execution logic according to the delay time length in a background management thread;
the foreground execution logic and the background execution logic are classification performed on the business logic in advance.
CN201810350669.1A 2018-04-18 2018-04-18 Application page display method and device Active CN108829469B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810350669.1A CN108829469B (en) 2018-04-18 2018-04-18 Application page display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810350669.1A CN108829469B (en) 2018-04-18 2018-04-18 Application page display method and device

Publications (2)

Publication Number Publication Date
CN108829469A CN108829469A (en) 2018-11-16
CN108829469B true CN108829469B (en) 2021-08-20

Family

ID=64154933

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810350669.1A Active CN108829469B (en) 2018-04-18 2018-04-18 Application page display method and device

Country Status (1)

Country Link
CN (1) CN108829469B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109634653B (en) * 2018-11-30 2023-08-01 苏州朗润创新知识产权运营有限公司 Resource allocation method and device based on componentized architecture
CN109800031A (en) * 2019-01-18 2019-05-24 广州虎牙信息科技有限公司 Service control method, server, terminal and device based on mobile office system
CN109783159B (en) * 2019-01-24 2022-03-29 武汉瓯越网视有限公司 Application starting method and device based on configuration information
CN110109759B (en) * 2019-05-07 2021-11-26 Oppo广东移动通信有限公司 Catton optimization method, server, electronic device and computer-readable storage medium
CN110347446B (en) * 2019-07-16 2022-11-25 创新先进技术有限公司 Page resource loading method and system
CN111367570A (en) * 2020-02-19 2020-07-03 北京环境特性研究所 A kind of application software self-starting method and device
CN113326422B (en) * 2020-02-28 2024-06-21 北京沃东天骏信息技术有限公司 Information acquisition method, device, equipment and medium
CN112395034A (en) * 2020-11-23 2021-02-23 北京奇艺世纪科技有限公司 Page display method and device, electronic equipment and storage medium
WO2022227254A1 (en) * 2021-04-26 2022-11-03 惠州市德赛西威汽车电子股份有限公司 Method for globally regulating service logic based on logical matrix table, and vehicle-mounted system
CN116841686B (en) * 2023-08-29 2024-05-31 荣耀终端有限公司 Application page display method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6195679B1 (en) * 1998-01-06 2001-02-27 Netscape Communications Corporation Browsing session recording playback and editing system for generating user defined paths and allowing users to mark the priority of items in the paths
CN101996073B (en) * 2009-08-31 2014-02-05 阿里巴巴集团控股有限公司 Component rendering method and device
CN102707973B (en) * 2012-05-04 2015-12-09 惠州Tcl移动通信有限公司 Based on the method and system of the application program launching of android system
US9329761B2 (en) * 2014-04-01 2016-05-03 Microsoft Technology Licensing, Llc Command user interface for displaying and scaling selectable controls and commands
CN107133065B (en) * 2017-03-31 2020-10-30 北京奇艺世纪科技有限公司 Method and device for starting software function

Also Published As

Publication number Publication date
CN108829469A (en) 2018-11-16

Similar Documents

Publication Publication Date Title
CN108829469B (en) Application page display method and device
CN110727512A (en) Cluster resource scheduling method, device, equipment and storage medium
CN112380020A (en) Computing power resource allocation method, device, equipment and storage medium
EP3742293A1 (en) Event driving method and device
US9176804B2 (en) Memory dump optimization in a system
US20170155596A1 (en) Method And Electronic Device For Bandwidth Allocation
CN112463375A (en) Data processing method and device
CN105955807B (en) Task processing system and method
CN111124668B (en) Memory release method, memory release device, storage medium and terminal
CN108052384A (en) A kind of task processing method, service platform and electronic equipment
US20170075900A1 (en) Optimize follower and search relevancy ratio
CN106878042A (en) SLA-based container resource scheduling method and system
CN105808341A (en) Method, apparatus and system for scheduling resources
CN111026493B (en) Interface rendering processing method and device
CN110837420A (en) Resource scheduling method, device, terminal and storage medium
CN113204425B (en) Method, device, electronic equipment and storage medium for process management internal thread
US9799048B2 (en) Intelligent tool to support manual scheduling of ads
CN111124644A (en) Method, device and system for determining task scheduling resources
CN109343862B (en) Scheduling method and device of resource data of application
CN109634812B (en) Process CPU occupancy rate control method of Linux system, terminal device and storage medium
CN110659125A (en) Analysis task execution method, device and system and electronic equipment
CN110188297B (en) Resource information display method, computing device and computer storage medium
CN104954496A (en) Cloud resource allocation method and device
CN113852840B (en) Video rendering method, device, electronic equipment and storage medium
CN110730300A (en) Camera control method, device, storage medium and terminal

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