CN114968501A - Business processing method, device, equipment and storage medium based on multiple processes - Google Patents

Business processing method, device, equipment and storage medium based on multiple processes Download PDF

Info

Publication number
CN114968501A
CN114968501A CN202110191909.XA CN202110191909A CN114968501A CN 114968501 A CN114968501 A CN 114968501A CN 202110191909 A CN202110191909 A CN 202110191909A CN 114968501 A CN114968501 A CN 114968501A
Authority
CN
China
Prior art keywords
task
initialization
display
sending
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110191909.XA
Other languages
Chinese (zh)
Inventor
张晓翼
张志强
王少鸣
郭润增
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110191909.XA priority Critical patent/CN114968501A/en
Publication of CN114968501A publication Critical patent/CN114968501A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4014Identity check for transactions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/545Gui
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a business processing method, a device, equipment and a storage medium based on multiple processes, and belongs to the technical field of computers. When a target service is executed in a multi-process scene, firstly, an initialization task is sent to each process, and then a display task for prompting that the initialization task is started is sent to each process; further, responding to the completion of the initialization task, immediately sending a display task for prompting the completion of the initialization task to each process; wherein, each process is used for synchronously executing the received tasks. By adopting the method, the states of the processes are unified when the initialization tasks are executed, and the corresponding prompt contents are displayed when the initialization tasks are started and completed, so that the user can be effectively prompted, the target service is in an unavailable state when the initialization tasks are not completed, the available state is displayed when the target service is completely initialized, and the availability of the target service is improved.

Description

Business processing method, device, equipment and storage medium based on multiple processes
Technical Field
The present application relates to the field of computer technologies, and in particular, to a business processing method, device, and apparatus based on multiple processes, and a storage medium.
Background
With the rapid development of computer technology and internet technology, more and more devices can realize the ubiquitous connection of objects and people by accessing to a network. Taking a payment device with double display screens as an example, the payment device is provided with two display screens which are back to back and respectively face a merchant and a customer, and the two display screens can start a target service according to a payment mode selected by the merchant or the customer.
Continuing with the above example of the payment device, in the related art, it often happens that the payment device already displays an available status when the target service has not completely completed initialization, resulting in low availability of the target service. Therefore, how to perform service processing to ensure service availability becomes a problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the application provides a business processing method, a business processing device, business processing equipment and a storage medium based on multiple processes, which can unify the initialization states of the multiple processes and ensure the availability of target business. The technical scheme is as follows:
in one aspect, a business processing method based on multiple processes is provided, and the method includes:
in response to the acquired execution instruction of the target service, respectively sending an initialization task to the first process and at least one second process, and respectively sending a first display task to the first process and at least one second process; the first process and the second process are used for synchronously executing the received tasks, and the first display task is used for indicating that a first prompt message of which the initialization task is started is displayed on a first interface;
responding to the completion of the initialization task, respectively sending a second display task to the first process and at least one second process, and starting to execute the target service; the second display task is used for indicating that a second prompt message that the initialization task is completed is displayed on a second interface.
In another aspect, a business processing apparatus based on multiple processes is provided, the apparatus including:
the first sending module is used for responding to the execution instruction of the acquired target service, respectively sending an initialization task to the first process and the at least one second process, and respectively sending a first display task to the first process and the at least one second process; the first process and the second process are used for synchronously executing the received tasks, and the first display task is used for indicating that a first prompt message of the started initialization task is displayed on a first interface;
a second sending module, configured to send a second display task to the first process and at least one second process, respectively, in response to that the initialization task is completed, and start to execute the target service; the second display task is used for indicating that a second prompt message that the initialization task is completed is displayed on a second interface.
In an optional implementation manner, the second sending unit is configured to:
in response to the second scheduling request, scheduling an interface management module, and sending the first display task to the first process and at least one second process through an inter-process communication module;
the interface management module is used for managing interface display of the initialization task.
In an optional implementation manner, the second sending module includes:
the acquiring unit is used for responding to a third scheduling request sent by the initialization starting module, scheduling the state management module in the first process and acquiring at least one initialization result of the initialization task;
a third sending unit, configured to send, through an interface management module, the second display task to the first process and the at least one second process in response to that the initialization result meets a first condition, where the first condition indicates that the number of the initialization results is equal to a target threshold, and no failure item exists in any of the initialization results;
the initialization starting module is used for starting the service logic of the initialization task, and the interface management module is used for managing the interface display of the initialization task.
In an optional implementation, the apparatus further comprises:
a third sending module, configured to send a third display task to the first process and the at least one second process, respectively, in response to that the initialization task has failed; wherein the third display task is used for indicating that a third prompt message that the initialization task has failed is displayed on a third interface.
In an optional implementation manner, the third sending module includes any one of the following:
a fourth sending unit, configured to send, through an interface management module, the third display task to the first process and the at least one second process respectively in response to that at least one initialization result of the initialization task meets a second condition; wherein, the second condition means that the number of the initialization results is equal to a target threshold, and at least one of the initialization results has a failure item;
a fifth sending unit, configured to send, in response to monitoring of the target event, the third display task to the first process and the at least one second process through the interface management module, respectively; the target event means that the starting time length of the initialization task is equal to the target time length;
the interface management module is used for managing interface display of the initialization task.
In an optional implementation, the first sending module is configured to:
sending the first display task to a monitoring module of the first process and sending the first display task to at least one monitoring module of the second process through a message management module;
the first display task is used for indicating the monitoring module to call the interface display module to display the first interface.
In an optional implementation, the apparatus further comprises any one of:
a fourth sending module, configured to send the second display task to the monitoring module of the first process and send the second display task to at least one monitoring module of the second process through the message management module; the second display task is used for indicating the monitoring module to call an interface display module to display the second interface;
a fifth sending module, configured to send, through the message management module, the third display task to the monitoring module of the first process, and send the third display task to the monitoring module of at least one second process; and the third display task is used for indicating the monitoring module to call the interface display module to display the third interface.
In another aspect, a computer device is provided, and the computer device includes a processor and a memory, where the memory is used to store at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the multi-process based business processing method in the embodiments of the present application.
In another aspect, a computer-readable storage medium is provided, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor to implement the operations performed in the multi-process based business processing method in the embodiments of the present application.
In another aspect, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer program code, the computer program code being stored in a computer readable storage medium. The processor of the computer device reads the computer program code from the computer-readable storage medium, and executes the computer program code, so that the computer device executes the multi-process based service processing method provided in the above-mentioned various alternative implementations.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
in the embodiment of the application, when the target service is executed in a multi-process scene, firstly, an initialization task is respectively sent to each process, and then, a display task for prompting that the initialization task is started is respectively sent to each process; further, responding to the completion of the initialization task, immediately sending a display task for prompting the completion of the initialization task to each process; wherein, each process is used for synchronously executing the received tasks. By adopting the method, the states of all processes are unified when the initialization task is executed, corresponding prompt contents are displayed when the initialization task is started and completed, on one hand, a user can be effectively prompted, on the other hand, when the initialization task is not completed, the target service is in an unavailable state, the target service is ensured to be displayed in the available state when the initialization is completely completed, and the availability of the target service is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an implementation environment of a service processing method based on multiple processes according to an embodiment of the present application;
FIG. 2 is a flowchart of a business processing method based on multiple processes according to an embodiment of the present application;
FIG. 3 is a flowchart of another business processing method based on multiple processes according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a target application client according to an embodiment of the present application;
FIG. 5 is a schematic illustration of a first interface provided in accordance with an embodiment of the present application;
FIG. 6 is a schematic illustration of a second interface provided in accordance with embodiments of the present application;
FIG. 7 is a flowchart of another business processing method based on multiple processes according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a business processing apparatus based on multiple processes according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, the following detailed description of the embodiments of the present application will be made with reference to the accompanying drawings.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In this application, the terms "first," "second," and the like are used for distinguishing identical or similar items with substantially identical functions and functionalities, and it should be understood that "first," "second," and "n" have no logical or temporal dependency, and no limitation on the number or execution order. It will be further understood that, although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by these terms.
These terms are only used to distinguish one element from another. For example, a first process can be referred to as a second process, and similarly, a second process can also be referred to as a first process, without departing from the scope of the various examples. The first process and the second process may both be processes, and in some cases, may be separate and distinct processes.
For example, the at least one process may be an integer number of processes greater than or equal to one, such as one process, two processes, three processes, and the like. The plurality of processes means two or more, and the plurality of processes may be any integer number of processes not less than two, such as two processes and three processes.
The following describes key terms or abbreviations that may be used in the multi-process based service processing scheme provided in the embodiments of the present application.
Internet of Things (The Internet of Things, IOT): the intelligent sensing, identification and management of objects and processes are realized by various devices and technologies such as various information sensors, radio frequency identification technologies, global positioning systems, infrared sensors, laser scanners and the like, acquiring any object or process needing monitoring, connection and interaction in real time, acquiring various required information such as sound, light, heat, electricity, mechanics, chemistry, biology, position and the like, and realizing ubiquitous connection of the objects, the objects and people through various possible network accesses. The internet of things is an information bearer based on the internet, a traditional telecommunication network and the like, and all common physical objects which can be independently addressed form an interconnected network.
Inter-Process Communication (IPC): and the programming interfaces are used for coordinating different processes to simultaneously run in an operating system and mutually transmit and exchange information. This enables a program to handle the requirements of many users at the same time.
Android Interface Definition Language (AIDL): an interface for open services for cross-process access in android applications.
Observer mode: a software design model. In this mode, a target object manages all the observer objects that depend on it, and actively issues notifications when its own state changes. This schema is typically used to implement an event processing system.
Activity: an application component is a component responsible for interacting with a user. In an android application, an Activity is usually a separate screen on which controls are displayed and which can also listen and process events of the user and respond. Activities communicate over a network.
EventCenter: an event center component for distributing events according to a centralized event bus, the core being a register-back modulation based on observer patterns.
OnCreate: a message response function to "indicate that a window is being generated. It does not generate a window, but sets the attributes of the window such as style, position color, etc. before the window is displayed.
Decoupling: i.e. to reduce the degree of coupling. The coupling must exist in the dependence relationship between the modules, and theoretically the absolute zero coupling cannot be realized, but the coupling degree can be reduced to the minimum by some methods. Such as event driven mode, observer mode, chain of responsibility mode, etc.
And Map: the key is mapped to an object of values. A mapping cannot contain duplicate keys; each key can only map to one value at most. A one-to-one mapping of keys and values.
bond-Value (Key-Value): a database storing data in key-value pairs, the entire database can be understood as a large Map, each key corresponding to a unique value.
Boolean value (Boolean): including two values, True and False.
An implementation environment of the service processing method based on multiple processes provided by the embodiment of the present application is described below.
Fig. 1 is a schematic diagram of an implementation environment of a business processing method based on multiple processes according to an embodiment of the present application. The implementation environment includes: a terminal 101 and a server 102. Illustratively, terminal 101 is a terminal used by a user. The terminal 101 and the server 102 can be directly or indirectly connected through wired or wireless communication, and the application is not limited herein. Optionally, the terminal 101 is a smartphone, a tablet, a laptop, a desktop computer, etc., but is not limited thereto. The terminal 101 can be installed and run with a target application client that can handle at least one service.
Optionally, the target application client is a mobile payment client, a shopping client, or other application client with mobile payment or shopping function, such as a social application client with mobile payment or shopping function, etc. Optionally, the service to be processed is a payment service, an authentication service, a game service, or the like. For example, a mobile payment client is running on the terminal 101, and the mobile payment client can be used for processing a face-brushing payment service or a code-scanning payment service, and the mobile payment client running in the terminal 101 logs in a user account of the user.
The server 102 may be an independent physical server, a server cluster or a distributed system including a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform. The server 102 is configured to provide a background service for a target application client running on the terminal 101.
Optionally, in the multi-process service processing process, the server 102 undertakes primary computation, and the terminal 101 undertakes secondary computation; or, the server 102 undertakes the secondary computing work, and the terminal 101 undertakes the primary computing work; alternatively, the server 102 or the terminal 101 can be respectively capable of separately assuming the calculation work.
Optionally, the terminal 101 generally refers to one of a plurality of terminals, and the embodiment of the present application is illustrated by the terminal 101. Those skilled in the art will appreciate that the number of terminals 101 can be greater. For example, the number of the terminals 101 is several tens or several hundreds, or more, and in this case, the implementation environment of the multi-process based service processing method further includes other terminals. The number of terminals and the type of the device are not limited in the embodiments of the present application.
Optionally, the wireless or wired networks described above use standard communication techniques and/or protocols. The Network is typically the Internet, but can be any Network including, but not limited to, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), any combination of mobile, wired or wireless networks, private networks, or virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including Hypertext Markup Language (HTML), Extensible Markup Language (XML), and the like. All or some of the links can also be encrypted using conventional encryption techniques such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec). In other embodiments, custom and/or dedicated data communication techniques can also be used in place of or in addition to the data communication techniques described above.
Illustratively, the application scenarios of the service processing method based on multiple processes provided in the embodiment of the present application include, but are not limited to, the following exemplary scenarios:
scene one, face brushing payment scene
With the development of face recognition technology, order payment realized through face recognition becomes a common payment mode at present. In the related technology, the payment equipment with the double display screens can start corresponding face brushing payment business according to a face brushing payment mode selected by a merchant or a customer, the payment equipment comprises the two display screens, namely the payment equipment needs to simultaneously operate two display screen processes when processing the face brushing payment business, and by adopting the business processing method based on multi-process processing provided by the application, the initialization processes of the two display screens can be unified, the merchant or the customer can be timely prompted, further, the business available state can be entered when the face brushing payment business is completely initialized, and the usability of the face brushing payment business is improved.
Scenario two, identity verification scenario
With the development of internet technology and face recognition technology, identity authentication is required in many occasions. In some authentication scenarios, when the authentication device executes an authentication service, multiple display screen processes need to be run simultaneously. For example, the verifying personnel needs to perform identity verification on a plurality of verified personnel at the same time, and when the identity verification device executes an identity verification service, the identity verification device needs to start each display screen at the same time to perform initialization tasks such as light adjustment and camera parameter adjustment. At the moment, the multi-process-based service processing method provided by the application can unify the initialization process of each display screen and prompt verification personnel in time, further ensures that the authentication service enters a service available state when the authentication service completely completes the initialization task, and improves the usability of the authentication service.
Scene three, multi-screen interaction scene
The multi-screen interaction scene refers to that screens of different devices are mutually connected and converted through connecting devices. For example, a movie on a mobile phone can be played on a television, pictures on a tablet can be shared on the television, the content of a computer can be projected on the television, and the like. In some multi-screen interaction scenarios, a target application client needs to run a target service on screens of different devices at the same time, for example, in a multi-screen game interaction scenario, each screen corresponds to a user, and when a game service is started, each screen process needs to perform initialization tasks such as authentication, network authentication, and the like on users participating in a game. At this time, the multi-process-based service processing method provided by the application can unify the initialization process of each screen and prompt each game user in time, further, the game service can enter the available state of the game service when the game service completely completes the initialization task, and the usability of the game service is improved.
In the embodiment of the present application, a service processing method based on multiple processes is provided, and usually in a multiple process scenario, when a target service is executed, multiple processes may be started simultaneously. Taking a payment device with dual display screens as an example, when the payment device executes a certain service, the two display screen processes start an initialization task at the same time. However, the time lengths of the two processes for executing the initialization task are often not uniform, and sometimes, one of the display screen processes is already initialized, and the other display screen process is not yet completed; in addition, in the whole initialization process, the user does not know the specific state of the initialization task, so that when the initialization task is not completely completed by the two display screen processes, the user already starts to use the target service on the payment device, and the target service is still in an unavailable state in reality, so that the usability of the target service is poor, and extremely poor experience is brought to the user. When the service processing method provided by the embodiment of the application executes the target service, corresponding initialization states are displayed when the initialization task is started and completed, and the target service can be executed only when the initialization task is completed, so that the usability of the service flow is greatly improved, the feedback is given to a user in time, the use experience of the user is improved, and more specific description is provided in the following embodiments.
Fig. 2 is a flowchart of a service processing method based on multiple processes according to an embodiment of the present application, and as shown in fig. 2, the embodiment of the present application is described by taking an application to a terminal as an example. The method comprises the following steps:
201. in response to the acquired execution instruction of the target service, respectively sending an initialization task to the first process and the at least one second process, and respectively sending a first display task to the first process and the at least one second process; the first process and the second process are used for synchronously executing the received tasks, and the first display task is used for indicating that a first prompt message for initializing the task to be started is displayed on the first interface.
In the embodiment of the application, a target application client installed on a terminal is responsible for executing a target service, and the target service needs to synchronously run a first process and at least one second process during execution. The first interface is an interface displayed on a terminal screen when the initialization task is started.
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 a face-brushing payment service, or a code-scanning payment service, etc. The embodiments of the present application do not limit this.
Wherein the initialization task is a task corresponding to the target service. For example, when the target service is a face-brushing payment service, the terminal needs to set parameters such as exposure rate, resolution, backlight compensation and the like of the camera through an initialization task, initialize a network environment and the like. For another example, when the target service is a code scanning payment service, the terminal needs to set the display brightness of the screen, the size of the display window, and the like through an initialization task. The embodiments of the present application do not limit this.
202. Responding to the completion of the initialization task, respectively sending a second display task to the first process and at least one second process, and starting to execute the target service; the second display task is used for indicating that a second prompt message that the initialization task is completed is displayed on a second interface.
In the embodiment of the application, the second interface refers to an interface displayed on a terminal screen when the initialization task is completed.
In the embodiment of the application, when the target service is executed in a multi-process scene, firstly, an initialization task is sent to each process respectively, and then, a display task for prompting that the initialization task is started is sent to each process respectively; further, responding to the completion of the initialization task, immediately sending a display task for prompting the completion of the initialization task to each process; wherein, each process is used for synchronously executing the received tasks. By adopting the method, the states of all processes are unified when the initialization task is executed, corresponding prompt contents are displayed when the initialization task is started and completed, on one hand, a user can be effectively prompted, on the other hand, when the initialization task is not completed, the target service is in an unavailable state, the target service is ensured to be displayed in the available state when the initialization is completely completed, and the availability of the target service is improved.
Fig. 2 is only a basic flow of the present application, and the service processing scheme based on multiple processes provided by the present application is further described below by taking two processes as an example based on a specific implementation. It should be noted that the following embodiments are merely illustrative, and the embodiments of the present application are not limited to two processes, but may start multiple processes simultaneously, and the embodiments of the present application are not limited to this.
Fig. 3 is a flowchart of another service processing method based on multiple processes according to an embodiment of the present application, and as shown in fig. 3, the service processing method is described in the embodiment of the present application by taking an application to a terminal as an example. The method comprises the following steps:
301. and starting a first process in response to the acquired execution instruction of the target service.
In the embodiment of the application, the terminal provides a function of selecting the target service, a user can perform a selection operation of the target service at the terminal to trigger a corresponding execution instruction, and the terminal starts a first process in response to acquiring the execution instruction. The first process is one of a plurality of processes which are required to be operated by the terminal to execute the target service.
Optionally, taking a terminal as an example of a payment device, a mobile payment client is operated on the terminal, and the payment device is provided with two display screens, a front screen and a back screen for short, which respectively correspond to a front screen process and a back screen process, wherein the front screen faces a customer, and the back screen faces a merchant. When the merchant charges through the payment equipment, the face brushing payment service can be selected on the payment service selection interface displayed on the back screen. For example, the display screen is a touch display screen, a merchant can click a face-brushing payment service on the back screen to trigger a corresponding execution instruction, and the terminal starts a back screen process in response to acquiring the execution instruction.
In some embodiments, a payment service selection interface is displayed on a front screen of the terminal for the customer to select the payment service at his or her discretion. The embodiments of the present application do not limit this.
302. And respectively sending initialization tasks to the first process and the second process in response to the first scheduling request sent by the first process.
In the embodiment of the present application, the first scheduling request is used to request the terminal to start the service logic of the initialization task. The initialization tasks of the first process and the second process are the same. Optionally, the terminal includes an independent initialization start module, where the initialization start module is used to start the service logic of the initialization task; in addition, the terminal also comprises an inter-process communication module which is used for realizing task distribution and information interaction among processes.
Alternatively, step 302 can be replaced by "in response to acquiring the first scheduling request, scheduling the initialization start module, and sending the initialization tasks to the first process and the second process respectively through the inter-process communication module". This alternative implementation is explained in detail below:
the terminal runs a target application client, after the target application client starts a first process, the first process starts an Activity component, an OnCreate function in the Activity component is called, a first scheduling request is sent to the target application client through the OnCreate function, the target application client responds to the first scheduling request, an initialization starting module is scheduled to start service logic of an initialization task, and the initialization starting module sends the initialization task to the first process and a second process through an inter-process communication module.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a target application client according to an embodiment of the present application. As shown in fig. 4, the target application client includes a first process 410, a second process 420, an initialization start module 430, and an inter-process communication module 440. The initialization start module 430 performs information interaction with the first process 410 and the second process 420 through the inter-process communication module 440.
303. And responding to a second scheduling request sent by the first process, and sending a first display task to the first process and a second process respectively, wherein the first display task is used for indicating that a first prompt message of starting the initialization task is displayed on a first interface.
In this embodiment of the application, the second scheduling request is used to request the terminal to manage interface display of the initialization task. Optionally, the terminal includes an independent interface management module for managing interface display of the initialization task.
Alternatively, in this step 303, the interface management module may be scheduled to send the first display task to the first process and the second process respectively through the inter-process communication module in response to the second scheduling request being obtained. This alternative implementation is explained in detail below:
after a target application client running on a terminal starts a first process, an Activity component is started by the first process, an OnCreate function in the Activity component is called, a second scheduling request is sent to the target application client through the OnCreate function, the target application client responds to the second scheduling request, an interface management module is scheduled to manage interface display of an initialization task, and the interface management module sends first display tasks to the first process and the second process through an inter-process communication module.
Optionally, in the foregoing optional implementation manner, the terminal further includes a message management module, where the message management module is configured to perform task distribution according to the received task. In addition, the first process and the second process respectively comprise a monitoring module and an interface display module, and the monitoring module is used for calling the interface display module to display a corresponding interface according to the received display task. Illustratively, this step 303 further includes the following step 3031:
3031. sending a first display task to a monitoring module of a first process and sending the first display task to a monitoring module of a second process through a message management module; the first display task is used for indicating the monitoring module to call the interface display module to display a first interface.
The message management module may be implemented by an EventCenter component, the monitoring module may be implemented by an Activity component, and the interface display module may also be implemented by an Activity component, which is not limited in this embodiment of the present application.
Illustratively, with continuing reference to fig. 4, as shown in fig. 4, the target application client further 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, and 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 implements information interaction with the first process 410 and the second process 420 through the inter-process communication module 440.
Optionally, the terminal includes a first display screen and a second display screen, where the first display screen is disposed opposite to the second display screen, and the first display screen faces the first user and is also called a back screen; the second display screen faces a second user, also called a front screen; the first display task is used for indicating that the first interface is displayed on the first display screen and the second display screen respectively. This alternative implementation is schematically illustrated below:
referring to fig. 5, schematically, fig. 5 is a schematic diagram of a first interface provided in an embodiment of the present application. As shown in fig. 5, a first interface 511 is displayed on the first display screen 510, and a first prompt message 1 that the initialization task is started is displayed on the first interface 511; accordingly, a first interface 521 is displayed on the second display 520, and a first prompt message 2 indicating that the initialization task is started is displayed on the first interface 521.
In some embodiments, the first interfaces respectively displayed on the two display screens of the terminal have different forms, and the content of the first prompt message is also different, so that different forms of feedback can be given to different users, and the use experience of the users is improved. In other embodiments, the content of the first prompting message respectively displayed on the two display screens of the terminal is the same. The embodiment of the present application does not limit the display form of the first interface and the first prompt message.
Through the steps 301 to 303, when the terminal obtains the execution instruction of the target service, the first process is started, then the service logic of the initialization task is started first through the first process, and further, the first process sends the first display task to the first process and the second process respectively, so that a prompt message that the initialization task is started is displayed on a screen of the terminal in time, a function of feeding back the current state of the initialization task to the user is achieved, and the use experience of the user is greatly improved. In addition, in the above steps 301 to 303, the terminal implements operations such as task distribution by the scheduling request of the first process, and thus, a confusion phenomenon caused by simultaneous execution of multiple tasks in a multi-process scenario can be avoided.
304. And responding to the completion of the initialization task, respectively sending a second display task to the first process and the second process, and starting to execute the target service, wherein the second display task is used for indicating that a second prompt message of the completion of the initialization task is displayed on a second interface.
Optionally, a state management module is included in the first process, and the state management module is configured to obtain an initialization result of the initialization task, where the initialization result is used to indicate an initialization state of the initialization task. For example, the initialization status is success, or the initialization status is failure, and the like, which is not limited in the embodiment of the present application. Optionally, the first process and the second process respectively correspond to one initialization result.
Optionally, in this step 304, "in response to the initialization task being completed, sending the second display task to the first process and the second process respectively," includes the following steps 3041 to 3042:
3041. and in response to the third scheduling request sent by the initialization starting module, scheduling the state management module in the first process to obtain at least one initialization result of the initialization task.
The third scheduling request is used for obtaining at least one initialization result of the initialization task.
Optionally, the initialization task includes at least one subtask, and the state management module may acquire all subtasks of the initialization task and then classify the subtasks, so as to conveniently acquire result states of different initialization subtasks.
3042. And responding to the first condition that the initialization result meets, and respectively sending a second display task to the first process and the second process through the interface management module.
The first condition refers to that the number of the initialization results is equal to a target threshold, and no failure item exists in any initialization result. Optionally, the absence of a failure item in any initialization result means that no failure item exists in each initialization result.
In the embodiment of the present application, two processes are exemplified, and therefore, the target threshold is 2. The following describes the above steps 3041 and 3042 in detail with the target threshold value as 2:
optionally, a target application client is operated on the terminal, the initialization start module sends a third scheduling request to the target application client, the target application client responds to the third scheduling request, the state management module is scheduled to obtain at least one initialization result of the initialization task, when the number of the obtained initialization results is equal to 2 and no failure item exists in each initialization result, the state 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.
It should be noted that, when the interface management module sends the first display task to the first process and the second process, the interface management module immediately starts a callback to receive the initialization result from the state management module through the callback function, and when the interface management module receives the initialization result, the interface management module ends the callback. The embodiment of the present application does not limit the type of the callback function.
Optionally, the state management module sets a Map object of Key-Value according to the classification of each subtask, where Key is the name of the subtask and Value is a boolean Value. When the state management module acquires each subtask for the first time, Value of each subtask is False. When the first process and the second process both start the initialization task, the state management module obtains at least one initialization result of the initialization task through the callback function. When two initialization results are obtained, the state management module determines that no failed subtask exists in each initialization result, and sets Value corresponding to all subtasks in Key-Value to True.
Optionally, the terminal includes a message management module, and the first process and the second process each include a monitoring module and an interface display module. Illustratively, this step 304 further includes the following step 3043:
3043. sending a second display task to a monitoring module of the first process and sending the second display task to a monitoring module of the second process through a message management module; the second display task is used for indicating the monitoring module to call the interface display module to display a second interface.
The optional implementation manners of the message management module, the monitoring module, and the interface display module are similar to those in step 303, and therefore are not described herein again.
Illustratively, with continuing reference to fig. 4, as shown in fig. 4, the first process 410 further includes a state management module 414, wherein the interface management module 450 and the state management module 414 are capable of information interaction.
Optionally, the terminal comprises a first display screen and a second display screen. This alternative implementation is schematically illustrated below:
referring to fig. 6, schematically, fig. 6 is a schematic diagram of a second interface provided in an embodiment of the present application. As shown in the left diagram of fig. 6, a second interface 611 is displayed on the first display screen 610, and a second prompt message 3 indicating that the initialization task is completed is displayed on the first interface 611; accordingly, a second interface 621 is displayed on the second display screen 620, and a second prompt message 4 indicating that the initialization task is completed is displayed on the second interface 621. The display form of the second interface and the second prompt message is not limited in the embodiment of the application.
Optionally, the present step 304 further includes the following steps 3044 and 3045:
3044. and responding to the completion of the initialization task, and respectively sending a second display task to the first process and the second process, wherein the second display task is used for indicating that a second prompt message of the completion of the initialization task is displayed on a second interface.
3045. And starting to execute the target service in response to the first trigger operation of the second interface.
The first trigger operation may be a click operation or a voice input operation, which is not limited in this application. Through the above steps 3044 and 3045, the terminal executes the target service in response to the operation of the user after completing the initialization task, so as to prompt the user that the initialization of the target user is completed in time, improve the user experience, and ensure the availability of the target service.
305. Responding to the failure of the initialization task, and respectively sending a third display task to the first process and the second process; and the third display task is used for indicating that a third prompt message indicating that the initialization task has failed is displayed on a third interface.
The first point to be noted is that the step 305 and the step 304 are two parallel steps, that is, the step 304 is a step executed by the terminal in response to the completion of the initialization task, and the step 305 is a step executed by the terminal in response to the failure of the initialization task. The optional implementation manner of step 305 is similar to that given in step 304, and therefore is not described herein again.
Alternatively, two optional steps included in this step 305 are schematically illustrated below, and this step 305 includes any one of the following steps 3051 and 3052:
3051. and responding to at least one initialization result of the initialization task meeting a second condition, and respectively sending a third display task to the first process and the second process through the interface management module.
The second condition is that the number of the initialization results is equal to a target threshold, and at least one of the initialization results has a failure item.
Optionally, when the state management module obtains two initialization results, it is determined that a failed subtask exists in one of the initialization results, and then Value corresponding to the failed subtask in Key-Value is kept unchanged. And simultaneously, the state management module sends the acquired initialization result and the Key-Value to the interface management module.
3052. Responding to the monitored target event, and respectively sending a third display task to the first process and the second process through the interface management module; the target event means that the starting time length of the initialization task is equal to a target time length.
Optionally, the state management module of the first process has a monitoring function, and the state management module can uniformly start all subtasks in the initialization task and set a target duration. After the initialization task is started, if the starting time of the initialization task reaches the target time and the subtasks are not completed, it is determined that the initialization task is overtime, that is, the target event is monitored. At this time, the state manager obtains at least one initialization result of the initialization task through the callback function, sets Value corresponding to the completed subtask in the initialization result to True, and keeps Value corresponding to the subtask failed in Key-Value unchanged. Meanwhile, the state management module sends the obtained initialization result and the Key-Value to the interface management module.
Illustratively, this step 305 also includes the following step 3053:
3053. sending a third display task to a monitoring module of the first process and sending the third display task to a monitoring module of the second process through a message management module; and the third display task is used for indicating the monitoring module to call the interface display module to display a third interface.
Optionally, after performing step 305, the terminal can further perform the following steps: and responding to a second trigger operation on the third interface, and acquiring the execution instruction of the target service again.
The second trigger operation may be a click operation or a voice input operation. The embodiments of the present application do not limit this. Optionally, after the terminal displays the third interface, the terminal acquires the execution instruction of the target service again according to a default manner, which is not limited in the embodiment of the present application.
In addition, in the embodiment of the present application, two processes are taken as an example for explanation, and in some embodiments, when a target application client of a terminal performs processing of a target service, the number of running processes is greater than 2. The embodiments of the present application do not limit this. For example, when the number of processes is N, N is greater than 2, the above steps 301 to 305 may be replaced by the following steps 301-1 to 305-1:
301-1, in response to obtaining the execution instruction of the target service, starting a first process.
302-1, in response to acquiring the first scheduling request sent by the first process, sending initialization tasks to the first process and other processes, respectively. The other processes refer to processes other than the first process among the N processes.
303-1, in response to acquiring the second scheduling request sent by the first process, sending a first display task to the first process and other processes respectively, where the first display task is used to indicate that a first prompt message indicating that the initialization task is started is displayed on the first interface.
And 304-1, responding to the completion of the initialization task, respectively sending a second display task to the first process and other processes, and starting to execute the target service, wherein the second display task is used for indicating that a second prompt message for the completion of the initialization task is displayed on a second interface.
305-1, respectively sending a third display task to the first process and other processes in response to the initialization task having failed; and the third display task is used for indicating that a third prompt message indicating that the initialization task has failed is displayed on a third interface.
That is to say, in this embodiment of the present application, when acquiring an execution instruction of a target service, a terminal loads a control logic on a first process, where the first process may also be referred to as a main process, and the main process performs scheduling to implement task distribution, and a specific implementation manner is similar to that in steps 301 to 305, and therefore is not described herein again.
In the embodiment of the application, when the target service is executed in a multi-process scene, firstly, an initialization task is sent to each process respectively, and then, a display task for prompting that the initialization task is started is sent to each process respectively; further, responding to the completion of the initialization task, immediately sending a display task for prompting the completion of the initialization task to each process; wherein, each process is used for synchronously executing the received tasks. By adopting the method, the states of the processes are unified when the initialization tasks are executed, and the corresponding prompt contents are displayed when the initialization tasks are started and completed, so that the user can be effectively prompted, the target service is in an unavailable state when the initialization tasks are not completed, the available state is displayed when the target service is completely initialized, and the availability of the target service is improved.
The service processing method based on multiple processes provided by the embodiment of the present application is described below by way of example in combination with actual situations. Fig. 7 is a flowchart of another business processing method based on multiple processes according to an embodiment of the present application. As shown in fig. 7, a target application client is run on a terminal, where the terminal includes a first display screen and a second display screen, also called a front screen and a back screen, and the two display screens correspond to a front screen process and a back screen process, respectively. The business processing method based on the multiple processes comprises the following steps:
firstly, the terminal responds to an execution instruction of a target service, starts a back screen process, starts an Activity component by the back screen process, and schedules an initialization starting module to start service logic of an initialization task through an OnCreate function in the Activity component.
Secondly, the back screen process continues to schedule the interface display of the interface management module management initialization task through the OnCreate function in the Activity component, namely, the interface display of the front screen and the back screen is updated. The interface management module sends the task of updating the interface display to the front screen process and the back screen process through an interprocess communication module, namely an IPC module. After receiving the task of updating the interface display sent by the interface management module, the front screen process and the back screen process send the task to the Activity component with the monitoring function in each process through the EventCenter component. And after the Activity component with the monitoring function in the front screen process and the back screen process receives the task, starting an Activity component with an interface display function for updating the interface display of the front screen and the back screen.
And thirdly, the back screen process comprises a state management module, the state management module is scheduled by an initialization starting module through an IPC module, and the state management module can acquire the initialization result of the initialization task and set a target time length for monitoring whether the starting time length of the initialization task is overtime or not. And if the initialization results of the current screen process and the back screen process indicate that the initialization task is completed, or the starting time of the initialization task is overtime, or failed subtasks exist in the initialization results of the front screen process or the back screen process, the state manager sends the corresponding initialization results to the interface management module. The interface management module receives the initialization result through the callback interface and informs the front screen process and the back screen process to update the interface display through the IPC module according to the received initialization result.
In the above embodiment, the interface management module can reduce the coupling degree between the service logic layer and the interface display layer, and plays a role in decoupling. Schematically, the business logic layer 710 and the interface display layer 720 are shown in fig. 7. The interface display module integrates details of all initialization tasks, can help the initialization tasks to complete data display, and meanwhile, the interface management module can realize task distribution through IPC in time and update interface display when the initialization tasks are started and the state management module notifies.
In the embodiment of the application, when the target service is executed in a multi-process scene, firstly, an initialization task is sent to each process respectively, and then, a display task for prompting that the initialization task is started is sent to each process respectively; further, responding to the completion of the initialization task, immediately sending a display task for prompting the completion of the initialization task to each process; wherein, each process is used for synchronously executing the received tasks. By adopting the method, the states of all processes are unified when the initialization task is executed, corresponding prompt contents are displayed when the initialization task is started and completed, on one hand, a user can be effectively prompted, on the other hand, when the initialization task is not completed, the target service is in an unavailable state, the target service is ensured to be displayed in the available state when the initialization is completely completed, and the availability of the target service is improved.
Fig. 8 is a schematic structural diagram of a business processing apparatus based on multiple processes according to an embodiment of the present application. The apparatus is used for executing the steps when the method is executed, and referring to fig. 8, the apparatus comprises: a first transmission module 801 and a second transmission module 802.
A first sending module 801, configured to send, in response to an execution instruction of an acquired target service, an initialization task to a first process and at least one second process, and send a first display task to the first process and the at least one second process, respectively; the first process and the second process are used for synchronously executing the received tasks, and the first display task is used for indicating that a first prompt message of which the initialization task is started is displayed on a first interface;
a second sending module 802, configured to send, in response to that the initialization task is completed, a second display task to the first process and at least one of the second processes, respectively, and start to execute the target service; the second display task is used for indicating that a second prompt message that the initialization task is completed is displayed on a second interface.
In an optional implementation manner, the first sending module 801 includes:
the starting unit is used for responding to the execution instruction of the acquired target service and starting the first process;
a first sending unit, configured to send the initialization task to the first process and at least one second process respectively in response to obtaining a first scheduling request sent by the first process;
and the second sending unit is used for responding to the second scheduling request sent by the first process, and sending the first display task to the first process and at least one second process respectively.
In an optional implementation manner, the first sending unit is configured to:
responding to the acquired first scheduling request, scheduling an initialization starting module, and respectively sending the initialization tasks to the first process and at least one second process through an inter-process communication module;
the initialization starting module is used for starting the business logic of the initialization task.
In an optional implementation manner, the second sending unit is configured to:
in response to the second scheduling request, scheduling an interface management module, and sending the first display task to the first process and at least one second process through an inter-process communication module;
the interface management module is used for managing interface display of the initialization task.
In an optional implementation manner, the second sending module 802 includes:
the acquiring unit is used for responding to a third scheduling request sent by the initialization starting module, scheduling the state management module in the first process and acquiring at least one initialization result of the initialization task;
a third sending unit, configured to send, through an interface management module, the second display task to the first process and the at least one second process in response to that the initialization result meets a first condition, where the first condition indicates that the number of the initialization results is equal to a target threshold, and no failure item exists in any of the initialization results;
the interface management module is used for managing interface display of the initialization task.
In an optional implementation, the apparatus further comprises:
a third sending module, configured to send a third display task to the first process and the at least one second process, respectively, in response to that the initialization task has failed; wherein the third display task is used for indicating that a third prompt message that the initialization task has failed is displayed on a third interface.
In an optional implementation manner, the third sending module includes any one of the following:
a fourth sending unit, configured to send, through an interface management module, the third display task to the first process and the at least one second process respectively in response to that at least one initialization result of the initialization task meets a second condition; wherein, the second condition means that the number of the initialization results is equal to a target threshold, and at least one of the initialization results has a failure item;
a fifth sending unit, configured to send, in response to monitoring of the target event, the third display task to the first process and the at least one second process through the interface management module, respectively; the target event means that the starting time length of the initialization task is equal to the target time length;
the interface management module is used for managing interface display of the initialization task.
In an optional implementation manner, the first sending module is configured to:
sending the first display task to a monitoring module of the first process and sending the first display task to at least one monitoring module of the second process through a message management module;
the first display task is used for indicating the monitoring module to call the interface display module to display the first interface.
In an optional implementation, the apparatus further comprises any one of:
a fourth sending module, configured to send the second display task to the monitoring module of the first process and send the second display task to at least one monitoring module of the second process through the message management module; the second display task is used for indicating the monitoring module to call an interface display module to display the second interface;
a fifth sending module, configured to send, through the message management module, the third display task to the monitoring module of the first process, and send the third display task to the monitoring module of at least one second process; and the third display task is used for indicating the monitoring module to call the interface display module to display the third interface.
In the embodiment of the application, when the target service is executed in a multi-process scene, firstly, an initialization task is respectively sent to each process, and then, a display task for prompting that the initialization task is started is respectively sent to each process; further, responding to the completion of the initialization task, immediately sending a display task for prompting the completion of the initialization task to each process; wherein, each process is used for synchronously executing the received tasks. By adopting the device, the states of the processes are unified when the initialization tasks are executed, corresponding prompt contents are displayed when the initialization tasks are started and completed, on one hand, a user can be effectively prompted, on the other hand, when the initialization tasks are not completed, the target service is in an unavailable state, the condition that the available state is displayed when the target service is completely initialized is ensured, and the availability of the target service is improved.
It should be noted that: in the service processing device based on multiple processes provided in the foregoing embodiment, when processing a service, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the service processing apparatus based on multiprocess provided by the foregoing embodiment and the service processing method based on multiprocess belong to the same concept, and the specific implementation process thereof is detailed in the method embodiment and is not described herein again.
In an exemplary embodiment, a computer device is also provided. Taking a computer device as an example of a terminal, fig. 9 shows a block diagram of a terminal 900 according to an exemplary embodiment of the present application. The terminal 900 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer or a desktop computer. Terminal 900 may also be referred to by other names such as user equipment, portable terminals, laptop terminals, desktop terminals, and the like.
In general, terminal 900 includes: a processor 901 and a memory 902.
Processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 901 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 901 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
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, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 902 is used for storing at least one program code for execution by the processor 901 to implement the multi-process based business process methods provided by the method embodiments in the present application.
In some embodiments, terminal 900 can also optionally include: a peripheral interface 903 and at least one peripheral. The processor 901, memory 902, and peripheral interface 903 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 903 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 904, a display screen 905, a camera assembly 906, an audio circuit 907, a positioning assembly 908, and a power supply 909.
The peripheral interface 903 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, memory 902, and peripheral interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902 and the peripheral interface 903 may be implemented on a separate chip or circuit board, which is not limited by this embodiment.
The Radio Frequency circuit 904 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 904 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 904 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 904 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 904 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 904 may also include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 905 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 905 is a touch display screen, the display screen 905 also has the ability to capture touch signals on or over the surface of the display screen 905. The touch signal may be input to the processor 901 as a control signal for processing. At this point, the display 905 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 905 may be one, provided on the front panel of the terminal 900; in other embodiments, the number of the display panels 905 may be at least two, and each of the display panels is disposed on a different surface of the terminal 900 or is in a foldable design; in other embodiments, the display 905 may be a flexible display disposed on a curved surface or a folded surface of the terminal 900. Even more, the display screen 905 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display panel 905 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
The camera assembly 906 is used to capture images or video. Optionally, camera assembly 906 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 906 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Audio circuit 907 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 901 for processing, or inputting the electric signals to the radio frequency circuit 904 for realizing voice communication. For stereo sound acquisition or noise reduction purposes, the microphones may be multiple and disposed at different locations of the terminal 900. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 901 or the radio frequency circuit 904 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuit 907 may also include a headphone jack.
The positioning component 908 is used to locate a current geographic Location of the terminal 900 for navigation or LBS (Location Based Service). The Positioning component 908 may be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, the grignard System in russia, or the galileo System in the european union.
Power supply 909 is used to provide power to the various components in terminal 900. The power source 909 may be ac, dc, disposable or rechargeable. When power source 909 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 900 can also include one or more sensors 910. The one or more sensors 910 include, but are not limited to: acceleration sensor 911, gyro sensor 912, pressure sensor 913, fingerprint sensor 914, optical sensor 915, and proximity sensor 916.
The acceleration sensor 911 can detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 900. For example, the acceleration sensor 911 may be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 901 can control the display screen 905 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 911. The acceleration sensor 911 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 912 may detect a body direction and a rotation angle of the terminal 900, and the gyro sensor 912 may cooperate with the acceleration sensor 911 to acquire a 3D motion of the user on the terminal 900. Based on the data collected by gyroscope sensor 912, processor 901 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 913 may be disposed on a side bezel of the terminal 900 and/or underneath the display 905. When the pressure sensor 913 is disposed on the side frame of the terminal 900, the user's holding signal of the terminal 900 may be detected, and the processor 901 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 913. When the pressure sensor 913 is disposed at a lower layer of the display screen 905, the processor 901 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 905. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 914 is used for collecting a fingerprint of the user, and the processor 901 identifies the user according to the fingerprint collected by the fingerprint sensor 914, or the fingerprint sensor 914 identifies the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, processor 901 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 914 may be disposed on the front, back, or side of the terminal 900. When a physical key or vendor Logo is provided on the terminal 900, the fingerprint sensor 914 may be integrated with the physical key or vendor Logo.
The optical sensor 915 is used to collect ambient light intensity. In one embodiment, the processor 901 may 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 adjusted down. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 according to the ambient light intensity collected by the optical sensor 915.
Proximity sensor 916, also known as a distance sensor, is typically disposed on the front panel of terminal 900. The proximity sensor 916 is used to collect the distance between the user and the front face of the terminal 900. In one embodiment, when the proximity sensor 916 detects that the distance between the user and the front face of the terminal 900 gradually decreases, the processor 901 controls the display 905 to switch from the bright screen state to the dark screen state; when the proximity sensor 916 detects that the distance between the user and the front surface of the terminal 900 gradually becomes larger, the display 905 is controlled by the processor 901 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 9 does not constitute a limitation of terminal 900, and may include more or fewer components than those shown, or may combine certain components, or may employ a different arrangement of components.
The embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium is applied to a computer device, and at least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor to implement the operations performed by the computer device in the multi-process based service processing method according to the foregoing embodiment.
Embodiments of the present application also provide a computer program product or a computer program comprising computer program code stored in a computer readable storage medium. The processor of the computer device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the computer device executes the multiprocess-based business processing method provided in the above-mentioned various alternative implementations.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (15)

1. A business processing method based on multiple processes is characterized in that the method comprises the following steps:
in response to an execution instruction of an acquired target service, respectively sending an initialization task to a first process and at least one second process, and respectively sending a first display task to the first process and the at least one second process; the first process and the second process are used for synchronously executing the received tasks, and the first display task is used for indicating that a first prompt message of which the initialization task is started is displayed on a first interface;
responding to the completion of the initialization task, respectively sending a second display task to the first process and at least one second process, and starting to execute the target service; the second display task is used for indicating that a second prompt message that the initialization task is completed is displayed on a second interface.
2. The method according to claim 1, wherein the sending an initialization task to a first process and at least one second process, respectively, and sending a first display task to the first process and at least one second process, respectively, in response to the execution instruction to acquire the target service, comprises:
starting the first process in response to the acquisition of the execution instruction of the target service;
responding to a first scheduling request sent by the first process, and sending the initialization task to the first process and at least one second process respectively;
and responding to a second scheduling request sent by the first process, and sending the first display task to the first process and at least one second process respectively.
3. The method according to claim 2, wherein the sending the initialization tasks to the first process and at least one of the second processes, respectively, in response to acquiring the first scheduling request of the first process, comprises:
in response to the first scheduling request, scheduling an initialization starting module, and sending the initialization tasks to the first process and at least one second process through an inter-process communication module;
the initialization starting module is used for starting the business logic of the initialization task.
4. The method according to claim 2, wherein the sending the first display task to the first process and at least one of the second processes, respectively, in response to obtaining a second scheduling request to the first process, comprises:
in response to the second scheduling request, scheduling an interface management module, and sending the first display task to the first process and at least one second process through an inter-process communication module;
the interface management module is used for managing interface display of the initialization task.
5. The method of claim 1, wherein sending a second display task to the first process and at least one of the second processes, respectively, in response to the initialization task being completed comprises:
in response to acquiring a third scheduling request sent by an initialization starting module, scheduling a state management module in the first process, and acquiring at least one initialization result of the initialization task;
responding to that the initialization results meet first conditions, and sending the second display tasks to the first process and at least one second process through an interface management module respectively, wherein the first conditions refer to that the number of the initialization results is equal to a target threshold value, and no failure item exists in any initialization result;
the interface management module is used for managing interface display of the initialization task.
6. The method of claim 1, further comprising:
in response to the initialization task having failed, sending a third display task to the first process and at least one of the second processes, respectively; the third display task is used for indicating that a third prompt message that the initialization task has failed is displayed on a third interface.
7. The method of claim 6, wherein the sending a third display task to the first process and at least one of the second processes, respectively, in response to the initialization task having failed comprises any one of:
responding to at least one initialization result of the initialization task to meet a second condition, and respectively sending the third display task to the first process and at least one second process through an interface management module; the second condition is that the number of the initialization results is equal to a target threshold, and at least one initialization result has a failure item;
responding to a monitored target event, and respectively sending the third display task to the first process and at least one second process through the interface management module; the target event means that the starting time length of the initialization task is equal to the target time length;
the interface management module is used for managing the interface display of the initialization task.
8. The method of claim 1, further comprising:
sending the first display task to a monitoring module of the first process and sending the first display task to a monitoring module of at least one second process through a message management module;
the first display task is used for indicating the monitoring module to call an interface display module to display the first interface.
9. The method of claim 6, further comprising any of:
sending the second display task to a monitoring module of the first process and sending the second display task to at least one monitoring module of the second process through a message management module; the second display task is used for indicating the monitoring module to call an interface display module to display the second interface;
sending, by the message management module, the third display task to a monitoring module of the first process, and sending the third display task to a monitoring module of at least one of the second processes; the third display task is used for indicating the monitoring module to call the interface display module to display the third interface;
the interface management module is used for managing the interface display of the initialization task.
10. The method according to any one of claims 1 to 9, applied to a terminal comprising a first display screen and a second display screen, wherein the first display screen is arranged opposite to the second display screen, the first display screen faces a first user, and the second display screen faces a second user;
the first display task is used for indicating that the first interface is displayed on the first display screen and the second display screen respectively;
the second display task is used for indicating that the second interface is displayed on the first display screen and the second display screen respectively.
11. A multiprocessing based service processing apparatus, comprising:
the first sending module is used for responding to an execution instruction of the acquired target service, respectively sending an initialization task to a first process and at least one second process, and respectively sending a first display task to the first process and the at least one second process; the first process and the second process are used for synchronously executing the received tasks, and the first display task is used for indicating that a first prompt message of which the initialization task is started is displayed on a first interface;
a second sending module, configured to send, in response to that the initialization task is completed, a second display task to the first process and the at least one second process, respectively, and start to execute the target service; the second display task is used for indicating that a second prompt message that the initialization task is completed is displayed on a second interface.
12. The apparatus of claim 11, wherein the first sending module comprises:
the starting unit is used for responding to the execution instruction of the acquired target service and starting the first process;
a first sending unit, configured to send the initialization task to the first process and at least one second process, respectively, in response to obtaining a first scheduling request sent by the first process;
and a second sending unit, configured to send the first display task to the first process and at least one second process, respectively, in response to obtaining a second scheduling request sent by the first process.
13. The apparatus of claim 12, wherein the first sending unit is configured to:
in response to the first scheduling request, scheduling an initialization starting module, and sending the initialization tasks to the first process and at least one second process through an inter-process communication module;
the initialization starting module is used for starting the business logic of the initialization task.
14. A computer arrangement, characterized in that the computer arrangement comprises a processor and a memory for storing at least one computer program, which is loaded by the processor and which performs the method of multiprocess-based transaction processing according to any of the claims 1 to 10.
15. A computer-readable storage medium, in which at least one computer program is stored, which is loaded and executed by a processor to implement the multiprocess-based transaction processing method according to any of the claims 1 to 10.
CN202110191909.XA 2021-02-19 2021-02-19 Business processing method, device, equipment and storage medium based on multiple processes Pending CN114968501A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110191909.XA CN114968501A (en) 2021-02-19 2021-02-19 Business processing method, device, equipment and storage medium based on multiple processes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110191909.XA CN114968501A (en) 2021-02-19 2021-02-19 Business processing method, device, equipment and storage medium based on multiple processes

Publications (1)

Publication Number Publication Date
CN114968501A true CN114968501A (en) 2022-08-30

Family

ID=82954096

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110191909.XA Pending CN114968501A (en) 2021-02-19 2021-02-19 Business processing method, device, equipment and storage medium based on multiple processes

Country Status (1)

Country Link
CN (1) CN114968501A (en)

Similar Documents

Publication Publication Date Title
WO2020238874A1 (en) Vr multi-screen display method and electronic device
CN110674022B (en) Behavior data acquisition method and device and storage medium
CN111324259B (en) Group creation method, device and storage medium
CN111340482B (en) Conflict detection method, device, node equipment and storage medium
CN113204298B (en) Method and device for displaying release progress, electronic equipment and storage medium
WO2021120976A2 (en) Load balance control method and server
CN111092809B (en) Method and device for pushing information in real time, computer equipment and storage medium
CN112420217B (en) Message pushing method, device, equipment and storage medium
CN109766098B (en) Application program running method and device and storage medium
CN113190362A (en) Service calling method and device, computer equipment and storage medium
CN111831385A (en) Business credit information processing method, device, equipment and storage medium
CN113837709A (en) Online processing method and device of business process, terminal and readable storage medium
CN111881423A (en) Method, device and system for limiting function use authorization
WO2023116505A1 (en) Module processing method and apparatus for foreground and background separation system, and storage medium
CN110597840A (en) Partner relationship establishing method, device, equipment and storage medium based on block chain
CN112995587B (en) Electronic equipment monitoring method, system, computer equipment and storage medium
CN112988254B (en) Method, device and equipment for managing hardware equipment
CN112702375B (en) Information pushing method and device, computer equipment and storage medium
CN110971692B (en) Method and device for opening service and computer storage medium
CN114329292A (en) Resource information configuration method and device, electronic equipment and storage medium
CN110570123B (en) Resource information management method, system and device based on block chain
CN114968501A (en) Business processing method, device, equipment and storage medium based on multiple processes
CN112148499A (en) Data reporting method and device, computer equipment and medium
CN111190751A (en) Task processing method and device based on song list, computer equipment and storage medium
CN114173163B (en) Data processing method, device, computer equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40073697

Country of ref document: HK