CN111522605B - Local procedure calling method, device, equipment and medium - Google Patents

Local procedure calling method, device, equipment and medium Download PDF

Info

Publication number
CN111522605B
CN111522605B CN202010299190.7A CN202010299190A CN111522605B CN 111522605 B CN111522605 B CN 111522605B CN 202010299190 A CN202010299190 A CN 202010299190A CN 111522605 B CN111522605 B CN 111522605B
Authority
CN
China
Prior art keywords
interface
function
session
call
session object
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
CN202010299190.7A
Other languages
Chinese (zh)
Other versions
CN111522605A (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.)
Appeon Technology Shenzhen Co ltd
Original Assignee
Appeon Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Appeon Technology Shenzhen Co ltd filed Critical Appeon Technology Shenzhen Co ltd
Priority to CN202010299190.7A priority Critical patent/CN111522605B/en
Publication of CN111522605A publication Critical patent/CN111522605A/en
Application granted granted Critical
Publication of CN111522605B publication Critical patent/CN111522605B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for local procedure call, which comprise the following steps: creating a process connection object between the interface process and the target process; creating a first session object corresponding to the interface process and a second session object corresponding to the target process; the first process function call interface responds to the object function call interface and transmits target parameters; the interface response object asynchronously calls the first session object; the first session object asynchronously informs the second session object to call the second process function; when the first session object acquires the asynchronous notification corresponding to the function calling result sent by the second session object, acquiring the function calling result; the first conversation object asynchronously informs the interface response object of the function calling result; and the interface response object returns the function calling result to the first process function, and controls the interface corresponding to the interface process to continuously provide services in the process of calling the process between the interface process and the target process. The timeliness of interface response can be guaranteed.

Description

Local procedure calling method, device, equipment and medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a medium for local procedure call.
Background
The traditional interprocess communication usually exchanges data through pipelines, messages, signals, sockets and other modes, but the technologies only provide interaction of basic data or information and cannot meet interprocess procedure call.
At present, in order to meet the requirement of inter-process procedure call, open-source remote procedure call frameworks such as gRPC and thread and Microsoft RPC (remote procedure call) are presented, but the frameworks are based on Client and Server end concepts, although the inter-process procedure call is basically met, a part of remote procedure call libraries only support synchronous call and cannot meet interface response type procedure call, and the other part of remote procedure call libraries support asynchronous call but need a user to process the problem of interface response by himself, so that the complexity and efficiency of user development are increased. In addition, the concepts suitable for the remote procedure call library are complex, inconvenient to develop and debug, troublesome to deploy, poor in expansibility and not suitable for local procedure call.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, a device, and a medium for local procedure call, which can simplify interface-responsive procedure call, thereby improving efficiency of interface-responsive procedure call. The specific scheme is as follows:
In a first aspect, the present application discloses a local procedure call method, including:
creating a process connection object between the interface process and the target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process;
creating a first session object corresponding to the interface process by using an interface response object;
creating a second session object corresponding to the target process;
utilizing a first process function to call an interface response object function call interface, and transmitting a target parameter to the interface response object function call interface; the first process function is a function corresponding to the interface process;
asynchronously calling the first session object using the interface response object;
asynchronously notifying the second session object through the first session object to call a second process function; the second process function is a function corresponding to the target process;
when the first session object acquires the asynchronous notification corresponding to the function calling result sent by the second session object, acquiring the function calling result returned by the second session object; the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter;
Asynchronously notifying the interface response object of the function call result through the first session object;
returning the function calling result to the first process function through the interface response object so as to complete the process calling between the interface process and the target process;
and in the process of carrying out process calling between the interface process and the target process, controlling an interface corresponding to the interface process by using the interface response object to continuously provide interface service.
Optionally, before creating the first session object corresponding to the interface process by using the interface response object, the method further includes:
sending an object creation request to the first connection object by using the first process function;
and creating the interface response object by utilizing the first connection object.
Optionally, the creating a second session object corresponding to the target process includes:
and sending a session creation request to the second connection object by using the first connection object so that the second connection object creates the second session object corresponding to the target process.
Optionally, the asynchronously notifying, by the first session object, the second session object to call the second process function includes:
Asynchronously notifying the second session object through the first session object to call a second process function; and the first session object asynchronously informs the second session object of calling a second process function through a synchronous object.
Optionally, the method for local procedure call further includes:
creating the synchronization object through the first session object or the second session pair.
Optionally, after the using the first process function to call the interface response object function call interface and transmitting the target parameter to the interface response object function call interface, the method further includes:
and packaging the target parameter into corresponding function call data, and placing the function call data in a shared memory by using the first session object, so that the second session object reads the function call data from the shared memory after receiving a call notification corresponding to the second process function, and calls the second process function by using the function call data.
Optionally, the method for local procedure call further includes:
creating the shared memory through the first session object or the second session object.
In a second aspect, the present application discloses a local procedure call device, including:
the process connection object creating module is used for creating a process connection object between the interface process and the target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process;
the first session object creating module is used for creating a first session object corresponding to the interface process by using the interface response object;
the second session object creation module is used for creating a second session object corresponding to the target process;
the interface response object interface calling module is used for calling an interface response object function calling interface by using a first process function and transmitting a target parameter to the interface response object function calling interface; the first process function is a function corresponding to the interface process;
the first session object calling module is used for asynchronously calling the first session object by utilizing the interface response object;
the process function call notification module is used for asynchronously notifying the second session object to call a second process function by using the first session object; the second process function is a function corresponding to the target process;
A function call result obtaining module, configured to obtain, when the first session object obtains an asynchronous notification corresponding to a function call result sent by the second session object, the function call result returned by the second session object; the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter;
the function call result notification module is used for asynchronously notifying the interface response object of the function call result through the first session object;
a function call result returning module, configured to return the function call result to the first process function through the interface response object, so as to complete a procedure call between the interface process and the target process;
and the interface service control module is used for controlling an interface corresponding to the interface process to continuously provide interface service by using the interface response object in the process of calling the process between the interface process and the target process.
In a third aspect, the present application discloses a local procedure call device, comprising a processor and a memory; wherein the content of the first and second substances,
The memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the aforementioned local procedure call method.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned local procedure call method.
Therefore, the method comprises the steps of creating a process connection object between an interface process and a target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process; creating a first session object corresponding to the interface process by using an interface response object; creating a second session object corresponding to the target process; utilizing a first process function to call an interface response object function call interface, and transmitting a target parameter to the interface response object function call interface; the first process function is a function corresponding to the interface process; asynchronously calling the first session object using the interface response object; asynchronously notifying the second session object through the first session object to call a second process function; the second process function is a function corresponding to the target process; when the first session object acquires the asynchronous notification corresponding to the function calling result sent by the second session object, acquiring the function calling result returned by the second session object; the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter; asynchronously notifying the interface response object of the function call result through the first session object; and returning the function calling result to the first process function through the interface response object to complete the process calling between the interface process and the target process, and controlling an interface corresponding to the interface process to continuously provide interface service by using the interface response object in the process of carrying out the process calling between the interface process and the target process. Therefore, asynchronous process calling between the interface process and the target process is achieved through the interface response object, the first session object and the second session object, meanwhile, the interface corresponding to the interface process is controlled to continuously provide interface services through the interface response object, timeliness of interface response can be guaranteed, interface response type process calling can be simplified, and accordingly efficiency of interface response type process calling is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a local procedure call method disclosed herein;
FIG. 2 is a flow chart of a specific local procedure call method disclosed herein;
FIG. 3 is a diagram illustrating a specific local procedure call structure disclosed herein;
FIG. 4 is a schematic diagram of a local procedure call device according to the present disclosure;
FIG. 5 is a block diagram of a local procedure call device as disclosed herein;
fig. 6 is a structural diagram of an electronic terminal disclosed in 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, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, in order to meet the requirement of inter-process procedure call, open-source remote procedure call frameworks such as gRPC and thread and Microsoft RPC (remote procedure call) are presented, but the frameworks are based on Client and Server end concepts, although the inter-process procedure call is basically met, a part of remote procedure call libraries only support synchronous call and cannot meet interface response type procedure call, and the other part of remote procedure call libraries support asynchronous call but need a user to process the problem of interface response by himself, so that the complexity and efficiency of user development are increased. In addition, the concepts suitable for the remote procedure call library are complex, inconvenient to develop and debug, troublesome to deploy, poor in expansibility and not suitable for local procedure call. Therefore, the local procedure call scheme is provided, timeliness of interface response can be guaranteed, interface response type procedure call can be simplified, and therefore efficiency of the interface response type procedure call is improved.
Referring to fig. 1, an embodiment of the present application discloses a local procedure call method, including:
step S101: creating a process connection object between the interface process and the target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process.
Step S102: and creating a first session object corresponding to the interface process by using the interface response object.
In a specific implementation manner, in this embodiment, an object creation request is first sent to the first connection object by using the first process function, and the interface response object is created by using the first connection object. And then, creating a first session object corresponding to the interface process by using the interface response object.
Step S103: and creating a second session object corresponding to the target process.
In a specific implementation manner, in this embodiment, the first connection object is used to send a session creation request to the second connection object, so that the second connection object creates the second session object corresponding to the target process.
Step S104: utilizing a first process function to call an interface response object function call interface, and transmitting a target parameter to the interface response object function call interface; the first process function is a function corresponding to the interface process.
In addition, in the object-oriented design, the interface response object function call interface may also be an interface response object method call interface.
Step S105: and asynchronously calling the first session object by using the interface response object.
Step S106: asynchronously notifying the second session object through the first session object to call a second process function; the second process function is a function corresponding to the target process.
In a specific implementation manner, this embodiment may asynchronously notify the second session object to call a second process function through the first session object; and the first session object asynchronously informs the second session object of calling a second process function through a synchronous object.
It can be understood that, in the embodiment, an asynchronous notification manner is adopted, and the first session object asynchronously notifies the second session object to perform the call of the second process function through the synchronous object, that is, after the synchronous object notifies the second session object to perform the call of the second process function, the first session object does not need to wait for the second session object to return the function call result, and the interface response object does not need to wait for the first session object to return the corresponding function call result, so as to process other tasks.
In a specific implementation manner, the present embodiment may create the synchronization object through the first session object or the second session pair. In a specific implementation manner, after the interface response object creates the first session object corresponding to the interface process in the foregoing step S102, the synchronization object may be created through the first session object. In another specific implementation, after the second session object corresponding to the target process is created in step S103, if the synchronization object is not created by the first session object, the synchronization object may be created through the second session pair.
Step S107: when the first session object acquires the asynchronous notification corresponding to the function calling result sent by the second session object, acquiring the function calling result returned by the second session object; and the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter.
That is, after the second session object obtains the function call notification, the second session object calls the second process function, the second process function returns the function call result to the second session object, and the second session object asynchronously notifies the function call result to the first session object.
Step S108: and asynchronously notifying the interface response object of the function calling result through the first session object.
Step S109: and returning the function calling result to the first process function through the interface response object so as to complete the process calling between the interface process and the target process.
Step S110: and in the process of carrying out process calling between the interface process and the target process, controlling an interface corresponding to the interface process by using the interface response object to continuously provide interface service.
In the embodiment of the present application, during the process of performing the process call between the interface process and the target process, the interface response object is used to control the interface corresponding to the interface process to continuously provide the interface service, specifically, after step S105, if there is an interface operation in the interface operation message queue, data is read from the message queue to maintain the corresponding interface service.
That is, after the interface response object asynchronously calls the first session object, the interface response object can control the interface corresponding to the interface process to continue providing interface service, and if a function call result returned by the target process is received, the function call result is returned to the first process function.
It can be understood that the interface service is still provided when the local procedure call is performed, and the timely response and the user experience of the interface service are improved. And the program development is simpler, so that the method is easier to understand and more convenient to use. In addition, the method and the device simplify the concept of local process procedure call, improve the development and maintenance efficiency, improve the performance of reading and writing data by using a shared memory mode and increase the support to big data. Furthermore, the application simplifies the related range of local procedure call and uses the most basic technology of the system, thereby improving the stability of the product. Meanwhile, the application is convenient to configure, the assembly is very small, the assembly is easy to integrate with a product, and the expandability is realized.
In addition, the present embodiment is a local inter-process procedure call including a host interface, and may be used for inter-process procedure calls between 32-bit processes and 64-bit processes.
Therefore, the method comprises the steps of creating a process connection object between an interface process and a target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process; creating a first session object corresponding to the interface process by using an interface response object; creating a second session object corresponding to the target process; utilizing a first process function to call an interface response object function call interface, and transmitting a target parameter to the interface response object function call interface; the first process function is a function corresponding to the interface process; asynchronously calling the first session object using the interface response object; asynchronously notifying the second session object through the first session object to call a second process function; the second process function is a function corresponding to the target process; when the first session object acquires the asynchronous notification corresponding to the function calling result sent by the second session object, acquiring the function calling result returned by the second session object; the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter; asynchronously notifying the interface response object of the function call result through the first session object; and returning the function calling result to the first process function through the interface response object to complete the process calling between the interface process and the target process, and controlling an interface corresponding to the interface process to continuously provide interface service by using the interface response object in the process of carrying out the process calling between the interface process and the target process. Therefore, asynchronous process calling between the interface process and the target process is achieved through the interface response object, the first session object and the second session object, meanwhile, the interface corresponding to the interface process is controlled to continuously provide interface services through the interface response object, timeliness of interface response can be guaranteed, interface response type process calling can be simplified, and accordingly efficiency of interface response type process calling is improved.
Referring to fig. 2, an embodiment of the present application discloses a specific local procedure call method, including:
step S201: creating a process connection object between the interface process and the target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process.
Step S202: and creating a first session object corresponding to the interface process by using the interface response object.
Step S203: and creating a second session object corresponding to the target process.
Step S204: utilizing a first process function to call an interface response object function call interface, and transmitting a target parameter to the interface response object function call interface; the first process function is a function corresponding to the interface process.
Step S205: and asynchronously calling the first session object by using the interface response object.
Step S206: and packaging the target parameters into corresponding function call data, and placing the function call data into a shared memory by using the first session object.
Step S207: asynchronously notifying the second session object through the first session object to call a second process function; the second process function is a function corresponding to the target process.
In a specific embodiment, the first session object asynchronously notifies the second session object to make a call of the second process function through the synchronization object. And after receiving the call notification corresponding to the second process function, the second session object reads the function call data from the shared memory and calls the second process function by using the function call data.
In addition, the embodiment may create the shared memory through the first session object or the second session object. In a specific embodiment, after the first session object is created in step S202, the shared memory may be created through the first session object. In another specific embodiment, after the second session object is created in step S203, if the shared memory is not created by the first session object, the shared memory may be created by the second session pair.
It can be understood that, in the embodiment, the shared memory is used, so that the performance of reading and writing data is improved, and the support for big data is increased.
Step S208: when the first session object acquires the asynchronous notification corresponding to the function calling result sent by the second session object, acquiring the function calling result returned by the second session object; and the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter.
Step S209: and asynchronously notifying the interface response object of the function calling result through the first session object.
In a specific implementation manner, the second session object places the returned function call result in a shared memory, notifies the first session object of the function call result in the shared memory through the synchronous object, and the first session object obtains the function call result returned by the second session object from the shared memory and then asynchronously notifies the interface response object of the function call result.
Of course, in other embodiments, the interface response object may also query the first session object for the returned function call result.
Step S210: and returning the function calling result to the first process function through the interface response object so as to complete the process calling between the interface process and the target process.
Step S211: and in the process of carrying out process calling between the interface process and the target process, controlling an interface corresponding to the interface process by using the interface response object to continuously provide interface service.
For example, referring to fig. 3, an embodiment of the present application discloses a specific local procedure call structure diagram. Nine roles are mainly involved: interface process A, process B, function, connection object, interface response object, session object, message queue, synchronous object and shared memory. The first stage is as follows: and creating the session, wherein the session can be created inside the function in the embodiment so as to facilitate stateless processing, and in other embodiments, the session can be created outside the function. 1. The interface process A function requests to create a process A interface response object from the connection object; 2. the interface process A connection object creates an interface process A interface response object, 3, the interface response object creates a session object, the session object of the process A creates a synchronous object and a shared memory (can also be created by a session object of the process B); 4. the interface process A connection object requests the process B connection object to establish a process B session object; 5. the process B connection object creates a process B session object, and if the interface process A session object does not create a synchronous object and a shared memory, the process B session object is responsible for creation; and a second stage: function call (supporting reverse call and nesting function call, namely, a process B function can also call a process A function), 6, responding an object function call interface by the interface process A function call interface, and transmitting related parameters; 7. the interface response object asynchronously calls an interface process A session object; 8. the interface process A asynchronously informs the process B of the session object to carry out function call; 9. the interface response object enables the interface of the interface process A to continue to serve; 10. the process B session object calls a process B function; 11. the process B function returns a function calling result to the process B session object; 12. the process B session object asynchronously informs the function call result to the interface process A session object; 13. the interface process A asynchronously informs the function call result to the interface response object; 14. and the interface response object returns the function calling result to the interface process A function, and the function calling is finished.
That is, in the present application, a basic connection mechanism is first established between processes, then a session (including a shared memory capable of providing high-performance big data and an event, a message, or a signal used for synchronization, etc.) mechanism and an interface response object are established through the connection mechanism in an inter-process procedure call, and the inter-process procedure call and the interface response of the interface procedure are realized through the session, and a specific working process is as follows: creating an inter-process connection object between the interface process A and the interface process B; the second step interface process A or B creates a session object which contains a shared memory capable of providing high-performance big data and an event, a message or a signal for synchronization, and is required by the process call through a connection object; wherein the interface process A creates an interface response object; thirdly, calling a session object calling interface by a function; fourthly, the session object of the current process asynchronously carries out process call; fifthly, processing the information required by the interface response object in the interface process A; sixthly, the called process session object calls an implementation interface and returns a related execution result; and step seven, returning the function calling result by the current session object, ending the process calling and ending the session. And, the interface processes a and B can make a bidirectional call through the second to seventh steps.
Referring to fig. 4, an embodiment of the present application discloses a local procedure call device, including:
a process connection object creation module 101, configured to create a process connection object between an interface process and a target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process;
a first session object creating module 102, configured to create a first session object corresponding to the interface process by using an interface response object;
a second session object creating module 103, configured to create a second session object corresponding to the target process;
an interface response object interface calling module 104, configured to call an interface response object function calling interface by using a first process function, and transmit a target parameter to the interface response object function calling interface; the first process function is a function corresponding to the interface process;
a first session object calling module 105, configured to asynchronously call the first session object using the interface response object;
a process function call notification module 106, configured to asynchronously notify the second session object of calling a second process function by using the first session object; the second process function is a function corresponding to the target process;
A function call result obtaining module 107, configured to obtain the function call result returned by the second session object when the first session object obtains the asynchronous notification corresponding to the function call result sent by the second session object; the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter;
a function call result notification module 108, configured to asynchronously notify the interface response object of the function call result through the first session object;
a function call result returning module 109, configured to return the function call result to the first process function through the interface response object, so as to complete a procedure call between the interface process and the target process;
and the interface service control module 110 is configured to control an interface corresponding to the interface process to continuously provide an interface service by using the interface response object in a process of performing a procedure call between the interface process and the target process.
Therefore, the method comprises the steps of creating a process connection object between an interface process and a target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process; creating a first session object corresponding to the interface process by using an interface response object; creating a second session object corresponding to the target process; utilizing a first process function to call an interface response object function call interface, and transmitting a target parameter to the interface response object function call interface; the first process function is a function corresponding to the interface process; asynchronously calling the first session object using the interface response object; asynchronously notifying the second session object through the first session object to call a second process function; the second process function is a function corresponding to the target process; when the first session object acquires the asynchronous notification corresponding to the function calling result sent by the second session object, acquiring the function calling result returned by the second session object; the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter; asynchronously notifying the interface response object of the function call result through the first session object; and returning the function calling result to the first process function through the interface response object to complete the process calling between the interface process and the target process, and controlling an interface corresponding to the interface process to continuously provide interface service by using the interface response object in the process of carrying out the process calling between the interface process and the target process. Therefore, asynchronous process calling between the interface process and the target process is achieved through the interface response object, the first session object and the second session object, meanwhile, the interface corresponding to the interface process is controlled to continuously provide interface services through the interface response object, timeliness of interface response can be guaranteed, interface response type process calling can be simplified, and accordingly efficiency of interface response type process calling is improved.
The local process calling device also comprises an interface response object creating module used for sending an object creating request to the first connection object by using the first process function; and creating the interface response object by utilizing the first connection object.
A second session object creating module 103, configured to send a session creating request to the second connection object by using the first connection object, so that the second connection object creates the second session object corresponding to the target process.
The process function call notification module 106 is specifically configured to asynchronously notify the second session object of calling a second process function through the first session object; and the first session object asynchronously informs the second session object of calling a second process function through a synchronous object.
And the local procedure call device also comprises a synchronous object creating module used for creating the synchronous object through the first session object or the second session pair.
The local procedure calling device also comprises a function calling data packaging module which is used for packaging the target parameter into corresponding function calling data.
The local process calling device further comprises a function calling data placement module, configured to place the function calling data in a shared memory by using the first session object, so that after receiving a calling notification corresponding to the second process function, the second session object reads the function calling data from the shared memory, and calls the second process function by using the function calling data.
The local procedure call device further comprises a shared memory creation module, configured to create the shared memory through the first session object or the second session object.
Referring to fig. 5, fig. 5 is a local procedure call device disclosed in the embodiment of the present application, which includes a processor 21 and a memory 22; wherein, the memory 22 is used for storing computer programs; the processor 21 is configured to execute the computer program to implement the following steps:
creating a process connection object between the interface process and the target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process; creating a first session object corresponding to the interface process by using an interface response object; creating a second session object corresponding to the target process; utilizing a first process function to call an interface response object function call interface, and transmitting a target parameter to the interface response object function call interface; the first process function is a function corresponding to the interface process; asynchronously calling the first session object using the interface response object; asynchronously notifying the second session object through the first session object to call a second process function; the second process function is a function corresponding to the target process; when the first session object acquires the asynchronous notification corresponding to the function calling result sent by the second session object, acquiring the function calling result returned by the second session object; the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter; asynchronously notifying the interface response object of the function call result through the first session object; returning the function calling result to the first process function through the interface response object so as to complete the process calling between the interface process and the target process; and in the process of carrying out process calling between the interface process and the target process, controlling an interface corresponding to the interface process by using the interface response object to continuously provide interface service.
Therefore, the method comprises the steps of creating a process connection object between an interface process and a target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process; creating a first session object corresponding to the interface process by using an interface response object; creating a second session object corresponding to the target process; utilizing a first process function to call an interface response object function call interface, and transmitting a target parameter to the interface response object function call interface; the first process function is a function corresponding to the interface process; asynchronously calling the first session object using the interface response object; asynchronously notifying the second session object through the first session object to call a second process function; the second process function is a function corresponding to the target process; when the first session object acquires the asynchronous notification corresponding to the function calling result sent by the second session object, acquiring the function calling result returned by the second session object; the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter; asynchronously notifying the interface response object of the function call result through the first session object; and returning the function calling result to the first process function through the interface response object to complete the process calling between the interface process and the target process, and controlling an interface corresponding to the interface process to continuously provide interface service by using the interface response object in the process of carrying out the process calling between the interface process and the target process. Therefore, asynchronous process calling between the interface process and the target process is achieved through the interface response object, the first session object and the second session object, meanwhile, the interface corresponding to the interface process is controlled to continuously provide interface services through the interface response object, timeliness of interface response can be guaranteed, interface response type process calling can be simplified, and accordingly efficiency of interface response type process calling is improved.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: sending an object creation request to the first connection object by using the first process function; and creating the interface response object by utilizing the first connection object.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: and sending a session creation request to the second connection object by using the first connection object so that the second connection object creates the second session object corresponding to the target process.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: asynchronously notifying the second session object through the first session object to call a second process function; and the first session object asynchronously informs the second session object of calling a second process function through a synchronous object.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: creating the synchronization object through the first session object or the second session pair.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: and packaging the target parameter into corresponding function call data, and placing the function call data in a shared memory by using the first session object, so that the second session object reads the function call data from the shared memory after receiving a call notification corresponding to the second process function, and calls the second process function by using the function call data.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: creating the shared memory through the first session object or the second session object.
The memory 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, and the storage mode may be a transient storage mode or a permanent storage mode.
Referring to fig. 6, an embodiment of the present application discloses an electronic terminal 20, which includes a processor 21 and a memory 22 disclosed in the foregoing embodiments. For the steps that the processor 21 can specifically execute, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not described herein again.
Further, the electronic terminal 20 in this embodiment may further specifically include a power supply 23, a communication interface 24, an input/output interface 25, and a communication bus 26; the power supply 23 is configured to provide a working voltage for each hardware device on the terminal 20; the communication interface 24 can create a data transmission channel with an external device for the terminal 20, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to a specific application requirement, which is not specifically limited herein.
Further, an embodiment of the present application also discloses a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the following steps:
creating a process connection object between the interface process and the target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process; creating a first session object corresponding to the interface process by using an interface response object; creating a second session object corresponding to the target process; utilizing a first process function to call an interface response object function call interface, and transmitting a target parameter to the interface response object function call interface; the first process function is a function corresponding to the interface process; asynchronously calling the first session object using the interface response object; asynchronously notifying the second session object through the first session object to call a second process function; the second process function is a function corresponding to the target process; when the first session object acquires the asynchronous notification corresponding to the function calling result sent by the second session object, acquiring the function calling result returned by the second session object; the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter; asynchronously notifying the interface response object of the function call result through the first session object; returning the function calling result to the first process function through the interface response object so as to complete the process calling between the interface process and the target process; and in the process of carrying out process calling between the interface process and the target process, controlling an interface corresponding to the interface process by using the interface response object to continuously provide interface service.
Therefore, the method comprises the steps of creating a process connection object between an interface process and a target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process; creating a first session object corresponding to the interface process by using an interface response object; creating a second session object corresponding to the target process; utilizing a first process function to call an interface response object function call interface, and transmitting a target parameter to the interface response object function call interface; the first process function is a function corresponding to the interface process; asynchronously calling the first session object using the interface response object; asynchronously notifying the second session object through the first session object to call a second process function; the second process function is a function corresponding to the target process; when the first session object acquires the asynchronous notification corresponding to the function calling result sent by the second session object, acquiring the function calling result returned by the second session object; the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter; asynchronously notifying the interface response object of the function call result through the first session object; and returning the function calling result to the first process function through the interface response object to complete the process calling between the interface process and the target process, and controlling an interface corresponding to the interface process to continuously provide interface service by using the interface response object in the process of carrying out the process calling between the interface process and the target process. Therefore, asynchronous process calling between the interface process and the target process is achieved through the interface response object, the first session object and the second session object, meanwhile, the interface corresponding to the interface process is controlled to continuously provide interface services through the interface response object, timeliness of interface response can be guaranteed, interface response type process calling can be simplified, and accordingly efficiency of interface response type process calling is improved.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: sending an object creation request to the first connection object by using the first process function; and creating the interface response object by utilizing the first connection object.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and sending a session creation request to the second connection object by using the first connection object so that the second connection object creates the second session object corresponding to the target process.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: asynchronously notifying the second session object through the first session object to call a second process function; and the first session object asynchronously informs the second session object of calling a second process function through a synchronous object.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: creating the synchronization object through the first session object or the second session pair.
In this embodiment, when the processor executes the computer subprogram stored in the computer readable storage medium, the following steps may be specifically implemented: and packaging the target parameter into corresponding function call data, and placing the function call data in a shared memory by using the first session object, so that the second session object reads the function call data from the shared memory after receiving a call notification corresponding to the second process function, and calls the second process function by using the function call data.
In this embodiment, when the processor executes the computer subprogram stored in the computer readable storage medium, the following steps may be specifically implemented: creating the shared memory through the first session object or the second session object.
In the present specification, the embodiments are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same or similar parts between the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above detailed description is given to a method, an apparatus, a device, and a medium for local procedure call provided by the present application, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understanding the method and the core idea of the present application; meanwhile, for a person 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 local procedure call method, comprising:
creating a process connection object between the interface process and the target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process;
Creating a first session object corresponding to the interface process by using an interface response object;
creating a second session object corresponding to the target process;
utilizing a first process function to call an interface response object function call interface, and transmitting a target parameter to the interface response object function call interface; the first process function is a function corresponding to the interface process;
asynchronously invoking the first session object using the interface response object;
asynchronously notifying the second session object through the first session object of a call to a second process function; the second process function is a function corresponding to the target process;
when the first session object acquires the asynchronous notification corresponding to the function calling result sent by the second session object, acquiring the function calling result returned by the second session object; the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter;
asynchronously notifying the interface response object of the function call result through the first session object;
Returning the function calling result to the first process function through the interface response object so as to complete the process calling between the interface process and the target process;
and in the process of carrying out process calling between the interface process and the target process, controlling an interface corresponding to the interface process by using the interface response object to continuously provide interface service.
2. The local procedure call method according to claim 1, wherein before creating the first session object corresponding to the interface process using the interface response object, the method further comprises:
sending an object creation request to the first connection object by using the first process function;
and creating the interface response object by utilizing the first connection object.
3. The local procedure call method according to claim 1, wherein the creating of the second session object corresponding to the target process comprises:
and sending a session creation request to the second connection object by using the first connection object so that the second connection object creates the second session object corresponding to the target process.
4. The local procedure call method as claimed in claim 1, wherein said asynchronously notifying the second session object through the first session object of a call to a second process function comprises:
Asynchronously notifying the second session object through the first session object to call a second process function; and the first session object asynchronously informs the second session object of calling a second process function through a synchronous object.
5. The local procedure call method as claimed in claim 4, further comprising:
creating the synchronization object through the first session object or the second session object.
6. The local procedure call method according to any one of claims 1 to 5, wherein, after responding to the object function call interface with the first process function call interface and passing the target parameter into the interface response object function call interface, further comprising:
and packaging the target parameter into corresponding function call data, and placing the function call data in a shared memory by using the first session object, so that the second session object reads the function call data from the shared memory after receiving a call notification corresponding to the second process function, and calls the second process function by using the function call data.
7. The local procedure call method as claimed in claim 6, further comprising:
Creating the shared memory through the first session object or the second session object.
8. A local procedure call apparatus, comprising:
the process connection object creating module is used for creating a process connection object between the interface process and the target process; the process connection object comprises a first connection object corresponding to the interface process and a second connection object corresponding to the target process;
the first session object creating module is used for creating a first session object corresponding to the interface process by using the interface response object;
the second session object creation module is used for creating a second session object corresponding to the target process;
the interface response object interface calling module is used for calling an interface response object function calling interface by using a first process function and transmitting a target parameter to the interface response object function calling interface; the first process function is a function corresponding to the interface process;
the first session object calling module is used for asynchronously calling the first session object by utilizing the interface response object;
the process function call notification module is used for asynchronously notifying the second session object to call a second process function by using the first session object; the second process function is a function corresponding to the target process;
A function call result obtaining module, configured to obtain the function call result returned by the second session object when the first session object obtains an asynchronous notification corresponding to the function call result sent by the second session object; the function calling result is a calling result returned to the second session object by the second process function, and the function calling result is a calling result corresponding to the target parameter;
a function call result notification module, configured to asynchronously notify the interface response object of the function call result through the first session object;
a function call result returning module, configured to return the function call result to the first process function through the interface response object, so as to complete a procedure call between the interface process and the target process;
and the interface service control module is used for controlling an interface corresponding to the interface process to continuously provide interface service by using the interface response object in the process of calling the process between the interface process and the target process.
9. A local procedure call device comprising a processor and a memory; wherein, the first and the second end of the pipe are connected with each other,
The memory is used for storing a computer program;
the processor for executing the computer program to implement the local procedure call method of any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the local procedure call method of any one of claims 1 to 7.
CN202010299190.7A 2020-04-16 2020-04-16 Local procedure calling method, device, equipment and medium Active CN111522605B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010299190.7A CN111522605B (en) 2020-04-16 2020-04-16 Local procedure calling method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010299190.7A CN111522605B (en) 2020-04-16 2020-04-16 Local procedure calling method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN111522605A CN111522605A (en) 2020-08-11
CN111522605B true CN111522605B (en) 2022-07-29

Family

ID=71901693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010299190.7A Active CN111522605B (en) 2020-04-16 2020-04-16 Local procedure calling method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111522605B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2119215A1 (en) * 1993-04-30 1994-10-31 Harold R. Skinner Method and apparatus for linking object managers for cooperative processing in an object oriented computing environment
US7010796B1 (en) * 2001-09-28 2006-03-07 Emc Corporation Methods and apparatus providing remote operation of an application programming interface
CN102567111A (en) * 2011-12-23 2012-07-11 深圳市融创天下科技股份有限公司 Method, system and terminal device capable of calling asynchronous procedure
CN108681478A (en) * 2018-04-02 2018-10-19 广州视源电子科技股份有限公司 Communication means, device and the computer equipment on intelligent interaction flat instrument column
CN109254854A (en) * 2018-08-15 2019-01-22 中国平安人寿保险股份有限公司 Asynchronous invoking method, computer installation and storage medium
CN110287007A (en) * 2019-05-20 2019-09-27 深圳壹账通智能科技有限公司 Data call response method, server and computer readable storage medium
CN110413418A (en) * 2019-06-25 2019-11-05 北京三快在线科技有限公司 Cache synchronization device and method, cache synchronization system, electronic equipment
CN110688203A (en) * 2018-07-05 2020-01-14 武汉斗鱼网络科技有限公司 Task execution method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10613834B2 (en) * 2016-09-17 2020-04-07 Oracle International Corporation Systems and method for supporting reactive responses using a dependency injection framework
US10503568B2 (en) * 2017-09-27 2019-12-10 Oracle International Corporation Asynchronous handling of service requests
US10761863B2 (en) * 2018-09-28 2020-09-01 Citrix Systems, Inc. Mobile application management by run-time insertion of a replacement instrumentation object into a mobile application process

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2119215A1 (en) * 1993-04-30 1994-10-31 Harold R. Skinner Method and apparatus for linking object managers for cooperative processing in an object oriented computing environment
US7010796B1 (en) * 2001-09-28 2006-03-07 Emc Corporation Methods and apparatus providing remote operation of an application programming interface
CN102567111A (en) * 2011-12-23 2012-07-11 深圳市融创天下科技股份有限公司 Method, system and terminal device capable of calling asynchronous procedure
CN108681478A (en) * 2018-04-02 2018-10-19 广州视源电子科技股份有限公司 Communication means, device and the computer equipment on intelligent interaction flat instrument column
CN110688203A (en) * 2018-07-05 2020-01-14 武汉斗鱼网络科技有限公司 Task execution method and device
CN109254854A (en) * 2018-08-15 2019-01-22 中国平安人寿保险股份有限公司 Asynchronous invoking method, computer installation and storage medium
CN110287007A (en) * 2019-05-20 2019-09-27 深圳壹账通智能科技有限公司 Data call response method, server and computer readable storage medium
CN110413418A (en) * 2019-06-25 2019-11-05 北京三快在线科技有限公司 Cache synchronization device and method, cache synchronization system, electronic equipment

Also Published As

Publication number Publication date
CN111522605A (en) 2020-08-11

Similar Documents

Publication Publication Date Title
EP2649500B1 (en) Methods and systems for accessing and controlling a remote desktop of a remote machine in real time by a web browser at a client device via http api utilizing a transcoding server
EP2649502B1 (en) Methods and systems for a remote desktop session utilizing a http handler and a remote desktop client common interface
US10165042B2 (en) Methods and systems for conducting a remote desktop session via HTML that supports a 2D canvas and dynamic drawing
EP2649533B1 (en) Methods and systems for facilitating a remote desktop session utilizing long polling
US8966376B2 (en) Methods and systems for remote desktop session redrawing via HTTP headers
CN110032512B (en) Debugging method of small program, related equipment and terminal
US10268332B2 (en) Methods and systems for facilitating a remote desktop redrawing session utilizing HTML
US10248374B2 (en) Methods and systems for a remote desktop session utilizing HTTP header
CN114077508A (en) Remote image rendering method and device, electronic equipment and medium
CN112256246A (en) Micro-service integration framework for supporting cross-language calling in power system
CN112835632B (en) Method and equipment for calling end capability and computer storage medium
CN112104679B (en) Method, apparatus, device and medium for processing hypertext transfer protocol request
US11706301B2 (en) Server node selection method and terminal device
CN114222003A (en) Service calling method, system, device, equipment and storage medium
CN111770043A (en) Game data communication method, device, storage medium and electronic equipment
CN111522605B (en) Local procedure calling method, device, equipment and medium
KR20220039530A (en) Method, device, electronic equipment for adjusting the number of instances and readble storage medium
CN114697888B (en) 5G message processing method, device and storage medium
CN113779122B (en) Method and device for exporting data
CN113760487B (en) Service processing method and device
CN114281563A (en) Application program reconstruction method and device
CN113961194A (en) Engineering construction method, system, terminal and medium based on FLUTTER cross-application
CN111506442A (en) Local procedure calling method, device, equipment and medium
CN114064165A (en) Application page processing method and device
CN115002749B (en) IP address allocation method and device, storage medium and electronic equipment

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