CN110377438A - The method for routing of striding course communication interface, device and system - Google Patents

The method for routing of striding course communication interface, device and system Download PDF

Info

Publication number
CN110377438A
CN110377438A CN201910661654.1A CN201910661654A CN110377438A CN 110377438 A CN110377438 A CN 110377438A CN 201910661654 A CN201910661654 A CN 201910661654A CN 110377438 A CN110377438 A CN 110377438A
Authority
CN
China
Prior art keywords
interface
sdk
server
file
application
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.)
Granted
Application number
CN201910661654.1A
Other languages
Chinese (zh)
Other versions
CN110377438B (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.)
Guangzhou Xiaopeng Motors Technology Co Ltd
Original Assignee
Guangzhou Xiaopeng Motors Technology 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 Guangzhou Xiaopeng Motors Technology Co Ltd filed Critical Guangzhou Xiaopeng Motors Technology Co Ltd
Priority to CN201910661654.1A priority Critical patent/CN110377438B/en
Publication of CN110377438A publication Critical patent/CN110377438A/en
Application granted granted Critical
Publication of CN110377438B publication Critical patent/CN110377438B/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/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Abstract

This application involves fields of communication technology, more particularly to a kind of method for routing, device, computer equipment and the storage medium of striding course communication interface, the remote service request for calling end application is received by the first SDK, and the remote service request is parsed to obtain target interface file;Remote call service is initiated using the interface route component in the first SDK, the calling end is established and applies the connection applied with each server-side;The interface description file of the 2nd SDK publication of each server-side application is received by the interface route component;The determining and matched interface description file of target interface file from the interface description file;In the present solution, avoiding the compatibling problem of maintenance service interface version entirely without coupling between server-side and calling end without relying on server-side business interface, simplifying calling process, reduce EMS memory occupation.

Description

The method for routing of striding course communication interface, device and system
Technical field
This application involves field of communication technology more particularly to a kind of method for routing of striding course communication interface, device, calculating Machine equipment and storage medium.
Background technique
Currently, often using the synthesis interaction scenarios more applied, which is logical in Mobile operating system It crosses defeated outside striding course communication and the service ability of itself between a set of striding course API routing plan realization application.
It is existing using span process communication interface for example, in the vehicle-mounted android system of intelligent Web automobile Routing mode provides AIDL description language by Android mainly in application and development layer, by the description language generate with across Then this portion service code is put into server-side and client by the service code of process communication Binder driving communication respectively, The routing for realizing striding course communication interface, to complete the communication at both ends.
But server-side and client in the above scheme, is needed to safeguard simultaneously management business code jointly, and high between application Degree coupling, complex so as to cause calling process, EMS memory occupation is excessive.
Summary of the invention
The purpose of the application is intended at least can solve above-mentioned one of technological deficiency, especially uses in the prior art The AIDL file that Android is provided realizes striding course communication, is highly coupled between, leads to the more complicated skill of calling process Art defect.
The application provides a kind of method for routing of striding course communication interface, includes the following steps:
The remote service request for calling end application is received by the first SDK, and the remote service request parse To target interface file;Wherein, the first SDK is to be encapsulated in call end using upper software tool in advance;
Using in the first SDK interface route component initiate remote call service, establish the callings end using with The connection of each server-side application;
The interface description file of the 2nd SDK publication of each server-side application is received by the interface route component;Its In, the 2nd SDK is to be encapsulated in server-side in advance using upper software tool;
The determining and matched interface description file of target interface file from the interface description file.
In one embodiment, before described the step of passing through the remote service request that the first SDK reception calls end to apply, Further include:
It is registered it is locally applied in, will acquire the locally applied as calling end application of remote service, it will thus provide remote The locally applied of journey service is used as server-side application.
In one embodiment, the first SDK that passes through receives the remote service request for calling end application, to described long-range Service request is parsed the step of obtaining target interface file, comprising:
By the interface route component in the first SDK to the Url of the remote service request parsed to obtain with it is described The corresponding interface message of remote service request;
Corresponding target interface file is mapped out according to the interface message.
In one embodiment, the interface route component using in the first SDK initiates remote call service, builds Stand it is described calling end apply applied with each server-side connection the step of after, further includes:
The application of each server-side is accessed into the first SDK, and compiling is packaged to the first SDK and obtains second SDK;
The 2nd SDK is called by the interface route component package.
In one embodiment, the 2nd SDK includes interface description file;
Wherein, the interface description file is to be carried out certainly in compiling duration by first SDK of the annotation processor to access The server-side template code generated after dynamicization processing.
In one embodiment, determination is retouched with the matched interface of target interface file from the interface description file The step of stating file, comprising:
Server-side interface message is obtained according to the interface description file, target is obtained according to the target interface file and is connect Message breath;
The target interface information is matched with the server-side interface message, the determining and target interface file Matched interface description file.
In one embodiment, determination is retouched with the matched interface of target interface file from the interface description file After the step of stating file, further includes:
Corresponding remote service interface is determined according to the interface description file;
The remote service interface is called, and call result is synchronized and is back to the calling end application.
Present invention also provides a kind of route devices of striding course communication interface comprising:
Parsing module is serviced, for receiving the remote service request for calling end application by the first SDK, to the long-range clothes Business request is parsed to obtain target interface file;Wherein, the first SDK is to be encapsulated in call end using upper software in advance Tool;
Service calling module is established for initiating remote call service using the interface route component in the first SDK It is described that end is called to apply the connection applied with each server-side;
Information receiving module, the 2nd SDK for receiving each server-side application by the interface route component are issued Interface description file;Wherein, the 2nd SDK is to be encapsulated in server-side in advance using upper software tool;
Information matches module, for the determining and matched interface of target interface file from the interface description file File is described.
Present invention also provides a kind of computer equipment, including memory and processor, meter is stored in the memory Calculation machine readable instruction, when the computer-readable instruction is executed by the processor, so that the processor executes such as above-mentioned reality Apply the step in the method for routing of striding course communication interface described in any one of example.
Present invention also provides a kind of computer storage medium, it is stored in the computer storage medium computer-readable Instruction, when the computer-readable instruction is executed by one or more processors, so that one or more processors execute as above The step of stating the method for routing of striding course communication interface described in any one of embodiment.
Method for routing, device, computer equipment and the storage medium of above-mentioned striding course communication interface, by pre- in the application SDK is first encapsulated, when carrying out the routing of communication interface on striding course, by calling the first SDK of end application, receives and calls end application Remote service request parse to obtain target interface file;The interface route component in the first SDK is recycled to initiate far call Service establishes and end is called to apply the connection applied with each server-side;Interface is described text by the 2nd SDK of each server-side application Part is distributed to interface route component;Interface route component determining and matched interface of target interface file from interface description file File is described, realizes the routing of striding course communication interface.In the present solution, without relying on server-side business interface, server-side and tune With, entirely without coupling, avoiding the compatibling problem of maintenance service interface version between end, simplify calling process, reduce memory It occupies.
The additional aspect of the application and advantage will be set forth in part in the description, these will become from the following description It obtains obviously, or recognized by the practice of the application.
Detailed description of the invention
The application is above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is the applied environment figure of the method for routing of striding course communication interface provided by the embodiments of the present application;
Fig. 2 is the method for routing flow chart of the striding course communication interface of one embodiment;
Fig. 3 is the distribution flow chart of each embodiment;
Fig. 4 is the SDK encapsulation Compiler Structure schematic diagram of the server-side application of one embodiment;
Fig. 5 is the route device structural schematic diagram of the striding course communication interface of one embodiment;
Fig. 6 is the schematic diagram of internal structure of the computer equipment of one embodiment.
Specific embodiment
Embodiments herein is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, and is only used for explaining the application, and cannot be construed to the limitation to the application.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in the description of the present application Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition Other one or more features, integer, step, operation, element, component and/or their combination.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art Language and scientific term), there is meaning identical with the general understanding of those of ordinary skill in the application fields.Should also Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art The consistent meaning of meaning, and unless by specific definitions as in the embodiment of the present application, otherwise will not with idealization or excessively Formal meaning is explained.
Currently, in onboard operations system, such as android system, mostly using primary striding course method provide API routing with And striding course communication.
Primary striding course method refers to the primary definition according to Android, function is stated in AIDL file, is then passed through Compiler the function declaration in AIDL file according to the fixed corresponding code of template generation, i.e., by the primary definition of Android Method, need to describe by AIDL language, and further compiling generate.AIDL(Android Interface Definition language), be a kind of interface description language, for generate can Android device two processes it Between carry out interprocess communication code.
Existing striding course communication uses primary striding course method, and server-side and client is needed to safeguard simultaneously management industry jointly Business code, and be highly coupled between application, complex so as to cause calling process, EMS memory occupation is excessive.
Thus, in order to solve the problems, such as that both-end relies on the code administration that a set of common interface describes file, the application proposes one Kind lightweight solutions, specific as follows:
Refering to what is shown in Fig. 1, Fig. 1 is the applied environment figure of the embodiment of the present application;In the present embodiment, the technical solution of the application Can based on realizing in operating system 110, as shown in figure 1, have in operating system 110 it is multiple using App, when App A needs to obtain When remote service process, by SDK and using Url to realize correlation function;In the embodiment of the present application, in operating system 110 App A call remote service by SDK and using Url, the ApiRouter in SDK is responsible for routing Url, and finds long-range clothes Business, server-side apply such as App B, App C ... App N to access SDK, and interface inventory is generated in compiling duration, by the interface Inventory is published to the function that striding course communication is realized in ApiRouter;Here operating system 110 refers to be based on The operating platform of Binder mechanism realization telecommunication.
In one embodiment, as shown in Fig. 2, Fig. 2 is the method for routing stream of the striding course communication interface of one embodiment Cheng Tu proposes a kind of method for routing of striding course communication interface in the present embodiment, can specifically include following steps:
S110: the remote service request for calling end application is received by the first SDK, the remote service request is solved Analysis obtains target interface file;Wherein, the first SDK is to be encapsulated in call end using upper software tool in advance.
In this step, when remote service request is initiated in a certain calling end application in onboard system, such as Android system System receives the remote service request for calling end application by the first SDK.
Particularly, which uses Url (uniform resource identifier) service request, uses Url service request It can permit user and operation interacted by specific agreement to any resource, without relying on server-side business interface, also not Need maintenance service interface version compatibling problem.
After the first SDK receives the remote service request for calling end application, pass through the interface route component in the first SDK (such as ApiRouter) parses the remote service request, i.e. Url service request, can map out this according to parsing result The corresponding target interface file of Url service request.
Call end using upper software tool it is understood that the first SDK here refers to being encapsulated in advance, this is soft Include multiple Api interface messages in part tool, enter to join content and software approach, function etc..
Striding course communication may be implemented by the first SDK, the operation of other applications is executed in calling end application, As applied accessible other application, such as Weather information, music, payment by the calling end.
Goal interface document refers to that the calling end obtained by the interface route analyzing component in the first SDK is answered The interface document called with needs.
It should be noted that the application, which is suitable for other including android system, can realize application scheme Operating system, herein with no restrictions.
S120: remote call service is initiated using the interface route component in the first SDK, the calling end is established and answers With the connection applied with each server-side.
In this step, the remote service request for calling end to apply is received according to the first SDK is passed through in step S110, and obtain After target interface file, using in the first SDK interface route component initiate remote call service, establish call end apply with it is each The connection of a server-side application.
Interface route group when by the first SDK and using Url service request to call remote service, in the first SDK Part is responsible for routing the Url service request, and establishes the connection for calling end to apply between the application of each server-side, to call end to answer With the matched remote service interface of searching.
It is understood that interface route component here refers to that the function in the first SDK, the function can execute far The parsing of journey service request, mapping wake up the relevant operations such as remote service and matching remote service interface.
It include multiple Api interface messages in first SDK, interface route component can be each according to include in the first SDK A Api interface message establishes the connection for calling end to apply between server-side application, to find announced Api.
S130: text is described by the interface that the interface route component receives the 2nd SDK publication of each server-side application Part;Wherein, the 2nd SDK is to be encapsulated in server-side in advance using upper software tool.
In this step, when in the first SDK interface route component initiate remote call service, and establish call end apply with After the connection of each server-side application, the interface of the 2nd SDK publication of each server-side application is received by interface route component File is described.
Interface route component can wake up remote service by Provider, and after remote service is waken up, server-side is borrowed Help the remote service waken up, by server-side apply in the 2nd SDK publication interface description file be back to interface route component In.
It is understood that the 2nd SDK here refers to being encapsulated in server-side in advance using upper software tool, this is soft Include multiple Api interface messages in part tool, enter to join content and software approach, function etc..
It should be noted that the 2nd SDK here refer to during compiling in the first SDK use Java The partial content of Annotation annotation tag carries out the software tool regenerated after automation pretreatment.
S140: the determining and matched interface description file of target interface file from the interface description file.
In this step, when the interface for the 2nd SDK publication for receiving each server-side application by interface route component is retouched It after stating file, needs to match each interface description file with target interface file, to find and target interface text The corresponding interface description file of part.
It should be noted that interface description file here refers to retouching in server-side application by what the 2nd SDK was generated State the file of server-side IP address, remote method etc..
Here matching way may include by the corresponding version information of target interface file, class name that service is provided etc. with Corresponding version information, service class name etc. are compared in interface description file, can also can realize including other and pass through target Interface document matches the mode of corresponding interface description file, herein with no restrictions.
The method for routing of above-mentioned striding course communication interface receives the remote service request for calling end application by the first SDK, The remote service request is parsed to obtain target interface file;It is sent out using the interface route component in the first SDK Remote call service is played, the calling end is established and applies the connection applied with each server-side;Pass through the interface route component Receive the interface description file of the 2nd SDK publication of each server-side application;From the interface description file determine with it is described The matched interface description file of target interface file.In the present solution, without relying on server-side business interface, directly using long-range clothes Url in business request carries out remote interface calling and does not need maintenance service interface entirely without coupling between server-side and calling end Edition compatibility problem, and by being matched between the interface description file and target interface file of the 2nd SDK publication Remote service interface is obtained, so that service process is succinct, quick.
As shown in figure 3, Fig. 3 is the distribution flow chart of each embodiment of the application;Below to respectively to each embodiment into Row is summarized in detail:
In one embodiment, the remote service request for calling end application is received described in step S110 by the first SDK The step of before, can also include: it is registered it is locally applied in, will acquire remote service it is locally applied as call end Using, it will thus provide the locally applied of remote service is used as server-side application.
The application such as the lower realization telecommunication of the Binder of android system driving, that is, is based on based on operating system The communication of Binder mechanism, then also C/S framework, the layout of C/S framework is as follows:
Registration service (add Service): during Android starting up, Android can initialize each of system Kind Service, and these Service are registered to Service Manager and (Service Manager allowed to manage), this Step is that system is automatically performed.
Obtain service (get Service): client wants will obtain specific Service, directly to Service Manager is wanted.Client inquires to obtain specific Service reference first to Service Manager, usually Data are performed some processing operation by the agent object of Service reference.
It uses service: quoting to send to specific server-side by this and request, server-side is returned to after the completion of executing.Such as The add View function for calling Window Manager, will trigger far call, calling be operate in system Server into The add View function of Window Manager in journey.
To scheme in this present embodiment, in having passed through locally applied after system registry, obtain if needed remote Journey service it is locally applied, then by this it is locally applied as call end application, it will thus provide remote service it is locally applied as clothes The application of business end.
In above-described embodiment, for locally applied in the onboard system of intelligent automobile, have as call end application or A possibility that server-side is applied calls between end and server-side entirely without coupling, does not need maintenance service interface edition compatibility and ask Topic, and without connecting network, striding course communication can be realized.
In one embodiment, the remote service request for calling end application is received described in step S110 by the first SDK, The step of obtaining target interface file, is parsed to the remote service request, may include:
S111: by the interface route component in the first SDK to the Url of the remote service request parsed to obtain with The corresponding interface message of the remote service request;
S112: corresponding target interface file is mapped out according to the interface message.
In the present embodiment, the Url of remote service request is parsed by the interface route component in the first SDK, In, host part mapping is server-side packet name+provide the class name of service in Url, and path is mapped as remote parties religious name, Parameter part mapping is remote method parameter, is parsed according to the part mapping available corresponding with remote service request Interface message.
Corresponding target interface file can be further mapped out by the interface message, includes in the target interface file The information such as class name, remote parties religious name and the remote method parameter of above-mentioned server-side packet name+offer service.
In above-described embodiment, the corresponding target interface file of Url is mapped out by the interface route component in the first SDK, To match corresponding remote service interface according to the target interface file.
In one embodiment, it is initiated described in step S120 using the interface route component in the first SDK long-range Service is called, establishes after the step of connection applied with each server-side is applied at the calling end, can also include:
S121: the application of each server-side is accessed into the first SDK, and compiling is packaged to the first SDK and is obtained 2nd SDK;
S122: the 2nd SDK is called by the interface route component package;Wherein, the 2nd SDK includes to connect Mouth description file, the interface description file are to be carried out automatically in compiling duration by first SDK of the annotation processor to access The server-side template code generated after change processing.
In the present embodiment, as shown in figure 4, the SDK that the server-side that Fig. 4 is the present embodiment is applied encapsulates Compiler Structure signal Figure;When initiating remote call service using the interface route component in the first SDK, establishes the calling end and apply and each service After the connection for holding application, the first SDK is accessed in each server-side application, the first SDK is compiled by encapsulation, so that engineering is being compiled The communication cryptology of server-side is generated during translating, and obtains the 2nd SDK, and the 2nd SDK is then called by encapsulation, far call is provided Hold communication cryptology.
Wherein, annotation processor can be used when one SDK of encapsulation compiling in server-side application, it is automatic in compiling duration Change pre-generatmg server-side template code, and by providing a set of standard SDK publication and routing of realizing server-side template code.
It is understood that the processing explained can also compile other than it can be handled at runtime by reflection mechanism The phase of translating is handled.When compiling duration processing is explained, can handle until no longer generating new source file, it is active to institute again later File is compiled.
In one embodiment, it is determined and the target interface file from the interface description file in step S140 The step of interface description file matched, may include:
S141: obtaining server-side interface message according to the interface description file, is obtained according to the target interface file Target interface information;
S142: the target interface information is matched with the server-side interface message, and determination connects with the target The mouth matched interface description file of file.
In the present embodiment, interface description file may include server-side IP address, remote method, remote method parameter, clothes End packet name of being engaged in etc. includes server-side interface message;Target interface file may include providing server-side packet name+offer of service The information such as class name, remote parties religious name and the remote method parameter of service include target interface information.
It will be matched between obtained target interface information and server-side interface message, the determining and target interface file Matched interface description file can call corresponding interface description file.
In above-described embodiment, allow the service of server-side dynamic registration, call the service of end Dynamic Discovery, is not necessarily to service code Synchronous publication both-end, thus without the inconsistent and compatible problem of both-end version is considered, service publication process is optimized, Improve striding course communication efficiency.
In one embodiment, it is determined and the target interface file from the interface description file in step S140 After the step of interface description file matched, can also include:
S143: corresponding remote service interface is determined according to the interface description file;
S144: calling the remote service interface, and call result is synchronized and is back to the calling end application.
In the present embodiment, after determining interface description file corresponding with target interface file, it can be retouched by the interface The server-side IP address confirmation remote service interface in file is stated, android system is based on Binder mechanism and calls to this remotely Service interface, and the synchronous call result that returns is called end to apply and is executed accordingly according to the call result into the application of calling end Operation.
It is full decoupled between calling end and server-side in above-described embodiment, from each other without any dependence, do not need to tie up Common service interface is protected, AIDL interface description file is bypassed in application layer, is directly communicated with Binder driving, it is greatly simple Work flow is changed.
In one embodiment, as shown in figure 5, Fig. 5 is the route device knot of the striding course communication interface of one embodiment Structure schematic diagram provides a kind of route device of striding course communication interface in the present embodiment comprising: service parsing module 210, Service calling module 220, information receiving module 230 and information matches module 240, in which:
Parsing module 210 is serviced, for receiving the remote service request for calling end application by the first SDK, to described remote Journey service request is parsed to obtain target interface file;Wherein, the first SDK is to be encapsulated in call end using upper in advance Software tool.
In this module, when remote service request is initiated in a certain calling end application in onboard system, such as Android system System receives the remote service request for calling end application by the first SDK.
Particularly, the preferred Url of the remote service request (uniform resource identifier) service request, uses Url service request It can permit user and operation interacted by specific agreement to any resource, without relying on server-side business interface, also not Need maintenance service interface version compatibling problem.
After the first SDK receives the remote service request for calling end application, pass through the interface route component in the first SDK (such as ApiRouter) parses the remote service request, i.e. Url service request, can map out this according to parsing result The corresponding target interface file of Url service request.
Call end using upper software tool it is understood that the first SDK here refers to being encapsulated in advance, this is soft Include multiple Api interface messages in part tool, enter to join content and software approach, function etc..
Striding course communication may be implemented by the first SDK, the operation of other applications is executed in calling end application, As applied accessible other application, such as Weather information, music, payment by the calling end.
Goal interface document refers to that the calling end obtained by the interface route analyzing component in the first SDK is answered The interface document called with needs.
It should be noted that the application, which is suitable for other including android system, can realize application scheme Operating system, herein with no restrictions.
Service calling module 220, for initiating remote call service using the interface route component in the first SDK, It establishes the calling end and applies the connection applied with each server-side.
In this module, the remote service of end application is called to ask according to receiving in service parsing module 210 by the first SDK It asks, and after obtaining target interface file, utilizes the interface route component in the first SDK to initiate remote call service, establish and call The connection that end application is applied with each server-side.
Interface route group when by the first SDK and using Url service request to call remote service, in the first SDK Part is responsible for routing the Url service request, and establishes the connection for calling end to apply between the application of each server-side, to call end to answer With the matched remote service interface of searching.
It is understood that interface route component here refers to that the function in the first SDK, the function can execute far The parsing of journey service request, mapping wake up the relevant operations such as remote service and matching remote service interface.
It include multiple Api interface messages in first SDK, interface route component can be each according to include in the first SDK A Api interface message establishes the connection for calling end to apply between server-side application, to find announced Api.
Information receiving module 230, the 2nd SDK for receiving each server-side application by the interface route component are sent out The interface description file of cloth;Wherein, the 2nd SDK is to be encapsulated in server-side in advance using upper software tool.
In this module, when in the first SDK interface route component initiate remote call service, and establish call end apply with After the connection of each server-side application, the interface of the 2nd SDK publication of each server-side application is received by interface route component File is described.
Interface route component can wake up remote service by Provider, and after remote service is waken up, server-side is borrowed Help the remote service waken up, by server-side apply in the 2nd SDK publication interface description file be back to interface route component In.
It is understood that the 2nd SDK here refers to being encapsulated in server-side in advance using upper software tool, this is soft Include multiple Api interface messages in part tool, enter to join content and software approach, function etc..
It should be noted that the 2nd SDK here refer to during compiling in the first SDK use Java The partial content of Annotation annotation tag carries out the software tool regenerated after automation pretreatment.
Information matches module 240, for determining matched with the target interface file from the interface description file Interface description file.
In this module, when the interface for the 2nd SDK publication for receiving each server-side application by interface route component is retouched It after stating file, needs to match each interface description file with target interface file, to find and target interface text The corresponding interface description file of part.
It should be noted that interface description file here refers to retouching in server-side application by what the 2nd SDK was generated State the file of server-side IP address, remote method etc..
Here matching way may include by the corresponding version information of target interface file, class name that service is provided etc. with Corresponding version information, service class name etc. are compared in interface description file, can also can realize including other and pass through target Interface document matches the mode of corresponding interface description file, herein with no restrictions.
The route device of above-mentioned striding course communication interface receives the remote service request for calling end application by the first SDK, The remote service request is parsed to obtain target interface file;It is sent out using the interface route component in the first SDK Remote call service is played, the calling end is established and applies the connection applied with each server-side;Pass through the interface route component Receive the interface description file of the 2nd SDK publication of each server-side application;From the interface description file determine with it is described The matched interface description file of target interface file.In the present solution, without relying on server-side business interface, directly using long-range clothes Url in business request carries out remote interface calling and does not need maintenance service interface entirely without coupling between server-side and calling end Edition compatibility problem, and by being matched between the interface description file and target interface file of the 2nd SDK publication Remote service interface is obtained, so that service process is succinct, quick.
The specific restriction of route device about striding course communication interface, which may refer to communicate above for striding course, to be connect The restriction of the method for routing of mouth, details are not described herein.Modules in the route device of above-mentioned striding course communication interface can be complete Portion or part are realized by software, hardware and combinations thereof.Above-mentioned each module can be embedded in the form of hardware or independently of terminal It in processor in equipment, can also be stored in a software form in the memory in terminal device, in order to processor calling Execute the corresponding operation of the above modules.
In one embodiment it is proposed that a kind of computer equipment, computer equipment include memory, processor and storage On a memory and the computer program that can run on a processor, processor realize any of the above-described reality when executing computer program The step of applying the method for routing of striding course communication interface of example.
As shown in fig. 6, Fig. 6 is the schematic diagram of internal structure of the computer equipment of one embodiment.The computer equipment 310 Including processor 314, non-volatile memory medium 315, memory 311 and the network interface connected by system bus 313 312.Wherein, the non-volatile memory medium 315 of the computer equipment 310 is stored with operating system 317 and computer program 316, when which is executed by processor 314, processor 314 may make to realize the routing of striding course communication interface Method.The processor 314 of the computer equipment 310 supports entire computer equipment 310 for providing calculating and control ability Operation.It is stored with computer program 316 in the memory 311 of the computer equipment 310, the computer program 316 is by processor When 314 execution, processor 314 may make to execute the method for routing of striding course communication interface.The network of the computer equipment 310 connects Mouth 312 is used for and mobile terminal connection communication.
It will be understood by those skilled in the art that structure shown in Fig. 6, only part relevant to application scheme is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment it is proposed that a kind of computer storage medium, calculating is stored in the computer storage medium Machine readable instruction, when which is executed by one or more processors, so that one or more processors execute The step of method for routing of the striding course communication interface of any of the above-described embodiment.
It should be understood that although each step in the flow chart of attached drawing is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, can execute in the other order.Moreover, at least one in the flow chart of attached drawing Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, execution sequence, which is also not necessarily, successively to be carried out, but can be with other At least part of the sub-step or stage of step or other steps executes in turn or alternately.
The above is only some embodiments of the application, it is noted that for the ordinary skill people of the art For member, under the premise of not departing from the application principle, several improvements and modifications can also be made, these improvements and modifications are also answered It is considered as the protection scope of the application.

Claims (10)

1. a kind of method for routing of striding course communication interface, which comprises the steps of:
The remote service request for calling end application is received by the first SDK, and the remote service request is parsed to obtain mesh Mark interface document;Wherein, the first SDK is to be encapsulated in call end using upper software tool in advance;
Using in the first SDK interface route component initiate remote call service, establish the callings end using with it is each The connection of server-side application;
The interface description file of the 2nd SDK publication of each server-side application is received by the interface route component;Wherein, institute Stating the 2nd SDK is to be encapsulated in server-side in advance using upper software tool;
The determining and matched interface description file of target interface file from the interface description file.
2. the method for routing of striding course communication interface according to claim 1, which is characterized in that described to pass through the first SDK Before the step of receiving the remote service request for calling end application, further includes:
It is registered it is locally applied in, will acquire the locally applied as calling end application of remote service, it will thus provide long-range clothes The locally applied of business is used as server-side application.
3. the method for routing of striding course communication interface according to claim 1, which is characterized in that described to pass through the first SDK The remote service request for calling end application is received, the remote service request is parsed to obtain the step of target interface file Suddenly, comprising:
By the interface route component in the first SDK to the Url of the remote service request parsed to obtain with it is described long-range The corresponding interface message of service request;
Corresponding target interface file is mapped out according to the interface message.
4. the method for routing of striding course communication interface according to claim 1, which is characterized in that described to utilize described first Interface route component in SDK initiates remote call service, establishes the calling end and applies the connection applied with each server-side The step of after, further includes:
The application of each server-side is accessed into the first SDK, and compiling is packaged to the first SDK and obtains the 2nd SDK;
The 2nd SDK is called by the interface route component package.
5. the method for routing of striding course communication interface according to claim 4, which is characterized in that the 2nd SDK includes There is interface description file;
Wherein, the interface description file is to be automated in compiling duration by first SDK of the annotation processor to access The server-side template code generated after processing.
6. the method for routing of striding course communication interface according to claim 1, which is characterized in that describe text from the interface In part the step of determining interface description file matched with the target interface file, comprising:
Server-side interface message is obtained according to the interface description file, target interface letter is obtained according to the target interface file Breath;
The target interface information is matched with the server-side interface message, determination is matched with the target interface file Interface description file.
7. the method for routing of striding course communication interface according to claim 1, which is characterized in that describe text from the interface After the step of determining interface description file matched with the target interface file in part, further includes:
Corresponding remote service interface is determined according to the interface description file;
The remote service interface is called, and call result is synchronized and is back to the calling end application.
8. a kind of route device of striding course communication interface characterized by comprising
Parsing module is serviced, for receiving the remote service request for calling end application by the first SDK, the remote service is asked It asks and is parsed to obtain target interface file;Wherein, the first SDK is to be encapsulated in call end using upper software work in advance Tool;
Service calling module, for initiating remote call service using the interface route component in the first SDK, described in foundation End is called to apply the connection applied with each server-side;
Information receiving module, what the 2nd SDK for receiving each server-side application by the interface route component was issued connects Mouth description file;Wherein, the 2nd SDK is to be encapsulated in server-side in advance using upper software tool;
Information matches module is described for determining from the interface description file with the matched interface of the target interface file File.
9. a kind of computer equipment, it is characterised in that: including memory and processor, being stored with computer in the memory can Reading instruction, when the computer-readable instruction is executed by the processor, so that the processor executes such as claim 1 to 7 Any one of described in striding course communication interface method for routing the step of.
10. a kind of computer storage medium, it is characterised in that: be stored with computer-readable finger in the computer storage medium It enables, when the computer-readable instruction is executed by one or more processors, so that one or more processors execute such as right It is required that described in any one of 1 to 7 the step of the method for routing of striding course communication interface.
CN201910661654.1A 2019-07-22 2019-07-22 Routing method, device and system of cross-process communication interface Active CN110377438B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910661654.1A CN110377438B (en) 2019-07-22 2019-07-22 Routing method, device and system of cross-process communication interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910661654.1A CN110377438B (en) 2019-07-22 2019-07-22 Routing method, device and system of cross-process communication interface

Publications (2)

Publication Number Publication Date
CN110377438A true CN110377438A (en) 2019-10-25
CN110377438B CN110377438B (en) 2021-09-03

Family

ID=68254690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910661654.1A Active CN110377438B (en) 2019-07-22 2019-07-22 Routing method, device and system of cross-process communication interface

Country Status (1)

Country Link
CN (1) CN110377438B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158777A (en) * 2019-12-12 2020-05-15 中移(杭州)信息技术有限公司 Component calling method and device and computer readable storage medium
CN111372132A (en) * 2020-02-25 2020-07-03 广州华多网络科技有限公司 Method, device and equipment for audio and video transmission and storage medium
CN111427603A (en) * 2020-04-15 2020-07-17 浙江大华技术股份有限公司 Application program upgrading method and device
CN112165430A (en) * 2020-09-24 2021-01-01 北京百度网讯科技有限公司 Data routing method, device, equipment and storage medium
CN112416612A (en) * 2020-08-13 2021-02-26 上海哔哩哔哩科技有限公司 Service calling method and device, computer equipment and readable storage medium
CN112463863A (en) * 2020-11-05 2021-03-09 深圳市和讯华谷信息技术有限公司 Cloud platform data acquisition method and device
CN112596931A (en) * 2020-12-31 2021-04-02 五八有限公司 Cross-process communication method and device, electronic equipment and storage medium
CN112783978A (en) * 2021-01-28 2021-05-11 北京东方优播网络科技有限公司 Data transmission method, device, computer system and storage medium
CN113590341A (en) * 2021-09-27 2021-11-02 腾讯科技(深圳)有限公司 Service component calling method and device, computer equipment and storage medium
CN113656357A (en) * 2021-09-01 2021-11-16 京东科技信息技术有限公司 File management method, device, system and storage medium
CN113821248A (en) * 2021-09-13 2021-12-21 阿波罗智联(北京)科技有限公司 Service method of vehicle-end software, vehicle-end software and related equipment thereof

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159786A (en) * 2015-07-03 2015-12-16 北京奇虎科技有限公司 Method and device for inter-process communication
CN106293955A (en) * 2015-05-19 2017-01-04 中国石油化工股份有限公司 A kind of communication means between application process
CN106354534A (en) * 2016-08-30 2017-01-25 歌尔科技有限公司 Control method of client side for application programs in server under Android system
CN106547567A (en) * 2016-11-25 2017-03-29 山东大学 Interprocess communication system and its implementation under multi-service in a kind of Android system
CN107273227A (en) * 2017-06-30 2017-10-20 百度在线网络技术(北京)有限公司 Using communication means, device, equipment and storage medium
CN108021459A (en) * 2017-12-01 2018-05-11 北京麒麟合盛网络技术有限公司 Striding course sends the method and device for getting daily record ready
CN108536461A (en) * 2018-03-13 2018-09-14 Oppo广东移动通信有限公司 Resource regeneration method, device, terminal and storage medium
US20180285490A1 (en) * 2017-03-31 2018-10-04 Change Healthcare Holdings, Llc Method, apparatus, and computer program product for simulating client and application interface integration
US20180337874A1 (en) * 2016-11-01 2018-11-22 Microsoft Technology Licensing, Llc Indication of Communication Across Applications
CN109375997A (en) * 2018-09-28 2019-02-22 北京三快在线科技有限公司 A kind of method, apparatus, equipment and readable storage medium storing program for executing handling Internet resources
CN109446052A (en) * 2018-09-03 2019-03-08 平安普惠企业管理有限公司 A kind of method of calibration and equipment of application program
CN109739666A (en) * 2019-01-09 2019-05-10 广州虎牙信息科技有限公司 Striding course call method, device, equipment and the storage medium of singleton method
CN109933443A (en) * 2019-03-07 2019-06-25 腾讯科技(深圳)有限公司 Inter-process communication methods, device, computer equipment and readable storage medium storing program for executing

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106293955A (en) * 2015-05-19 2017-01-04 中国石油化工股份有限公司 A kind of communication means between application process
CN105159786A (en) * 2015-07-03 2015-12-16 北京奇虎科技有限公司 Method and device for inter-process communication
CN106354534A (en) * 2016-08-30 2017-01-25 歌尔科技有限公司 Control method of client side for application programs in server under Android system
US20180337874A1 (en) * 2016-11-01 2018-11-22 Microsoft Technology Licensing, Llc Indication of Communication Across Applications
CN106547567A (en) * 2016-11-25 2017-03-29 山东大学 Interprocess communication system and its implementation under multi-service in a kind of Android system
US20180285490A1 (en) * 2017-03-31 2018-10-04 Change Healthcare Holdings, Llc Method, apparatus, and computer program product for simulating client and application interface integration
CN107273227A (en) * 2017-06-30 2017-10-20 百度在线网络技术(北京)有限公司 Using communication means, device, equipment and storage medium
CN108021459A (en) * 2017-12-01 2018-05-11 北京麒麟合盛网络技术有限公司 Striding course sends the method and device for getting daily record ready
CN108536461A (en) * 2018-03-13 2018-09-14 Oppo广东移动通信有限公司 Resource regeneration method, device, terminal and storage medium
CN109446052A (en) * 2018-09-03 2019-03-08 平安普惠企业管理有限公司 A kind of method of calibration and equipment of application program
CN109375997A (en) * 2018-09-28 2019-02-22 北京三快在线科技有限公司 A kind of method, apparatus, equipment and readable storage medium storing program for executing handling Internet resources
CN109739666A (en) * 2019-01-09 2019-05-10 广州虎牙信息科技有限公司 Striding course call method, device, equipment and the storage medium of singleton method
CN109933443A (en) * 2019-03-07 2019-06-25 腾讯科技(深圳)有限公司 Inter-process communication methods, device, computer equipment and readable storage medium storing program for executing

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158777A (en) * 2019-12-12 2020-05-15 中移(杭州)信息技术有限公司 Component calling method and device and computer readable storage medium
CN111158777B (en) * 2019-12-12 2023-10-27 中移(杭州)信息技术有限公司 Component calling method, device and computer readable storage medium
CN111372132A (en) * 2020-02-25 2020-07-03 广州华多网络科技有限公司 Method, device and equipment for audio and video transmission and storage medium
CN111427603A (en) * 2020-04-15 2020-07-17 浙江大华技术股份有限公司 Application program upgrading method and device
CN112416612B (en) * 2020-08-13 2023-03-28 上海哔哩哔哩科技有限公司 Service calling method and device, computer equipment and readable storage medium
CN112416612A (en) * 2020-08-13 2021-02-26 上海哔哩哔哩科技有限公司 Service calling method and device, computer equipment and readable storage medium
CN112165430A (en) * 2020-09-24 2021-01-01 北京百度网讯科技有限公司 Data routing method, device, equipment and storage medium
CN112165430B (en) * 2020-09-24 2024-02-13 阿波罗智联(北京)科技有限公司 Data routing method, device, equipment and storage medium
CN112463863A (en) * 2020-11-05 2021-03-09 深圳市和讯华谷信息技术有限公司 Cloud platform data acquisition method and device
CN112596931A (en) * 2020-12-31 2021-04-02 五八有限公司 Cross-process communication method and device, electronic equipment and storage medium
CN112596931B (en) * 2020-12-31 2023-04-07 五八有限公司 Cross-process communication method and device, electronic equipment and storage medium
CN112783978A (en) * 2021-01-28 2021-05-11 北京东方优播网络科技有限公司 Data transmission method, device, computer system and storage medium
CN113656357A (en) * 2021-09-01 2021-11-16 京东科技信息技术有限公司 File management method, device, system and storage medium
CN113821248A (en) * 2021-09-13 2021-12-21 阿波罗智联(北京)科技有限公司 Service method of vehicle-end software, vehicle-end software and related equipment thereof
CN113590341A (en) * 2021-09-27 2021-11-02 腾讯科技(深圳)有限公司 Service component calling method and device, computer equipment and storage medium
CN113590341B (en) * 2021-09-27 2022-02-22 腾讯科技(深圳)有限公司 Service component calling method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110377438B (en) 2021-09-03

Similar Documents

Publication Publication Date Title
CN110377438A (en) The method for routing of striding course communication interface, device and system
CN109815025B (en) Service model calling method, device and storage medium
US8789073B2 (en) Proxy object creation and use
CN103580937B (en) A kind of Web services the method and system thereof and service broker system simulated
TWI767182B (en) H5-Based Access Components and Mobile Terminals
US9344524B2 (en) Method, system and computer program product for providing composite web application
US11716264B2 (en) In situ triggered function as a service within a service mesh
CN106095601B (en) A kind of multi-course concurrency resolves differential server system and its implementation
CN106339237B (en) For the plug-in unit loading frame and method of the field JavaEE WEB application
EP2418825A1 (en) Method and system for generating open telecommunication service based on internet
CN110058864A (en) The dispositions method and device of micro services
JPH0512025A (en) Method for realizing interface between object-oriented languages
CN101640694B (en) Method for generating simple object access protocol messages and process engine
US20100274914A1 (en) Interface for connecting a network element to a session initiation protocol application server
CN103942055A (en) Development system and method for fusion network mixing service process programming language
CN112149079A (en) Planning review management platform based on micro-service architecture and user access authorization method
CN111552568A (en) Cloud service calling method and device
CN112688915A (en) Cross-protocol communication method, device and server
CN114202419A (en) Message generation method, device, equipment, storage medium and program product
CN111324467A (en) Business service calling method, device, equipment and storage medium
CN113726869A (en) Communication method, gateway and electronic equipment
CN109460222A (en) Modularization method, apparatus, equipment and the storage medium of application program
CN113495796A (en) Service calling method and related equipment
CN113535419A (en) Service arranging method and device
WO2023083071A1 (en) View interaction method and apparatus, electronic device, and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant