Data communication method, device and equipment and computer readable storage medium
By deploying data distribution services on system-level chip operating systems, the problem of poor communication capabilities of MCU and A cores is solved, and efficient data communication and quality improvement is achieved.
Patent Information
- Application Number
- CN202411319973.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-24
AI Technical Summary
In the prior art, poor real-time performance of core A leads to poor communication capabilities between MCU and core A lead, and the inability to efficiently conduct data communication.
By deploying data distribution services on operating systems with system-level chips, receiving and inversely analyzing data distribution service data, converting it into network data that is processed by restricted operating systems, and data transmission is carried out based on service quality policies, improving communication performance.
It realizes efficient data communication between the MCU and the operating system with system-level chips, reduces resource consumption and improves the quality of data communication.
Smart Images

Figure CN119182822A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a data communication method, device, equipment and computer-readable storage medium. Background Art
[0002] The architecture scheme currently adopted is basically a multi-core heterogeneous scheme, that is, at least one MCU (microcontroller unit) and an A-core SOC (System on Chip) will be deployed on a development board. The A-core SOC is mostly used to deploy some resource-intensive applications, such as driving or parking, because of its ultra-high computing power and multi-core capabilities. However, the A-core operating system is mostly a Linux (a clone system developed based on the UNIX operating system) operating system, which is a pseudo-real-time operating system with poor real-time performance. MCUs are mostly deployed with real-time operating systems to handle processing that requires rapid response in the vehicle environment. For example, brakes, accelerators, steering, etc.
[0003] Therefore, due to the poor real-time performance of the current A core, the communication capability between the MCU and the A core is relatively poor. Summary of the invention
[0004] In view of this, an object of the present invention is to provide a data communication method, apparatus, device and computer-readable storage medium, which solve the technical problem of poor data communication capability in the prior art.
[0005] In order to solve the above technical problems, the present invention provides a data communication method, comprising:
[0006] Utilizing a first data distribution service to receive data distribution service data, and sending the data distribution service data to a second data distribution service; wherein the data distribution service data is data of an operating system having a system-on-chip; the first data distribution service and the second data distribution service are deployed on the operating system having a system-on-chip;
[0007] De-analyzing the data distribution service data using the second data distribution service to obtain network data;
[0008] The network data is sent to a restricted operating system; wherein the restricted operating system is an operating system with limited resources.
[0009] Optionally, before receiving the data distribution service data by using the first data distribution service and sending the data distribution service data to the second data distribution service, the data communication method further includes:
[0010] Creating the first data distribution service and the second data distribution service; wherein the first data distribution service is used to receive data from the operating system and send it to the second data distribution service, and / or forward the data received from the second data distribution service to the operating system; the second data distribution service is used to perform format conversion on the data sent by the first data distribution service and the data sent by the restricted operating system;
[0011] The first data distribution service and the second data distribution service are connected in a data distribution service manner.
[0012] Optionally, the data communication method further includes:
[0013] receiving target network data sent by the restricted operating system using the second data distribution service;
[0014] De-analyzing the target network data using the second data distribution service to obtain target format data; wherein the target format data is in the data format required by the first data distribution service;
[0015] sending the target format data to the first data distribution service;
[0016] The target format data is sent to the operating system using the first data distribution service.
[0017] Optionally, sending the target format data to the first data distribution service includes:
[0018] The target format data is sent to the first data distribution service based on a quality of service policy; wherein the quality of service policy includes at least one of a transmission priority policy, a resource limitation policy, a data filtering policy, and a partitioning policy.
[0019] Optionally, using the second data distribution service to reversely parse the data distribution service data to obtain network data includes:
[0020] Removing the packet header of the data distribution service data to obtain the data distribution service data with the packet header removed; wherein the format of the data distribution service data is a user datagram protocol format;
[0021] The data distribution service data with the packet header removed is subjected to data serialization processing to obtain network data in a user datagram protocol format.
[0022] Optionally, before using the second data distribution service to reversely parse the data distribution service data to obtain network data, the method further includes:
[0023] Determine the priority corresponding to each data according to the data type, and bind the data and its corresponding priority to the second data distribution service, so that when there are multiple data, the second data distribution service sends the data according to the priority;
[0024] A buffer area is set in the second data distribution service, the buffer area is used to store data waiting to be sent, and the buffer area is processed according to the priority and timeliness of the data to prevent the buffer area from overflowing;
[0025] And / or setting a dynamic retransmission mechanism in the second data distribution service; wherein the dynamic retransmission mechanism is a mechanism for dynamically adjusting the retransmission time according to data priority, data size and network quality.
[0026] The present application also provides a data communication device, comprising:
[0027] A data distribution module, configured to receive data distribution service data using a first data distribution service, and send the data distribution service data to a second data distribution service; wherein the data distribution service data is data of an operating system having a system-on-chip; wherein the first data distribution service and the second data distribution service are deployed on the operating system having a system-on-chip;
[0028] a reverse parsing module, configured to reversely parse the data distribution service data using the second data distribution service to obtain network data;
[0029] The data sending module is used to send the network data to the restricted operating system; wherein the restricted operating system is an operating system with limited resources.
[0030] Optionally, the data communication device further includes:
[0031] A data distribution service creation module, used to create the first data distribution service and the second data distribution service; wherein the first data distribution service is used to receive data from the operating system and send it to the second data distribution service, and / or forward the data received from the second data distribution service to the operating system; the second data distribution service is used to perform format conversion on the data sent by the first data distribution service and the data sent by the restricted operating system;
[0032] A connection establishment module is used to establish a connection between the first data distribution service and the second data distribution service in a data distribution service mode.
[0033] The present application also provides a data communication device, comprising:
[0034] Memory, used to store computer programs;
[0035] The processor is used to execute the computer program to implement the steps of the data communication method as described above.
[0036] The present application also provides a computer-readable storage medium for storing a computer program, wherein the computer program implements the steps of the above-mentioned data communication method when executed by a processor.
[0037] A computer program product comprises a computer program / instruction, wherein the computer program / instruction implements the steps of the above data communication method when executed by a processor.
[0038] It can be seen that the present invention receives data distribution service data by utilizing the first data distribution service, and sends the data distribution service data to the second data distribution service; wherein the data distribution service data is the data of the operating system with a system-level chip; the first data distribution service and the second data distribution service are deployed on the operating system with a system-level chip; the data distribution service data is reversely parsed by utilizing the second data distribution service to obtain network data; the network data is sent to the restricted operating system; wherein the restricted operating system is an operating system with limited resources. Compared with the current inability to perform DDS communication between the restricted operating system and the operating system with a system-level chip, the present application installs the data distribution service into the operating system with a system-level chip, so that the operating system with a system-level chip can communicate based on the data distribution service when communicating with the restricted operating system (such as MCU), thereby improving data communication performance.
[0039] In addition, the present invention also provides a data communication device, equipment and computer-readable storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0041] Figure 1 A flow chart of a data communication method provided by an embodiment of the present invention;
[0042] Figure 2 An example flow chart of a data communication method provided by an embodiment of the present invention;
[0043] Figure 3 A structural framework diagram of a data communication method provided by an embodiment of the present invention;
[0044] Figure 4 A schematic diagram of the structure of a data communication device provided by an embodiment of the present invention;
[0045] Figure 5 A schematic diagram of the structure of a data communication device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] DDS was originally defined by the Object Management Group (OMG) and has become a widely adopted standard in many industries. DDS supports multiple transmission protocols. For example, TCP / IP (Transmission Control Protocol / Internet Protocol) is the most basic communication protocol suite in the Internet. It not only includes TCP and IP protocols, but also involves many other protocols, such as FTP (File Transfer Protocol), SMTP (Simple Mail Transfer Protocol), UDP (User Datagram Protocol), shared memory, etc. DDS is often used in applications that require real-time data transmission and communication, such as aerospace, automotive, medical equipment, industrial automation and other fields. It provides a flexible, efficient and reliable way to achieve real-time data exchange and communication in distributed systems.
[0048] However, in automotive chips, the architecture solutions currently adopted are basically multi-core heterogeneous solutions, that is, at least one MCU and an A-core SOC will be deployed on a development board. Because of its ultra-high computing power and multi-core capabilities, the A-core SOC is mostly used to deploy some resource-intensive applications, such as driving or parking, etc., but the A-core operating system is mostly the Linux operating system, which is a pseudo-real-time operating system with poor real-time performance. MCUs are mostly deployed with real-time operating systems to handle processing that requires rapid response in the vehicle environment, such as brakes, accelerators, and steering.
[0049] The powerful transmission capability of DDS will inevitably consume a huge amount of memory, so DDS cannot be deployed on restricted operating systems such as MCU.
[0050] Please refer to Figure 1 , Figure 1A flow chart of a data communication method provided by an embodiment of the present invention. The method may include:
[0051] S101, using a first data distribution service to receive data distribution service data, and sending the data distribution service data to a second data distribution service; wherein the data distribution service data is data of an operating system having a system-on-chip; the first data distribution service and the second data distribution service are deployed on an operating system having a system-on-chip.
[0052] The executor of this embodiment is an operating system with SOC. The first data distribution in this embodiment is DDS, which is an open standard for real-time data transmission and communication, a data-oriented communication protocol, and is intended to support real-time data exchange between different components in a distributed system. The data distribution service data in this embodiment is the data sent by the operating system to the first data distribution service. When this embodiment sends the data distribution service data to the second data distribution service, it is transmitted based on the communication connection established between the first data distribution service and the second data distribution service. This embodiment does not limit the specific data format of the data transmitted between the first data distribution service and the second data distribution service, as long as it is a format supported by the data distribution service. In this embodiment, the first data distribution service and the second data distribution service are deployed on an operating system with a system-on-chip. For example, two DDS domains are deployed on a Linux (multi-user, multi-tasking operating system kernel) operating system, namely the first data distribution service and the second data distribution service.
[0053] It should be further explained that before using the first data distribution service to receive data distribution service data and sending the data distribution service data to the second data distribution service, the above data communication method may also include: creating a first data distribution service and a second data distribution service; wherein the first data distribution service is used to receive data from the operating system and send it to the second data distribution service, and / or forward the data received from the second data distribution service to the operating system; the second data distribution service is used to convert the format of the data sent by the first data distribution service and the data sent by the restricted operating system; the first data distribution service and the second data distribution service are connected in a data distribution service manner. In this embodiment, the process of establishing a connection between the first data distribution service and the second data distribution service can be to ensure that the network between the two services is connected and configure the correct IP (network address) address and port; DDS usually uses a discovery service to identify other entities in the network, and it is necessary to ensure that both services can access the discovery service; DDS entities establish a connection by exchanging information, which usually involves sending and receiving messages; once the connection is established, the producer can start sending data and the consumer can start receiving data; monitor the performance of data transmission and adjust the QoS (quality of service) settings as needed to optimize performance. In the process of establishing a connection, this embodiment can create a DomainParticipant (domain participant, which is the entry point of the application to the DDS domain, representing an application entity that participates in publishing and subscribing to data in a specific DDS domain), Publisher, DataWriter, Topic, Subscriber, DataReader, etc. according to the configuration file or program call. This embodiment establishes a connection between the first data distribution service and the second data distribution service, so that the first data distribution service sends the data that needs to be de-parsed to the second data distribution service. The role of the second data distribution service in this embodiment is to forward data, for example, receive data from the APP (application) in the operating system and send it to the second data distribution service, or receive data from the second data distribution service and forward it to the APP.
[0054] It should be further explained that in order to improve the speed of data transmission, before using the second data distribution service to reversely analyze the data distribution service data and obtain network data, it can also include: determining the priority corresponding to each data according to the data type, and binding the data and its corresponding priority to the second data distribution service, so that when there are multiple data, the second data distribution service sends the data according to the priority; setting a buffer area in the second data distribution service, the buffer area is used to store data waiting to be sent, and the buffer area is processed according to the priority and timeliness of the data to prevent the buffer area data from overflowing; and / or setting a dynamic retransmission mechanism in the second data distribution service; wherein the dynamic retransmission mechanism is a mechanism for dynamically adjusting the retransmission time according to the data priority, data size and network quality. The type of data in this embodiment can be determined according to the importance of the data and the urgency required for the data. For example, data generated by direct user interaction, such as input quality and feedback information, should have a high priority, that is, data generated by the front end generally has a high priority, and data generated by the back end generally has a low priority. Or the priority of the data can be determined according to user needs. The timeliness of the data in this embodiment means that the data needs to be transmitted within a specific time range. The network quality in this embodiment can be determined based on network delay and packet loss rate. This embodiment can prevent data loss by setting a buffer area, and this embodiment can shorten the time and improve data transmission efficiency by dynamically adjusting the retransmission time when the network quality is good.
[0055] S102, utilizing the second data distribution service to reversely parse the data distribution service data to obtain network data.
[0056] The purpose of reverse parsing in this embodiment is to parse the data distribution service data into a form that can be processed by the restricted operating system. This embodiment does not limit the specific format of the network data. For example, the format of the network data in this embodiment may be in the form of UDP (User Datagram Protocol), which does not require a connection to be established when transmitting data; or the format of the network data in this embodiment may also be in the form of TCP (Transmission Control Protocol). In the TCP protocol, data is divided into several data packets for transmission, each of which has a sequence number, and the receiver can reassemble the data packets into complete data based on the sequence number. The TCP protocol also provides functions such as confirmation mechanism, retransmission mechanism, and flow control to ensure reliable and efficient data transmission.
[0057] It should be further explained that the format of the network data in this embodiment is the user datagram protocol format. Accordingly, using the second data distribution service to reversely parse the data distribution service data to obtain the network data may include: removing the header of the data distribution service data to obtain the data distribution service data with the header removed; wherein the format of the data distribution service data is the user datagram protocol format; performing data serialization processing on the data distribution service data with the header removed to obtain the network data in the user datagram protocol format. For the header removal and serialization processing of the data distribution service data in this embodiment, the following steps can be performed: First, it is necessary to determine the header structure of the data distribution service data. Usually, the header of the data packet contains some meta information, such as the source address, the destination address, the sequence number, etc. This information is used for network transmission and the reorganization of the data packet. Determine the length of the header to be removed. Use an appropriate programming language and library to read the data distribution service data and remove the header from the data. Serialize the data after the header is removed and convert it into the network data format of the user datagram protocol (UDP). Send the serialized data to the target address. This embodiment removes the packet header and performs serialization processing on the data so that the data can be converted into a user datagram protocol format (UDP), thereby reducing resource consumption.
[0058] S103, sending the network data to a restricted operating system; wherein the restricted operating system is an operating system with limited resources.
[0059] This embodiment does not limit the specific restricted operating system. For example, the restricted operating system in this embodiment can be a micro control unit, an embedded system, an industrial control system, an automotive electronic system, etc.
[0060] It should be further explained that the sending of network data to the restricted operating system may include: sending network data to a microcontroller unit. The restricted operating system in this embodiment is a microcontroller unit (MCU). It is understandable that the MCU cannot support such a large DDS program, and the serialization and deserialization codes that DDS relies on are also very complex, and there is no relevant code available in the MCU environment. This embodiment realizes MCU data communication using DDS.
[0061] It should be further explained that the above data communication method may further include:
[0062] S1, using a second data distribution service to receive target network data sent by a restricted operating system.
[0063] S2, using the second data distribution service to reversely parse the target network data to obtain target format data; wherein the target format data is in the data format required by the first data distribution service.
[0064] S3, sending the target format data to the first data distribution service.
[0065] S4: Send the target format data to the operating system using the first data distribution service.
[0066] This embodiment can also use the second data distribution service to receive target network data sent by the restricted operating system to the operating system with a system-level chip, and reverse-parse the target network data, so that the first data distribution service can send the parsed target format data to the operating system with a system-level chip for processing.
[0067] It should be further explained that, in order to improve the quality of data communication, the above-mentioned sending of the target format data to the first data distribution service may include: sending the target format data to the first data distribution service based on a quality of service policy; wherein the quality of service policy includes at least one of a transmission priority policy, a resource restriction policy, a data filtering policy, and a partitioning policy. The QOS (Quality of Service) policy of the transmission priority policy in this embodiment refers to assigning priorities to different data streams according to the urgency and importance of the data. For example, critical control signals should have a high priority, while non-critical data can be assigned a lower priority. The resource restriction policy in this embodiment refers to ensuring the quality and performance of network services by limiting the use of resources. This policy is usually used to manage resources such as bandwidth, delay, and availability in the network to ensure that critical applications and services can obtain the required resources. The QoS of the resource restriction policy may include the following methods: Bandwidth restriction: Limit the amount of bandwidth used by a specific flow or user to ensure that the service quality of other flows or users is not disturbed. Delay restriction: Set a delay threshold, and data packets exceeding the threshold will be discarded or lowered in priority to reduce the impact of delay on critical applications. Availability restriction: By reserving a portion of resources for critical applications, ensure that they always have enough resources available when needed. The data filtering strategy in this embodiment refers to ensuring the quality and performance of network services by filtering and limiting specific types of data flows. This strategy is usually used to manage resources such as bandwidth, latency, availability, etc. in the network to ensure that key applications and services can obtain the required resources. For example, according to specific content or protocol types, unwanted data packets are filtered out to reduce unnecessary traffic. For example, malware, advertisements or other non-critical data can be filtered out. The partition strategy in this embodiment refers to dividing the network into different areas or subnets and applying different QoS policies to each area or subnet to ensure that key applications and services can obtain the required resources. The QoS of the partition strategy can include the following ways: Partitioning based on business needs: According to different business needs, the network is divided into different areas, and different QoS policies are assigned to each area. For example, the internal network of an enterprise can be divided into office areas, data centers, and remote access areas, and different priorities and bandwidth limits can be provided for each area. Partitioning based on user type: According to the user's permissions or subscription level, the network is divided into different areas, and different QoS policies are assigned to each area. For example, higher bandwidth and lower latency can be provided to internal employees, while lower bandwidth and higher latency can be provided to external visitors. Traffic type-based partitioning: Divide the network into different areas based on different types of traffic and assign different QoS policies to each area.For example, the network can be divided into a video streaming area, a file transfer area and a Web browsing area, and different bandwidth limits and priority scheduling are provided for each area. This embodiment improves the quality of data communication by sending target format data to the first data distribution service based on the quality of service policy.
[0068] A data communication method provided by an embodiment of the present invention may include: S101, using a first data distribution service to receive data distribution service data, and sending the data distribution service data to a second data distribution service; wherein the data distribution service data is data of an operating system with a system-on-chip; S102, using the second data distribution service to reversely analyze the data distribution service data to obtain network data; S103, sending the network data to a restricted operating system; wherein the restricted operating system is an operating system with limited resources. Compared with the current restricted operating system, which cannot install the data distribution service, so that it cannot communicate efficiently with the operating system with a system-on-chip, the present application reversely analyzes the data by using the data distribution service on the operating system with a system-on-chip to obtain data that can be processed by the restricted operating system, so that the operating system with a system-on-chip and the restricted operating system can communicate efficiently. In addition, this embodiment removes the packet header and serializes the data so that the data can be converted into the user datagram protocol format (UDP), thereby reducing resource consumption; and in addition, this embodiment improves the quality of data communication by sending the target format data to the first data distribution service based on the quality of service policy.
[0069] In order to make the present invention easier to understand, please refer to Figure 2 , Figure 2 An example flow chart of a data communication method provided by an embodiment of the present invention may specifically include:
[0070] S201, deploying two data distribution service (DDS) domains on a Linux operating system, namely a first data distribution service and a second data distribution service.
[0071] Figure 3 A structural framework diagram of a data communication method provided by an embodiment of the present invention, from Figure 3 It can be seen that the structural framework diagram may include SOC (system on chip), APP (application), DDS Domain1 (first data distribution service), DDSDomain2 (second data distribution service), ANTI-DDS (anti-parsing-data distribution service), MCU microcontroller unit, and TASK (task execution).
[0072] S202, connecting the first data distribution service and the second data distribution service.
[0073] S203, deploying ANTI-DDS in the second data distribution service; wherein the anti-parsing-data distribution service is used to interact with the first data distribution service.
[0074] In this embodiment, S203 may be performed before S202 or simultaneously with S202.
[0075] S204: The first data distribution service sends the data of the SOC to the second data distribution service.
[0076] S205, the second data distribution service utilizes ANTI-DDS to reversely parse the data and convert it into a UDP packet, and sends it to the MCU.
[0077] In this embodiment, DDS Domain2 can also be used to encapsulate the MCU data into RTPS (Real-Time Publish-Subscribe Protocol, a protocol for implementing real-time publish-subscribe communication) message format, and send it to DDS Domain1, and DDS Domain1 sends the MCU data to the Linux operating system. In this embodiment, the MCU does not need to care about the data transmission speed, and all QOS processing (quality of service) is completed by DDS Domain2.
[0078] The embodiment of the present invention realizes communication between MCU and Linux through DDS, which greatly improves the communication speed. At present, DDS protocol is the most widely used in vehicle network communication, and upstream and downstream suppliers of communication have DDS communication capabilities. The use of DDS saves a lot of work in protocol development and adaptation, and DDS has been tested in a large number of mass production, which is convenient and reliable. In addition, the DDS protocol provides QOS capabilities, and the transmission capabilities can be customized through the configuration file. For example, if it is configured as best effort, data can be transmitted at the maximum speed, but packet loss may occur. If it is configured as reliable, the transmission reliability can be guaranteed, and the transmission rate will also be reduced.
[0079] The data communication device provided by the embodiment of the present invention is introduced below. The data communication device described below and the data communication method described above can be referred to each other.
[0080] Please refer to Figure 4 , Figure 4 A schematic diagram of the structure of a data communication device provided in an embodiment of the present invention may include:
[0081] The data distribution module 100 is used to receive data distribution service data using a first data distribution service, and send the data distribution service data to a second data distribution service; wherein the data distribution service data is data of an operating system with a system-on-chip; the first data distribution service and the second data distribution service are deployed on the operating system with a system-on-chip;
[0082] A reverse parsing module 200, configured to reversely parse the data distribution service data using the second data distribution service to obtain network data;
[0083] The data sending module 300 is used to send the network data to a restricted operating system; wherein the restricted operating system is an operating system with limited resources.
[0084] Further, based on the above embodiment, the above data communication device may further include:
[0085] The DDS creation module is used to create the first data distribution service and the second data distribution service; wherein the first data distribution service is used to receive data from the operating system and send it to the second data distribution service, and / or forward the data received from the second data distribution service to the operating system; the second data distribution service is used to perform format conversion on the data sent by the first data distribution service and the data sent by the restricted operating system;
[0086] A connection establishment module is used to establish a connection between the first data distribution service and the second data distribution service in a data distribution service mode.
[0087] Further, based on any of the above embodiments, the data sending module 300 may include:
[0088] The data sending unit is used to send the network data to the micro control unit.
[0089] Further, based on any of the above embodiments, the above data communication device may further include:
[0090] A data receiving module of the restricted operating system, configured to receive target network data sent by the restricted operating system by using the second data distribution service;
[0091] a data de-analysis module for the restricted operating system, used to de-analyze the target network data using the second data distribution service to obtain target format data; wherein the format of the target format data is the data format required by the first data distribution service;
[0092] Sending to a first data distribution service module, used for sending the target format data to the first data distribution service;
[0093] The sending to operating system module is used to send the target format data to the operating system by using the first data distribution service.
[0094] Further, based on any of the above embodiments, sending to the first data distribution service module includes:
[0095] A sending unit based on a quality of service policy is used to send the target format data to the first data distribution service based on a quality of service policy; wherein the quality of service policy includes at least one of a transmission priority policy, a resource limitation policy, a data filtering policy, and a partitioning policy.
[0096] Further, based on any of the above embodiments, the format of the above network data is a user datagram protocol format.
[0097] Further, based on the above embodiment, the inverse parsing module 200 includes:
[0098] A packet header removal unit, used to remove the packet header of the data distribution service data to obtain the data distribution service data with the packet header removed; wherein the format of the data distribution service data is a user datagram protocol format;
[0099] The serialization processing unit is used to perform data serialization processing on the data distribution service data with the packet header removed to obtain network data in a user datagram protocol format.
[0100] Further, based on any of the above embodiments, the above data communication device may further include:
[0101] a priority setting module, used to determine the priority corresponding to each data according to the data type, and bind the data and its corresponding priority to the second data distribution service, so that when there are multiple data, the second data distribution service sends the data according to the priority;
[0102] A buffer area setting module, used to set a buffer area in the second data distribution service, the buffer area is used to store data waiting to be sent, and to process the buffer area according to the priority and timeliness of the data to prevent the buffer area data from overflowing;
[0103] A dynamic retransmission mechanism determination module is used to set a dynamic retransmission mechanism in the second data distribution service; wherein the dynamic retransmission mechanism is a mechanism for dynamically adjusting the retransmission time according to data priority, data size and network quality.
[0104] It should be noted that the order of the modules and units in the above data communication device can be changed without affecting the logic.
[0105] The data communication device provided by the embodiment of the present invention may include: a data distribution module 100, used to receive data distribution service data using a first data distribution service, and send the data distribution service data to a second data distribution service; wherein the data distribution service data is data of an operating system with a system-on-chip; the first data distribution service and the second data distribution service are deployed on an operating system with a system-on-chip; a reverse parsing module 200, used to reverse parse the data distribution service data using the second data distribution service to obtain network data; a data sending module 300, used to send the network data to a restricted operating system; wherein the restricted operating system is an operating system with limited resources. Compared with the current restricted operating system, which cannot install the data distribution service and cannot communicate efficiently with the operating system, the present application reversely parses the data on the data distribution service on the operating system with a system-on-chip to obtain data that can be processed by the restricted operating system, thereby enabling efficient communication between the operating system with a system-on-chip and the restricted operating system. Furthermore, this embodiment reduces resource consumption by removing packet headers and serializing data so that the data can be converted into a User Datagram Protocol (UDP) format; and further, this embodiment improves the quality of data communication by sending target format data to the first data distribution service based on a quality of service policy.
[0106] A data communication device provided by an embodiment of the present invention is introduced below. The data communication device described below and the data communication method described above can refer to each other.
[0107] Please refer to Figure 5 , Figure 5 A structural diagram of a data communication device provided in an embodiment of the present invention may include:
[0108] A memory 10, used for storing computer programs;
[0109] The processor 20 is used to execute a computer program to implement the steps of the above-mentioned data communication method.
[0110] The memory 10 , the processor 20 , and the communication interface 30 all communicate with each other via a communication bus 40 .
[0111] In the embodiment of the present invention, the memory 10 is used to store one or more programs, and the program may include program code, and the program code includes computer operation instructions. In the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:
[0112] Using a first data distribution service to receive data distribution service data, and sending the data distribution service data to a second data distribution service; wherein the data distribution service data is data of an operating system having a system-on-chip; the first data distribution service and the second data distribution service are deployed on the operating system having a system-on-chip;
[0113] De-analyzing the data distribution service data using the second data distribution service to obtain network data;
[0114] The network data is sent to a restricted operating system; wherein the restricted operating system is an operating system with limited resources.
[0115] In a possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
[0116] In addition, the memory 10 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include an NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.
[0117] The processor 20 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, a microprocessor or any conventional processor, etc. The processor 20 may call a program stored in the memory 10 .
[0118] The communication interface 30 may be an interface of a communication module, and is used to connect to other devices or systems.
[0119] Of course, it should be noted that Figure 5 The structure shown does not constitute a limitation on the data communication device in the embodiment of the present invention. In actual applications, the data communication device may include Figure 5 More or fewer components than shown, or combinations of certain components.
[0120] The computer-readable storage medium provided in an embodiment of the present invention is introduced below. The computer-readable storage medium described below and the data communication method described above can be referenced to each other.
[0121] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data communication method are implemented.
[0122] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0123] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0124] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0125] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0126] The above is a detailed introduction to a data communication method, device, equipment and computer-readable storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for a person skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A data communication method, characterized in that: include: Utilizing a first data distribution service to receive data distribution service data, and sending the data distribution service data to a second data distribution service; wherein the data distribution service data is data of an operating system having a system-on-chip; the first data distribution service and the second data distribution service are deployed on the operating system having a system-on-chip; De-analyzing the data distribution service data using the second data distribution service to obtain network data; The network data is sent to a restricted operating system; wherein the restricted operating system is an operating system with limited resources.
2. The data communication method according to claim 1, characterized in that: Before receiving the data distribution service data by using the first data distribution service and sending the data distribution service data to the second data distribution service, the data communication method further includes: Creating the first data distribution service and the second data distribution service; wherein the first data distribution service is used to receive data from the operating system and send it to the second data distribution service, and / or forward the data received from the second data distribution service to the operating system; the second data distribution service is used to perform format conversion on the data sent by the first data distribution service and the data sent by the restricted operating system; The first data distribution service and the second data distribution service are connected in a data distribution service manner.
3. The data communication method according to any one of claims 1 or 2, characterized in that: The data communication method further comprises: receiving target network data sent by the restricted operating system using the second data distribution service; De-analyzing the target network data using the second data distribution service to obtain target format data; wherein the format of the target format data is the data format required by the first data distribution service; sending the target format data to the first data distribution service; The target format data is sent to the operating system using the first data distribution service.
4. The data communication method according to claim 3, characterized in that: Sending the target format data to the first data distribution service includes: The target format data is sent to the first data distribution service based on a quality of service policy; wherein the quality of service policy includes at least one of a transmission priority policy, a resource limitation policy, a data filtering policy, and a partitioning policy.
5. The data communication method according to claim 4, characterized in that: De-analyzing the data distribution service data using the second data distribution service to obtain network data includes: Removing the packet header of the data distribution service data to obtain the data distribution service data with the packet header removed; wherein the format of the data distribution service data is a user datagram protocol format; The data distribution service data with the packet header removed is subjected to data serialization processing to obtain network data in a user datagram protocol format.
6. The data communication method according to claim 1, characterized in that: Before using the second data distribution service to reversely parse the data distribution service data to obtain network data, the method further includes: Determine the priority corresponding to each data according to the data type, and bind the data and its corresponding priority to the second data distribution service, so that when there are multiple data, the second data distribution service sends the data according to the priority; A buffer area is set in the second data distribution service, the buffer area is used to store data waiting to be sent, and the buffer area is processed according to the priority and timeliness of the data to prevent the buffer area from overflowing; And / or setting a dynamic retransmission mechanism in the second data distribution service; wherein the dynamic retransmission mechanism is a mechanism for dynamically adjusting the retransmission time according to data priority, data size and network quality.
7. A data communication device, characterized in that: include: A data distribution module, configured to receive data distribution service data using a first data distribution service, and send the data distribution service data to a second data distribution service; wherein the data distribution service data is data of an operating system having a system-on-chip; wherein the first data distribution service and the second data distribution service are deployed on the operating system having a system-on-chip; a reverse parsing module, configured to reversely parse the data distribution service data using the second data distribution service to obtain network data; The data sending module is used to send the network data to the restricted operating system; wherein the restricted operating system is an operating system with limited resources.
8. The data communication device according to claim 7, characterized in that: The data communication device further comprises: A data distribution service creation module, used to create the first data distribution service and the second data distribution service; wherein the first data distribution service is used to receive data from the operating system and send it to the second data distribution service, and / or forward the data received from the second data distribution service to the operating system; the second data distribution service is used to perform format conversion on the data sent by the first data distribution service and the data sent by the restricted operating system; A connection establishment module is used to establish a connection between the first data distribution service and the second data distribution service in a data distribution service mode.
9. A data communication device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the data communication method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the steps of the data communication method according to any one of claims 1 to 6.
