Data distribution service method and device, electronic equipment and vehicle
Through the combination of shared memory and data processing modules, efficient data transmission and cross-domain communication are achieved, solving the problems of low efficiency and high latency of large-scale data transmission in the prior art, and improving the scalability and real-timeness of the system.
Patent Information
- Application Number
- CN202411152770.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-20
AI Technical Summary
Existing data distribution service technologies have performance bottlenecks and compatibility problems when processing large-scale data, resulting in low transmission efficiency and high latency, making it difficult to scale.
By introducing a shared memory mechanism, efficient data transmission between the data sender and the data reader is achieved. The zero-copy mechanism can be used to realize reading and writing in just one data write, reducing latency, and reorganizing data formats through the data processing module and cross-domain communication to improve the scalability of the system.
It improves the efficiency and real-time nature of large-scale data transmission, reduces latency, solves the problem of large transmission delays, and realizes scalability between cross-domain AP and CP.
Smart Images

Figure CN119166384A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic equipment and vehicle for data distribution services. Background Art
[0002] DDS (Data Distribution Service) is a middleware technology for real-time data communication, which can achieve high-performance, low-latency and reliable data distribution. The main features of DDS include publish-subscribe model, data-oriented communication, real-time and scalability.
[0003] DDS has the following communication technologies:
[0004] 1. Publish-Subscribe Model: DDS uses the publish-subscribe model to implement data distribution. The publisher publishes data to the DDS middleware, and the subscriber can subscribe to the data of interest. Once the data is updated, DDS will automatically send the data to the subscriber.
[0005] 2. Data center communication: DDS can communicate between different data centers to achieve data distribution and synchronization. This makes DDS suitable for data communication in distributed systems.
[0006] 3. Real-time communication: DDS can provide reliable real-time communication to ensure timely transmission and processing of data. This makes DDS widely used in application scenarios that require high real-time performance.
[0007] 4. Secure communication: DDS supports data encryption and authentication to ensure data security and privacy. This allows DDS to be used in applications that require data security protection.
[0008] However, the existing DDS technology also has some problems:
[0009] 1. Compatibility: There may be compatibility issues between different DDS implementations, resulting in difficulties in data communication between different systems.
[0010] 2. Performance: Although DDS has the characteristics of high performance and low latency, performance bottlenecks may occur when processing large-scale data. Summary of the invention
[0011] The present invention aims to solve the problem of related technical limitations at least to a certain extent. To this end, the present invention proposes a method, device, electronic device and vehicle for data distribution service, which can efficiently implement data distribution service.
[0012] In one aspect, an embodiment of the present invention provides a method for providing a data distribution service, including:
[0013] In response to a data sending operation of a data sender, acquiring target data sent by the data sender;
[0014] The target data is stored in the shared memory; the storage pointer information of the target data in the shared memory is fed back to the data sender, and the storage pointer information is stored in the shared memory;
[0015] In response to a data reading operation of the data reader, acquiring storage pointer information of the target data from the shared memory;
[0016] Based on the storage pointer information, the target data is read from the shared memory and saved to the data reader.
[0017] In some embodiments, the shared memory includes a data memory and a buffer memory, and the target data is stored in the data memory; feeding back storage pointer information of the target data in the shared memory to the data sender, and storing the storage pointer information in the shared memory, comprises the following steps:
[0018] When the target data is stored in the data memory, the storage pointer information of the target data stored in the data memory is recorded; the storage pointer information includes storage position information and length information;
[0019] The storage pointer information of the target data stored in the data memory is fed back to the data sender through the data memory, and then the storage pointer information is obtained from the data sender and stored in the buffer memory.
[0020] In some embodiments, the shared memory includes a data memory and a buffer memory, the storage pointer information is stored in the buffer memory, and the storage pointer information is obtained from the buffer memory; based on the storage pointer information, reading the target data from the shared memory includes the following steps:
[0021] Based on the storage pointer information, data of a target length is read from a target location in the data memory to obtain target data.
[0022] In some embodiments, when the data sender and the data reader are respectively the first communication end and the second communication end, before the step of storing the target data in the shared memory, the method further includes the following steps:
[0023] Reorganize the data format of target data through the data processing module;
[0024] The first communication end represents a signal-based communication end, and the second communication end represents a service-oriented communication end.
[0025] In some embodiments, when the data sender is the first communication end, reorganizing the data format of the target data includes the following steps:
[0026] Converting a first parameter in the target data into a message configuration parameter of a data distribution service; the first parameter includes a port parameter and a signal parameter;
[0027] The service ID in the target data is converted into the service quality configuration parameters of the data distribution service.
[0028] In some embodiments, when the data sender is the second communication end, reorganizing the data format of the target data includes the following steps:
[0029] converting first configuration information of a service-oriented communication protocol in target data into second configuration information of a data distribution service;
[0030] The first configuration information includes service interface design information, and the second configuration information includes service integration parameters and participant configuration parameters.
[0031] In some embodiments, the method further comprises the following steps:
[0032] Establishing cross-domain communication between the first communication end and the second communication end through the MPU service agent and the DDS client agent;
[0033] Among them, the MPU service agent is set between the second communication terminal and the data processing module, and the DDS client agent is set between the first communication terminal and the data processing module.
[0034] On the other hand, an embodiment of the present invention provides a device for data distribution service, including:
[0035] The first module is used for acquiring target data sent by the data sender in response to the data sending operation of the data sender;
[0036] The second module is used to store the target data in the shared memory; feedback the storage pointer information of the target data in the shared memory to the data sender, and store the storage pointer information in the shared memory;
[0037] A third module is used to obtain storage pointer information of target data from the shared memory in response to a data reading operation of the data reader;
[0038] The fourth module is used to read the target data from the shared memory based on the storage pointer information and save the target data to the data reader.
[0039] In some embodiments, when the data sender and the data reader are respectively the first communication end and the second communication end, the device further includes:
[0040] The fifth module is used for reorganizing the data format of the target data through the data processing module;
[0041] Among them, the first communication end represents a signal-based communication end, and the second communication end represents a service-oriented communication end; the fifth module is executed before the second module.
[0042] In some embodiments, the apparatus further comprises:
[0043] The sixth module is used to establish cross-domain communication between the first communication end and the second communication end through the MPU service agent and the DDS client agent;
[0044] Among them, the MPU service agent is set between the second communication terminal and the data processing module, and the DDS client agent is set between the first communication terminal and the data processing module.
[0045] On the other hand, an embodiment of the present invention provides an electronic device, including: a processor and a memory; the memory is used to store programs; the processor executes the program to implement the above-mentioned data distribution service method.
[0046] On the other hand, an embodiment of the present invention provides a computer storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the above-mentioned method of data distribution service.
[0047] On the other hand, an embodiment of the present invention provides a vehicle, the vehicle comprising the above-mentioned data distribution service device or the above-mentioned electronic device.
[0048] The embodiment of the present invention obtains the target data sent by the data sender in response to the data sending operation of the data sender; stores the target data in the shared memory; feeds back the storage pointer information of the target data in the shared memory to the data sender, and stores the storage pointer information in the shared memory; obtains the storage pointer information of the target data from the shared memory in response to the data reading operation of the data reader; reads the target data from the shared memory based on the storage pointer information, and saves the target data to the data reader. The embodiment of the present invention realizes an efficient data transmission mechanism (shared memory zero copy) between the data sender and the data reader by introducing shared memory, which can maintain a high transmission efficiency during large-scale data transmission, and can realize zero-copy data reading and writing by only performing data writing once, thereby reducing the delay of data transmission, improving real-time performance, and solving the problem of large data transmission delay. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.
[0050] Figure 1 This is a schematic diagram of an implementation environment for a data distribution service provided by an embodiment of the present invention;
[0051] Figure 2 It is a flowchart of a method for data distribution service provided by an embodiment of the present invention;
[0052] Figure 3 A schematic diagram of an expanded process of storing storage pointer information into a shared memory provided by an embodiment of the present invention;
[0053] Figure 4 A schematic diagram of the architecture principle flow of the zero-copy data flow provided by an embodiment of the present invention;
[0054] Figure 5 A schematic diagram of an extended process of a method for data distribution service provided by an embodiment of the present invention;
[0055] Figure 6 A schematic diagram of an example of data format reorganization of a data processing module provided by an embodiment of the present invention;
[0056] Figure 7 A schematic diagram of an expanded flow chart for reorganizing the data format of target data provided by an embodiment of the present invention;
[0057] Figure 8 A schematic diagram of the architecture principle of cross-domain communication provided by an embodiment of the present invention;
[0058] Fig. 9 A schematic diagram of the structure of a data distribution service device provided by an embodiment of the present invention;
[0059] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0061] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flow chart. The terms "first / S100", "second / S200", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0062] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0063] To facilitate the understanding of the technical solution of the present invention, the proprietary technical terms that may be applied in the technical solution of the present invention are first explained:
[0064] Embedded microprocessor: This is the MPU you will see in the document. Although its performance is not as good as that of a general-purpose high-performance microprocessor, it has a high chip integration and rich peripheral functions. It is mainly used in mobile devices and multimedia-related applications.
[0065] Microcontroller: MCU, also known as single-chip microcomputer. As the name implies, this type of processor is used for signal control and some simple calculations. It is low-cost, low-power, and can be used in places where performance requirements are not high. For example, smart home, industrial control, Internet of Things, etc. are widely used.
[0066] AP: A processor responsible for running the operating system and multimedia applications. It is an MPU-type processor. AP AUTOSAR is a service-oriented communication.
[0067] CP: is a MCU type processor. CP AUTOSAR is a signal-based communication.
[0068] The parameters of Event, Method, and Field are collectively referred to as service interface design (method / event / field). In the process of service design, the parameter design of Event, Method, and Field is crucial, and they together constitute the basic framework of the service interface. These parameters include the input and output parameters and data types of the method, the event variable name and data type, etc., which are all important components of service design. By reasonably designing these parameters, the effectiveness and reliability of the service can be ensured, and a clear interface definition can be provided for service calls and interactions.
[0069] It is understandable that the method of data distribution service provided by the embodiment of the present invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various types of terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some embodiments, the terminal is a smart phone, a tablet computer, a laptop computer, and a desktop computer, but is not limited to this.
[0070] like Figure 1 FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present invention. Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected to a network wirelessly or wired to complete data transmission and exchange.
[0071] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0072] In addition, the server 101 can also be a node server in the blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.
[0073] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal 102 may also be a vehicle-mounted terminal of various device types described above, but is not limited thereto. The terminal 102 and the server 101 may be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment of the present invention.
[0074] Based on the example Figure 1In the implementation environment shown, an embodiment of the present invention provides a method for data distribution services. The following is an example of the method for data distribution services being applied in the server 101. It can be understood that the method for data distribution services can also be applied in the terminal 102.
[0075] Reference Figure 2 , Figure 2 The flowchart of the method for data distribution service applied to the server provided by the embodiment of the present invention, the execution subject of the method for data distribution service can be any of the aforementioned computer devices (including servers or terminals). Figure 2 , the method comprises the following steps:
[0076] S100, in response to a data sending operation by a data sender, acquiring target data sent by the data sender;
[0077] S200, storing the target data in the shared memory; feeding back the storage pointer information of the target data in the shared memory to the data sender, and storing the storage pointer information in the shared memory;
[0078] It should be noted that the shared memory includes a data memory and a buffer memory, and the target data is stored in the data memory; in some embodiments, such as Figure 3 As shown, feeding back the storage pointer information of the target data in the shared memory to the data sender, and storing the storage pointer information in the shared memory may include the following steps: S201, when the target data is stored in the data memory, recording the storage pointer information of the target data stored in the data memory; the storage pointer information includes storage location information and length information; S202, feeding back the storage pointer information of the target data stored in the data memory to the data sender through the data memory, and then obtaining the storage pointer information from the data sender and storing it in the buffer memory.
[0079] For example, in some specific embodiments, Figure 4 As shown, the present invention establishes an intermediate shared memory between the sender and the receiver. The sender stores data into the shared memory through 1, returns the storage location information and length through 2, and stores its location information into the buffer memory in the shared memory through 3.
[0080] S300, in response to a data reading operation by a data reader, obtaining storage pointer information of target data from a shared memory;
[0081] For example, in some specific embodiments, Figure 4 As shown, when the reader needs data, it first requests the data location information through 4, and then obtains the location information (and length information) through 5.
[0082] S400 . Based on the storage pointer information, read the target data from the shared memory, and save the target data to the data reader.
[0083] It should be noted that the shared memory includes data memory and buffer memory, the storage pointer information is stored in the buffer memory, and the storage pointer information is obtained from the buffer memory; in some embodiments, based on the storage pointer information, reading the target data from the shared memory may include the following steps: based on the storage pointer information, reading data of the target length from the target position of the data memory to obtain the target data.
[0084] For example, in some specific embodiments, Figure 4 As shown, after obtaining the position information through 5, the data at the relevant position is directly read through 6, and the relevant data is read through 7. In this way, only one data write is required to achieve zero-copy data reading and writing, which reduces the delay of data transmission, improves real-time performance, and solves the problem of large data transmission delay.
[0085] It should be noted that in some embodiments, Figure 5 As shown, when the data sender and the data reader are the first communication end and the second communication end respectively, before step S200, the method may further include the following steps:
[0086] S500, reorganizing the data format of the target data through a data processing module;
[0087] The first communication end represents a signal-based communication end, and the second communication end represents a service-oriented communication end.
[0088] For example, in some specific implementations, predefined data processing rules (which can be manually defined according to actual application requirements) can be used to sequentially split and serialize the relevant data to achieve data format reorganization, such as Figure 6 The figure shows an example of data format reorganization.
[0089] Among them, in some embodiments, such as Figure 7 As shown, when the data sender is the first communication end, reorganizing the data format of the target data may include the following steps: S511, converting the first parameter in the target data into a message configuration parameter of the data distribution service; the first parameter includes a port parameter and a signal parameter; S512, converting the service ID in the target data into a service quality configuration parameter of the data distribution service.
[0090] For example, in some specific implementations, the CP's Port / Signal and other parameters can be converted into DDS Pub / Sub / Topic and other related parameters, and various service-oriented IDs can be converted into DDS Topic Name and service discovery-related QoS (Quality of Service) and other parameters.
[0091] Among them, in some embodiments, when the data sender is the second communication end, reorganizing the data format of the target data may include the following steps: converting the first configuration information of the service-oriented communication protocol in the target data into the second configuration information of the data distribution service; wherein the first configuration information includes service interface design information, and the second configuration information includes service integration parameters and participant configuration parameters.
[0092] Exemplarily, in some specific implementations, the SOME / IP-related configuration of the AP can be converted into the DDS-related configuration, wherein the Event, Method, and Field-related parameters of the SOME / IP are converted into the service integration parameters, Participant parameters, etc. of the DDS.
[0093] It should be noted that, in some embodiments, the method may also include the following steps: establishing cross-domain communication between the first communication end and the second communication end through the MPU service agent and the DDS client agent; wherein the MPU service agent is set between the second communication end and the data processing module, and the DDS client agent is set between the first communication end and the data processing module.
[0094] For example, in some specific embodiments, Figure 8 As shown, the present invention adds a data processing module to realize AP and CP communication, solves the cross-domain communication problem, and improves the scalability of the system. Traditional AP communication is to encapsulate the signal into a service through communication transmission protocols such as DDS, SOME / IP, and send it to the relevant APP through CM (Communication Module). APP calls different services and CM to realize specific functions. The added data processing module realizes data exchange with the MCU system through the communication processing mechanism.
[0095] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.
[0096] First of all, it should be noted that DDS, as a data distribution service technology, is mainly used for real-time data transmission and distribution. However, DDS in the prior art has some problems when processing large-scale data, such as low transmission efficiency, high latency and difficulty in expansion.
[0097] In view of this, the present invention provides a DDS (data distribution service) method and system, aiming to solve the problems of DDS in the prior art in terms of large-scale data transmission and real-time performance. Specifically, the present invention is implemented as follows:
[0098] The present invention first provides an efficient data transmission mechanism (shared memory zero copy), which can maintain high transmission efficiency during large-scale data transmission. Figure 4 , which is a zero-copy data flow implemented by the present invention based on shared memory.
[0099] It should be noted that the ordinary data sending and receiving process needs to store data at the sender, and then store it again after sending it to the receiver. The two writing processes will greatly reduce the communication efficiency. The present invention establishes an intermediate shared memory between the sender and the receiver. The sender stores the data into the shared memory through 1, returns the storage location information and length through 2, and stores its location information into the shared memory through 3. When the reader needs data, it first applies for the data location information through 4, obtains the location information through 5, and then directly reads the data at the relevant location through 6, and reads the relevant data through 7. In this way, only one data writing is required to achieve zero-copy data reading and writing, which reduces the delay of data transmission, improves real-time performance, and solves the problem of large data transmission delay.
[0100] Secondly, the present invention reduces the delay of data transmission and improves the real-time performance by optimizing the data network structure; moreover, the present invention introduces a distributed architecture data processing module to realize DDS communication between AP and CP, thereby improving the scalability and stability of the system.
[0101] Reference Figure 8 As shown, the cross-domain communication architecture of the present invention to realize DDS communication between AP and CP. It should be noted that, in the traditional communication mode, since the MPU usually runs an operating system, the rich communication and processing capabilities provided by the operating system can be used to make DDS communication more flexible and efficient. When performing DDS communication on the MCU, it is usually necessary to write the underlying driver and communication protocol by yourself, which is relatively cumbersome and complicated. As a result, information interaction cannot be realized on the MPU and MCU at the same time. The present invention adds a data processing module to realize AP and CP communication, solves the cross-domain communication problem, and improves the scalability of the system. Traditional AP communication is to encapsulate the signal into a service through DDS, SOME / IP and other communication transmission protocols and send it to the relevant APP through CM (Communication Module), and the APP calls different services and CM to realize specific functions. The added data processing module realizes data exchange with the MCU system through the communication processing mechanism.
[0102] Specifically, Figure 6As shown, it is an example process of data format reorganization of the data processing module provided by the present invention. The main function of the data processing module is to split and reorganize the data to achieve language intercommunication, so that the AP and CP can communicate. Convert the CP's Port / Signal and other parameters into DDS Pub / Sub / Topic and other related parameters, and convert various service-oriented IDs into DDS Topic Name and service discovery-related QoS (quality of service) and other parameters. Convert the AP's SOME / IP related configuration into DDS related configuration, where the Event, Method, Field related parameters of SOME / IP are converted into DDS service integration parameters, Participant parameters, etc. Then store them in the shared memory for centralized storage.
[0103] In summary, the purpose of the present invention is to provide an improved DDS method and system to solve the problems of DDS in the prior art in terms of large-scale data transmission and real-time and compatibility. The DDS in the prior art will have problems such as low transmission efficiency, high latency and difficulty in expansion when processing large amounts of data, which limits its application in the field of real-time data distribution. The present invention realizes cross-domain communication between APs and CPs to achieve cross-domain scalability, and also improves real-time performance by reducing the copying process. Compared with the prior art, the present invention has higher transmission efficiency, lower latency and better scalability.
[0104] On the other hand, Fig. 9 As shown, an embodiment of the present invention provides a device 900 for data distribution services, which may include:
[0105] The first module 901 is used to obtain target data sent by the data sender in response to the data sending operation of the data sender;
[0106] The second module 902 is used to store the target data in the shared memory; feedback the storage pointer information of the target data in the shared memory to the data sender, and store the storage pointer information in the shared memory;
[0107] The third module 903 is used to obtain storage pointer information of target data from the shared memory in response to a data reading operation of the data reader;
[0108] The fourth module 904 is used to read the target data from the shared memory based on the storage pointer information, and save the target data to the data reader.
[0109] In some embodiments, when the data sender and the data reader are respectively the first communication end and the second communication end, the apparatus may further include:
[0110] The fifth module is used for reorganizing the data format of the target data through the data processing module;
[0111] Among them, the first communication end represents a signal-based communication end, and the second communication end represents a service-oriented communication end; the fifth module is executed before the second module.
[0112] In some embodiments, the apparatus may further include:
[0113] The sixth module is used to establish cross-domain communication between the first communication end and the second communication end through the MPU service agent and the DDS client agent;
[0114] Among them, the MPU service agent is set between the second communication terminal and the data processing module, and the DDS client agent is set between the first communication terminal and the data processing module.
[0115] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0116] On the other hand, an embodiment of the present invention further provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above-mentioned data distribution service method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0117] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0118] like Fig.10 As shown, Fig.10 The hardware structure of an electronic device 1000 of another embodiment is illustrated. The electronic device 1000 includes:
[0119] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0120] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the network node population optimization method of the embodiment of the present invention;
[0121] Input / output interface 1003, used to implement information input and output;
[0122] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0123] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0124] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0125] The electronic device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0126] The contents of the method embodiments of the present invention are all applicable to the electronic device embodiments. The functions specifically implemented by the electronic device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0127] Another aspect of an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.
[0128] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read to Only Memory, CD to ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0129] The contents of the method embodiments of the present invention are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0130] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.
[0131] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0132] It should be noted that, although several modules of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0133] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD to ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present invention.
[0134] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0135] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0136] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0137] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution device, apparatus or device (such as a computer-based device, a device including a processor, or other device that can fetch instructions from an instruction execution device, apparatus or device and execute the instructions), or in conjunction with such instruction execution device, apparatus or device. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution device, apparatus or device, or in conjunction with such instruction execution device, apparatus or device.
[0138] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0139] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0140] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0141] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0142] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A method for data distribution service, characterized in that: The following steps are involved: In response to a data sending operation of a data sender, acquiring target data sent by the data sender; storing the target data in a shared memory; feeding back storage pointer information of the target data in the shared memory to the data sender, and storing the storage pointer information in the shared memory; In response to a data reading operation of a data reader, acquiring the storage pointer information of the target data from the shared memory; Based on the storage pointer information, the target data is read from the shared memory, and the target data is saved to the data reader.
2. The data distribution service method according to claim 1, characterized in that: The shared memory includes a data memory and a buffer memory, and the target data is stored in the data memory; the step of feeding back the storage pointer information of the target data in the shared memory to the data sender, and storing the storage pointer information in the shared memory, comprises the following steps: When the target data is stored in the data memory, the storage pointer information of the target data stored in the data memory is recorded; the storage pointer information includes storage position information and length information; The storage pointer information of the target data stored in the data memory is fed back to the data sender through the data memory, and then the storage pointer information is obtained from the data sender and stored in the buffer memory.
3. The data distribution service method according to claim 1, characterized in that: The shared memory includes a data memory and a buffer memory, the storage pointer information is stored in the buffer memory, and the storage pointer information is obtained from the buffer memory; The step of reading the target data from the shared memory based on the storage pointer information comprises the following steps: Based on the storage pointer information, data of a target length is read from a target location in the data memory to obtain the target data.
4. The data distribution service method according to claim 1, characterized in that: When the data sender and the data reader are respectively the first communication end and the second communication end, before the step of storing the target data in the shared memory, the method further includes the following steps: Reorganizing the data format of the target data by a data processing module; The first communication end represents a signal-based communication end, and the second communication end represents a service-oriented communication end.
5. The data distribution service method according to claim 4, characterized in that: When the data sender is the first communication end, the data format reorganization of the target data includes the following steps: Converting a first parameter in the target data into a message configuration parameter of a data distribution service; the first parameter includes a port parameter and a signal parameter; The service ID in the target data is converted into a service quality configuration parameter of the data distribution service.
6. The data distribution service method according to claim 4, characterized in that: When the data sender is the second communication end, the data format reorganization of the target data includes the following steps: Converting first configuration information of a service-oriented communication protocol in the target data into second configuration information of a data distribution service; The first configuration information includes service interface design information, and the second configuration information includes service integration parameters and participant configuration parameters.
7. The data distribution service method according to claim 4, characterized in that: The method further comprises the following steps: Establishing cross-domain communication between the first communication end and the second communication end through the MPU service agent and the DDS client agent; Among them, the MPU service agent is set between the second communication end and the data processing module, and the DDS client agent is set between the first communication end and the data processing module.
8. A data distribution service device, characterized in that: include: The first module is used for acquiring target data sent by the data sender in response to a data sending operation of the data sender; The second module is used to store the target data in a shared memory; feed back storage pointer information of the target data in the shared memory to the data sender, and store the storage pointer information in the shared memory; A third module is used for acquiring the storage pointer information of the target data from the shared memory in response to the data reading operation of the data reader; The fourth module is used to read the target data from the shared memory based on the storage pointer information, and save the target data to the data reader.
9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 7.
10. A vehicle, characterized in that: The vehicle includes the apparatus for the data distribution service according to claim 8 or the electronic device according to claim 9.
