Data processing method and apparatus, electronic device and storage medium

By dividing the cache space into levels and configuring QoS policies, the priority list is dynamically maintained, which solves the problem of insufficient data transmission timeliness and reliability of the DDS communication protocol in vehicle communications, ensures the transmission delay and reliability of important data, and saves equipment performance resources.

WO2025189974A1PCT designated stage Publication Date: 2025-09-18CHONGQING CHANGAN TECH CO LTD

Patent Information

Application Number
PCT/CN2025/073779
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-15
Filing Date
2025-01-21
Publication Date
2025-09-18

AI Technical Summary

Technical Problem

The DDS communication protocol has problems with poor data transmission timeliness and reliability in vehicle communications. In particular, important data is easily delayed or lost during network congestion, affecting traffic safety and user experience.

Method used

By dividing the cache space into multiple levels, the target data is stored in the corresponding level according to the data priority, and operations are performed based on the data priority order. The QoS policy of each level is configured, the topic priority list is dynamically maintained, and high-priority data is processed first.

Benefits of technology

It enables high-priority data to be sent or read first in case of network congestion, ensures the transmission delay and reliability of important data, saves equipment performance resources, and avoids delay and loss of important data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025073779_18092025_PF_FP_ABST
    Figure CN2025073779_18092025_PF_FP_ABST
Patent Text Reader

Abstract

A data processing method and apparatus, an electronic device, and a storage medium, relating to the technical field of communications. The method comprises: determining the data priority of target data, and storing the target data into a level in a target cache space corresponding to the data priority, wherein the target cache space comprises a plurality of levels, and the levels correspond to data priorities of data; and then, on the basis of a data priority order, executing a corresponding writing or reading operation on the data of different levels in the target cache space.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing method, device, electronic device and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This disclosure claims priority to Chinese patent application number 202410298925.2, filed with the China Patent Office on March 15, 2024, entitled “Data Processing Method, Device, Electronic Device and Storage Medium,” the entire contents of which are incorporated by reference into this disclosure. Technical Field

[0003] The present application relates to the field of communication technology, and in particular to a data processing method, device, electronic device and storage medium. Background Art

[0004] With the development of intelligent vehicles, the Data Distribution Service (DDS) communication protocol is becoming increasingly common in the field of in-vehicle communications to meet the increasing data transmission needs. The DDS communication protocol is a distributed real-time communication protocol that implements data transmission based on the User Datagram Protocol (UDP).

[0005] For reasons such as traffic safety and user driving experience, vehicles and other transportation vehicles need to ensure that data communications have good timeliness and reliability. However, due to the limitations of UDP itself, the DDS communication protocol often transmits data in a disorderly manner. In the event of device congestion, the timeliness and reliability of data transmission are poor. Summary of the Invention

[0006] This application provides a data processing method, device, electronic device, and storage medium to at least solve the technical problems of poor timeliness and reliability of data transmission in related technologies. The technical solutions of this application are as follows:

[0007] According to the first aspect of the present application, a data processing method is provided, including: determining the data priority of target data; storing the target data in a level corresponding to the data priority in a target cache space; the target cache space includes multiple levels; the levels in the target cache space correspond to the data priority of the data; performing operations on data of different levels in the target cache space according to the order of data priority; wherein, when the operation is a sending operation, the target cache space is a write cache space; when the operation is a read operation, the target cache space is a read cache space.

[0008] According to the above technical means, the present application can determine the data priority of the target data, thereby storing the target data in the layer corresponding to the data priority in the target cache space. Afterwards, the data processing device can perform sending or reading operations on the data of different layers in the target cache space according to the data priority order. In this way, the data processing device in the present application can preferentially send or read data with higher data priority, thereby avoiding the problem of delay and loss of important data during network congestion, and ensuring the transmission delay and reliability of important data.

[0009] In a possible implementation, the above method also includes: determining the quality of service QoS policy corresponding to each level in the target cache space; performing operations on data of different levels in the target cache space according to the data priority order, including: performing operations on data of different levels in the target cache space according to the data priority order and the QoS policy corresponding to each level.

[0010] According to the above technical means, the present application can configure a corresponding QoS policy for each level in the target cache space, thereby performing corresponding operations on the data in the level based on the data priority order and the QoS policy configured for each level. Since the levels in the target cache space in the present application can be used to divide data of different data priorities, compared to the QoS policy configuration method for the entire cache space in the related art, the technical solution provided by the present application can realize data granularity QoS policy configuration, while saving equipment performance resources and ensuring the transmission reliability of important data.

[0011] In a possible implementation, the method includes: determining a target level from a target cache space; storing data in the target level as data with the highest priority in the current target cache space; and performing an operation on the data in the target level.

[0012] According to the above technical means, the present application can select the target layer where the data with the highest data priority is stored from the target cache space, and perform operations on the data in the target layer, thereby ensuring the transmission delay and reliability of high-priority data.

[0013] In a possible implementation, the method includes: receiving a target message; the target message includes a data priority parameter of target data; and determining the data priority of the target data based on the target message.

[0014] According to the above technical means, the present application can determine the data priority of the acquired target data by receiving a target message carrying a data priority parameter, so as to facilitate the subsequent priority configuration based on data granularity.

[0015] In one possible embodiment, the above method includes: obtaining data priorities of multiple data, the multiple data including target data; after determining the data priority of the target data, the method also includes: obtaining topics to which the multiple data are respectively bound; the topics are used to associate write cache space and read cache space; updating a topic priority list based on the data priorities of the multiple data and the topics to which the multiple data are respectively bound; the topic priority list includes multiple topics and the topic priority corresponding to each topic; and determining the target data from the multiple data according to the topic priority order.

[0016] Based on the above technical means, the present application can obtain the data priority of multiple data, and then update the topic priority list containing the topic bound to each data based on the data priority. Afterwards, the data processing device can select the target data from the multiple data according to the topic priority order represented in the topic priority list to perform subsequent data processing operations, thereby achieving data-level priority configuration and further ensuring the transmission delay and reliability of important data.

[0017] In a possible implementation, the method includes: determining the topic priority of the topic bound to each data based on the data priority of the plurality of data; and updating the topic priority list based on the topic priority of each topic.

[0018] According to the above technical means, the present application can determine the subject priority of the subject to which the data is bound based on the data priority of the current multiple data, thereby dynamically maintaining a subject priority list. In this way, the data processing device can determine the processing order of the data according to the subject priority order in the subject priority list, thereby realizing data granularity priority configuration and ensuring the transmission delay and reliability of important data.

[0019] In a possible implementation, the method includes: determining a target topic from a current topic priority list; the target topic is the topic with the highest priority in the topic priority list; and using data bound to the target topic from multiple data as target data.

[0020] According to the above technical means, the present application can select the target topic with the highest topic priority from the current topic priority list, and then use the data bound to the target topic as the target data to perform subsequent data processing operations, thereby ensuring the transmission delay and reliability of high-priority data.

[0021] According to the second aspect provided by the present application, a data processing device is provided, including: a processing unit; a processing unit for determining the data priority of target data; the processing unit is also used to store the target data in a level corresponding to the data priority in a target cache space; the target cache space includes multiple levels; the levels in the target cache space correspond to the data priority of the data; the processing unit is also used to perform operations on data of different levels in the target cache space according to the data priority order; wherein, when the operation is a sending operation, the target cache space is a write cache space; when the operation is a read operation, the target cache space is a read cache space.

[0022] In a possible embodiment, the above-mentioned processing unit is also used to: determine the quality of service QoS policy corresponding to each level in the target cache space; perform operations on data of different levels in the target cache space according to the data priority order and the QoS policy corresponding to each level.

[0023] In a possible implementation, the processing unit is further configured to: determine a target level from the target cache space; the data stored in the target level is the data with the highest priority in the current target cache space; and perform operations on the data in the target level.

[0024] In a possible embodiment, the device further includes a communication unit; the communication unit is used to receive a target message; the target message includes a data priority parameter of the target data; and the above-mentioned processing unit is further used to: determine the data priority of the target data based on the target message.

[0025] In one possible embodiment, the above-mentioned processing unit is also used to: obtain data priorities of multiple data, the multiple data including target data; obtain topics to which the multiple data are respectively bound; the topics are used to associate write cache space and read cache space; update the topic priority list based on the data priorities of the multiple data and the topics to which the multiple data are respectively bound; the topic priority list includes multiple topics and the topic priority corresponding to each topic; and determine the target data from the multiple data according to the topic priority order.

[0026] In a possible implementation, the processing unit is further configured to: determine the topic priority of the topic bound to each data based on the data priority of the plurality of data; and update the topic priority list based on the topic priority of each topic.

[0027] In a possible implementation, the processing unit is further used to: determine the target topic from the current topic priority list; the target topic is the topic with the highest priority in the topic priority list; and use the data bound to the target topic from multiple data as the target data.

[0028] According to the third aspect provided by the present application, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the method of the above-mentioned first aspect and any possible implementation method thereof.

[0029] According to the fourth aspect provided by the present application, a computer-readable storage medium is provided. When the instructions in the computer-readable storage medium are executed by the processor of an electronic device, the electronic device is enabled to execute the method in the above-mentioned first aspect and any possible implementation method thereof.

[0030] According to the fifth aspect provided by the present application, a computer program product is provided, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method of the above-mentioned first aspect and any possible implementation method thereof.

[0031] Therefore, the above technical features of this application have the following beneficial effects:

[0032] (1) The data priority of the target data can be determined, and the target data can be stored in the target cache space at the level corresponding to the data priority. Afterwards, the data processing device can perform a sending or reading operation on the data at different levels in the target cache space according to the data priority order. In this way, the data processing device in the present application can preferentially send or read data with higher data priority, thereby avoiding the problem of delay and loss of important data during network congestion, and ensuring the transmission delay and reliability of important data.

[0033] (2) A corresponding QoS policy can be configured for each level in the target cache space, thereby performing corresponding operations on the data in the level based on the data priority order and the QoS policy configured for each level. Since the levels in the target cache space in this application can be used to divide data of different data priorities, compared to the QoS policy configuration method for the entire cache space in the related art, the technical solution provided by this application can realize data-granular QoS policy configuration, thereby saving equipment performance resources while ensuring the transmission reliability of important data.

[0034] (3) The target layer where the data with the highest data priority is stored can be selected from the target cache space, and operations can be performed on the data in the target layer, thereby ensuring the transmission delay and reliability of the high-priority data.

[0035] (4) The data priority of the acquired target data can be determined by receiving a target message carrying a data priority parameter, so as to facilitate subsequent priority configuration based on data granularity.

[0036] (5) The data priorities of multiple data can be obtained, and a topic priority list containing the topics to which each data is bound can be updated based on the data priorities. Afterwards, the data processing device can select target data from the multiple data according to the topic priority order represented in the topic priority list to perform subsequent data processing operations, thereby realizing data-level priority configuration and further ensuring the transmission delay and reliability of important data.

[0037] (6) The subject priority of the subject to which the data is bound can be determined based on the data priority of the current multiple data, thereby dynamically maintaining a subject priority list. In this way, the data processing device can determine the processing order of the data according to the subject priority order in the subject priority list, thereby realizing data granularity priority configuration and ensuring the transmission delay and reliability of important data.

[0038] (7) A target topic with the highest priority can be selected from the current topic priority list, and the data bound to the target topic can be used as the target data to perform subsequent data processing operations, thereby ensuring the transmission delay and reliability of high-priority data.

[0039] It should be noted that the technical effects brought about by any implementation method in the second to fifth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here.

[0040] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.

[0042] FIG1 is a flow chart showing a data processing method according to an exemplary embodiment;

[0043] FIG2 is a schematic diagram showing a data processing scenario according to an exemplary embodiment;

[0044] FIG3 is a schematic diagram showing the structure of a target cache space according to an exemplary embodiment;

[0045] FIG4 is a flow chart showing another data processing method according to an exemplary embodiment;

[0046] FIG5 is a schematic diagram showing the structure of a write cache space according to an exemplary embodiment;

[0047] FIG6 is a flowchart showing another data processing method according to an exemplary embodiment;

[0048] FIG7 is a flowchart showing another data processing method according to an exemplary embodiment;

[0049] FIG8 is a block diagram of a data processing device according to an exemplary embodiment;

[0050] Fig. 9 is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0051] In order to enable ordinary people in the art to better understand the technical solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0052] It should be noted that the terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0053] The DDS communication protocol is a distributed, real-time communication protocol that uses the User Datagram Protocol (UDP) for data transmission. Furthermore, the Controller Area Network (CAN) communication protocol is a real-time serial communication protocol used for communication between different components in a vehicle.

[0054] With the development of vehicle electronic and electrical architectures and the increase in vehicle functionality, the amount of data exchanged between controllers is also gradually increasing. To meet the increasing data transmission needs of in-vehicle communications, vehicle communications have evolved from the previous method of relying solely on CAN communication to a communication method that coexists with CAN communication and Ethernet communication based on the DDS communication protocol.

[0055] For reasons such as traffic safety and user experience, vehicles and other transportation vehicles require data communications to be timely and reliable. However, the current DDS communication protocol struggles to meet these requirements. The DDS communication protocol defines a configurable priority using the transport priority policy.

[0056] For example, in related technologies, the priority of each topic is pre-configured according to the category, so that an information channel with the corresponding priority of each topic is established between any nodes based on the priority of the topic. During the communication process, a data routing relationship is established based on the priority of the topic for data transmission.

[0057] However, this solution can only configure priority at the topic or communication entity granularity, and cannot implement data-level priority configuration.

[0058] It should be noted that for the main controller in the vehicle control domain, a microcontroller unit (MCU) chip with high integration and high timeliness is usually used. However, the memory resources of the MCU chip are limited. Each time a topic is created, a part of the memory resources will be occupied. At the same time, the amount of data required to be transmitted by the main controller in the vehicle control domain is very large, and a large number of DDS signals are usually transmitted at a high frequency based on one topic.

[0059] In addition, during the initialization process of vehicle power-on, status information needs to be synchronized between various modules, and there may be situations where multiple communication entities transmit data. Configuring the priority of only the topic or communication entity will also cause some signals to be delayed or even lost. When the delayed or lost signal is an important signal, it may even affect vehicle safety.

[0060] For data communication, the DDS communication protocol is based on UDP. UDP messages are transmitted out of order. Under normal network conditions, data is usually transmitted in the order of first sent, first received. In the event of network congestion, it is difficult to guarantee the transmission delay and reliability of important data.

[0061] In view of this, the present application provides a data processing method that can ensure the transmission delay and reliability of data. The data processing device can determine the data priority of the target data, and thus store the target data in the layer corresponding to the data priority in the target cache space. Afterwards, the data processing device can perform sending or reading operations on data of different layers in the target cache space according to the data priority order. In this way, the data processing device in the present application can give priority to sending or reading data with higher data priority, thereby avoiding the problem of delay and loss of important data during network congestion, and ensuring the transmission delay and reliability of important data.

[0062] It should be pointed out that the various embodiments of the present application can refer to each other, for example, the same or similar steps, method embodiments, system embodiments and device embodiments can refer to each other without limitation.

[0063] FIG1 is a flow chart showing a data processing method according to an exemplary embodiment. As shown in FIG1 , the data processing method includes the following steps:

[0064] Step 101: The data processing device determines the data priority of target data.

[0065] The target data may be data to be sent or received in a data processing device, and the data priority is used to represent the processing order of sending or receiving the data.

[0066] For example, data priority can be represented by a numerical value, for example, data priority can be divided into 1, 2, 3, and 4, wherein a smaller numerical value indicates a higher data priority, 1 indicates the highest priority, 4 indicates the lowest priority, and so on. Alternatively, a smaller numerical value indicates a lower data priority, 1 indicates the lowest priority, 4 indicates the highest priority, and so on. The data priority in this application can also be represented by other forms (such as numerical values ​​in different bases, different character identifiers, etc.), which is not limited in this application.

[0067] The data processing device may be a vehicle controller, such as a processing chip configured in a vehicle. The data processing device may also be a functional module for executing the data processing method provided in this application. The data processing device may also be a computer program product for executing the data processing method. Alternatively, the data processing device may serve as a vehicle control domain system architecture, executing the aforementioned data processing method by controlling various components within the vehicle control domain system architecture.

[0068] In a possible implementation, the data processing device receives a target message and determines a data priority of target data based on the target message.

[0069] The target message includes a data priority parameter of the target data.

[0070] As shown in Figure 2, the data processing device receives a target message based on the packet sending interface or packet receiving interface defined by the DDS communication protocol. The target message is configured with the data priority parameters of the corresponding target data (such as a tag used to indicate the data priority). The data processing device can create a writer entity or a reader entity based on application requirements. The data processing device can determine the data priority of the target data to be sent from the target message through the writer entity and determine the data priority of the target data to be received from the target message through the reader entity.

[0071] Each writer in the data processing device is configured with a corresponding write history cache (WHC), and each reader is configured with a corresponding read history cache (RHC). The write cache is used to temporarily store data to be sent by the corresponding writer, and the read cache is used to temporarily store data to be read by the corresponding reader.

[0072] Step 102: The data processing device stores the target data in a level corresponding to the data priority in the target cache space.

[0073] The target cache space includes multiple levels, each corresponding to the data priority level. In other words, the multiple levels divide the target cache space into multiple sections, each capable of independently storing data. The levels can be represented by stacks, queues, and other forms.

[0074] The correspondence between the levels in the target cache space and the data priority of the data can be a one-to-one correspondence, a one-to-many correspondence, or a many-to-one correspondence. It can be set according to actual conditions and this application does not limit this.

[0075] Taking Figure 3 as an example, the target cache space can be divided into four levels: level 1, level 2, level 3, and level 4. Taking the data priority as an example, which is also divided into 1, 2, 3, and 4, the levels of the target cache space correspond one-to-one with the data priority: level 1 corresponds to data priority 1, level 2 corresponds to data priority 2, level 3 corresponds to data priority 3, and level 4 corresponds to data priority 4. Thus, when the data processing device determines that the data priority of the target data is 1, the target data can be stored in level 1. When the data processing device determines that the data priority of the target data is 2, the target data can be stored in level 2, and so on.

[0076] As shown in FIG2 , the target cache space may be a write cache space and / or a read cache space. The data processing device may store the target data in the write cache space at a level corresponding to the data priority level through a write entity. The data processing device may also store the target data in the read cache space at a level corresponding to the data priority level through a read entity.

[0077] Step 103: The data processing device performs operations on data of different levels in the target cache space according to the data priority order.

[0078] Wherein, when the operation is a send operation, the target cache space is a write cache space. When the operation is a read operation, the target cache space is a read cache space.

[0079] In a possible implementation, the data processing device determines a target level from the target cache space and performs an operation on the data in the target level.

[0080] The data stored in the target level is the data with the highest priority in the current target cache space.

[0081] For example, as shown in FIG2 , for data written into the cache space, the data processing device may preferentially send data in the layer corresponding to the higher data priority by calling the packet sending interface, and then send data in the layer corresponding to the lower data priority. For data read from the cache space, the data processing device may preferentially read data in the layer corresponding to the higher data priority by calling the packet receiving interface, and then read data in the layer corresponding to the lower data priority.

[0082] It should be noted that the write cache space and the read cache space can be associated through a topic, and the data processing device sends data in the write cache space to the associated read cache space. The correspondence between the write cache space and the read cache space can be a one-to-one correspondence, a one-to-many correspondence, or a many-to-one correspondence. The levels in the write cache space and the levels in the read cache space can have a correspondence or not.

[0083] For example, when there is a correspondence between the levels in the write cache space and the levels in the read cache space (for example, the read cache space and the write cache space in Figure 2 both include 4 levels, and the levels correspond one to one), the data processing device can send data of different levels in the write cache space to the corresponding levels in the read cache space. At this time, the data priorities of data of different levels in the read cache space also satisfy the correspondence with the levels in the cache space.

[0084] When there is no correspondence between the tiers in the write cache space and the tiers in the read cache space, the data processing device can store the target data in the corresponding tier based on the correspondence between the target data's data priority and the tiers in the read cache space. In this case, the data processing device can prioritize the data reads based on the actual needs of the reading entity.

[0085] Based on the above technical solution, the data processing device can determine the data priority of the target data, and thus store the target data in the layer corresponding to the data priority in the target cache space. Afterwards, the data processing device can perform sending or reading operations on the data at different layers in the target cache space according to the data priority order. In this way, the data processing device in the present application can preferentially send or read data with higher data priority, thereby avoiding the problem of delay and loss of important data during network congestion, and ensuring the transmission delay and reliability of important data.

[0086] In some embodiments, in order to further ensure the transmission reliability of important data, in combination with FIG1 , as shown in FIG4 , the data processing method provided in the embodiment of the present application further includes the following steps:

[0087] Step 401: The data processing device determines the quality of service (QoS) policy corresponding to each level in the target cache space.

[0088] The quality of service (QoS) policy is used to define the guarantee level of network data transmission.

[0089] Exemplarily, the QoS policy includes a reliable transmission policy, a best effort policy, and the like.

[0090] When the configured QoS policy is a reliable transmission policy, the data processing device will simultaneously send a heartbeat sub-message carrying the data sample sequence number when sending data through the write entity. After the data processing device reads data from the read cache space through the read entity, it will send a reply sub-message confirming receipt of the data, and then clear the data temporarily stored in the read cache space. When the data processing device fails to read the data from the read cache space through the read entity, it will send a reply sub-message indicating that the data was not received. In response to the reply sub-message, the data processing device will resend the data through the write entity to ensure the transmission reliability of the data.

[0091] When the configured QoS policy is a best-effort policy, the data processing device clears the data temporarily stored in the write cache space after sending the data from the write entity through the write entity, without confirming whether the data was successfully sent to the read entity. Accordingly, when the data processing device reads the data stored in the read cache space through the read entity, it does not confirm whether any data was missed.

[0092] It should be noted that in the relevant technology, QoS policies usually act on cache space or communication entities. Due to the performance resource limitations of current on-board chips (such as MCU chips) and the increasing demand for data transmission, the solution of configuring QoS policies in the entire cache space or communication entity will occupy a large amount of performance resources, resulting in the vehicle being unable to operate normally. Since the target cache space in this application is divided into multiple levels, and different levels store data of different importance based on data priority, the data processing device can provide QoS guarantees for data of different importance by configuring corresponding QoS policies for each level in the target cache space. At the same time, the data processing device only needs to provide QoS guarantees for reliable transmission of important data, which can save a lot of equipment performance resources and avoid the problem of insufficient performance resources in the vehicle causing it to fail to operate normally.

[0093] In addition, the present application does not limit the execution order of the above steps 101-102 and step 401. Step 401 can be executed before or after step 102, or before or after step 101. Figure 4 only uses step 401 executed after step 102 as an example to illustrate the data processing method provided by the present application.

[0094] As a possible implementation manner, the above step 103 can be implemented through the following step 402.

[0095] Step 402: The data processing device performs operations on data of different levels in the target cache space according to the data priority order and the QoS policy corresponding to each level.

[0096] Taking the write cache space as an example, in combination with Figure 2, as shown in Figure 5, the write cache space includes tier 1, tier 2, tier 3, and tier 4. Tier 1 is used to store data with the highest priority, tier 2 is used to store data with the second highest priority, and so on.

[0097] The QoS policies configured for level 1 are reliable transmission policy and keepall policy. When the data processing device sends data in level 1 in order of data priority, it will confirm whether the data is successfully sent to the read cache space. At the same time, it will retain historical data and will not perform data clearing operations.

[0098] The QoS policies configured for level 2 are the reliable transmission policy and the keep-last-20 policy. When the data processing device sends the data in level 2 in the order of data priority, it will confirm whether the data has been successfully sent to the read cache space. At the same time, it will retain the latest 20 historical data and delete the old data after 20 when new data is stored.

[0099] The QoS policies configured for level 3 are the reliable transmission policy and the keep the latest 5 data (keeplast5) policy. When the data processing device sends the data in level 3 in order of data priority, it will confirm whether the data has been successfully sent to the read cache space. At the same time, it will retain the latest 5 historical data and delete the old data after 5 when new data is stored.

[0100] The QoS policies configured for level 4 are the best-effort policy and the keep-last-1 policy. When the data processing device sends the data in level 4 in the order of data priority, it will not confirm whether the data has been successfully sent to the read cache space. At the same time, it will only retain the latest historical data and delete the old data when new data is stored.

[0101] Based on the above technical solution, the data processing device in this application can configure a corresponding QoS policy for each level in the target cache space, thereby performing corresponding operations on the data in the level based on the data priority order and the QoS policy configured for each level. Since the levels in the target cache space in this application can be used to divide data of different data priorities, compared to the QoS policy configuration method for the entire cache space in the related art, the technical solution provided by this application can realize data granularity QoS policy configuration, while saving equipment performance resources and ensuring the transmission reliability of important data.

[0102] In some embodiments, the technical solution provided in this application can be further combined with the subject to implement data granularity priority protection. Combined with Figure 1, as shown in Figure 6, the above step 101 can be implemented through the following steps 601.

[0103] Step 601: The data processing device obtains data priorities of multiple data.

[0104] The multiple data include target data.

[0105] In a possible implementation, the data processing device may receive multiple target messages, and thereby determine the data priorities of multiple data based on the multiple target messages.

[0106] The target message includes a data priority parameter of the data. For related instructions, please refer to the description in the above step 101, which will not be repeated here.

[0107] In another possible implementation, the data includes a data priority parameter. After receiving multiple data, the data processing device can parse the received multiple data to obtain the data priorities of the multiple data.

[0108] For example, in the DDS communication protocol, data structure information is typically defined using an interface definition language (IDL), and the structure information for each type of data can be pre-configured. In this application, a data priority parameter can be configured in the data structure information. In this way, a data processing device can obtain the data priority by parsing the data after receiving it.

[0109] As a possible implementation, the method further includes the following steps 602 to 604:

[0110] Step 602: The data processing device obtains multiple topics to which data are respectively bound.

[0111] The topic is used to associate the write cache space and the read cache space.

[0112] It should be noted that when the data processing device needs to transmit data, it needs to bind the data to the subject. At the same time, the subject is associated with a write cache space and a read cache space. The data processing device can store the data to be sent in the write cache space associated with the bound subject through the write entity. The data in the write cache space is transmitted to the read cache space associated with the subject through the underlying communication link. The data processing device reads data from the read cache space associated with the subject through the read entity.

[0113] Illustratively, the data processing device may obtain subject identifiers of multiple subjects and bind the data to the subjects based on the subject identifiers.

[0114] Step 603: The data processing device updates the topic priority list based on the data priorities of the multiple data and the topics to which the multiple data are respectively bound.

[0115] The topic priority list includes multiple topics and a topic priority corresponding to each topic.

[0116] In a possible implementation, the data processing device may determine the topic priority of the topic bound to each data based on the data priority of the plurality of data, and update the topic priority list based on the topic priority of each topic.

[0117] For example, there is a corresponding relationship between the data priority of the data and the theme priority of the theme, and the data processing device can determine the theme priority of the theme bound to the data based on the corresponding relationship. Thereafter, the data processing device can update the theme priority list based on the obtained theme priority.

[0118] It should be noted that the topic priority list in this application is dynamically updated. During the operation of the vehicle, the data that needs to be transmitted will change in real time, and the topics and topic priorities in the topic priority list determined by the data processing device will also be updated accordingly. The method of directly configuring the priority of the topic in the related art cannot achieve priority configuration for the data. In contrast, the topic priority of the topic in this application will be dynamically updated according to the data priority of the data currently to be transmitted. In other words, this application can meet the priority configuration for the data to be transmitted by dynamically maintaining the topic priority list to ensure the delay and reliability of important data.

[0119] In one possible implementation, when the data to be transmitted changes in the data processing device, the data processing device may obtain the data priority of the changed data and update the subject priority list based on the data priority.

[0120] In another possible implementation, the data processing device may acquire data regularly according to a preset period and update the subject priority list according to the data priority of the data.

[0121] Step 604: The data processing device determines target data from multiple data according to the order of subject priority.

[0122] It should be noted that when the data processing device is heavily loaded, if there is data under multiple topics that need to be processed, the data processing device cannot process the data under each topic simultaneously. The data processing device can determine the target data from the multiple data according to the topic priority order represented by the topic priority list and process them in sequence.

[0123] In a possible implementation, the data processing device determines the target topic from the current topic priority list, and uses the data bound to the target topic from the multiple data as the target data.

[0124] The target topic is the topic with the highest priority in the topic priority list.

[0125] Exemplarily, the data processing device uses the data under the current topic with the highest priority as the target data to perform subsequent corresponding data processing operations, such as serialization, group real-time publish and subscribe (RTPS) operations, calling the underlying interface to transmit data, and other operations. When a topic with a higher priority exists after the topic priority list is updated, the data processing device suspends the current processing operation and gives priority to the processing operation of the data under the topic with the higher priority. When the processing is completed, the data processing device continues to perform the processing operation of the data under the topic with the next level of priority, and so on.

[0126] Based on the above technical solution, the data processing device of the present application can obtain the data priority of multiple data items, and thus update the topic priority list containing the topics bound to each data item based on the data priority. Afterwards, the data processing device can select target data from the multiple data items according to the topic priority order represented in the topic priority list to perform subsequent data processing operations, thereby achieving data-level priority configuration and further ensuring the transmission latency and reliability of important data.

[0127] The data processing method provided by this application is described below in conjunction with actual scenarios. As shown in FIG7 , the method includes the following steps:

[0128] Step 701: The data processing device determines the data priority of multiple data.

[0129] Exemplarily, the data processing apparatus may determine the data priority of the data based on the IDL data definition of the data.

[0130] Step 702: The data processing device binds multiple data to themes respectively.

[0131] Illustratively, the data processing device may perform a binding operation between data and a subject according to instructions when communication is initialized.

[0132] Step 703: The data processing device determines the topic priority of the topic based on the data priority.

[0133] Exemplarily, the data processing device may prioritize topics based on the data bound to each topic.

[0134] Step 704: The data processing device performs processing operations on low-priority data.

[0135] For ease of description, the low-priority data has a lower priority than the high-priority data in subsequent steps. For the current topic priority list, the low-priority data is the data under the highest priority topic.

[0136] Step 705: The data processing device obtains high-priority data.

[0137] Illustratively, the data processing device obtains high priority data and updates the subject priority list based on the current data.

[0138] Step 706: The data processing device suspends processing of low-priority data.

[0139] Step 707: The data processing device performs processing operations on the high-priority data.

[0140] When there is high-priority data in the data processing device, the data processing device may suspend the processing of the previous low-priority data, give priority to processing the high-priority data, and continue processing the low-priority data after the high-priority data is processed.

[0141] Step 708: The data processing device continues to process low-priority data.

[0142] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. In order to realize the above functions, the data processing device or electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can 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 this application.

[0143] The embodiment of the present application can, according to the above method, exemplarily divide the functional modules of the data processing device or electronic device. For example, the data processing device or electronic device may include various functional modules corresponding to the various functional divisions, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0144] FIG8 is a block diagram of a data processing device according to an exemplary embodiment. Referring to FIG8 , the data processing device 800 includes:

[0145] The processing unit 801 is configured to determine the data priority of target data.

[0146] The processing unit 801 is further configured to store the target data in a level corresponding to the data priority in the target cache space; the target cache space includes multiple levels; and the levels in the target cache space correspond to the data priority of the data.

[0147] The processing unit 801 is also used to perform operations on data at different levels in the target cache space according to the data priority order; wherein, when the operation is a sending operation, the target cache space is a write cache space; when the operation is a read operation, the target cache space is a read cache space.

[0148] According to the above technical means, the processing unit 801 of the present application can determine the data priority of the target data, and thus store the target data in the layer corresponding to the data priority in the target cache space. Afterwards, the processing unit 801 can perform a sending or reading operation on the data of different layers in the target cache space according to the data priority order. In this way, the present application can give priority to sending or reading data with higher data priority, thereby avoiding the problem of delay and loss of important data during network congestion, and ensuring the transmission delay and reliability of important data.

[0149] In a possible embodiment, the above-mentioned processing unit 801 is also used to: determine the quality of service QoS policy corresponding to each level in the target cache space; and perform operations on data of different levels in the target cache space according to the data priority order and the QoS policy corresponding to each level.

[0150] In a possible implementation, the processing unit 801 is further configured to: determine a target level from the target cache space; the data stored in the target level is the data with the highest priority in the current target cache space; and perform operations on the data in the target level.

[0151] In a possible implementation, the device further includes a communication unit 802; the communication unit 802 is used to receive a target message; the target message includes a data priority parameter of the target data; the above-mentioned processing unit 801 is also used to: determine the data priority of the target data based on the target message.

[0152] In a possible embodiment, the above-mentioned processing unit 801 is also used to: obtain data priorities of multiple data, the multiple data including target data; obtain topics to which the multiple data are respectively bound; the topics are used to associate write cache space and read cache space; update the topic priority list based on the data priorities of the multiple data and the topics to which the multiple data are respectively bound; the topic priority list includes multiple topics and the topic priority corresponding to each topic; and determine the target data from the multiple data according to the topic priority order.

[0153] In a possible implementation, the processing unit 801 is further configured to: determine the topic priority of the topic bound to each data based on the data priority of the plurality of data; and update the topic priority list based on the topic priority of each topic.

[0154] In a possible implementation, the processing unit 801 is further used to: determine a target topic from the current topic priority list; the target topic is the topic with the highest priority in the topic priority list; and use data bound to the target topic from multiple data as target data.

[0155] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0156] FIG9 is a block diagram of an electronic device according to an exemplary embodiment. As shown in FIG9 , the electronic device 900 includes but is not limited to: a processor 901 and a memory 902 .

[0157] The memory 902 is used to store executable instructions of the processor 901. It can be understood that the processor 901 is configured to execute instructions to implement the data processing method in the above embodiment.

[0158] It should be noted that those skilled in the art will understand that the electronic device structure shown in FIG9 does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in FIG9 , or a combination of certain components, or a different arrangement of components.

[0159] The processor 901 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 902 and calling data stored in the memory 902, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 901 may include one or more processing units. Optionally, the processor 901 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 901.

[0160] The memory 902 can be used to store software programs and various data. The memory 902 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, application programs required by at least one functional module (such as a determination unit, a processing unit, etc.), etc. In addition, the memory 902 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0161] In an exemplary embodiment, a computer-readable storage medium including instructions is further provided, such as a memory 902 including instructions. The above instructions can be executed by the processor 901 of the electronic device 900 to implement the method in the above embodiment.

[0162] In actual implementation, the functions of the processing unit 801 and the communication unit 802 in Figure 8 can be implemented by the processor 901 in Figure 9 calling the computer program stored in the memory 902. The specific execution process can be referred to the description of the method part in the above embodiment, and will not be repeated here.

[0163] Optionally, the computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0164] In an exemplary embodiment, the present application also provides a computer program product including one or more instructions, which can be executed by the processor 901 of the electronic device to implement the method in the above embodiment.

[0165] It should be noted that when the instructions in the above-mentioned computer-readable storage medium or one or more instructions in the computer program product are executed by the processor of the electronic device, the various processes of the above-mentioned method embodiment are implemented and the same technical effect as the above-mentioned method can be achieved. To avoid repetition, they will not be repeated here.

[0166] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete the full classification or partial functions described above.

[0167] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0168] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0169] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0170] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the full classification part or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute the full classification part or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks or optical disks.

[0171] The above are only specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A data processing method, characterized in that: include: Determine data priority for target data; storing the target data in a level corresponding to the data priority in the target cache space; The target cache space includes multiple levels; the levels in the target cache space correspond to the data priority of the data; Operations are performed on data at different levels in the target cache space according to data priority order; wherein, when the operation is a sending operation, the target cache space is a write cache space; when the operation is a read operation, the target cache space is a read cache space.

2. The method according to claim 1, characterized in that The method further comprises: Determine a quality of service (QoS) policy corresponding to each level in the target cache space; The performing operations on data at different levels in the target cache space according to the data priority order includes: Operations are performed on data of different levels in the target cache space according to the data priority order and the QoS policy corresponding to each level.

3. The method according to claim 1, characterized in that The performing operations on data at different levels in the target cache space according to the data priority order includes: Determining a target level from the target cache space; the data stored in the target level is the data with the highest data priority in the current target cache space; An operation is performed on the data in the target hierarchy.

4. The method according to any one of claims 1 to 3, characterized in that Determining the data priority of the target data includes: receiving a target message; the target message including a data priority parameter of the target data; A data priority of the target data is determined based on the target message.

5. The method according to any one of claims 1 to 4, characterized in that Determining the data priority of the target data includes: obtaining data priorities of a plurality of data, the plurality of data including the target data; After determining the data priority of the target data, the method further includes: Obtaining topics bound to the plurality of data respectively; the topics are used to associate write cache space and read cache space; updating a topic priority list based on the data priorities of the plurality of data and the topics bound to the plurality of data respectively; the topic priority list including a plurality of topics and a topic priority corresponding to each topic; The target data is determined from among the plurality of data according to a subject priority order.

6. The method according to claim 5, characterized in that The updating of the topic priority list based on the data priorities of the plurality of data and the topics bound to the plurality of data respectively includes: Determining the subject priority of the subject bound to each data based on the data priorities of the plurality of data; The topic priority list is updated based on the topic priority of each topic.

7. The method according to claim 5 or 6, characterized in that The determining the target data from the plurality of data according to the subject priority order comprises: Determine a target topic from the current topic priority list; the target topic is the topic with the highest topic priority in the topic priority list; The data bound to the target subject among the plurality of data is used as the target data.

8. A data processing device, characterized in that: including a processing unit; The processing unit is used to determine the data priority of the target data; The processing unit is further configured to store the target data in a level corresponding to the data priority in a target cache space; the target cache space includes a plurality of levels; and the levels in the target cache space correspond to the data priority of the data; The processing unit is also used to perform operations on data of different levels in the target cache space according to the data priority order; wherein, when the operation is a sending operation, the target cache space is a write cache space; when the operation is a read operation, the target cache space is a read cache space.

9. An electronic device, characterized in that: include: A processor and a communication interface; the communication interface is coupled to the processor, and the processor is used to run a computer program or instruction to implement the data processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions. When a computer executes the instructions, the computer executes the data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data transmission method and system capable of fusing router in mobile internet of things

    CN103095605A

  • Data processing method and device

    CN104199790A

  • Data storage method and device, medium and computer equipment

    CN116401280A

  • Data processing method and device, electronic equipment and storage medium

    CN118264716A

  • ACHIEVING GUARANTEED APPLICATION PERFORMANCE USING TRANSACTIONAL I / O SCHEDULING FOR SSD STORAGE BY INTERLEAVING AND SPLITTING READ / WRITE I / Os WITH REQUIRED LATENCY CONFIGURATIONS

    US20210133041A1

Cited By

  • Signal acquisition method and device, storage medium and electronic equipment

    CN121509455A