CN107526675B - Method and device for recording application information, storage medium and electronic equipment - Google Patents

Method and device for recording application information, storage medium and electronic equipment Download PDF

Info

Publication number
CN107526675B
CN107526675B CN201710939524.0A CN201710939524A CN107526675B CN 107526675 B CN107526675 B CN 107526675B CN 201710939524 A CN201710939524 A CN 201710939524A CN 107526675 B CN107526675 B CN 107526675B
Authority
CN
China
Prior art keywords
application
linear table
elements
foreground
operation information
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
CN201710939524.0A
Other languages
Chinese (zh)
Other versions
CN107526675A (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.)
Shanghai Jinsheng Communication Technology Co ltd
Original Assignee
Shanghai Jinsheng Communication 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 Shanghai Jinsheng Communication Technology Co Ltd filed Critical Shanghai Jinsheng Communication Technology Co Ltd
Priority to CN201710939524.0A priority Critical patent/CN107526675B/en
Publication of CN107526675A publication Critical patent/CN107526675A/en
Priority to PCT/CN2018/102231 priority patent/WO2019062412A1/en
Application granted granted Critical
Publication of CN107526675B publication Critical patent/CN107526675B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment discloses a method for recording application information, which comprises the following steps: acquiring a first linear table, wherein each element of the first linear table is used for recording operation information of an application, and the elements of the first linear table are arranged according to the time sequence that the application is located in a foreground last time; recording operation information of the application corresponding to each element in the first linear table in different time periods; updating information contained in elements in a first linear table according to operation information of each application recorded in each time period, wherein each element of the first linear table comprises a second linear table, each element of each second linear table is respectively used for recording operation information applied to different time periods, and a corresponding time interval between every two elements of each second linear table is less than or equal to a preset time interval; when the application of the foreground is changed, setting an element corresponding to the foreground application in the first linear table, and triggering and executing the step of recording the operation information of the application corresponding to each element in the first linear table in different time periods.

Description

Method and device for recording application information, storage medium and electronic equipment
Technical Field
The present application belongs to the field of communications technologies, and in particular, to a method, an apparatus, a storage medium, and an electronic device for recording application information.
Background
Generally, many applications are installed on a smart terminal. Some of these applications may be used by the user frequently, while some may be used by the user infrequently. The terminal can record the application using condition of the user and learn the use behavior habit of the user to the application according to the record.
However, in the related art, when the terminal records the usage of the application, the adopted recording method often cannot accurately reflect the latest usage behavior habit of the user.
Disclosure of Invention
The embodiment of the application provides a method, a device, a storage medium and an electronic device for recording application information, which can record application operation information and accurately reflect the latest application use behavior habit of a user.
The embodiment of the application provides a method for recording application information, which comprises the following steps:
acquiring a first linear table, wherein each element of the first linear table is used for recording operation information of an application, and the elements of the first linear table are arranged according to the time sequence that the application is located in a foreground last time;
recording operation information which is newly added in different time periods and corresponds to each element in the first linear table;
updating information contained in corresponding elements in a first linear table according to newly added operation information of each application recorded in each time period, wherein each element of the first linear table comprises a second linear table, each element of each second linear table is respectively used for recording operation information applied to different time periods, and the corresponding time interval between every two elements of each second linear table is less than or equal to a preset time interval;
when the application of the foreground is changed, setting an element corresponding to the foreground application in the first linear table, and triggering and executing the step of recording the operation information newly added by the application corresponding to each element in the first linear table in different time periods.
The embodiment of the application provides a device for recording application information, which comprises:
the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a first linear table, each element of the first linear table is used for recording operation information of an application, and the elements of the first linear table are arranged according to the time sequence that the application is positioned at a foreground last time;
the recording module is used for recording operation information which is newly added in different time periods and corresponds to each element in the first linear table;
the updating module is used for updating information contained in corresponding elements in the first linear table according to newly added operation information of each application recorded in each time period, each element of the first linear table comprises a second linear table, each element of each second linear table is respectively used for recording the operation information applied to different time periods, and the corresponding time interval between every two elements of each second linear table is less than or equal to a preset time interval;
and the setting module is used for setting elements corresponding to foreground application in the first linear table when the application of the foreground changes, and triggering and executing the step of recording the operation information newly added by the application corresponding to each element in the first linear table in different time periods.
Embodiments of the present application provide a storage medium having a computer program stored thereon, which, when executed on a computer, causes the computer to execute the method of recording application information as provided by embodiments of the present application.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the method for recording application information provided in the embodiment of the present application by calling a computer program stored in the memory.
In this embodiment of the present application, the first linear table may record operation information of an application located in a foreground of the terminal for a last period of time, that is, operation information of an application used by a user for a last period of time. Each element in the first linear table comprises a second linear table, and the elements in the second linear table record specific operation information of the corresponding application in a plurality of latest different time periods. Therefore, the application operation information can be recorded, and the latest application use behavior habit of the user can be accurately reflected.
Drawings
The technical solutions and advantages of the present application will become apparent from the following detailed description of specific embodiments of the present application when taken in conjunction with the accompanying drawings.
Fig. 1 is a schematic flowchart of a method for recording application information according to an embodiment of the present application.
Fig. 2 is a first schematic diagram of a first linear table and a second linear table provided in the present application.
Fig. 3 is another schematic flowchart of a method for recording application information according to an embodiment of the present application.
FIG. 4 is a second schematic diagram of a first linear table and a second linear table according to an embodiment of the present application
Fig. 5 is a schematic diagram of a variation process of the first linear table provided in the embodiment of the present application.
Fig. 6A to 6F are schematic scene process diagrams of a method for recording application information according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of an apparatus for recording application information according to an embodiment of the present application.
Fig. 8 is another schematic structural diagram of an apparatus for recording application information according to an embodiment of the present application.
Fig. 9 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Fig. 10 is another schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
As will be described in detail below.
It can be understood that the execution subject of the embodiment of the present application may be a terminal device such as a smart phone or a tablet computer.
Referring to fig. 1, fig. 1 is a schematic flowchart of a method for recording application information according to an embodiment of the present application, where the flowchart may include:
in step S101, a first linear table is obtained, where each element of the first linear table is used to record operation information of an application, and the elements of the first linear table are arranged according to a chronological order in which the application is located in the foreground most recently.
In the related art, when recording the use of an application by a user, it is generally simple to count the number of uses and the use duration of the application by the user. However, this approach does not accurately reflect the user's most recent usage behavior habits of the application.
In step S101 of the embodiment of the present application, the terminal may first obtain a first linear table, where each element of the first linear table is used to record operation information of an application. That is, the elements and applications in the first linear table are in a one-to-one correspondence.
Meanwhile, the elements in the first linear table are arranged according to the time sequence that the corresponding application is located in the foreground last time. That is, the first element of the first linear table describes the operation information of the application located in the foreground at the latest time, the second element of the first linear table describes the operation information of the application located in the foreground (before the application corresponding to the first element), and so on.
For example, the application located in the foreground of the terminal at the current time is application a, the application located in the foreground of the terminal immediately before a is application B, and the application located in the foreground of the terminal immediately before B is application C, that is, the application located in the foreground of the terminal is switched from application C to application B first and then from application B to application a. Then, the first element in the first linear table describes operation information of application a, the second element in the sequence describes operation information of application B, and the third element describes operation information of application C.
It can be understood that, if at a certain moment, the foreground application of the terminal is switched to the background, so that no application is running on the foreground of the terminal, the first element in the first linear table records the operation information of the application located on the foreground of the terminal at the latest moment (the operation information of the last application running on the foreground of the terminal at present). If some application is running in the terminal foreground at the current time, the operation information of the application is recorded in the first element of the first linear table.
In step S102, operation information corresponding to each element in the first linear table and applied to new applications in different time periods is recorded.
In step S103, information included in corresponding elements in the first linear table is updated according to the newly added operation information of each application recorded in each time period, each element of the first linear table includes a second linear table, each element of each second linear table is used for recording operation information applied in different time periods, and a corresponding time interval between every two elements of each second linear table is less than or equal to a preset time interval.
For example, after the first linear table is obtained, the terminal may record operation information corresponding to each element in the first linear table, which is newly added by the application in different time periods. Then, the terminal may update information included in the corresponding element in the first linear table according to the operation information newly added to each application recorded in each different time period.
Each element of the first linear table comprises a second linear table, and each element of each second linear table is used for recording operation information of the corresponding application in different time periods. And the corresponding time interval between every two elements in each second linear table is less than or equal to the preset time interval.
For example, as shown in FIG. 2, the elements of application A, application B, application C … …, application Y, etc. form a first linear table in the vertical direction, and each element in the first linear table comprises a second linear table. For example, the first element of the first linear table records the operation information of application a, which includes a second linear table (landscape) formed by elements a1, a2 … … Ax, etc. Each element of the second linear table is used for recording operation information of the application a in different time periods. And the corresponding time interval between every two elements in the second linear table is less than or equal to a preset time interval. For example, element a1 describes operation information of application a in the time period T1, and element Ax describes operation information of application a in the time period Tx, then the time interval between T1 and Tx is less than or equal to the preset time interval.
For example, in one embodiment, the preset time interval may be 168 hours (duration of one week), and the operation information recorded by the elements included in each second linear table is the operation information of the corresponding application in the last week.
Taking the preset time interval as 168 hours as an example, it can be understood that the information described by the elements of the second linear table is always the operation information of the corresponding application in the last week. That is, the elements in the second linear table are dynamically changing. For example, taking the example that the duration of each time period is 6 hours, and the terminal has not been powered off, the second linear table may include 28 elements at the most. When the number of the elements of the second linear table is less than 28, the operation information of a time period is recorded every 6 hours, and then an element is added in the second linear table, and the added element records the operation information of the application in the last 6 hours. When 28 elements of the second linear table are already available, if a new operation information applied within 6 hours is recorded, before the operation information within the newly added time period is added to the second linear table, the element with the earliest time period in the second linear table may be deleted, and then an element is newly added to the second linear table, so that the time interval between every two elements in the second linear table is less than or equal to the preset time interval, that is, the operation information applied within the latest week time is always recorded in the second linear table.
In step S104, when the application of the foreground is changed, an element corresponding to the foreground application is set in the first linear table, and a step of recording operation information added by the application corresponding to each element in the first linear table in different time periods is triggered.
For example, in the process of recording operation information added in different time periods by applications corresponding to the elements in the first linear table and updating information included in the elements in the first linear table, if it is detected that an application of the foreground of the terminal has changed, the terminal may set an element corresponding to the current foreground application in the first linear table.
For example, at time T1, the application of the terminal foreground is switched from application B to application a, and the terminal may set the element corresponding to application a in the first linear table. For example, the first element in the first linear table originally corresponds to the application B, and after the application of the foreground is switched from the application B to the application a, the first linear table may insert an element before the element corresponding to the application B for describing the operation information of the application a, that is, an element newly added in the first linear table for describing the operation information of the application a becomes the first element of the first linear table, and the element originally corresponding to the application B becomes the second element. Then, the terminal may trigger the step of recording operation information corresponding to each element in the first linear table and added in different time periods in S102.
In an implementation manner, the execution order of steps S102, S103, and S104 may not be limited in this embodiment. For example, step S104 may be located before step S102, between steps S102 and S103, or after step S103, and so on.
It is understood that, in the embodiment of the present application, the first linear table may record operation information of an application located in a foreground of the terminal for a last time, that is, operation information of an application used by a user for a last time. Each element in the first linear table comprises a second linear table, and the elements in the second linear table record specific operation information of the corresponding application in a plurality of latest different time periods. Therefore, the application operation information can be recorded, and the latest application use behavior habit of the user can be accurately reflected.
Referring to fig. 3, fig. 3 is another schematic flow chart of a method for recording application information according to an embodiment of the present application, where the flow chart may include:
in step S201, the terminal obtains a first linear table, where each element of the first linear table is used to record operation information of an application, the elements of the first linear table are arranged according to a chronological order in which the application is located in the foreground last time, and a first element of the first linear table is used to record operation information of the application located in the foreground last time.
For example, the terminal may first obtain a first linear table, where each element of the first linear table is used to record operation information of an application. That is, the elements and applications in the first linear table are in a one-to-one correspondence.
Meanwhile, the elements in the first linear table are arranged according to the time sequence that the corresponding application is located in the foreground at the latest time, and the first element of the first linear table is used for recording the operation information of the application located in the foreground at the latest time. That is, the first element of the first linear table describes the operation information of the application located in the foreground at the latest time, and the second element of the first linear table describes the operation information of the application located in the foreground (before the application corresponding to the first element).
For example, the application located in the foreground of the terminal at the current time is application a, the application located in the foreground of the terminal immediately before a is application B, and the application located in the foreground of the terminal immediately before B is application C, that is, the application located in the foreground of the terminal is switched from application C to application B first and then from application B to application a. Then, the first element in the first linear table describes operation information of application a, the second element in the sequence describes operation information of application B, and the third element describes operation information of application C.
It can be understood that, if at a certain moment, the foreground application of the terminal is switched to the background, so that no application is running on the foreground of the terminal, the first element in the first linear table records the operation information of the application located on the foreground of the terminal at the latest moment (the operation information of the last application running on the foreground of the terminal at present). If some application is running in the terminal foreground at the current time, the operation information of the application is recorded in the first element of the first linear table. That is, in the first linear table, from the first element to the last element, corresponds to the history of the application that the user actually used.
In some of the manners, the linear table in the embodiment of the present application may be an array, a linked list, and a stack, a queue, and the like in the linked list.
In one embodiment, the step of the terminal acquiring the first linear table in S201 may include:
when the terminal is detected to be started, the terminal acquires a first linear table.
For example, the terminal may be powered off and on during use by the user. During the shutdown state, the application is not operated, and does not have operation information. After the terminal is powered on, the application in the terminal is likely to be used by the user immediately. Therefore, the terminal can acquire the first linear table when the terminal detects the power-on.
It can be understood that, by means of immediately acquiring the first linear table by the terminal when the startup is detected, the operation information of the application can be recorded in real time, and the omission of the recorded operation information of the application is effectively avoided.
In step S202, the terminal records operation information corresponding to each element in the first linear table and added by the application in different time periods.
In step S203, the terminal updates information included in corresponding elements in the first linear table according to the newly added operation information of each application recorded in each time period, each element of the first linear table includes a second linear table, each element of each second linear table is used for recording operation information applied in different time periods, and a corresponding time interval between every two elements of each second linear table is less than or equal to a preset time interval.
For example, after the first linear table is obtained, the terminal may record operation information corresponding to each element in the first linear table, which is newly added by the application in different time periods. Then, the terminal may update information included in the corresponding element in the first linear table according to the operation information newly added to each application recorded in each different time period.
Each element of the first linear table comprises a second linear table, and each element of each second linear table is used for recording operation information of the corresponding application in different time periods. And the corresponding time interval between every two elements in each second linear table is less than or equal to the preset time interval.
For example, as shown in FIG. 2, the elements of application A, application B, application C … …, application Y, etc. form a first linear table in the vertical direction, and each element in the first linear table comprises a second linear table. For example, the first element of the first linear table records the operation information of application a, which includes a second linear table (landscape) formed by elements a1, a2 … … Ax, etc. Each element of the second linear table is used for recording operation information of the application a in different time periods. And the corresponding time interval between every two elements in the second linear table is less than or equal to a preset time interval. For example, element a1 describes operation information of application a in the time period T1, and element Ax describes operation information of application a in the time period Tx, then the time interval between T1 and Tx is less than or equal to the preset time interval.
For example, in one embodiment, the preset time interval may be 168 hours (duration of one week), and the operation information recorded by the elements included in each second linear table is the operation information of the corresponding application in the last week.
Taking the preset time interval as 168 hours as an example, it can be understood that the information described by the elements of the second linear table is always the operation information of the corresponding application in the last week. That is, the elements in the second linear table may be dynamically changing. For example, taking the example that the duration of each time period is 6 hours, and the terminal has not been powered off, the second linear table may include 28 elements at the most. When the number of the elements of the second linear table is less than 28, the operation information of a time period is recorded every 6 hours, and then an element is added in the second linear table, and the added element records the operation information of the application in the last 6 hours. When 28 elements of the second linear table are already available, if a new operation information applied within 6 hours is recorded, before the operation information within the newly added time period is added to the second linear table, the element with the earliest time period in the second linear table may be deleted, and then an element may be newly added to the second linear table, so that the time interval between two years of the elements in the second linear table is less than or equal to the preset time interval, that is, the operation information recorded in the second linear table will always be the latest operation information within one week.
For example, each element in the second linear table is used to record operation information of the corresponding application in a time period with a duration of 6 hours, and each second linear table is only allowed to contain 28 elements at most. As shown in fig. 4, the first element in the first linear table describes the operation information of the application a as an example. For example, when a 06:00 terminal in the morning of the day is powered on, the terminal may record the operation information of the application a in the period of 06:00 to 12:00 (for example, the terminal does not shut down in the period of 06:00 to 12:00, and the number of elements of the second linear table of the application a is 26, but has not reached 28), and after 12:00 of the day, the terminal may update the operation information included in the element corresponding to the application a in the first linear table. For example, the terminal may add an element in the second linear table corresponding to the application a to record the operation information of the application a in the period of 06:00 to 12: 00. For example, the element A2 in FIG. 4 is used to record the operation information of the application A in the period of 06: 00-12: 00.
Later, if the terminal is always in the power-on state before 18:00 of the current day, the element a1 in fig. 4 may be used to record the operation information of the application a in the period of 12:00 to 18: 00.
If the terminal has been powered off before 18:00 of the current day, for example, the terminal has been powered off at 17:00, the terminal may determine the time period corresponding to the a1 element according to the time when the terminal is powered on again.
For example, if the terminal is not powered on again until 18:00 is exceeded, the a1 element may only record the operation information of application a in the period of 12: 00-17: 00. That is, if the terminal cannot record the application operation information within 6 hours from the start point of the time slot due to shutdown in a certain time slot, the elements of the second linear table may only record the application operation information during the time slot in which the terminal is in the power-on state.
If the time for the terminal to be powered on again does not exceed 18:00, for example, the terminal is powered on again at 17:30 after being powered off at 17:00, the terminal may record the operation information of the application a in the time period of 17:30 to 18: 00. Then, the terminal may merge the operation information in the two time periods of 12:00 to 17:00 and 17:30 to 18:00, and record the operation information after merging in the two time periods of 12:00 to 17:00 and 17:30 to 18:00 by the element a 1.
It can be understood that, by the above-mentioned manner of merging and recording the operation information of two small time intervals belonging to the same large time period, the problem of frequent change of the elements of the second linear table corresponding to the application due to frequent switching on and off of the terminal can be effectively avoided. For example, the second linear tables are only allowed to contain 28 elements at most, and if the terminal is powered off every 5 minutes and then powered on again, the second linear tables can only record the operation information of the corresponding application in the last 140 minutes at most. The 140 minutes is too short, so that the operation information recorded in the second linear table cannot fully reflect the recent application use behavior habit of the user.
In one embodiment, the terminal may start a timer with a set duration of 6 hours each time it is powered on. When the first 6-hour timer is triggered, the terminal can record the application operation information recorded in the 6 hours into the elements of the second linear table of the corresponding application. When a 6-hour timer is triggered, the terminal can immediately set the next 6-hour timer, so as to continue recording the operation information applied in the second 6 hours.
In one embodiment, if the terminal is powered off within a time period with a duration of 6 hours, the terminal may determine the end time of the time period corresponding to the element in the second linear table according to the time when the terminal is powered on again.
For example, the element a1 in fig. 4 is originally used to describe the operation information of the application a in the period of 12:00 to 18: 00.
If the terminal has been powered off before 18:00 of the current day, for example, the terminal has been powered off at 17:00, the terminal may determine the end time of the time period corresponding to the a1 element according to the time when the terminal is powered on again.
For example, if the terminal is not powered on again until 18:00 is exceeded (e.g., 18:30 is not powered on), the a1 element may only record the operation information of the application a in the period of 12:00 to 17: 00. That is, if the terminal cannot record the application operation information within 6 hours from the start point of the time slot due to shutdown in a certain time slot, the elements of the second linear table may only record the application operation information during the time slot in which the terminal is in the power-on state.
If the time for the terminal to be powered on again does not exceed 18:00, for example, the terminal is powered on again at 17:30 after being powered off at 17:00, the terminal may record the operation information of the application a in the time period of 17:30 to 18: 00. Then, the terminal may merge the operation information in the two time periods of 12:00 to 17:00 and 17:30 to 18:00, and record the operation information after merging in the two time periods of 12:00 to 17:00 and 17:30 to 18:00 by the element a 1.
In step S204, when the application of the foreground is changed, the terminal detects whether an element corresponding to the foreground application is included in the first linear table.
For example, in the process of recording the operation information of the application corresponding to each element in the first linear table and updating the information included in each element in the first linear table, if it is detected that the application of the foreground of the terminal has changed, the terminal may detect whether the first linear table includes an element corresponding to the current foreground application.
For example, if an application in the foreground of the terminal is switched from application B to application a, the terminal may detect whether the first linear table contains an element corresponding to application a.
In step S205, if it is detected that the first linear table includes an element corresponding to the foreground application, the terminal adjusts the element corresponding to the foreground application to be the first element of the first linear table.
For example, if the terminal detects that the first linear table contains an element corresponding to application a, the terminal may adjust the element corresponding to application a to be the first element of the first linear table. For example, the foreground application of the original terminal is application B, the first element of the first linear table is the element corresponding to application B, and the second element of the first linear table is the element corresponding to application a. Then, the foreground application of the terminal is switched from application B to application a, and when the terminal detects that the first linear table includes the element corresponding to application a, the terminal may adjust the element corresponding to application a originally located at the second position to be the first element of the first linear table, and change the element corresponding to application B originally located at the first position to be the second element of the first linear table. The above process may be as shown in fig. 5.
In step S206, if it is detected that the first linear table does not include the element corresponding to the foreground application, the terminal detects whether the number of elements in the first linear table reaches a preset number.
In step S207, if it is detected that the number of elements in the first linear table reaches the preset value, the terminal deletes the last element in the first linear table, creates an element corresponding to the foreground application, and adds the element corresponding to the foreground application to the first linear table.
In step S208, if it is detected that the number of elements in the first linear table does not reach the preset value, the terminal creates an element corresponding to the foreground application, and adds the element corresponding to the foreground application to the first linear table as a first element.
For example, steps S206, S207, and S208 may include:
when the application of the foreground is changed, the terminal detects that the first linear table does not contain the element corresponding to the changed current foreground application. Then, the terminal may detect whether the number of elements of the first linear table reaches a preset number.
In one embodiment, the terminal may set a maximum value for the number of elements to the first linear table. For example, the terminal setting allows the first linear table to have a maximum of 50 elements, then the elements in the first linear table represent the 50 applications that have been recently used by the user.
If it is detected that the number of elements already included in the first linear table reaches a preset value, the terminal may delete the last element in the first linear table, create an element corresponding to the foreground application, and add the element corresponding to the current foreground application to the first linear table.
If the number of the elements already contained in the first linear table is detected not to reach the preset value, the terminal can directly create the element corresponding to the current foreground application and add the element corresponding to the current foreground application to the first linear table to form the first element.
For example, if the application of the foreground of the terminal is switched to the application Z and the terminal detects that the first linear table does not include the element corresponding to the application Z, the terminal may detect whether the number of elements included in the first linear table reaches a preset value. For example, the preset value is 30.
If it is detected that the number of elements included in the first linear table has reached 30, the terminal may delete the last element in the first linear table. For example, the application corresponding to the last element in the first linear table is application Y. After deleting the element corresponding to the application Y, the terminal may create an element corresponding to the application Z and insert the element corresponding to the application Z into the first element position of the first linear table.
If it is detected that the number of elements included in the first linear table has not reached 30, the terminal may directly create an element corresponding to application Z and insert the element corresponding to application Z into the first element position of the first linear table.
In step S209, the terminal triggers and records the operation information corresponding to each element in the first linear table and added in different time periods.
For example, after the element corresponding to the changed foreground application is adjusted to the first element of the first linear table, or the element corresponding to the changed foreground application is created in the first linear table and inserted into the first element position of the first linear table, the terminal may trigger itself to perform the step of recording the operation information, which is newly added at different time periods, of the application corresponding to each element in the first linear table in step S202. That is, the terminal will continue to record the operation information of the applications corresponding to the elements in the first linear table in different time periods, and according to the operation information of the applications recorded in each time period, the terminal updates the information included in the corresponding elements in the first linear table. When it is detected again that the application of the terminal foreground is changed, the terminal may repeatedly perform the steps in S204 to S209.
In one implementation, the embodiment of the present application may further include the following steps:
and when the terminal is detected to be powered off, performing serialization operation on the data corresponding to the first linear table, and storing the serialized data to a preset storage address.
For example, when shutdown is detected, the terminal may perform serialization operation on data corresponding to the first linear table, and store the serialized data in a preset storage address. For example, the terminal may store the serialized data in a disk or memory of the terminal.
Serialization refers to the process of converting a data structure or object into a form (e.g., a binary string) that can be stored or transmitted. In the embodiment of the application, the first linear table is a data structure, so that when shutdown is detected, the first linear table can be serialized, and the serialized data is stored in the terminal memory.
In one implementation, the embodiment of the present application may further include the following steps:
when the terminal is detected to be started, performing deserialization operation on data in a preset storage address of the terminal to obtain deserialized data;
and storing the deserialized data into a memory and determining the deserialized data as a first linear table.
For example, when it is detected that the terminal is powered on, the terminal may perform deserialization operation on data stored in the preset storage address at the last time of power off, and obtain deserialized data. The terminal may then store the deserialized data in memory and identify it as the first linear table.
Deserialization refers to the process of converting a binary string generated in the serialization process into a data structure or object.
Referring to fig. 6A to 6F, fig. 6A to 6F are schematic views of a scene process of a method for recording application information according to an embodiment of the present application.
For example, each time the terminal detects power-on, the terminal may obtain a first queue, where each element of the first queue is used to record operation information of an application. That is, the elements and applications in the first linear table are in a one-to-one correspondence.
The elements in the first queue may be arranged according to a time sequence that the corresponding application is located in the foreground last time, and a first element of the first queue is used to record operation information of the application located in the foreground last time. That is, the first element of the first queue records operation information of an application that was in the foreground most recently, while the second element of the first linear table records operation information of a previous application (prior to the application to which the first element corresponds) that was in the foreground, and so on. And the first queue is allowed to contain at most a preset first number of elements. For example, the preset first number is 50, i.e. the first queue is allowed to contain 50 elements at most.
Each element of the first queue comprises a second queue. And each element of each second queue is respectively used for recording operation information applied to different time periods, and the corresponding time interval between every two elements of each second queue is less than or equal to the preset time interval. For example, the time interval between each two elements of each second queue is less than or equal to 168 hours (the duration of a week).
In addition, each time the terminal is started, the terminal can start a timer with preset time length and record the operation information applied in the time period that the starting time is the starting time and the ending time is the time after the starting time and the preset time length.
For example, the terminal may power up 06:00 a day earlier, at which point the terminal may acquire the first queue and start a 6 hour timer. Then, the terminal can record the operation information of the application corresponding to each element in the first queue in the period of 06: 00-12: 00.
When detecting that an application in the foreground of the terminal changes (for example, the foreground of the terminal changes from an application that is not running to an application that is running, or the foreground application of the terminal switches from one application to another application), the terminal may first detect whether an element corresponding to the current foreground application is already included in the first queue.
For example, when the terminal is just started, the applications corresponding to the first three elements of the first queue acquired by the terminal are application B, application C and application D in sequence.
06:05 after the power-on is complete, the user first uses application C, as shown in FIG. 6A. The application of the foreground of the terminal is from nothing to any, namely the terminal detects that the foreground application changes. Then, the terminal may first detect whether an element corresponding to application C is included in the first queue. Since the second element in the first queue corresponds to application C, the terminal may adjust the element corresponding to application C to the head-of-queue element, and accordingly, the element corresponding to application B becomes the second-bit element. The change in the arrangement of the elements in the first queue may be as shown in fig. 6B.
If the application first used by the user after the completion of the boot is application B, the head-of-line element of the first queue remains unchanged in this case since application B is already the first element of the first queue.
The user then uses application A at 06:30, as shown in FIG. 6C. That is, the application of the foreground is switched from application C to application a. At this point, the terminal may still detect whether the first queue already contains elements corresponding to application a. For example, at this time, the terminal detects that the first queue does not include an element corresponding to application a. Then, the terminal may detect whether the number of elements of the first queue has reached the preset first number of 50. For example, at this time, the terminal detects that the number of elements of the first queue has not reached 50. In this case, the terminal may directly create an element corresponding to the application a and insert the newly created element corresponding to the application a into the first queue as a head-of-queue element. At this time, the arrangement of the elements in the first queue may be changed as shown in fig. 6D.
If the terminal detects that the number of elements of the first queue has reached 50 when the foreground application is switched from application C to application a, the terminal may delete the last element of the first queue, then create the element corresponding to application a, and insert the newly created element corresponding to application a into the first queue as the head-of-queue element.
When a timer with the set duration of 6 hours is triggered during startup, the terminal can update the operation information of the application recorded in the time period of 06: 00-12: 00 into the first queue. For example, element a2 of the second queue of application a is used to record the operation information of application a in the period of 06: 00-12: 00, and since application a is used starting at 06:30, the recorded time start point and end point of a2 element are 06:30 and 12:00, respectively. As shown in fig. 6E.
When 12:00 is reached, the end point may set a timer with a second duration of 6 hours, and start to record operation information of the application corresponding to the element in the first queue in the time period of 12: 00-18: 00.
For example, in the period of 12: 00-17: 00, the application A is operated by the user for a plurality of times, while the application C is not operated by the user and is cleaned from the background of the terminal. The terminal is powered off once in a ratio of 17:00, then is powered on again in a ratio of 17:30, and the application A is in the background of the terminal after being powered on. Then, for the application a, the element a1 of the second queue may be used to record the operation information of the application a in the two periods of 12:00 to 17:00 and 17:30 to 18:00, that is, the terminal may merge the operation information of the application a in the two periods of 12:00 to 17:00 and 17:30 to 18:00 and write the merged operation information into the element a 1. In addition, the application C is not operated by a user and is not in the background of the terminal in the period of 12: 00-18: 00. Therefore, the application C does not have any operation information during this time. In this case, the terminal may not newly create an element for recording the operation information for the application C. The above process may be as shown in fig. 6F.
In addition, since a timer with the duration of 6 hours is started every time the terminal is started, under the condition that the operation information of the application A in the two periods of 12: 00-17: 00 and 17: 30-18: 00 is merged, the operation information of the application A in the time interval of 18: 00-23: 30 (belonging to the time interval of 17: 30-23: 30) can be written into the next element A0 of A1. As shown in fig. 6F.
If the terminal is not powered on again until 18:00 after 17:00 is powered off, element a1 may record only the operation information of application a for the period of time 12: 00-17: 00.
In one embodiment, since the time interval between every two elements of each second queue is less than or equal to the preset time interval (e.g. 168 hours), when an element is newly added to the second queue, the terminal may traverse the elements in the whole queue and delete the element whose time interval with the newly added element exceeds 168 hours.
In one embodiment, each second queue may have an element added to the first element of the queue. That is, the elements in the second queue are arranged according to the sequence of the generation time.
In one embodiment, each element of the second queue may record at least the following operation information of the corresponding application in a period of time: the start and end time points of the time period; the application accumulates the number of times of opening in the time period; applying the accumulated time length in the foreground in the time period; the maximum time length of the application staying in the background in the time period; the minimum time length of the application staying in the background in the time period; the average length of the application staying in the background in the period, etc., and the examples herein do not constitute a limitation of the present application.
In one embodiment, each element in the first queue may include, in addition to a second queue, the following operation information of the corresponding application: the package name of the application; the time the application was last switched to foreground; the time when the application was last switched to the background; applying the accumulated opening times within one week; the time length of stay in the foreground is accumulated in one week by the application, etc., and the examples herein are not to be construed as limiting the application.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an apparatus for recording application information according to an embodiment of the present disclosure. The apparatus 300 for recording application information may include: an acquisition module 301, a recording module 302, an updating module 303, and a setting module 304.
An obtaining module 301, configured to obtain a first linear table, where each element of the first linear table is used to record operation information of an application, and the elements of the first linear table are arranged according to a time sequence that the application is located in a foreground last time.
For example, the obtaining module 301 of the terminal may first obtain a first linear table, where each element of the first linear table is used to record operation information of an application. That is, the elements and applications in the first linear table are in a one-to-one correspondence.
Meanwhile, the elements in the first linear table are arranged according to the time sequence that the corresponding application is located in the foreground last time. That is, the first element of the first linear table describes the operation information of the application located in the foreground at the latest time, the second element of the first linear table describes the operation information of the application located in the foreground (before the application corresponding to the first element), and so on.
For example, the application located in the foreground of the terminal at the current time is application a, the application located in the foreground of the terminal immediately before a is application B, and the application located in the foreground of the terminal immediately before B is application C, that is, the application located in the foreground of the terminal is switched from application C to application B first and then from application B to application a. Then, the first element in the first linear table describes operation information of application a, the second element in the sequence describes operation information of application B, and the third element describes operation information of application C.
It can be understood that, if at a certain moment, the foreground application of the terminal is switched to the background, so that no application is running on the foreground of the terminal, the first element in the first linear table records the operation information of the application located on the foreground of the terminal at the latest moment (the operation information of the last application running on the foreground of the terminal at present). If some application is running in the terminal foreground at the current time, the operation information of the application is recorded in the first element of the first linear table.
The recording module 302 is configured to record operation information corresponding to each element in the first linear table, where the operation information is newly added at different time periods when the application is applied.
An updating module 303, configured to update information included in corresponding elements in the first linear table according to the newly added operation information of each application recorded in each time period, where each element of the first linear table includes a second linear table, each element of each second linear table is used to record operation information applied in a different time period, and a corresponding time interval between every two elements of each second linear table is less than or equal to a preset time interval.
For example, after the first linear table is obtained, the recording module 302 may record operation information corresponding to each element in the first linear table, which is newly added by the application in different time periods. Then, the updating module 303 may update the information included in the corresponding element in the first linear table according to the operation information newly added to each application recorded in each different time period.
Each element of the first linear table comprises a second linear table, and each element of each second linear table is used for recording operation information of the corresponding application in different time periods. And the corresponding time interval between every two elements in each second linear table is less than or equal to the preset time interval.
For example, as shown in FIG. 2, the elements of application A, application B, application C … …, application Y, etc. form a first linear table in the vertical direction, and each element in the first linear table comprises a second linear table. For example, the first element of the first linear table records the operation information of application a, which includes a second linear table (landscape) formed by elements a1, a2 … … Ax, etc. Each element of the second linear table is used for recording operation information of the application a in different time periods. And the corresponding time interval between every two elements in the second linear table is less than or equal to a preset time interval. For example, element a1 describes operation information of application a in the time period T1, and element Ax describes operation information of application a in the time period Tx, then the time interval between T1 and Tx is less than or equal to the preset time interval.
For example, in one embodiment, the preset time interval may be 168 hours (duration of one week), and the operation information recorded by the elements included in each second linear table is the operation information of the corresponding application in the last week.
Taking the preset time interval as 168 hours as an example, it can be understood that the information described by the elements of the second linear table is always the operation information of the corresponding application in the last week. That is, the elements in the second linear table are dynamically changing. For example, taking the example that the duration of each time period is 6 hours, and the terminal has not been powered off, the second linear table may include 28 elements at the most. When the number of the elements of the second linear table is less than 28, the operation information of a time period is recorded every 6 hours, and then an element is added in the second linear table, and the added element records the operation information of the application in the last 6 hours. When 28 elements of the second linear table are already available, if a new operation information applied within 6 hours is recorded, before the operation information within the newly added time period is added to the second linear table, the element with the earliest time period in the second linear table may be deleted, and then an element is newly added to the second linear table, so that the time interval between every two elements in the second linear table is less than or equal to the preset time interval, that is, the operation information applied within the latest week time is always recorded in the second linear table.
The setting module 304 is configured to set an element corresponding to the foreground application in the first linear table when the application of the foreground changes, and trigger execution of the step of recording operation information newly added to the application corresponding to each element in the first linear table in different time periods.
For example, in the process that the recording module 302 records the operation information newly added to the application corresponding to each element in the first linear table, and the updating module 303 updates the information included in each element in the first linear table, if it is detected that the application of the foreground of the terminal has changed, the setting module 304 may set the element corresponding to the current foreground application in the first linear table.
For example, at time T1, if the application of the terminal foreground is switched from application B to application a, then setup module 304 may set the element corresponding to application a in the first linear table. For example, the first element in the first linear table originally corresponds to the application B, and after the application B switches to the application a, the first linear table may insert an element before the element corresponding to the application B to describe the operation information of the application a, that is, an element newly added in the first linear table to describe the operation information of the application a becomes the first element of the first linear table, and the element originally corresponding to the application B becomes the second element. Thereafter, the terminal may trigger the recording module 302 to perform the step of recording operation information corresponding to each element in the first linear table and added in different time periods by the application.
In one embodiment, the setup module 304 may be configured to:
whether the first linear table contains elements corresponding to the foreground application is detected.
And if the first linear table is detected to contain the element corresponding to the foreground application, adjusting the element corresponding to the foreground application to be the first element of the first linear table.
If it is detected that the first linear table does not include an element corresponding to the foreground application, an element corresponding to the foreground application is created and added to the first linear table as a leading element.
For example, in the process that the recording module 302 records the operation information of the application corresponding to each element in the first linear table, and the updating module 304 updates the information included in each element in the first linear table, if it is detected that the application of the foreground of the terminal has changed, the setting module 304 may first detect whether the first linear table includes an element corresponding to the current foreground application.
If the terminal detects that the first linear table contains an element corresponding to application a, the setting module 304 may adjust the element corresponding to application a to be the first element of the first linear table. For example, the foreground application of the original terminal is application B, the first element of the first linear table is the element corresponding to application B, and the second element of the first linear table is the element corresponding to application a. Then, the foreground application of the terminal is switched from application B to application a, and if it is detected that the first linear table includes an element corresponding to application a, the setting module 304 may adjust the element corresponding to application a originally located at the second position to be the first element of the first linear table, and change the element corresponding to application B originally located at the first position to be the second element of the first linear table.
If the terminal detects that the first linear table does not contain an element corresponding to application a, the setup module 304 may create an element corresponding to the foreground application and add the element corresponding to the foreground application to the first linear table as the leading element.
In one embodiment, the setup module 304 may be configured to:
and if the first linear table is detected not to contain the elements corresponding to the foreground application, detecting whether the number of the elements of the first linear table reaches a preset value or not.
And if the number of the elements of the first linear table is detected to reach a preset value, deleting the last element in the first linear table, creating an element corresponding to foreground application, and adding the element corresponding to the foreground application into the first linear table to form a first element.
And if the number of the elements of the first linear table is detected not to reach the preset value, creating the elements corresponding to the foreground application, and adding the elements corresponding to the foreground application into the first linear table to form the first element.
For example, when the terminal detects that the first linear table does not include the element corresponding to the application a, the setting module 304 may first detect whether the number of elements in the first linear table reaches a preset value when performing the step of creating the element corresponding to the foreground application and adding the element corresponding to the foreground application to the first linear table.
If it is detected that the number of elements already included in the first linear table reaches a preset value, the setting module 304 may delete the last element in the first linear table, create an element corresponding to the foreground application, and add the element corresponding to the current foreground application to the first linear table as the first element.
If it is detected that the number of elements already included in the first linear table has not reached the preset value, the setting module 304 may directly create an element corresponding to the current foreground application, and add the element corresponding to the current foreground application to the first linear table as the first element.
Referring to fig. 8, fig. 8 is another schematic structural diagram of an apparatus for recording application information according to an embodiment of the present disclosure. In an embodiment, the apparatus 300 for recording application information may further include: a storage module 305 and an extraction module 306.
The storage module 305 is configured to, when it is detected that the terminal is powered off, perform a serialization operation on data corresponding to the first linear table, and store the serialized data in a preset storage address.
For example, when shutdown is detected, the storage module 305 may perform a serialization operation on data corresponding to the first linear table, and store the serialized data in a preset storage address. For example, the storage module 305 may store the serialized data in a disk or memory of the terminal.
Serialization refers to the process of converting a data structure or object into a form (e.g., a binary string) that can be stored or transmitted. In the embodiment of the application, the first linear table is a data structure, so that when shutdown is detected, the first linear table can be serialized, and the serialized data is stored in the terminal memory.
The extracting module 306 is configured to perform deserialization operation on data in a preset storage address of the terminal when it is detected that the terminal is turned on, so as to obtain deserialized data; and storing the deserialized data into a memory and determining the deserialized data as a first linear table.
For example, when the power-on is detected, the extracting module 306 may perform deserialization on the data stored in the preset storage address during the last power-off, and obtain deserialized data. The fetch module 306 may then store the deserialized data in memory and identify it as the first linear table.
Deserialization refers to the process of converting a binary string generated in the serialization process into a data structure or object.
Embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute the method for recording application information provided by the embodiments of the present application.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the method for recording application information provided in the embodiment of the present application by calling a computer program stored in the memory.
For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Referring to fig. 9, fig. 9 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
The mobile terminal 500 may include components such as a communication unit 501, memory 502, processor 503, and so on. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 9 is not intended to be limiting of mobile terminals and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The communication unit 501 may be used for transmitting and receiving information, or receiving and transmitting signals during a call, for example, receiving downlink information and then delivering the received downlink information to one or more processors 503 for processing; in addition, data relating to the uplink is transmitted.
The memory 502 may be used to store applications and data. Memory 502 stores applications containing executable code. The application programs may constitute various functional modules. The processor 503 executes various functional applications and data processing by running an application program stored in the memory 502.
The processor 503 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing an application program stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the mobile terminal.
In this embodiment, the processor 503 in the mobile terminal loads the executable code corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 503 runs the application programs stored in the memory 502, thereby implementing the steps:
the method comprises the steps of obtaining a first linear table, wherein each element of the first linear table is used for recording operation information of an application, and the elements of the first linear table are arranged according to the time sequence that the application is located in a foreground last time.
And recording operation information which is newly added in different time periods and corresponds to each element in the first linear table.
And updating information contained in corresponding elements in the first linear table according to the newly added operation information of each application recorded in each time period, wherein each element of the first linear table comprises a second linear table, each element of each second linear table is respectively used for recording the operation information applied to different time periods, and the corresponding time interval between every two elements of each second linear table is less than or equal to a preset time interval.
When the application of the foreground is changed, setting an element corresponding to the foreground application in the first linear table, and triggering and executing the step of recording the operation information newly added by the application corresponding to each element in the first linear table in different time periods.
In addition, referring to fig. 10, the mobile terminal 600 may include a communication unit 601, a memory 602, a processor 603, an input unit 604, and an output unit 605.
The communication unit 601 may be used for receiving and transmitting information, or receiving and transmitting signals during a call, for example, receiving downlink information and then delivering the received downlink information to one or more processors 603 for processing; in addition, data relating to the uplink is transmitted.
The memory 602 may be used to store applications and data. The memory 602 stores applications containing executable code. The application programs may constitute various functional modules. The processor 603 executes various functional applications and data processing by running an application program stored in the memory 602.
The processor 603 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing an application program stored in the memory 602 and calling data stored in the memory 602, thereby integrally monitoring the mobile terminal.
The input unit 604 may be used to receive input numbers, character information, or user characteristic information, such as a fingerprint, and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. In an embodiment, the input unit 604 may include a touch-sensitive surface as well as other input devices. Touch sensitive surfaces, also known as touch display screens or touch pads.
The output unit 605 may be used to display information input by or provided to the user and various graphical user interfaces of the mobile terminal, which may be configured by graphics, text, icons, video, and any combination thereof. The output unit may include a display panel.
In this embodiment, the processor 603 in the mobile terminal loads the executable code corresponding to the process of one or more application programs into the memory 602 according to the following instructions, and the processor 603 runs the application programs stored in the memory 602, thereby implementing the steps of:
the method comprises the steps of obtaining a first linear table, wherein each element of the first linear table is used for recording operation information of an application, and the elements of the first linear table are arranged according to the time sequence that the application is located in a foreground last time.
And recording operation information which is newly added in different time periods and corresponds to each element in the first linear table.
And updating information contained in corresponding elements in the first linear table according to the newly added operation information of each application recorded in each time period, wherein each element of the first linear table comprises a second linear table, each element of each second linear table is respectively used for recording the operation information applied to different time periods, and the corresponding time interval between every two elements of each second linear table is less than or equal to a preset time interval.
When the application of the foreground is changed, setting an element corresponding to the foreground application in the first linear table, and triggering and executing the step of recording the operation information newly added by the application corresponding to each element in the first linear table in different time periods.
In one embodiment, the processor 603, when performing the step of setting the element corresponding to the foreground application in the first linear table, may perform: whether the first linear table contains elements corresponding to the foreground application is detected. And if the first linear table is detected to contain the element corresponding to the foreground application, adjusting the element corresponding to the foreground application to be the first element of the first linear table. If it is detected that the first linear table does not include an element corresponding to the foreground application, an element corresponding to the foreground application is created and added to the first linear table as a leading element.
In one embodiment, the processor 603 may perform the step of creating an element corresponding to the foreground application if it is detected that the first linear table does not include an element corresponding to the foreground application, and adding the element corresponding to the foreground application to the first linear table as a leading element, and may perform: and if the first linear table is detected not to contain the elements corresponding to the foreground application, detecting whether the number of the elements of the first linear table reaches a preset value or not. And if the number of the elements of the first linear table is detected to reach a preset value, deleting the last element in the first linear table, creating an element corresponding to foreground application, and adding the element corresponding to the foreground application into the first linear table to form a first element. And if the number of the elements of the first linear table is detected not to reach the preset value, creating the elements corresponding to the foreground application, and adding the elements corresponding to the foreground application into the first linear table to form the first element.
In one embodiment, the processor 603 may further perform the following steps: and when the terminal is detected to be powered off, performing serialization operation on the data corresponding to the first linear table, and storing the serialized data to a preset storage address.
In one embodiment, the processor 603 may further perform the following steps: when the terminal is detected to be started, performing deserialization operation on data in a preset storage address of the terminal to obtain deserialized data. And storing the deserialized data into a memory and determining the deserialized data as a first linear table.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the method for recording the application information, and are not described herein again.
The apparatus for recording application information provided in the embodiment of the present application and the method for recording application information in the above embodiments belong to the same concept, and any method provided in the method for recording application information may be run on the apparatus for recording application information, and a specific implementation process thereof is described in the method for recording application information in detail, and is not described herein again.
It should be noted that, for the method for recording application information described in the embodiment of the present application, it can be understood by those skilled in the art that all or part of the process for implementing the method for recording application information described in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, where the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and during the execution, the process of the embodiment of the method for recording application information can be included as described. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
For the apparatus for recording application information according to the embodiment of the present application, each functional module may be integrated into one processing chip, 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 stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The method, the apparatus, the storage medium, and the electronic device for recording application information provided by the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (12)

1. A method of recording application information, comprising:
acquiring a first linear table, wherein each element of the first linear table is used for recording operation information of an application, and the elements of the first linear table are arranged according to the time sequence that the application is located in a foreground last time;
recording operation information which is newly added in different time periods and corresponds to each element in the first linear table;
updating information contained in corresponding elements in the first linear table according to newly added operation information of each application recorded in each time period, wherein each element of the first linear table comprises a second linear table, and each element of each second linear table is used for recording operation information applied to different time periods;
when the number of the elements of each second linear table reaches a preset number, deleting the earliest element in each second linear table, and adding an element in each second linear table, so that the corresponding time interval between every two elements of each second linear table is smaller than or equal to a preset time interval;
when the application of the foreground is changed, setting an element corresponding to the foreground application in the first linear table, and triggering and executing the step of recording the operation information newly added by the application corresponding to each element in the first linear table in different time periods.
2. The method of claim 1, wherein setting an element corresponding to a foreground application in the first linear table comprises:
detecting whether the first linear table contains an element corresponding to the foreground application;
if the first linear table is detected to contain the element corresponding to the foreground application, adjusting the element corresponding to the foreground application to be the first element of the first linear table;
if it is detected that the first linear table does not include an element corresponding to the foreground application, an element corresponding to the foreground application is created and added to the first linear table as a leading element.
3. The method according to claim 2, wherein the creating an element corresponding to the foreground application and adding the element corresponding to the foreground application to the first linear table as a leading element if it is detected that the first linear table does not include the element corresponding to the foreground application comprises:
if the first linear table is detected not to contain the elements corresponding to the foreground application, detecting whether the number of the elements of the first linear table reaches a preset numerical value or not;
if the number of the elements of the first linear table is detected to reach a preset value, deleting the last element in the first linear table, creating an element corresponding to foreground application, and adding the element corresponding to the foreground application into the first linear table to form a first element;
and if the number of the elements of the first linear table is detected not to reach the preset value, creating the elements corresponding to the foreground application, and adding the elements corresponding to the foreground application into the first linear table to form the first element.
4. The method of recording application information according to claim 1, further comprising:
and when the terminal is detected to be powered off, performing serialization operation on the data corresponding to the first linear table, and storing the serialized data to a preset storage address.
5. The method of recording application information according to claim 4, further comprising:
when the terminal is detected to be started, performing deserialization operation on data in a preset storage address of the terminal to obtain deserialized data;
and storing the deserialized data into a memory and determining the deserialized data as a first linear table.
6. An apparatus for recording application information, comprising:
the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a first linear table, each element of the first linear table is used for recording operation information of an application, and the elements of the first linear table are arranged according to the time sequence that the application is positioned at a foreground last time;
the recording module is used for recording operation information which is newly added in different time periods and corresponds to each element in the first linear table;
the updating module is used for updating information contained in corresponding elements in the first linear table according to newly added operation information of each application recorded in each time period, each element of the first linear table comprises a second linear table, each element of each second linear table is respectively used for recording the operation information applied to different time periods, when the number of the elements of each second linear table reaches a preset number, the earliest element in each second linear table is deleted, and an element is newly added in each second linear table, so that the corresponding time interval between every two elements of each second linear table is smaller than or equal to a preset time interval;
and the setting module is used for setting elements corresponding to foreground application in the first linear table when the application of the foreground changes, and triggering and executing the step of recording the operation information newly added by the application corresponding to each element in the first linear table in different time periods.
7. The apparatus for recording application information according to claim 6, wherein the setting module is configured to:
detecting whether the first linear table contains an element corresponding to the foreground application;
if the first linear table is detected to contain the element corresponding to the foreground application, adjusting the element corresponding to the foreground application to be the first element of the first linear table;
if it is detected that the first linear table does not include an element corresponding to the foreground application, an element corresponding to the foreground application is created and added to the first linear table as a leading element.
8. The apparatus for recording application information according to claim 7, wherein the setting module is configured to:
if the first linear table is detected not to contain the elements corresponding to the foreground application, detecting whether the number of the elements of the first linear table reaches a preset numerical value or not;
if the number of the elements of the first linear table is detected to reach a preset value, deleting the last element in the first linear table, creating an element corresponding to foreground application, and adding the element corresponding to the foreground application into the first linear table to form a first element;
and if the number of the elements of the first linear table is detected not to reach the preset value, creating the elements corresponding to the foreground application, and adding the elements corresponding to the foreground application into the first linear table to form the first element.
9. The apparatus for recording application information according to claim 6, further comprising:
and the storage module is used for performing serialization operation on the data corresponding to the first linear table when the shutdown of the terminal is detected, and storing the serialized data to a preset storage address.
10. The apparatus for recording application information according to claim 9, further comprising: an extraction module for
When the terminal is detected to be started, performing deserialization operation on data in a preset storage address of the terminal to obtain deserialized data;
and storing the deserialized data into a memory and determining the deserialized data as a first linear table.
11. A storage medium having stored thereon a computer program, characterized in that the computer program, when executed on a computer, causes the computer to execute the method according to any of claims 1 to 5.
12. An electronic device comprising a memory, a processor, wherein the processor is configured to perform the method of any one of claims 1 to 5 by invoking a computer program stored in the memory.
CN201710939524.0A 2017-09-30 2017-09-30 Method and device for recording application information, storage medium and electronic equipment Active CN107526675B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710939524.0A CN107526675B (en) 2017-09-30 2017-09-30 Method and device for recording application information, storage medium and electronic equipment
PCT/CN2018/102231 WO2019062412A1 (en) 2017-09-30 2018-08-24 Method and apparatus for recording application information, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710939524.0A CN107526675B (en) 2017-09-30 2017-09-30 Method and device for recording application information, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN107526675A CN107526675A (en) 2017-12-29
CN107526675B true CN107526675B (en) 2019-12-31

Family

ID=60684821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710939524.0A Active CN107526675B (en) 2017-09-30 2017-09-30 Method and device for recording application information, storage medium and electronic equipment

Country Status (2)

Country Link
CN (1) CN107526675B (en)
WO (1) WO2019062412A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107526675B (en) * 2017-09-30 2019-12-31 上海瑾盛通信科技有限公司 Method and device for recording application information, storage medium and electronic equipment
CN110032429B (en) * 2018-01-10 2022-03-18 Oppo广东移动通信有限公司 Information processing method and device, mobile terminal and computer readable storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060116983A1 (en) * 2004-11-30 2006-06-01 International Business Machines Corporation System and method for ordering query results
CN101158976A (en) * 2007-11-21 2008-04-09 金蝶软件(中国)有限公司 Method and system for data-base recording enquire preprocess
CN102065182A (en) * 2010-12-28 2011-05-18 上海华勤通讯技术有限公司 Method for quickly starting mobile phone application
CN103077356B (en) * 2013-01-11 2015-06-24 中国地质大学(武汉) Protecting and tracking method for primary information of mobile terminal based on user behavior pattern
CN105279431B (en) * 2014-05-29 2020-07-07 阿里巴巴集团控股有限公司 Method, device and system for recording operation information in mobile equipment
CN105677548A (en) * 2015-12-28 2016-06-15 小米科技有限责任公司 Application management method and apparatus, and terminal
WO2017120964A1 (en) * 2016-01-17 2017-07-20 段春燕 Method for information insertion when controlling gaming time and time control system
CN107180185A (en) * 2017-05-15 2017-09-19 上海与德科技有限公司 A kind of recording method, device and the terminal of terminal operation process
CN107526675B (en) * 2017-09-30 2019-12-31 上海瑾盛通信科技有限公司 Method and device for recording application information, storage medium and electronic equipment

Also Published As

Publication number Publication date
WO2019062412A1 (en) 2019-04-04
CN107526675A (en) 2017-12-29

Similar Documents

Publication Publication Date Title
EP3575962B1 (en) Method and device for preloading application, storage medium and intelligent terminal
US11429880B2 (en) Methods and systems for preloading applications and generating prediction models
CN108681475B (en) Application program preloading method and device, storage medium and mobile terminal
US11231959B2 (en) Foreground and background switching entry generation and display following quit operations
CN108614722B (en) Application program preloading method and device, storage medium and terminal
CN105929925B (en) Electronic device and method for managing power in electronic device
CN107402835B (en) Application program exception handling method and device, storage medium and mobile terminal
EP3575961B1 (en) Method and apparatus for updating application prediction model, storage medium, and terminal
CN108762831B (en) Application program preloading method and device, storage medium and terminal
CN108958830B (en) Application program starting method and device, storage medium and terminal
JP6088667B2 (en) MEMORY CLEANING METHOD AND DEVICE, AND TERMINAL DEVICE
KR20180097674A (en) Memory reclaim method and apparatus
CN108595224B (en) Application program prompting method and device, storage medium and terminal
CN108804153B (en) Application program preloading method and device, storage medium and terminal
CN109033247B (en) Application program management method and device, storage medium and terminal
CN108958828B (en) Application program preloading method and device, storage medium and terminal
CN113474756A (en) Application processing method and device, storage medium and electronic equipment
CN107766134A (en) The cleaned system method and mobile device of a kind of mobile device
CN107526675B (en) Method and device for recording application information, storage medium and electronic equipment
CN108710512B (en) Application program preloading method and device, storage medium and intelligent terminal
CN108845838B (en) Application program preloading method and device, storage medium and terminal
CN105893471B (en) Data processing method and electronic equipment
CN109582382B (en) Loading method and device of configuration information, storage medium and terminal equipment
KR20200125258A (en) Method for controlling application execution, electronic device and storage medium therefor
CN113704177B (en) Storage method, system and related components of server firmware upgrade file

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
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
TA01 Transfer of patent application right

Effective date of registration: 20190109

Address after: Room 2101, 600 Longhuazhong Road, Xuhui District, Shanghai 200030

Applicant after: SHANGHAI JINSHENG COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant