Multi-process-based service processing method and device, equipment and storage medium

CN114968501BActive Publication Date: 2026-09-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110191909.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-19
Publication Date
2026-09-18
Estimated Expiration
2041-02-19

AI Technical Summary

Technical Problem

[0003]继续以上述支付设备为例,相关技术中,经常出现支付设备在目标业务未全部完成初始化时已显示可用状态,导致目标业务的可用性不高

Benefits of technology

在本申请实施例中,在多进程场景下执行目标业务时,首先向各个进程分别发送初始化任务,之后再向各个进程分别发送用于提示初始化任务已启动的显示任务;进一步地,响应于初始化任务已完成,随即向各个进程发送用于提示初始化任务已完成的显示任务;其中,各个进程用于同步执行接收到的任务。采用上述方法实现了各个进程在执行初始化任务时的状态统一,并在初始化任务启动和完成时均显示相应的提示内容,一方面能够有效提示用户,另一方面在初始化任务在未完成时,目标业务处于不可用状态,保证了目标业务在全部完成初始化时才显示可用状态,提高了目标业务的可用性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968501B_ABST
    Figure CN114968501B_ABST
Patent Text Reader

Abstract

The application provides a multi-process-based service processing method and device, equipment and a storage medium, and belongs to the technical field of computers. When a target service is executed in a multi-process scenario, an initialization task is first sent to each process, and then a display task prompting that the initialization task has started is sent to each process; further, in response to the completion of the initialization task, a display task prompting that the initialization task has been completed is sent to each process; wherein each process is used to synchronously execute the received task. The above method realizes the state uniformity of each process when executing the initialization task, and displays the corresponding prompt content when the initialization task is started and completed, which can effectively prompt the user on the one hand, and on the other hand, when the initialization task is not completed, the target service is in an unusable state, which ensures that the target service displays an available state only when all the initialization is completed, and improves the availability of the target service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a business processing method, apparatus, device and storage medium based on multi-process. Background Technology

[0002] With the rapid development of computer and internet technologies, more and more devices are able to connect to networks, enabling ubiquitous connectivity between things and between things and people. Take a payment device with dual displays as an example. This type of device has two back-to-back displays, one facing the merchant and the other the customer. These two displays can initiate the target transaction based on the payment method selected by the merchant or customer.

[0003] Continuing with the example of the aforementioned payment device, in related technologies, it frequently occurs that the payment device displays an available status before the target service has fully completed initialization, resulting in low availability of the target service. Therefore, how to process the service to ensure its availability has become a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] This application provides a multi-process-based business processing method, apparatus, device, and storage medium, which can unify the initialization state of multiple processes and ensure the availability of the target service. The technical solution is as follows: On the one hand, a multi-process-based business processing method is provided, which includes: In response to receiving the execution instruction of the target service, an initialization task is sent to a first process and at least one second process respectively, and a first display task is sent to the first process and at least one second process respectively; wherein, the first process and the second process are used to execute the received task synchronously, and the first display task is used to indicate that a first prompt message that the initialization task has been started is displayed on the first interface; In response to the completion of the initialization task, a second display task is sent to the first process and at least one of the second processes respectively to start executing the target service; the second display task is used to indicate that a second prompt message indicating that the initialization task has been completed is displayed on the second interface.

[0005] On the other hand, a multi-process-based business processing device is provided, the device comprising: The first sending module is configured to, in response to receiving the execution instruction of the target service, send an initialization task to a first process and at least one second process respectively, and send a first display task to the first process and at least one second process respectively; wherein the first process and the second process are configured to execute the received task synchronously, and the first display task is configured to indicate that a first prompt message indicating that the initialization task has been started is displayed on the first interface; The second sending module is used to send a second display task to the first process and at least one of the second processes respectively in response to the completion of the initialization task, and to start executing the target service; the second display task is used to indicate that a second prompt message indicating that the initialization task has been completed is displayed on the second interface.

[0006] In one alternative implementation, the second transmitting unit is used for: In response to receiving the second scheduling request, the scheduling interface management module sends the first display task to the first process and at least one of the second processes respectively through the inter-process communication module; The interface management module is used to manage the interface display of this initialization task.

[0007] In one alternative implementation, the second sending module includes: The acquisition unit is used to, in response to receiving a third scheduling request sent by the initialization startup module, schedule the state management module in the first process to acquire at least one initialization result of the initialization task; The third sending unit is used to send the second display task to the first process and at least one of the second processes respectively through the interface management module in response to the initialization result meeting the first condition, wherein the first condition means that the number of initialization results is equal to the target threshold, and there are no failed items in any of the initialization results; The initialization startup module is used to start the business logic of the initialization task, and the interface management module is used to manage the interface display of the initialization task.

[0008] In one alternative implementation, the device further includes: The third sending module is used to send a third display task to the first process and at least one of the second processes respectively in response to the failure of the initialization task; wherein the third display task is used to instruct the display of a third prompt message indicating that the initialization task has failed on the third interface.

[0009] In one alternative implementation, the third sending module includes any of the following: The fourth sending unit is configured to, in response to at least one initialization result of the initialization task meeting the second condition, send the third display task to the first process and at least one of the second processes respectively through the interface management module; wherein, the second condition means that the number of initialization results is equal to the target threshold, and at least one of the initialization results contains a failure item; The fifth sending unit is used to send the third display task to the first process and at least one of the second processes respectively through the interface management module in response to the detection of a target event; wherein, the target event refers to the startup duration of the initialization task being equal to the target duration; The interface management module is used to manage the interface display of this initialization task.

[0010] In one alternative implementation, the first sending module is used to: The message management module sends the first display task to the listening module of the first process and to at least one listening module of the second process. The first display task is used to instruct the listening module to call the interface display module to display the first interface.

[0011] In one alternative implementation, the device further includes any of the following: The fourth sending module is used to send the second display task to the listening module of the first process through the message management module, and to send the second display task to at least one listening module of the second process; wherein the second display task is used to instruct the listening module to call the interface display module to display the second interface; The fifth sending module is used to send the third display task to the listening module of the first process and to at least one listening module of the second process through the message management module; wherein the third display task is used to instruct the listening module to call the interface display module to display the third interface.

[0012] On the other hand, a computer device is provided, which includes a processor and a memory for storing at least one computer program, which is loaded and executed by the processor to perform the operations performed in the multi-process-based business processing method in the embodiments of this application.

[0013] On the other hand, a computer-readable storage medium is provided that stores at least one computer program, which is loaded and executed by a processor to perform operations as performed in the multi-process-based business processing method in the embodiments of this application.

[0014] On the other hand, a computer program product or computer program is provided, which includes computer program code stored in a computer-readable storage medium. A processor of a computer device reads the computer program code from the computer-readable storage medium and executes the computer program code, causing the computer device to perform the multi-process-based business processing method provided in the various optional implementations described above.

[0015] The beneficial effects of the technical solutions provided in this application are: In this embodiment, when executing the target service in a multi-process scenario, an initialization task is first sent to each process, followed by a display task indicating that the initialization task has started. Furthermore, in response to the completion of the initialization task, a display task indicating that the initialization task is complete is sent to each process. Each process synchronously executes the received task. This method ensures unified state for each process during initialization task execution and displays corresponding prompts upon task start and completion. This effectively alerts the user and ensures that the target service remains unavailable until all initialization tasks are complete, thus improving its availability. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram of the implementation environment of the multi-process-based business processing method provided in the embodiments of this application; Figure 2 This is a flowchart of a multi-process-based business processing method provided according to an embodiment of this application; Figure 3 This is a flowchart of another multi-process-based business processing method provided according to an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a target application client according to an embodiment of this application; Figure 5 This is a schematic diagram of a first interface provided according to an embodiment of this application; Figure 6 This is a schematic diagram of a second interface provided according to an embodiment of this application; Figure 7 This is a flowchart of another multi-process-based business processing method provided according to an embodiment of this application; Figure 8 This is a schematic diagram of the structure of a multi-process-based business processing device according to an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a terminal according to an embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0019] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0020] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items that have essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or execution order. It should also be understood that although the following description uses the terms "first," "second," etc., to describe various elements, these elements should not be limited by the terms.

[0021] These terms are simply used to distinguish one element from another. For example, without departing from the various examples, a first process can be referred to as a second process, and similarly, a second process can be referred to as a first process. Both the first and second processes can be processes, and in some cases, they can be separate and distinct processes.

[0022] "At least one" refers to one or more processes. For example, at least one process can be one process, two processes, three processes, or any integer number of processes greater than or equal to one. "Multiple" refers to two or more processes. For example, multiple processes can be two processes, three processes, or any integer number of processes greater than or equal to two.

[0023] The following describes the key terms or abbreviations that may be used in the multi-process business processing scheme provided in the embodiments of this application.

[0024] The Internet of Things (IoT) utilizes various information sensors, RFID technology, GPS, infrared sensors, laser scanners, and other devices and technologies to collect real-time data on any object or process that needs monitoring, connection, or interaction. This data includes sound, light, heat, electricity, mechanics, chemistry, biology, and location information. Through various possible network access methods, it achieves ubiquitous connectivity between things and between things and people, enabling intelligent perception, identification, and management of objects and processes. The IoT is an information carrier based on the internet and traditional telecommunications networks, enabling all independently addressable ordinary physical objects to form an interconnected network.

[0025] Inter-process communication (IPC): A set of programming interfaces used to coordinate different processes, enabling them to run concurrently within an operating system and exchange information with each other. This allows a program to handle requests from many users at the same time.

[0026] Android Interface Definition Language (AIDL): An interface for exposing services, enabling cross-process access in Android applications.

[0027] Observer Pattern: A software design pattern. In this pattern, a target object manages all the observer objects that depend on it and actively notifies others when its own state changes. This pattern is commonly used to implement event-driven systems.

[0028] Activity: An application component responsible for interacting with the user. In an Android application, an Activity is typically a single screen that can display controls, listen for and handle user events, and respond accordingly. Activities communicate with each other over a network.

[0029] EventCenter: An event center component used to distribute events according to a centralized event bus. Its core is a registration-back modulation based on the observer pattern.

[0030] OnCreate: A message response function used to "indicate that a window is being created". It does not create the window, but only sets the window's properties such as style, position, and color before the window is displayed.

[0031] Decoupling: This means reducing coupling. Dependencies between modules inevitably create coupling; theoretically, absolute zero coupling is impossible, but it can be minimized through various methods. Examples include event-driven patterns, observer patterns, and chain-of-responsibility patterns.

[0032] Map: An object that maps keys to values. A map cannot contain duplicate keys; each key can map to at most one value. A one-to-one key-value mapping.

[0033] Key-Value: A type of database that stores data in key-value pairs. The entire database can be understood as a large Map, where each key corresponds to a unique value.

[0034] Boolean value: includes two values: True and False.

[0035] The following describes the implementation environment of the multi-process-based business processing method provided in the embodiments of this application.

[0036] Figure 1 This is a schematic diagram of an implementation environment for a multi-process-based business processing method provided in an embodiment of this application. The implementation environment includes a terminal 101 and a server 102. Indicatively, the terminal 101 is a user-used terminal. The terminal 101 and the server 102 can be directly or indirectly connected via wired or wireless communication, which is not limited herein. Optionally, the terminal 101 can be a smartphone, tablet computer, laptop computer, desktop computer, etc., but is not limited to these. The terminal 101 can install and run a target application client, which can handle at least one business function.

[0037] Optionally, the target application client is a mobile payment client, a shopping client, or other application clients with mobile payment or shopping functions, such as social application clients with mobile payment or shopping functions. Optionally, the business to be processed is a payment business, an identity verification business, or a gaming business, etc. For example, a mobile payment client is running on terminal 101, which can be used to process facial recognition payment or QR code payment, etc., and the mobile payment client running on terminal 101 is logged into the user's account.

[0038] Server 102 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. Server 102 is used to provide background services for the target application client running on terminal 101.

[0039] Optionally, during multi-process business processing, server 102 undertakes the main computing work and terminal 101 undertakes the secondary computing work; or, server 102 undertakes the secondary computing work and terminal 101 undertakes the main computing work; or, server 102 or terminal 101 can each undertake computing work independently.

[0040] Optionally, terminal 101 generally refers to one of multiple terminals, and this application embodiment only uses terminal 101 as an example. Those skilled in the art will know that the number of terminals 101 can be more. For example, there may be dozens or hundreds of terminals 101, or even more. In this case, the implementation environment of the above-mentioned multi-process-based business processing method also includes other terminals. This application embodiment does not limit the number of terminals or the type of device.

[0041] Optionally, the aforementioned wireless or wired networks use standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to Local Area Networks (LANs), Metropolitan Area Networks (MANs), Wide Area Networks (WANs), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Networks (VPNs), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.

[0042] Indicatively, the application scenarios of the multi-process-based business processing method provided in this application embodiment include, but are not limited to, the following example scenarios: Scenario 1: Facial Recognition Payment With the development of facial recognition technology, order payment via facial recognition has become a common payment method. In related technologies, payment devices with dual displays can initiate the corresponding facial recognition payment service based on the facial recognition payment method selected by the merchant or customer. This payment device includes two displays, meaning that it needs to run two display processes simultaneously when processing facial recognition payment. The multi-process processing method provided in this application unifies the initialization processes of these two displays and promptly notifies the merchant or customer. Furthermore, it ensures that the facial recognition payment service only enters the usable state after all initialization steps are completed, thus improving the availability of the facial recognition payment service.

[0043] Scenario 2: Identity Verification Scenario With the development of internet and facial recognition technologies, identity verification is required in many situations. In some identity verification scenarios, the verification device needs to run multiple display screen processes simultaneously when performing identity verification. For example, if an authenticator needs to verify the identity of multiple individuals at the same time, the verification device needs to simultaneously start each display screen to perform initialization tasks such as adjusting lighting and camera parameters. In this case, the multi-process-based business processing method provided in this application can unify the initialization process of each display screen and promptly notify the authenticator. Furthermore, it ensures that the identity verification business only enters the service-available state after all initialization tasks are completed, thus improving the availability of the identity verification business.

[0044] Scenario 3: Multi-screen Interaction Scenario Multi-screen interaction scenarios refer to the interconnection and switching of screens from different devices. For example, a movie on a mobile phone can be played on a TV, pictures on a tablet can be shared on a TV, and content from a computer can be projected onto a TV. In some multi-screen interaction scenarios, the target application client needs to run the target service simultaneously on different device screens. For example, in a multi-screen game interaction scenario, each screen corresponds to a user. When the game service starts, each screen process needs to perform initialization tasks such as identity verification and network verification for the users participating in the game. In this case, the multi-process-based business processing method provided in this application can unify the initialization process of each screen and promptly notify each game user. Furthermore, it ensures that the game service only enters the usable state after all initialization tasks are completed, thus improving the availability of the game service.

[0045] This application provides a multi-process-based business processing method. Typically, in multi-process scenarios, multiple processes start simultaneously when a target business is executed. Taking a payment device with dual displays as an example, when the device executes a certain business, both display processes simultaneously start initialization tasks. However, the execution time of these initialization tasks is often inconsistent; sometimes one display process has completed initialization while the other has not. Furthermore, the user is unaware of the specific status of the initialization task throughout the initialization process. This results in the user starting to use the target business on the payment device before both display processes have fully completed their initialization tasks, when in fact the target business is still unavailable, leading to poor availability and a terrible user experience. The business processing method provided in this application displays the corresponding initialization status both when the initialization task starts and completes. The target business can only be executed when the initialization task is complete, greatly improving the availability of the business process, providing timely feedback to the user, and enhancing the user experience. For a more detailed description, please refer to the following embodiments.

[0046] Figure 2 This is a flowchart of a multi-process-based business processing method provided according to an embodiment of this application, such as... Figure 2 As shown, this application embodiment uses a terminal as an example for illustration. The method includes the following steps: 201. In response to receiving the execution instruction of the target service, an initialization task is sent to a first process and at least one second process respectively, and a first display task is sent to the first process and at least one second process respectively; wherein, the first process and the second process are used to execute the received task synchronously, and the first display task is used to indicate that a first prompt message indicating that the initialization task has been started is displayed on the first interface.

[0047] In this embodiment, the target application client installed on the terminal is responsible for executing the target service. This target service requires the simultaneous execution of a first process and at least one second process. The first interface refers to the interface displayed on the terminal screen when the initialization task starts.

[0048] Optionally, the target application client is a mobile payment client, or any application with payment functionality. For example, the target application client is a mobile payment client, and the target service is facial recognition payment, or QR code payment, etc. This application embodiment does not limit this.

[0049] The initialization task is a task corresponding to the target service. For example, when the target service is facial recognition payment, the terminal needs to use the initialization task to set parameters such as camera exposure rate, resolution, and backlight compensation, as well as initialize the network environment. Similarly, when the target service is QR code payment, the terminal needs to use the initialization task to set screen brightness and display window size. This application does not limit this specific requirement.

[0050] 202. In response to the completion of the initialization task, a second display task is sent to the first process and at least one second process respectively to start executing the target service; the second display task is used to indicate that a second prompt message indicating the completion of the initialization task is displayed on the second interface.

[0051] In this embodiment of the application, the second interface refers to the interface displayed on the terminal screen when the initialization task is completed.

[0052] In this embodiment, when executing the target service in a multi-process scenario, an initialization task is first sent to each process, followed by a display task indicating that the initialization task has started. Furthermore, in response to the completion of the initialization task, a display task indicating that the initialization task is complete is sent to each process. Each process synchronously executes the received task. This method ensures unified state for each process during initialization task execution and displays corresponding prompts upon task start and completion. This effectively alerts the user and ensures that the target service remains unavailable until all initialization tasks are complete, thus improving its availability.

[0053] The above Figure 2 The diagram shown is merely the basic flow of this application. The following description, based on a specific implementation method and using two processes as an example, further elaborates on the multi-process-based business processing solution provided by this application. It should be noted that the following embodiments are merely illustrative; the embodiments of this application are not limited to two processes, but can start multiple processes simultaneously, and this application does not impose any limitations on this.

[0054] Figure 3 This is a flowchart of another multi-process-based business processing method provided according to an embodiment of this application, such as... Figure 3 As shown, this application embodiment uses a terminal as an example for illustration. The method includes the following steps: 301. In response to receiving the execution instruction of the target business, start the first process.

[0055] In this embodiment, the terminal provides a target service selection function, allowing the user to select a target service to trigger a corresponding execution instruction. Upon receiving the execution instruction, the terminal initiates a first process. The first process refers to one of multiple processes required for the terminal to execute the target service.

[0056] Optionally, taking the terminal as a payment device as an example, a mobile payment client runs on the terminal. This payment device has two displays, referred to as the front screen and the back screen, corresponding to the front screen process and the back screen process respectively. The front screen faces the customer, and the back screen faces the merchant. When a merchant makes a payment through this payment device, they can select the facial recognition payment service on the payment service selection interface displayed on the back screen. For example, if the aforementioned display is a touch screen, the merchant can click on the facial recognition payment service on the back screen, triggering the corresponding execution command. The terminal responds by receiving the execution command and starting the back screen process.

[0057] In some embodiments, a payment service selection interface is displayed on the front screen of the terminal, allowing customers to choose their preferred payment method. This application does not limit this aspect.

[0058] 302. In response to receiving the first scheduling request sent by the first process, send initialization tasks to the first process and the second process respectively.

[0059] In this embodiment, the first scheduling request is used to request the terminal to initiate the business logic of the initialization task. The initialization task of the first process is the same as that of the second process. Optionally, the terminal includes an independent initialization startup module, which is used to start the business logic of the initialization task; in addition, the terminal also includes an inter-process communication module, which is used to implement task distribution and information exchange between processes.

[0060] Optionally, step 302 can be replaced by "in response to receiving the first scheduling request, scheduling the initialization startup module, and sending initialization tasks to the first process and the second process respectively through the inter-process communication module". This optional implementation is described in detail below: A target application client runs on the terminal. After the target application client starts the first process, the first process starts the Activity component and calls the OnCreate function in the Activity component. The OnCreate function sends a first scheduling request to the target application client. In response to receiving the first scheduling request, the target application client schedules the initialization startup module to start the business logic of the initialization task. The initialization startup module sends the initialization task to the first process and the second process respectively through the inter-process communication module.

[0061] Indicatively, for reference Figure 4 , Figure 4 This is a schematic diagram of the structure of a target application client provided in an embodiment of this application. For example... Figure 4 As shown, the target application client includes a first process 410, a second process 420, an initialization startup module 430, and an inter-process communication module 440. The initialization startup module 430 interacts with the first process 410 and the second process 420 through the inter-process communication module 440.

[0062] 303. In response to receiving the second scheduling request sent by the first process, send a first display task to the first process and the second process respectively. The first display task is used to indicate that a first prompt message indicating that the initialization task has been started is displayed on the first interface.

[0063] In this embodiment, the second scheduling request is used to request the terminal to manage the interface display of the initialization task. Optionally, the terminal includes a separate interface management module, which is used to manage the interface display of the initialization task.

[0064] Optionally, step 303 can be replaced by "in response to receiving the second scheduling request, the scheduling interface management module sends the first display task to the first process and the second process respectively through the inter-process communication module." This optional implementation method is described in detail below: After the target application client running on the terminal starts the first process, the first process starts the Activity component and calls the OnCreate function in the Activity component. The OnCreate function sends a second scheduling request to the target application client. In response to receiving the second scheduling request, the target application client schedules the interface management module to manage the interface display of the initialization task. The interface management module sends the first display task to the first process and the second process respectively through the inter-process communication module.

[0065] Optionally, in the above optional implementation, the terminal further includes a message management module, which is used to distribute tasks according to the received tasks. Additionally, both the first process and the second process include a listening module and a screen display module. The listening module is used to call the screen display module to display the corresponding screen according to the received display task. Indicatively, step 303 also includes the following step 3031: 3031. The message management module sends a first display task to the listening module of the first process and to the listening module of the second process; wherein the first display task is used to instruct the listening module to call the interface display module to display the first interface.

[0066] The message management module can be implemented using the EventCenter component, the listening module can be implemented using the Activity component, and the interface display module can also be implemented using the Activity component. This application embodiment does not limit the implementation of these components.

[0067] For illustrative purposes, please continue to refer to Figure 4 ,like Figure 4 As shown, the target application client also includes an interface management module 450. The first process 410 includes a message management module 411, a listening module 412, and an interface display module 413. The second process 420 includes a message management module 421, a listening module 422, and an interface display module 423. The interface management module 450 interacts with both the first process 410 and the second process 420 via an inter-process communication module 440.

[0068] Optionally, the terminal includes a first display screen and a second display screen, which are arranged back-to-back with each other. The first display screen faces the first user and is also called the back screen; the second display screen faces the second user and is also called the front screen. The first display task is used to instruct the first interface to be displayed on the first display screen and the second display screen respectively. This optional implementation is illustrated below: Indicatively, for reference Figure 5 , Figure 5 This is a schematic diagram of a first interface provided in an embodiment of this application. Figure 5 As shown, a first interface 511 is displayed on the first display screen 510, and a first prompt message 1 indicating that the initialization task has been started is displayed on the first interface 511; correspondingly, a first interface 521 is displayed on the second display screen 520, and a first prompt message 2 indicating that the initialization task has been started is displayed on the first interface 521.

[0069] In some embodiments, the first interface displayed on the two screens of the terminal has different forms, and the content of the first prompt message is also different, which can provide different forms of feedback to different users and improve the user experience. In other embodiments, the content of the first prompt message displayed on the two screens of the terminal is the same. This application does not limit the display form of the first interface and the first prompt message.

[0070] After steps 301 to 303, when the terminal receives the execution instruction for the target service, it starts the first process. Then, through the first process, it initiates the business logic for the initialization task. Furthermore, through the first process, it sends the first display task to both the first and second processes, so that the terminal screen promptly displays a notification message indicating that the initialization task has started. This provides feedback to the user on the current status of the initialization task, greatly improving the user experience. Additionally, in steps 301 to 303, the terminal uses the scheduling request of the first process to perform task distribution and other operations, avoiding the chaos caused by multiple tasks executing simultaneously in a multi-process scenario.

[0071] 304. In response to the completion of the initialization task, a second display task is sent to the first process and the second process respectively to start executing the target business. The second display task is used to indicate that a second prompt message indicating that the initialization task has been completed is displayed on the second interface.

[0072] Optionally, the first process includes a state management module, which is used to obtain the initialization result of the initialization task. The initialization result is used to indicate the initialization status of the initialization task. For example, the initialization status is successful, or the initialization status is failed, etc., and this embodiment of the application does not limit this. Optionally, the first process and the second process each correspond to an initialization result.

[0073] Optionally, step 304, "in response to the completion of the initialization task, sending the second display task to the first process and the second process respectively," includes the following steps 3041 to 3042: 3041. In response to receiving the third scheduling request sent by the initialization startup module, schedule the state management module in the first process to obtain at least one initialization result of the initialization task.

[0074] The third scheduling request is used to obtain at least one initialization result of the initialization task.

[0075] Optionally, the initialization task includes at least one subtask. The aforementioned state management module can obtain all the subtasks of the initialization task and then classify these subtasks to facilitate obtaining the result status of different initialization subtasks.

[0076] 3042. In response to the initialization result meeting the first condition, the second display task is sent to the first process and the second process respectively through the interface management module.

[0077] The first condition refers to the number of initialization results being equal to the target threshold, and that no failed item exists in any initialization result. Optionally, "no failed item exists in any initialization result" means that no failed item exists in any single initialization result.

[0078] In this embodiment, two processes are used as an example for illustration; therefore, the target threshold is 2. The following detailed explanation of steps 3041 and 3042, with a target threshold of 2, is provided: Optionally, a target application client runs on the terminal. The initialization startup module sends a third scheduling request to the target application client. In response to receiving the third scheduling request, the target application client schedules the status management module to obtain at least one initialization result of the initialization task. When the number of initialization results obtained is equal to 2, and there are no failure items in each initialization result, the status management module sends the initialization result to the interface management module, and the interface management module sends the second display task to the first process and the second process respectively.

[0079] It should be noted that when the interface management module sends the first display task to the first process and the second process respectively, it immediately initiates a callback to receive the initialization result from the state management module through a callback function. The callback ends when the interface management module receives the initialization result. This application embodiment does not limit the type of the callback function.

[0080] Optionally, the state management module sets up a Key-Value Map object based on the classification of each subtask, where the Key is the name of the subtask and the Value is a boolean value. When the state management module first obtains each subtask, the Value of each subtask is False. When both the first and second processes start the initialization task, the state management module obtains at least one initialization result of the initialization task through a callback function. When two initialization results are obtained, the state management module determines that there are no failed subtasks in each initialization result, and then sets the Value of all subtasks in the Key-Value map to True.

[0081] Optionally, the terminal includes a message management module, and both the first process and the second process include a listening module and a user interface display module. Indicatively, step 304 also includes the following step 3043: 3043. The message management module sends a second display task to the listening module of the first process and to the listening module of the second process; wherein the second display task is used to instruct the listening module to call the interface display module to display the second interface.

[0082] The optional implementation methods of the message management module, the listening module, and the interface display module are similar to those in step 303 above, so they will not be repeated here.

[0083] For illustrative purposes, please continue to refer to Figure 4 ,like Figure 4As shown, the first process 410 also includes a state management module 414, wherein the interface management module 450 and the state management module 414 can interact with each other.

[0084] Optionally, the terminal includes a first display screen and a second display screen. The following is an illustrative description of this optional implementation: Indicatively, for reference Figure 6 , Figure 6 This is a schematic diagram of a second interface provided in an embodiment of this application. For example... Figure 6 As shown in the left-middle figure, a second interface 611 is displayed on the first display screen 610, and a second prompt message 3 indicating that the initialization task has been completed is displayed on the first interface 611; correspondingly, a second interface 621 is displayed on the second display screen 620, and a second prompt message 4 indicating that the initialization task has been completed is displayed on the second interface 621. This application embodiment does not limit the display format of the second interface and the second prompt message.

[0085] Optionally, step 304 may further include the following steps 3044 and 3045: 3044. In response to the completion of the initialization task, a second display task is sent to the first process and the second process respectively. The second display task is used to indicate that a second prompt message indicating that the initialization task has been completed is displayed on the second interface.

[0086] 3045. In response to the first trigger operation on the second interface, start executing the target business.

[0087] The first triggering operation can be a click operation or a voice input operation; this application does not limit this. After completing the above steps 3044 and 3045, the terminal executes the target service only in response to the user's operation after completing the initialization task. This allows for timely notification to the user that the initialization of the target user has been completed, improving the user experience and ensuring the availability of the target service.

[0088] 305. In response to the failure of the initialization task, a third display task is sent to the first process and the second process respectively; wherein the third display task is used to instruct the display of a third prompt message indicating that the initialization task has failed on the third interface.

[0089] The first point to note is that step 305 is a parallel step to step 304. That is, step 304 is executed by the terminal in response to the completion of the initialization task, while step 305 is executed by the terminal in response to the failure of the initialization task. The optional implementations of step 305 are similar to those given in step 304, and therefore will not be repeated here.

[0090] Optionally, the following provides an illustrative description of two optional steps included in step 305, which includes either step 3051 or step 3052: 3051. In response to at least one initialization result of the initialization task meeting the second condition, the third display task is sent to the first process and the second process respectively through the interface management module.

[0091] The second condition refers to the fact that the number of initialization results is equal to the target threshold, and that at least one of the initialization results contains a failed item.

[0092] Optionally, when the state management module obtains two initialization results, if it determines that a failed subtask exists in one of the initialization results, it will keep the Value corresponding to the failed subtask in the Key-Value pair unchanged at False. Simultaneously, the state management module will send the obtained initialization result and Key-Value pair to the interface management module.

[0093] 3052. In response to the detection of a target event, a third display task is sent to the first process and the second process respectively through the interface management module; wherein, the target event refers to the start time of the initialization task being equal to the target duration.

[0094] Optionally, the state management module of the first process has a listening function. This module can uniformly start all subtasks in the initialization task and set a target duration. After the initialization task starts, if the initialization task's start duration reaches the target duration and there are still subtasks that have not been completed, it is determined that the initialization task has timed out, i.e., the target event has been detected. At this time, the state manager obtains at least one initialization result of the initialization task through a callback function, sets the Value corresponding to the completed subtask in the initialization result to True, and keeps the Value corresponding to the failed subtask in the Key-Value pair unchanged at False. Simultaneously, the state management module sends the obtained initialization result and Key-Value pair to the interface management module.

[0095] Schematic, step 305 also includes the following step 3053: 3053. The message management module sends a third display task to the listening module of the first process and to the listening module of the second process; wherein the third display task is used to instruct the listening module to call the interface display module to display a third interface.

[0096] Optionally, after performing step 305 above, the terminal can also perform the following steps: in response to the second trigger operation on the third interface, obtain the execution instruction of the target service again.

[0097] The second triggering operation can be a click operation or a voice input operation. This application embodiment does not limit this. Optionally, after displaying the third interface, the terminal obtains the execution instruction of the target service again according to the default method; this application embodiment does not limit this.

[0098] Furthermore, in this embodiment, two processes are used as an example for illustration. In some embodiments, the number of processes running when the target application client of the terminal is processing the target business is greater than 2. This embodiment does not limit this. For example, when the number of processes is N, N is greater than 2, the above steps 301 to 305 can be replaced by the following steps 301-1 to 305-1: 301-1. In response to receiving the execution instruction of the target business, the first process is started.

[0099] In response to receiving the first scheduling request from the first process, 302-1 sends initialization tasks to the first process and the other processes respectively. Here, "other processes" refers to any N processes other than the first process.

[0100] 303-1. In response to receiving a second scheduling request sent by the first process, a first display task is sent to the first process and other processes respectively. The first display task is used to indicate that a first prompt message indicating that the initialization task has been started is displayed on the first interface.

[0101] 304-1. In response to the completion of the initialization task, a second display task is sent to the first process and other processes respectively to start the execution of the target business. The second display task is used to indicate that a second prompt message indicating that the initialization task has been completed is displayed on the second interface.

[0102] 305-1. In response to the failure of the initialization task, a third display task is sent to the first process and other processes respectively; wherein, the third display task is used to instruct the display of a third prompt message indicating that the initialization task has failed on the third interface.

[0103] In other words, in this embodiment of the application, when the terminal obtains the execution instruction of the target service, it loads the control logic onto the first process, which can also be called the main process. The main process performs scheduling to achieve task distribution. The specific implementation method is similar to the above steps 301 to 305, so it will not be described again here.

[0104] In this embodiment, when executing the target service in a multi-process scenario, an initialization task is first sent to each process, followed by a display task indicating that the initialization task has started. Furthermore, in response to the completion of the initialization task, a display task indicating that the initialization task is complete is sent to each process. Each process synchronously executes the received task. This method ensures unified state for each process during initialization task execution and displays corresponding prompts upon task start and completion. This effectively alerts the user and ensures that the target service remains unavailable until all initialization tasks are complete, thus improving its availability.

[0105] The following example illustrates a multi-process-based business processing method provided in this application, taking into account practical situations. Figure 7 This is a flowchart of another multi-process-based business processing method provided according to an embodiment of this application. For example... Figure 7 As shown, a target application client runs on the terminal. The terminal includes a first display screen and a second display screen, also known as the front screen and the back screen, which correspond to the front screen process and the back screen process, respectively. This multi-process-based business processing method includes: First, in response to the execution command of the target business, the terminal starts the back screen process, which in turn starts the Activity component. Then, through the OnCreate function in the Activity component, the initialization and startup module is scheduled to start the business logic of the initialization task.

[0106] Secondly, the back screen process continues to schedule the UI management module to manage the initialization tasks of the UI display, i.e., updating the front and back screen UI displays, through the OnCreate function in the Activity component. This UI management module sends the task to update the UI display to the front and back screen processes via the inter-process communication (IPC) module. After receiving the task from the UI management module, the front and back screen processes use the EventCenter component to send the task to the Activity components with listening capabilities in their respective processes. Upon receiving the task, the Activity components with listening capabilities in the front and back screen processes start an Activity component with UI display capabilities to update the front and back screen UI displays.

[0107] Secondly, the back screen process includes a state management module, which is scheduled by the initialization startup module through the IPC module. This state management module can obtain the initialization results of the initialization task and set a target duration to monitor whether the initialization task's startup duration has expired. If the initialization results of the front screen process and the back screen process indicate that the initialization task has been completed, or that the initialization task's startup duration has expired, or that there are failed subtasks in the initialization results of the front screen process or the back screen process, then the state manager sends the corresponding initialization results to the interface management module. The interface management module receives the initialization results through a callback interface and, based on the received initialization results, notifies the front screen process and the back screen process to update the interface display through the IPC module.

[0108] In the above embodiments, the interface management module can reduce the coupling between the business logic layer and the interface display layer, thus achieving decoupling. Schematic, the business logic layer 710 and the interface display layer 720 are as follows: Figure 7 As shown. This interface display module integrates all the details of the initialization tasks, enabling the initialization tasks to display the completed data. At the same time, this interface management module can promptly distribute tasks and update the interface display via IPC when the initialization task starts or when the status management module notifies.

[0109] In this embodiment, when executing the target service in a multi-process scenario, an initialization task is first sent to each process, followed by a display task indicating that the initialization task has started. Furthermore, in response to the completion of the initialization task, a display task indicating that the initialization task is complete is sent to each process. Each process synchronously executes the received task. This method ensures unified state for each process during initialization task execution and displays corresponding prompts upon task start and completion. This effectively alerts the user and ensures that the target service remains unavailable until all initialization tasks are complete, thus improving its availability.

[0110] Figure 8 This is a schematic diagram of a multi-process-based service processing device according to an embodiment of this application. This device is used to perform the steps of the above-described method, see [link to relevant documentation]. Figure 8 The device includes: a first transmitting module 801 and a second transmitting module 802.

[0111] The first sending module 801 is configured to, in response to receiving the execution instruction of the target service, send an initialization task to a first process and at least one second process respectively, and send a first display task to the first process and at least one second process respectively; wherein the first process and the second process are configured to execute the received task synchronously, and the first display task is configured to indicate that a first prompt message indicating that the initialization task has been started is displayed on the first interface; The second sending module 802 is used to send a second display task to the first process and at least one of the second processes respectively in response to the completion of the initialization task, and to start executing the target service; the second display task is used to indicate that a second prompt message indicating that the initialization task has been completed is displayed on the second interface.

[0112] In one alternative implementation, the first transmitting module 801 includes: The startup unit is used to start the first process in response to receiving the execution instruction of the target service; The first sending unit is configured to, in response to receiving a first scheduling request sent by the first process, send the initialization task to the first process and at least one of the second processes respectively; The second sending unit is configured to, in response to receiving a second scheduling request sent by the first process, send the first display task to the first process and at least one of the second processes respectively.

[0113] In one alternative implementation, the first transmitting unit is used for: In response to receiving the first scheduling request, the scheduling initialization startup module sends the initialization task to the first process and at least one of the second processes respectively through the inter-process communication module; The initialization startup module is used to start the business logic of the initialization task.

[0114] In one alternative implementation, the second transmitting unit is used for: In response to receiving the second scheduling request, the scheduling interface management module sends the first display task to the first process and at least one of the second processes respectively through the inter-process communication module; The interface management module is used to manage the interface display of this initialization task.

[0115] In one alternative implementation, the second transmitting module 802 includes: The acquisition unit is used to, in response to receiving a third scheduling request sent by the initialization startup module, schedule the state management module in the first process to acquire at least one initialization result of the initialization task; The third sending unit is used to send the second display task to the first process and at least one of the second processes respectively through the interface management module in response to the initialization result meeting the first condition, wherein the first condition means that the number of initialization results is equal to the target threshold, and there are no failed items in any of the initialization results; The initialization startup module is used to start the business logic of the initialization task, and the interface management module is used to manage the interface display of the initialization task.

[0116] In one alternative implementation, the device further includes: The third sending module is used to send a third display task to the first process and at least one of the second processes respectively in response to the failure of the initialization task; wherein the third display task is used to instruct the display of a third prompt message indicating that the initialization task has failed on the third interface.

[0117] In one alternative implementation, the third sending module includes any of the following: The fourth sending unit is configured to, in response to at least one initialization result of the initialization task meeting the second condition, send the third display task to the first process and at least one of the second processes respectively through the interface management module; wherein, the second condition means that the number of initialization results is equal to the target threshold, and at least one of the initialization results contains a failure item; The fifth sending unit is used to send the third display task to the first process and at least one of the second processes respectively through the interface management module in response to the detection of a target event; wherein, the target event refers to the startup duration of the initialization task being equal to the target duration; The interface management module is used to manage the interface display of this initialization task.

[0118] In one alternative implementation, the first sending module is used to: The message management module sends the first display task to the listening module of the first process and to at least one listening module of the second process. The first display task is used to instruct the listening module to call the interface display module to display the first interface.

[0119] In one alternative implementation, the device further includes any of the following: The fourth sending module is used to send the second display task to the listening module of the first process through the message management module, and to send the second display task to at least one listening module of the second process; wherein the second display task is used to instruct the listening module to call the interface display module to display the second interface; The fifth sending module is used to send the third display task to the listening module of the first process and to at least one listening module of the second process through the message management module; wherein the third display task is used to instruct the listening module to call the interface display module to display the third interface.

[0120] In this embodiment, when executing the target service in a multi-process scenario, an initialization task is first sent to each process, followed by a display task indicating that the initialization task has started. Furthermore, in response to the completion of the initialization task, a display task indicating that the initialization task is complete is sent to each process. Each process synchronously executes the received task. This device unifies the state of each process during the execution of the initialization task and displays corresponding prompts upon both the start and completion of the initialization task. This effectively alerts the user and ensures that the target service remains unavailable until all initialization is complete, thus improving its availability.

[0121] It should be noted that the multi-process-based service processing device provided in the above embodiments is only illustrated by the division of the above functional modules when processing services. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the multi-process-based service processing device and the multi-process-based service processing method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0122] In an exemplary embodiment, a computer device is also provided. Taking the computer device as an example as a terminal, Figure 9 This illustration shows a structural block diagram of a terminal 900 provided in an exemplary embodiment of this application. The terminal 900 may be a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal 900 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.

[0123] Typically, terminal 900 includes a processor 901 and a memory 902.

[0124] Processor 901 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 901 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 901 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 901 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 901 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0125] The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 902 are used to store at least one program code, which is executed by the processor 901 to implement the multi-process-based business processing method provided in the method embodiments of this application.

[0126] In some embodiments, the terminal 900 may also optionally include a peripheral device interface 903 and at least one peripheral device. The processor 901, memory 902, and peripheral device interface 903 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 903 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 904, a display screen 905, a camera assembly 906, an audio circuit 907, and a power supply 909.

[0127] Peripheral device interface 903 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 901 and memory 902. In some embodiments, processor 901, memory 902 and peripheral device interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 901, memory 902 and peripheral device interface 903 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0128] The radio frequency (RF) circuit 904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 904 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 904 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 904 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 904 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0129] Display screen 905 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 905 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 901 for processing. In this case, display screen 905 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 905, disposed on the front panel of terminal 900; in other embodiments, there may be at least two display screens 905, disposed on different surfaces of terminal 900 or in a folded design; in other embodiments, display screen 905 may be a flexible display screen, disposed on a curved or folded surface of terminal 900. Furthermore, display screen 905 may be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. Display screen 905 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).

[0130] The camera assembly 906 is used to acquire images or videos. Optionally, the camera assembly 906 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 906 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0131] The audio circuit 907 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting them into electrical signals that are input to the processor 901 for processing, or to the radio frequency circuit 904 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 900. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 901 or the radio frequency circuit 904 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 907 may also include a headphone jack.

[0132] The power supply 909 is used to power the various components in the terminal 900. The power supply 909 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When the power supply 909 includes a rechargeable battery, the rechargeable battery can support wired or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0133] In some embodiments, the terminal 900 further includes one or more sensors 910. The one or more sensors 910 include, but are not limited to, an accelerometer 911, a gyroscope 912, a pressure sensor 913, an optical sensor 915, and a proximity sensor 916.

[0134] Accelerometer 911 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by terminal 900. For example, accelerometer 911 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 901 can control display screen 905 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 911. Accelerometer 911 can also be used for games or for acquiring user motion data.

[0135] The gyroscope sensor 912 can detect the orientation and rotation angle of the terminal 900. The gyroscope sensor 912, in conjunction with the accelerometer sensor 911, can collect the user's 3D movements on the terminal 900. Based on the data collected by the gyroscope sensor 912, the processor 901 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0136] The pressure sensor 913 can be disposed on the side bezel of the terminal 900 and / or the lower layer of the display screen 905. When the pressure sensor 913 is disposed on the side bezel of the terminal 900, it can detect the user's grip signal on the terminal 900, and the processor 901 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 913. When the pressure sensor 913 is disposed on the lower layer of the display screen 905, the processor 901 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 905. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0137] An optical sensor 915 is used to collect ambient light intensity. In one embodiment, the processor 901 can control the display brightness of the display screen 905 based on the ambient light intensity collected by the optical sensor 915. Specifically, when the ambient light intensity is high, the display brightness of the display screen 905 is increased; when the ambient light intensity is low, the display brightness of the display screen 905 is decreased. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 based on the ambient light intensity collected by the optical sensor 915.

[0138] The proximity sensor 916, also known as a distance sensor, is typically located on the front panel of the terminal 900. The proximity sensor 916 is used to detect the distance between the user and the front of the terminal 900. In one embodiment, when the proximity sensor 916 detects that the distance between the user and the front of the terminal 900 is gradually decreasing, the processor 901 controls the display screen 905 to switch from a screen-on state to a screen-off state; when the proximity sensor 916 detects that the distance between the user and the front of the terminal 900 is gradually increasing, the processor 901 controls the display screen 905 to switch from a screen-off state to a screen-on state.

[0139] Those skilled in the art will understand that Figure 9 The structure shown does not constitute a limitation on terminal 900, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0140] This application also provides a computer-readable storage medium applied to a computer device. The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to implement the operations performed by the computer device in the multi-process-based business processing method of the above embodiments.

[0141] This application also provides a computer program product or computer program, which includes computer program code stored in a computer-readable storage medium. A processor of a computer device reads the computer program code from the computer-readable storage medium and executes the computer program code, causing the computer device to perform the multi-process-based business processing method provided in the various optional implementations described above.

[0142] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0143] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A business processing method based on multiple processes, characterized in that, The method includes: In response to receiving the execution instruction of the target service, a first process is started; in response to receiving the first scheduling request sent by the first process, an initialization task is sent to the first process and at least one second process respectively; in response to receiving the second scheduling request sent by the first process, a first display task is sent to the first process and at least one second process respectively; wherein, the first process and the second process are used to synchronously execute the received task, and the first display task is used to indicate that a first prompt message that the initialization task has been started is displayed on the first interface; In response to receiving a third scheduling request sent by the initialization startup module, the state management module in the first process is scheduled to obtain at least one initialization result of the initialization task. The initialization startup module is used to start the business logic of the initialization task. In response to the initialization result meeting the first condition, a second display task is sent to the first process and at least one second process respectively to start executing the target service; the second display task is used to indicate that a second prompt message indicating that the initialization task has been completed is displayed on the second interface, the first condition being that the number of initialization results is equal to the total number of the first process and at least one second process, and that there are no failed items in any of the initialization results.

2. The method according to claim 1, characterized in that, The step of sending the initialization task to the first process and at least one second process respectively in response to receiving the first scheduling request from the first process includes: In response to receiving the first scheduling request, the scheduling initialization startup module sends the initialization task to the first process and at least one second process respectively through the inter-process communication module; The initialization startup module is used to start the business logic of the initialization task.

3. The method according to claim 1, characterized in that, The step of sending the first display task to the first process and at least one of the second processes respectively in response to receiving the second scheduling request from the first process includes: In response to receiving the second scheduling request, the scheduling interface management module sends the first display task to the first process and at least one of the second processes respectively through the inter-process communication module; The interface management module is used to manage the interface display of the initialization task.

4. The method according to claim 1, characterized in that, The method further includes: In response to the failure of the initialization task, a third display task is sent to the first process and at least one of the second processes respectively; wherein the third display task is used to instruct the display of a third prompt message indicating that the initialization task has failed on a third interface.

5. The method according to claim 4, characterized in that, In response to the failure of the initialization task, a third display task is sent to the first process and at least one of the second processes, including any one of the following: In response to at least one initialization result of the initialization task meeting the second condition, the third display task is sent to the first process and at least one of the second processes respectively through the interface management module; wherein, the second condition means that the number of initialization results is equal to the target threshold, and at least one of the initialization results contains a failure item; In response to the detection of a target event, the interface management module sends the third display task to the first process and at least one second process respectively; wherein, the target event refers to the initialization task's start time being equal to the target duration; The interface management module is used to manage the interface display of the initialization task.

6. The method according to claim 1, characterized in that, The method further includes: The message management module sends the first display task to the listening module of the first process and to at least one listening module of the second process. The first display task is used to instruct the listening module to call the interface display module to display the first interface.

7. The method according to claim 4, characterized in that, The method further includes any of the following: The message management module sends the second display task to the listening module of the first process and to at least one listening module of the second process; wherein, the second display task is used to instruct the listening module to call the interface display module to display the second interface; The message management module sends the third display task to the listening module of the first process and to at least one listening module of the second process; wherein the third display task is used to instruct the listening module to call the interface display module to display the third interface; The interface management module is used to manage the interface display of the initialization task.

8. The method according to any one of claims 1 to 7, characterized in that, The device is applied to a terminal, which includes a first display screen and a second display screen, wherein the first display screen and the second display screen are arranged opposite to each other, the first display screen faces a first user, and the second display screen faces a second user; The first display task is used to instruct the first interface to be displayed on the first display screen and the second display screen respectively; The second display task is used to instruct the second interface to be displayed on the first display screen and the second display screen, respectively.

9. A multi-process-based business processing device, characterized in that, The device includes: The first sending module is configured to, in response to receiving an execution instruction for a target service, start a first process; in response to receiving a first scheduling request sent by the first process, send initialization tasks to the first process and at least one second process respectively; and in response to receiving a second scheduling request sent by the first process, send a first display task to the first process and at least one second process respectively; wherein, the first process and the second process are configured to execute the received tasks synchronously, and the first display task is configured to indicate that a first prompt message indicating that the initialization task has been started is displayed on the first interface; The second sending module is used to respond to the third scheduling request sent by the initialization startup module, schedule the state management module in the first process, and obtain at least one initialization result of the initialization task. The initialization startup module is used to start the business logic of the initialization task. The second sending module is further configured to, in response to the initialization result meeting the first condition, send a second display task to the first process and at least one second process respectively, and start executing the target service; the second display task is configured to indicate that a second prompt message indicating that the initialization task has been completed is displayed on the second interface, the first condition being that the number of initialization results is equal to the total number of the first process and at least one second process, and that there are no failed items in any of the initialization results.

10. The apparatus according to claim 9, characterized in that, The first sending module is used for: In response to receiving the first scheduling request, the scheduling initialization startup module sends the initialization task to the first process and at least one second process respectively through the inter-process communication module; The initialization startup module is used to start the business logic of the initialization task.

11. A computer device, characterized in that, The computer device includes a processor and a memory, the memory being used to store at least one computer program, the at least one computer program being loaded by the processor and executed as described in any one of claims 1 to 8.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to implement the multi-process-based business processing method as described in any one of claims 1 to 8.

13. A computer program product, characterized in that, The computer program product includes computer program code stored in a computer-readable storage medium. A processor of a computer device reads the computer program code from the computer-readable storage medium and executes the computer program code, causing the computer device to perform the multi-process-based business processing method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Multi-screen interaction system and method based on single host and single system

    CN111190565A