Method, device and equipment for starting an instant messaging application

By directly obtaining session information from the session cache file when the instant messaging application is restarted and only loading part of the session data, the problem of low application startup efficiency is solved, achieving faster startup speed and lower probability of interface freezes.

CN114721733BActive Publication Date: 2025-09-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202110006443.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-05
Publication Date
2025-09-19
Estimated Expiration
2041-01-05

AI Technical Summary

Technical Problem

When the instant messaging application is restarted, it takes a long time to read and load the session information from the database, resulting in low application startup efficiency and interface lag.

Method used

By directly obtaining the session information associated with the target account identity from the session cache file instead of querying it layer by layer from the database, the time for reading session information is reduced, and only the instant messaging information of some sessions in the historical session main interface is loaded when the application is started.

Benefits of technology

It improves the efficiency of application startup, reduces the probability of interface freezes, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114721733B_ABST
    Figure CN114721733B_ABST
Patent Text Reader

Abstract

The present application provides a method, device and equipment for starting an application for instant messaging, which relates to the field of computer technology, in order to improve the efficiency of starting an application for instant messaging. The method includes: in response to a startup operation for a target application for instant messaging, determining a target account identity associated with the startup operation; obtaining first session information associated with the target account identity from a backed-up session cache file, the first session information including instant messaging information corresponding to some sessions in a historical session main interface; the historical session main interface includes a session main interface loaded during the historical operation of the target application after logging into the target application through the target account identity; loading the first session information into the current session main interface of the target application; starting the target application, and loading the current session main interface. The method directly reads and loads the session information from the session cache file, reducing the time consumed in loading the session information, thereby improving the efficiency of starting the target application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, and device for starting an instant messaging application. Background Art

[0002] For instant messaging applications, when the application is stopped and then restarted, it takes a long time to read and load the instant messaging information related to the session from the database used to cache the instant messaging information related to the session in the application. As a result, the application interface may freeze or the startup waiting time may be long during the startup process, resulting in low startup efficiency of the instant messaging application. Summary of the Invention

[0003] Embodiments of the present application provide a method, apparatus, and device for starting an instant messaging application, which are used to improve the efficiency of starting an instant messaging application.

[0004] In a first aspect of the present application, a method for starting an instant messaging application is provided, comprising:

[0005] In response to a launch operation on a target application for instant messaging, determining a target account identity associated with the launch operation;

[0006] Retrieving first session information associated with the target account identity from a session cache file used to back up historical session information, the first session information including instant messaging information corresponding to some sessions in a historical session main interface; the historical session main interface includes a session main interface loaded during a historical execution of the target application after logging into the target application using the target account identity;

[0007] Loading the first session information into the current session main interface of the target application;

[0008] Start the target application and load the current session main interface.

[0009] In a second aspect of the present application, a device for starting an instant messaging application is provided, comprising:

[0010] a responding unit, configured to, in response to a start operation on a target application for instant messaging, determine a target account identity associated with the start operation;

[0011] a session information acquisition unit, configured to acquire first session information associated with the target account identity from a session cache file used to back up historical session information, the first session information including instant messaging information corresponding to some sessions in a historical session main interface; the historical session main interface includes a session main interface loaded during a historical operation of the target application after logging into the target application using the target account identity;

[0012] a session information loading unit, configured to load the first session information into the current session main interface of the target application;

[0013] An application startup unit is used to start the target application and load the current session main interface.

[0014] In a possible implementation, the application starting unit is further configured to:

[0015] After launching the target application and loading the current session main interface, obtaining second session information associated with the target account identity from a session information database, the second session information including instant messaging information corresponding to all sessions in the historical session main interface; and updating the current session main interface based on the second session information.

[0016] In a possible implementation, the application starting unit is further configured to:

[0017] After starting the target application and loading the current session main interface, detecting whether the target application meets the session information caching condition during operation;

[0018] If it is determined that the target application meets the session information caching condition, and the time difference between the current time and the time when the session cache file was last updated reaches a time threshold, then based on the instant messaging information of the portion of the session associated with the target account identity obtained from the current session main interface, the first session information associated with the target account identity in the first session information set is updated; wherein the session information caching condition includes any one or a combination of the following:

[0019] The current session main interface is switched to the background operation of the system where the target application is located;

[0020] At least one of the number, order, and instant messaging information of the conversations in the current conversation main interface changes.

[0021] In a possible implementation, the response unit is specifically configured to:

[0022] Before determining the target account identity associated with the start operation, further loading a task manager associated with the target process of the target application;

[0023] The task manager obtains task description information of each task in the task set associated with the target process; and schedules each task in the task set based on the task description information.

[0024] In a possible implementation, the task description information includes delayed execution information of the task, thread description information, and task content, and the response unit is specifically configured to:

[0025] Determining, by the task manager, a target task to be delayed in execution from the task set based on the delayed execution information; and

[0026] The target task is saved in a target task queue through the task manager, and when a delayed end condition is met, a first target thread is called based on the task content to execute the target task; the first target thread is a thread associated with the thread description information of the target task.

[0027] In a possible implementation, the response unit is further configured to:

[0028] Determining, by the task manager, non-target tasks from the task set based on the delayed execution information, the non-target tasks being tasks other than the target task; and

[0029] The task manager is used to call a second target thread to execute the non-target task, where the second target thread is a thread associated with the thread description information of the non-target task.

[0030] In a possible implementation, the response is further used to:

[0031] Determining, by using the task manager, transferable tasks from the task set, the transferable tasks including tasks having a first permission and a second permission, the first permission being permission to call a main thread of the target process, and the second permission being permission to call a child thread of the target process;

[0032] The child thread is called to execute the transferable task.

[0033] In a third aspect of the present application, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.

[0034] In a fourth aspect of the present application, a computer program product is provided, the computer program product comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the first aspect.

[0035] In a fifth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions. When the computer instructions are executed on a computer, the computer executes the method described in the first aspect.

[0036] Since the embodiments of the present application adopt the above technical solution, at least the following technical effects are achieved:

[0037] In an embodiment of the present application, on the one hand, in the process of starting a target application for instant messaging, the first session information associated with the target account identity is obtained directly from the session cache file, without having to query and read from the database layer by layer, thereby reducing the time for reading the session information and improving the efficiency of starting the target application; on the other hand, in an embodiment of the present application, in the process of starting the target application, the instant messaging information corresponding to some sessions in the historical session main interface is read and loaded, thereby further reducing the time spent on reading the session information and reducing the time spent on loading the read session information into the current session main interface, thereby reducing the probability of the current session main interface being stuck during the process of starting the target application, thereby improving the efficiency of starting the target application. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;

[0039] Figure 2 An example diagram of the internal structure of a target application provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of the interaction between a main process and each sub-thread of the main process in a target application provided in an embodiment of the present application;

[0041] Figure 4 A schematic diagram of a main conversation interface provided in an embodiment of the present application;

[0042] Figure 5 A schematic diagram of another main session interface process provided in an embodiment of the present application;

[0043] Figure 6 Schematic diagram of several main conversation interfaces provided in embodiments of the present application;

[0044] Figure 7A schematic diagram of a method for an instant messaging application provided in an embodiment of the present application;

[0045] Figure 8 A schematic diagram of a process of triggering a startup operation through an application icon of a target application provided in an embodiment of the present application;

[0046] Figure 9 A schematic diagram of a data loading waiting interface in a main session interface provided in an embodiment of the present application;

[0047] Figure 10 An example diagram of a principle of calling a task manager associated with a process provided in an embodiment of the present application;

[0048] Figure 11 An example diagram of a process for starting a target application provided in an embodiment of the present application;

[0049] Figure 12 An example diagram of a process for updating a session cache file provided in an embodiment of the present application;

[0050] Figure 13 A structural diagram of a device for starting an instant messaging application provided in an embodiment of the present application;

[0051] Figure 14 A structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to better understand the technical solutions provided by the embodiments of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0053] In order to help those skilled in the art better understand the technical solutions of this application, the technical terms involved in this application are explained below.

[0054] 1) Target application, target account, target account identity

[0055] In the embodiment of the present application, the target application is an application with an instant messaging function; the target account is the account currently logged into the target application, and the target account identity is the current account identity of the target account when logging into the target application; in the embodiment of the present application, an account that can log in to the target application can use at least one account identity to log in to the target application, and can switch from the current account identity to other account identities after logging into the target application; the account identity can be an employee identity in different enterprises, a role identity in different project groups, an identity in different social groups (such as a teacher, student or parent identity in a school, or a doctor, patient or patient's family member in a hospital, etc.), and technical personnel in this field can set different account identities for an account according to actual needs; if an account (equivalent to a user) can belong to different enterprises, the account can have an account identity associated with the enterprise for each enterprise in the target application; if an account belongs to different project teams, the account can have an account identity associated with the project team for each project team in the target application.

[0056] 2) Conversation, instant messaging information, first conversation information, and second conversation information

[0057] In an embodiment of the present application, a session is a session after logging into the target application through the target account identity. The session may include but is not limited to at least one of an account session and a functional session; in an embodiment of the present application, an account session refers to a conversation between the target account and the dialogue account through the target application. The dialogue account and the target account may be accounts of the same account type, or the dialogue account and the target account may be accounts of inconsistent account types. The account type may include but is not limited to at least one type of personal type account, group type account, enterprise type account, information push type account (such as accounts that may include but are not limited to push news information or advertising information), etc. A group type account is a collection of multiple accounts including the target account; in an embodiment of the present application, a functional session refers to a conversation between the target account and a functional component that implements the target operation through the target application; the above-mentioned functional components may include but are not limited to components for processing files, components for managing schedules, components associated with email boxes, etc.

[0058] The instant messaging information corresponding to a conversation is data or information related to the conversation used for instant messaging. The instant messaging information may include, but is not limited to, chat records between the two parties to the conversation (the target account and the dialogue account or functional components), files transferred between the two parties to the conversation, and other interactive data during the conversation between the two parties.

[0059] The first session information is the instant messaging information corresponding to some sessions in the historical session main interface, where the historical session main interface includes the session main interface loaded during the historical operation of the target application after the account logs in to the target application using the target account identity; the second session information is the instant messaging information corresponding to all sessions in the above historical session main interface.

[0060] 3) Main session interface

[0061] The session main interface in the embodiment of the present application refers to an interface that can uniformly manage multiple sessions, such as deleting sessions, adding sessions, modifying the content of sessions, etc. in the session main interface, but not limited to. The content of the session main interface will be described in detail below.

[0062] 4) Session cache files

[0063] The session cache file in the embodiment of the present application is a cache file used to back up historical session information, and the historical session information in the session cache file can be updated during the operation of the target application.

[0064] 5) Processes and threads

[0065] A process is the basic unit of resource allocation in an operating system, while a thread is the basic unit of task scheduling and execution. Multiple processes (programs) can run simultaneously in an operating system. Processes are independent of each other, but in the same process (program), multiple threads execute simultaneously (through CPU scheduling, only one thread executes in each time slice). Threads in the same process share address space and other resources.

[0066] The design concept of this application is described below.

[0067] For applications used for instant messaging, when restarting the application after stopping it, it is necessary to read and load the relevant communication data of the application during its most recent operation from the database, that is, it is necessary to read and load the instant messaging information required to start the application from the database, and the storage of various information in the database is related layer by layer, and it is necessary to search the above instant messaging information layer by layer. For applications used for instant messaging, generally a large amount of instant messaging information will be loaded in the application interface during the process of starting the application, that is, the amount of instant messaging information that needs to be read and loaded during the process of starting the application is large, so it takes a long time to read and load a large amount of instant messaging information, which leads to a freeze in the application interface when starting the above application, and the startup efficiency of the application used for instant messaging is low.

[0068] In view of this, the inventors have designed a method, device and equipment for starting an application for instant messaging, which is used to improve the efficiency of starting an application for instant messaging; this method takes into account that it takes a long time for the target application for instant messaging to load a large amount of instant messaging information from the database during the startup process, thereby greatly affecting the startup efficiency of the target application. In an embodiment of the present application, it is considered to store the instant messaging information corresponding to the sessions in the historical application main interface of the target application during the historical operation process in the session cache file, and then when the target application is started, the relevant session information is directly read from the session cache file; further, in order to further reduce the time taken to start the target application, in an embodiment of the present application, when starting the target application, only the instant messaging information of some sessions in the historical application main interface is loaded into the current session main interface, so as to reduce the time for loading the session information, thereby further improving the efficiency of starting the target application.

[0069] In order to more clearly understand the design ideas of this application, the application scenarios in the embodiments of this application are introduced as examples below.

[0070] Please refer to Figure 1 , which illustrates an example application scenario. The application scenario includes a terminal device 100 and a server 200. A target application 110 is installed on the terminal device 100 (such as, but not limited to, 100-1 or 100-2 as shown in the figure). The target application 110 and the server 200 can communicate with each other, and the server 200 provides corresponding services and data for the target application.

[0071] The target application 110 (which may include but is not limited to 110 - 1 or 110 - 2 as shown in the figure) determines the target account identity associated with the startup operation in response to the startup operation for the target application; obtains the first session information associated with the above-mentioned target account identity from the session cache file, loads the first session information into the current session main interface of the target application, starts the target application, and loads the current session main interface, thereby achieving the purpose of quickly starting the target application 110.

[0072] As an embodiment, after quickly launching the target application 110, the second session information associated with the target account identity can be obtained from the session information database, and the current session main interface can be updated with the second session information. The above second session information includes the instant messaging information corresponding to all sessions in the historical session interface.

[0073] The server 200 is used to respond to the login request of the target account identity and log in to the target application through the target account identity; and return the resources or data requested by the resource request to the target application 110 based on the resource request triggered by the target account identity through the target application 110.

[0074] The server 200 in the embodiment of the present application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or multiple cloud servers (such as but not limited to server 200-1, server 200-2 or server 200-3 shown in the figure) that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms in cloud service technology; the functions of the above-mentioned server 200 can be implemented by one or more cloud servers, and can also be implemented by one or more cloud server clusters, etc.

[0075] The terminal device 100 in the embodiment of the present application can be a mobile terminal, a fixed terminal or a portable terminal, such as a mobile phone, a station, a unit, a device, a multimedia computer, a multimedia tablet, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device or any combination thereof, including accessories and peripherals of these devices or any combination thereof.

[0076] As an embodiment, the present application embodiment also provides an example diagram of the internal structure of the target application 110, see Figure 2 The target application 110 may include, but is not limited to, a main process 210, a message push (PUSH) process 220 for pushing messages or data, and a mini-program process 230 for starting and running mini-programs; wherein a mini-program is an application that runs in a browser or application APP through HTML5 technology and can be used without downloading and installing.

[0077] Each of the main process 210, the PUSH process 220 and the mini-program process 230 includes a main thread and sub-threads other than the main thread. As shown in the figure, the main process 210 may include but is not limited to a UI thread (User Interface Thread) 210-1 (i.e., the main thread of the main process 210), an IO thread 210-2 (i.e., a sub-thread of the main process 210), etc. The PISH process 220 may include but is not limited to a main thread 220-1, a sub-thread 220-2, and a sub-thread 220-3, etc. The mini-program process 230 may include but is not limited to a main thread 230-1, a sub-thread 230-2, and a sub-thread 230-3, etc.

[0078] See Figure 3As an embodiment, in the process of starting the target application 110, the main process 210 may be started first, but is not limited to being started first, and the main process 210 starts the PUSH process 220 and the mini-program process 230; wherein:

[0079] During the process of launching the target application 110, the main process 210 may, but is not limited to, call a UI thread in response to a launch operation; determine the target account identity associated with the launch operation through the UI thread, obtain the first session information associated with the target account identity from the session cache file, load the first session information into the current session main interface of the target application, launch the target application, and load the current session main interface.

[0080] As an embodiment, after starting the target application 110, the UI thread can call the IO thread, and the IO thread obtains the second session information associated with the target account identity from the session information database and calls the second session information back to the UI thread, and then the UI thread updates the current session main interface based on the second session information.

[0081] Furthermore, considering that the target application will schedule a large number of tasks during the startup and running processes, there are a large number of tasks under different processes, and there are also a large number of different tasks under the same process. In the process of starting the target application, the relevant technology lacks a unified management mechanism for the tasks of the target application, which is likely to cause task scheduling chaos, thereby causing the startup process of the target application to be stuck, or an accident to occur during the startup of the target application, and the startup of the target application has to be terminated, seriously affecting the startup efficiency of the target application. Therefore, in the embodiment of the present application, a task manager associated with the process is also provided for each process in the target application to uniformly manage and schedule the tasks in each process to reduce the occurrence of stuck or accidental exit during the startup of the target application, thereby improving the smoothness of starting and running the target application. The task managers associated with each process will be described in detail below.

[0082] Before introducing the method provided in the embodiment of the present application in detail, an exemplary introduction to the session main interface of the target application is first given.

[0083] In the embodiment of the present application, the session main interface refers to an interface that can manage and display multiple sessions. After the target account logs in to the target application as the target account, the session related information of multiple sessions associated with the target account identity can be displayed in the session main interface. The target account can, but is not limited to, delete sessions, add sessions, modify the content of sessions, etc. in the session main interface through the displayed session related information. The above session related information can, but is not limited to, include account information of the conversation account of the session or component information of the functional components in the session; please refer to Figure 4, providing an example diagram of a conversation main interface. In a conversation display area 401 of the conversation main interface 400, account information of each conversation account with which a target account is engaged in a conversation can be displayed. The account information can include, but is not limited to, avatars and nicknames of the conversation accounts (e.g., avatar 402-1 and nickname "XX" of conversation account 1, avatar 402-2 and nickname "YY" of conversation account 2, etc.), conversation time, number of latest instant messaging messages, etc.; component information of functional components in the conversation can also be displayed in the conversation display area 401 of the conversation main interface 400. The component information can include, but is not limited to, component icons and component names (e.g., component icon 403-1 and component name "File Transfer Assistant" of functional component 1 for file transfer, component icon 403-2 and component name "Mailbox" of functional component 2 associated with an email mailbox, etc.); the conversation main interface 400 also includes a switch account identity control 404. The target account can, but is not limited to, use the switch account identity control 404 to switch from the account identity currently logged into the target application to another account identity.

[0084] See Figure 5 , providing another example diagram of a session main interface, in which session-related information of multiple sessions can be displayed in a session display area 501 in the session main interface 500, such as account information of conversation accounts A1 to A3 of personal type accounts, account information of account group B1 of group type accounts (such as, but not limited to, group name and group icon of group accounts), and component information of functional components (such as, but not limited to, the file transfer assistant, target application team, mailbox, etc. shown in the figure); wherein the target account can switch from logging into the target application as the target account to logging into the target application as another account through the account identity conversion control 502; the target account can also enter the interface for managing schedules through the schedule management control 503, enter the interface for managing documents through the document management control 504, and view relevant information of the team to which the target account identity currently belongs through the team control 505, etc.

[0085] See Figure 6, providing example diagrams of two other main conversation interfaces, wherein the conversation display area 602 in the conversation main interface 601 in FIG (a) can display conversation related information of multiple conversations, such as component information of functional components (such as but not limited to commuting reminders, project C1, work summary or micro disk, etc. as shown in the figure), and account information of conversation accounts (such as but not limited to the target application team, account group B2, account group B3, etc. as shown in the figure); wherein the target account can also switch the account identity for logging into the target application through the identity conversion control 603; the target account can also view the account information of each conversation account that can conduct instant messaging through the address book space 604, and can also use the workbench control 60 5 enters the management interface, and can also trigger related configurations regarding the target account identity or target application through the information configuration control 606; Figure (b) provides an example diagram of a session main interface 607, in which the session display area 608 of the session main interface 607 can display session-related information of multiple sessions, such as, but not limited to, component information of functional components (such as, but not limited to, the file transfer assistant and subscription account information shown in the figure), and conversation accounts (such as, but not limited to, express notifications, conversation account A4, account group B4, or account group B5 shown in the figure); the target account can also view the content shared in the target application by the conversation accounts that can conduct instant messaging through the discovery control 609.

[0086] It should be noted that the session main interface of the target application listed in the embodiments of the present application is only for illustrative purposes and does not impose too many restrictions on the session main interface. Those skilled in the art can set it according to actual needs.

[0087] based on Figure 1 The following is an example of a method for starting an instant messaging application involved in an embodiment of the present application; please refer to Figure 7 , which is a schematic diagram showing a method for an instant messaging application designed in an embodiment of the present application, specifically comprising the following steps:

[0088] Step S701 : In response to a start-up operation on a target application for instant messaging, determining a target account identity associated with the start-up operation.

[0089] In the embodiment of the present application, the startup operation can be, but is not limited to, triggered by the target account. For example, the target account can, but is not limited to, trigger the above startup operation through the application icon of the target application, or trigger the above startup operation through the application management software, or trigger the startup operation through the login interface of the target application; see Figure 8For ease of understanding, a process of triggering a startup operation through an application icon is given here. Specifically, Figure (a) illustrates a schematic diagram of a desktop interface 8001 of a terminal device 100. The target account can, but is not limited to, trigger the above startup operation by clicking or long pressing the application icon 8002 of the target application; Figure (b) illustrates an example diagram of a login interface 8003 of a target application. The target account can, but is not limited to, trigger the above startup operation through the account login control 8004, etc.

[0090] As an embodiment, in the embodiment of the present application, the account identity of the target account that has historically logged into the target application before the above-mentioned startup operation is triggered can be determined as the target account identity; for example, any account identity among the account identities of the target account that has historically logged into the target application can be determined as the target account identity; or the account identity with the most login times or the longest login time among the account identities of the target account that has historically logged into the target application can be screened out and determined as the target account identity; or the account identity of the target account that last logged into the target application before the above-mentioned startup operation is triggered can be determined as the target account identity; or the account identity of the target account when it last finished running the target application before the above-mentioned startup operation is triggered can be determined as the target account identity, etc.

[0091] As an embodiment, in the embodiment of the present application, a time period-account identity mapping relationship associated with the account may be set for each account. The time period-account identity mapping relationship includes mapping relationships between different preset time periods and different account identities of the target account. Therefore, in step S701, the account identity mapped to the current time period may be determined as the target account identity based on the time period-account identity mapping relationship associated with the target account. The above mapping relationship is not limited. Those skilled in the art may determine the mapping relationship based on actual needs. For ease of understanding, a mapping relationship between a preset time period and the account identity of the target account is provided in the embodiment of the present application. Please refer to Table 1 for details:

[0092] Table 1: Mapping relationship between preset time periods and target account identities

[0093]

[0094] In Table 1 above, account identities 1-3 can be flexibly set according to actual business needs or the personal circumstances of the target account. For example, account identity 1 can be set as an employee identity of a certain enterprise, account identity 2 can be set as an individual identity, and account identity 3 can be set as a parent identity of a certain student, etc., but is not limited to this.

[0095] In the method described above, the target account identity associated with the startup operation triggered by the target account can be flexibly determined according to business needs, thereby improving the startup efficiency of the target application and enhancing the personalized settings of the target application startup.

[0096] Step S702: Obtain first session information associated with the target account identity from a session cache file used to back up historical session information; wherein the first session information includes instant messaging information corresponding to some sessions in the historical session main interface; the historical session main interface includes the session main interface loaded during the historical operation of the target application after logging into the target application using the target account identity.

[0097] Specifically, the session cache file may store, but is not limited to, session information of a target account for logging into a target application on the terminal device 100, and each first session information in the session information of the target account is associated with the target account identity. Therefore, in step S702, the target application directly obtains the first session information associated with the target account identity information from the session cache file, without having to obtain the relevant session information from the session information database, thereby reducing the time required to obtain the first session information. Furthermore, the first session information only includes instant messaging information corresponding to some sessions in the historical session main interface. Therefore, during the process of quickly launching the target application, the number of instant messaging information corresponding to the obtained sessions is reduced, further reducing the time required to obtain the first session information. The method for obtaining the session cache file will be described in detail below.

[0098] As an embodiment, the embodiment of the present application does not limit the number of sessions in the above-mentioned partial sessions. Those skilled in the art can set it according to actual needs, such as but not limited to setting the number of sessions in the partial sessions to 10, 20, 50 or 100, etc.; the embodiment of the present application does not limit the type of sessions in the above-mentioned partial sessions. The above-mentioned session can be a session between a target account and a dialogue account, or a session corresponding to a functional component, etc.

[0099] Step S703: Load the first session information into the current session main interface of the target application.

[0100] Specifically, in this step, the instant messaging information of each session in the first session information can be loaded into the session display area of ​​the current session main interface through, but is not limited to, the UI thread in the main thread of the target application. Because the first session information only includes the instant messaging information of some sessions in the historical session main interface, the time required to load the first session information into the current session main interface can be reduced.

[0101] Step S704: start the target application and load the current session main interface.

[0102] Specifically, when the current session main interface is loaded in this step, since the first session information associated with the target account identity has been loaded in the current session main interface, the data loading information will not appear in the session main interface when the current session main interface is loaded, that is, the following information will not appear: Figure 9 The display of the data loading information 901 in the session main interface 900 reduces the phenomenon of waiting for data loading when starting the target application, thereby improving the smoothness and efficiency of starting the target application.

[0103] The following is a detailed introduction to the process of obtaining and updating the session cache file in the embodiment of the present application.

[0104] In the embodiment of the present application, the session cache file is in the form of a file cache, which records a collection of instant messaging information corresponding to the current account identity and part of the session in the current session main interface during the operation of the target application.

[0105] As an embodiment, when the target application is run for the first time on the terminal device 100, the instant messaging information corresponding to part of the session in the session main interface can be recorded in a local session cache file based on the account identity used to log in to the target application when the target application is run for the first time; after the target application is run for the first time, when the target application is run on the terminal device 100 again, the session cache file can be updated based on the account identity used to log in to the target application and the instant messaging information corresponding to the session in the session main interface.

[0106] As an embodiment, in the embodiment of the present application, during the process of running the target application, that is, after the above-mentioned step S704, it can be detected whether the target application meets the session information caching condition during the running process; if it is determined that the above-mentioned target application meets the above-mentioned session information caching condition, and the time difference between the current time and the time when the above-mentioned session cache file was last updated reaches the time threshold, then based on the instant messaging information of the part of the session associated with the above-mentioned target account identity obtained from the above-mentioned current session main interface, the first session information associated with the above-mentioned target account identity in the above-mentioned first session information set is updated; the above-mentioned time threshold is not limited, and those skilled in the art can set it according to actual needs, such as setting the time threshold to 5 minutes, 10 minutes, 15 minutes, 30 minutes, etc.

[0107] The session information caching conditions include any one or a combination of the following:

[0108] The main interface of the conversation switches to the background operation of the system where the target application is located, that is, the target application switches from the foreground operation in the terminal device 100 to the background operation;

[0109] The session information caching condition is satisfied when at least one of the following information changes: the number, order, or instant messaging information of the sessions in the current session main interface; that is, when the target account adds a session, deletes a session, changes the order of at least one session in the current session main interface (such as, but not limited to, pinning a session to the top), or when the instant messaging information corresponding to at least one session changes (such as, when the target account receives a message from the conversation account, when session attributes change, when the unread messages in the session change, when the total number of sessions changes, etc.).

[0110] Furthermore, to improve the accuracy of obtaining and updating the session cache file, in an embodiment of the present application, a background thread is further provided in the main process. This background thread can be used to write instant messaging information corresponding to some sessions in the session main interface into the session cache file. Specifically, the UI thread can detect whether a session information cache condition is met. If the session information cache condition is met and the time difference between the current time and the time when the session cache file was last updated reaches a time threshold, the UI thread can call the background thread. The background thread uses the instant messaging information of some sessions associated with the target account identity obtained from the current session main interface to update the first session information associated with the target account identity in the first session information set. The instant messaging information of some sessions associated with the target account identity obtained from the current session main interface can be, but is not limited to, the instant messaging information corresponding to the first k sessions in the obtained session main interface. The value of k is not particularly limited and can be set by those skilled in the art according to actual needs. For example, k can be, but is not limited to, 20, 50, 66, or 100.

[0111] As an embodiment, in the process of updating the first session information associated with the target account identity in the session cache file based on the instant messaging information of the partial session associated with the target account identity obtained from the current session main interface, an overwriting update method or an update method of adding new information can be used; the overwriting update method refers to using the instant messaging information of the partial session obtained to overwrite the first session information associated with the target account identity in the session cache file; in the update method of adding new information, the first target instant messaging information can be added to the first session information associated with the target account identity in the session cache file; the first target instant messaging information refers to instant messaging information included in the instant messaging information obtained from the current session main interface but not included in the first session information associated with the target account identity in the session cache file before the update; the process of updating the first session information associated with the target account identity in the session cache file is not excessively limited, and those skilled in the art can set it according to actual needs.

[0112] As an embodiment, in order to improve the completeness of the target application's information, in the embodiment of the present application, after the target application is quickly started through the above steps S701 to S704, the current session main interface of the target application can also be updated based on the information in the session information database; specifically, it can be, but is not limited to, obtaining second session information associated with the above target account identity from the session information database, and updating the above current session main interface based on the above second session information; the above second session information includes instant messaging information corresponding to all sessions in the above historical session main interface.

[0113] Furthermore, in order to improve the flexibility of updating the current session main interface, in an embodiment of the present application, during the process of updating the current session main interface based on the second session information, the second session information can be used to overwrite the first session information in the current session main interface, or the second target instant messaging information can be loaded into the current session main interface; wherein the second target instant messaging information includes the instant messaging information included in the second session information but not included in the first session information.

[0114] As an embodiment, in order to reduce the probability of thread confusion during the update of the current session main interface, which may cause the target application to freeze, etc., in the embodiment of the present application, the IO thread in the main process can also obtain the second session information associated with the above-mentioned target account identity from the session information database, and then the IO thread returns the obtained second session information to the UI thread, and the UI thread updates the current session main interface based on the second session information.

[0115] The following content describes the design of the task manager associated with the process in the embodiment of the present application.

[0116] In the embodiment of the present application, the task manager is associated with the process, and the task manager can uniformly manage and schedule the tasks in the associated process, thereby avoiding task execution confusion in the process of starting the target task, which may cause freezes or unexpected exits in the process of starting the target application, thereby improving the efficiency of starting the target application.

[0117] Specifically, after the startup operation is detected in the embodiment of the present application, the main process 210, PUSH process 220 and mini-program process 230 of the target application can be started, and before determining the target account identity associated with the above startup operation in the above step S701, it can further include: determining the target process to be started in the target application, and loading the task manager associated with the target process of the above target application; obtaining the task description information of each task in the task set associated with the above target process through the above task manager; and scheduling each task in the above task set based on the above task description information.

[0118] It should be noted that in the embodiment of the present application, any one of the main process 210, the PUSH process 220, and the mini-program process 230 may be the target process, and each process is associated with a task manager. If steps S701 to S704 are implemented by the main process of the target application, then in step S701, the first task manager associated with the main process may be loaded, and each task in the task set associated with the main process may be managed and scheduled by the first task manager.

[0119] As an embodiment, after calling the main process, the PUSH process or the mini-program process can be called through the main process; when the PUSH process is called, the second task manager associated with the PUSH process will be loaded, and the second task manager will be used to schedule each task in the task set associated with the PUSH process; when the mini-program process is called, the second task manager associated with the mini-program process will be loaded, and the second task manager will be used to schedule each task in the task set associated with the mini-program process.

[0120] There is no limitation on the tasks in the above task set, and those skilled in the art can set them according to actual needs. The tasks in the task set can be target tasks related to starting the target application, or tasks other than the above target tasks.

[0121] As an embodiment, in order to improve the management efficiency of tasks in the embodiments of the present application, the task description information in the embodiments of the present application includes the delayed execution information, thread description information and task content of the task. When scheduling each task in the above-mentioned task set based on the above-mentioned task description information, the above-mentioned task manager can determine the target task for delayed execution from the above-mentioned task set based on the above-mentioned delayed execution information; and save the above-mentioned target task to the target task queue through the above-mentioned task manager, and when the delayed end condition is met, call the first target thread to execute the above-mentioned target task based on the above-mentioned task content; the above-mentioned first target thread is a thread associated with the thread description information of the above-mentioned target task.

[0122] The above-mentioned delayed end condition is not limited. Those skilled in the art can set it according to actual needs. For example, it can be, but not limited to, determining that the state of the target process is relatively idle as meeting the delayed end condition. For ease of understanding, several examples of delayed end conditions are given here:

[0123] The first delayed termination condition: the total number of tasks being executed in the target process is less than a first threshold.

[0124] The second delay end condition: the total number of unoccupied threads in the target process is greater than a second threshold.

[0125] The third delayed end condition: when the first session information is loaded into the current session main interface of the target application.

[0126] The above-mentioned delayed execution information may include, but is not limited to, information on whether the task is delayed, the thread description information may include information on the threads on which the task can be scheduled (i.e., information on which threads the task can be executed), and the task content may include information such as the code body required to execute the task or the specific content of the task; further, in order to facilitate determining to which process each task belongs, the task description information in the embodiment of the present application may also include process description information of the task, which may include information on the processes on which the task can be scheduled (i.e., information on which processes the task can be executed), that is, the task description information of the task in the embodiment of the present application may include, but is not limited to, description information of the four description dimensions in Table 2:

[0127] Task description information table 2

[0128] Descriptive dimensions of task description information Describe the meaning of dimensional representation Process description information Used to describe the process by which tasks can be scheduled Thread description information Used to describe the threads on which tasks can be scheduled Delayed execution information Used to describe whether the task is delayed Task content Used to describe specific tasks

[0129] As an embodiment, if the above-mentioned task manager determines that a non-target task exists in the above-mentioned task set based on the above-mentioned delayed execution information, the above-mentioned task manager can call a second target thread to execute the above-mentioned non-target task, and the above-mentioned non-target task is a task other than the above-mentioned target task, and the above-mentioned second target thread is a thread associated with the thread description information of the above-mentioned non-target task.

[0130] As an embodiment, in the embodiment of the present application, for tasks that can be executed in the main thread of the target process and also in the child thread of the target process, they can be transferred to the child thread for execution to save the resources of the main thread and thereby improve the efficiency of starting the target application; specifically, the above-mentioned task manager can be used to determine the transferable tasks from the above-mentioned task set, and call the above-mentioned child thread to execute the above-mentioned transferable tasks; the above-mentioned transferable tasks include tasks with a first permission and a second permission, the above-mentioned first permission is the permission to call the main thread of the above-mentioned target process, and the above-mentioned second permission is the permission to call the child thread of the above-mentioned target process.

[0131] As an embodiment, considering that the process of launching the target application can be implemented by the UI thread in the main process 210, in order to further improve the efficiency of launching the target application, the embodiment of the present application can reduce the consumption of UI thread processing tasks in the following aspects:

[0132] As an embodiment, for a first type of task that has the permission to call the UI thread and the permission to call a sub-thread other than the UI thread in the main process 210, the first type of task can be transferred to a sub-thread other than the UI thread in the above-mentioned main process 210 for execution, that is, the sub-thread other than the UI thread in the above-mentioned main process 210 is called to execute the first type of task; there are no excessive restrictions on the first type of task, and technical personnel in this field can set it according to actual needs. For example, the first type of task can be but is not limited to a tbs startup task (that is, a browser startup task), etc.

[0133] As an embodiment, for a second type of task that only has the permission to call the UI thread but is known to be delayed based on the task description information, the second type of task can be saved to the above-mentioned target task queue through the task manager associated with the main process, and when the delayed end condition is met, the UI thread is called to execute the second type of task; there are no excessive restrictions on the second type of task, such as the second type of task can be a task for loading the address book fragment of the session main interface. Since the first visible interface after the target application is started is the session fragment, it is only necessary to ensure that the session fragment is visible after it is started. For example, the address book fragment can be delayed in loading to reduce the time spent on starting the target application for the first time.

[0134] As an embodiment, for the third type of task that can only be executed in the main thread of the target process, the task itself can be optimized to reduce the time consumed in executing the task, thereby improving the execution speed of the main thread of the target process; for example, for the third type of task that must be executed in the UI thread of the main process, the task itself can be optimized to reduce the time consumed in executing the third type of task in the UI thread, thereby improving the execution efficiency of the UI thread, thereby achieving the purpose of improving the efficiency of starting the target application; for example, for the target animation task that must be executed in the UI thread, the target animation task implements animation through attribute animation, then the target animation task can be optimized to implement animation through frame animation, thereby reducing the execution time of the target animation task; the target animation task of the above-mentioned attribute animation actually changes the width and height and other properties of the View object through reflection in the VSYNC callback; the principle of the target animation task of the frame animation is to draw the current appearance of the View object to the screen in the VSYNC callback without actually changing the properties of the View; compared with attribute animation, frame animation is lighter and takes less time on the UI thread.

[0135] The following content provides a specific example, in which the account identity of the account is the corporate identity of different companies to which it belongs; in this example, the target application includes the above-mentioned main process 210, PUSH process 220 and mini-program process 230, wherein each process in the main process, PUSH process and mini-program process is associated with its own task manager; in addition to scheduling tasks in the task set of the associated process, the task manager can also manage the code executed in the onCreate method of the Application of the target application (to initialize the Activity instance object), split the sequentially executed code into logically isolated code blocks, and provide time-consuming statistics, execution order statistics and task increase and decrease statistics for each single task, so as to further manage each task.

[0136] See Figure 10 For the task managers associated with each process, in the process of starting the target application, after the startup operation is detected, the main process 210, PUSH process 220 and applet process 230 of the target application are started; then the task manager associated with the main process 210 is called through the main process 210, the task manager associated with the PUSH process 220 is called through the PUSH process 220, and the task manager associated with the applet 230 process is called through the applet process 230.

[0137] After the task manager associated with each process (such as the main process 210, the PUSH process 220, and the applet process 230 shown in the figure) is started, the loadTask method in the task manager associated with each process is called. Through the loadTask method, the tasks associated with each process are added to the corresponding process, and each process maintains a task set associated with itself (that is, it can be in the form of but not limited to a task list);

[0138] After the loadTask method in the task manager associated with each process is executed, the onAppInit method in the task manager can be called. Through the onAppInit method, the task manager will schedule the tasks in the task collection in sequence according to the task description information of the task, especially for the tasks in the main process 210; for tasks that must be executed in the UI thread (the main thread of the main process 210) and cannot be delayed, the UI thread is called to execute the task; for tasks that must be executed in the UI thread and can be delayed, they can be saved in the target task queue so that the UI thread can be called to execute the task when the delayed end condition is met; for tasks that can be executed in child threads other than the UI thread in the main process 210, the above-mentioned child threads other than the UI thread can be called to execute the task; for the specific way of calling each process and the corresponding thread to execute the corresponding task, please refer to the above content and will not be repeated here.

[0139] See Figure 11 During the process of launching the target application, after detecting a launch operation for the target application, the UI thread determines the target enterprise identity of the target account associated with the launch operation (which may be identified by, but is not limited to, VID), and then obtains first session information associated with the target enterprise identity from the session cache file, and loads the first session data into the current session main interface. After launching the target application, the IO thread may obtain second session information associated with the target enterprise identity from the session information database, and call the second session information back to the UI thread. The UI thread then updates the current session main interface using the second session information. The specific process can be found in the above content and will not be repeated here.

[0140] See Figure 12 During the execution of the target application, the UI thread may monitor whether session information caching conditions are met. If it is determined that the target application meets the session information caching conditions (details of which can be found above and are not repeated here), and the time difference between the current time and the time when the session cache file was last updated reaches a time threshold (e.g., 5 minutes), based on instant messaging information of a portion of sessions associated with the target enterprise identity obtained from the current session main interface (e.g., the first 100 sessions in the current session interface), a dedicated background thread is invoked to update the first session information associated with the target enterprise identity in the first session information set. If the target enterprise identity of the target account is determined to be Enterprise A, the UI thread, after determining that the session caching conditions are met, obtains instant messaging information of the first 100 sessions from the current session main interface, and then invokes a dedicated background thread to update the first session information associated with Enterprise A in the target account information based on the obtained instant messaging information.

[0141] In an embodiment of the present application, the problem of low efficiency in starting a target application is addressed. In the process of starting the target application, the first session information associated with the target account identity is directly obtained from the session cache file, without having to query and read from the database layer by layer, thereby reducing the time for reading the session information and improving the efficiency of starting the target application. In addition, in an embodiment of the present application, instant messaging information corresponding to some sessions in the session main interface is periodically cached. Then, in the process of starting the target application, the instant messaging information of the cached part of the session is preferentially rendered to the session main interface, thereby reducing the waiting process for the progress bar during the process of starting the target application and thereby improving the efficiency of starting the target application.

[0142] Please refer to Figure 13 Based on the same inventive concept, an embodiment of the present application provides a startup device 1300 for an instant messaging application, comprising:

[0143] A responding unit 1301 is configured to, in response to a start operation on a target application for instant messaging, determine a target account identity associated with the start operation;

[0144] The session information acquisition unit 1302 is configured to acquire first session information associated with the target account identity from a session cache file used to back up historical session information, the first session information including instant messaging information corresponding to some sessions in a historical session main interface; the historical session main interface includes a session main interface loaded during a historical operation of the target application after logging into the target application using the target account identity;

[0145] The session information loading unit 1303 is configured to load the first session information into the current session main interface of the target application;

[0146] The application starting unit 1304 is used to start the target application and load the current session main interface.

[0147] As an embodiment, the application starting unit 1304 is further configured to:

[0148] After launching the target application and loading the current session main interface, obtaining second session information associated with the target account identity from a session information database, the second session information including instant messaging information corresponding to all sessions in the historical session main interface; and updating the current session main interface based on the second session information.

[0149] As an embodiment, the application starting unit 1304 is further configured to:

[0150] After starting the target application and loading the current session main interface, detecting whether the target application meets the session information cache conditions during operation;

[0151] If it is determined that the target application meets the session information caching conditions, and the time difference between the current time and the time when the session cache file was last updated reaches a time threshold, the first session information associated with the target account identity in the first session information set is updated based on the instant messaging information of the portion of the session associated with the target account identity obtained from the current session main interface; wherein the session information caching conditions include any one or a combination of the following:

[0152] The target application is switched to the background operation of the system where the target application is located;

[0153] At least one of the number, order, and instant messaging information of the conversations in the current conversation main interface changes.

[0154] As an embodiment, the response unit 1301 is specifically configured to:

[0155] Before determining the target account identity associated with the startup operation, further loading the task manager associated with the target process of the target application;

[0156] The task manager is used to obtain the task description information of each task in the task set associated with the target process; and the task description information is used to schedule each task in the task set.

[0157] As an embodiment, the task description information includes delayed execution information of the task, thread description information, and task content. The response unit 1301 is specifically configured to:

[0158] Determining, by the task manager, a target task to be delayed from the task set based on the delayed execution information; and

[0159] Through the task manager, the target task is saved in the target task queue, and when the delayed end condition is met, the first target thread is called to execute the target task based on the task content; the first target thread is the thread associated with the thread description information of the target task.

[0160] As an embodiment, the response unit 1301 is further configured to:

[0161] Determining, by the task manager, non-target tasks from the task set based on the delayed execution information, where the non-target tasks are tasks other than the target tasks; and

[0162] The task manager is used to call a second target thread to execute the non-target task. The second target thread is a thread associated with the thread description information of the non-target task.

[0163] As an embodiment, the response unit 1301 is further configured to:

[0164] Determining, using the task manager, transferable tasks from the task set, the transferable tasks including tasks having a first permission and a second permission, the first permission being permission to call a main thread of the target process, and the second permission being permission to call a child thread of the target process;

[0165] The child thread is called to execute the transferable task.

[0166] As an example, Figure 13 The device in the embodiment can be used to implement any of the methods for starting an instant messaging application discussed above.

[0167] Based on the same inventive concept, an embodiment of the present application provides a terminal device, which is introduced below.

[0168] Please refer to Figure 14 The terminal device 100 includes a display unit 1440, a processor 1480 and a memory 1420, wherein the display unit 1440 includes a display panel 1441, which is used to display information input by the user or information provided to the user and various operation interfaces of the target application 110, etc. In the embodiment of the present application, it is mainly used to display the interface, shortcut window, etc. of the client installed in the terminal device 100.

[0169] Optionally, the display panel 1441 may be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED).

[0170] The processor 1480 is configured to read a computer program and then execute the method defined by the computer program. For example, the processor 1480 reads a target application, thereby running the application on the terminal device 100 and displaying the application interface on the display unit 1440. The processor 1480 may include one or more general-purpose processors and may also include one or more DSPs (Digital Signal Processors) to perform related operations to implement the technical solutions provided in the embodiments of the present application.

[0171] The memory 1420 generally includes internal memory and external memory, and the internal memory can be a random access memory (RAM), a read-only memory (ROM), and a cache (CACHE), etc. The external memory can be a hard disk, an optical disk, a USB disk, a floppy disk or a tape drive, etc. The memory 1420 is used to store computer programs and other data. The computer program includes an application corresponding to the client, etc. Other data may include data generated after the operating system or application is run, and the data includes system data (such as configuration parameters of the operating system) and user data. In the embodiment of the present application, program instructions are stored in the memory 1420, and the processor 1480 executes the program instructions in the memory 1420 to implement any of the startup methods for instant messaging applications discussed in the previous figure.

[0172] In addition, the terminal device 100 may also include a display unit 1440 for receiving input digital information, word information, contact touch operations, or contactless gestures, and generating signal inputs related to user settings and function control of the terminal device 100. Specifically, in an embodiment of the present application, the display unit 1440 may include a display panel 1441. The display panel 1441, such as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using a finger, stylus, or any other suitable object or accessory on or on the display panel 1441) and drive corresponding connected devices according to a pre-set program. Optionally, the display panel 1441 may include a touch detection device and a touch controller. The touch detection device detects the user's touch direction and detects the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 1480. It can also receive commands sent by the processor 1480 and execute them. In an embodiment of the present application, if the user clicks on the target application 110, the touch detection device in the display panel 1441 detects a touch operation, and sends a signal corresponding to the detected touch operation to the touch controller. The touch controller converts the signal into touch coordinates and sends them to the processor 1480. The processor 1480 determines the operation that the user needs to perform based on the received touch coordinates.

[0173] The display panel 1441 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the display unit 1440, the terminal device 100 can also include an input unit 1430. The input unit 1430 can include an image input device 1431 and other input devices 1432. The other input devices 1432 can be, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power keys, etc.), a trackball, a mouse, a joystick, and the like.

[0174] In addition to the above, the terminal device 100 may also include a power supply 1490 for powering other modules, an audio circuit 1460, a near-field communication module 1470, and an RF circuit 1410. The terminal device 100 may also include one or more sensors 1450, such as an accelerometer, a light sensor, a pressure sensor, etc. The audio circuit 1460 specifically includes a speaker 1461 and a microphone 1462. For example, the terminal device 100 can collect the user's voice through the microphone 1462 to perform corresponding operations.

[0175] As an embodiment, the number of the processor 1480 may be one or more, and the processor 1480 and the memory 1420 may be coupled or relatively independently configured.

[0176] As an example, Figure 14 The processor 1480 in the embodiment may be used to implement the following Figure 13 The functions of the response unit 1301, session information acquisition unit 1302, session information loading unit 1303 and application startup unit 1304 in.

[0177] As an example, Figure 14 The processor 1480 in the embodiment can be used to implement the functions of the target application 110 discussed above.

[0178] Those skilled in the art will appreciate that all or part of the steps of the above-mentioned method embodiments may be implemented by hardware associated with program instructions, and the aforementioned program may be stored in a computer-readable storage medium. When the program is executed, the program executes the steps of the above-mentioned method embodiments. The aforementioned storage medium includes various media that can store program codes, such as mobile storage devices, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0179] Alternatively, if the above-mentioned integrated unit of the invention is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the above-mentioned methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0180] Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the above-mentioned computer instructions are executed on a computer, the computer executes the method for starting an application for instant messaging as discussed above.

[0181] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0182] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A method for starting an instant messaging application, characterized in that: include: In response to a launch operation on a target application for instant messaging, determining a target account identity associated with the launch operation; The target account identity is the current account identity of the target account when logging into the target application. The target account is the account currently logged into the target application. The target account identity is the account identity used by the target account to log into the target application in the past. Retrieving first session information associated with the target account identity from a session cache file used to back up historical session information, the first session information including instant messaging information corresponding to some sessions in a historical session main interface; the historical session main interface includes a session main interface loaded during a historical execution of the target application after logging into the target application using the target account identity; Loading the first session information into the current session main interface of the target application; Start the target application and load the current session main interface; Wherein, when there is a mapping relationship between a preset time period and an account identity of a target account, determining the target account identity associated with the initiation operation includes: Based on the mapping relationship, the account identity mapped in the current time period is determined as the target account identity.

2. The method according to claim 1, wherein After starting the target application and loading the current session main interface, the method further includes: Obtaining second session information associated with the target account identity from a session information database, the second session information including instant messaging information corresponding to all sessions in the historical session main interface; Based on the second session information, the current session main interface is updated.

3. The method according to claim 1, wherein After starting the target application and loading the current session main interface, the method further includes: Detecting whether the target application meets the session information caching conditions during operation; If it is determined that the target application meets the session information caching condition, and the time difference between the current time and the time when the session cache file was last updated reaches a time threshold, then based on the instant messaging information of the portion of the session associated with the target account identity obtained from the current session main interface, the first session information associated with the target account identity in the first session information set is updated; wherein the session information caching condition includes any one or a combination of the following: The current session main interface is switched to the background operation of the system where the target application is located; At least one of the number, order, and instant messaging information of the conversations in the current conversation main interface changes.

4. The method according to any one of claims 1 to 3, wherein Before determining the target account identity associated with the initiation operation, the method further includes: Loading a task manager associated with a target process of the target application; The task manager obtains task description information of each task in the task set associated with the target process; and schedules each task in the task set based on the task description information.

5. The method according to claim 4, wherein The task description information includes delayed execution information of the task, thread description information, and task content. Scheduling each task in the task set based on the task description information includes: Determining, by the task manager, a target task to be delayed in execution from the task set based on the delayed execution information; and The target task is saved in a target task queue through the task manager, and when a delayed end condition is met, a first target thread is called based on the task content to execute the target task; the first target thread is a thread associated with the thread description information of the target task.

6. The method according to claim 5, wherein Also includes: Determining, by the task manager, non-target tasks from the task set based on the delayed execution information, the non-target tasks being tasks other than the target task; and The task manager is used to call a second target thread to execute the non-target task, where the second target thread is a thread associated with the thread description information of the non-target task.

7. The method according to claim 4, wherein Also includes: Determining, by using the task manager, transferable tasks from the task set, the transferable tasks including tasks having a first permission and a second permission, the first permission being permission to call a main thread of the target process, and the second permission being permission to call a child thread of the target process; The child thread is called to execute the transferable task.

8. A device for starting an instant messaging application, characterized in that: include: a responding unit, configured to, in response to a start operation on a target application for instant messaging, determine a target account identity associated with the start operation; The target account identity is the current account identity of the target account when logging into the target application. The target account is the account currently logged into the target application. The target account identity is the account identity used by the target account to log into the target application in the past. a session information acquisition unit, configured to acquire first session information associated with the target account identity from a session cache file used to back up historical session information, the first session information including instant messaging information corresponding to some sessions in a historical session main interface; the historical session main interface includes a session main interface loaded during a historical operation of the target application after logging into the target application using the target account identity; a session information loading unit, configured to load the first session information into the current session main interface of the target application; An application startup unit, configured to start the target application and load the main interface of the current session; When there is a mapping relationship between a preset time period and the account identity of the target account, the response unit determines the target account identity associated with the start operation by: determining the account identity mapped in the current time period as the target account identity based on the mapping relationship.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Network communication message roaming method and device

    CN104811366A

  • Method for page loading in application

    CN106446174A

  • Method, device and system for starting and optimizing application program and medium

    CN107943576A

  • Node workflow communication expenditure efficiency analysis optimization method and system

    CN108280018A