CN112256421A - Communication processing method, communication processing device, storage medium and electronic equipment - Google Patents

Communication processing method, communication processing device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112256421A
CN112256421A CN202011262429.XA CN202011262429A CN112256421A CN 112256421 A CN112256421 A CN 112256421A CN 202011262429 A CN202011262429 A CN 202011262429A CN 112256421 A CN112256421 A CN 112256421A
Authority
CN
China
Prior art keywords
application
communication
thread
event
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
CN202011262429.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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011262429.XA priority Critical patent/CN112256421A/en
Publication of CN112256421A publication Critical patent/CN112256421A/en
Priority to PCT/CN2021/116981 priority patent/WO2022100244A1/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
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/482Application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Abstract

The embodiment of the application provides a communication processing method, a communication processing device, a storage medium and an electronic device, wherein the communication processing method comprises the following steps: acquiring a communication request generated when a first engine runs in a first application; calling a communication interface in the first engine according to the communication request; determining, by the communication interface, a thread of a second application running in a second engine; sending the communication request to an interface of the second application through the thread; the communication request is processed by the second application. In the communication processing method, the communication interface developed by the third application development language is used for transferring to determine the thread of the second application and send the communication request to the interface of the second application, so that the communication between the first application and the second application developed by different application development languages can be realized, the communication path is short, and the thread switching is not needed in the communication process, so that the communication between the applications developed by different application development languages can be efficiently realized.

Description

Communication processing method, communication processing device, storage medium and electronic equipment
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a communication processing method and apparatus, a storage medium, and an electronic device.
Background
In the computer field, there are many program development languages, for example, Java, JavaScript, C + +, Dart, and other various languages can be used to develop the application program, and the various program development languages are superior and inferior. The application programs developed by different program development languages often cannot be directly communicated due to differences in language specifications, interface specifications and the like, so that communication between the application programs developed by the different program development languages is difficult, and a solution is needed.
Disclosure of Invention
The embodiment of the application provides a communication processing method, a communication processing device, a storage medium and electronic equipment, which can efficiently realize communication between applications developed by different application development languages.
An embodiment of the present application provides a communication processing method, configured to communicate between a first application and a second application, where the first application is developed by a first application development language, and the second application is developed by a second application development language, and the communication processing method includes:
acquiring a communication request generated by a first engine when the first application runs;
calling a communication interface in the first engine according to the communication request, wherein the communication interface is developed by a third application development language;
determining, by the communication interface, a thread of the second application running in a second engine;
sending, by the thread, the communication request to an interface of the second application;
processing the communication request by the second application.
An embodiment of the present application further provides a communication processing apparatus, configured to communicate between a first application and a second application, where the first application is developed by a first application development language, and the second application is developed by a second application development language, and the communication processing apparatus includes:
the acquisition module is used for acquiring a communication request generated when a first engine runs in the first application;
the calling module is used for calling a communication interface in the first engine according to the communication request, and the communication interface is developed by a third application development language;
a determining module to determine, through the communication interface, a thread of the second application running in a second engine;
a sending module, configured to send the communication request to an interface of the second application through the thread;
and the processing module is used for processing the communication request through the second application.
An embodiment of the present application further provides a storage medium, where a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the above communication processing method.
An embodiment of the present application further provides an electronic device, where the electronic device includes a processor and a memory, where a computer program is stored in the memory, and the processor is configured to execute the communication processing method by calling the computer program stored in the memory.
The communication processing method provided by the embodiment of the application comprises the following steps: acquiring a communication request generated when a first engine runs in a first application; calling a communication interface in the first engine according to the communication request, wherein the communication interface is developed by a third application development language; determining, by the communication interface, a thread of a second application running in a second engine; sending the communication request to an interface of the second application through the thread; the communication request is processed by the second application. In the communication processing method, the communication interface developed by the third application development language is used for transferring to determine the thread of the second application and send the communication request to the interface of the second application, so that the communication between the first application and the second application developed by different application development languages can be realized, the communication path is short, and the thread switching is not needed in the communication process, so that the communication between the applications developed by different application development languages can be efficiently realized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic view of a first application scenario of a communication processing method according to an embodiment of the present application.
Fig. 2 is a first flowchart of a communication processing method according to an embodiment of the present application.
Fig. 3 is a schematic view of a second application scenario of the communication processing method according to the embodiment of the present application.
Fig. 4 is a second flowchart of a communication processing method according to an embodiment of the present application.
Fig. 5 is a schematic view of a third application scenario of the communication processing method according to the embodiment of the present application.
Fig. 6 is a schematic view of an operating environment architecture of a second application according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of a communication processing apparatus according to an embodiment of the present application.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present application.
The embodiment of the application provides a communication processing method, which can be applied to electronic equipment. The electronic device may be a smartphone, a tablet computer, a gaming device, an AR (Augmented Reality) device, a data storage device, an audio playback device, a video playback device, a laptop computer, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic garment, or the like.
Referring to fig. 1, fig. 1 is a schematic view of a first application scenario of a communication processing method according to an embodiment of the present application.
The communication processing method may be applied to communication between the first application a1 and the second application a 2. The first application a1 was developed by a first application development language, and the first application a1 may run in a first engine B1. The second application a2 is developed by a second application development language, and the second application a2 may run in a second engine B2. The first application development language and the second application development language are different application development languages. For example, the first application development language may be a JavaScript language, and the second application development language may be a Dart language; alternatively, the first application development language may be Python, Lua, etc., and the second application development language may be C # language. In the following description, only the first application development language is JavaScript and the second application development language is Dart.
In the description of the present application, it is to be understood that terms such as "first", "second", and the like are used merely to distinguish one similar element from another, and are not to be construed as indicating or implying relative importance or implying any indication of the number of technical features indicated.
Referring to fig. 2, fig. 2 is a first flowchart illustrating a communication processing method according to an embodiment of the present application. The communication processing method comprises the following steps:
a communication request generated by a first application when run by a first engine is obtained 110.
Wherein the first application is run by the first engine. For example, when the first application is an application developed in JavaScript language, the first engine may be the V8 engine. When the V8 engine runs the first application, the engine creates an instance, namely V8 Runtime.
The first engine, when running the first application, may generate a communication request requesting communication with the second application. For example, the communication request may be a rendering instruction for instructing the second application to render a User Interface (UI). After the first application generates the communication request, the electronic device may obtain the communication request and process the communication request.
And calling a communication interface in the first engine according to the communication request 120.
After the electronic equipment acquires the communication request generated by the first application, the electronic equipment calls a communication interface in the first engine according to the communication request. Wherein the communication interface may be integrated in the first engine, the communication interface being developed by a third application development language. The third application development language is different from both the first application development language and the second application development language. For example, when the first engine is the V8 engine, the communication interface may be a communication interface in C + + language. Since the V8 engine is an engine developed through C + + language, the V8 engine can integrate the communication interface in C + + language and can directly call the function in C + +.
A thread of a second application running in a second engine is determined through the communication interface 130.
Wherein the second application is run by the second engine. For example, when the second application is an application developed in the Dart language, the second engine may be a Flutter engine. The Flutter engine is an open-source UI toolkit, and can help developers to efficiently build exquisite applications through a set of code libraries.
The second application runs in the second engine, which runs a thread of the second application, which in the Dart application is called the isolate. After the start of the Dart application, the main function starts to execute and the main thread main idle is run. In addition, the Flutter engine defaults to single-threaded task processing, and if a new thread is not started, the task defaults to processing in the main thread.
After the electronic device calls a communication interface in the first engine, for example, a communication interface in C + + language in the V8 engine, a thread of a second application running in the second engine is determined through the communication interface. For example, the electronic device may call a communication interface in the C + + language in the V8 engine to find a thread for a second application in the Flutter engine.
And 140, sending the communication request to the interface of the second application through the thread.
After the electronic device determines a thread of a second application in a second engine through a communication interface in a first engine, a communication request of the first application can be sent to an interface of the second application through the thread.
The communication request is processed by the second application 150.
After the electronic device sends the communication request to the interface of the second application through the thread of the second application, the electronic device can process the communication request through the second application. For example, when the communication request includes rendering instructions, the electronic device may execute the rendering instructions through the second application to render and generate a corresponding User Interface (UI).
Referring to fig. 3, fig. 3 is a schematic view of a second application scenario of the communication processing method according to the embodiment of the present application.
The first application a1 generates a communication request when the first engine B1 runs, then the first engine B1 calls the communication interface B11 in the first engine B1, searches the thread a21 of the second application running in the second engine B2 through the communication interface B11, then sends the communication request to the interface a22 of the second application through the thread a21, and finally processes the application request by the second application a 2. Thus, communication between the first application a1 and the second application a2, i.e., communication between cross-language applications, may be achieved.
In some embodiments, referring to fig. 4, fig. 4 is a second flowchart of a communication processing method provided in the embodiments of the present application.
The method for sending the communication request to the interface of the second application through the thread comprises the following steps:
141, adding a task event to the task queue of the thread through the second engine, wherein the task event is an event corresponding to the communication request;
142, executing the task event by the thread to send the communication request to the interface of the second application.
After the electronic device determines a thread of a second application running in a second engine, adding a task event to a task queue of the thread through the second engine, and executing the task event through the thread to send the communication request to an interface of the second application. And the task event is an event corresponding to the communication request.
It is understood that the task queue of the thread may include one or more task events or may not include task events. When the task queue comprises the task events, the thread executes each task event in sequence. When the task event corresponding to the communication request is executed, the communication request can be sent to the interface of the second application.
For example, in some embodiments, the thread may be the main thread main interrupt of the second application. The main isolate includes an event loop, an event queue, and a task queue. The event queue event is responsible for processing external events such as I/O events, drawing events, gesture events and receiving other thread messages. The task queue microtask queue may add events internally to the main process mainisolate.
Wherein the execution priority of the event in the task queue microtask queue is higher than the execution priority of the event in the event queue eventqueue. For example, when the thread owner isolate executes an event in the event queue event and an event in the task queue microtask, it is first determined whether the task queue microtask is empty, if not, the event in the task queue microtask is executed, and if the task queue microtask is empty, the event in the event queue event is executed.
Therefore, when the thread owner interrupt executes the event in the task queue microtask queue, the execution of the event in the event queue eventqueue is blocked, and the response of the event in the event queue eventqueue is delayed. Therefore, in order to improve the response speed to the communication request, for example, when the communication request includes a rendering instruction, in order to ensure a timely response to the rendering instruction, an event corresponding to the communication request may be added to the task queue micro task queue.
Referring to fig. 5, fig. 5 is a schematic view of a third application scenario of the communication processing method according to the embodiment of the present application.
Wherein the V8 engine creates an instance V8 Runtime in the engine when running the first application. When a first application generates a communication request, V8 Runtime calls the communication interface shell in the engine V8. The communication interface shell is a communication interface developed through C + + language. Subsequently, the thread window of the second application in the Flutter engine is determined through the communication interface shell, and scheduling information is sent to the thread window, for example, a task event is added to a task queue microtask queue of the thread window. Wherein the thread window may be an instance of a UI thread. Subsequently, the thread window executes the added task event, thereby sending the communication request of the first application to the interface DartProxy of the second application. The interface DartProxy may be an example of a Dart application, and provides an interface of the Dart application. Subsequently, the communication request is processed by the second application.
Furthermore, it can be understood that when the Dart application generates a communication request to communicate with the JavaScript application, the Dart application may execute a JS code through the interface DartProxy to call the Dart2JS function, the Dart2JS function may execute a JS code to call the V8 engine, the V8 engine compiles and runs a corresponding script language, the V8 engine passes the obtained function return value to the Dart2JS function, and the Dart2JS function returns the final result to the interface DartProxy.
Referring to fig. 6, fig. 6 is a schematic view of an operating environment architecture of a second application according to an embodiment of the present application.
The second application may run on the Flutter engine. The Flutter engine comprises a framework Flutter framework, a virtual machine module Dart VM, a UI Runner, a GPU Runner, an IO Runner IOrunner, a Platform Runner and an APP layer. The virtual machine module Dart VM is used to run the Root thread Root Isolate. The UI Runner UI Runner is used to run a UI Thread UI Runner Thread, for example, the Dart code executing Root Isolate. The GPU Runner is used to run a GPU thread GPU Runner thread, e.g. to execute GPU instructions. The IO Runner iornner is configured to run an IO thread IO Runner thread, for example, read a compressed picture, and prepare for rendering the GPU Runner. The Platform Runner is used for running a Platform Thread Platform Runner Thread, for example, executing logic processing related to a Platform, and the Platform Runner is a main task Runner of Flutter. The APP layer is used for running applications.
As can be seen from the above, the communication processing method provided in the embodiment of the present application includes: acquiring a communication request generated when a first engine runs in a first application; calling a communication interface in the first engine according to the communication request, wherein the communication interface is developed by a third application development language; determining, by the communication interface, a thread of a second application running in a second engine; sending the communication request to an interface of the second application through the thread; the communication request is processed by the second application. In the communication processing method, the communication interface developed by the third application development language is used for transferring to determine the thread of the second application and send the communication request to the interface of the second application, so that the communication between the first application and the second application developed by different application development languages can be realized, the communication path is short, and the thread switching is not needed in the communication process, so that the communication between the applications developed by different application development languages can be efficiently realized.
The embodiment of the application also provides a communication processing device, and the communication processing device can be integrated in the electronic equipment. The electronic device may be a smartphone, a tablet computer, a gaming device, an AR (Augmented Reality) device, a data storage device, an audio playback device, a video playback device, a laptop computer, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic garment, or the like. The communication processing apparatus may be used for communicating between a first application and a second application. The first application is developed in a first application development language and the second application is developed in a second application development language, the first application development language and the second application development language being different application development languages.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a communication processing apparatus 200 according to an embodiment of the present disclosure. The communication processing apparatus 200 includes: the device comprises an acquisition module 201, a calling module 202, a determination module 203, a sending module 204 and a processing module 205.
An obtaining module 201, configured to obtain a communication request generated when a first engine runs a first application;
the calling module 202 is used for calling a communication interface in the first engine according to the communication request;
a determining module 203 for determining a thread of a second application running in a second engine through the communication interface;
a sending module 204, configured to send the communication request to an interface of the second application through a thread;
and the processing module 205 is configured to process the communication request through the second application.
In some embodiments, the sending module 204 is configured to: adding a task event into a task queue of the thread through a second engine, wherein the task event is an event corresponding to the communication request; the task event is executed by the thread to send the communication request to the interface of the second application.
For specific implementation processes of each module of the communication processing apparatus 200, reference may be made to the description in each embodiment of the communication processing method, and details are not described here again.
The communication processing apparatus 200 provided in the embodiment of the present application includes: an obtaining module 201, configured to obtain a communication request generated when a first engine runs a first application; the calling module 202 is used for calling a communication interface in the first engine according to the communication request, wherein the communication interface is developed by a third application development language; a determining module 203 for determining a thread of a second application running in a second engine through the communication interface; a sending module 204, configured to send the communication request to an interface of the second application through a thread; and the processing module 205 is configured to process the communication request through the second application. The communication processing device performs transfer through the communication interface developed by the third application development language to determine the thread of the second application and send the communication request to the interface of the second application, so that communication between the first application and the second application developed by different application development languages can be realized, the communication path is short, and thread switching is not needed in the communication process, so that communication between applications developed by different application development languages can be efficiently realized.
The embodiment of the application also provides the electronic equipment. The electronic device may be a smartphone, a tablet computer, a gaming device, an AR (Augmented Reality) device, a data storage device, an audio playback device, a video playback device, a laptop computer, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic garment, or the like. The electronic device may be used to communicate between a first application and a second application. The first application is developed in a first application development language and the second application is developed in a second application development language, the first application development language and the second application development language being different application development languages.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an electronic device 300 according to an embodiment of the present disclosure. The electronic device 300 comprises a processor 301 and a memory 302. The processor 301 is electrically connected to the memory 302.
The processor 301 is a control center of the electronic device 300, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or calling a computer program stored in the memory 302 and calling data stored in the memory 302, thereby performing overall monitoring of the electronic device.
Memory 302 may be used to store computer programs and data. The memory 302 stores computer programs containing instructions executable in the processor. The computer program may constitute various functional modules. The processor 301 executes various functional applications and data processing by calling a computer program stored in the memory 302.
In this embodiment, the processor 301 in the electronic device 300 loads instructions corresponding to processes of one or more computer programs into the memory 302 according to the following steps, and the processor 301 runs the computer programs stored in the memory 302, so as to execute the following steps:
acquiring a communication request generated when a first engine runs in a first application;
calling a communication interface in the first engine according to the communication request, wherein the communication interface is developed by a third application development language;
determining, by the communication interface, a thread of a second application running in a second engine;
sending the communication request to an interface of the second application through the thread;
the communication request is processed by the second application.
In some embodiments, when a communication request is sent by a thread to an interface of a second application, the processor 301 performs the following steps:
adding a task event into a task queue of the thread through a second engine, wherein the task event is an event corresponding to the communication request;
the task event is executed by the thread to send the communication request to the interface of the second application.
In some embodiments, the thread includes an event queue and a task queue, the execution priority of events in the task queue being higher than the execution priority of events in the event queue.
In some embodiments, when the thread executes an event in the event queue and an event in the task queue, it determines whether the task queue is empty, if the task queue is not empty, the event in the task queue is executed, and if the task queue is empty, the event in the event queue is executed.
In some embodiments, the communication request comprises rendering instructions, and when the communication request is processed by the second application, the processor 301 performs the following steps:
the rendering instructions are executed by the second application to generate a corresponding user interface.
As can be seen from the above, an embodiment of the present application provides an electronic device, where the electronic device performs the following steps: acquiring a communication request generated when a first engine runs in a first application; calling a communication interface in the first engine according to the communication request, wherein the communication interface is developed by a third application development language; determining, by the communication interface, a thread of a second application running in a second engine; sending the communication request to an interface of the second application through the thread; the communication request is processed by the second application. The electronic equipment performs transfer through the communication interface developed by the third application development language to determine the thread of the second application and send the communication request to the interface of the second application, so that communication between the first application and the second application developed by different application development languages can be realized, the communication path is short, and thread switching is not needed in the communication process, so that communication between applications developed by different application development languages can be efficiently realized.
An embodiment of the present application further provides a storage medium, where a computer program is stored in the storage medium, and when the computer program runs on a computer, the computer executes the communication processing method according to any of the above embodiments.
It should be noted that, all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, which may include, but is not limited to: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The communication processing method, the communication processing apparatus, the storage medium, and the electronic device provided in the embodiments of the present application are described in detail above. The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A communication processing method for communicating between a first application developed by a first application development language and a second application developed by a second application development language, the communication processing method comprising:
acquiring a communication request generated by a first engine when the first application runs;
calling a communication interface in the first engine according to the communication request, wherein the communication interface is developed by a third application development language;
determining, by the communication interface, a thread of the second application running in a second engine;
sending, by the thread, the communication request to an interface of the second application;
processing the communication request by the second application.
2. The communication processing method according to claim 1, wherein the sending the communication request to the interface of the second application through the thread includes:
adding a task event to a task queue of the thread through the second engine, wherein the task event is an event corresponding to the communication request;
executing, by the thread, the task event to send the communication request to an interface of the second application.
3. The communication processing method according to claim 2, wherein the thread includes an event queue and a task queue, and an execution priority of an event in the task queue is higher than an execution priority of an event in the event queue.
4. The communication processing method according to claim 3, wherein the thread determines whether the task queue is empty when executing the events in the event queue and the events in the task queue, executes the events in the task queue if the task queue is not empty, and executes the events in the event queue if the task queue is empty.
5. The communication processing method according to any one of claims 1 to 4, wherein the communication request includes a rendering instruction, and the processing of the communication request by the second application includes:
executing, by the second application, the rendering instructions to generate a corresponding user interface.
6. A communication processing apparatus for communicating between a first application developed by a first application development language and a second application developed by a second application development language, the communication processing apparatus comprising:
the acquisition module is used for acquiring a communication request generated when a first engine runs in the first application;
the calling module is used for calling a communication interface in the first engine according to the communication request, and the communication interface is developed by a third application development language;
a determining module to determine, through the communication interface, a thread of the second application running in a second engine;
a sending module, configured to send the communication request to an interface of the second application through the thread;
and the processing module is used for processing the communication request through the second application.
7. The communication processing apparatus according to claim 6, wherein the sending module is configured to:
adding a task event to a task queue of the thread through the second engine, wherein the task event is an event corresponding to the communication request;
executing, by the thread, the task event to send the communication request to an interface of the second application.
8. The apparatus according to claim 7, wherein the thread includes an event queue and a task queue, and wherein an execution priority of an event in the task queue is higher than an execution priority of an event in the event queue.
9. A storage medium having stored therein a computer program that, when run on a computer, causes the computer to execute the communication processing method according to any one of claims 1 to 5.
10. An electronic device, characterized in that the electronic device comprises a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the communication processing method according to any one of claims 1 to 5 by calling the computer program stored in the memory.
CN202011262429.XA 2020-11-12 2020-11-12 Communication processing method, communication processing device, storage medium and electronic equipment Pending CN112256421A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011262429.XA CN112256421A (en) 2020-11-12 2020-11-12 Communication processing method, communication processing device, storage medium and electronic equipment
PCT/CN2021/116981 WO2022100244A1 (en) 2020-11-12 2021-09-07 Communication processing method and apparatus, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011262429.XA CN112256421A (en) 2020-11-12 2020-11-12 Communication processing method, communication processing device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112256421A true CN112256421A (en) 2021-01-22

Family

ID=74265647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011262429.XA Pending CN112256421A (en) 2020-11-12 2020-11-12 Communication processing method, communication processing device, storage medium and electronic equipment

Country Status (2)

Country Link
CN (1) CN112256421A (en)
WO (1) WO2022100244A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114077456A (en) * 2021-08-18 2022-02-22 五八有限公司 Component processing method and device, electronic equipment and storage medium
WO2022100244A1 (en) * 2020-11-12 2022-05-19 Oppo广东移动通信有限公司 Communication processing method and apparatus, storage medium, and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107133045A (en) * 2017-05-09 2017-09-05 上海雪鲤鱼计算机科技有限公司 Cross-platform game engine multi-threading correspondence method, device, storage medium and equipment
CN109388504A (en) * 2018-09-26 2019-02-26 平安科技(深圳)有限公司 Messageization docks processing method, device, computer equipment and storage medium
CN110688601A (en) * 2019-09-18 2020-01-14 郑州阿帕斯科技有限公司 Data processing method and device
US20200057660A1 (en) * 2017-03-08 2020-02-20 Alibaba Group Holding Limited Method and system for rendering user interfaces

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9823909B1 (en) * 2014-05-02 2017-11-21 Amazon Technologies, Inc. Program code conversion for cross-platform compatibility
CN111182019B (en) * 2019-08-08 2021-10-15 腾讯科技(深圳)有限公司 Cross-platform communication method and device and electronic equipment
CN110691136B (en) * 2019-09-29 2022-01-21 广州华多网络科技有限公司 Data interaction method and device, electronic equipment and storage medium
CN110659028B (en) * 2019-09-30 2023-02-28 北京达佳互联信息技术有限公司 Data processing system, method, device, electronic equipment and storage medium
CN111666112B (en) * 2020-04-21 2022-11-29 苏宁云计算有限公司 Method, device and system for realizing platform plug-in and computer equipment
CN112256421A (en) * 2020-11-12 2021-01-22 Oppo广东移动通信有限公司 Communication processing method, communication processing device, storage medium and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200057660A1 (en) * 2017-03-08 2020-02-20 Alibaba Group Holding Limited Method and system for rendering user interfaces
CN107133045A (en) * 2017-05-09 2017-09-05 上海雪鲤鱼计算机科技有限公司 Cross-platform game engine multi-threading correspondence method, device, storage medium and equipment
CN109388504A (en) * 2018-09-26 2019-02-26 平安科技(深圳)有限公司 Messageization docks processing method, device, computer equipment and storage medium
CN110688601A (en) * 2019-09-18 2020-01-14 郑州阿帕斯科技有限公司 Data processing method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022100244A1 (en) * 2020-11-12 2022-05-19 Oppo广东移动通信有限公司 Communication processing method and apparatus, storage medium, and electronic device
CN114077456A (en) * 2021-08-18 2022-02-22 五八有限公司 Component processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2022100244A1 (en) 2022-05-19

Similar Documents

Publication Publication Date Title
US11210109B2 (en) Method and system for loading resources
CN108170503B (en) Method, terminal and storage medium for cross-system android application running
CN107766101B (en) Method, device and equipment for processing App starting event
CN108572818B (en) User interface rendering method and device
US10019298B2 (en) Middleware interface and middleware interface generator
KR102076379B1 (en) Persistent and resilient worker processes
US20190087212A1 (en) Android simulator and method for implementing android simulator
CN109308241B (en) Method and device for monitoring starting process of application program, terminal equipment and storage medium
CN110750255B (en) Applet rendering method and device
US20160077850A1 (en) Methods, systems, and media for binary compatibility
WO2022100244A1 (en) Communication processing method and apparatus, storage medium, and electronic device
CN114047960A (en) Operating system running method and device, electronic equipment and storage medium
CN111831434A (en) Resource allocation method, device, storage medium and electronic equipment
CN109117253A (en) A kind of method and apparatus of micro-kernel scheduling
US20200272488A1 (en) Managing containers across multiple operating systems
US10733005B1 (en) Providing access to mobile applications by heterogeneous devices
CN113448650A (en) Live broadcast function plug-in loading method, device, equipment and storage medium
WO2021097683A1 (en) Android system starting method and apparatus, device, and storage medium
CN113495780A (en) Task scheduling method and device, storage medium and electronic equipment
CN106775608B (en) Method and device for realizing independent system process
CN114028801A (en) User input method, device, equipment and storage medium based on cloud
CN114741121A (en) Method and device for loading module and electronic equipment
CN112148318A (en) Application package issuing method, application method, device, medium, server and equipment
CN111258715B (en) Multi-operating system rendering processing method and device
CN113032169B (en) Resource calling method, equipment and storage medium of cross-language software system

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