Data processing method, device and equipment and readable storage medium

By creating shared memory and synchronizing windows to run data between processes, the problem of data leakage during account switching is solved, achieving data isolation between processes and fast account switching, thus reducing the risk of data leakage.

CN119025499APending Publication Date: 2024-11-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310610628.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In existing technologies, when switching accounts, even though the first account has been logged out, its related data is still stored in memory. This can lead to the second account mistakenly obtaining the first account's data, resulting in data leakage. Furthermore, manually cleaning up account data is time-consuming and carries the risk of omissions.

Method used

By displaying the business login window in the first process, recording the window's running data, creating shared memory, initiating process creation, initializing the second process, and synchronizing the window's running data to the shared memory after the second process completes initialization, generating the second business login window, and closing the first process, data isolation between processes is achieved.

Benefits of technology

It achieves data isolation between different accounts when switching accounts, reduces the risk of data leakage, and avoids the time consumption and omission problems of manually cleaning up data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025499A_ABST
    Figure CN119025499A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method, device and equipment and a readable storage medium, and the method comprises the steps: displaying a first business login window through a first process when an account logout event is executed in the first process, and continuously recording the window operation data of the first process for the first business login window; performing memory creation processing through the first process to obtain a shared memory; initiating process creation processing for the service application through the first process to obtain a second process corresponding to the service application, and performing process initialization processing on the second process; when it is determined that the second process is in the initialization completion state through the first process, the recorded window operation data are stored in the shared memory through the first process, the window operation data are synchronized to the second process through the shared memory, and a second service login window generated based on the window operation data is displayed through the second process. And closing the first process. According to the invention, the risk of data leakage during account switching can be reduced.
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 data processing method, device, equipment and readable storage medium. Background Art

[0002] Existing business applications with multiple account logins can provide business functions that are more closely related to account data based on the account data corresponding to the currently logged-in account, thereby improving the user experience.

[0003] However, when switching accounts through business applications, although the first account has been logged out, its related account data may still be stored in the memory, and the second account that logs in later may mistakenly obtain the account data related to the first account, thereby causing the account data of the first account to be leaked. In order to reduce the risk of data when switching accounts, the solution adopted by existing business applications is usually to manually clean up the account data associated with the first account when the first account is logged out, and ensure that the second account login operation is performed only after the object is manually cleaned up. However, manually cleaning up account-related data is not only time-consuming, but also has the risk of omissions, and data leakage is still prone to occur. Summary of the invention

[0004] The embodiments of the present application provide a data processing method, apparatus, device and readable storage medium, which can achieve data isolation between different accounts when switching accounts and reduce the risk of data leakage.

[0005] On the one hand, an embodiment of the present application provides a data processing method, including:

[0006] When an account logout event for a first account is executed in a first process corresponding to a business application, a first business login window is displayed through the first process, and window operation data of the first process for the first business login window is continuously recorded;

[0007] Perform memory creation processing through the first process to obtain shared memory;

[0008] Initiate a process creation process for the business application through the first process, obtain a second process corresponding to the business application, and perform process initialization processing on the second process;

[0009] When it is determined through the first process that the second process is in an initialization completion state, the recorded window operation data is stored in a shared memory through the first process, the window operation data is synchronized to the second process through the shared memory, the second business login window generated based on the window operation data is displayed through the second process, and the first process is closed.

[0010] An embodiment of the present application provides a data processing device, including:

[0011] A recording module, configured to, when an account logout event for a first account is executed in a first process corresponding to a business application, display a first business login window through the first process, and continuously record window operation data of the first process for the first business login window;

[0012] A memory creation module, used for performing memory creation processing through a first process to obtain a shared memory;

[0013] A process creation module, used to initiate a process creation process for a business application through a first process, and obtain a second process corresponding to the business application;

[0014] An initialization module, used for performing process initialization processing on the second process;

[0015] A data synchronization module, for storing the recorded window operation data in a shared memory through the first process when it is determined through the first process that the second process is in an initialization completion state, and synchronizing the window operation data to the second process through the shared memory;

[0016] The process switching module is used to display a second service login window generated based on the window operation data through a second process and close the first process.

[0017] Among them, the memory creation module includes:

[0018] a capacity determination unit, configured to initiate a memory creation request through a first process, and determine a first allocated memory capacity according to the memory creation request;

[0019] The memory determining unit is used to obtain, in the memory component, a first available memory corresponding to the first allocated memory capacity, and determine the first available memory as a shared memory.

[0020] Wherein, the above-mentioned data processing device further includes:

[0021] A memory determination module, used to determine the pre-occupied memory capacity corresponding to the recorded window operation data;

[0022] The memory determination module is further used to determine the occupied memory capacity of the shared memory, and determine the remaining available memory capacity corresponding to the shared memory according to the first allocated memory capacity and the occupied memory capacity;

[0023] The memory determination module is also used to call the data synchronization module if the remaining available memory capacity is greater than or equal to the pre-occupied memory capacity.

[0024] Wherein, the above-mentioned data processing device further includes:

[0025] A memory expansion module, configured to initiate a memory expansion request through a first process if the remaining available memory capacity is less than the pre-occupied memory capacity, and determine a second allocated memory capacity according to the memory expansion request; the second allocated memory capacity is greater than the sum of the occupied memory capacity and the pre-occupied memory capacity;

[0026] The memory expansion module is further used to obtain a second available memory corresponding to the second allocated memory capacity in the memory component;

[0027] The memory expansion module is further used to copy the data in the shared memory into the second available memory, determine the second available memory after the copying is completed as the new shared memory, and release the shared memory;

[0028] The memory expansion module is also used to store the recorded window operation data in the new shared memory through the first process, and synchronize the window operation data to the second process through the new shared memory.

[0029] Among them, the process creation module includes:

[0030] A command execution unit, configured to execute a process creation command through the first process; the process creation command includes a communication command line parameter associated with the first process;

[0031] The process creation unit is used to obtain an executable file for a business application according to a process creation command, create an initial new process according to the executable file, pass the communication command line parameters into the initial new process, and obtain a second process corresponding to the business application; the communication command line parameters are used to provide the second process with the ability to communicate with the first process.

[0032] The communication command line parameter includes a first window handle corresponding to the first service login window;

[0033] The above data processing device further includes:

[0034] The communication module is used to obtain the initial service window corresponding to the second process during the process initialization process, and write the initial window handle corresponding to the initial service window into the shared memory;

[0035] The communication module is further used to send a communication notification window message to the first process according to the first window handle in the second process;

[0036] The communication module is further used to read the initial window handle from the shared memory when the first process receives the communication notification window message;

[0037] The communication module is further used to establish a window connection with a second process including the first window handle through the initial window handle in the first process; the window connection is used for window message interaction between the first process and the second process;

[0038] The communication module is further used to send an initialization completion window message to the first process through the window connection in the second process after the process initialization processing is completed;

[0039] The communication module is also used to determine that the second process is in the initialization completion state through the first process when the first process receives the initialization completion window message.

[0040] Wherein, the above-mentioned data processing device further includes:

[0041] The window verification module is used to perform window verification processing on the first window handle through the second process to obtain a window verification result;

[0042] The window verification module is used to close the second process if the window verification result is a window verification failure result;

[0043] The window verification module is used to execute the step of performing process initialization processing on the second process if the window verification result is a window verification success result.

[0044] The data synchronization module includes:

[0045] A data writing unit, configured to store the recorded window operation data into a shared memory through the first process when it is determined through the first process that the second process is in an initialization completion state;

[0046] The data writing unit is further used to send data synchronization information to the second process through the first process;

[0047] The data reading unit is used to read the window operation data from the shared memory through the second process when the second process receives the data synchronization information.

[0048] Among them, the process switching module includes:

[0049] A window generating unit, used to generate a second service login window according to the window operation data in a second process;

[0050] A window display unit, used to overlay and display the second service login window on the first service login window;

[0051] The closing unit is used to close the first service login window through the first process and close the first process when the overlay display of the second service login window is completed.

[0052] The window generation unit includes:

[0053] The first generating subunit is used for obtaining the initial business window in the second process if the window operation data includes window content data and does not include account login data for the second account, and performing window content rendering on the initial business window according to the window content data to obtain a second business login window; the window content data is data corresponding to the window content displayed in the first business login window;

[0054] The second generating sub-unit is also used for executing a login event associated with the account login data in a second process if the window running data includes window content data and account login data for a second account, obtaining login window content data, rendering the window content of the initial business window according to the window content data and the login window content data, and obtaining a second business login window for providing an account login function to the second account.

[0055] Wherein, the above-mentioned data processing device further includes:

[0056] A timeout closing module, used for obtaining a system timestamp when a process creation processing event for a business application is initiated through the first process, and determining the obtained system timestamp as a start timestamp;

[0057] The timeout closing module is also used to obtain the maximum waiting time and determine the end timestamp based on the maximum waiting time and the start timestamp;

[0058] The timeout closing module is also used to close the first process and the second process when it is determined through the first process that the current timestamp is equal to the end timestamp and the second process is not in the initialization completion state.

[0059] On the one hand, an embodiment of the present application provides a computer device, including: a processor, a memory, and a network interface;

[0060] The above-mentioned processor is connected to the above-mentioned memory and the above-mentioned network interface, wherein the above-mentioned network interface is used to provide a data communication network element, the above-mentioned memory is used to store a computer program, and the above-mentioned processor is used to call the above-mentioned computer program to execute the method in the embodiment of the present application.

[0061] On one hand, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded by a processor and executing the method in the embodiment of the present application.

[0062] On the one hand, an embodiment of the present application provides a computer program product or a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method in the embodiment of the present application.

[0063] In an embodiment of the present application, when an account logout event for a first account is executed in a first process corresponding to a business application, a first business login window is displayed through the first process, and window operation data of the first process for the first business login window is continuously recorded; memory creation processing is performed through the first process to obtain shared memory; process creation processing for the business application is initiated through the first process to obtain a second process corresponding to the business application, and process initialization processing is performed on the second process; when it is determined through the first process that the second process is in an initialization completion state, the recorded window operation data is stored in the shared memory through the first process, the window operation data is synchronized to the second process through the shared memory, the second business login window generated based on the window operation data is displayed through the second process, and the first process is closed. By adopting the method provided in the embodiment of the present application, a first process is used to provide business functions for a first account. When the first account is logged out, a second process is quickly started through the first process, and then the window operation data generated after the first account is logged out is synchronized to the second process through shared memory. The second process can generate a second business login window based on the window operation data to replace the first business login window provided by the first process to provide business functions for the next account. Different processes have a process isolation mechanism, so data isolation between different accounts is achieved when switching accounts, thereby reducing the risk of data leakage. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0065] Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application;

[0066] Figure 2a This is a schematic diagram of a scenario of account logout provided in an embodiment of the present application;

[0067] Figure 2b 1 is a schematic diagram of a process switching scenario provided by an embodiment of the present application;

[0068] Figure 3 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0069] Figure 4a It is a schematic diagram of generating a second service login window provided in an embodiment of the present application;

[0070] Figure 4b is another schematic diagram of generating a second service login window provided in an embodiment of the present application;

[0071] Figure 4c is another schematic diagram of generating a second service login window provided in an embodiment of the present application;

[0072] Figure 5 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0073] Figure 6 This is a communication diagram when a first process and a second process are switched, provided in an embodiment of the present application;

[0074] Figure 7 It is a schematic diagram of a data interaction process provided by an embodiment of the present application;

[0075] Figure 8 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0076] Fig. 9 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0077] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0078] For ease of understanding, the following is a brief explanation of common nouns in this application:

[0079] A process is a running activity of a program in a computer on a certain data set. It is the basic unit for resource allocation in the system and the foundation of the operating system structure. A process is an entity. Each process has its own address space, which generally includes a text region, a data region, and a stack region. The text region stores the code executed by the processor; the data region stores variables and dynamically allocated memory used during process execution; and the stack region stores instructions and local variables called by active procedures. It should be understood that a process is an "executing program". A program is an inanimate entity. Only when the processor gives life to the program (the operating system executes it) can it become an active entity, which we call a process.

[0080] Process isolation: Process isolation is a set of different hardware and software technologies designed to protect processes in the operating system from interfering with each other. Process isolation is implemented using virtual address space. The virtual address of process A is different from the virtual address of process B, which prevents process A from writing data information to process B.

[0081] See also Figure 1 , Figure 1 Schematic diagram of a network architecture provided by an embodiment of the present application. Figure 1 As shown, the network architecture may include a business server 100 and a terminal device cluster, and the terminal device cluster may include terminal device 10a, terminal device 10b, terminal device 10c..., terminal device 10n, wherein any terminal device in the terminal device cluster may have a communication connection with the business server 100, for example, there is a communication connection between the terminal device 10a and the business server 100, there is a communication connection between the terminal device 10b and the business server 100, and there is a communication connection between the terminal device 10c and the business server 100, wherein the above-mentioned communication connection does not limit the connection method, and may be directly or indirectly connected through a wired communication method, or directly or indirectly connected through a wireless communication method, or through other methods, and the present application does not make any restrictions here.

[0082] It should be understood that Figure 1 Each terminal device in the terminal cluster shown in the figure can be installed with an application client corresponding to the business application. When the application client corresponding to the business application runs in each terminal device, it can be respectively connected to the above Figure 1The business servers 100 shown in the figure interact with each other so that the business servers 100 can receive business data from each terminal device. Among them, the business application may include one or more applications in applications such as game applications, video editing applications, social applications, instant messaging applications, live broadcast applications, short video applications, video applications, music applications, shopping applications, novel applications, payment applications, browsers, etc. that support multiple account logins and provide business functions associated with account data. Among them, the application client can be an independent client or an embedded sub-client integrated in a client (such as an instant messaging client, a social client, a video client, etc.), which is not limited here.

[0083] like Figure 1 As shown, each terminal device in the terminal device cluster starts the application client corresponding to the business application, which can be considered as creating and starting a first process corresponding to the business application. The terminal device can generate and display the first business login window corresponding to the business application based on the operation of the first process, and then respond to the account login operation for the first business login window, obtain the account login data of the first account, and send the account login data of the first account to the business server 100. The business server 100 can perform the corresponding account login processing according to the account login data of the first account, and return the corresponding account data to the terminal device. The terminal device can provide business functions associated with the account data through the first process. Taking the music application as an example, after the terminal device creates the music application process corresponding to the music application, it generates a music application login window through the music application process. After the terminal device responds to the account login operation for the music application login window, it obtains the account login data of account A, and then sends the account login data of account A to the business server 100. After verifying that the account login data of account A is correct, the business server performs the corresponding account login processing, and then obtains the song list data collected by account A, and then returns the song list data to the terminal device. The terminal device can display the song list list corresponding to the obtained song list data through the music application process.

[0084] It should be understood that after the terminal device obtains the above account data, some account data that will be used later can be temporarily stored in the memory. This means that when the terminal device switches accounts for business applications, although the first account has been logged out, the memory may still store account data related to the first account. At this time, when the terminal device logs in to the second account through the first process, it is possible to mistakenly obtain the account data of the first account when responding to operations related to the second account, thereby causing the account data of the first account to be leaked. In order to avoid account data leakage, such as Figure 1Each terminal device in the terminal device cluster shown can perform process switching when an account switching occurs in a business application, that is, create a second process to respond to the login operation of the next account, and ensure data isolation between different accounts through the process isolation mechanism between processes, thereby reducing the risk of data leakage. Specifically, the process of process switching can be: when an account logout event for a first account is executed in a first process corresponding to a business application, the terminal device can display a first business login window through the first process, continuously record the window operation data of the first process for the first business login window, and then perform memory creation processing through the first process to obtain a shared memory, and initiate a process creation processing for the business application through the first process to obtain a second process corresponding to the business application, and perform process initialization processing on the second process; finally, when it is determined through the first process that the second process is in an initialization completion state, the recorded window operation data is stored in the shared memory through the first process, the window operation data is synchronized to the second process through the shared memory, and the second business login window generated based on the window operation data is displayed through the second process, and the first process is closed.

[0085] It is understandable that the data processing method provided in the embodiment of the present application can be executed by a computer device, which includes but is not limited to the above-mentioned business server 100 and terminal devices. The above-mentioned server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides 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. The above-mentioned terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this.

[0086] It is understandable that the above-mentioned devices (such as the above-mentioned business server 100, terminal device 10a, terminal device 10b, terminal device 10c, ..., terminal device 10n) can be a node in a distributed system, wherein the distributed system can be a blockchain system, and the blockchain system can be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes can form a peer-to-peer (P2P, Peer To Peer) network, and the P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP, Transmission Control Protocol) protocol. In a distributed system, any form of computer equipment, such as servers, terminals and other electronic devices, can become a node in the blockchain system by joining the peer-to-peer network.

[0087] It can be understood that the embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, blockchain, smart driving and other scenarios.

[0088] It is understandable that in the specific implementation of this application, the account data and other related data involved, when the above embodiments of this application are applied to specific products or technologies, need to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0089] To facilitate understanding of the above account switching and process switching process, we take the business application as a social application as an example. Figure 2a-2b Among them, Figure 2a-2b The terminal device 20 shown can be the above Figure 1 Any terminal device in the terminal device cluster shown, for example, terminal device 20 may be terminal device 10a. Figure 2a-2b The service server 200 shown may be the above Figure 1 The business server 100 is shown.

[0090] Please see first Figure 2a , Figure 2a Schematic diagram of a scenario of account logout provided by an embodiment of the present application. Figure 2a As shown, a social application 21 may be integrated and installed in the terminal device 20. In this case, the business server 200 may be a background server corresponding to the social application 21, and is used to support the terminal device 20 in running the social application 21, that is, the terminal device 20 may send business data to the business server 200, and the business server 200 may perform business processing related to the business data, such as account login, account logout, message forwarding, etc., and return the corresponding business processing data to the terminal device 20 after the business processing is completed.

[0091] like Figure 2a As shown, assuming that the terminal device 20 has an association relationship with the object B, after the terminal device 20 responds to the start-up operation of the object B on the social application 21, it will create a process 22 corresponding to the social application 21. The terminal device 20 can respond to the business operation of the object through the process 22 to execute the business events related to the business operation and generate a corresponding business window. For example, the terminal device 20 can respond to the account login operation of the object B on the account B through the process 22, and can interact with the business server 200 to execute the account login event of the account B, and then generate and display the social account window 221 associated with the account B. The social account window 221 can be used to provide the object B with the function of instant conversation communication with the friends in the account B. Assuming that at this time the object C wants to use the terminal device 20 to log in to his social account, the object B needs to log out of his account B first. As shown Figure 2a As shown, the social account window 221 may include a logout account control 222. The terminal device 20 may respond to the triggering operation of the logout account control 222 by object B through the process 22, and then execute an account logout event for account B, and then display the social account login window 223 for the social application 21 through the process 22.

[0092] It should be understood that after account B logs out, the data of account B may still be stored in the memory of the terminal device 20. At this time, if the terminal device 20 continues to respond to the operations of object C on account C through process 22, it may mistakenly obtain the data of account B stored in the memory, so that object C learns the information of object B, thereby causing losses to object B. In order to avoid account data leakage, the terminal device 20 can pull up a new process through process 22 when executing the account logout event of account B, and then respond to the operations of object C on account C through the new process. Due to the isolation mechanism between processes, the data of account B obtained through process 22 cannot be accessed through the new process, thereby avoiding the leakage of account B data.

[0093] Please also see Figure 2b , Figure 2b Schematic diagram of a process switching scenario provided by an embodiment of the present application. Figure 2b As shown, when process 22 executes an account logout event for account B, terminal device 20 can perform memory creation processing through process 22 to obtain shared memory 23, which is mainly used for data synchronization between process 22 and the new process. After shared memory 23 is created, terminal device 20 can initiate process creation processing for social application 21 through process 22 to obtain process 24 corresponding to social application 21, and then terminal device 20 can perform process initialization processing on process 24, that is, start the necessary functions when the process is running.

[0094] like Figure 2bAs shown, the creation of process 24 and the process initialization process require a certain amount of time. During this startup period, process 22 needs to record the window operation data 25 corresponding to the social account login window 223. The window operation data 25 may include the window content data corresponding to the social account login window 223 and the account login data corresponding to account C. The account login data corresponding to account C is obtained by the terminal device 20 after the process 22 responds to the object C in the social account login window 223 to perform the account login operation of account C. It can be understood that in order to ensure the user experience of object C, during the startup period corresponding to process 24, object C can perform the account login operation of account C in the social account login window 223. Assuming that during the startup period of process 24, object C has completed the account login operation of account C through the social account login window 223, that is, the data input operation for account C and the trigger operation of the login account control 224, process 22 will respond to the account login operation and obtain the account login data related to account C. Process 22 does not need to execute the login event associated with account C based on the obtained account login data related to account C, but process 22 needs to record the obtained account login data as window operation data 25.

[0095] When the terminal device 20 determines through the process 22 that the process 24 is in the initialization completion state, the terminal device 20 can store the recorded window operation data 25 to the shared memory 23 through the process 22, and the terminal device 20 can synchronize the window operation data 25 to the process 24 through the shared memory 23. After the process 24 obtains the window operation data 25, the terminal device 20 can execute the login event associated with the account login data corresponding to the account C contained in the window operation data 25 in the process 24 to obtain the login window content data, and then the terminal device 20 can generate a social account login window 231 for providing the account login function to the account C in the process 24 according to the window content data corresponding to the social account login window 223 contained in the window operation data 25 and the login window content data. Figure 2b As shown, the social account login window 231 can display the login status of account C.

[0096] It can be understood that when the terminal device 20 determines that account C is in a successful login state after data interaction with the business server 200, the terminal device 20 can generate and display a social account window associated with account C through process 24. The social account window generated by process 24 can be used to provide object C with the function of instant conversation communication with friends in account C.

[0097] It can be understood that after the terminal device 20 displays the social account login window 231, the terminal device 20 can close the social account login window 223 and the process 22. When closing the process 22, the terminal device 20 will delete the data of account B temporarily stored in the memory by the process 22. Object B no longer needs to manually delete the data, which saves time. In addition, due to the isolation mechanism between process 22 and process 24, except for the window running data that needs to be synchronized in the shared memory, process 24 cannot obtain the data of account B temporarily stored in the memory by process 22, which avoids the object C from erroneously obtaining the data of account B, thereby ensuring the security of account data when switching accounts.

[0098] For further information, see Figure 3 , Figure 3 is a flow chart of a data processing method provided by an embodiment of the present application. The method may be performed by a computer device (for example, the above Figure 1 The method is executed by any terminal device in the terminal device cluster in the corresponding embodiment. The following will be described by taking the method executed by a computer device as an example, wherein the data processing method may at least include the following steps S101-S104:

[0099] Step S101, when an account logout event for a first account is executed in a first process corresponding to a business application, a first business login window is displayed through the first process, and window operation data of the first process for the first business login window is continuously recorded.

[0100] Specifically, a running program or software is a process, which is the basic unit for resource allocation by the operating system. That is to say, every time a process is started, the operating system will allocate certain operating resources (memory resources) to it to ensure the operation of the process.

[0101] Specifically, a business application refers to a program or software that allows multiple accounts to log in. When responding to a startup operation for a business application, the computer device will start a business process for the business application. After starting the business process, if the computer device has executed an account login event through the business process, the computer device can mark the business process as an old business process that has been used. When executing an account logout event through the old business process, the computer device needs to pull up a new business process through the old business process, and the new business process will be responsible for the login of the next account.

[0102] Specifically, the first process may be an old business process corresponding to the business application that has executed an account login event for the first account. When the computer device executes an account logout event for the first account in the first process, the computer device needs to pull up a new second process through the first process and perform process initialization processing on the second process. It can be understood that it takes time to obtain a second process in an initialized state, and due to computer performance reasons, the required time may be time-consuming. For ease of understanding, the required period of time can be referred to as the startup period of the second process.

[0103] Specifically, during the startup of the second process, in order to ensure the object's usage experience, the computer device still needs to provide the object with a window login service through the first process, that is, when an account logout event for the first account is executed in the first process corresponding to the business application, the first business login window is displayed through the first process. The first business login window is the account login window corresponding to the business application, such as the above Figure 2a The social account login window 223 shown in . It can be understood that during the startup of the second process, the object can still perform an account login operation through the first business login window, that is, input the account login data of the second account, and the computer device will still respond to the account login operation of the object through the first process, and display the account login data of the second account input by the object in the first business login window. The computer device needs to execute the account login event for the second account according to the account login data of the second account in the second process. Therefore, the computer device needs to continuously record the window operation data of the first process for the first business login window during the startup of the second process, and after determining that the second process is in the initialization completion state, synchronize the window operation data to the second process. Among them, the window operation data is used to reflect the state of the first business login window. In addition to the account login data obtained by the possible account login operation of the response object, the window operation data can also include the window content data corresponding to the first business login window, that is, the window page content corresponding to the first business login window.

[0104] Step S102: performing memory creation processing through the first process to obtain a shared memory.

[0105] Specifically, shared memory refers to memory that can be accessed by multiple processes, and shared memory is used for communication between processes, for example, data synchronization. When a computer device executes an account logout event for a first account in a first process, the computer device can perform memory creation processing through the first process to obtain shared memory.

[0106] Specifically, a feasible implementation process of obtaining a shared memory by performing memory creation processing through the first process may be: initiating a memory creation request through the first process, determining a first allocated memory capacity according to the memory creation request; obtaining a first available memory corresponding to the first allocated memory capacity in the memory component, and determining the first available memory as the shared memory. The first allocated memory capacity may be a pre-set initial capacity, which may be changed according to actual conditions, and is not limited here.

[0107] Step S103: Initiate a process creation process for the business application through the first process, obtain a second process corresponding to the business application, and perform process initialization on the second process.

[0108] Specifically, a feasible implementation process of initiating a process creation process for a business application through a first process to obtain a second process corresponding to the business application can be: executing a process creation command through the first process; obtaining an executable file for the business application according to the process creation command, creating an initial new process according to the executable file, and passing the communication command line parameters into the initial new process to obtain the second process corresponding to the business application. The process creation command includes the communication command line parameters associated with the first process and also includes other parameters required for process creation. The communication command line parameters are used to provide the second process with the ability to communicate with the first process. An executable file is a binary file containing an executable program. In a computer system, an executable file is the final form of a program code used to perform a specific task, which can be directly executed by computer hardware without compilation or interpretation.

[0109] Specifically, the above-mentioned process of executing a process creation command through a first process, obtaining an executable file for a business application according to the process creation command, creating an initial new process according to the executable file, passing the communication command line parameters into the initial new process, and obtaining a feasible implementation process of a second process corresponding to the business application can be: the computer device can input the process creation command into the command line of the operating system through the first process, the computer device can parse the process creation command through the operating system, and then determine the executable file for the business application to be executed according to the name of the process creation command and the related parameters contained therein, and then the computer device can search and obtain the executable file from the file system through the operating system, and then create a new process for the executable file, that is, the initial new process. The computer device can allocate some resources to the initial new process through the operating system, including a process identifier (PID), a virtual address space, a file descriptor, etc., and in the execution process of subsequent processes, various system calls provided by the operating system can be used to access resources such as the file system, network, and device. Then, the computer device can load the executable file into the virtual address space of the initial new process through the operating system, and set the program counter to the entry address of the executable file, and start executing the program, that is, start running the initial new process. At the same time, the computer device can pass the relevant parameters (including communication command line parameters) contained in the process creation command to the initial new process through the operating system to obtain the second process. Among them, the operating system (English: Operating System, abbreviation: OS) is a set of interrelated system software programs that manage and control computer operations, use and run hardware and software resources, and provide public services to organize user interactions. Among them, the file system is the method and data structure used by the operating system to clearly define files on storage devices (commonly disks, but also solid-state drives) or partitions; that is, the method of organizing files on storage devices.

[0110] Step S104, when it is determined through the first process that the second process is in an initialization completion state, the recorded window operation data is stored in the shared memory through the first process, the window operation data is synchronized to the second process through the shared memory, a second business login window generated based on the window operation data is displayed through the second process, and the first process is closed.

[0111] Specifically, when it is determined through the first process that the second process is in an initialization completion state, a feasible implementation process of storing the recorded window operation data in a shared memory through the first process, and synchronizing the window operation data to the second process through the shared memory may be: when it is determined through the first process that the second process is in an initialization completion state, the recorded window operation data is stored in the shared memory through the first process; data synchronization information is sent to the second process through the first process; when the second process receives the data synchronization information, the window operation data is read from the shared memory through the second process.

[0112] Specifically, a feasible implementation process of closing the first process by displaying a second business login window generated based on window operation data through a second process may be: in the second process, a second business login window is generated according to the window operation data; the second business login window is displayed on top of the first business login window; when the overlay display of the second business login window is completed, the first business login window is closed through the first process, thereby closing the first process.

[0113] Specifically, in the second process, a feasible implementation process of generating the second business login window according to the window operation data can be: if the window operation data contains window content data and does not contain account login data for the second account, then in the second process, the initial business window is obtained, and the window content of the initial business window is rendered according to the window content data to obtain the second business login window; the window content data is the data corresponding to the window content displayed in the first business login window. It can be understood that if the window operation data contains window content data and does not contain account login data for the second account, it means that during the startup of the second process, the object did not perform any account login operation on the first business login window. At this time, the computer device only needs to display a window with the same window page content as that contained in the first business login window through the second process.

[0114] Specifically, in the second process, a feasible implementation process of generating the second business login window according to the window operation data may be: if the window operation data includes window content data and account login data for the second account, then in the second process, a login event associated with the account login data is executed to obtain login window content data, and the window content of the initial business window is rendered according to the window content data and the login window content data to obtain a second business login window for providing an account login function to the second account. The account login data is the data obtained after the computer device performs an account login operation on the second account on the first business login window through the first process response object, wherein the account login operation should include a data input operation and a trigger operation on the login account control, and the account information data, i.e., the account number and password data input by the object, can be obtained in response to the data input operation, and the login execution data can be obtained in response to the trigger operation on the login account.

[0115] It should be noted that if the object does not perform a complete account login operation for the first business login window, that is, the object may have only performed a data input operation, and the window operation data only contains window content data and account information data for the second account, the computer device only needs to render the window content of the initial business window according to the window content data and account information data in the second process.

[0116] To understand the above various situations of obtaining the second business login window based on the window operation data, please refer to Figure 4a , Figure 4a Schematic diagram of generating a second service login window provided by an embodiment of the present application. Figure 4a As shown, after the computer device executes the account logout event of the first account through process 41, the service login window 411 is displayed, and then process 42 is started through process 41. Assuming that during the period when the computer device starts process 42 (i.e., creates process 42 and initializes it), the object does not perform any operation on the service login window 411, then the window operation data 431 recorded by the computer device through process 41 will only include the window content data corresponding to the service login window 411. After process 42 is in the initialization completion state, the computer device can generate a service login window 421 according to the window operation data 431. Figure 4a It can be seen that at this time, the window page content displayed in the service login window 411 and the service login window 421 is the same.

[0117] Please see again Figure 4b , Figure 4bThis is another schematic diagram of generating a second business login window provided by an embodiment of the present application. After the computer device executes the account logout event of the first account through process 41, the business login window 412 is displayed, and then process 42 is started through process 41. Assuming that during the startup period of the computer device starting process 42 (i.e., creating process 42 and initializing it), the object performs a data input operation through the business login window 412, then the window operation data 432 recorded by the computer device through process 41 will include the window content data corresponding to the business login window 412 and the account information data obtained in response to the data input operation. After process 42 is in the initialization completion state, the computer device can generate a business login window 422 according to the window operation data 432. Figure 4b It can be seen that at this time, the window page content displayed by the service login window 422 will include the account information data input by the object, but at this time, the process 42 does not execute the login event related to the input account information data.

[0118] Please see again Figure 4c , Figure 4c This is another schematic diagram of generating a second business login window provided by an embodiment of the present application. After the computer device executes the account logout event of the first account through process 41, the business login window 413 is displayed, and then process 42 is started through process 41. Assuming that during the startup period when the computer device starts process 42 (i.e., creates process 42 and initializes it), the object performs an account login operation through the business login window 413, i.e., a data input operation and a trigger operation for a login account control 414, then the window operation data 433 recorded by the computer device through process 41 will include the window content data and account login data corresponding to the business login window 412 (i.e., the account information data obtained in response to the data input operation and the login execution data obtained in response to the trigger operation for the login account control 414). After process 42 is in the initialization completion state, the computer device can execute the login event associated with the account login data corresponding to the second account according to the window operation data 433, obtain the login window content data, and then generate the business login window 423 according to the window content data and the login window content data contained in the window operation data 25. Figure 4c As shown, through the service login window 423, the object can know that the second account is in the login state.

[0119] Optionally, when initiating a process creation processing event for a business application through the first process, obtain the system timestamp, and determine the obtained system timestamp as the start timestamp; obtain the maximum waiting time, and determine the end timestamp according to the maximum waiting time and the start timestamp; when the current timestamp is determined to be equal to the end timestamp through the first process, and the second process is not in the initialization completion state, close the first process and the second process. In short, the computer device can time through the first process, and if the startup time corresponding to the second process exceeds the maximum waiting time, it can be considered that the startup of the second process has timed out. At this time, the computer device can close the first process and the second process that is being started, and send a timeout prompt message to the object.

[0120] Optionally, if the capacity allocated to the shared memory by the computer device when creating it is the first allocated memory capacity, the computer device can determine the pre-occupied memory capacity corresponding to the recorded window operation data; determine the occupied memory capacity of the shared memory, and determine the remaining available memory capacity corresponding to the shared memory based on the first allocated memory capacity and the occupied memory capacity; if the remaining available memory capacity is greater than or equal to the pre-occupied memory capacity, the computer device will store the recorded window operation data to the shared memory through the first process, and synchronize the window operation data to the second process through the shared memory.

[0121] Optionally, if the remaining available memory capacity is less than the pre-occupied memory capacity, a memory expansion request is initiated through the first process, and the second allocated memory capacity is determined according to the memory expansion request; the second allocated memory capacity is greater than the sum of the occupied memory capacity and the pre-occupied memory capacity; in the memory component, a second available memory corresponding to the second allocated memory capacity is obtained; the data in the shared memory is copied into the second available memory, the second available memory after the copy is completed is determined as a new shared memory, and the shared memory is released; the recorded window operation data is stored in the new shared memory through the first process, and the window operation data is synchronized to the second process through the new shared memory.

[0122] By adopting the method provided in the embodiment of the present application, a first process is used to provide business functions for a first account. When the first account is logged out, a second process is quickly started through the first process, and then the window operation data generated after the first account is logged out is synchronized to the second process through shared memory. The second process can generate a second business login window based on the window operation data to replace the first business login window provided by the first process to provide business functions for the next account. Different processes have a process isolation mechanism, so data isolation between different accounts is achieved when switching accounts, thereby reducing the risk of data leakage.

[0123] For further information, see Figure 5 , Figure 5is a flow chart of a data processing method provided by an embodiment of the present application. The method may be performed by a computer device (for example, the above Figure 1 The method is executed by any terminal device in the terminal device cluster in the corresponding embodiment. The following will be described by taking the method executed by a computer device as an example, wherein the data processing method may at least include the following steps S201-S208:

[0124] Step S201, when an account logout event for a first account is executed in a first process corresponding to a business application, a first business login window is displayed through the first process, and window operation data of the first process for the first business login window is continuously recorded.

[0125] Step S202: performing memory creation processing through the first process to obtain a shared memory.

[0126] Specifically, the implementation process of step S201-step S202 can refer to the description of the above step S101-step S102, which will not be repeated here.

[0127] Step S203, initiating a process creation process for the business application through the first process to obtain a second process corresponding to the business application; the second process includes a communication command line parameter; the communication command line parameter includes a first window handle corresponding to the first business login window.

[0128] Specifically, as can be seen from the above step S103, the communication command line parameter is used to provide the second process with the ability to communicate with the first process. Communication between processes can be implemented using window messages. The key to communicating between processes through window messages is that both processes have created windows and hold each other's window handles to establish a window connection. The window handle is a reference to a system internal data structure, and a window handle is used to uniquely identify a window. Therefore, the communication command line parameter may include the first window handle corresponding to the first service login window.

[0129] Optionally, the computer device can perform window verification processing on the first window handle through the second process to obtain a window verification result; if the window verification result is a window verification failure result, the second process is closed; if the window verification result is a window verification success result, the following steps of performing process initialization processing on the second process are executed. Among them, the window verification processing is mainly to verify the correctness of the first window handle. If the first window handle is wrong, the second process cannot communicate with the first process. At this time, closing the second process to terminate the process switching can avoid system crashes caused by abnormal operation. Different operating systems can adopt different window verification processing methods. Taking the Windows operating system as an example, in the Windows operating system, the computer device can use a system call (such as IsWindow()) to check whether the first window handle is valid.

[0130] Step S204, performing process initialization processing on the second process, during which an initial service window corresponding to the second process is obtained, and an initial window handle corresponding to the initial service window is written into the shared memory.

[0131] Specifically, the process initialization processing for the second process is actually to start the necessary functions and create windows for it, such as initializing system resources, starting threads, creating windows, initializing program data, etc. Among them, initializing system resources means initializing some system resources for the second process, such as file handles, network connections, etc. These resources need to be released when the second process ends to prevent resource leakage. Among them, starting a thread means starting at least one thread in the second process to execute the main logic of the second process; thread creation can be achieved through system calls (such as CreateThread()). Among them, creating a window means creating a window that the second process needs to display, that is, an initial business window, and window creation can be achieved through system calls (such as CreateWindow()); when creating the initial business window, it is necessary to specify the window class name, window title, style, position and size and other attributes. Among them, initializing program data means initializing some program data for the second process, such as configuration files, database connections, etc.; these data also need to be released when the second process ends to prevent memory leakage.

[0132] Specifically, the computer device cannot directly obtain the initial window handle corresponding to the initial business window through the first process. Therefore, the computer device can first write the initial window handle corresponding to the initial business window into the shared memory, and then notify the first process, and then read the initial window handle from the shared memory in the first process according to the notification.

[0133] Step S205: In the second process, a communication notification window message is sent to the first process according to the first window handle.

[0134] Specifically, after the initial service window is created, the computer device can generate a window message through the initial service window in the second process. After the computer device writes the initial window handle to the shared memory through the second process, it can generate a communication notification window message through the initial service window, and then send the communication notification window message to the first process according to the first window handle, that is, use the first window handle as the receiver of the communication notification window message.

[0135] Step S206, when the first process receives the communication notification window message, the initial window handle is read from the shared memory; in the first process, a window connection is established with the second process containing the first window handle through the initial window handle; the window connection is used for window message interaction between the first process and the second process.

[0136] Specifically, after the window connection is established, the first process and the second process can perform two-way window message interaction through the window connection.

[0137] Optionally, each window message can be set with a timeout, and the recipient must respond to the message within the specified time, otherwise it is considered a communication timeout. As long as there is a timeout error, it is considered a process switching failure, and the computer device needs to close the first process and the second process.

[0138] Step S207, after the process initialization processing is completed, in the second process, an initialization completion window message is sent to the first process through the window connection; when the first process receives the initialization completion window message, it is determined through the first process that the second process is in an initialization completion state.

[0139] Step S208, when it is determined through the first process that the second process is in an initialization completion state, the recorded window operation data is stored in the shared memory through the first process, the window operation data is synchronized to the second process through the shared memory, the second business login window generated based on the window operation data is displayed through the second process, and the first process is closed.

[0140] Specifically, the implementation of step S208 may refer to the detailed description of step S104 above, which will not be repeated here.

[0141] To facilitate understanding of the communication process between the first process and the second process when the computer device performs process switching during account switching described in the above steps S201 to S208, please refer to Figure 6 , Figure 6 This is a communication diagram of a first process and a second process switching provided by an embodiment of the present application. As can be seen from the above, the first process refers to a process that has performed an account login behavior, that is, a process that has executed an account login event. When the computer device executes an account logout event through the first process, the computer device can pull up a new process through the first process, that is, the second process. Before the second process is ready, that is, before the second process is in the initialized state, the first process needs to record the operation of the object. Figure 6 As shown, the computer device can synchronize operations between the first process and the second process through window messages, and complex account data (such as the above-mentioned window operation data, window handle and other data) is passed to the second process through shared memory. Figure 6 With the communication method shown, the computer device can synchronize the state of the first process through the second process, thereby executing the login operation of the next account.

[0142] Furthermore, to better understand Figure 6 In the process communication diagram shown in FIG. 1 , please refer to FIG. 1 for how the computer device communicates with the first process and the second process. Figure 7 , Figure 7 Schematic diagram of a data interaction process provided by an embodiment of the present application. Figure 7 As shown, the data interaction process mainly includes the following steps S71 to S79:

[0143] Step S71: The computer device executes an account logout event for the first account through a first process.

[0144] Specifically, after the account logout event for the first account is executed, it means that the first account has been logged out. At this time, the computer device needs to ensure that the data related to the first account can no longer be viewed, that is, regardless of whether the computer device logs in to another account, the data of the first account should be isolated. Therefore, the computer device can execute the account logout event for the first account in the first process as a trigger condition for switching processes. Among them, the logout of the first account can include active logout of the object, background notification offline, and logout caused by program abnormality.

[0145] In step S72, the computer device creates a shared memory through the first process, and then starts the second process.

[0146] Specifically, the shared memory is used to transfer complex data between the first process and the second process. The size of the shared memory is determined by the size of the data to be transferred and can be changed as required.

[0147] Specifically, after the computer device confirms that the shared memory is successfully created through the first process, it can start a new process through a system call, and at the same time pass command line parameters (which may include the first window handle of the first service login window corresponding to the first process) to the new process to obtain the second process. It can be understood that the first window handle is the recipient of the window message sent by the computer device to the first process through the second process.

[0148] Step S73: the computer device starts timeout detection through the first process and records window operation data.

[0149] Specifically, the startup time of the computer device starting the second process (i.e., creating the second process and performing process initialization processing on it) will be affected by the performance of the computer device and may be time-consuming. To ensure the object experience, the computer device needs to record the window operation data during this period. For details, please refer to the above Figure 3 The relevant description of step 101 in the corresponding embodiment will not be repeated here. However, if the startup time of the second process is too long, the waiting time of the object will also be too long. In order to ensure the object experience, timeout detection can be started. When the computer device determines through the first process that the waiting time exceeds a certain threshold, the second process and the first process are closed, and a timeout promotion information is sent to the object.

[0150] Step S74: the computer device performs process initialization processing on the second process to obtain an initial service window, writes the window handle of the initial service window into the shared memory, and sends a communication notification window message to the first process.

[0151] Specifically, the implementation of step S74 can refer to the above Figure 5 The relevant descriptions of step S204 to step S205 in the corresponding embodiment will not be repeated here.

[0152] Step S75, when the first process receives the communication notification window message, the window handle of the second process is read from the shared memory and recorded.

[0153] Specifically, the implementation of step S75 can refer to the above Figure 5 The relevant description of step S206 in the corresponding embodiment will not be repeated here.

[0154] Step S76: When the first process receives the initialization completion window message sent by the computer device through the second process, the computer device writes the recorded window operation data into the shared memory through the first process.

[0155] Step S77: The computer device reads the shared memory through the second process to synchronize the window operation data.

[0156] Step S78: In the second process, the computer device updates the initial service window according to the window operation data, obtains a second service login window, and displays the second service login window.

[0157] Step S79: When the first process receives the close notification window message sent by the computer device through the second process, the computer device may close the first process.

[0158] Specifically, the implementation of steps S76 to S79 ​​can refer to the above Figure 5 The relevant descriptions of step S207 to step S208 in the corresponding embodiment will not be repeated here.

[0159] By adopting the method provided in the embodiment of the present application, when data isolation between different accounts is achieved by switching processes, communication and data interaction between the first process and the second process can be achieved through window messages and shared memory, thereby ensuring the stability and effectiveness of process switching.

[0160] See also Figure 8 , Figure 8 1 is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. The data processing device may be a computer program (including program code) running on a computer device, for example, the data processing device is an application software; the data processing device 1 may be used to execute the corresponding steps in the data processing method provided in an embodiment of the present application. Figure 8 As shown, the data processing device 1 may include: a recording module 11, a memory creation module 12, a process creation module 13, an initialization module 14, a data synchronization module 15 and a process switching module 16.

[0161] The recording module 11 is used to display the first service login window through the first process when an account logout event for the first account is executed in the first process corresponding to the service application, and continuously record the window operation data of the first process for the first service login window;

[0162] A memory creation module 12, configured to perform memory creation processing through a first process to obtain a shared memory;

[0163] A process creation module 13, used to initiate a process creation process for a business application through a first process, and obtain a second process corresponding to the business application;

[0164] An initialization module 14, used for performing process initialization processing on the second process;

[0165] A data synchronization module 15, for storing the recorded window operation data in a shared memory through the first process when it is determined through the first process that the second process is in an initialization completion state, and synchronizing the window operation data to the second process through the shared memory;

[0166] The process switching module 16 is used to display a second service login window generated based on the window operation data through a second process and close the first process.

[0167] The specific implementation of the recording module 11, the memory creation module 12, the process creation module 13, the initialization module 14, the data synchronization module 15 and the process switching module 16 can be found in the above Figure 3 The description of step S101 to step S104 in the corresponding embodiment will not be repeated here.

[0168] The memory creation module 12 includes: a capacity determination unit 121 and a memory determination unit 122 .

[0169] The capacity determination unit 121 is used to initiate a memory creation request through a first process, and determine a first allocated memory capacity according to the memory creation request;

[0170] The memory determining unit 122 is configured to obtain, in the memory component, a first available memory corresponding to the first allocated memory capacity, and determine the first available memory as a shared memory.

[0171] The specific implementation of the capacity determination unit 121 and the memory determination unit 122 can be found in the above Figure 3 The description of step S102 in the corresponding embodiment will not be repeated here.

[0172] Wherein, the above-mentioned data processing device 1 further includes: a memory determination module 17.

[0173] A memory determination module 17, used to determine the pre-occupied memory capacity corresponding to the recorded window operation data;

[0174] The memory determination module 17 is further used to determine the occupied memory capacity of the shared memory, and determine the remaining available memory capacity corresponding to the shared memory according to the first allocated memory capacity and the occupied memory capacity;

[0175] The memory determination module 17 is further configured to call the data synchronization module if the remaining available memory capacity is greater than or equal to the pre-occupied memory capacity.

[0176] The specific implementation of the memory determination module 17 can be found in the above Figure 3 The optional description of step S104 in the corresponding embodiment will not be repeated here.

[0177] The data processing device 1 further includes a memory expansion module 18 .

[0178] The memory expansion module 18 is used to initiate a memory expansion request through the first process if the remaining available memory capacity is less than the pre-occupied memory capacity, and determine a second allocated memory capacity according to the memory expansion request; the second allocated memory capacity is greater than the sum of the occupied memory capacity and the pre-occupied memory capacity;

[0179] The memory expansion module 18 is further used to obtain a second available memory corresponding to the second allocated memory capacity in the memory component;

[0180] The memory expansion module 18 is further used to copy the data in the shared memory into the second available memory, determine the second available memory after the copying is completed as the new shared memory, and release the shared memory;

[0181] The memory expansion module 18 is further used to store the recorded window operation data into the new shared memory through the first process, and synchronize the window operation data to the second process through the new shared memory.

[0182] The specific implementation of the memory expansion module 18 can be found in the above Figure 3 The optional description of step S104 in the corresponding embodiment will not be repeated here.

[0183] The process creation module 13 includes: a command execution unit 131 and a process creation unit 132 .

[0184] The command execution unit 131 is used to execute a process creation command through the first process; the process creation command includes a communication command line parameter associated with the first process;

[0185] The process creation unit 132 is used to obtain an executable file for the business application according to the process creation command, create an initial new process according to the executable file, pass the communication command line parameters into the initial new process, and obtain a second process corresponding to the business application; the communication command line parameters are used to provide the second process with the ability to communicate with the first process.

[0186] The specific implementation of the command execution unit 131 and the process creation unit 132 can be found in the above Figure 3 The description of step S103 in the corresponding embodiment will not be repeated here.

[0187] The communication command line parameter includes a first window handle corresponding to the first service login window;

[0188] The above data processing device 1 further includes: a communication module 19 .

[0189] The communication module 19 is used to obtain the initial service window corresponding to the second process during the process initialization process, and write the initial window handle corresponding to the initial service window into the shared memory;

[0190] The communication module 19 is further used to send a communication notification window message to the first process according to the first window handle in the second process;

[0191] The communication module 19 is further configured to read the initial window handle from the shared memory when the first process receives the communication notification window message;

[0192] The communication module 19 is further used to establish a window connection with the second process including the first window handle through the initial window handle in the first process; the window connection is used for window message interaction between the first process and the second process;

[0193] The communication module 19 is further used to send an initialization completion window message to the first process through the window connection in the second process after the process initialization processing is completed;

[0194] The communication module is also used to determine that the second process is in the initialization completion state through the first process when the first process receives the initialization completion window message.

[0195] The specific implementation of the communication module 19 can be found in the above Figure 5 The description of steps S204 to S207 in the corresponding embodiment will not be repeated here.

[0196] Wherein, the above-mentioned data processing device 1 further includes: a window verification module 110.

[0197] The window verification module 110 is used to perform window verification processing on the first window handle through the second process to obtain a window verification result;

[0198] The window verification module 110 is used to close the second process if the window verification result is a window verification failure result;

[0199] The window verification module 110 is used to execute the step of performing process initialization processing on the second process if the window verification result is a window verification success result.

[0200] The specific implementation of the window verification module 110 can be found in the above Figure 5 The optional description of step S203 in the corresponding embodiment will not be repeated here.

[0201] The data synchronization module 15 includes a data writing unit 151 and a data reading unit 152 .

[0202] The data writing unit 151 is used to store the recorded window operation data into the shared memory through the first process when it is determined through the first process that the second process is in the initialization completion state;

[0203] The data writing unit 151 is further used to send data synchronization information to the second process through the first process;

[0204] The data reading unit 152 is used to read the window operation data from the shared memory through the second process when the second process receives the data synchronization information.

[0205] The specific implementation of the data writing unit 151 and the data reading unit 152 can be found in the above Figure 3 The description of step S104 in the corresponding embodiment will not be repeated here.

[0206] The process switching module 16 includes: a window generating unit 161 , a window displaying unit 162 and a closing unit 163 .

[0207] The window generating unit 161 is used to generate a second service login window according to the window operation data in the second process;

[0208] The window display unit 162 is used to display the second service login window over the first service login window;

[0209] The closing unit 163 is used to close the first service login window through the first process and close the first process when the overlay display of the second service login window is completed.

[0210] The specific implementation of the window generating unit 161, the window display unit 162 and the closing unit 163 can be found in the above Figure 3 The description of step S104 in the corresponding embodiment will not be repeated here.

[0211] The window generating unit 161 includes: a first generating subunit 1611 and a second generating subunit 1612 .

[0212] The first generating subunit 1611 is used for obtaining the initial business window in the second process if the window operation data includes window content data and does not include account login data for the second account, and performing window content rendering on the initial business window according to the window content data to obtain a second business login window; the window content data is data corresponding to the window content displayed in the first business login window;

[0213] The second generating sub-unit 1612 is also used to execute a login event associated with the account login data in the second process if the window running data includes window content data and account login data for the second account, obtain the login window content data, render the window content of the initial business window according to the window content data and the login window content data, and obtain the second business login window for providing the account login function to the second account.

[0214] The specific implementation of the first generation subunit 1611 and the second generation subunit 1612 can refer to the above Figure 3 The description of step S104 in the corresponding embodiment will not be repeated here.

[0215] The data processing device 1 further comprises a timeout closing module 111 .

[0216] The timeout closing module 111 is used to obtain a system timestamp when initiating a process creation processing event for a business application through the first process, and determine the obtained system timestamp as a start timestamp;

[0217] The timeout closing module 111 is also used to obtain the maximum waiting time and determine the end timestamp according to the maximum waiting time and the start timestamp;

[0218] The timeout closing module 111 is further used to close the first process and the second process when it is determined through the first process that the current timestamp is equal to the end timestamp and the second process is not in the initialization completion state.

[0219] The specific implementation of the timeout closing module 111 can be found in the above Figure 3 The optional description of step S104 in the corresponding embodiment will not be repeated here.

[0220] See also Fig. 9 , Fig. 9 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Fig. 9 As shown above Figure 8 The data processing device 1 in the corresponding embodiment can be applied to a computer device 1000, and the computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Fig. 9As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0221] In such Fig. 9 In the computer device 1000 shown, the network interface 1004 can provide a network communication network element; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0222] When an account logout event for a first account is executed in a first process corresponding to a business application, a first business login window is displayed through the first process, and window operation data of the first process for the first business login window is continuously recorded;

[0223] Perform memory creation processing through the first process to obtain shared memory;

[0224] Initiate a process creation process for the business application through the first process, obtain a second process corresponding to the business application, and perform process initialization processing on the second process;

[0225] When it is determined through the first process that the second process is in an initialization completion state, the recorded window operation data is stored in a shared memory through the first process, the window operation data is synchronized to the second process through the shared memory, the second business login window generated based on the window operation data is displayed through the second process, and the first process is closed.

[0226] It should be understood that the computer device 1000 described in the embodiments of the present application can execute the description of the data processing method in the above embodiments, and can also execute the above embodiments. Figure 8 The description of the data processing device 1 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.

[0227] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the above-mentioned computer-readable storage medium stores a computer program executed by the data processing device 1 mentioned above. When the above-mentioned processor loads and executes the above-mentioned computer program, it can execute the description of the above-mentioned data processing method in any of the above-mentioned embodiments, so it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0228] The computer-readable storage medium may be the data processing device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0229] In addition, it should be noted that: the embodiment of the present application also provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above Figure 3 , Figure 5 Any method provided by the corresponding embodiment.

[0230] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but optionally includes steps or modules that are not listed, or optionally includes other step units inherent to these processes, methods, devices, products, or equipment.

[0231] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of network elements in the above description. Whether these network elements are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described network elements for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0232] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A data processing method, characterized in that: include: When an account logout event for a first account is executed in a first process corresponding to a business application, a first business login window is displayed through the first process, and window operation data of the first process for the first business login window is continuously recorded; Performing memory creation processing through the first process to obtain shared memory; Initiating a process creation process for the business application through the first process, obtaining a second process corresponding to the business application, and performing a process initialization process on the second process; When it is determined through the first process that the second process is in an initialization completion state, the recorded window operation data is stored in the shared memory through the first process, the window operation data is synchronized to the second process through the shared memory, a second business login window generated based on the window operation data is displayed through the second process, and the first process is closed.

2. The method according to claim 1, characterized in that The step of performing memory creation processing through the first process to obtain a shared memory includes: Initiating a memory creation request through the first process, and determining a first allocated memory capacity according to the memory creation request; In the memory component, a first available memory corresponding to the first allocated memory capacity is obtained, and the first available memory is determined as a shared memory.

3. The method according to claim 2, characterized in that Also includes: Determine the pre-occupied memory capacity corresponding to the recorded window operation data; Determine the occupied memory capacity of the shared memory, and determine the remaining available memory capacity corresponding to the shared memory according to the first allocated memory capacity and the occupied memory capacity; If the remaining available memory capacity is greater than or equal to the pre-occupied memory capacity, the steps of storing the recorded window operation data in the shared memory through the first process and synchronizing the window operation data to the second process through the shared memory are performed.

4. The method according to claim 3, characterized in that Also includes: If the remaining available memory capacity is less than the pre-occupied memory capacity, initiating a memory expansion request through the first process, and determining a second allocated memory capacity according to the memory expansion request; The second allocated memory capacity is greater than the sum of the occupied memory capacity and the pre-occupied memory capacity; In the memory component, obtaining a second available memory corresponding to the second allocated memory capacity; Copying the data in the shared memory into the second available memory, determining the second available memory after the copying is completed as a new shared memory, and releasing the shared memory; The recorded window operation data is stored in the new shared memory through the first process, and the window operation data is synchronized to the second process through the new shared memory.

5. The method according to claim 1, characterized in that The initiating process creation processing for the business application through the first process to obtain a second process corresponding to the business application includes: executing, by the first process, a process creation command; the process creation command comprising communication command line parameters associated with the first process; According to the process creation command, an executable file for the business application is obtained, an initial new process is created according to the executable file, and the communication command line parameters are passed into the initial new process to obtain a second process corresponding to the business application; the communication command line parameters are used to provide the second process with the ability to communicate with the first process.

6. The method according to claim 5, characterized in that The communication command line parameter includes a first window handle corresponding to the first service login window; The method further comprises: During the process initialization processing, an initial service window corresponding to the second process is obtained, and an initial window handle corresponding to the initial service window is written into the shared memory; In the second process, sending a communication notification window message to the first process according to the first window handle; When the first process receives the communication notification window message, reading the initial window handle from the shared memory; In the first process, a window connection is established with a second process including the first window handle through the initial window handle; the window connection is used for window message interaction between the first process and the second process; After the process initialization processing is completed, in the second process, sending an initialization completion window message to the first process through the window connection; When the first process receives the initialization completion window message, it is determined through the first process that the second process is in an initialization completion state.

7. The method according to claim 6, characterized in that Also includes: Performing window verification processing on the first window handle through the second process to obtain a window verification result; If the window verification result is a window verification failure result, closing the second process; If the window verification result is a successful window verification result, the step of performing process initialization processing on the second process is executed.

8. The method according to claim 1, characterized in that When it is determined through the first process that the second process is in an initialization completion state, storing the recorded window operation data in the shared memory through the first process, and synchronizing the window operation data to the second process through the shared memory, comprises: When it is determined through the first process that the second process is in an initialization completion state, storing the recorded window operation data in the shared memory through the first process; Sending data synchronization information to the second process through the first process; When the second process receives the data synchronization information, the window running data is read from the shared memory through the second process.

9. The method according to claim 1, characterized in that: The displaying, through the second process, a second service login window generated based on the window operation data, and closing the first process includes: In the second process, generating a second service login window according to the window operation data; Overlaying and displaying the second service login window on the first service login window; When the overlay display of the second service login window is completed, the first service login window is closed through the first process, and the first process is closed.

10. The method according to claim 9, characterized in that In the second process, generating a second service login window according to the window operation data includes: If the window operation data includes window content data and does not include account login data for the second account, then in the second process, an initial business window is obtained, and window content rendering is performed on the initial business window according to the window content data to obtain a second business login window; the window content data is data corresponding to the window content displayed in the first business login window; If the window running data includes window content data and account login data for a second account, then in the second process, a login event associated with the account login data is executed to obtain login window content data, and window content rendering is performed on the initial business window according to the window content data and the login window content data to obtain a second business login window for providing an account login function to the second account.

11. The method according to claim 1, characterized in that: Also includes: When a process creation processing event for the business application is initiated through the first process, a system timestamp is obtained, and the obtained system timestamp is determined as a start timestamp; Obtain a maximum waiting time, and determine an end timestamp based on the maximum waiting time and the start timestamp; When it is determined through the first process that the current timestamp is equal to the end timestamp, and the second process is not in an initialization completion state, the first process and the second process are closed.

12. A data processing device, characterized in that: include: a recording module, configured to, when an account logout event for a first account is executed in a first process corresponding to a business application, display a first business login window through the first process, and continuously record window operation data of the first process for the first business login window; A memory creation module, used for performing memory creation processing through the first process to obtain a shared memory; A process creation module, used to initiate a process creation process for the business application through the first process to obtain a second process corresponding to the business application; An initialization module, used for performing process initialization processing on the second process; a data synchronization module, configured to store the recorded window operation data in the shared memory through the first process when it is determined through the first process that the second process is in an initialization completion state, and synchronize the window operation data to the second process through the shared memory; The process switching module is used to display a second service login window generated based on the window operation data through the second process and close the first process.

13. A computer device, characterized in that: include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide a data communication function, the memory is used to store program code, and the processor is used to call the program code to execute the method described in any one of claims 1-11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 11 can be performed.