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

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

Info

Publication number
CN112256421B
CN112256421B CN202011262429.XA CN202011262429A CN112256421B CN 112256421 B CN112256421 B CN 112256421B CN 202011262429 A CN202011262429 A CN 202011262429A CN 112256421 B CN112256421 B CN 112256421B
Authority
CN
China
Prior art keywords
application
communication
event
thread
engine
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.)
Active
Application number
CN202011262429.XA
Other languages
Chinese (zh)
Other versions
CN112256421A (en
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/CN112256421B/en
Publication of CN112256421A publication Critical patent/CN112256421A/en
Priority to PCT/CN2021/116981 priority patent/WO2022100244A1/en
Application granted granted Critical
Publication of CN112256421B publication Critical patent/CN112256421B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a communication processing method, a device, a storage medium and electronic equipment, wherein the communication processing method comprises the following steps: acquiring a communication request generated by a first application when a first engine runs; invoking a communication interface in the first engine according to the communication request; determining, via 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 so as 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 realized efficiently.

Description

Communication processing method, 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, a device, a storage medium, and an electronic apparatus.
Background
In the field of computers, various languages such as Java, javaScript, C, C ++, dart, etc. can be used to develop applications, and various program development languages have merits. Application programs developed through different program development languages often cannot be directly communicated due to differences in language specifications, interface specifications and the like, so that communication difficulties among the application programs developed through the different program development languages are caused, and the problem is to be solved.
Disclosure of Invention
The embodiment of the application provides a communication processing method, a device, a storage medium and electronic equipment, which can efficiently realize communication among applications developed by different application development languages.
The embodiment of the application provides a communication processing method, which is used for communication between a first application and a second application, wherein the first application is developed by a first application development language, the second application is developed by a second application development language, and the communication processing method comprises the following steps:
acquiring a communication request generated by the first application when the first engine 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, via the communication interface, a thread of the second application running in a second engine;
Sending the communication request to an interface of the second application through the thread;
and processing the communication request through the second application.
The embodiment of the application also provides a communication processing device, which is used for communication between a first application and a second application, wherein the first application is developed by a first application development language, the second application is developed by a second application development language, and the communication processing device comprises:
the acquisition module is used for acquiring a communication request generated when the first application is run by the first engine;
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 for determining a thread of the second application running in a second engine through the communication interface;
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.
The embodiment of the application also provides a storage medium, in which a computer program is stored, which when run on a computer causes the computer to execute the above-mentioned communication processing method.
The embodiment of the application also provides electronic equipment, which comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used for executing 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 by a first application when a first engine 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, via 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 so as 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 realized efficiently.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the description of the embodiments will be briefly described below. It is evident that the drawings in the following description are only some embodiments of the application and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a first application scenario of a communication processing method according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of a communication processing method according to an embodiment of the present application.
Fig. 3 is a schematic diagram 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 diagram of a third application scenario of the communication processing method according to the embodiment of the present application.
Fig. 6 is a schematic diagram 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 accompanying drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by a person skilled in the art without any inventive effort, are intended to be within the scope of the present application based on the embodiments 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 smart phone, a tablet computer, a gaming device, an AR (Augmented Reality ) device, a data storage device, an audio playing device, a video playing device, a notebook computer, a desktop computing device, a wearable device such as an electronic watch, electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic article of clothing, or the like.
Referring to fig. 1, fig. 1 is a schematic diagram 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 A2. The first application A1 is developed by a first application development language, and the first application A1 may be run in the first engine B1. The second application A2 is developed by a second application development language, and the second application A2 may be 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 JavaScript language, and the second application development language may be Dart language; or the first application development language may be a Python, lua, or the like, and the second application development language may be a c# language. The following description will be made with only the first application development language being JavaScript language and the second application development language being Dart language.
In the description of the present application, it should be understood that terms such as "first," "second," and the like are used merely to distinguish between similar objects and should not be construed to indicate or imply relative importance or implying any particular order of magnitude of the technical features indicated.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first communication processing method according to an embodiment of the present application. The communication processing method comprises the following steps:
a communication request generated by the first application at runtime of the 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 a V8 engine. When the V8 engine runs the first application, the engine creates an instance, namely V8 run time.
The first engine may generate a communication request for requesting communication with the second application while the first engine is running the first 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 acquire the communication request and process the communication request.
120, Invoking a communication interface in the first engine according to the communication request.
And after the electronic equipment acquires the communication request generated by the first application, calling 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 a V8 engine, the communication interface may be a c++ language communication interface. Since the V8 engine is an engine developed through the c++ language, a communication interface of the c++ language may be integrated in the V8 engine, and a function of the c++ may be directly called.
And 130, determining a thread of the second application running in the second engine through the communication interface.
Wherein the second application is run by the second engine. For example, where 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 that can help developers build sophisticated applications efficiently through a set of code libraries.
The second application, when running in the second engine, will run a thread of the second application, in the Dart application, the thread is referred to as isolate. After the start of the Dart application, execution of the main function and execution of the main thread main isolate are started. In addition, flutter engines default to single-threaded task processing, and tasks default to processing in the main thread if no new thread is started.
After the electronic device invokes a communication interface in the first engine, for example, a communication interface in the c++ language in the V8 engine, a thread of the 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 of the second application in the Flutter engine.
140 Sending the communication request to the interface of the second application by the thread.
After the electronic device determines the thread of the second application in the second engine through the communication interface in the first engine, the communication request of the first application can be sent to the interface of the second application through the thread.
150, Processing the communication request by the second application.
After the electronic device sends the communication request to the interface of the second application through the thread of the second application, the communication request can be processed through the second application. For example, when the communication request includes a rendering instruction, the electronic device may execute the rendering instruction through the second application to render and generate a corresponding User Interface (UI).
Referring to fig. 3 at the same time, fig. 3 is a schematic diagram 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 a communication interface B11 in the first engine B1, searches a thread a21 of a second application running in the second engine B2 through the communication interface B11, then sends the communication request to an interface a22 of the second application through the thread a21, and finally the second application A2 processes the application request. Therefore, the communication between the first application A1 and the second application A2 can be realized, namely, the communication between the cross-language applications can be realized.
In some embodiments, referring to fig. 4, fig. 4 is a second flowchart of a communication processing method according to an embodiment of the present application.
Wherein sending the communication request to the interface of the second application by the thread comprises the steps of:
141, adding a task event into a task queue of the thread through the second engine, wherein the task event is an event corresponding to the communication request;
142 execute the task event by the thread to send the communication request to the interface of the second application.
After the electronic device determines the thread of the second application running in the second engine, adding a task event to the task queue of the thread through the second engine, and executing the task event through the thread to send the communication request to the interface of the second application. The task event is an event corresponding to the communication request.
It will be appreciated that the task queue of the thread may or may not include one or more task events. When the task queue includes task events, the thread sequentially 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 isolate of the second application. main isolate include an event loop eventloop, an event queue eventqueue, and a task queue microtask queue. The event queue eventqueue is responsible for handling external events such as I/O events, drawing events, gesture events, and receiving other thread messages. The task queue microtask queue can add events to the inside of the host process mainisolate.
Wherein the execution priority of the events in the task queue microtask queue is higher than the execution priority of the events in the event queue eventqueue. For example, the thread main isolate first determines whether the task queue microtask queue is empty when executing the event in the event queue eventqueue and the event in the task queue microtask queue, executes the event in the task queue microtask queue if the task queue microtask queue is not empty, and executes the event in the event queue eventqueue if the task queue microtask queue is empty.
Thus, the thread main isolate, when executing an event in the task queue microtask queue, blocks execution of the event in the event queue eventqueue, and delays the event response in the event queue eventqueue. Therefore, in order to increase the response speed to the communication request, for example, when the communication request includes a rendering instruction, in order to ensure timely response to the rendering instruction, an event corresponding to the communication request may be added to the task queue microtask queue.
Referring to fig. 5 at the same time, fig. 5 is a schematic diagram 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 run time in the engine when running the first application. When the first application generates a communication request, V8 run calls the communication interface shell in engine V8. The communication interface shell is a communication interface developed through the c++ language. Subsequently, a thread window of the second application in the engine is determined Flutter via the communication interface shell and scheduling information is sent to the thread window, for example adding a task event to the task queue microtask queue of the thread window. Wherein the thread window may be an instance of a UI thread. The thread window then 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 instance of a Dart application, and provides an interface for the Dart application. Subsequently, the communication request is processed by the second application.
In addition, it may be appreciated that when the Dart application generates a communication request to communicate with the JavaScript application, the Dart application may execute a section of JS code through the interface DartProxy to call the Dart2JS function, the Dart2JS function may execute a section of JS code to call the V8 engine, the V8 engine compiles and runs the corresponding scripting language, the V8 engine passes the resulting function return value to the Dart2JS function, and the Dart2JS function returns the final result to the interface DartProxy.
Referring to fig. 6 at the same time, 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 FlutterFramework, 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 dartvm is used to run the root thread Root Isolate. The UI Runner is for running a UI Thread, such as executing the Dart code of Root Isolate. The GPU Runner is for running the GPU threads GPU RunnerThread, for example executing GPU instructions. The IO Runner IORunner is configured to run the IO thread IO RunnerThread, e.g., read the compressed picture, ready for rendering by the GPU Runner. The Platform Runner is used to run the Platform thread Platform Runner Thread, for example, to perform logic processing related to the Platform, and is the main task Runner of Flutter. The APP layer is used to run applications.
As can be seen from the above, the communication processing method provided by the embodiment of the present application includes: acquiring a communication request generated by a first application when a first engine 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, via 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 so as 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 realized efficiently.
The embodiment of the application also provides a communication processing device which can be integrated in the electronic equipment. The electronic device may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality ) device, a data storage device, an audio playing device, a video playing device, a notebook computer, a desktop computing device, a wearable device such as an electronic watch, electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic article of clothing, etc. The communication processing means may be for communicating between the first application and the second application. The first application is developed by a first application development language, the second application is developed by a second application development language, and the first application development language and the second application development language are 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 application. Wherein the communication processing apparatus 200 includes: the system comprises an acquisition module 201, a calling module 202, a determining module 203, a sending module 204 and a processing module 205.
An obtaining module 201, configured to obtain a communication request generated by a first application when the first engine is running;
A calling module 202, configured to call a communication interface in the first engine according to the communication request;
A determining module 203, configured to determine a thread of a second application running in a second engine through a communication interface;
a sending module 204, configured to send, by a thread, a communication request to an interface of a second application;
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 a communication request; the task event is executed by the thread to send the communication request to the interface of the second application.
The specific implementation process of each module of the communication processing apparatus 200 may refer to the description in each embodiment of the foregoing communication processing method, which is not described herein.
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 by a first application when the first engine is running; a calling module 202, configured to call a communication interface in the first engine according to the communication request, where the communication interface is developed by a third application development language; a determining module 203, configured to determine a thread of a second application running in a second engine through a communication interface; a sending module 204, configured to send, by a thread, a communication request to an interface of a second application; and the processing module 205 is configured to process the communication request through the second application. The communication processing device transfers 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 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 realized efficiently.
The embodiment of the application also provides electronic equipment. The electronic device may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality ) device, a data storage device, an audio playing device, a video playing device, a notebook computer, a desktop computing device, a wearable device such as an electronic watch, electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic article of clothing, etc. The electronic device may be used to communicate between a first application and a second application. The first application is developed by a first application development language, the second application is developed by a second application development language, and the first application development language and the second application development language are 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 application. 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 computer programs 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 that include instructions that are executable in a 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 the present embodiment, the processor 301 in the electronic device 300 loads instructions corresponding to the processes of one or more computer programs into the memory 302 according to the following steps, and the processor 301 executes the computer programs stored in the memory 302, so as to perform the following steps:
acquiring a communication request generated by a first application when a first engine 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, via 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 the communication request is sent by a thread to the interface of the second application, the processor 301 performs the steps of:
Adding a task event into a task queue of the thread through a second engine, wherein the task event is an event corresponding to a 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, the thread determines whether the task queue is empty when executing the event in the event queue and the event in the task queue, if the task queue is not empty, then executing the event in the task queue, and if the task queue is empty, then executing the event in the event queue.
In some embodiments, the communication request includes rendering instructions, and when the communication request is processed by the second application, the processor 301 performs the steps of:
executing the rendering instructions by the second application to generate a corresponding user interface.
As can be seen from the above, the embodiment of the present application provides an electronic device, which performs the following steps: acquiring a communication request generated by a first application when a first engine 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, via 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 transfers 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 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 realized efficiently.
The embodiment of the application also provides a storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer executes the communication processing method described in any one of the embodiments.
It should be noted that, those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the computer program may be stored in a computer readable storage medium, where the storage medium may include, but is not limited to: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The communication processing method, the device, the storage medium and the electronic equipment provided by the embodiment of the application are described in detail. The principles and embodiments of the present application have been described herein with reference to specific examples, the description of which is intended only to assist in understanding the methods of the present application and the core ideas thereof; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, the present description should not be construed as limiting 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 the first application when the first engine 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, the third application development language is different from the first application development language and the second application development language, and the first engine develops based on the third application development language;
searching according to the communication interface, and determining a thread of the second application running in a second engine;
Adding a task event in the thread, and sending the communication request to an interface of the second application when the second engine runs the thread to execute the task event;
and processing the communication request through 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 by the thread includes:
Adding a task event into a task queue of the thread through the second engine, wherein the task event is an event corresponding to the communication request;
Executing the task event by the thread 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. A communication processing method according to claim 3, wherein the thread determines whether the task queue is empty when executing the event in the event queue and the event in the task queue, executes the event in the task queue if the task queue is not empty, and executes the event 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 the rendering instructions by the second application 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 the first application is run by the first engine;
The calling module is used for calling a communication interface in the first engine according to the communication request, the communication interface is developed by a third application development language, wherein the third application development language is different from the first application development language and the second application development language, and the first engine is developed based on the third application development language;
the determining module is used for determining the thread of the second application running in the second engine by searching according to the communication interface;
A sending module, configured to add a task event to the thread, and send the communication request to an interface of the second application when the second engine runs the thread to execute the task event;
And the processing module is used for processing the communication request through the second application.
7. The communication processing apparatus of claim 6, wherein the transmitting module is configured to:
Adding a task event into a task queue of the thread through the second engine, wherein the task event is an event corresponding to the communication request;
Executing the task event by the thread to send the communication request to an interface of the second application.
8. The communication processing apparatus of claim 7, wherein the thread comprises 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.
9. A storage medium having stored therein a computer program which, 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 comprising a processor and a memory, wherein the memory stores a computer program, and wherein 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, device, storage medium and electronic equipment Active CN112256421B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011262429.XA CN112256421B (en) 2020-11-12 2020-11-12 Communication processing method, 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 CN112256421B (en) 2020-11-12 2020-11-12 Communication processing method, device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112256421A CN112256421A (en) 2021-01-22
CN112256421B true CN112256421B (en) 2024-06-18

Family

ID=74265647

Family Applications (1)

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

Country Status (2)

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

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256421B (en) * 2020-11-12 2024-06-18 Oppo广东移动通信有限公司 Communication processing method, device, storage medium and electronic equipment
CN114077456B (en) * 2021-08-18 2024-07-05 五八有限公司 Component processing method and device, electronic equipment and storage medium
CN115016958A (en) * 2022-05-31 2022-09-06 阿里巴巴(中国)有限公司 Message processing method and related device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110688601A (en) * 2019-09-18 2020-01-14 郑州阿帕斯科技有限公司 Data processing method and device

Family Cites Families (10)

* 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
CN108572818B (en) * 2017-03-08 2021-07-23 斑马智行网络(香港)有限公司 User interface rendering method and device
CN107133045A (en) * 2017-05-09 2017-09-05 上海雪鲤鱼计算机科技有限公司 Cross-platform game engine multi-threading correspondence method, device, storage medium and equipment
CN109388504B (en) * 2018-09-26 2024-07-02 平安科技(深圳)有限公司 Method and device for processing informationized docking, computer equipment and storage medium
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
CN111290806B (en) * 2020-02-10 2024-04-19 广州虎牙科技有限公司 Calling method and device of application program interface, computer equipment and storage medium
CN111666112B (en) * 2020-04-21 2022-11-29 苏宁云计算有限公司 Method, device and system for realizing platform plug-in and computer equipment
CN112256421B (en) * 2020-11-12 2024-06-18 Oppo广东移动通信有限公司 Communication processing method, device, storage medium and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110688601A (en) * 2019-09-18 2020-01-14 郑州阿帕斯科技有限公司 Data processing method and device

Also Published As

Publication number Publication date
WO2022100244A1 (en) 2022-05-19
CN112256421A (en) 2021-01-22

Similar Documents

Publication Publication Date Title
CN112256421B (en) Communication processing method, device, storage medium and electronic equipment
US11210109B2 (en) Method and system for loading resources
CN108572818B (en) User interface rendering method and device
CN107766101B (en) Method, device and equipment for processing App starting event
US8739147B2 (en) Class isolation to minimize memory usage in a device
US10019298B2 (en) Middleware interface and middleware interface generator
KR102076379B1 (en) Persistent and resilient worker processes
US20190108038A1 (en) Method and system for starting up application
US10705850B2 (en) Stack frame unwinding for exception handling
US8832690B1 (en) Multi-threaded virtual machine processing on a web page
CN109308241B (en) Method and device for monitoring starting process of application program, terminal equipment and storage medium
CN112463123B (en) Task compiling method, device, network node, system and storage medium
US11586455B2 (en) Managing containers across multiple operating systems
CN110750255A (en) Applet rendering method and device
CN112035768A (en) Page rendering method and device for fast application, storage medium and electronic equipment
CN110018831B (en) Program processing method, program processing apparatus, and computer-readable storage medium
CN114741121A (en) Method and device for loading module and electronic equipment
CN112148318B (en) Application package release method, application method, device, medium, server and equipment
CN111258715B (en) Multi-operating system rendering processing method and device
CN114510334A (en) Class instance calling method and device, electronic equipment and automatic driving vehicle
WO2022166553A1 (en) Method and apparatus for implementing batch system calls
US20240094992A1 (en) Non-disruptive servicing components of a user mode process
CN117971435A (en) Task execution method, device, electronic equipment and computer readable storage medium
KR20230093425A (en) Computer systems running multiple operating systems
CN118113415A (en) Injection method and device of tangent plane program, readable storage medium and computing device

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
GR01 Patent grant
GR01 Patent grant