Service data communication method, device, electronic device and storage medium

By obtaining the vehicle's service identification information and target service description, the problem that the gRPC method cannot support many-to-many communication is solved, and many-to-many communication and offline service description acquisition in the Internet of Vehicles environment are realized, meeting the communication needs of complex Internet of Vehicles environments.

CN116032980BActive Publication Date: 2025-08-29BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211640860.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-20
Publication Date
2025-08-29
Estimated Expiration
2042-12-20

AI Technical Summary

Technical Problem

In the prior art, the gRPC method only supports communication between a single server and multiple clients, and cannot meet the needs of many-to-many communication in the Internet of Vehicles environment. The client needs to obtain service descriptions online, resulting in the communication process relying on network resources.

Method used

By acquiring service identification information of multiple vehicles, selecting a target service description, and obtaining target service data based on the description to perform control operations, supporting many-to-many communication, and allowing the service description to be obtained in an offline manner.

Benefits of technology

Many-to-many communication between multiple vehicles is realized, dependence on network resources is reduced, and communication needs of complex vehicle network environments are met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116032980B_ABST
    Figure CN116032980B_ABST
Patent Text Reader

Abstract

The present disclosure provides a service data communication method, device, electronic device and storage medium, which relate to the field of computer technology, and are particularly applicable to the field of autonomous driving data communication, so as to at least solve the technical problem in the prior art that only single-server-to-multi-client communication is supported, which cannot meet the vehicle communication needs in the Internet of Vehicles environment. The specific implementation scheme is as follows: obtaining service identification information of each vehicle among a plurality of vehicles, wherein the service identification information is used to identify at least one candidate service program started on each vehicle among the plurality of vehicles; selecting a target service description using the service identification information, wherein the target service description is the service description information of a target service program running on a target vehicle among the plurality of vehicles; obtaining target service data corresponding to the target service program from the target vehicle based on the target service description; and executing the control operation corresponding to the target service program through the target service data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and is particularly applicable to the field of autonomous driving data communication, and more particularly to service data communication methods, devices, electronic devices, and storage media. Background Art

[0002] Currently, cars, as computer terminals, are capable of running a number of server and client programs. These client and server programs primarily communicate using Remote Procedure Calls (RPC). A commonly used RPC method in related technologies is the gRPC framework, which is based on the data serialization method of the Protocol Buffers (Protobuf) structure.

[0003] However, in the increasingly complex Internet of Vehicles environment, multiple client programs and multiple server programs running on multiple cars will conduct many-to-many communication (that is, NN-type RPC) through specific topics. In this regard, the defects of the gRPC method in related technologies are: it only supports communication between a single server and multiple clients (that is, 1-N type RPC), which cannot meet the needs of many-to-many communication; during the communication process, the client needs to obtain the service description online, and does not support obtaining the service description offline, which makes the communication process dependent on network resources.

[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0005] The present disclosure provides a service data communication method, device, electronic device and storage medium to at least solve the technical problem in the prior art that only supports single-server-to-multi-client communication and cannot meet the vehicle communication needs in the Internet of Vehicles environment.

[0006] According to one aspect of the present disclosure, a service data communication method is provided, including: obtaining service identification information of each vehicle among a plurality of vehicles, wherein the service identification information is used to identify at least one candidate service program started on each vehicle among the plurality of vehicles; selecting a target service description using the service identification information, wherein the target service description is service description information of a target service program running on a target vehicle among the plurality of vehicles; obtaining target service data corresponding to the target service program from the target vehicle based on the target service description; and executing a control operation corresponding to the target service program through the target service data.

[0007] According to another aspect of the present disclosure, a device for service data communication is also provided, including: a first acquisition module, used to obtain service identification information of each vehicle among a plurality of vehicles, wherein the service identification information is used to identify at least one candidate service program started on each vehicle among the plurality of vehicles; a selection module, used to select a target service description using the service identification information, wherein the target service description is service description information of a target service program running on a target vehicle among the plurality of vehicles; a second acquisition module, used to obtain target service data corresponding to the target service program from the target vehicle based on the target service description; and a processing module, used to execute control operations corresponding to the target service program through the target service data.

[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so as to enable the at least one processor to execute the service data communication method proposed in the present disclosure.

[0009] According to yet another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the service data communication method proposed in the present disclosure.

[0010] According to another aspect of the present disclosure, a computer program product is provided, including a computer program. When a processor executes the service data communication method proposed in the present disclosure, the computer program executes the service data communication method proposed in the present disclosure.

[0011] In the present disclosure, service identification information of each of a plurality of vehicles is obtained, wherein the service identification information is used to identify at least one candidate service program started on each of the plurality of vehicles; a target service description is selected using the service identification information, wherein the target service description is service description information of a target service program running on a target vehicle among the plurality of vehicles; based on the target service description, target service data corresponding to the target service program is obtained from the target vehicle; and control operations corresponding to the target service program are executed through the target service data; thereby, the purpose of performing service calls between clients and a plurality of servers in a plurality of vehicles is achieved, and the technical effect of supporting multi-to-multi communication among vehicles to meet the needs of a complex Internet of Vehicles environment is realized, and the technical problem in the prior art that the vehicle communication needs in the Internet of Vehicles environment cannot be met due to only supporting communication from a single server to multiple clients is solved.

[0012] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings are used to better understand the present invention and do not constitute a limitation of the present invention.

[0014] Figure 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a service data communication method according to an embodiment of the present disclosure;

[0015] Figure 2 is a flow chart of a service data communication method provided according to an embodiment of the present disclosure;

[0016] Figure 3 is a schematic diagram of an optional service data communication network architecture provided according to an embodiment of the present disclosure;

[0017] Figure 4 is a schematic diagram of an optional service data communication process provided according to an embodiment of the present disclosure;

[0018] Figure 5 It is a structural block diagram of a service data communication device provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0019] In the technical solutions disclosed herein, the acquisition, storage, and application of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0020] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0022] In response to the communication needs between multiple client programs and multiple server programs running on multiple vehicles in the current Internet of Vehicles environment, the gRPC method for vehicle-to-vehicle communication provided in the relevant technology needs to obtain the description information of the server program (including service name, method name, parameters and return value, etc.) to the processes of multiple clients to complete the communication between a single server and multiple clients (that is, 1-N type communication). However, in the increasingly complex Internet of Vehicles environment, multiple client programs and multiple server programs running on multiple cars will conduct many-to-many communication (that is, NN type RPC) through specific topics. In this regard, the defects of the gRPC method in the relevant technology are: it only supports communication between a single server and multiple clients, and cannot meet the needs of many-to-many communication; during the communication process, the client needs to obtain the service description online, and does not support obtaining the service description offline, which makes the communication process dependent on network resources.

[0023] According to an embodiment of the present disclosure, a service data communication method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0024] The method embodiments provided in the embodiments of the present disclosure can be executed in a mobile terminal, a computer terminal or a similar electronic device. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein. Figure 1 It is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a service data communication method according to an embodiment of the present disclosure.

[0025] like Figure 1As shown, the computer terminal 100 includes a computing unit 101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 102 or a computer program loaded from a storage unit 108 into a random access memory (RAM) 103. Various programs and data required for the operation of the computer terminal 100 can also be stored in the RAM 103. The computing unit 101, ROM 102, and RAM 103 are connected to each other via a bus 104. An input / output (I / O) interface 105 is also connected to the bus 104.

[0026] Multiple components in the computer terminal 100 are connected to the I / O interface 105, including an input unit 106, such as a keyboard, a mouse, etc.; an output unit 107, such as various types of displays, speakers, etc.; a storage unit 108, such as a magnetic disk, an optical disk, etc.; and a communication unit 109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 109 allows the computer terminal 100 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0027] The computing unit 101 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 101 performs the service data communication method described herein. For example, in some embodiments, the service data communication method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 108. In some embodiments, part or all of the computer program can be loaded and / or installed on the computer terminal 100 via the ROM 102 and / or the communication unit 109. When the computer program is loaded into the RAM 103 and executed by the computing unit 101, one or more steps of the service data communication method described herein can be performed. Alternatively, in other embodiments, the computing unit 101 may be configured to execute the service data communication method in any other appropriate manner (eg, by means of firmware).

[0028] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), system on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0029] It should be noted that, in some optional embodiments, the above Figure 1 The electronic device shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the electronic device described above.

[0030] Under the above operating environment, the present disclosure provides the following Figure 2 The service data communication method shown can be Figure 1 The computer terminal or similar electronic device shown is used for execution. Figure 2 FIG. 1 is a flow chart of a service data communication method provided according to an embodiment of the present disclosure. Figure 2 As shown, the method may include the following steps:

[0031] Step S20, obtaining service identification information of each of the plurality of vehicles, wherein the service identification information is used to identify at least one candidate service program started on each of the plurality of vehicles;

[0032] The plurality of vehicles described above are multiple vehicles participating in communications or service invocations in a connected vehicle environment. Each of the plurality of vehicles has at least one candidate service program activated. The service identification information is used to identify the at least one candidate service program activated in each of the plurality of vehicles. For example, the at least one candidate service program may include a lidar service program, a data query service program, an in-vehicle voice service program, and the like.

[0033] A specific implementation method of obtaining the service identification information of each of the plurality of vehicles may be: obtaining the service identification information from registration information when at least one candidate program service on each of the vehicles is started.

[0034] Step S22, selecting a target service description using the service identification information, wherein the target service description is service description information of a target service program running on a target vehicle among the multiple vehicles;

[0035] The target service description is a description of a target service program running on a target vehicle among the multiple vehicles. The target vehicle is a vehicle designated for communication during the communication process, and the target service program is a target service program designated among at least one candidate service program started on the target vehicle.

[0036] Specifically, the target service program is determined from the at least one candidate service program using the obtained service identification information, and the service description information of the target service program is obtained, that is, the target service description is selected using the service representation information.

[0037] For example, the target service program running on the target vehicle may be a lidar service program on the target vehicle. Using the service identification information of each of the multiple vehicles, the target vehicle is determined, and service description information (e.g., service name, method name, parameters, return value, etc.) of the lidar service program is selected from the lidar service program, data query service program, and vehicle voice service program running on the target vehicle.

[0038] Step S24, based on the target service description, obtaining target service data corresponding to the target service program from the target vehicle;

[0039] The target service data may include the operating data, return data, and parsed data of the target service program. Based on the target service description of the target service program, the target service data corresponding to the target service program is obtained from the target vehicle. The data type of the target service data may be specified by a technician or determined based on a request message for invoking the target service program.

[0040] For example, when the above-mentioned target service program is a laser radar service program running on the target vehicle, based on the service description information of the laser radar service program (such as service name, method name, parameters and return value, etc.), the radar data collected by the laser radar service program (i.e., the above-mentioned target service data) is obtained from the target vehicle.

[0041] Step S26: executing the control operation corresponding to the target service program through the target service data.

[0042] Through the target service data, the control operations corresponding to the target service program can be executed. For example, after obtaining the radar data collected by the laser radar service program (i.e., the target service data), the control operations corresponding to the laser radar service program such as road condition analysis, vehicle route planning, and obstacle avoidance can be executed based on the radar data.

[0043] According to the above steps 20 to 26 of the present disclosure, service identification information of each vehicle in a plurality of vehicles is obtained, wherein the service identification information is used to identify at least one candidate service program started on each vehicle in a plurality of vehicles; a target service description is selected using the service identification information, wherein the target service description is service description information of a target service program running on a target vehicle in a plurality of vehicles; based on the target service description, target service data corresponding to the target service program is obtained from the target vehicle; and control operations corresponding to the target service program are executed through the target service data; thereby, the purpose of performing service calls between clients and multiple servers in a plurality of vehicles is achieved, and the technical effect of supporting multi-to-multi communication among vehicles to meet the needs of a complex Internet of Vehicles environment is realized, and the technical problem in the prior art that the vehicle communication needs in an Internet of Vehicles environment cannot be met due to only supporting communication from a single server to multiple clients is solved.

[0044] As an optional implementation, in the above service data communication method, the service identification information is obtained by at least one candidate service program registering the service identification of at least one candidate service program to the interface reflection server program corresponding to the vehicle.

[0045] For each of the multiple vehicles, after at least one candidate service program running on the vehicle is started, it registers a service identifier with the interface reflection server program corresponding to the vehicle, thereby obtaining service identification information corresponding to the vehicle. For example, the registered service identifier can be a service name or service number, and the service identification information of each vehicle includes the service name or service number of the at least one candidate service program running on the vehicle.

[0046] As an optional implementation, in the above step S20, obtaining the service identification information of each vehicle among the multiple vehicles further includes the following method steps:

[0047] Step S201: Publish a request message to a target topic via the interface reflection client program. The target topic is a topic that multiple vehicles have subscribed to and monitor together. The request message is used to request service identification information from the interface reflection server program running on the multiple vehicles.

[0048] Step S202: obtaining service identification information fed back by multiple vehicles through the target topic.

[0049] In the above optional embodiment, the number of the interface reflection client program is at least one, and each of the at least one interface reflection client program can communicate service data with the interface reflection server program corresponding to each of the plurality of vehicles.

[0050] The target subject is a transmission medium configured within the network to facilitate communication between multiple interface reflection server programs and at least one interface reflection client program. The target subject is a topic to which multiple vehicles have pre-subscribed and jointly monitor. At least one interface reflection client program issues a request message to the target subject to obtain service identification information. The interface reflection server program corresponding to each of the multiple vehicles responds to the request message via the target subject and returns the service identification information.

[0051] In the above-mentioned optional embodiment, when at least one interface reflection client program publishes a request message to the target topic through the interface reflection client program to request service identification information from the interface reflection server programs running on multiple vehicles, the interface reflection server programs running on multiple vehicles return their respective service identification information to the above-mentioned target entity, and then at least one interface reflection client program can obtain the service identification information fed back by multiple vehicles through the target topic.

[0052] It is easy to understand that through the above steps S201 to S202, the interface reflection client program and the interface reflection server program interact with service identification information through the target topic (Topic) set on the network. As a result, the interface reflection client program can obtain the candidate service programs running on the above-mentioned multiple vehicles in real time through the network.

[0053] As an optional implementation, in the above step S22, selecting the target service description using the service identification information further includes the following method steps:

[0054] Step S221, selecting a target service identifier based on the service identifier information, wherein the target service identifier is a service identifier of a target service program;

[0055] Step S222, determining whether the target service description is pre-stored locally in the current vehicle;

[0056] Step S223, in response to the current vehicle having a target service description pre-stored locally, reading the target service description from the current vehicle locally;

[0057] Step S224 : In response to the current vehicle not having the target service description stored locally in advance, obtaining the target service description from the target vehicle.

[0058] In the above optional embodiment, the target service identifier is the service identifier of the target service program. The target service program is a target server-side service program established by a client service program that calls the service program. The target service identifier is the service name or service number of the target service program. The target service identifier corresponding to the target service program is selected based on the service identifier information of each of the multiple vehicles.

[0059] Based on the target service identifier, a determination is made as to whether the target service description is pre-stored locally in the current vehicle. The target service description is the service description corresponding to the target service identifier (e.g., method name, parameters, return value, etc.). In other words, a query is performed to determine whether the target service description corresponding to the target service identifier exists in the local cache of the current vehicle.

[0060] For example, the target service identifier is the target service name of the target service program. If the current vehicle has a target service description corresponding to the target service name pre-stored locally, the target service description is directly read from the local storage space of the current vehicle. If the current vehicle does not have a target service description corresponding to the target service name pre-stored locally, the target service description is obtained from the target vehicle via a network connection. The current vehicle is the vehicle corresponding to the client requesting to call the service program, and the target vehicle is the vehicle corresponding to the called service program (i.e., the server).

[0061] It should be noted that in the case where the current vehicle has pre-stored a target service description corresponding to the target service name, this locally stored service description is obtained and stored in the local storage space of the current vehicle through various methods, and the storage format is not limited. For example, in the application scenario of a debugging task, the local storage space of the current vehicle often pre-stores the target service description to be used.

[0062] It is easy to understand that the method steps provided in steps S221 to S224 above enable the current vehicle to directly read the target service description to be used from its local storage, reducing its reliance on network resources during service data communication. In other words, in specific application scenarios, when network resources are unavailable or network quality is poor, some candidate service descriptions can be pre-stored in the local storage space of the current vehicle, allowing the current vehicle to complete service calls or service data communication without having to retrieve the service description from the target vehicle over the network.

[0063] As an optional implementation, in the above step S24, based on the target service description, obtaining the target service data corresponding to the target service program from the target vehicle further includes the following method steps:

[0064] Step S241: parsing the target service description to obtain target function information, wherein the target function information is used to obtain target service data from the target vehicle via a remote service call;

[0065] Step S242: Obtain target service data from the target vehicle based on the target function information.

[0066] In this optional embodiment, the current vehicle parses the read or acquired target service description to obtain target function information corresponding to the target service program. This target function information is used to obtain target service data from the target vehicle via a remote service call. In other words, based on the target function information obtained by parsing the target service description, the client can obtain the corresponding target service data from the target vehicle that provides the target service program.

[0067] As an optional implementation, in the above step S241, the target service description is parsed to obtain the target function information, and the following method steps are also included:

[0068] Step S2411: parse the target service description to obtain the function identifier of the target function and parameter information of the target function.

[0069] In the above optional embodiment, the target function information obtained by parsing the target service description includes a function identifier of the target function and parameter information of the target function. The target function is a function to be used when the target service program provides the corresponding service. The function identifier of the target function is the function name of the target function. The parameter information of the target function includes the parameter type and number of parameters of the target function. In addition, the target function information may also include the return value type of the target function.

[0070] For example, in an application scenario, the target function information may be information such as the function name, parameter type, number of parameters, and return value type of the to-be-used function corresponding to the target service description.

[0071] The target service data is data generated by the execution of the target service program. The target service data is obtained from the target vehicle based on the target function information. Specifically, based on the function name, parameter types, number of parameters, and return value type corresponding to the target service description, the corresponding target service data is obtained from the target vehicle. The target service data includes the function calculation result, parameter values, function return value, etc. corresponding to the function to be used.

[0072] For example, if the target service program is a vehicle data query service program, the service description of the vehicle data query service program is parsed to obtain the query function name, parameter type, and number of parameters to be queried. Based on the query function name, parameter type, and number of parameters to be queried, a corresponding vehicle data query result is obtained from the target vehicle. The vehicle data query result includes the parameter value, parameter type, and number of parameters obtained by querying using the query function name.

[0073] As an optional implementation, in the above step S242, obtaining target service data from the target vehicle based on the target function information further includes the following method steps:

[0074] Step S2421: creating a communication channel corresponding to the remote call service mode based on the function identifier and the target service identifier;

[0075] Step S2422: Acquire target service data from the target vehicle using a communication channel.

[0076] In the above optional embodiment, based on the function identifier and target service identifier in the target function information, a communication channel corresponding to the remote call service mode (ie, RPC mode) is created. Further, the communication channel is used to obtain the target service data from the target vehicle.

[0077] As an optional implementation, in the above step S2422, the target service data is obtained from the target vehicle via a communication channel, and the following method steps are also included:

[0078] Step S2423: Create a first string based on the parameter information, wherein the first string is a serialized parameter string for requesting target service data;

[0079] Step S2424: sending a first character string to the target vehicle via a communication channel, and receiving a second character string returned by the target vehicle, wherein the second character string is a response character string to the first character string;

[0080] Step S2425: parse the second character string to obtain target service data.

[0081] In the above optional implementation, a serialized parameter string (i.e., a first string) is created based on the parameter information in the objective function information. The serialized parameter string is used to request the target service data. Furthermore, the client (i.e., the current vehicle) uses the Channel corresponding to the above RPC method to send the above serialized parameter string to the target vehicle to request the target service data. Then, the client (i.e., the current vehicle) monitors the Channel corresponding to the above RPC method and receives the second string returned by the target vehicle in response to the above serialized parameter string. Furthermore, the client (i.e., the current vehicle) parses the second string to obtain the target service data.

[0082] It is easy to understand that since the above-mentioned first character string is created based on the parameter information of the target function, and the above-mentioned communication channel is created based on the function identifier and the target service identifier, when parsing the second character string returned by the above-mentioned target vehicle, the specific data can be parsed according to the above-mentioned target function information (including the parameter information and function identifier of the target function, etc.) to obtain the target service data corresponding to the target function information.

[0083] The service data communication method described in the embodiments of the present disclosure can be applied, but is not limited to, to application scenarios involving the invocation of connected vehicle services in areas such as urban smart transportation, healthcare, logistics, smart agriculture, intelligent manufacturing, environmental protection, and smart communities. The following uses the application scenario of connected vehicle services in urban smart transportation as an example to further illustrate the service data communication technology solution described in the present disclosure.

[0084] The service data communication method provided by the disclosed embodiments is based on interface reflection implementation of an urban smart transportation autonomous driving platform (such as the Apollo autonomous driving platform). During the interface reflection process, there are client programs and server programs. Each interface reflection process has an interface reflection service. The interface reflection services corresponding to multiple client programs and multiple server programs communicate through topics.

[0085] Figure 3 is a schematic diagram of an optional service data communication network architecture provided according to an embodiment of the present disclosure, such as Figure 3 As shown in FIG, the urban intelligent transportation automatic driving platform is connected to multiple vehicles, which are recorded as vehicle 1 to vehicle m. Each of the vehicles 1 to vehicle m runs multiple service programs ( Figure 3In this example, each vehicle runs n service programs. In the application scenario, the number of service programs running on each vehicle is usually different. In addition, each vehicle runs a corresponding Interface Reflection server program. These Interface Reflection server programs can conduct many-to-many communication with multiple Interface Reflection client programs through the target topic. This many-to-many communication can obtain the service description of the target vehicle and call the corresponding methods of the remote service program.

[0086] Figure 4 is a schematic diagram of an optional service data communication process provided according to an embodiment of the present disclosure, such as Figure 4 As shown, the service data communication process includes the following method steps:

[0087] The first step is server program registration. When a candidate service program is started on a vehicle, the relevant information of the candidate service program (also called registration information) will be registered with the local Interface Reflection server program of the current vehicle.

[0088] In the second step, the client obtains the service name (also known as service identification information). When one of the multiple Interface Reflection client programs needs to call the server program, it will publish a service name request message to the target topic (Topic) in the network. Then, the multiple Interface Reflection server programs corresponding to the multiple vehicles will respond to the service name request message and return the locally registered service name to the Interface Reflection client program.

[0089] The third step is for the client to obtain the service description. After the Interface Reflection client program obtains the above service name, it will check whether there is a service description corresponding to the specified service name locally; if there is a corresponding service description locally, it will obtain the service description corresponding to the specified service name from the local cache; if there is no corresponding service description locally, it will obtain the service description corresponding to the specified service name through the network

[0090] Step 4: The client parses the service description. After obtaining the service description, the Interface Reflection client program parses it to obtain the corresponding function information. For example, the function information includes: namespace, function name, parameter type, number of parameters, and function return value type.

[0091] In the fifth step, the client calls the remote service program. Based on the function information obtained by parsing the service description, it constructs a serialized parameter string and builds a communication channel (Channel) for communicating with the remote service program. The serialized parameter string is further sent through the communication channel to call the remote service program.

[0092] Step 6: Get the return value (i.e., target service data). Listen to the response string in the communication channel and use the above function information to parse the response string to get the return value.

[0093] It should be noted that the method of obtaining the service description through the client in step 3 can reduce network data during service data communication and reduce the service data communication process's dependence on network resources. In particular, the method of the InterfaceReflection client program obtaining the service description corresponding to the specified service name from the local cache is often used in debugging scenarios.

[0094] It should be noted that in the application scenario of the Internet of Vehicles service call in the above-mentioned urban smart transportation, the service end providing the service program is distributed in multiple vehicles (such as Figure 3 The client requesting to call the remote service program can also be distributed on multiple vehicles (the vehicle is not shown in the figure, such as Figure 3 That is, through the above method of the embodiment of the present disclosure, service data communication between multiple servers and multiple clients can be achieved, thereby meeting the demand for service data communication between vehicles in the increasingly complex Internet of Vehicles environment.

[0095] It is easy to understand that according to the method steps provided in the above embodiments of the present disclosure, the beneficial effects that can be achieved by the technical solution of the present disclosure include:

[0096] Beneficial effects (1): Supporting communication between multiple clients and multiple servers;

[0097] Beneficial effect (2): Supports obtaining service descriptions in an offline manner, that is, being able to obtain service descriptions by reading local files;

[0098] Beneficial effect (3): The communication process has low dependence on network resources.

[0099] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, or of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present disclosure.

[0100] According to another embodiment of the present disclosure, a service data communication device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0101] Figure 5 is a structural block diagram of a service data communication device provided according to an embodiment of the present disclosure, such as Figure 5 As shown, the service data communication device 500 includes: a first acquisition module 501, used to obtain service identification information of each vehicle among a plurality of vehicles, wherein the service identification information is used to identify at least one candidate service program started on each vehicle among a plurality of vehicles; a selection module 502, used to select a target service description using the service identification information, wherein the target service description is service description information of a target service program running on a target vehicle among a plurality of vehicles; a second acquisition module 503, used to obtain target service data corresponding to the target service program from the target vehicle based on the target service description; and a processing module 504, used to execute control operations corresponding to the target service program through the target service data.

[0102] Optionally, in the above-mentioned service data communication device 500, the service identification information is obtained by at least one candidate service program registering the service identification of at least one candidate service program to the interface reflection server program corresponding to the vehicle.

[0103] Optionally, the above-mentioned first acquisition module 501 is also used to: obtain the service identification information of each vehicle among multiple vehicles, including: publishing a request message to the target topic through the interface reflection client program, wherein the target topic is a topic pre-subscribed and jointly monitored by multiple vehicles, and the request message is used to request the interface reflection server program running on multiple vehicles to obtain the service identification information; obtain the service identification information fed back by multiple vehicles through the target topic.

[0104] Optionally, the above-mentioned selection module 502 is also used to: select the target service identifier based on the service identifier information, wherein the target service identifier is the service identifier of the target service program; determine whether the target service description is pre-stored locally in the current vehicle; in response to the target service description being pre-stored locally in the current vehicle, read the target service description from the current vehicle; in response to the target service description not being pre-stored locally in the current vehicle, obtain the target service description from the target vehicle.

[0105] Optionally, the above-mentioned second acquisition module 503 includes: a parsing unit 5031 (not shown in the figure), which is used to parse the target service description to obtain target function information, wherein the target function information is used to obtain target service data from the target vehicle through a remote call service; an acquisition unit 5032 (not shown in the figure), which is used to obtain target service data from the target vehicle based on the target function information.

[0106] Optionally, the parsing unit 5031 is further configured to parse the target service description to obtain a function identifier of the target function and parameter information of the target function.

[0107] Optionally, the acquisition unit 5032 is further configured to: create a communication channel corresponding to the remote call service mode based on the function identifier and the target service identifier; and acquire target service data from the target vehicle using the communication channel.

[0108] Optionally, the acquisition unit 5032 is further configured to: create a first string based on the parameter information, wherein the first string is a serialized parameter string for requesting target service data; send the first string to the target vehicle via a communication channel, and receive a second string returned by the target vehicle, wherein the second string is a response string to the first string; and parse the second string to obtain the target service data.

[0109] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0110] According to another embodiment of the present disclosure, an electronic device is also provided, including at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of any one of the above method embodiments.

[0111] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0112] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0113] Step S1, obtaining service identification information of each of a plurality of vehicles, wherein the service identification information is used to identify at least one candidate service program started on each of the plurality of vehicles;

[0114] Step S2, selecting a target service description using the service identification information, wherein the target service description is service description information of a target service program running on a target vehicle among the multiple vehicles;

[0115] Step S3, based on the target service description, obtaining target service data corresponding to the target service program from the target vehicle;

[0116] Step S4: executing the control operation corresponding to the target service program through the target service data.

[0117] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0118] According to another embodiment of the present disclosure, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are configured to execute the steps of any of the above method embodiments during runtime.

[0119] Optionally, in this embodiment, the non-transitory computer-readable storage medium may be configured to store a computer program for causing a computer to execute the following steps:

[0120] Step S1, obtaining service identification information of each of a plurality of vehicles, wherein the service identification information is used to identify at least one candidate service program started on each of the plurality of vehicles;

[0121] Step S2, selecting a target service description using the service identification information, wherein the target service description is service description information of a target service program running on a target vehicle among the multiple vehicles;

[0122] Step S3, based on the target service description, obtaining target service data corresponding to the target service program from the target vehicle;

[0123] Step S4: executing the control operation corresponding to the target service program through the target service data.

[0124] Alternatively, in this embodiment, the non-transitory computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any suitable combination thereof. More specific examples of computer-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, erasable programmable read-only memories (EPROMs or flash memories), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0125] According to another embodiment of the present disclosure, a computer program product is further provided, including a computer program, which implements the above-mentioned service data communication method when executed by a processor.

[0126] It should be noted that the program code used to implement the service data communication method of the present disclosure can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0127] In the several embodiments provided in the present disclosure, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0128] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0129] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0130] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.

[0131] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.

[0132] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A service data communication method, comprising: Obtaining service identification information of each of a plurality of vehicles, wherein the service identification information is used to identify at least one candidate service program started on each of the plurality of vehicles, the candidate service program being a lidar service program; Selecting a target service description using the service identification information, wherein the target service description is service description information of a target service program running on a target vehicle among the multiple vehicles; Parsing the target service description to obtain target function information, wherein the target function information is used to obtain target service data from the target vehicle through a remote call service; acquiring the target service data from the target vehicle based on the target function information; Executing the control operation corresponding to the target service program through the target service data; Among them, selecting the target service description using the service identification information includes: selecting the target service identification based on the service identification information, wherein the target service identification is the service identification of the target service program; determining whether the target service description is pre-stored locally in the current vehicle; in response to the target service description being pre-stored locally in the current vehicle, reading the target service description from the current vehicle; in response to the target service description not being pre-stored locally in the current vehicle, obtaining the target service description from the target vehicle.

2. The service data communication method according to claim 1, wherein: The service identification information is obtained by the at least one candidate service program registering the service identification of the at least one candidate service program with the interface reflection server program corresponding to the vehicle.

3. The service data communication method according to claim 1, wherein: Acquiring the service identification information of each of the multiple vehicles includes: Publishing a request message to a target topic through an interface reflection client program, wherein the target topic is a topic that the multiple vehicles pre-subscribe to and monitor together, and the request message is used to request the interface reflection server program running on the multiple vehicles to obtain the service identification information; The service identification information fed back by the multiple vehicles is obtained through the target topic.

4. The service data communication method according to claim 1, wherein: Parsing the target service description to obtain the target function information includes: The target service description is parsed to obtain a function identifier of the target function and parameter information of the target function.

5. The service data communication method according to claim 4, wherein: Acquiring the target service data from the target vehicle based on the target function information includes: Creating a communication channel corresponding to the remote call service mode based on the function identifier and the target service identifier; The target service data is acquired from the target vehicle using the communication channel.

6. The service data communication method according to claim 5, wherein: Acquiring the target service data from the target vehicle using the communication channel includes: Creating a first string based on the parameter information, wherein the first string is a serialized parameter string for requesting the target service data; Using the communication channel to send the first character string to the target vehicle, and receiving a second character string returned by the target vehicle, wherein the second character string is a response character string to the first character string; The second character string is parsed to obtain the target service data.

7. A service data communication device, comprising: a first acquisition module, configured to acquire service identification information of each of a plurality of vehicles, wherein the service identification information is used to identify at least one candidate service program activated on each of the plurality of vehicles, the candidate service program being a lidar service program; A selection module, configured to select a target service description using the service identification information, wherein the target service description is service description information of a target service program running on a target vehicle among the multiple vehicles; a second acquisition module, configured to parse the target service description to obtain target function information, wherein the target function information is used to obtain target service data from the target vehicle by remotely calling a service; and to obtain the target service data from the target vehicle based on the target function information; a processing module, configured to execute a control operation corresponding to the target service program through the target service data; Among them, the selection module is also used to: select the target service identifier based on the service identifier information, wherein the target service identifier is the service identifier of the target service program; determine whether the target service description is pre-stored locally in the current vehicle; in response to the target service description being pre-stored locally in the current vehicle, read the target service description from the current vehicle; in response to the target service description not being pre-stored locally in the current vehicle, obtain the target service description from the target vehicle.

8. The service data communication device according to claim 7, wherein: The service identification information is obtained by the at least one candidate service program registering the service identification of the at least one candidate service program with the interface reflection server program corresponding to the vehicle.

9. The service data communication device according to claim 7, wherein: The first acquisition module is further configured to: Publishing a request message to a target topic through an interface reflection client program, wherein the target topic is a topic that the multiple vehicles pre-subscribe to and monitor together, and the request message is used to request the interface reflection server program running on the multiple vehicles to obtain the service identification information; The service identification information fed back by the multiple vehicles is obtained through the target topic.

10. The service data communication device according to claim 7, wherein: The second acquisition module includes: a parsing unit, configured to parse the target service description to obtain target function information, wherein the target function information is used to obtain the target service data from the target vehicle via a remote call service; An acquiring unit is configured to acquire the target service data from the target vehicle based on the target function information.

11. The service data communication device according to claim 10, wherein: The parsing unit is further configured to: The target service description is parsed to obtain a function identifier of the target function and parameter information of the target function.

12. The service data communication device according to claim 11, wherein: The acquisition unit is further configured to: Creating a communication channel corresponding to the remote call service mode based on the function identifier and the target service identifier; The target service data is acquired from the target vehicle using the communication channel.

13. The service data communication device according to claim 12, wherein: The acquisition unit is further configured to: Creating a first string based on the parameter information, wherein the first string is a serialized parameter string for requesting the target service data; Using the communication channel to send the first character string to the target vehicle, and receiving a second character string returned by the target vehicle, wherein the second character string is a response character string to the first character string; The second character string is parsed to obtain the target service data.

14. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the service data communication method according to any one of claims 1 to 6.

15. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the service data communication method according to any one of claims 1 to 6.

16. A computer program product comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the service data communication method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • V2V-based information sharing method, vehicle-mounted terminal, electronic equipment and computer storage medium

    CN113132942A

  • Service calling method and system

    CN113535431A