CN116361035A - Remote interface calling method, remote interface calling device, electronic equipment and readable storage medium - Google Patents

Remote interface calling method, remote interface calling device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN116361035A
CN116361035A CN202310365952.2A CN202310365952A CN116361035A CN 116361035 A CN116361035 A CN 116361035A CN 202310365952 A CN202310365952 A CN 202310365952A CN 116361035 A CN116361035 A CN 116361035A
Authority
CN
China
Prior art keywords
interface
protocol
calling
serialization
data transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310365952.2A
Other languages
Chinese (zh)
Inventor
朱进
徐胜亮
赵云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Geely Holding Group Co Ltd
Zhejiang Zeekr Intelligent Technology Co Ltd
Original Assignee
Zhejiang Geely Holding Group Co Ltd
Zhejiang Zeekr Intelligent 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 Zhejiang Geely Holding Group Co Ltd, Zhejiang Zeekr Intelligent Technology Co Ltd filed Critical Zhejiang Geely Holding Group Co Ltd
Priority to CN202310365952.2A priority Critical patent/CN116361035A/en
Publication of CN116361035A publication Critical patent/CN116361035A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/544Remote

Landscapes

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

Abstract

The application provides a remote interface calling method, a remote interface calling device, electronic equipment and a readable storage medium, wherein the method comprises the steps of responding to an interface calling request to generate an interface calling file; and calling a serialization protocol from a preset set containing at least one serialization protocol to serialize the interface calling file, calling a data transmission protocol from the preset set containing at least one data transmission protocol, transmitting the serialized interface calling file to a server, and receiving a return value of an interface corresponding to the interface calling file transmitted by the server. Because the serialization protocol and the data transmission protocol are completely decoupled, a user can select the serialization protocol and the data transmission protocol which are more suitable for the operating system carried by the new energy automobile, so that the remote interface is more efficient and quicker when being called.

Description

Remote interface calling method, remote interface calling device, electronic equipment and readable storage medium
Technical Field
The application relates to the technical field of new energy automobiles, in particular to a remote interface calling method, a remote interface calling device, electronic equipment and a readable storage medium.
Background
IPC (Inter-Process Communication, interprocess communication) refers to a communication technique used by programs and processes running between a multitasking operating system or networked computers. Among them, inter-process communication is of two types, one is LPC (Local Procedure Call ) and one is RPC (Remote Procedure Call, remote procedure call).
RPC is a protocol that requests services from a remote computer program over a network without requiring knowledge of underlying network technology. In the OSI network communication model, the RPC spans a transport layer and an application layer. The development of distributed network applications is facilitated by the introduction of remote procedure calls.
With the development of internet technology, the number of mainstream RPC frames in the market is very large, however, there are still many limitations to be solved when the mainstream RPC frames are applied in the new energy automobile field.
Disclosure of Invention
The application provides a remote interface calling method, which comprises the following steps:
responding to the interface calling request, and generating an interface calling file;
calling a serialization protocol from a preset set containing at least one serialization protocol to serialize the interface calling file;
and calling a data transmission protocol from a preset set containing at least one data transmission protocol, transmitting the serialized interface calling file to a server, and receiving a return value of an interface corresponding to the interface calling file transmitted by the server.
Optionally, the method further comprises:
responding to the set expansion operation of a user for the at least one serialization protocol, and adding the user-defined serialization protocol to the set containing the at least one serialization protocol;
and/or the number of the groups of groups,
and responding to the expansion operation of the user for the data transmission protocol containing at least one data transmission protocol, and adding the user-defined data transmission protocol to the set containing at least one data transmission protocol.
Optionally, the interface call request includes an interface ID and an interface call parameter;
the responding to the interface call request generates an interface call file, which comprises the following steps:
and generating an interface call file based on the interface ID and the interface call parameter in response to the interface call request.
Optionally, receiving a return value of an interface corresponding to the interface calling file transmitted by the server side includes:
and receiving a return value of an interface corresponding to the interface calling file periodically transmitted by the server.
Optionally, the serialization protocol includes at least one or more of the following: binary protocol, json protocol, SOME/IP protocol, DDS protocol.
The application also provides a remote interface calling method, which is applied to the server, and comprises the following steps:
receiving an interface calling file after the client transmits serialization;
calling a serialization protocol from a preset set containing at least one serialization protocol, and performing deserialization on the serialized interface call file to restore the interface call file;
calling an interface provided by the server based on the interface calling file, and acquiring a return value of the interface;
and calling a data transmission protocol from a preset set containing at least one data transmission protocol, and transmitting the return value to the client.
The application also provides a remote interface calling device, which comprises:
the request receiving unit is used for responding to the interface calling request and generating an interface calling file;
the serialization unit is used for calling a serialization protocol from a preset set containing at least one serialization protocol to serialize the interface calling file;
and the data transmission unit is used for calling the data transmission protocol from a preset set containing at least one data transmission protocol, transmitting the serialized interface calling file to a server, and receiving a return value of an interface corresponding to the interface calling file transmitted by the server.
Optionally, the apparatus further includes:
the user-defined extension unit is used for responding to the user-defined extension operation of the set containing at least one serialization protocol, and adding the user-defined serialization protocol to the set containing at least one serialization protocol;
and/or the number of the groups of groups,
and responding to the expansion operation of the user for the data transmission protocol containing at least one data transmission protocol, and adding the user-defined data transmission protocol to the set containing at least one data transmission protocol.
Optionally, the interface call request includes an interface ID and an interface call parameter;
the request receiving unit is specifically configured to generate an interface call file based on the interface ID and the interface call parameter in response to an interface call request.
Optionally, the data transmission unit is specifically configured to receive a return value of an interface corresponding to the interface calling file that is periodically transmitted by the server.
Optionally, the serialization protocol includes at least one or more of the following: binary protocol, json protocol, SOME/IP protocol, DDS protocol.
The application also provides a remote interface calling device, which is applied to a server, and comprises:
the data receiving unit is used for receiving the interface calling file after the client-side transmission serialization;
the anti-serialization unit is used for calling the serialization protocol from a preset set containing at least one serialization protocol, and carrying out anti-serialization on the serialized interface call file to restore the interface call file;
the interface calling unit is used for calling the interface provided by the server based on the interface calling file and acquiring a return value of the interface;
and the data transmission unit is used for calling the data transmission protocol from a preset set containing at least one data transmission protocol and transmitting the return value to the client.
The application also provides electronic equipment, which comprises a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are connected with each other through the bus;
the memory stores machine readable instructions and the processor performs the method by invoking the machine readable instructions.
The present application also provides a computer readable storage medium storing machine readable instructions that when invoked and executed by a processor implement the above-described methods.
In the scheme described in the above embodiment, the serialization protocol and the data transmission protocol are completely decoupled, so that the user can select the serialization protocol and the data transmission protocol which are more suitable for the operating system carried by the new energy automobile, and the remote interface is more efficient and faster when being called.
Drawings
FIG. 1 is a schematic diagram illustrating a communication framework for remote interface invocation in accordance with an exemplary embodiment.
FIG. 2 is a flow diagram illustrating a remote interface invocation method in accordance with an exemplary embodiment.
FIG. 3 is a flow diagram illustrating another remote interface invocation method in accordance with an exemplary embodiment.
Fig. 4 is a hardware configuration diagram of an electronic device in which a remote interface call device is located, according to an exemplary embodiment.
FIG. 5 is a block diagram of a remote interface call device, as shown in an exemplary embodiment.
FIG. 6 is a block diagram of another remote interface call device, as shown in an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
Currently, the main RPC framework in the market includes SOAP framework, thread framework, and the like. For the thread framework, the thread framework is internally provided with a serialization protocol and a data transmission protocol, and a user can only select and fix several serialization protocols, such as a TBinaryProcol protocol, a TCompactProtocol, TJSONProtocol protocol, a TSimaleJSON Procol protocol and the like; and fixed several data transfer protocols such as the TSocketiey protocol, the TFramedTransport protocol, the TFileTransport protocol, etc.
The serialization protocols commonly used in the operating system carried by the current new energy automobile, such as SOME/IP protocol and DDS protocol, cannot be applied to the thread framework; meanwhile, a more compact, space-saving and bandwidth-saving serialization protocol Binary protocol and a serialization protocol Json protocol which is more convenient for debugging cannot be applied to a thread framework.
For the SOAP framework, the protocol bound by the data transmission layer of the SOAP framework is HTTP protocol, so that the SOAP framework cannot be expanded, and because the data content transmitted by the data transmission layer is XML format content, the serialization protocol can only select XML protocol, the data quantity after serialization is much larger than binary system, and the serialization cost is high.
In view of this, the present application proposes a technical solution that can freely select a serialization protocol and a data transmission protocol.
When the method is realized, an interface calling file can be generated in response to an interface calling request;
calling a serialization protocol from a preset set containing at least one serialization protocol to serialize the interface calling file;
and calling a data transmission protocol from a preset set containing at least one data transmission protocol, transmitting the serialized interface calling file to a server, and receiving a return value of an interface corresponding to the interface calling file transmitted by the server.
Referring to fig. 1, fig. 1 is a schematic diagram of a communication framework for remote interface call provided in an exemplary embodiment. As shown in fig. 1, the framework is implemented based on a client/server mode, and may be divided into six layers, namely a service logic layer, a code framework layer, a data read-write operation layer, a serialization protocol layer, a data transmission layer and an I/O layer.
The service logic layer is used for the client or the server to realize the service logic of the client or the server. For example, the user selects which interfaces of the server are invoked remotely through the client. As another example, functional logic in an interface maintained by the server, and so forth.
The code frame layer and the data read-write operation layer are used for converting an interface calling file generated by a client in the service logic layer into an intermediate code at one side of the client, and further reducing the intermediate code into an interface calling file of the server at one layer of the server, so that remote interface calling can be performed when code languages used by the client and the server are not used.
The serialization protocol layer is used for converting structured data into byte stream and transmitting the byte stream to the data transmission layer for transmission.
The data transmission layer is used for receiving and sending message bodies in a byte stream mode, and the I/O layer is used for actual data transmission.
Referring to fig. 2, fig. 2 is a flowchart of a remote interface calling method according to an exemplary embodiment. The method can be applied to the vehicle-mounted client, and the method can comprise the following steps:
step 202, responding to an interface calling request, and generating an interface calling file;
in this specification, the vehicle-mounted client may include an operating system carried by the new energy automobile, or may include a mobile terminal and the like where a user and the new energy automobile are interconnected.
The interface call request may be initiated by a user; or automatically initiated by the client when the user actually drives the new energy automobile; the user can also preset the interface call condition, and when the client detects that the interface call condition is met, the client further initiates the interface call request.
For example, when the user needs to perform the navigation function, an interface call request corresponding to the navigation function is initiated to the server through the vehicle-mounted client. For another example, when the user is driving a new energy automobile and driving on a highway, the vehicle-mounted client may automatically initiate an interface call request corresponding to the road information to the server, so that the server may send the road information to the client. For another example, the user may preset that when the vehicle runs on a certain road section, the vehicle-mounted client automatically initiates an interface call request corresponding to the acquired music to the server, so that the client plays the music based on the music information sent by the server.
In this specification, the in-vehicle client may generate an interface call file in response to an interface call request. The generation of the interface calling file is completed by a code framework layer and a data read-write operation layer in the communication framework shown in fig. 1.
The code framework layer can compile interface call information contained in the interface call request into an interface call file based on the interface call request, and send the interface call file to the data read-write operation layer to the serialization protocol layer for serialization.
The interface calling file is a file compiled and generated by the intermediate code, no matter what code language is used by the client, the interface calling file can be compiled, and meanwhile, interface calling information corresponding to the code language used by the server is analyzed by the interface calling file at the server, so that interface calling of the client and the server when different code languages are used is realized.
In one embodiment, the interface call request includes an interface ID and an interface call parameter. The client may generate an interface call file based on the interface ID and the interface call parameter.
The interface ID is used for uniquely identifying which interface called by the client and specifically maintained by the server. The interface calling parameters are used for inputting the interface maintained by the server to obtain a return value corresponding to the interface.
Step 204, calling a serialization protocol from a preset set containing at least one serialization protocol to serialize the interface calling file;
in this specification, after the interface call file is generated, a serialization protocol may be used to serialize the interface call file and generate a byte stream.
The serialization protocol layer in the communication framework called by the remote interface may preset a set including at least one serialization protocol, and a user may select a serialization protocol to be used from the serialization set.
For example, a user may enter a protocol management interface through the client and configure a serialization protocol for use in interface calls. The user may invoke the request to configure the serialization protocol for a specific interface, or may invoke the request to configure the serialization protocol for a specific class of interface, which is not specifically limited in this specification.
In the present specification, the serialization protocol may include TBinaryProtocol protocol, TCompactProtocol, TJSONProtocol, TSimpleJSONProtocol, TDebugProtocol, and the like supported in the thread framework. Meanwhile, the system also can comprise a Binary protocol, a Json protocol, a SOME/IP protocol commonly used in an operating system carried by the new energy automobile and a DDS protocol.
The SOME/IP, namely the Scalable service-Oriented Middleware over IP, is the communication protocol which is the most core for realizing the SOA architecture in the new energy automobile industry at present. The SOME/IP protocol manages the whole vehicle information by taking the service as a unit, the service can comprise various callable methods and event notification groups, the information is transmitted and shared through a service interface, and the service is distributed as required.
The DDS (Data Distribution Service ) is a new generation of distributed real-time communication middleware protocol, adopts a publish/subscribe system architecture, emphasizes the centering of data, provides rich QoS service quality strategies, ensures the real-time, efficient and flexible distribution of the data, and can meet the application requirements of various distributed real-time communication.
The Binary protocol sequences the interface calling files, so that the data volume actually transmitted after the serialization is greatly reduced. And the data transmission is carried out in a standard Json format, so that the data exchange is more visual, and the user can debug the data conveniently.
In one embodiment, the serialization protocol layer may further extend the set including at least one serialization protocol in addition to the provided protocol, and the client may add a user-defined serialization protocol to the set including at least one serialization protocol in response to a user extending the set including at least one serialization protocol.
The user-defined serialization protocol is supported, so that the serialization requirement of a user for interface calling files can be greatly met, the method is not limited to a preset centralized serialization implementation scheme, and the application range is wider.
Step 206, calling a data transmission protocol from a preset set containing at least one data transmission protocol, transmitting the serialized interface calling file to a server, and receiving a return value of an interface corresponding to the interface calling file transmitted by the server.
After the interface calling file is serialized, a data transmission protocol can be further called from a preset set containing at least one data transmission protocol, and the serialized interface calling file is transmitted to a server.
In practical application, the serialized file is a byte stream, and the data transmission protocol sends the byte stream to a server, so that the server performs deserialization on the byte stream, restores the byte stream to an interface calling file, calls an interface provided by the server based on interface calling information in the interface calling file, acquires a return value of the interface, and sends the return value to the client.
In this specification, the data transfer protocol may include a TSocket protocol, a TFramedTransport protocol, a TFileTransport protocol, a tmedorransport protocol, a TZlibTransport protocol, and the like supported in a thread framework.
In one embodiment, the foregoing data transmission protocol layer may further extend the set including the at least one data transmission protocol in addition to the foregoing provided protocol, and the client may add a user-defined data transmission protocol to the set including the at least one data transmission protocol in response to a user extending the set including the at least one data transmission protocol.
The data transmission protocol which is customized by the extended user is supported, so that the data transmission protocol requirement of the user for the interface call file can be greatly met, the method is not limited to a preset centralized data transmission protocol implementation scheme, and the application range is wider.
In one embodiment, the interface call request may also be an interface subscription request, and the user may initiate, by the client, a subscription for an interface provided by the server, so that the return value corresponding to the interface of the transmission of the periodic line of the server is obtained.
The client may generate an interface call file in response to the interface call request. The interface subscription request may be an interface subscription light request for a certain interface provided by the server.
After generating the call receiving file, the call serializing protocol can be further called to serialize the interface call file from a preset set containing at least one serializing protocol, and the data transmission protocol is called from the preset set containing at least one data transmission protocol, so that the serialized interface call file is transmitted to the server side to initiate interface subscription.
After the client initiates interface subscription, the server can push the client according to preset conditions, and the client receives the return value of the interface corresponding to the interface calling file periodically transmitted by the server.
Referring to fig. 3, fig. 3 is a flowchart of a remote interface calling method according to an exemplary embodiment. The method can be applied to a server, and the method can comprise the following steps:
step 302, receiving an interface call file after the client transmission serialization.
In this specification, the server may include a physical server of an independent host, or the server may be a virtual server, a cloud server, or the like, which is borne by the host cluster.
The server side can receive the serialized interface call file transmitted by the client side. In practical application, the serialized interface calling file is a byte stream sent by the client through a data transmission protocol, and the server can receive the byte stream sent by the data protocol based on the data transmission protocol.
Step 304, calling a serialization protocol from a preset set containing at least one serialization protocol, and performing deserialization on the serialized interface call file to restore the serialized interface call file.
After the server receives the byte stream, the server may further call the serialization protocol from a preset set including at least one serialization protocol, and deserialize the serialized interface call file sent by the client in the byte stream form, so as to restore the interface call file.
It should be noted that, the serialization protocol used by the client and the serialization protocol used by the server should be the same serialization protocol. When the serialization protocol layer of the client side serializes the interface call file, the byte stream also comprises the protocol type of the selected serialization protocol. The serialization protocol layer of the server side can determine which serialization protocol is used by the client side based on the protocol type in the byte stream, and deserialize the serialized interface call file based on the serialization protocol, so as to restore the interface call file.
Step 306, calling the interface provided by the server based on the interface calling file, and obtaining the return value of the interface.
After the serialized interface call file is restored, the interface provided by the server can be called based on the interface call information in the interface call file, and the return value is further acquired based on the function logic of the interface.
In an embodiment, the interface calling file further includes an interface ID and an interface calling parameter, and the server may search an interface corresponding to the interface ID maintained by the server based on the interface ID, and perform interface calling on the interface based on the interface calling parameter, so as to obtain a return value corresponding to the interface.
Step 308, calling a data transmission protocol from a preset set including at least one data transmission protocol, and transmitting the return value to the client.
After the server acquires the return value corresponding to the interface, the server can call a data transmission protocol from a preset set containing at least one data transmission protocol, and the return value is transmitted to the client.
Before transmitting the return value to the client, the server may further sequence the return value by calling a serialization protocol from a preset set including at least one serialization protocol to generate a byte stream, and further send the byte stream to the client based on the data transmission protocol.
Corresponding to the above-mentioned embodiments of the remote interface invoking method, the present specification also provides embodiments of the remote interface invoking apparatus.
Referring to fig. 4, fig. 4 is a hardware configuration diagram of an electronic device where a remote interface calling device is located in an exemplary embodiment. At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile storage 410, although other hardware required for the service is possible. One or more embodiments of the present description may be implemented in a software-based manner, such as by the processor 402 reading a corresponding computer program from the non-volatile memory 410 into the memory 408 and then running. Of course, in addition to software implementation, one or more embodiments of the present disclosure do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or a logic device.
Referring to fig. 5, fig. 5 is a block diagram illustrating a remote interface call apparatus according to an exemplary embodiment. The remote interface calling device can be applied to the electronic equipment shown in fig. 4 to realize the technical scheme of the specification. Wherein, the remote interface calling device may include:
a request receiving unit 502, configured to generate an interface call file in response to an interface call request;
a serialization unit 504, configured to invoke a serialization protocol to serialize the interface call file from a preset set including at least one serialization protocol;
the data transmission unit 506 is configured to invoke a data transmission protocol from a preset set including at least one data transmission protocol, transmit the serialized interface call file to a server, and receive a return value of an interface corresponding to the interface call file transmitted by the server.
In this embodiment, the apparatus further includes:
the user-defined extension unit is used for responding to the user-defined extension operation of the set containing at least one serialization protocol, and adding the user-defined serialization protocol to the set containing at least one serialization protocol;
and/or the number of the groups of groups,
and responding to the expansion operation of the user for the data transmission protocol containing at least one data transmission protocol, and adding the user-defined data transmission protocol to the set containing at least one data transmission protocol.
In this embodiment, the interface call request includes an interface ID and an interface call parameter;
the request receiving unit is specifically configured to generate an interface call file based on the interface ID and the interface call parameter in response to an interface call request.
In this embodiment, the data transmission unit is specifically configured to receive a return value of an interface corresponding to the interface calling file that is periodically transmitted by the server.
In this embodiment, the serialization protocol includes at least one or more of the following: binary protocol, json protocol, SOME/IP protocol, DDS protocol.
Referring to fig. 6, fig. 6 is a block diagram of another remote interface call device according to an exemplary embodiment. The remote interface calling device can be applied to the electronic equipment shown in fig. 4 to realize the technical scheme of the specification. Wherein, the remote interface calling device may include:
a data receiving unit 602, configured to receive an interface call file after the client transmission serialization;
the deserializing unit 604 is configured to call a serializing protocol from a preset set including at least one serializing protocol, deserialize the serialized interface call file, and restore the serialized interface call file to an interface call file;
an interface calling unit 606, configured to call an interface provided by the server based on the interface calling file, and obtain a return value of the interface;
and the data transmission unit 608 is configured to invoke a data transmission protocol from a preset set including at least one data transmission protocol, and transmit the return value to the client.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are illustrative only, in that the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present description. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
User information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in this specification are both information and data authorized by the user or sufficiently authorized by the parties, and the collection, use and processing of relevant data requires compliance with relevant laws and regulations and standards of the relevant country and region, and is provided with corresponding operation portals for the user to choose authorization or denial.
The present specification also provides an embodiment of a computer-readable storage medium. The computer readable storage medium stores machine readable instructions that, when invoked and executed by a processor, implement the remote interface invocation method provided by any of the embodiments of the present specification.
The computer readable storage medium provided by the embodiments of the present specification may include, but is not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks, ROMs (Read-Only memories), RAMs (Random Access Memory, random access memories), EPROMs (Erasable Programmable Read-Only memories), EEPROMs (Electrically Erasable Programmable Read-Only memories), flash memories, magnetic cards, or optical fiber cards. That is, a readable storage medium includes a readable medium that can store or transfer information.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The foregoing description of the preferred embodiment(s) is (are) merely intended to illustrate the embodiment(s) of the present invention, and it is not intended to limit the embodiment(s) of the present invention to the particular embodiment(s) described.

Claims (14)

1. A remote interface calling method applied to a vehicle-mounted client, the method comprising:
responding to the interface calling request, and generating an interface calling file;
calling a serialization protocol from a preset set containing at least one serialization protocol to serialize the interface calling file;
and calling a data transmission protocol from a preset set containing at least one data transmission protocol, transmitting the serialized interface calling file to a server, and receiving a return value of an interface corresponding to the interface calling file transmitted by the server.
2. The method according to claim 1, wherein the method further comprises:
responding to the set expansion operation of a user for the at least one serialization protocol, and adding the user-defined serialization protocol to the set containing the at least one serialization protocol;
and/or the number of the groups of groups,
and responding to the expansion operation of the user for the data transmission protocol containing at least one data transmission protocol, and adding the user-defined data transmission protocol to the set containing at least one data transmission protocol.
3. The method of claim 1, wherein the interface call request includes an interface ID and an interface call parameter;
the responding to the interface call request generates an interface call file, which comprises the following steps:
and generating an interface call file based on the interface ID and the interface call parameter in response to the interface call request.
4. The method of claim 1, wherein receiving the return value of the interface corresponding to the interface call file transmitted by the server includes:
and receiving a return value of an interface corresponding to the interface calling file periodically transmitted by the server.
5. The method of claim 1, wherein the serialization protocol comprises at least one or more of the following: binary protocol, json protocol, SOME/IP protocol, DDS protocol.
6. A remote interface calling method applied to a server, the method comprising:
receiving an interface calling file after the client transmits serialization;
calling a serialization protocol from a preset set containing at least one serialization protocol, and performing deserialization on the serialized interface call file to restore the interface call file;
calling an interface provided by the server based on the interface calling file, and acquiring a return value of the interface;
and calling a data transmission protocol from a preset set containing at least one data transmission protocol, and transmitting the return value to the client.
7. A remote interface calling device for use with an in-vehicle client, the device comprising:
the request receiving unit is used for responding to the interface calling request and generating an interface calling file;
the serialization unit is used for calling a serialization protocol from a preset set containing at least one serialization protocol to serialize the interface calling file;
and the data transmission unit is used for calling the data transmission protocol from a preset set containing at least one data transmission protocol, transmitting the serialized interface calling file to a server, and receiving a return value of an interface corresponding to the interface calling file transmitted by the server.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the user-defined extension unit is used for responding to the user-defined extension operation of the set containing at least one serialization protocol, and adding the user-defined serialization protocol to the set containing at least one serialization protocol;
and/or the number of the groups of groups,
and responding to the expansion operation of the user for the data transmission protocol containing at least one data transmission protocol, and adding the user-defined data transmission protocol to the set containing at least one data transmission protocol.
9. The apparatus of claim 7, wherein the interface call request includes an interface ID and an interface call parameter;
the request receiving unit is specifically configured to generate an interface call file based on the interface ID and the interface call parameter in response to an interface call request.
10. The apparatus of claim 7, wherein the data transmission unit is specifically configured to receive a return value of an interface corresponding to the interface call file periodically transmitted by the server.
11. The apparatus of claim 7, wherein the serialization protocol comprises at least one or more of the following: binary protocol, json protocol, SOME/IP protocol, DDS protocol.
12. A remote interface calling device applied to a server, the device comprising:
the data receiving unit is used for receiving the interface calling file after the client-side transmission serialization;
the anti-serialization unit is used for calling the serialization protocol from a preset set containing at least one serialization protocol, and carrying out anti-serialization on the serialized interface call file to restore the interface call file;
the interface calling unit is used for calling the interface provided by the server based on the interface calling file and acquiring a return value of the interface;
and the data transmission unit is used for calling the data transmission protocol from a preset set containing at least one data transmission protocol and transmitting the return value to the client.
13. An electronic device, comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are connected with each other through the bus;
the memory stores machine readable instructions, and the processor performs the method of any of claims 1-6 by invoking the machine readable instructions.
14. A computer readable storage medium storing machine readable instructions which, when invoked and executed by a processor, implement the method of any one of claims 1-6.
CN202310365952.2A 2023-03-31 2023-03-31 Remote interface calling method, remote interface calling device, electronic equipment and readable storage medium Pending CN116361035A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310365952.2A CN116361035A (en) 2023-03-31 2023-03-31 Remote interface calling method, remote interface calling device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310365952.2A CN116361035A (en) 2023-03-31 2023-03-31 Remote interface calling method, remote interface calling device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116361035A true CN116361035A (en) 2023-06-30

Family

ID=86904603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310365952.2A Pending CN116361035A (en) 2023-03-31 2023-03-31 Remote interface calling method, remote interface calling device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116361035A (en)

Similar Documents

Publication Publication Date Title
US10831562B2 (en) Method and system for operating a data center by reducing an amount of data to be processed
US7571447B2 (en) Loose coupling of web services
CN112449750A (en) Log data collection method, log data collection device, storage medium, and log data collection system
CN110196835B (en) Metadata processing method, metadata processing device and electronic equipment
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN116795647A (en) Method, device, equipment and medium for managing and scheduling heterogeneous resources of database
CN112395098B (en) Application program interface calling method and device, storage medium and electronic equipment
CN111881216A (en) Data acquisition method and device based on shared template
CN109343970B (en) Application program-based operation method and device, electronic equipment and computer medium
Bagaskara et al. Performance analysis of message broker for communication in fog computing
CN107395663B (en) Data acquisition method and device
US7827132B2 (en) Peer based event conversion
CN110297945B (en) Data information processing method and system based on XBRL
CN116361035A (en) Remote interface calling method, remote interface calling device, electronic equipment and readable storage medium
CN115562887A (en) Inter-core data communication method, system, device and medium based on data package
CN115391288A (en) Vehicle-end data recording method and device, electronic equipment and computer-readable storage medium
CN111694672B (en) Resource allocation method, task submission method, device, electronic equipment and medium
CN111639290B (en) Processing method and device for accessing online channel financial products
CN114567571A (en) Performance test method and device, electronic equipment and computer readable storage medium
CN117270833B (en) Service calling and issuing method, medium and computer equipment
CN113742112B (en) Electrocardiogram image generation method, system and electronic device
CN113626011B (en) PHP architecture-based data request processing method, device and equipment
US12009976B2 (en) Configuration of a server in view of a number of clients connected to the server
US11677624B2 (en) Configuration of a server in view of a number of clients connected to the server
CN110968370B (en) Data processing method and device

Legal Events

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