A vehicle-mounted communication method, device, apparatus and storage medium
By establishing a correspondence between publishing entities and topic information, receiving topic subscription information from subscribing entities, and employing strategies such as preset verification algorithms, time interval monitoring, and priority sorting during data transmission, the problem that existing communication mechanisms cannot meet the large data throughput requirements of autonomous driving and intelligent connected systems is solved, achieving secure, efficient, and real-time data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-04
- Publication Date
- 2026-03-27
AI Technical Summary
Existing CAN, FlexRay and Ethernet communication mechanisms cannot meet the big data throughput requirements of autonomous driving and intelligent connected systems, and have problems with insufficient security, real-time performance and flexibility.
By establishing a correspondence between publishing entities and topic information, receiving topic subscription information from subscribing entities, acquiring and sending data, and employing security strategies such as preset verification algorithms, time interval monitoring, and priority sorting during data transmission, it supports service-based architecture design.
It achieves secure, efficient, and real-time transmission of large data throughput, meets the communication requirements of autonomous driving and intelligent connected systems, and supports service-based architecture design.
Smart Images

Figure CN114268927B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicle communication, and in particular relates to a vehicle-mounted communication method and device, equipment and a storage medium. BACKGROUND
[0002] With the rapid development of vehicle intelligence, networking and electrification, especially the maturity of automatic driving and intelligent networking technology, the requirements of vehicles for vehicle-mounted communication are becoming more and more diversified and higher and higher.
[0003] The commonly used vehicle-mounted communication mechanisms at present include CAN, FlexRay and related communication protocols based on Ethernet such as Some / IP, etc.
[0004] Among them, CAN communication has low cost, high reliability and good real-time performance, but has problems such as low bandwidth and poor flexibility, and the maximum communication rate is only 2Mbps, which cannot meet the demand of automatic driving and intelligent networking system for high data throughput.
[0005] Although the communication rate of FlexRay communication reaches 10Mbps, it still cannot meet the transmission of large data volume such as laser radar, 4D imaging radar, high-precision positioning and cloud communication.
[0006] Although Ethernet can support transmission rates of 100Mbps, 1Gbps or even 10Gbps, the communication mechanism of vehicle-mounted Ethernet is not perfect at present, and cannot fully meet the requirements of safety, real-time performance, flexibility, etc.
[0007] Therefore, there is an urgent need for a vehicle-mounted safe communication mechanism that can meet the large data throughput of automatic driving and intelligent networking system. SUMMARY
[0008] The embodiments of the present application provide a vehicle-mounted communication method, device, equipment and storage medium, which can solve the demand of large data throughput, and the data transmission is safe, high and real-time; while meeting the communication requirements of automatic driving and intelligent networking system, it also supports the implementation of service-based architecture design.
[0009] In one aspect, the embodiments of the present application provide a vehicle-mounted communication method, comprising:
[0010] Establishing a corresponding relationship between at least one publishing entity and topic information, the topic information being sent by the publishing entity; the topic information representing a vehicle-mounted service provided by the publishing entity;
[0011] Receiving first topic subscription information sent by a subscribing entity; the first topic subscription information including first topic information;
[0012] Determining a first publishing entity corresponding to the first topic information based on the corresponding relationship;
[0013] obtaining data based on first topic information published by a first publishing entity;
[0014] sending the data to a subscribing entity;
[0015] The publishing entity and the subscribing entity are different electronic control units, or the publishing entity and the subscribing entity are different modules in the same electronic control unit.
[0016] Optionally, the sending of the data to the subscribing entity comprises:
[0017] generating a first check code corresponding to the data according to a preset check algorithm;
[0018] packaging and sending the first check code and the data to the subscribing entity; the subscribing entity is configured to determine a second check code according to the preset check algorithm and the received data, and determine the accuracy of the received data based on the first check code and the second check code.
[0019] Optionally, the obtaining of the data based on the first topic information published by the first publishing entity comprises:
[0020] sending a subscription message to the first publishing entity;
[0021] receiving data based on the first topic information published by the first publishing entity in response to the subscription message.
[0022] Optionally, when the first publishing entity continuously publishes data based on the first topic information, the method further comprises:
[0023] monitoring a publishing time interval between adjacent data in the data based on the first topic information continuously published by the first publishing entity;
[0024] and / or;
[0025] monitoring a receiving time interval between adjacent data in the data based on the first topic information continuously received by the subscribing entity.
[0026] Optionally, the monitoring of the publishing time interval between adjacent data in the data based on the first topic information continuously published by the first publishing entity comprises:
[0027] if the publishing time interval between adjacent data in the data based on the first topic information continuously published by the first publishing entity is greater than or equal to a first preset time interval, generating a first error prompt information.
[0028] Optionally, the monitoring of the receiving time interval between adjacent data in the data based on the first topic information continuously received by the subscribing entity comprises:
[0029] If a time interval between adjacent data in the data based on the first topic information continuously received by the subscription entity is greater than or equal to the second preset time interval, a second error prompt information is generated.
[0030] Optionally, before the data is sent to the subscription entity, the method further comprises:
[0031] receiving second topic subscription information sent by the subscription entity; the second topic subscription information comprises the second topic information;
[0032] determining a second publishing entity corresponding to the second topic information based on the correspondence;
[0033] obtaining data based on the second topic information published by the second publishing entity.
[0034] Optionally, the first data published by the first publishing entity based on the first topic information and the second data published by the second publishing entity based on the second topic information both carry priority information.
[0035] sending the data to the subscription entity, comprising:
[0036] performing priority sorting on the first data and the second data based on the priority information of the first data and the priority information of the second data;
[0037] sending the first data and the second data to the subscription entity in sequence according to the result of the priority sorting.
[0038] Optionally, when the first publishing entity and the subscription entity are different modules in the same electronic control unit, a shared memory exists between the first publishing entity and the subscription entity.
[0039] obtaining the data based on the first topic information published by the first publishing entity, comprising:
[0040] receiving the data based on the first topic information written in the address space corresponding to the shared memory by the first publishing entity;
[0041] sending the data to the subscription entity, comprising:
[0042] sending a notification to the subscription entity, so that the subscription entity reads the data based on the first topic information written by the first publishing entity in the address space corresponding to the shared memory in response to the notification.
[0043] Optionally, when the first publishing entity and the subscription entity are different electronic control units, obtaining the data based on the first topic information published by the first publishing entity, comprising:
[0044] obtaining the data based on the first topic information sent by the first publishing entity through a network router;
[0045] sending the data to the subscription entity, comprising:
[0046] forwarding, by a network router, the data based on the first topic information sent by the first publishing entity to the subscription entity.
[0047] In another aspect, an embodiment of the present application provides a vehicle-mounted communication device, comprising:
[0048] a establishing module configured to perform establishing a correspondence between at least one publishing entity and topic information, the topic information being sent by the publishing entity; the topic information representing a vehicle-mounted service provided by the publishing entity;
[0049] a second receiving module configured to perform receiving first topic subscription information sent by a subscription entity; the first topic subscription information comprising first topic information;
[0050] a determining module configured to perform determining, based on the correspondence, a first publishing entity corresponding to the first topic information;
[0051] a obtaining module configured to perform obtaining data based on the first topic information published by the first publishing entity;
[0052] a sending module configured to perform sending the data to the subscription entity;
[0053] wherein the publishing entity and the subscription entity are different electronic control units, or the publishing entity and the subscription entity are different modules in the same electronic control unit.
[0054] In another aspect, an embodiment of the present application provides a device, the device comprising a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded by the processor and performing the vehicle-mounted communication method described above.
[0055] In another aspect, an embodiment of the present application provides a computer storage medium, the storage medium storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded by the processor and performing to realize the vehicle-mounted communication method described above.
[0056] The vehicle-mounted communication method, device, equipment and storage medium provided by the embodiments of the present application have the following beneficial effects:
[0057] The subject information is sent by the publishing entity, the subject information represents a vehicle-mounted service provided by the publishing entity, the first subject subscription information is received, the first subject subscription information includes first subject information, the first publishing entity corresponding to the first subject information is determined based on the correspondence, data based on the first subject information published by the first publishing entity is obtained, and the data is sent to the subscription entity. The publishing entity and the subscription entity are different electronic control units, or the publishing entity and the subscription entity are different modules in the same electronic control unit. In this way, the application can meet the demand for large data throughput, and the data transmission is safe, high, and real-time. The communication requirements of the automatic driving and intelligent network system are met, and the implementation of the service-based architecture design is also supported. BRIEF DESCRIPTION OF DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0059] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0060] Figure 2 is a flowchart of a vehicle-mounted communication method provided by an embodiment of the present application;
[0061] Figure 3 is a flowchart of a vehicle-mounted communication method provided by an embodiment of the present application;
[0062] Figure 4 is a flowchart of a vehicle-mounted communication method provided by an embodiment of the present application;
[0063] Figure 5 is a flowchart of a vehicle-mounted communication method provided by an embodiment of the present application;
[0064] Figure 6 is a flowchart of a vehicle-mounted communication method provided by an embodiment of the present application;
[0065] Figure 7 is a schematic diagram of a communication scenario provided by an embodiment of the present application;
[0066] Figure 8 is a flowchart of a vehicle-mounted communication method provided by an embodiment of the present application;
[0067] Figure 9is a schematic diagram of a communication scenario provided by an embodiment of the present application.
[0068] Figure 10 is a schematic diagram of a communication scenario provided by an embodiment of the present application.
[0069] Figure 11 is a schematic diagram of a communication scenario provided by an embodiment of the present application.
[0070] Figure 12 is a schematic diagram of a vehicle-mounted communication device provided by an embodiment of the present application.
[0071] Figure 13 is a hardware structure block diagram of a server of a vehicle-mounted communication method provided by an embodiment of the present application. DETAILED DESCRIPTION
[0072] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0073] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or server including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0074] At present, with the rapid development of automatic driving, Internet of Vehicles and service-based architecture design technology, the requirements of vehicle systems for data throughput are becoming larger and larger, and higher demands for data security, real-time, efficient and flexible transmission are put forward. The traditional CAN and FlexRay have been unable to meet the needs of current communication transmission due to low data rate and poor flexibility.
[0075] Based on this, the embodiment of the application provides a vehicle-mounted communication method, which can meet the demand of automatic driving and intelligent network system big data throughput, and realizes safe, real-time, efficient and flexible transmission of data, and meets the communication requirements of automatic driving and intelligent network system, and also supports the implementation of service-based architecture design.
[0076] Please refer to Figure 1 , Figure 1 is a schematic diagram of an application scenario provided by the embodiment of the application, including a data space and a plurality of communication entities;
[0077] The data space can be understood as a local area network, and only the communication entities in the same data space can communicate with each other. The communication entity has the functions of subscribing data and publishing data. The data space includes a communication management module for processing data interaction between different communication entities.
[0078] The data space can have different definitions in different application scenarios. For example, there are many electronic control units (ECU) on a vehicle for realizing different functions. For a single ECU, it can be a data space. The applications in the ECU correspond to communication entities, and the applications can provide different services and communicate with each other to publish and subscribe data. For example, a plurality of ECUs can form a data space, and each ECU in the plurality of ECUs corresponds to a communication entity. For example, the data space can also be a vehicle network.
[0079] Figure 2 is a flowchart of a vehicle-mounted communication method provided by the embodiment of the application, as Figure 2 shown, taking the communication management module in the data space as an example, the vehicle-mounted communication method includes the following steps:
[0080] In step S201, a corresponding relationship between at least one publishing entity and topic information is established, and the topic information is sent by the publishing entity. The topic information represents the vehicle-mounted service provided by the publishing entity.
[0081] In the embodiment of the application, the publishing entity sends the topic information to the communication management module in the data space, and the topic information represents the vehicle-mounted service provided by the publishing entity. For example, for a vehicle-mounted parking system, the system can provide many services such as valet parking and automatic parking, and each service corresponds to a topic. For example, for a perception system, the system can provide services such as lane line detection, traffic light detection and obstacle detection, and lane line detection can be a topic. Specifically, the topic information can include a topic identifier and / or a topic name, and the topic identifier can be a preset string.
[0082] The communication management module establishes a corresponding relationship between the publishing entity and the topic information after receiving the topic information sent by the publishing entity. For example, in an application scenario, the publishing entity is a perception system, and the topic information sent by the publishing entity to the communication management module can include lane line detection, traffic light detection, and obstacle detection. The communication management module establishes a corresponding relationship between the perception system and the lane line detection, traffic light detection, and obstacle detection, and stores the corresponding relationship.
[0083] Before the publishing entity sends the topic information to the communication management module, in an optional embodiment, as shown in Figure 3 The vehicle-mounted communication method can include the following steps:
[0084] In step S301, the publishing entity sends a data type registration request to the communication management module of the data space.
[0085] The data type registration request represents the data type corresponding to the topic information to be published by the publishing entity. Since different publishing entities subsequently publish data based on different topic information, the data types of the data are different, and different data types include strings, matrices, queues, and the like. In order to facilitate data management, the publishing entity needs to complete the registration of the data type before sending the topic information to the communication management module.
[0086] In step S303, the communication management module returns first feedback information to the publishing entity, and the first feedback information indicates that the publishing entity completes the registration of the corresponding data type.
[0087] In a further optional embodiment, after the communication management module receives the topic information sent by the publishing entity, the communication management module generates corresponding topic information in the data space, returns second feedback information to the publishing entity, and indicates that the publishing entity completes the publication of the topic information.
[0088] In step S203, the first topic subscription information sent by the subscribing entity is received; and the first topic subscription information includes first topic information.
[0089] In the embodiment of the application, the communication management module can generate a plurality of topic information in response to the topic information sent by a plurality of publishing entities, and the plurality of topic information can be subscribed by the subscribing entity in the same data space. The subscribing entity can query the topic information required by the subscribing entity in all topic information, and then send corresponding subscription information to the communication management module.
[0090] In an optional embodiment, the communication management module receives first topic subscription information sent by the subscribing entity, and the first topic subscription information includes first topic information.
[0091] Before the communication management module receives the first topic subscription information sent by the subscribing entity, in an optional embodiment, as shown inFigure 4 The vehicle-mounted communication method can further include the following steps, as shown in the figure:
[0092] In step S401, the subscription entity sends topic information search information to the communication management module.
[0093] The topic information search information can include vehicle-mounted service information required by the subscription entity. For example, in an application scenario, the subscription entity can be a vehicle steering application, and the vehicle steering application needs a lane line detection service provided by a perception system. Therefore, the topic information search information can include a topic name and / or a topic identifier corresponding to the lane line detection.
[0094] In step S403, the communication management module returns the search result to the subscription entity.
[0095] In some scenarios, the subscription entity does not know the accurate topic name and / or topic identifier corresponding to the required vehicle-mounted service information, and can perform a fuzzy search through a keyword. The communication management module can package the associated topic information according to the keyword to generate a corresponding search result, and return the search result to the subscription entity.
[0096] In step S405, the subscription entity generates first topic subscription information based on the search result.
[0097] In step S407, the subscription entity sends the first topic subscription information to the communication management module.
[0098] The first topic subscription information includes first topic information, i.e., the topic information to be subscribed by the subscription entity. The subscription entity determines the topic information to be subscribed from the search result according to actual application requirements, generates corresponding first topic subscription information, and then sends the first topic subscription information to the communication management module.
[0099] In step S205, the first publishing entity corresponding to the first topic information is determined based on the correspondence relationship.
[0100] In the embodiments of the present application, the communication management module determines the first publishing entity corresponding to the first topic information based on the correspondence relationship. For example, in the above-mentioned application scenario, the subscription entity is a vehicle steering application, and the first topic information sent by the subscription entity to the communication management module is lane line detection. Based on the correspondence relationship, the communication management module can determine that the publishing entity corresponding to the lane line detection is a perception system.
[0101] In step S207, data based on the first topic information published by the first publishing entity is obtained.
[0102] In step S209, the data is sent to the subscription entity.
[0103] In the embodiments of the present application, the communication management module acquires data based on the first topic information published by the first publishing entity, and then sends the data to the subscribing entity.
[0104] In an optional implementation, the above acquiring data based on the first topic information published by the first publishing entity can include the following steps as shown in Figure 5
[0105] In step S501, a subscription message is sent to the first publishing entity.
[0106] In step S503, data based on the first topic information published by the first publishing entity in response to the subscription message is received.
[0107] Specifically, after the communication management module determines the first publishing entity corresponding to the first topic information, a subscription message is sent to the first publishing entity, which can carry the topic identifier of the first topic information to which the first publishing entity is subscribed. Therefore, the first publishing entity publishes data based on the first topic information in the data space in response to the subscription message. For example, the perception system publishes lane line detection data based on the lane line detection topic information in the data space in response to the lane line detection subscription information, so that the vehicle steering application can obtain the lane line detection data from the data space.
[0108] To solve a series of problems such as data corruption, data insertion, and periodic data timeout caused in the data transmission process, a series of security policies can be added to the communication mechanism in the embodiments of the present application, so as to ensure the security and integrity of data transmission and solve the functional safety requirements of the autonomous driving system for data transmission.
[0109] Based on this, in an optional implementation, the above sending data to the subscribing entity can include the following steps as shown in Figure 6
[0110] In step S601, a first check code corresponding to the data is generated according to a preset check algorithm.
[0111] In step S603, the first check code and the data are packaged and sent to the subscribing entity.
[0112] The subscribing entity is configured to determine a second check code according to the preset check algorithm and the received data, and determine the accuracy of the received data based on the first check code and the second check code.
[0113] Specifically, the above preset check algorithm can include but is not limited to any one of cyclic redundancy check, parity check, longitudinal redundancy, and checksum.
[0114] CRC detects all single-bit errors and most multi-bit errors by using successive division of the data by a polynomial. When CRC is used, the first check code is generated as follows:
[0115] First, the data to be transmitted is expressed in the form of a byte string:
[0116] B(x) = B n (x)*2 8n +B n-1 (x)*2 8(n-1) +…+B1(x)*2 8 +B0(x);
[0117] Then, the generating polynomial of the CRC code used is as follows:
[0118] A(x) = x 18 +x 14 +x 8 +1;
[0119] In binary, it is represented as 1000100000100000001.
[0120] Then, the data in the form of a byte string is left-shifted by 18 bits and divided by the generating polynomial to obtain the memory characteristic code as follows:
[0121] B(x)*x 18 / A(x) = G(x) + C(x) / A(x);
[0122] Where G(x) is the quotient and C(x) is the first check code.
[0123] After the first check code is generated, it is packaged with the data and sent to the subscribing entity. The subscribing entity calculates the second check code by the same dispersion and compares the second check code with the first check code to determine the accuracy of the data, i.e. whether the data has been damaged or inserted during transmission.
[0124] Checksum can better detect single-bit errors and has lower requirements on operation performance, and is suitable for data transmission with low security level. The process of generating the first check code using checksum is as follows:
[0125] First, the data to be transmitted is expressed in the form of a byte string:
[0126] B(x) = B n (x)*2 8n +B n-1 (x)*2 8(n-1) +…+B1(x)*2 8 +B0(x);
[0127] Then, the byte string is divided into (n+1) / 4 groups of data, so as to be converted into groups of data with length of 4 bytes, denoted as K=[K (n+1) / 4,K (n-3) / 4…,K2,K1];
[0128] Then, the data of K is accumulated to generate a 6-byte data M=K (n+1) / 4 +K (n-3) / 4 …+K2+K1, and the spare bits are filled with 0.
[0129] Then, the 6 bytes of M are divided into two groups, C and D, where C is a group of the first three bytes and D is a group of the last three bytes. C and D are added to obtain a corresponding checksum as the first check code. The second check code is calculated by the same algorithm by the subscription entity, and the difference between the first check code and the second check code is compared to determine whether the data is damaged or inserted in the transmission process.
[0130] In the embodiment of the application, the communication management module defines the period of data transmission of the publishing entity and the subscription entity to perform timeout detection on the transmitted data.
[0131] In an optional embodiment, when the first publishing entity continuously publishes data based on the first topic information, the method further comprises:
[0132] monitoring the publishing time interval between adjacent data in the data based on the first topic information continuously published by the first publishing entity;
[0133] and / or;
[0134] monitoring the receiving time interval between adjacent data in the data based on the first topic information continuously received by the subscription entity.
[0135] In a further optional embodiment, the monitoring of the publishing time interval between adjacent data in the data based on the first topic information continuously published by the first publishing entity comprises:
[0136] generating a first error prompt information if the publishing time interval between adjacent data in the data based on the first topic information continuously published by the first publishing entity is greater than or equal to the first preset time interval.
[0137] For example, Figure 7As shown, the data continuously published by the first publishing entity includes D1, D2, D3, D4 and D5, and the communication management module sets a corresponding sending period for the first publishing entity as a first preset time interval in advance. When the first publishing entity continuously publishes data based on the first topic information, the communication management module determines the publishing time intervals between D1 and D2, between D2 and D3, between D3 and D4, and between D4 and D5, and then compares the determined publishing time intervals with the first preset time interval. If the determined publishing time intervals are greater than the first preset time interval, it indicates that the publishing time intervals between adjacent data are too long, and a first error prompt information is generated at this time. In this way, for some data with relatively high real-time requirements, the timeout error in the data transmission and sending process can be checked out through the timeout detection, and the safety of data transmission can be ensured.
[0138] In a further optional implementation, the monitoring of the receiving time intervals between adjacent data in the data continuously received by the subscription entity based on the first topic information can include:
[0139] If the receiving time intervals between adjacent data in the data continuously received by the subscription entity based on the first topic information are greater than or equal to a second preset time interval, a second error prompt information is generated.
[0140] For example, for the vehicle steering application of the subscription entity, the steering module needs to send steering instructions to the steering actuator to realize the steering of the vehicle. Under normal circumstances, the steering instructions need to be sent every 20 ms, and if the next frame of steering instructions is not sent within 40 ms, it may cause the vehicle to fail to turn in time, thereby causing serious safety problems. Therefore, the data continuously received by the subscription entity is monitored for timeout, and when the receiving time intervals between adjacent data are greater than or equal to the second preset time interval, the second error prompt information is generated. For example, in the above scenario, the second preset time interval can be any length less than 20 ms.
[0141] In a further optional implementation, for data with high real-time requirements, the data sent by the publishing entity and the data received by the subscription entity are monitored for timeout. On the one hand, if it is determined that the publishing period of the publishing entity is relatively long, the step of sending data to the subscription entity can be not performed, so that the waste of resources caused by invalid data in the communication process can be avoided. On the other hand, even if the publishing period of the publishing entity is qualified, due to other factors in the transmission process, the receiving time intervals between adjacent data received by the subscription entity can become long. Therefore, by monitoring the data sent by the publishing entity and the data received by the subscription entity for timeout, the influence of data timeout on the safety of the vehicle can be avoided.
[0142] For the subscription entity, it usually needs to subscribe to multiple topic information, which can come from different publishing entities. Therefore, in an optional implementation, before the data is sent to the subscription entity, the vehicle-mounted communication method can further include:
[0143] receiving second topic subscription information sent by the subscription entity; the second topic subscription information includes second topic information;
[0144] determining a second publishing entity corresponding to the second topic information based on the correspondence relationship;
[0145] obtaining data published by the second publishing entity based on the second topic information.
[0146] For example, in an application scenario, the vehicle steering application also needs to subscribe to the positioning service provided by the vehicle-mounted positioning system; similarly, the vehicle-mounted positioning system and the perception system need to register the data type corresponding to the positioning data in the data space first, and then generate the topic information corresponding to the positioning service in the data space. Then, the above-mentioned second topic information can include the topic name and / or topic identifier corresponding to the positioning service; after the subscription entity sends the second topic information to the communication management module, the communication management module can determine the corresponding second publishing entity as the vehicle-mounted positioning system based on the correspondence relationship, and then obtain the positioning data published by the vehicle-mounted positioning system based on the positioning service.
[0147] Considering the influence of bandwidth in the data transmission process, once the subscription entity subscribes to a large number of topic information, it may cause data congestion. Based on this, in an optional implementation, the first data published by the first publishing entity based on the first topic information and the second data published by the second publishing entity based on the second topic information both carry priority information.
[0148] The above-mentioned sending of data to the subscription entity can include Figure 8 the following steps:
[0149] In step S801, the first data and the second data are prioritized based on the priority information of the first data and the priority information of the second data.
[0150] In step S803, the first data and the second data are sent to the subscription entity in sequence according to the prioritization result.
[0151] For example, Figure 9As shown, the first publishing entity sets the corresponding priority of the data D6 to be transmitted to level 5 through the priority setting module, and the second publishing entity sets the corresponding priority of the data D7 to be transmitted to level 1 through the priority setting module; wherein level 1 is the highest and level 5 is the lowest, and the setting mode of the priority can be set according to the requirements, which is not limited in the present application; when the data congestion is detected, the data (D7) with high priority will be transmitted first, so that the real-time performance of the data transmission with high security can be ensured, and the real-time performance requirement of the automatic driving system on the data can be met.
[0152] In the embodiments of the present application, the publishing entity and the subscribing entity are different electronic control units, or the publishing entity and the subscribing entity are different modules in the same electronic control unit. For different cases, different communication modes are adopted, that is, the shared pointer transmission mode is adopted for data transmission in the device with shared memory, and the unified data queue transmission mode is adopted for data transmission in the remaining cases.
[0153] The shared memory, as the name implies, is to allow two unrelated processes to access the same logical memory, and the shared memory is a very effective way for two running processes to share and transmit data. The shared memory between different processes is usually the same physical memory. Processes can connect the same physical memory to their own address space, and all processes can access the addresses in the shared memory. If a process writes data to the shared memory, the changes will immediately affect any other process that can access the same shared memory.
[0154] In an optional implementation, when the first publishing entity and the subscribing entity are different modules in the same electronic control unit, there is a shared memory between the first publishing entity and the subscribing entity; correspondingly, the above-mentioned obtaining the data based on the first topic information published by the first publishing entity can include:
[0155] receiving the data based on the first topic information written by the first publishing entity in the address space corresponding to the shared memory;
[0156] Correspondingly, the above-mentioned sending the data to the subscribing entity can include:
[0157] sending a notification to the subscribing entity, so that the subscribing entity reads the data based on the first topic information written by the first publishing entity in the address space corresponding to the shared memory in response to the notification.
[0158] Specifically, as Figure 10As shown, the publishing entity directly writes data in the corresponding address space of the shared memory through the shared pointer, and the subscribing entity directly reads data in the corresponding address space through the shared pointer after receiving the notification. Compared with the traditional communication mechanism, this mechanism does not exist data copying in the transmission process, reduces the number of copying in the data transmission process, and thus can meet the low delay requirement of large data transmission. At the same time, by adding the security strategy such as cyclic redundancy check and memory checksum introduced in the foregoing in the process of writing data, the integrity of the data in the transmission process can be guaranteed, and the security of the data transmission can be greatly improved, meeting the functional safety requirement of the automatic driving system for data transmission.
[0159] In another optional implementation, when the first publishing entity and the subscribing entity are different electronic control units, the above-mentioned obtaining the data published by the first publishing entity and based on the first topic information can include:
[0160] obtaining the data sent by the first publishing entity and based on the first topic information through a network router;
[0161] Correspondingly, the above-mentioned sending the data to the subscribing entity can include:
[0162] forwarding the data sent by the first publishing entity and based on the first topic information to the subscribing entity through the network router.
[0163] Specifically, as shown in Figure 11 the publishing entity sends data to the network router in a specific data arrangement manner, and the subscribing entity receives the data of the router after receiving the notification. Compared with the traditional communication mechanism, this mechanism transmits data in a specific data arrangement manner, which can reduce the serialization and deserialization process of data, improve the data transmission speed, and at the same time, by adding the security strategy such as cyclic redundancy check, checksum and counter introduced in the foregoing in the data transmission process, the integrity of the data in the transmission process can be guaranteed, and the security of the data transmission can be greatly improved, meeting the functional safety requirement of the automatic driving system for data transmission.
[0164] In summary, the vehicle-mounted communication method provided by the embodiments of the present application can solve the demand of large data throughput, and the data transmission is safe, high and real-time; while meeting the communication requirements of the automatic driving and intelligent network system, it also supports the implementation of service-based architecture design.
[0165] The embodiments of the present application also provide a vehicle-mounted communication device, Figure 12 is a structural schematic diagram of a vehicle-mounted communication device provided by the embodiments of the present application, as shown in Figure 12 the device comprises:
[0166] The establishing module 1201 is configured to establish a correspondence between at least one publishing entity and theme information, the theme information being sent by the publishing entity, and the theme information representing a vehicle-mounted service provided by the publishing entity.
[0167] The receiving module 1202 is configured to receive first theme subscription information sent by a subscribing entity, and the first theme subscription information includes first theme information.
[0168] The determining module 1203 is configured to determine a first publishing entity corresponding to the first theme information based on the correspondence.
[0169] The obtaining module 1204 is configured to obtain data published by the first publishing entity and based on the first theme information.
[0170] The sending module 1205 is configured to send the data to the subscribing entity.
[0171] The publishing entity and the subscribing entity are different electronic control units, or the publishing entity and the subscribing entity are different modules in the same electronic control unit.
[0172] Optionally, the sending module 1205 is configured to:
[0173] generate a first check code corresponding to the data according to a preset check algorithm;
[0174] pack the first check code and the data and send them to the subscribing entity, and the subscribing entity is configured to determine a second check code according to the preset check algorithm and the received data, and determine the accuracy of the received data based on the first check code and the second check code.
[0175] Optionally, the obtaining module 1204 is configured to:
[0176] send a subscription message to the first publishing entity;
[0177] receive data published by the first publishing entity in response to the subscription message and based on the first theme information.
[0178] Optionally, when the first publishing entity continuously publishes data based on the first theme information, the apparatus further includes a monitoring module configured to:
[0179] monitor the publishing time interval between adjacent data continuously published by the first publishing entity and based on the first theme information;
[0180] and / or;
[0181] monitor the receiving time interval between adjacent data continuously received by the subscribing entity and based on the first theme information.
[0182] Optionally, the monitoring module is configured to perform:
[0183] If a publishing time interval between adjacent data in the data based on the first topic information continuously published by the first publishing entity is greater than or equal to a first preset time interval, a first error prompt information is generated.
[0184] Optionally, the monitoring module is configured to perform:
[0185] If a receiving time interval between adjacent data in the data based on the first topic information continuously received by the subscription entity is greater than or equal to a second preset time interval, a second error prompt information is generated.
[0186] Optionally, the receiving module is further configured to perform:
[0187] Receive the second topic subscription information sent by the subscription entity; the second topic subscription information includes second topic information;
[0188] Based on the correspondence, determine the second publishing entity corresponding to the second topic information;
[0189] Obtain the data based on the second topic information published by the second publishing entity.
[0190] Optionally, the first data published by the first publishing entity based on the first topic information and the second data published by the second publishing entity based on the second topic information both carry priority information;
[0191] The sending module 1205 is configured to perform:
[0192] Based on the priority information of the first data and the priority information of the second data, the first data and the second data are prioritized;
[0193] According to the result of the priority sorting, the first data and the second data are sent to the subscription entity in turn.
[0194] Optionally, when the first publishing entity and the subscription entity are different modules in the same electronic control unit, there is a shared memory between the first publishing entity and the subscription entity;
[0195] The obtaining module 1204 is configured to perform:
[0196] Receive the data based on the first topic information written by the first publishing entity in the address space corresponding to the shared memory;
[0197] The sending module 1205 is configured to perform:
[0198] Send a notification to the subscription entity, so that the subscription entity reads the data based on the first topic information written by the first publishing entity in the address space corresponding to the shared memory in response to the notification.
[0199] Optionally, when the first publishing entity and the subscribing entity are different electronic control units, the obtaining module 1204 is configured to perform:
[0200] obtaining the data based on the first topic information sent by the first publishing entity through a network router;
[0201] The sending module 1205 is configured to perform:
[0202] forwarding the data based on the first topic information sent by the first publishing entity to the subscribing entity through the network router.
[0203] The device and method embodiments in the present application are based on the same application concept.
[0204] The method embodiments provided in the present application can be executed in a computer terminal, a server or a similar computing device. Taking the case of running on a server, Figure 13 is a hardware structure block diagram of a server of a vehicle-mounted communication method provided by the present application. As Figure 13 indicated, the server 1300 can have a large difference due to different configurations or performances, and can include one or more central processing units (CPU) 1310 (the processor 1310 can include but is not limited to a processing device such as a microprocessor NCU or a programmable logic device FPGA), a memory 1330 for storing data, one or more storage media 1320 (such as one or more mass storage devices) for storing application programs 1323 or data 1322. Among them, the memory 1330 and the storage medium 1320 can be temporary storage or persistent storage. The programs stored in the storage medium 1320 can include one or more modules, each of which can include a series of instruction operations in the server. Further, the central processing unit 1310 can be configured to communicate with the storage medium 1320 and execute a series of instruction operations in the storage medium 1320 on the server 1300. The server 1300 can also include one or more power supplies 1360, one or more wired or wireless network interfaces 1350, one or more input and output interfaces 1340, and / or one or more operating systems 1321, such as Windows, Mac OS, Unix, Linux, FreeBSD, etc.
[0205] The input / output interface 1340 can be configured to receive or transmit data via a network. The network can include a wireless network provided by a communication provider of the server 1300. In an example, the input / output interface 1340 includes a network interface controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In an example, the input / output interface 1340 can be a radio frequency (RF) module configured to communicate with the Internet through a wireless manner.
[0206] Those skilled in the art can understand that, Figure 13 The structure shown is only schematic, and does not limit the structure of the electronic device. For example, the server 1300 can further include more or less components than those shown, or have a different configuration of components than those shown. Figure 13 The structure shown is only schematic, and does not limit the structure of the electronic device. For example, the server 1300 can further include more or less components than those shown, or have a different configuration of components than those shown. Figure 13 The structure shown is only schematic, and does not limit the structure of the electronic device. For example, the server 1300 can further include more or less components than those shown, or have a different configuration of components than those shown.
[0207] The embodiments of the present application also provide a storage medium, which can be arranged in a server to save at least one instruction, at least one program, a code set or an instruction set related to the vehicle communication method in the method embodiments, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the vehicle communication method.
[0208] Optionally, in the present embodiment, the storage medium can be located in at least one of the plurality of network servers in the computer network. Optionally, in the present embodiment, the storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0209] According to the vehicle-mounted communication method, device, equipment and storage medium provided in the embodiments of the present application, the correspondence between at least one publishing entity and theme information is established, the theme information is sent by the publishing entity, the theme information represents the vehicle-mounted service provided by the publishing entity, the first theme subscription information sent by the subscribing entity is received, the first theme subscription information includes the first theme information, the first publishing entity corresponding to the first theme information is determined based on the correspondence, the data published by the first publishing entity based on the first theme information is acquired, and the data is sent to the subscribing entity. The publishing entity and the subscribing entity are different electronic control units, or the publishing entity and the subscribing entity are different modules in the same electronic control unit. In this way, the present application can meet the demand of large data throughput, and the data transmission is safe, high and real-time. The present application meets the communication requirements of the automatic driving and intelligent network system, and supports the implementation of the service-based architecture design.
[0210] It should be noted that the above-mentioned embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are possible or advantageous.
[0211] Each embodiment in the present specification is described in a progressive manner, and the same or similar parts of each embodiment can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.
[0212] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk.
[0213] The above is only the preferred embodiment of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A vehicle-mounted communication method characterized by comprising: The method is applied to a communication management module, and comprises: establishing a correspondence between at least one publishing entity and theme information sent by the publishing entity, the theme information representing a vehicle-mounted service provided by the publishing entity; receiving theme information search information sent by a subscribing entity, the theme information search information comprising a theme name and / or theme identifier corresponding to vehicle-mounted service information required by the subscribing entity; returning search results to the subscribing entity, so that the subscribing entity generates first theme subscription information based on the search results; if the subscribing entity does not know the accurate theme name and / or theme identifier corresponding to the required vehicle-mounted service information, performing a fuzzy search by keyword, and the communication management module packs associated theme information according to the keyword to generate corresponding search results and returns the search results to the subscribing entity; receiving first theme subscription information sent by the subscribing entity; the first theme subscription information comprises first theme information, i.e., theme information to be subscribed to by the subscribing entity; determining a first publishing entity corresponding to the first theme information based on the correspondence; obtaining data published by the first publishing entity based on the first theme information; sending the data to the subscribing entity; wherein the publishing entity and the subscribing entity are different electronic control units, or the publishing entity and the subscribing entity are different modules in the same electronic control unit. Before the publishing entity sends theme information to the communication management module, the publishing entity sends a data type registration request to the communication management module, the data type registration request representing a data type corresponding to theme information to be published by the publishing entity; the communication management module returns first feedback information to the publishing entity, the first feedback information indicating that the publishing entity completes registration of the corresponding data type.
2. The method of claim 1, wherein, The sending of the data to the subscribing entity comprises: generating a first check code corresponding to the data according to a preset check algorithm; packing and sending the first check code and the data to the subscribing entity; the subscribing entity is configured to determine a second check code according to the preset check algorithm and the received data, and determine the accuracy of the received data based on the first check code and the second check code.
3. The method of claim 1, wherein, The obtaining of the data published by the first publishing entity based on the first theme information comprises: sending a subscription message to the first publishing entity; receiving data published by the first publishing entity in response to the subscription message and based on the first theme information.
4. The method of claim 3, wherein, When the first publishing entity continuously publishes data based on the first theme information, the method further comprises: monitoring a publishing time interval between adjacent data in the continuously published data based on the first theme information by the first publishing entity; and / or; monitoring a receiving time interval between adjacent data in the continuously received data based on the first theme information by the subscribing entity.
5. The method of claim 4, wherein, The monitoring of the publishing time interval between adjacent data in the continuously published data based on the first theme information by the first publishing entity comprises: If a publishing time interval between adjacent data in data published by the first publishing entity based on the first topic information is greater than or equal to a first preset time interval, a first error prompt information is generated.
6. The method of claim 4, wherein, The monitoring of a receiving time interval between adjacent data in data received by the subscription entity based on the first topic information comprises: If the receiving time interval between adjacent data in data received by the subscription entity based on the first topic information is greater than or equal to a second preset time interval, a second error prompt information is generated.
7. The method of claim 1, wherein, Before the data is sent to the subscription entity, the method further comprises: receiving second topic subscription information sent by the subscription entity, wherein the second topic subscription information comprises second topic information; determining a second publishing entity corresponding to the second topic information based on the correspondence; obtaining data published by the second publishing entity based on the second topic information.
8. The method of claim 7, wherein, The first data published by the first publishing entity based on the first topic information and the second data published by the second publishing entity based on the second topic information both carry priority information; The sending of the data to the subscription entity comprises: performing priority sorting on the first data and the second data based on the priority information of the first data and the priority information of the second data; sending the first data and the second data to the subscription entity in sequence according to a result of the priority sorting.
9. The method according to any one of claims 1 to 8, characterized in that, When the first publishing entity and the subscription entity are different modules in a same electronic control unit, there is a shared memory between the first publishing entity and the subscription entity; The obtaining of the data published by the first publishing entity based on the first topic information comprises: receiving data based on the first topic information written in an address space corresponding to the shared memory by the first publishing entity; The sending of the data to the subscription entity comprises: sending a notification to the subscription entity, so that the subscription entity reads the data based on the first topic information written by the first publishing entity in the address space corresponding to the shared memory in response to the notification.
10. The method according to any one of claims 1 to 8, characterized in that, When the first publishing entity and the subscription entity are different electronic control units, the obtaining of the data published by the first publishing entity based on the first topic information comprises: obtaining data based on the first topic information sent by the first publishing entity through a network router; The sending of the data to the subscription entity comprises: forwarding the data based on the first topic information sent by the first publishing entity to the subscription entity through the network router.
11. An in-vehicle communication device, characterized by comprising: comprises: a establishing module configured to perform establishing a correspondence between at least one publishing entity and topic information, wherein the topic information is sent by the publishing entity; The topic information represents a vehicle-mounted service provided by the publishing entity; The receiving module is configured to perform receiving topic information search information sent by a subscription entity, the topic information search information including a topic name and / or a topic identifier corresponding to vehicle-mounted service information required by the subscription entity; returning a search result to the subscription entity, so that the subscription entity generates first topic subscription information based on the search result; If the subscription entity does not know the accurate topic name and / or topic identifier corresponding to the required vehicle-mounted service information, a fuzzy search is performed through a keyword, the communication management module packs the associated topic information according to the keyword to generate a corresponding search result, and returns the search result to the subscription entity; receiving the first topic subscription information sent by the subscription entity; the first topic subscription information includes first topic information, that is, the topic information to be subscribed by the subscription entity; The determining module is configured to determine a first publishing entity corresponding to the first topic information based on the corresponding relationship; The obtaining module is configured to obtain data published by the first publishing entity based on the first topic information; The sending module is configured to send the data to the subscription entity; The publishing entity and the subscription entity are different electronic control units, or the publishing entity and the subscription entity are different modules in the same electronic control unit. Before the publishing entity sends the topic information to the communication management module, the publishing entity sends a data type registration request to the communication management module, the data type registration request representing a data type corresponding to the topic information to be published by the publishing entity; the communication management module returns first feedback information to the publishing entity, the first feedback information indicating that the publishing entity completes the registration of the corresponding data type.
12. An in-vehicle communication device characterized by comprising: The device includes a processor and a memory, the memory stores at least one instruction or at least one program, the at least one instruction or the at least one program is loaded and executed by the processor to implement the vehicle-mounted communication method of any one of claims 1-10.
13. A computer storage medium, characterized in that, The storage medium stores at least one instruction or at least one program, the at least one instruction or the at least one program is loaded and executed by the processor to implement the vehicle-mounted communication method of any one of claims 1-10.
Citation Information
Patent Citations
Vehicle communication using publish-subscribe messaging protocol
CN109874123A
DDS-based railway CTC system communication platform
CN110266783A
Real-time soft bus implementation method for intelligent rail transit system
CN113098747A
Vehicle network using publish-subscribe protocol
US20210152639A1