Inter-process communication method and device, equipment, medium and program product

By running multiple plug-in processes in the cloud server and realizing the memory data recovery mechanism in the main control process, the problems of data integrity and task continuity in inter-process communication are solved, and stable and efficient inter-process communication is achieved.

CN119862044APending Publication Date: 2025-04-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311365527.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-19
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

The prior art cannot ensure data integrity and task execution continuity when communicating between processes, especially when processes crash or are forced to shut down.

Method used

By running multiple plug-in processes in the cloud server, the main control process executes the task through the first plug-in process after receiving the task command and sends the task progress data to the main control process. When the first plug-in process runs abnormally, the main control process restores the memory data to the second plug-in process to ensure that the task can continue to be executed.

Benefits of technology

It realizes memory consistency of inter-process communication, prevents data loss, ensures stability and continuity of task execution, and ensures data integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862044A_ABST
    Figure CN119862044A_ABST
Patent Text Reader

Abstract

The invention discloses an inter-process communication method and device, equipment, a medium and a program product, and belongs to the technical field of cloud. The method is executed by a cloud server, and a plurality of plug-in processes run in the cloud server. The method comprises the following steps: in response to a received task command transmitted by a main control process running in a terminal, executing a task indicated by the task command through a first plug-in process; sending memory data of the first plug-in process to the main control process through the first plug-in process, wherein the memory data is used for indicating a task progress of executing a task by the first plug-in process; under the condition that the first plug-in process runs abnormally, responding to the main control process to restore the memory data to the second plug-in process, and continuing to execute the task according to the task progress through the second plug-in process; wherein the second plug-in process and the first plug-in process are different plug-in processes. The scheme can be applied to a cloud technology scene, and the integrity of data between processes and the continuity of task execution can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud technology, and in particular to an inter-process communication method, apparatus, device, medium and program product. Background Art

[0002] Inter-process communication (IPC) can transfer or exchange data between different processes. Inter-process communication methods include at least one of pipes (PIPE), message queues, semaphores, shared memory and sockets (Socket).

[0003] In the related art, during the task execution process, process A and process B transfer data through shared memory. Process A writes data to the shared memory in real time, and process B reads data from the shared memory.

[0004] However, if process A crashes or is forcibly closed, the data in the shared memory will be lost, and process B will not be able to continue to read data and execute tasks. The relevant technology cannot ensure the integrity of data between processes and the continuity of task execution. Summary of the invention

[0005] The present application provides a method, device, equipment, medium and program product for communication between processes. The technical solution is as follows:

[0006] According to one aspect of the present application, a method for communication between processes is provided, the method being executed by a cloud server, wherein a plurality of plug-in processes are running in the cloud server; the method comprising:

[0007] In response to receiving a task command transmitted by the main control process running in the terminal, executing the task indicated by the task command through the first plug-in process;

[0008] Sending memory data of the first plug-in process to the main control process through the first plug-in process, where the memory data is used to indicate the task progress of the first plug-in process in executing the task;

[0009] In the case of an abnormal operation of the first plug-in process, in response to the main control process restoring the memory data to the second plug-in process, the task is continued to be executed according to the task progress through the second plug-in process;

[0010] The second plug-in process and the first plug-in process are different plug-in processes.

[0011] According to another aspect of the present application, a method for communication between processes is provided, the method being executed by a terminal in which a main control process is running; the method comprising:

[0012] Sending a task command to a first plug-in process running in a cloud server through the main control process, wherein the first plug-in process is used to execute the task indicated by the task command;

[0013] The main control process receives memory data of the first plug-in process returned by the first plug-in process, where the memory data is used to indicate the task progress of the first plug-in process in executing the task;

[0014] In response to the operation abnormality of the first plug-in process, the main control process restores the memory data to the second plug-in process running in the cloud server, and the second plug-in process is used to continue to execute the task according to the task progress;

[0015] The second plug-in process and the first plug-in process are different plug-in processes.

[0016] According to another aspect of the present application, there is provided an inter-process communication device, the device being used to implement a cloud server, the cloud server running a plurality of plug-in processes; the device comprising:

[0017] an execution module, configured to execute, in response to receiving a task command transmitted by a main control process running in the terminal, a task indicated by the task command through the first plug-in process;

[0018] A sending module, used for sending memory data of the first plug-in process to the main control process through the first plug-in process, wherein the memory data is used for indicating the task progress of the first plug-in process in executing the task;

[0019] The execution module is used for, in the case of abnormal operation of the first plug-in process, responding to the main control process to restore the memory data to the second plug-in process, and continuing to execute the task according to the task progress through the second plug-in process;

[0020] The second plug-in process and the first plug-in process are different plug-in processes.

[0021] According to another aspect of the present application, there is provided an inter-process communication device, the device being used to implement a terminal in which a main control process is running; the device comprising:

[0022] A sending module, used to send a task command to a first plug-in process running in the cloud server through the main control process, and the first plug-in process is used to execute the task indicated by the task command;

[0023] a receiving module, configured to receive, by the main control process, memory data of the first plug-in process returned by the first plug-in process, wherein the memory data is used to indicate a task progress of the first plug-in process in executing the task;

[0024] A recovery module, configured to, in response to an operation abnormality of the first plug-in process, cause the main control process to restore the memory data to a second plug-in process running in the cloud server, wherein the second plug-in process is configured to continue to execute the task according to the task progress;

[0025] The second plug-in process and the first plug-in process are different plug-in processes.

[0026] According to another aspect of the present application, a computer device is provided, the computer device comprising: a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the inter-process communication method as described above.

[0027] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and the computer program is loaded and executed by a processor to implement the inter-process communication method as described above.

[0028] According to another aspect of the present application, a computer program product is provided, which includes computer instructions, wherein the computer instructions are stored in a computer-readable storage medium, and a processor obtains the computer instructions from the computer-readable storage medium, so that the processor loads and executes them to implement the inter-process communication method as described above.

[0029] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0030] On the one hand, the inter-process communication method provided by the embodiment of the present application is executed by a cloud server, and several plug-in processes are running in the cloud server. In response to receiving a task command transmitted by the main control process running in the terminal, the cloud server executes the task indicated by the task command through the first plug-in process; sends the memory data of the first plug-in process to the main control process through the first plug-in process, and the memory data is used to indicate the task progress of the first plug-in process in executing the task; in the case of abnormal operation of the first plug-in process, in response to the main control process, the memory data is restored to the second plug-in process, and the task is continued to be executed according to the task progress through the second plug-in process; wherein the second plug-in process and the first plug-in process are different plug-in processes. Accordingly, in the case of abnormal operation of the first plug-in process used to execute the task in the cloud server, the newly started second plug-in process in the cloud server can be restored to the memory data of the first plug-in process, which can ensure the memory consistency of the inter-process communication, which is conducive to preventing the loss of memory data, ensuring the stability of task execution between processes, and realizing the continuity of task execution between processes and the integrity of data.

[0031] On the other hand, the inter-process communication method provided by the embodiment of the present application is executed by a terminal, and a main control process is running in the terminal. The terminal sends a task command to the first plug-in process running in the cloud server through the main control process, and the first plug-in process is used to execute the task indicated by the task command; the main control process receives the memory data of the first plug-in process returned by the first plug-in process, and the memory data is used to indicate the task progress of the first plug-in process in executing the task; in response to the abnormal operation of the first plug-in process, the main control process restores the memory data to the second plug-in process running in the cloud server, and the second plug-in process is used to continue to execute the task according to the task progress; wherein the second plug-in process and the first plug-in process are different plug-in processes. Accordingly, in the case of abnormal operation of the first plug-in process used to execute the task in the cloud server, the main control process can newly start the second plug-in process, and the main control process can restore the newly started second plug-in process to the memory data of the first plug-in process, which can ensure the memory consistency of inter-process communication, which is conducive to preventing the loss of memory data, ensuring the stability of task execution between processes, and realizing the continuity of task execution between processes and the integrity of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments 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 creative work.

[0033] Figure 1A structural block diagram of a computer system provided by an exemplary embodiment is shown;

[0034] Figure 2 A schematic diagram showing an inter-process communication method provided by an exemplary embodiment;

[0035] Figure 3 A flowchart of an inter-process communication method provided by an exemplary embodiment is shown;

[0036] Figure 4 A flowchart of an inter-process communication method provided by an exemplary embodiment is shown;

[0037] Figure 5 A flowchart of an inter-process communication method provided by an exemplary embodiment is shown;

[0038] Figure 6 A flowchart of an inter-process communication method provided by an exemplary embodiment is shown;

[0039] Figure 7 A schematic diagram of a game live broadcast screen provided by an exemplary embodiment is shown;

[0040] Figure 8 An architectural diagram showing an inter-process communication method provided by an exemplary embodiment;

[0041] Fig. 9 An interaction diagram showing an inter-process communication method provided by an exemplary embodiment;

[0042] Fig.10 A block diagram of an inter-process communication device provided by an exemplary embodiment is shown;

[0043] Fig.11 A block diagram of an inter-process communication device provided by an exemplary embodiment is shown;

[0044] Fig.12 A structural block diagram of a computer device provided by an exemplary embodiment is shown. DETAILED DESCRIPTION

[0045] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0046] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0047] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0048] It should be understood that, although the terms first, second, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0049] It should be noted that before collecting relevant data of the user (such as: main control process, first plug-in process, second plug-in process, relevant data of the client, relevant data of the task to be performed, etc.) and during the process of collecting relevant data of the user, the present application can display a prompt interface, pop-up window or output voice prompt information, and the prompt interface, pop-up window or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that the present application only starts to execute the relevant steps of obtaining the relevant data of the user after obtaining the confirmation operation issued by the user to the prompt interface or pop-up window, otherwise (that is, when the confirmation operation issued by the user to the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the relevant data of the user are terminated, that is, the relevant data of the user is not obtained. In other words, all user data collected by the present application are collected with the consent and authorization of the user, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of relevant countries and regions.

[0050] First, the nouns involved in the embodiments of the present application are briefly introduced:

[0051] Cloud Technology: refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool that can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, image websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.

[0052] Inter-Process Communication (IPC): refers to a technology or method for transferring data between different processes.

[0053] Plugin Process: An independent process of a plugin used to perform tasks (e.g., at least one of live broadcast, recording, translation, subtitles, and commentary). Different types of tasks to be performed correspond to different types of plugins, and there are corresponding plugin processes for plugins. Optionally, the plugin process of this embodiment runs in a cloud server.

[0054] Main control process (Client): is responsible for maintaining the health status of the plug-in process and managing data storage. Optionally, the main control process of this embodiment runs in the local terminal. In one example, the main control process is a game client that supports the virtual world.

[0055] Remote Dictionary Server (Redis): is an open source, ANSI C-language, network-supported, memory-based, and persistent log-based, key-value database that provides application programming interfaces (APIs) in multiple languages.

[0056] Shared Memory: Also known as the Shared Memory Table, it is a memory area shared by the main control process and the plug-in process, used to store and exchange data.

[0057] Socket: is an IPC mechanism for network communication. It allows processes on different computer devices to communicate over the network. Socket provides a connection-oriented communication method and supports the client-server model.

[0058] Figure 1 The structure block diagram of a computer system 100 provided by an exemplary embodiment of the present application is shown. The computer system 100 can be implemented as a system architecture of an inter-process communication method. The computer system 100 includes: a terminal 120 and a server 140.

[0059] The terminal 120 may be an electronic device such as a mobile phone, a tablet computer, a vehicle terminal (vehicle machine), a wearable device, a PC (Personal Computer), an unmanned reservation terminal, etc. A client for running a target application may be installed in the terminal 120, and the target application may be an application supporting a virtual world, and the client of the target application may be a game client supporting a virtual world, including but not limited to: a battle royale shooting game, a virtual reality (VR) application, an augmented reality (AR) program, a three-dimensional map program, a virtual reality game, an augmented reality game, a first-person shooting game (FPS), a third-person shooting game (TPS), a multiplayer online tactical competitive game (MOBA), a strategy game (SLG), any one of which is not limited in this application. In addition, this application does not limit the form of the target application, including but not limited to App (Application, application) installed in the terminal 120, a mini-program, etc., and may also be in the form of a web page. Exemplarily, a main control process is running in the terminal 120 , and the client of the above-mentioned target application can serve as the main control process when running.

[0060] Server 140 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server (cloud server) providing cloud computing services, cloud database, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms. Server 140 may be the background server of the above-mentioned target application, used to provide background services for the client of the target application.

[0061] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to realize data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of technical network systems require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.

[0062] In some embodiments, the server 140 can also be implemented as a node in a blockchain system. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer.

[0063] The terminal 120 and the server 140 may communicate with each other via a network, such as a wired or wireless network.

[0064] The inter-process communication method provided in the embodiment of the present application can be performed by a computer device as the execution subject of each step. A computer device refers to an electronic device with data calculation, processing and storage capabilities. Figure 1Taking the implementation environment of the scheme shown as an example, the inter-process communication method can be executed by the terminal 120 (such as the client of the target application installed and running in the terminal 120 executes the inter-process communication method), or the inter-process communication method can be executed by the server 140, or the terminal 120 and the server 140 can interact and cooperate to execute it, and this application does not limit this.

[0065] Those skilled in the art will appreciate that the number of the terminals 120 may be more or less. For example, there may be only one terminal 120, or there may be dozens or hundreds of terminals 120, or more. The embodiment of the present application does not limit the number and device type of the terminals 120.

[0066] In the related art, during the task execution, process A and process B transfer data through shared memory. Process A writes data to the shared memory in real time, and process B reads data from the shared memory. If process A crashes or is forcibly closed, the data in the shared memory will be lost, and process B will not be able to continue to read data and execute tasks.

[0067] Based on this, this embodiment provides an inter-process communication method for ensuring memory consistency of inter-process communication, thereby achieving continuity of task execution and data integrity between processes. Figure 2 A schematic diagram showing an inter-process communication method provided by an exemplary embodiment of the present application is shown.

[0068] The terminal 120 is a local terminal for logging in with a user account. A main control process is running in the terminal 120. The main control process includes at least one of a data transmission function, a data storage function, and a plug-in process inspection and maintenance function. The cloud server 140 communicates with the terminal 120 through a network. Several plug-in processes are running in the cloud server 140. The several plug-in processes include at least one of a task execution function and a data transmission function. The several plug-in processes include a first plug-in process 142 and a second plug-in process 144.

[0069] Optionally, the first plug-in process 142 and the second plug-in process 144 are different plug-in processes corresponding to the same type of plug-in. For example: the task to be executed is a multimedia task, and the multimedia task includes at least one of game live broadcast, translation, subtitles, and commentary. Then the multimedia task type uses a multimedia plug-in, and the multimedia plug-in includes at least one of a live broadcast plug-in, a translation plug-in, a subtitle plug-in, and a commentary plug-in. Taking the live broadcast task as an example, the first plug-in process 142 and the second plug-in process 144 are different plug-in processes in the live broadcast plug-in. At the beginning of the live broadcast task, the first plug-in process 142 can be called to execute the live broadcast task. During the live broadcast task, when the first plug-in process 142 runs abnormally, the memory data of the first plug-in process 142 can be restored to the second plug-in process 144, and by timely calling the second plug-in process 144, the live broadcast task can be continued on the basis of the task progress completed by the first plug-in process 142, so that the memory data and task progress related to the live broadcast task are continuous.

[0070] In this embodiment, the first plug-in process 142 and the second plug-in process 144 are different plug-in processes of the same live broadcast plug-in. When the first plug-in process 142 runs abnormally, its memory data can be restored to the second plug-in process 142, thereby avoiding the loss of memory data that may be caused when the first plug-in process 142 generates an abnormality, and ensuring the memory consistency between the first plug-in process 142 and the second plug-in process 144. Since the second plug-in process 144 restores the memory data of the first plug-in process 142, the second plug-in process 144 can continue to execute the live broadcast task based on the task progress of the live broadcast task executed by the first plug-in process 142, ensuring the continuity of the execution of the live broadcast task. Since the execution of the live broadcast task is continuous, and there is memory consistency between different first plug-in processes 142 and second plug-in processes 144, the data integrity of the live broadcast task is also ensured.

[0071] The steps of the inter-process communication method provided in the embodiment of the present application are briefly described as follows:

[0072] The terminal 120 sends a task command to the first plug-in process 142 running in the cloud server 140 through the main control process 122; in response to receiving the task command transmitted by the main control process 122 running in the terminal 120, the cloud server 140 executes the task indicated by the task command through the first plug-in process 142; during the process of the first plug-in process 142 executing the task, the first plug-in process 142 running in the cloud server 140 sends the memory data of the first plug-in process 142 to the main control process 122, and the memory data is used to indicate the task progress of the first plug-in process 142 executing the task;

[0073] The main control process 122 running in the terminal 120 receives the memory data of the first plug-in process 142 returned by the first plug-in process 142; in response to the operation abnormality of the first plug-in process 142, the terminal 120 restores the memory data to the second plug-in process 144 running in the cloud server 140 by the main control process 122; then the cloud server 140 restores the memory data to the second plug-in process 144 in response to the main control process 122, and continues to execute the task according to the task progress through the second plug-in process 144.

[0074] In summary, in the inter-process communication method provided by the embodiment of the present application, the first plug-in process 142 and the second plug-in process 144 are different plug-in processes of the same plug-in. When the task is executed by the first plug-in process 142, when the first plug-in process 142 runs abnormally, the second plug-in process 144 can be called in time to continue to execute the task. Among them, when the first plug-in process 142 runs abnormally, its memory data can be restored to the second plug-in process 142, thereby avoiding the loss of memory data that may be caused when the first plug-in process 142 generates an abnormality, and ensuring the memory consistency between the first plug-in process 142 and the second plug-in process 144. Since the second plug-in process 144 restores the memory data of the first plug-in process 142, the second plug-in process 144 can continue to execute the task based on the progress of the task executed by the first plug-in process 142, ensuring the continuity of task execution. Since the execution of the task is continuous, and there is memory consistency between different first plug-in processes 142 and second plug-in processes 144, the data integrity of the task is also ensured. Therefore, this embodiment can ensure memory consistency between processes, continuity of task execution between processes, and data integrity when the plug-in process executes tasks and processes task-related data.

[0075] This embodiment can be applied to various cloud technology scenarios to perform data processing tasks and multimedia tasks. For example, in some game clients based on virtual environments, this embodiment can realize one-click live broadcast, screen recording, translation, commentary, etc. Since the plug-in process runs in the cloud server, this embodiment can also migrate the live broadcast, screen recording, translation, commentary and other functions of the game screen to the cloud, reduce the pressure on the game client in the local terminal, realize real-time transmission, low latency and high stability of data during the live broadcast, and improve the player's gaming experience and the viewing experience of the live broadcast audience. In addition, this embodiment has strong robustness in handling data loss, data transmission and plug-in process failures, and can provide players and audiences with more reliable live broadcast, screen recording, translation, commentary and other services.

[0076] Figure 3 A flowchart of an inter-process communication method provided by an exemplary embodiment of the present application is shown, in which the method is applied to Figure 1The server 140 shown is used as an example. The server 140 may be a cloud server, and several plug-in processes are running in the cloud server. The method includes steps 220, 240, and 260:

[0077] Step 220, in response to receiving a task command transmitted by the main control process running in the terminal, executing the task indicated by the task command through the first plug-in process.

[0078] The main control process is the process running in the terminal.

[0079] The task command is a command generated by the main control process based on the received task request.

[0080] Optionally, the task request carries a task parameter, and the task parameter is used to indicate at least one of a task initiator, a task initiating client, a task type, a task requirement, and required resources. The main control process running in the terminal receives the task request, generates a task command based on the task parameter carried in the task request, and transmits the task command to the first plug-in process running in the cloud server.

[0081] Optionally, the task type includes at least one of a data processing task and a multimedia task. The data processing task includes at least one of data calculation, statistics, addition, deletion, modification, and query. The multimedia task includes at least one of game live broadcast, translation, subtitles, and commentary. The task command also carries a task identifier (Task Id), which is determined based on at least one of an initiator identifier (User Id) of the task initiator and a client identifier (APP Id) of the task initiating client.

[0082] Several plug-in processes are running in the cloud server, and the first plug-in process is a plug-in process corresponding to a plug-in for executing a task indicated by a task command in the cloud server.

[0083] Exemplarily, the cloud server responds to receiving a task command transmitted by the main control process running in the terminal, and executes the task indicated by the task command through the first plug-in process. Optionally, the main control process running in the terminal calls the plug-in in the cloud server, and the cloud server responds to receiving a task command transmitted by the main control process running in the terminal and starts the first plug-in process in response to the calling operation, and executes the task indicated by the task command through the first plug-in process.

[0084] Optionally, the terminal stores the correspondence between tasks, plug-ins, and plug-in processes. After receiving the task request, the main control process in the terminal determines the first plug-in process to execute the task according to the task parameters in the task request, and the main control process carries the process identifier of the first plug-in process in the task command. Then, in response to receiving the task command transmitted by the main control process running in the terminal, the cloud server determines the first plug-in process corresponding to the process identifier carried in the task command, and executes the task indicated by the task command through the first plug-in process.

[0085] Optionally, the cloud server stores the correspondence between tasks and plug-ins and plug-in processes. The cloud server responds to receiving a task command transmitted by a main control process running in the terminal, determines the first plug-in process corresponding to the task indicated by the task command, and executes the task indicated by the task command through the first plug-in process.

[0086] In some embodiments, an inter-process communication framework is used to implement inter-process communication. The main control process running in the terminal can transmit the task command to the first plug-in process running in the cloud server through the inter-process communication framework. Among them, the inter-process communication (IPC) framework is a communication framework for transferring or exchanging data between different processes. The above-mentioned different processes may refer to different processes in the same computer device, or may refer to different processes of different computer devices. In this embodiment, the inter-process communication framework is used to implement data transfer between different processes on different computer devices (terminals and cloud servers in this embodiment).

[0087] Optionally, the inter-process communication framework includes a socket. Among them, a socket is an abstraction of an endpoint for two-way communication between processes of application programs on different computer devices in a network. A socket is an application programming interface (Application Programming Interface, API) for inter-process communication in a network, and is also a communication endpoint that can be named and addressed. Each socket in use has its type and a process connected to it. A socket is one end of process communication on a network, providing a mechanism for application processes to exchange data using network protocols. During inter-process communication, an application (main control process) writes the data and information to be transmitted into the socket of the computer device (terminal) where it is located. The socket transmits the above data and information to the socket of another computer device (cloud server) through a transmission medium connected to the network interface, so that the computer device can receive the above data and information.

[0088] Optionally, the socket includes at least one of a stream socket, a datagram socket and a raw socket. Exemplarily, the socket is used to allow different computer devices (the terminal and the cloud server in this embodiment) to communicate between processes through the network. Specifically, the socket is used to implement communication between the plug-in process and the main control process. The main control process running in the terminal transmits the task command to the first plug-in process running in the cloud server through the socket in the inter-process communication framework.

[0089] In this embodiment, the main control process running in the terminal transmits the task command to the first plug-in process running in the cloud server through the inter-process communication framework, rather than the main control process running in the terminal directly transmitting the task command to the first plug-in process running in the cloud server, which mainly has the following beneficial effects:

[0090] 1. Modularity: By separating the code and logic into different plug-ins, modularity can be achieved, so that each plug-in and different teams can develop, test and maintain independently, improving development efficiency; 2. Fault tolerance: If a plug-in or plug-in process has a problem, it will not affect the operation of other plug-ins and other plug-in processes, which improves the fault tolerance of the system. At the same time, if a plug-in or plug-in process needs to be updated or maintained, it will not affect the operation of other plug-ins and other plug-in processes. 3. Scalability: Through the inter-process communication framework, new plug-ins and plug-in processes can be easily added to implement new functions, which improves scalability.

[0091] In other embodiments, a message queue system is used to implement inter-process communication. A message queue is a container for storing messages during the transmission of messages. A message queue is a linked list of messages, stored in the kernel and identified by a message queue identifier.

[0092] Optionally, the message queue system includes at least one of an open source message middleware (RabbitMQ), an open source message system (ApacheKafka), and a simple queue service (in Amazon SQS). The main control process running in the terminal can transmit the task command to the first plug-in process running in the cloud server through the message queue system. Specifically, the main control process can create a message queue, send the data and information to be transmitted to the message queue, the first plug-in process opens the message queue, and receives the data and information that the main control process needs to transmit from the message queue. It should be noted that the first plug-in process can also create a message queue, send the data and information that need to be transmitted to the message queue, the main control process opens the message queue, and receives the data and information that the first plug-in process needs to transmit from the message queue.

[0093] In this embodiment, the main control process running in the terminal transmits the task command to the first plug-in process running in the cloud server through the message queue system, instead of the main control process running in the terminal directly transmitting the task command to the first plug-in process running in the cloud server. The message queue can exist independently of the process. Since the message queue is stored in the kernel, the life cycle of the message queue always exists with the kernel, which can avoid the loss of required transmission and information. The message queue can realize two-way communication between different processes. The message queue can also overcome the shortcomings of less signal transmission information, the pipeline can only carry unformatted byte streams, and the buffer size is limited. Therefore, the reliability and scalability of inter-process communication can be further improved.

[0094] In some embodiments, task processing of the plug-in process is implemented through task events. The main control process running in the terminal receives the task request, generates a task event based on the task parameters carried in the task request, and transmits the task event to the first plug-in process running in the cloud server, and the task event carries the task parameters. The cloud server responds to the task event transmitted by the main control process running in the terminal, and executes the task indicated by the task command through the first plug-in process. This embodiment can further improve the processing response speed and scalability of task data, and reduce resource consumption to a certain extent.

[0095] Step 240: Send memory data of the first plug-in process to the main control process through the first plug-in process, where the memory data is used to indicate the task progress of the first plug-in process in executing the task.

[0096] The memory data refers to the data generated or used during the execution of the task by the first plug-in process. The memory data can be used to indicate the task progress of the first plug-in process in executing the task.

[0097] Optionally, the memory data includes at least one of task data of the first plug-in process, process status data, memory status data, a heartbeat timestamp, a task command to be executed, an executed task command, and an unexecuted task command.

[0098] Task data includes data directly related to the task. Taking multimedia tasks as an example, task data is multimedia data, including audio (game sound effects, player voice), video (game screen), subtitles and other multimedia content, streaming address and multimedia configuration information. Process status data includes the running status information of the first plug-in process, including whether the process is running, the CPU usage of the process, and at least one of the memory usage of the process.

[0099] The memory state data includes at least one of stack information, register state, global variables, and file descriptors. Among them, the heap is dynamically allocated memory, which is usually used to store objects and data dynamically created when the program is running. The stack is used to store information about local variables and function calls. If you want to restore to a specific function call state, you need to save the stack information. The register state is the state information corresponding to the register. The register is usually used to store the current execution position (program counter) of the program, the current top position of the stack (stack pointer), and the calculation result. The register state can be used to restore the execution state of the plug-in process. Global variables exist throughout the entire runtime, and the state of global variables may have a certain impact on the state and progress of the plug-in process. The file descriptor refers to the information about the state of the opened file or network connection (for example, the current read and write position) when the plug-in process opens a file or network connection at runtime.

[0100] The heartbeat timestamp is a signal that the first plug-in process periodically sends to the shared memory, which is used to indicate whether the operation of the first plug-in process is abnormal. Taking the multimedia task as a game live broadcast as an example, the task command includes at least one of a start live broadcast command, a stop live broadcast command, a subtitle add command, and an add commentary command.

[0101] Optionally, when the memory data of the first plug-in process is updated during the execution of the task by the first plug-in process, the memory data of the first plug-in process is sent to the main control process through the first plug-in process.

[0102] In some embodiments, an inter-process communication framework is used to implement inter-process communication. The memory data of the first plug-in process is sent to the main control process through the inter-process communication framework by the first plug-in process. Optionally, the inter-process communication framework includes a socket, wherein the socket allows processes on different computer devices to communicate through a network, that is, the socket can be used to implement communication between the plug-in process and the main control process. The memory data of the first plug-in process is sent to the main control process through the socket in the inter-process communication framework by the first plug-in process.

[0103] In some other embodiments, a message queue system is used to implement inter-process communication, and the first plug-in process sends the memory data of the first plug-in process to the main control process through the message queue system.

[0104] In some embodiments, the memory data of the first plug-in process is sent to the main control process through the first plug-in process, and the main control process also writes the memory data into the temporary memory of the main control process, and synchronizes the memory data in the temporary memory to the database memory in real time. Optionally, the database can be at least one of a Redis database and a distributed database. This embodiment is conducive to preventing memory data loss, ensuring the stability of task execution and data integrity, and is conducive to achieving higher scalability and stronger data persistence of plug-ins and plug-in processes.

[0105] Step 260, in the event of an abnormal operation of the first plug-in process, in response to the main control process, the memory data is restored to the second plug-in process, and the task is continued to be executed according to the task progress through the second plug-in process; wherein the second plug-in process and the first plug-in process are different plug-in processes.

[0106] There are several plug-in processes running in the cloud server. When the first plug-in process runs abnormally, the second plug-in process is the plug-in process in the cloud server for continuing to execute the task.

[0107] Optionally, the second plug-in process and the first plug-in process are different plug-in processes. The second plug-in process and the first plug-in process are different plug-in processes corresponding to plug-ins of the same type.

[0108] Exemplarily, the main control process running in the terminal is also used to detect whether the first plug-in process is running abnormally. In the case of abnormal operation of the first plug-in process, the main control process is used to restore the memory data to the second plug-in process. Here, restoration refers to the main control process writing the memory data to the plug-in memory of the second plug-in process. In the case of abnormal operation of the first plug-in process, the cloud server responds to the main control process to restore the memory data to the second plug-in process, and continues to execute the task according to the task progress through the second plug-in process.

[0109] In summary, the inter-process communication method provided by the embodiment of the present application is executed by a cloud server, and several plug-in processes are running in the cloud server. In response to receiving a task command transmitted by the main control process running in the terminal, the cloud server executes the task indicated by the task command through the first plug-in process; sends the memory data of the first plug-in process to the main control process through the first plug-in process, and the memory data is used to indicate the task progress of the first plug-in process in executing the task; in the case of abnormal operation of the first plug-in process, in response to the main control process, the memory data is restored to the second plug-in process, and the task is continued to be executed according to the task progress through the second plug-in process; wherein the second plug-in process and the first plug-in process are different plug-in processes. Accordingly, in the case of abnormal operation of the first plug-in process used to execute the task in the cloud server, the newly started second plug-in process in the cloud server can be restored to the memory data of the first plug-in process, which can ensure the memory consistency of the inter-process communication, which is conducive to preventing the loss of memory data, ensuring the stability of task execution between processes, and realizing the continuity of task execution between processes and the integrity of data.

[0110] Figure 4 A flowchart of an inter-process communication method provided by an exemplary embodiment of the present application is shown.

[0111] The above step 260 may be optionally replaced by step 262:

[0112] Step 262, in the case of abnormal operation of the first plug-in process, in response to the main control process writing memory data into the process memory of the second plug-in process, based on the task progress indicated by the memory data, the task is continued to be executed according to the task progress through the second plug-in process.

[0113] The main control process running in the terminal has the function of writing memory data into the process memory of the second plug-in process running in the cloud server. Specifically, in the case of abnormal operation of the first plug-in process, the cloud server writes the memory data into the process memory of the second plug-in process in response to the main control process, and based on the task progress indicated by the memory data, continues to execute the task according to the task progress through the second plug-in process.

[0114] In some embodiments, the above step 262 is specifically implemented as step 262A:

[0115] Step 262A, when the first plug-in process runs abnormally, in response to the main control process, the memory data is written into the process memory of the second plug-in process through the inter-process communication framework, and based on the task progress indicated by the memory data, the task is continued to be executed according to the task progress through the second plug-in process.

[0116] In some embodiments, an inter-process communication framework is used to implement inter-process communication, and the main control process running in the terminal can write memory data into the process memory of the second plug-in process through the inter-process communication framework. In the event of an abnormal operation of the first plug-in process, the cloud server responds to the main control process writing memory data into the process memory of the second plug-in process through the inter-process communication framework, and based on the task progress indicated by the memory data, continues to execute the task through the second plug-in process according to the task progress.

[0117] In some embodiments, the inter-process communication framework includes a socket, which is used to allow different computer devices to perform inter-process communication through a network. In the event of an abnormal operation of the first plug-in process, the cloud server responds to the main control process and writes memory data into the process memory of the second plug-in process through the socket. Based on the task progress indicated by the memory data, the task is continued to be executed according to the task progress through the second plug-in process.

[0118] Specifically, the main control process writes the memory data into the socket of the terminal, and the socket transmits the memory data to the socket of the cloud server through a transmission medium connected to the network interface, so that the main control process writes the memory data into the process memory of the second plug-in process.

[0119] In this embodiment, in the event of an abnormal operation of the first plug-in process, the second plug-in process running in the cloud server can be restored to the memory data of the first plug-in process by the main control process, and continue to execute the task according to the task progress of the first plug-in process, thereby achieving data integrity between processes and continuity of task execution.

[0120] In some embodiments, the first plug-in process running in the cloud server also regularly refreshes the heartbeat table in the shared memory so that the main control process running in the terminal can detect whether the first plug-in process is running normally. The method further includes step 250. Step 250 can be performed after step 240, or synchronously with step 240.

[0121] Step 250: Refresh the heartbeat table in the shared memory through the first plug-in process according to the first cycle. The shared memory is the memory shared by the main control process and different plug-in processes. The heartbeat table is used to indicate whether the operation of the first plug-in process is abnormal.

[0122] The first cycle refers to a cycle in which the first plug-in process refreshes the heartbeat table in the shared memory.

[0123] Exemplarily, the first period may be set to 2 seconds (s).

[0124] Shared memory is the memory shared by the main control process and different plug-in processes.

[0125] Exemplarily, the shared memory is the memory shared by the main control process and different plug-in processes of the same task. Compared with the method of storing the memory data of the plug-in process in the shared memory in the related art, in this embodiment, the shared memory is only used to store and refresh the heartbeat table, and the memory data of the plug-in process may not be stored in the shared memory, but the memory data is stored in the database memory and the temporary memory of the main control process (specifically described in the embodiment of the main control process). This storage method of the memory data in this embodiment can avoid the situation where the memory data may be lost when the first plug-in process runs abnormally.

[0126] The heartbeat table is used to characterize whether the operation of the first plug-in process is abnormal. Specifically, a heartbeat timestamp is stored in the heartbeat table, and the heartbeat timestamp in the heartbeat table is used to characterize whether the operation of the first plug-in process is abnormal. A heartbeat timeout period can be set in advance. If the refresh duration of the heartbeat timestamp in the heartbeat table exceeds the heartbeat timeout period, it means that the first plug-in process has not continued to generate memory data and refresh the heartbeat table in time for a period of time, then it is determined that the operation of the first plug-in process is abnormal, and there may be a crash or forced closure.

[0127] Exemplarily, the first plug-in process in the cloud server refreshes the heartbeat table in the shared memory according to the first cycle, so that the main control process running in the terminal can detect whether the operation of the first plug-in process is normal based on the heartbeat table. When the operation of the first plug-in process is detected to be abnormal, the main control process can restore the memory data to the second plug-in process to achieve the continuity of task execution.

[0128] In this embodiment, the first plug-in process can refresh the heartbeat table in the shared memory so that the main control process can determine whether the first plug-in process runs normally, thereby realizing real-time detection of the operation of the first plug-in process by the main control process.

[0129] Figure 5 A flowchart of an inter-process communication method provided by an exemplary embodiment of the present application is shown, in which the method is applied to Figure 1 The terminal 120 shown is used as an example. A main control process is running in the terminal 120. The method includes steps 420, 440 and 460:

[0130] Step 420, sending a task command to the first plug-in process running in the cloud server through the main control process, and the first plug-in process is used to execute the task indicated by the task command.

[0131] The main control process is the process running in the terminal.

[0132] The task command is a command generated by the main control process based on the received task request.

[0133] Optionally, the task request carries task parameters, and the task parameters are used to indicate at least one of the task initiator, the task initiating client, the task type, the task requirements, and the required resources. The main control process running in the terminal receives the task request, and based on the task parameters carried in the task request, generates a task command, and the task command carries the task parameters. The terminal sends the task command to the first plug-in process running in the cloud server through the main control process, so as to transmit the task command to the first plug-in process running in the cloud server.

[0134] Optionally, the task type includes at least one of a data processing task and a multimedia task. The data processing task includes at least one of data calculation, statistics, addition, deletion, modification, and query. The multimedia task includes at least one of game live broadcast, translation, subtitles, and commentary. The task command also carries a task identifier (Task Id), which is determined based on at least one of an initiator identifier (User Id) of the task initiator and a client identifier (APP Id) of the task initiating client.

[0135] Several plug-in processes are running in the cloud server, and the first plug-in process is a plug-in process corresponding to a plug-in running in the cloud server for executing a task indicated by a task command.

[0136] Exemplarily, the terminal sends a task command to a first plug-in process running in the cloud server through the main control process, and the first plug-in process is used to execute the task indicated by the task command.

[0137] Optionally, the terminal stores the correspondence between tasks, plug-ins, and plug-in processes. After receiving the task request, the main control process in the terminal determines the first plug-in process to execute the task according to the task parameters in the task request, and the main control process carries the process identifier of the first plug-in process in the task command. Then, in response to receiving the task command transmitted by the main control process running in the terminal, the cloud server determines the first plug-in process corresponding to the process identifier carried in the task command, and executes the task indicated by the task command through the first plug-in process.

[0138] Optionally, the cloud server stores the correspondence between tasks and plug-ins and plug-in processes. The cloud server responds to receiving a task command transmitted by a main control process running in the terminal, determines the first plug-in process corresponding to the task indicated by the task command, and executes the task indicated by the task command through the first plug-in process.

[0139] In some embodiments, an inter-process communication framework is used to implement inter-process communication. The main control process running in the terminal can transmit the task command to the first plug-in process running in the cloud server through the inter-process communication framework. Among them, the inter-process communication (IPC) framework is a communication framework for transferring or exchanging data between different processes. The above-mentioned different processes may refer to different processes in the same computer device, or may refer to different processes of different computer devices. In this embodiment, the inter-process communication framework is used to implement data transfer between different processes on different computer devices (terminals and cloud servers in this embodiment).

[0140] Optionally, the inter-process communication framework includes a socket. Among them, a socket is an abstraction of an endpoint for two-way communication between processes of application programs on different computer devices in a network. A socket is an application programming interface (Application Programming Interface, API) for inter-process communication in a network, and is also a communication endpoint that can be named and addressed. Each socket in use has its type and a process connected to it. A socket is one end of process communication on a network, providing a mechanism for application processes to exchange data using network protocols. During inter-process communication, an application (main control process) writes the data and information to be transmitted into the socket of the computer device (terminal) where it is located. The socket transmits the above data and information to the socket of another computer device (cloud server) through a transmission medium connected to the network interface, so that the computer device can receive the above data and information.

[0141] Optionally, the socket includes at least one of a stream socket, a datagram socket and a raw socket. Exemplarily, the socket is used to allow different computer devices (the terminal and the cloud server in this embodiment) to communicate between processes through the network. Specifically, the socket is used to implement communication between the plug-in process and the main control process. The main control process running in the terminal transmits the task command to the first plug-in process running in the cloud server through the socket in the inter-process communication framework.

[0142] In this embodiment, the main control process running in the terminal transmits the task command to the first plug-in process running in the cloud server through the inter-process communication framework, rather than the main control process running in the terminal directly transmitting the task command to the first plug-in process running in the cloud server, which mainly has the following beneficial effects:

[0143] 1. Modularity: By separating the code and logic into different plug-ins, modularity can be achieved, so that each plug-in and different teams can develop, test and maintain independently, improving development efficiency; 2. Fault tolerance: If a plug-in or plug-in process has a problem, it will not affect the operation of other plug-ins and other plug-in processes, which improves the fault tolerance of the system. At the same time, if a plug-in or plug-in process needs to be updated or maintained, it will not affect the operation of other plug-ins and other plug-in processes. 3. Scalability: Through the inter-process communication framework, new plug-ins and plug-in processes can be easily added to implement new functions, which improves scalability.

[0144] In other embodiments, a message queue system is used to implement inter-process communication. A message queue is a container for storing messages during the transmission of messages. A message queue is a linked list of messages, stored in the kernel and identified by a message queue identifier.

[0145] Optionally, the message queue system includes at least one of an open source message middleware (RabbitMQ), an open source message system (ApacheKafka), and a simple queue service (in Amazon SQS). The main control process running in the terminal can transmit the task command to the first plug-in process running in the cloud server through the message queue system. Specifically, the main control process can create a message queue, send the data and information to be transmitted to the message queue, the first plug-in process opens the message queue, and receives the data and information that the main control process needs to transmit from the message queue. It should be noted that the first plug-in process can also create a message queue, send the data and information that need to be transmitted to the message queue, the main control process opens the message queue, and receives the data and information that the first plug-in process needs to transmit from the message queue.

[0146] In this embodiment, the main control process running in the terminal transmits the task command to the first plug-in process running in the cloud server through the message queue system, instead of the main control process running in the terminal directly transmitting the task command to the first plug-in process running in the cloud server. The message queue can exist independently of the process. Since the message queue is stored in the kernel, the life cycle of the message queue always exists with the kernel, which can avoid the loss of required transmission and information. The message queue can realize two-way communication between different processes. The message queue can also overcome the shortcomings of less signal transmission information, the pipeline can only carry unformatted byte streams, and the buffer size is limited. Therefore, the reliability and scalability of inter-process communication can be further improved.

[0147] In some embodiments, task processing of the plug-in process is implemented through task events. The main control process running in the terminal receives the task request, generates a task event based on the task parameters carried in the task request, and transmits the task event to the first plug-in process running in the cloud server, and the task event carries the task parameters. The cloud server responds to the task event transmitted by the main control process running in the terminal, and executes the task indicated by the task command through the first plug-in process. This embodiment can further improve the processing response speed and scalability of task data, and reduce resource consumption to a certain extent.

[0148] Step 440: The main control process receives memory data of the first plug-in process returned by the first plug-in process, where the memory data is used to indicate the task progress of the first plug-in process in executing the task.

[0149] The memory data refers to the data generated or used during the execution of the task by the first plug-in process. The memory data can be used to indicate the task progress of the first plug-in process in executing the task.

[0150] Optionally, the memory data includes at least one of task data of the first plug-in process, process status data, memory status data, a heartbeat timestamp, a task command to be executed, an executed task command, and an unexecuted task command.

[0151] Task data includes data directly related to the task. Taking multimedia tasks as an example, task data is multimedia data, including audio (game sound effects, player voice), video (game screen), subtitles and other multimedia content, streaming address and multimedia configuration information. Process status data includes the running status information of the first plug-in process, including whether the process is running, the CPU usage of the process, and at least one of the memory usage of the process.

[0152] The memory state data includes at least one of stack information, register state, global variables, and file descriptors. Among them, the heap is dynamically allocated memory, which is usually used to store objects and data dynamically created when the program is running. The stack is used to store information about local variables and function calls. If you want to restore to a specific function call state, you need to save the stack information. The register state is the state information corresponding to the register. The register is usually used to store the current execution position (program counter) of the program, the current top position of the stack (stack pointer), and the calculation result. The register state can be used to restore the execution state of the plug-in process. Global variables exist throughout the entire runtime, and the state of global variables may have a certain impact on the state and progress of the plug-in process. The file descriptor refers to the information about the state of the opened file or network connection (for example, the current read and write position) when the plug-in process opens a file or network connection at runtime.

[0153] The heartbeat timestamp is a signal that the first plug-in process periodically sends to the shared memory, which is used to indicate whether the operation of the first plug-in process is abnormal. Taking the multimedia task as a game live broadcast as an example, the task command includes at least one of a start live broadcast command, a stop live broadcast command, a subtitle add command, and an add commentary command.

[0154] Optionally, when the first plug-in process is executing a task, if the memory data of the first plug-in process is updated, the memory data of the first plug-in process is sent to the main control process through the first plug-in process. Correspondingly, the main control process receives the memory data of the first plug-in process returned by the first plug-in process.

[0155] Optionally, after receiving the memory data of the first plug-in process returned by the first plug-in process, the main control process also feeds back the execution status of the task command indicated in the memory data and / or the task data to the user account logged in to the terminal. Taking multimedia tasks as an example, the way of feeding back to the user account logged in to the terminal includes but is not limited to: playing multimedia content such as audio (game sound effects, player voice), video (game screen), subtitles, etc. in the memory data.

[0156] Step 460, in response to the abnormal operation of the first plug-in process, the main control process restores the memory data to the second plug-in process running in the cloud server, and the second plug-in process is used to continue to execute the task according to the task progress; wherein the second plug-in process and the first plug-in process are different plug-in processes.

[0157] There are several plug-in processes running in the cloud server. When the first plug-in process runs abnormally, the second plug-in process is the plug-in process in the cloud server for continuing to execute the task.

[0158] Optionally, the second plug-in process and the first plug-in process are different plug-in processes. The second plug-in process and the first plug-in process are different plug-in processes corresponding to the same type of plug-in, and both the first plug-in process and the second plug-in process can complete the tasks required to be performed by the plug-in of this type.

[0159] Exemplarily, the main control process running in the terminal is also used to detect whether the first plug-in process is running abnormally. In response to the abnormal operation of the first plug-in process, the terminal restores the memory data to the second plug-in process running in the cloud server by the main control process, and the second plug-in process is used to continue to execute the task according to the task schedule. Wherein, recovery means that the main control process writes the memory data into the plug-in memory of the second plug-in process, and the second plug-in process is used to continue to execute the task according to the task schedule.

[0160] In summary, the inter-process communication method provided by the embodiment of the present application is executed by a terminal, and a main control process is running in the terminal. The terminal sends a task command to the first plug-in process running in the cloud server through the main control process, and the first plug-in process is used to execute the task indicated by the task command; the main control process receives the memory data of the first plug-in process returned by the first plug-in process, and the memory data is used to indicate the task progress of the first plug-in process in executing the task; in response to the operation abnormality of the first plug-in process, the main control process restores the memory data to the second plug-in process running in the cloud server, and the second plug-in process is used to continue to execute the task according to the task progress; wherein the second plug-in process and the first plug-in process are different plug-in processes. Accordingly, the first plug-in process and the second plug-in process are different plug-in processes of the same type of plug-in, and the two have an associated relationship and can be controlled by the main control process. In the event that the first plug-in process used to execute tasks in the cloud server runs abnormally, the main control process can newly start a second plug-in process so that the second plug-in process can continue to execute the tasks executed by the first plug-in process, and the main control process can restore the newly started second plug-in process to the memory data of the first plug-in process, which can ensure the memory consistency of inter-process communication, help prevent memory data loss, ensure the stability of task execution between processes, and achieve continuity of task execution between processes and data integrity.

[0161] In some embodiments, after step 440, the method further includes step 450:

[0162] In step 450, the main control process writes the memory data into the temporary memory of the main control process, and synchronizes the memory data in the temporary memory to the database memory in real time.

[0163] Temporary memory refers to the process memory of the main control process. Database memory refers to the memory of the database.

[0164] Optionally, the database may be at least one of a Redis database and a distributed database.

[0165] Exemplarily, the main control process receives the memory data of the first plug-in process returned by the first plug-in process, and the main control process also writes the memory data into the temporary memory of the main control process, and synchronizes the memory data in the temporary memory to the database memory in real time. Optionally, in the database memory, the memory data is stored correspondingly to the process identifier of the first plug-in process.

[0166] The method of this embodiment is equivalent to allowing the first plug-in process to operate the temporary memory of the main control process and the database memory of the database as if operating its own process memory, thereby achieving memory consistency. This is beneficial to preventing memory data loss, ensuring the stability of task execution and data integrity, and is beneficial to achieving higher scalability and stronger data persistence of plug-ins and plug-in processes.

[0167] Figure 6 A flowchart of an inter-process communication method provided by an exemplary embodiment of the present application is shown. In some embodiments, based on the main control process synchronizing the memory data to the database memory in real time, the above step 460 specifically includes step 462 and step 464:

[0168] Step 462: In response to the abnormal operation of the first plug-in process, the main control process retrieves the memory data from the database memory.

[0169] The main control process has a data retrieval function and can retrieve memory data corresponding to the first plug-in process from the database memory. Specifically, in response to the abnormal operation of the first plug-in process, the terminal retrieves the memory data from the database memory by the main control process. Optionally, in the database memory, the memory data is stored in correspondence with the process identifier of the first plug-in process, and the main control process can retrieve the memory data of the first plug-in process corresponding to the process identifier from the database memory according to the process identifier of the first plug-in process.

[0170] In some embodiments, the main control process determines whether the operation of the first plug-in process is abnormal based on the heartbeat table in the shared memory. Or, when the operation of the first plug-in process is abnormal, the cloud server sends an abnormal notification message to the terminal, and the terminal determines that the operation of the first plug-in process is abnormal when receiving the abnormal notification message.

[0171] Step 464: The main control process restores the retrieved memory data to the second plug-in process.

[0172] The main control process running in the terminal has the function of writing memory data into the process memory of the second plug-in process running in the cloud server. Specifically, the main control process restores the memory data of the first plug-in process retrieved from the database memory to the second plug-in process.

[0173] In this embodiment, the main control process can retrieve the memory data of the first plug-in process from the database memory and restore the memory data to the second plug-in process, thereby achieving data integrity between processes and continuity of task execution.

[0174] In some embodiments, after step 420 and before step 460, the method further includes step 520. Step 520 may be performed after step 440, or simultaneously with step 440, or after step 440 and before step 450, or simultaneously with step 450, or after step 450. It only needs to be performed after step 420 and before step 460.

[0175] Step 520, through the main control process, according to the second cycle, check the heartbeat table in the shared memory, the shared memory is the memory shared by the main control process and different plug-in processes, and the heartbeat table is used to indicate whether the operation of the first plug-in process is abnormal.

[0176] The second cycle refers to the cycle in which the main control process detects the heartbeat table of the first plug-in process in the shared memory.

[0177] Exemplarily, the second period may be set to 5 seconds (s).

[0178] Shared memory is the memory shared by the main control process and different plug-in processes.

[0179] Exemplarily, the shared memory is a memory shared by the main control process and different plug-in processes of the same task. Compared with the method of storing the memory data of the plug-in process in the shared memory in the related art, in this embodiment, the shared memory is only used to store and refresh the heartbeat table, and the memory data of the plug-in process may not be stored in the shared memory, but the memory data is stored in the database memory and the temporary memory of the main control process. Specifically, the main control process writes the memory data into the temporary memory of the main control process, and synchronizes the memory data in the temporary memory to the database memory in real time. This storage method of memory data in this embodiment can avoid the situation where memory data may be lost when the first plug-in process runs abnormally.

[0180] The heartbeat table is used to indicate whether the operation of the first plug-in process is abnormal.

[0181] Exemplarily, the terminal checks the heartbeat table in the shared memory according to the second cycle through the main control process. In some embodiments, the heartbeat table includes a heartbeat timestamp. When the refresh duration of the heartbeat timestamp in the heartbeat table exceeds the heartbeat timeout period, the main control process determines that the operation of the first plug-in process is abnormal.

[0182] The refresh duration refers to the duration between two consecutive refresh heartbeat timestamps, and the heartbeat timeout duration is the set duration threshold. If the heartbeat timestamp of the plug-in process is not refreshed in the heartbeat table within the heartbeat timeout duration, the main control process believes that the first plug-in process is running abnormally at this time, and may crash or be forcibly closed.

[0183] In this embodiment, the main control process can regularly check the heartbeat table in the shared memory to ensure the healthy operation of the first plug-in process, and can promptly detect whether the operation of the first plug-in process is abnormal, so that the main control process can promptly handle the abnormality and ensure that the system can continue to provide services.

[0184] In some embodiments, in addition to the main control process detecting whether the operation of the first plug-in process is abnormal and managing the plug-in process running in the cloud server, container technology can also be used to manage the plug-in process. This embodiment helps to improve the deployment and management efficiency of the plug-in process, and can also use container technology to improve availability.

[0185] As an example, the method of this embodiment is applied to a game live broadcast task scenario.

[0186] Figure 7 FIG. 1 is a schematic diagram showing a game live broadcast screen provided by an exemplary embodiment of the present application. Figure 7 Instructions in Fig.10 As shown, in a game client based on a virtual world, a user account can initiate a game live broadcast task in the game client and select the live broadcast platform 12. The plug-in processes of each live broadcast plug-in in the live broadcast platform 12 run in the cloud server, which is equivalent to migrating the real-time recording and live broadcast functions of the game screen to the cloud server, reducing the performance pressure of the game client and improving the live broadcast quality and stability. The game client can also flexibly select plug-ins to start the corresponding plug-in process, for example: start the plug-in process of translation, multi-language subtitles, artificial intelligence (AI) commentary and other functions. Figure 7 As shown in the schematic diagram 20 in FIG. 1 , when the game live broadcast ends, the live broadcast end information 22 can be displayed to prompt the user account that the game live broadcast task is over, which can effectively improve the user's gaming experience for the game live broadcast.

[0187] In the game live broadcast task scenario, the task is a game live broadcast task, the task command is a game live broadcast task command, the plug-in process is a live broadcast plug-in process, the first plug-in process is a first live broadcast plug-in process, the second plug-in process is a second live broadcast plug-in process, and the main control process is a game client. Among them, the live broadcast plug-in process, the first live broadcast plug-in process, and the second live broadcast plug-in process run in the cloud server, and the game client runs in the local terminal.

[0188] On the one hand, the inter-process communication method provided in the embodiment of the present application can be executed by a cloud server, in which several live broadcast plug-in processes are running, wherein the several live broadcast plug-in processes may include a first live broadcast plug-in process and a second live broadcast plug-in process, and the first live broadcast plug-in process and the second live broadcast plug-in process may be different live broadcast plug-in processes of the same live broadcast plug-in.

[0189] Specifically, in response to receiving a game live task command transmitted by a game client running in a terminal, the cloud server executes the game live task indicated by the game live task command through the first live plug-in process; sends the memory data of the first live plug-in process to the game live client through the first live plug-in process, and the memory data is used to indicate the progress of the game live task executed by the first live plug-in process; optionally, based on the socket of the IPC framework, the memory data of the first live plug-in process is sent to the game live client through the first live plug-in process; in the case of abnormal operation of the first live plug-in process, in response to the game client, the memory data is restored to the second live plug-in process, and the game live task is continued to be executed according to the progress of the game live task through the second live plug-in process. Accordingly, the integrity of the memory data of the game live task and the continuous execution of the game live task can be achieved.

[0190] On the other hand, the inter-process communication method provided in the embodiment of the present application can be executed by a terminal, in which a game client is running, and a user account can initiate a game live broadcast task in the game client.

[0191] Specifically, the terminal sends a game live task command to the first live plug-in process running in the cloud server through the game client, and the first live plug-in process is used to execute the game live task indicated by the game live task command; the game client receives the memory data of the first live plug-in process returned by the first live plug-in process, and the memory data is used to indicate the game live task progress of the first live plug-in process in executing the game live task; optionally, the game client also displays the game live video, audio and other data contained in the memory data to the user account; in response to the abnormal operation of the first live plug-in process, the game client restores the memory data to the second live plug-in process running in the cloud server, and the second live plug-in process is used to continue to execute the game live task according to the progress of the game live task; optionally, the game client restores the memory data to the second live plug-in process running in the cloud server based on the socket of the IPC framework; wherein the second live plug-in process and the first live plug-in process are different live plug-in processes. Accordingly, the integrity of the memory data of the game live task and the continuous execution of the game live task can be achieved.

[0192] Next, the overall architecture of the method of this embodiment is described.

[0193] Figure 8 The architecture diagram of the inter-process communication method provided by an exemplary embodiment of the present application is shown. The architecture 30 of the inter-process communication method involves a Redis database 31, a plugin manager client 32, a shared memory 33, a custom plugin system 34, and an IPC framework 35.

[0194] The Redis database 31 is located in the cloud server and is used to store the memory data of the plug-in process.

[0195] The plug-in management client 32 is located in the local terminal and is used to control and manage the plug-in process. According to the task type, for example, game live broadcast, adding subtitles and other multimedia tasks, a matching plug-in process is selected to perform task processing. It is also used to manage the plug-in process and discover the abnormality of the plug-in process, and restore the memory data of the plug-in process.

[0196] The shared memory 33 is used to store the heartbeat table of the plug-in process, which can be used to detect whether the operation of the plug-in process is abnormal. The plug-in process periodically refreshes the heartbeat table in the shared memory 33, and the plug-in management client 32 periodically checks the heartbeat table in the shared memory to detect the health status of the plug-in process. When it is detected that the plug-in process is running abnormally or crashes, a new plug-in process is pulled up, and the memory data of the previous plug-in process retrieved from the database memory 31 of the Redis database is restored to the plug-in process.

[0197] The IPC framework 35 uses sockets, which allow processes on different computers to communicate over the network, facilitating subsequent distributed deployment. Sockets provide a connection-oriented communication method with reliability, ensuring orderly data transmission and error recovery.

[0198] The custom plug-in system 34 can flexibly access at least one of the live broadcast plug-in, translation plug-in, subtitle plug-in, and commentary plug-in, and can replicate the distribution of audio and video data, stream event control, plug-in management, and provide audio and video function support.

[0199] Next, the steps of the method of this embodiment are described.

[0200] Fig. 9 An interaction diagram of an inter-process communication method provided by an exemplary embodiment of the present application is shown. Fig. 9 It includes an IPC framework 40, a plug-in process 50, a Redis database 60, a shared memory 70, and a main control process 80. The main control process 80 runs in a local terminal, and a game client (Client) can be used to provide the main control process 80. The plug-in process 50, the Redis database 60, and the shared memory 70 are located in a cloud server, and several plug-in processes 50 can run in the cloud server. The steps are briefly described as follows:

[0201] 1. After receiving the game live broadcast task, the main control process 80 determines the plug-in process 50 (first plug-in process) to execute the game live broadcast task according to the task parameters, where the task parameters include at least one of the task type, task requirements, and required resources; creates a Task ID and generates a task command according to the User ID and the App ID; the task command can be at least one of a game live broadcast command, an AI commentary command, and a subtitle addition command;

[0202] 2. The main control process 80 transmits the task command to the plug-in process 50 through the IPC40 framework;

[0203] 3. The plug-in process 50 receives the task command and executes the game live broadcast task indicated by the task command;

[0204] 4. When the memory data of the plug-in process 50, such as the task data, process status data, heartbeat timestamp, and execution status of the task command, is updated, the plug-in process 50 sends the memory data to the main control process 80; and step 9 is executed at the same time;

[0205] 5. The plug-in process 50 sends the memory data to the main control process 80 in real time through the IPC framework 40;

[0206] 6. The main control process 80 returns the result of the game live broadcast task execution to the user account, and writes the memory data of the plug-in process 50 into the temporary memory of the main control process 80 itself;

[0207] 7. The main control process 80 synchronizes the memory data to the database memory of the Redis database 60 in real time;

[0208] 8. The Redis database 60 returns the result of the data storage operation to the main control process 80;

[0209] 9. The plug-in process 50 refreshes the heartbeat table in the shared memory 70 periodically (for example, every 2 seconds);

[0210] 10. The main control process 80 periodically (for example, every 5 seconds) checks the heartbeat table in the shared memory 70 to detect the health status of the plug-in process 50; when the refresh time of the heartbeat table of the plug-in process 50 exceeds the heartbeat timeout time and exceeds a certain number of times, the main control process 80 determines that the plug-in process 50 has crashed;

[0211] 11. The main control process 80 retrieves the memory data of the plug-in process 50 from the database memory of the Redis database 60;

[0212] 12. The Redis database 60 sends the memory data to the main control process 80;

[0213] 13. The main control process 80 starts a new plug-in process 50 (a second plug-in process) and restores the retrieved memory data to the new plug-in process 50;

[0214] 14. The new plug-in process 50 continues to execute the previous game live broadcast task.

[0215] In summary, the inter-process communication method provided in the embodiment of the present application has at least the following beneficial effects:

[0216] 1. Memory consistency: By allowing the plug-in process to operate the process memory (client memory) of the main control process (client) and the Redis database memory as if it were operating its own process memory, memory consistency is achieved, which helps prevent memory data loss and ensures the stability of task execution between processes.

[0217] 2. Data backup: When a plug-in process fails, the main control process can start a new plug-in process and restore the memory data of the previous plug-in process to ensure the continuity of task execution between processes.

[0218] 3. High availability: The main control process regularly checks the heartbeat table in the shared memory to achieve real-time detection of the plug-in process, which is conducive to timely discovery and handling of problems with the plug-in process and improves system availability.

[0219] Fig.10 A block diagram of an inter-process communication device 600 provided by an exemplary embodiment of the present application is shown. The inter-process communication device 600 is used to implement a cloud server, and the cloud server runs a plurality of plug-in processes; the inter-process communication device 600 includes:

[0220] An execution module 610 is used for executing the task indicated by the task command through the first plug-in process in response to receiving the task command transmitted by the main control process running in the terminal;

[0221] A sending module 620, configured to send memory data of the first plug-in process to the main control process through the first plug-in process, wherein the memory data is used to indicate a task progress of the first plug-in process in executing the task;

[0222] The execution module 610 is used for, in the case where the operation of the first plug-in process is abnormal, responding to the main control process to restore the memory data to the second plug-in process, and continuing to execute the task according to the task progress through the second plug-in process;

[0223] The second plug-in process and the first plug-in process are different plug-in processes.

[0224] In some embodiments, the execution module 610 is used to, in the event of an abnormal operation of the first plug-in process, respond to the main control process writing the memory data into the process memory of the second plug-in process, and based on the task progress indicated by the memory data, continue to execute the task through the second plug-in process according to the task progress.

[0225] In some embodiments, the execution module 610 is used to respond to the main control process and, in the event of an abnormal operation of the first plug-in process, write the memory data into the process memory of the second plug-in process through the inter-process communication framework, and based on the task progress indicated by the memory data, continue to execute the task according to the task progress through the second plug-in process.

[0226] In some embodiments, the inter-process communication framework includes a socket, which is used to allow different computer devices to perform inter-process communication through a network; the execution module 610 is used to respond to the main control process in the event of an abnormal operation of the first plug-in process, write the memory data into the process memory of the second plug-in process through the socket, and based on the task progress indicated by the memory data, continue to execute the task according to the task progress through the second plug-in process.

[0227] In some embodiments, the device also includes a refresh module; the refresh module is used to refresh the heartbeat table in the shared memory through the first plug-in process according to a first cycle, the shared memory is a memory shared by the main control process and different plug-in processes, and the heartbeat table is used to indicate whether the operation of the first plug-in process is abnormal.

[0228] Fig.11 A block diagram of an inter-process communication device 800 provided by an exemplary embodiment of the present application is shown. The inter-process communication device 800 is used to implement a terminal in which a main control process is running; the inter-process communication device 800 includes:

[0229] A sending module 810 is used to send a task command to a first plug-in process running in the cloud server through the main control process, and the first plug-in process is used to execute the task indicated by the task command;

[0230] A receiving module 820 is configured to receive, by the main control process, memory data of the first plug-in process returned by the first plug-in process, wherein the memory data is used to indicate a task progress of the first plug-in process in executing the task;

[0231] A recovery module 830, configured to, in response to an operation abnormality of the first plug-in process, cause the main control process to restore the memory data to a second plug-in process running in the cloud server, and the second plug-in process is configured to continue to execute the task according to the task progress;

[0232] The second plug-in process and the first plug-in process are different plug-in processes.

[0233] In some embodiments, the recovery module 830 is used to retrieve the memory data from the database memory by the main control process in response to an operational abnormality of the first plug-in process; and restore the retrieved memory data to the second plug-in process by the main control process.

[0234] In some embodiments, the device also includes a writing module; the writing module is used by the main control process to write the memory data into the temporary memory of the main control process, and synchronize the memory data in the temporary memory to the database memory in real time.

[0235] In some embodiments, the device also includes a checking module; the checking module is used to check the heartbeat table in the shared memory through the main control process according to the second cycle, the shared memory is the memory shared by the main control process and different plug-in processes, and the heartbeat table is used to indicate whether the operation of the first plug-in process is abnormal.

[0236] In some embodiments, the heartbeat table includes a heartbeat timestamp; the checking module is also used to determine, by the main control process, that the operation of the first plug-in process is abnormal when the refresh duration of the heartbeat timestamp in the heartbeat table exceeds the heartbeat timeout period.

[0237] It should be noted that the specific limitations in the embodiments of the one or more inter-process communication devices provided above can refer to the limitations of the inter-process communication method above, and will not be repeated here. Each module of the above-mentioned device can be implemented in whole or in part by software, hardware, and a combination thereof. Each module can be embedded in or independent of the processor of the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0238] An embodiment of the present application also provides a computer device, which includes: a processor and a memory, wherein a computer program is stored in the memory; and the processor is used to execute the computer program in the memory to implement the inter-process communication method provided by the above-mentioned method embodiments.

[0239] For example, Fig.12 1 is a structural block diagram of a computer device 1000 provided by an exemplary embodiment of the present application. Optionally, the computer device 1000 is a server 1000.

[0240] Typically, the server 1000 includes: a processor 1001 and a memory 1002 .

[0241] The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1001 may be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 1001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1001 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1001 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0242] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1002 is used to store at least one instruction, which is used to be executed by the processor 1001 to implement the inter-process communication method provided in the method embodiment of the present application.

[0243] In some embodiments, the server 1000 may also optionally include: an input interface 1003 and an output interface 1004. The processor 1001, the memory 1002, the input interface 1003, and the output interface 1004 may be connected via a bus or a signal line. Each peripheral device may be connected to the input interface 1003 and the output interface 1004 via a bus, a signal line, or a circuit board. The input interface 1003 and the output interface 1004 may be used to connect at least one peripheral device related to input / output (I / O) to the processor 1001 and the memory 1002. In some embodiments, the processor 1001, the memory 1002, the input interface 1003, and the output interface 1004 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1001, the memory 1002, the input interface 1003, and the output interface 1004 may be implemented on a separate chip or circuit board, which is not limited in the embodiments of the present application.

[0244] Those skilled in the art will understand that Fig.12 The structure shown in the figure does not constitute a limitation on the computer device 1000, and the computer device 1000 may include more or less components than those shown in the figure, or combine some components, or adopt a different arrangement of components.

[0245] In some embodiments, the present application provides a chip, which includes a programmable logic circuit and / or program instructions. When the chip runs on a computer device, it is used to implement the inter-process communication method provided by the above method embodiment.

[0246] In some embodiments, the present application provides a computer-readable storage medium storing a computer program, which is loaded and executed by a processor to implement the inter-process communication method provided by the above method embodiment.

[0247] In some embodiments, the present application provides a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. The 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 processor of the computer device loads and executes to implement the inter-process communication method provided in the above method embodiment.

[0248] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0249] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned computer-readable storage medium may be a read-only memory, a disk or an optical disk, etc.

[0250] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0251] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for communication between processes, characterized in that: The method is executed by a cloud server, and a plurality of plug-in processes are running in the cloud server; the method includes: In response to receiving a task command transmitted by the main control process running in the terminal, executing the task indicated by the task command through the first plug-in process; Sending memory data of the first plug-in process to the main control process through the first plug-in process, where the memory data is used to indicate the task progress of the first plug-in process in executing the task; In the case of an abnormal operation of the first plug-in process, in response to the main control process restoring the memory data to the second plug-in process, the task is continued to be executed according to the task progress through the second plug-in process; The second plug-in process and the first plug-in process are different plug-in processes.

2. The method according to claim 1, characterized in that In the case where the first plug-in process runs abnormally, in response to the main control process restoring the memory data to the second plug-in process, and continuing to execute the task according to the task progress through the second plug-in process, comprises: In the event of an abnormal operation of the first plug-in process, in response to the main control process writing the memory data into the process memory of the second plug-in process, based on the task progress indicated by the memory data, the task is continued to be executed according to the task progress through the second plug-in process.

3. The method according to claim 2, characterized in that In the case where the first plug-in process runs abnormally, in response to the main control process writing the memory data into the process memory of the second plug-in process, based on the task progress indicated by the memory data, the task is continued to be executed according to the task progress through the second plug-in process, including: In the event of an abnormal operation of the first plug-in process, in response to the main control process, the memory data is written into the process memory of the second plug-in process through the inter-process communication framework, and based on the task progress indicated by the memory data, the task is continued to be executed according to the task progress through the second plug-in process.

4. The method according to claim 3, characterized in that The inter-process communication framework includes a socket, and the socket is used to allow different computer devices to perform inter-process communication through a network; In the case where the first plug-in process runs abnormally, in response to the main control process, writing the memory data into the process memory of the second plug-in process through the inter-process communication framework, and based on the task progress indicated by the memory data, continuing to execute the task according to the task progress through the second plug-in process, including: In the event of an abnormal operation of the first plug-in process, in response to the main control process, the memory data is written into the process memory of the second plug-in process through the socket, and based on the task progress indicated by the memory data, the task is continued to be executed according to the task progress through the second plug-in process.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The heartbeat table in the shared memory is refreshed according to a first cycle through the first plug-in process, wherein the shared memory is a memory shared by the main control process and different plug-in processes, and the heartbeat table is used to indicate whether the operation of the first plug-in process is abnormal.

6. A method for communication between processes, characterized in that: The method is executed by a terminal, in which a main control process is running; the method comprises: Sending a task command to a first plug-in process running in the cloud server through the main control process, wherein the first plug-in process is used to execute the task indicated by the task command; The main control process receives memory data of the first plug-in process returned by the first plug-in process, where the memory data is used to indicate the task progress of the first plug-in process in executing the task; In response to the operation abnormality of the first plug-in process, the main control process restores the memory data to the second plug-in process running in the cloud server, and the second plug-in process is used to continue to execute the task according to the task progress; The second plug-in process and the first plug-in process are different plug-in processes.

7. The method according to claim 6, characterized in that In response to the abnormal operation of the first plug-in process, the main control process restores the memory data to the second plug-in process running in the cloud server, including: In response to the operation abnormality of the first plug-in process, the main control process retrieves the memory data from the database memory; The main control process restores the retrieved memory data to the second plug-in process.

8. The method according to claim 7, characterized in that After the main control process receives the memory data of the first plug-in process returned by the first plug-in process, the method further includes: The main control process writes the memory data into the temporary memory of the main control process, and synchronizes the memory data in the temporary memory to the database memory in real time.

9. The method according to any one of claims 6 to 8, characterized in that: The method further comprises: The main control process checks the heartbeat table in the shared memory according to the second cycle. The shared memory is a memory shared by the main control process and different plug-in processes. The heartbeat table is used to indicate whether the operation of the first plug-in process is abnormal.

10. The method according to claim 9, characterized in that The heartbeat table includes a heartbeat timestamp, and the method further includes: When the refresh duration of the heartbeat timestamp in the heartbeat table exceeds the heartbeat timeout period, the main control process determines that the operation of the first plug-in process is abnormal.

11. An inter-process communication device, characterized in that: The device is used to implement a cloud server, and the cloud server runs a plurality of plug-in processes; the device includes: an execution module, configured to execute the task indicated by the task command through the first plug-in process in response to receiving the task command transmitted by the main control process running in the terminal; A sending module, used for sending memory data of the first plug-in process to the main control process through the first plug-in process, wherein the memory data is used for indicating the task progress of the first plug-in process in executing the task; The execution module is used for, in the case of abnormal operation of the first plug-in process, responding to the main control process to restore the memory data to the second plug-in process, and continuing to execute the task according to the task progress through the second plug-in process; The second plug-in process and the first plug-in process are different plug-in processes.

12. An inter-process communication device, characterized in that: The device is used to implement a terminal, in which a main control process runs; the device includes: A sending module, used to send a task command to a first plug-in process running in the cloud server through the main control process, and the first plug-in process is used to execute the task indicated by the task command; a receiving module, configured to receive, by the main control process, memory data of the first plug-in process returned by the first plug-in process, wherein the memory data is used to indicate a task progress of the first plug-in process in executing the task; A recovery module, configured to, in response to an operation abnormality of the first plug-in process, cause the main control process to restore the memory data to a second plug-in process running in the cloud server, wherein the second plug-in process is configured to continue to execute the task according to the task progress; The second plug-in process and the first plug-in process are different plug-in processes.

13. A computer device, characterized in that: The computer device comprises: a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the inter-process communication method according to any one of claims 1 to 10.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is loaded and executed by a processor to implement the inter-process communication method according to any one of claims 1 to 10.

15. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. The processor obtains the computer instructions from the computer-readable storage medium, so that the processor loads and executes them to implement the inter-process communication method as described in any one of claims 1 to 10.