Data transmission method and device, vehicle-mounted terminal, vehicle and storage medium

By implementing the message distribution component in the kernel, the problem of low multi-end data interaction efficiency of multi-core heterogeneous SOCs is solved, and the efficient data transmission of target data between the multi-core heterogeneous SOC chip and external devices is achieved.

CN119854737APending Publication Date: 2025-04-18BYD CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411133424.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The existing single-system or virtual multi-system data transmission methods based on static data distribution cannot efficiently meet the multi-terminal data interaction requirements of multi-core heterogeneous SOCs, resulting in low data transmission efficiency.

Method used

By implementing the message distribution component in the kernel, receiving the target data and obtaining the preset correspondence between the data identification and the object identification, determining the processing object of the target data, and transmitting the data to the corresponding processing object.

Benefits of technology

The efficient multi-terminal data transmission interaction between the target chip's core and between the target chip and external devices is achieved, effectively improving the data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854737A_ABST
    Figure CN119854737A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data transmission method and device, a vehicle-mounted terminal, a vehicle and a storage medium. Receiving target data through the message distribution component, wherein the target data carries a target data identifier; a preset corresponding relation between the data identification and an object identification is obtained, and in the preset corresponding relation, the object identification is used for indicating a data processing object for receiving data corresponding to the data identification; the data processing object comprises at least one of an application program running based on the first core, a second core of the target chip and external equipment connected with the target chip; determining a target object identifier corresponding to the target data identifier based on a preset corresponding relationship; and transmitting the target data to a target data processing object corresponding to the target object identifier. In this way, efficient multi-terminal data transmission interaction of the target data between the cores of the target chip and between the target chip and the external device is achieved, and the data transmission efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data transmission method, device, vehicle-mounted terminal, vehicle and storage medium. Background Art

[0002] With the development of computer technology, multi-core heterogeneous systems are being used more and more widely. For example, multi-core heterogeneous SOC (system on chip) chips can be used in vehicle terminals. The multi-core heterogeneous SOC system can include cores with different structures such as low-power M cores and high-computing performance A cores. Correspondingly, the data interaction requirements within the multi-core heterogeneous SOC are becoming more and more complex. Not only does it need to transfer data between multiple heterogeneous cores within the SOC, but it also needs to transfer data with external devices such as external microcontroller units (MCUs) through buses such as serial peripheral interfaces (SPI) or Ethernet.

[0003] The existing single-system or virtual multi-system data transmission method based on static data distribution cannot efficiently meet the multi-terminal data interaction requirements of multi-core heterogeneous SOCs, resulting in low data transmission efficiency. Summary of the invention

[0004] The embodiments of the present application provide a data transmission method, device, vehicle-mounted terminal, vehicle and storage medium, which can realize efficient multi-terminal data transmission interaction of target data between cores of a target chip and between a target chip and an external device, thereby effectively improving data transmission efficiency.

[0005] In order to achieve the above object, according to a first aspect of the present application, a data transmission method is provided, which is applied to a message distribution component in a kernel, and the kernel is implemented based on a first core of a target chip, and the method includes:

[0006] Receiving target data through the message distribution component, the target data carrying a target data identifier;

[0007] Acquire a preset correspondence relationship between a data identifier and an object identifier, wherein in the preset correspondence relationship, the object identifier is used to indicate a data processing object that receives data corresponding to the data identifier, and the data processing object includes at least one of an application running based on the first core, a second core of the target chip, and an external device connected to the target chip;

[0008] Based on the preset corresponding relationship, determining a target object identifier corresponding to the target data identifier;

[0009] The target data is transmitted to the target data processing object corresponding to the target object identifier.

[0010] In some embodiments, the first core is structurally different from the second core.

[0011] In some embodiments, the transmitting the target data to the target data processing object corresponding to the target object identifier includes: allocating a target thread to the target data distribution task in the thread pool of the target chip; and transmitting the target data to the target data processing object corresponding to the target object identifier through the target thread.

[0012] In some embodiments, there are multiple first cores in the target chip, and the thread pool is established in the kernel, including a thread corresponding to at least one first core. In the thread pool of the target chip, a target thread is allocated for the target data distribution task, including: obtaining the processing resource occupancy rate of the at least one first core; based on the processing resource occupancy rate, determining the target first core for processing the target data distribution task; obtaining the thread corresponding to the target first core in the thread pool of the target chip as the target thread corresponding to the target data distribution task.

[0013] In some embodiments, transmitting the target data to the target data processing object corresponding to the target object identifier through the target thread includes: writing the target data into the memory corresponding to the target data processing object through the target thread, so that the target data processing object can read the target data.

[0014] In some embodiments, the data processing object includes a second core, and writing the target data into the memory corresponding to the target data processing object through the target thread so that the target data processing object can read the target data includes: writing the target data into the inter-core shared memory in the target chip through the target thread so that the second core reads the target data in the inter-core shared memory.

[0015] In some embodiments, the data processing object includes an application, and writing the target data into a memory corresponding to the target data processing object through the target thread so that the target data processing object can read the target data includes: writing the target data into a first memory corresponding to the application through the target thread, triggering the process of the application to call a corresponding data reading function to obtain the target data.

[0016] In some embodiments, the data processing object includes an external device connected to the target chip via a bus, and the target data is written into a memory corresponding to the target data processing object through the target thread so that the target data processing object can read the target data, including: calling an external bus driver in the target chip through the target thread, and writing the target data into a second memory corresponding to the external device, so that the bus corresponding to the external device transfers the target data to the external device.

[0017] In some embodiments, before receiving the target data through the message distribution component, it also includes: receiving a data access request from at least one data processing object, the data access request carrying the data identifier registered by the data processing object; obtaining the object identifier corresponding to the data processing object; based on the object identifier and the data identifier, generating a data routing table to obtain a preset correspondence between the data identifier and the object identifier.

[0018] In some embodiments, if the data processing object includes an application, after receiving a data access request from at least one data processing object, the step further includes: allocating a first memory for storing data to the data processing object.

[0019] According to a second aspect of the present application, there is provided a data transmission device, configured with a message distribution component in a kernel, the kernel being implemented based on a first core of a target chip, the device comprising:

[0020] A data acquisition module, used for receiving target data through the message distribution component, wherein the target data carries a target data identifier;

[0021] an information acquisition module, used to acquire a preset correspondence between a data identifier and an object identifier, wherein in the preset correspondence, the object identifier is used to indicate a data processing object that receives data corresponding to the data identifier, and the data processing object includes at least one of an application running based on the first core, a second core of the target chip, and an external device connected to the target chip;

[0022] An object determination module, configured to determine a target object identifier corresponding to the target data identifier based on the preset corresponding relationship;

[0023] The data transmission module is used to transmit the target data to the target data processing object corresponding to the target object identifier.

[0024] According to a third aspect of the present application, a vehicle-mounted terminal is provided, comprising a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to implement the data transmission method provided in an embodiment of the present application.

[0025] According to a fourth aspect of the present application, a vehicle is provided, comprising the vehicle-mounted terminal provided by the third aspect of the present application.

[0026] According to a fifth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for loading by a processor to execute the steps in any one of the data transmission methods provided in the embodiments of the present application.

[0027] According to the sixth aspect of the present application, a computer program product is provided, which includes a computer program, and the computer program is stored in a computer-readable storage medium; when the processor of a vehicle-mounted terminal reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the vehicle-mounted terminal executes the steps in the data transmission method provided in an embodiment of the present application.

[0028] In the data transmission method, device, vehicle terminal, vehicle and storage medium of the embodiment of the present application, a message distribution component in the kernel is configured, the kernel is implemented based on the first core of the target chip, the target data is received through the message distribution component, and the target data carries the target data identifier; the preset correspondence between the data identifier and the object identifier is obtained, wherein in the preset correspondence, the object identifier is used to indicate the data processing object corresponding to the data received by the data identifier, and the data processing object includes at least one of the application running based on the first core, the second core of the target chip and the external device connected to the target chip; based on the preset correspondence, the target object identifier corresponding to the target data identifier is determined; the target data is transmitted to the target data processing object corresponding to the target object identifier. In this way, the target data to be transmitted is received through the message distribution component, and then, without caring about the sender of the target data, the target data processing object corresponding to the target data is determined according to the preset correspondence, so that the target data can be transmitted to the target data processing object, so as to realize the efficient multi-terminal data transmission interaction of the target data between the cores of the target chip and between the target chip and the external device, and effectively improve the data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0030] Figure 1 This is a schematic diagram of an implementation scenario of a data transmission method provided in an embodiment of the present application;

[0031] Figure 2 It is a flowchart of a data transmission method provided by an embodiment of the present application;

[0032] Figure 3 It is a schematic diagram of the overall architecture of a data transmission method provided in an embodiment of the present application;

[0033] Figure 4 It is a specific flow chart of a data transmission method provided in an embodiment of the present application;

[0034] Figure 5 is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;

[0035] Figure 6 It is a structural diagram of the vehicle-mounted terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0037] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0038] The embodiment of the present application provides a data transmission method, device, vehicle-mounted terminal, vehicle and storage medium. The data transmission device can be integrated in an electronic device, which can be a server or a terminal.

[0039] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. Terminals may include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. Terminals and servers can be directly or indirectly connected via wired or wireless communications, and this application does not limit this.

[0040] Among them, the vehicle-mounted terminal can be integrated in a vehicle, and the vehicle can be a fuel vehicle, a plug-in hybrid vehicle or a new energy vehicle, etc. This application does not make specific limitations on this.

[0041] See also Figure 1 , taking the data transmission device integrated into the vehicle terminal as an example, Figure 1 A schematic diagram of an implementation scenario of the data transmission method provided in an embodiment of the present application, wherein the vehicle-mounted terminal can be integrated on a vehicle, the vehicle-mounted terminal can be configured with a message distribution component in a kernel, the kernel is implemented based on a first core of a target chip, and target data can be received through the message distribution component, the target data carries a target data identifier; a preset correspondence between a data identifier and an object identifier is obtained, wherein in the preset correspondence, the object identifier is used to indicate a data processing object for receiving data corresponding to the data identifier, the data processing object includes an application running based on the first core, a second core of the target chip, and at least one of an external device connected to the target chip; based on the preset correspondence, a target object identifier corresponding to the target data identifier is determined; and the target data is transmitted to the target data processing object corresponding to the target object identifier.

[0042] It should be noted that Figure 1 The implementation environment scenario diagram of the data transmission method shown is only an example. The implementation environment scenario of the data transmission method described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application. It is known to those skilled in the art that with the evolution of data processing and the emergence of new business scenarios, the technical solution provided by the present application is also applicable to similar technical problems.

[0043] The solutions provided by the embodiments of the present application are specifically described by the following embodiments. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0044] This embodiment will be described from the perspective of a data transmission device, which may be specifically integrated in a vehicle-mounted terminal.

[0045] See also Figure 2 , Figure 2 : is a flow chart of a data transmission method provided in an embodiment of the present application. The data transmission method is applied to a message distribution component in a kernel, and the kernel is implemented based on a first core of a target chip, including:

[0046] Step S101, receiving target data through a message distribution component.

[0047] Among them, the target chip can be a system-on-chip, which can also be called a system on chip (System on Chip, SOC for short), and SOC (System-on-a-Chip) can be an integrated circuit that can integrate a processor, a memory, and an on-chip logic. The first core can be a processor core in the target chip for providing computing power, and can be a core with high-performance computing capabilities in the target chip. The target chip can also include a second core, and the second core can be a core in the target chip with a different structure from the first core, a low-power core in the target chip, or a core with real-time processing capabilities in the target chip. For example, the first core can be a processor core belonging to the A core type, and the A core (ACORE) can be a homogeneous multi-core architecture, on which an operating system (such as a Linux operating system) can be run, and the second core can be a processor core belonging to the M core (M CORE) type, and can also be a processor core belonging to the R core type, wherein the A core type core can be a processor core mainly for operating systems and user applications based on virtual memory, the M core type core can be a processor core for microcontrollers, and the R core type core can be an embedded real-time processor core, and messages can be transmitted between the M core and the A core by register interrupts. The kernel may be an operating system kernel, for example, a Linux kernel, which may be implemented based on the first core of the target chip, for example, may run in the A core architecture, with computing resources provided by the first core. In an operating system, virtual memory is usually divided into two blocks, user space and kernel space. Applications run in user space, and the kernel runs in kernel space. For example, the Linux operating system divides itself into two parts, one for the core software (i.e., kernel), also called kernel space, and the other for ordinary applications, which is called user space.

[0048] The message distribution component can be a component for distributing target data, which can be used to manage data transmission tasks associated with the target chip, and control data to perform multi-terminal data interaction between the cores of the target chip and between the target chip and external devices. For example, the message distribution program can be implemented by a computer program, which can be a program running in the kernel, and the external device can be an external MCU, ECU, etc. connected to the target chip through a bus such as a serial peripheral interface (SPI), a serial communication bus (I2C), or Ethernet. The target data can be data to be transmitted, and can be data to be transmitted through the kernel. The target data may carry a target data identifier, which may be a data identifier (message ID) of the target data. The data identifier may be used to indicate an identifier of the data. The specific form of the data identifier may be set according to actual needs. For example, the data identifier of the data of the front seat belt indicator light may be 0x0550027. When the target data carries the data identifier 0x0550027, it may indicate that the target data is related data of the front seat belt indicator light. The target data may also include specific data content. For example, it may include data with a valid length of one byte (bit), wherein 0 may represent off and 1 may represent on. Optionally, a possible transmission path for the data of the front seat belt indicator light may be that the instrument of the front seat belt indicator light sends a corresponding controller area network (CAN) message. Then, the microcontroller unit (MCU) may obtain the data of the front seat belt indicator light from the CAN bus and transmit the data to the target chip through the serial peripheral interface bus (SPI). For another example, the data identifier of the remote control window data may be 0x12F0020, and its corresponding data content may include multiple types, for example, it may include 0x0 (which can be used to control the remote control window to be in an invalid state), 0x1 (which can be used to control the remote control window to be in an open state), 0x2 (which can be used to control the remote control window to be in a closed state) and 0x3 (which can be used to control the remote control window to be in a reserved state). Correspondingly, the target chip can also send the relevant data of the remote control window to the CAN bus through a similar transmission path, thereby completing the control of the switch state of the window, etc.

[0049] Optionally, the first core and the second core may be processor cores in an ARM (a processor architecture based on a reduced instruction set) core architecture. For example, the first core may be an A core (Cortex-A core) type core in the ARM architecture. The Cortex-A core is an application processor core in the ARM architecture, which is typically used for high-performance computing and the execution of general-purpose operating systems. The second core may be a microcontroller processor core (Cortex-M core) in the ARM architecture.

[0050] Optionally, the structures of the first core and the second core may be different.

[0051] In one embodiment, the target chip may include at least one first core and at least one second core. For example, please refer to Figure 3 , Figure 3 It is a schematic diagram of the overall architecture of a data transmission method provided by an embodiment of the present application, wherein the multi-core heterogeneous target chip SOC may include two domains, ACORE for providing computing power and M CORE for providing functional safety, specifically, it may include multiple first cores, namely CORE 1, CORE 2, ..., CORE N in ACORE, and multiple second cores, namely MCORE 1, M CORE 2, ..., M CORE N, A CORE may be a homogeneous multi-core architecture, in which the Linux kernel and the application program in the user space, namely application 1, application 2, ..., application N, are run. A message distribution program (i.e., message distribution component) is run in the Linux kernel. The target chip can be connected to at least one external device based on a CAN bus controller (CAN BUS), namely MCU / ECU 1, MCU / ECU 2, ..., MCU / ECU N, wherein ECU may refer to an electronic control unit, which is a device for controlling and managing various electronic systems of a car, and the external device may be connected to the target chip via a bus such as a serial peripheral interface (SPI), a serial communication bus (I2C) or Ethernet. In addition, an external bus driver is also provided in the kernel, which is used to realize the interaction between external devices connected to each bus and the message distribution component. The message interaction between external devices and each application can be transferred to the message distribution component, and multi-terminal data interaction can be unified through the message distribution component.

[0052] Step S102, obtaining a preset correspondence between a data identifier and an object identifier.

[0053] Among them, in the preset corresponding relationship, the object identifier is used to indicate the data processing object of the data corresponding to the received data identifier, and the data processing object includes at least one of an application running based on the first core, the second core of the target chip, and an external device connected to the target chip.

[0054] Among them, the preset correspondence relationship can be a correspondence relationship between a data identifier and an object identifier, and the object identifier can be an identifier indicating a data processing object, for example, it can be an identifier such as the process number of the application process, the name of the second core, and the name of the external device, to indicate the corresponding data processing object. The specific object identifier can be set according to actual conditions, and the embodiments of the present application are not limited here. The data processing object can be an object that processes data, or an object that needs to receive target data. The data processing object can send data or receive data, and can include at least one of an application running in user space, a second core of the target chip, and an external device connected to the target chip.

[0055] Optionally, in order to allow the message distribution component to know the recipient corresponding to the target data, the correspondence between the data and the data processing object can be pre-built. For example, before receiving the target data through the message distribution component, a data access request from at least one data processing object can be received, and the data access request carries the data identifier registered by the data processing object; the object identifier corresponding to the data processing object is obtained; based on the object identifier and the data identifier, a data routing table is generated to obtain a preset correspondence between the data identifier and the object identifier.

[0056] The data access request may be a request to access the data processing object to the message distribution management mechanism of the message distribution component. Based on the data access request, the message distribution component may obtain the data that the data processing object needs to receive, so that the data may be transmitted to the data processing object when the data that the data processing object needs to receive is received. The data routing table may be a table that records the correspondence between data identifiers and object identifiers.

[0057] For details, please continue to refer to Figure 3 The message distribution component located in the LINUX kernel can initialize various external bus and other resources, and wait for data processing objects such as external devices such as ECU / MCU, the second core M CORE and various applications in the user space to register the data identifier of the data they need to receive. After the data processing object registers the data identifier of the data it needs to receive with the message distribution component, the message distribution component can obtain the data that the data processing object needs to receive, and can transmit the data to the data processing object when receiving the data that the data processing object needs to receive.

[0058] In this way, the embodiment of the present application can realize the function of dynamically modifying the data routing table by adopting a method in which the data receiver dynamically registers the data identifier of the data it needs to receive, thereby flexibly controlling the data distribution path according to actual conditions and improving data transmission efficiency.

[0059] Optionally, if the data processing object is an application program, a first memory for storing data may be allocated to the data processing object.

[0060] Specifically, the message dispatching component can apply for a physical memory (buffer) for sending and receiving data for the data processing object, so that a first memory for storing data can be allocated to the data processing object, so that the data required to be received by the application can be transmitted to the application through the first memory.

[0061] Optionally, after applying for memory for sending and receiving data for the data processing object, a corresponding data structure can be stored for buffering data. In addition, a circular buffer or a first-in-first-out queue (FIFO) can be used for data buffering.

[0062] Step S103: determining a target object identifier corresponding to the target data identifier based on a preset corresponding relationship.

[0063] The target object identifier may be an object identifier corresponding to the target data identifier.

[0064] Among them, based on the preset corresponding relationship, there can be multiple ways to determine the target object identifier corresponding to the target data identifier. For example, when the preset corresponding relationship is a data routing table, the object identifier corresponding to the target data identifier can be searched in the data routing table to obtain the target object identifier.

[0065] Step S104: transmitting the target data to the target data processing object corresponding to the target object identifier.

[0066] The target data processing object may be a data processing object that needs to receive target data.

[0067] Among them, there can be multiple ways to transfer the target data to the target data processing object corresponding to the target object identifier. For example, a target thread can be assigned to the target data distribution task in the thread pool of the target chip; and the target data can be transferred to the target data processing object corresponding to the target object identifier through the target thread.

[0068] The thread pool may be a thread pool established based on the first core, and the thread pool may include multiple threads, for example, at least one thread may be suggested for each first core. The target thread may be a thread responsible for a target data distribution task, and the distribution task may be a task of distributing the target data to a corresponding target data processing object.

[0069] Among them, in the thread pool of the target chip, there can be multiple ways to allocate target threads for the target data distribution task. For example, the number of first cores in the target chip can be multiple, and the thread pool can be established in the kernel, including at least one thread corresponding to the first core. The processing resource occupancy rate of the at least one first core can be obtained, and the target first core for processing the target data distribution task is determined based on the processing resource occupancy rate, and the thread corresponding to the target first core is obtained in the thread pool of the target chip as the target thread corresponding to the target data distribution task.

[0070] The processing resource occupancy rate may be the occupancy rate of the processing resources provided by the first core, for example, the CPU (central processing unit) occupancy rate of the first core, or the memory occupancy rate, etc. The target first core may be the first core for processing the distribution task of the target data.

[0071] There are multiple ways to determine the target first core for processing target data distribution tasks based on processing resource occupancy. For example, the first core with the highest processing resource occupancy can be determined as the target first core for processing target data distribution tasks.

[0072] Therefore, compared with the prior art that directly distributes data on the bus driver and the application on it, which causes the occupancy rate of a single core to be too high, the embodiment of the present application establishes threads in the kernel and dynamically adjusts the running core according to the CPU occupancy of each first core, thereby achieving load balancing function and improving data transmission efficiency.

[0073] In the thread pool of the target chip, after the target thread is assigned to the target data distribution task, the target data can be transmitted to the target data processing object corresponding to the target object identifier through the target thread. There are many ways to transmit the target data to the target data processing object corresponding to the target object identifier through the target thread, for example, writing the target data into the memory corresponding to the target data processing object through the target thread, so that the target data processing object can read the target data.

[0074] A corresponding memory may be allocated to each data processing object for storing the data to be received. The memory corresponding to different data processing objects may be configured in different ways.

[0075] Optionally, there may be multiple ways to write the target data into the memory corresponding to the target data processing object through the target thread so that the target data processing object can read the target data. For example, when the data processing object includes a second core, the target data can be written into the inter-core shared memory in the target chip through the target thread so that the second core can read the target data in the inter-core shared memory.

[0076] The inter-core shared memory may be a memory that can be shared by the first core and the second core, and may be a running memory of an operating system. The first core and the second core may both run at different address locations on the same memory, and this location may be allocated in advance, and they do not interfere with each other during operation. In addition, an area that can be accessed by both the first core and the second core for reading and writing may be divided out as the inter-core shared memory of the first core and the second core, and data transmission between the first core and the second core may be completed by writing by one party and reading by the other party.

[0077] Optionally, there may be multiple ways to write the target data into the memory corresponding to the target data processing object through the target thread so that the target data processing object can read the target data. For example, when the data processing object includes an application, the target data can be written into the first memory corresponding to the application through the target thread, triggering the application process to call the corresponding data reading function to obtain the target data.

[0078] The first memory may be memory allocated for the application. The data reading function may be a function for reading target data, which may be used to read target data stored in the first memory so that the application can obtain the target data. The specific function may be set according to actual needs.

[0079] Optionally, there may be multiple ways to write the target data into the memory corresponding to the target data processing object through the target thread so that the target data processing object can read the target data. For example, when the data processing object is an external device connected to the target chip through a bus, the target thread can call the external bus driver in the target chip to write the target data into the second memory corresponding to the external device, so that the bus corresponding to the external device transfers the target data to the external device.

[0080] The second memory may be a memory allocated for the external device, and is used to store data that the external device needs to receive. The second memory may be a memory designated in advance for the external device.

[0081] In one embodiment, please refer to Figure 4 , Figure 4It is a specific flow chart of a data transmission method provided by an embodiment of the present application. In step S1, the message distribution component can wait for the data recipient (i.e., the data processing object) to register the data identifier (message ID) of the data it needs to receive. After receiving the data access request triggered by the data recipient, that is, receiving the registered data identifier sent by the data recipient, in step S2, memory for sending and receiving data can be applied for the data recipient of the application type. For the second core and the external device type data recipient, the memory preset by the system can be allocated. Then, in step S3, it can be determined whether each data source has data written, and the message distribution component can start to receive data written from each data processing object, so that after a frame of data arrives at the message distribution component, in step S4, the message distribution component selects a thread to run the message distribution work from the internal thread pool according to the CPU load of each first core in A CORE, and the message distribution thread can judge the validity and integrity of the received data. Then, in step S5, when valid data is received, in step S6, the message distribution thread can copy the received registration information through step S2 to the buffer corresponding to the corresponding data processing object, so that in step S7, the data transmission of the data stored in the buffer is completed through the message distribution component.

[0082] At present, in-vehicle applications are becoming increasingly complex, multi-core heterogeneous SOCs are emerging, and data interaction requirements are becoming more and more complex. In a multi-core heterogeneous SOC chip, it is necessary not only to transfer data between multiple heterogeneous cores inside the SOC, but also to transfer data between external buses and external devices. However, the existing data transmission method often uses a service in the user space to distribute data between different buses and processes, and requires three system calls to complete a data transmission. It is impossible to efficiently meet the data interaction between heterogeneous multi-cores and multi-buses, resulting in poor data transmission efficiency. To this end, the embodiment of the present application provides a data transmission method, which places a data distribution center in the kernel, receives the target data to be transmitted through a message distribution component, and determines the target data processing object corresponding to the target data according to a preset corresponding relationship, so that there is no need to care about the sender of the target data. According to the data identifier, a system call is used to complete the data distribution of the target data to the target data processing object, and the target data is transmitted between the cores of the target chip and between the target chip and the external device. Efficient multi-terminal data transmission interaction is realized, and the data transmission efficiency of the multi-core heterogeneous SOC is further improved.

[0083] As can be seen from the above, the embodiment of the present application receives the target data through the message distribution component, and the target data carries the target data identifier; obtains the preset correspondence between the data identifier and the object identifier, wherein, in the preset correspondence, the object identifier is used to indicate the data processing object of the data corresponding to the received data identifier, and the data processing object includes at least one of the application running on the first core, the second core of the target chip, and the external device connected to the target chip; based on the preset correspondence, determines the target object identifier corresponding to the target data identifier; and transmits the target data to the target data processing object corresponding to the target object identifier. In this way, the target data to be transmitted is received through the message distribution component, and then, without caring about the sender of the target data, the target data processing object corresponding to the target data is determined according to the preset correspondence, so that the target data can be transmitted to the target data processing object, realizing efficient multi-terminal data transmission interaction of the target data between the cores of the target chip and between the target chip and the external device, and effectively improving the data transmission efficiency.

[0084] In order to better implement the data transmission method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above data transmission method. The meanings of the terms are the same as those in the above data transmission method, and the specific implementation details can refer to the description in the method embodiment.

[0085] For example, Figure 5 As shown, it is a schematic diagram of the structure of the data transmission device provided in the embodiment of the present application. The data transmission device may include a data acquisition module 201, an information acquisition module 202, an object determination module 203 and a data transmission module 204, which are specifically as follows:

[0086] A data acquisition module 201 is used to receive target data through the message distribution component, wherein the target data carries a target data identifier;

[0087] An information acquisition module 202 is used to acquire a preset correspondence relationship between a data identifier and an object identifier, wherein in the preset correspondence relationship, the object identifier is used to indicate a data processing object that receives the data corresponding to the data identifier, and the data processing object includes at least one of an application running based on the first core, a second core of the target chip, and an external device connected to the target chip;

[0088] An object determination module 203, configured to determine a target object identifier corresponding to the target data identifier based on the preset corresponding relationship;

[0089] The data transmission module 204 is used to transmit the target data to the target data processing object corresponding to the target object identifier.

[0090] In one embodiment, the first core and the second core have different structures.

[0091] In one embodiment, the data transmission module 204 includes:

[0092] A thread allocation submodule, used for allocating a target thread for the target data distribution task in the thread pool of the target chip;

[0093] The data transmission submodule is used to transmit the target data to the target data processing object corresponding to the target object identifier through the target thread.

[0094] In one embodiment, the number of first cores in the target chip is multiple, the thread pool is established in the kernel, and includes at least one thread corresponding to the first core, and the thread allocation submodule is used to:

[0095] Obtaining a processing resource occupancy rate of the at least one first core;

[0096] Based on the processing resource occupancy rate, determining a target first core for processing the distribution task of the target data;

[0097] A thread corresponding to the target first core is obtained from a thread pool of the target chip as a target thread corresponding to the target data distribution task.

[0098] In one embodiment, the data transmission submodule includes:

[0099] The data transmission unit is used to write the target data into the memory corresponding to the target data processing object through the target thread, so that the target data processing object can read the target data.

[0100] In one embodiment, the data processing object includes a second core, a data transmission unit, configured to:

[0101] The target data is written into the inter-core shared memory in the target chip through the target thread, so that the second core reads the target data in the inter-core shared memory.

[0102] In one embodiment, the data processing object includes an application program and a data transmission unit, which is used to:

[0103] The target data is written into the first memory corresponding to the application program through the target thread, and the process of the application program is triggered to call the corresponding data reading function to obtain the target data.

[0104] In one embodiment, the data processing object includes an external device connected to the target chip via a bus, and a data transmission unit is used to:

[0105] The target thread calls the external bus driver in the target chip to write the target data into the second memory corresponding to the external device, so that the bus corresponding to the external device transmits the target data to the external device.

[0106] In one embodiment, the data transmission device further includes a corresponding relationship building module, which is used to:

[0107] receiving a data access request of at least one data processing object, wherein the data access request carries a data identifier registered by the data processing object;

[0108] Obtaining an object identifier corresponding to the data processing object;

[0109] Based on the object identifier and the data identifier, a data routing table is generated to obtain a preset corresponding relationship between the data identifier and the object identifier.

[0110] In one embodiment, if the data processing object includes an application program, the data transmission device further includes:

[0111] A memory allocation module is used to allocate a first memory for storing data to the data processing object.

[0112] As can be seen from the above, the embodiment of the present application is configured with a message distribution component in the kernel, the kernel is implemented based on the first core of the target chip, and the target data is received through the message distribution component through the data acquisition module 201, and the target data carries the target data identifier; the information acquisition module 202 obtains the preset correspondence between the data identifier and the object identifier, wherein, in the preset correspondence, the object identifier is used to indicate the data processing object of the data corresponding to the received data identifier, and the data processing object includes at least one of the application program running based on the first core, the second core of the target chip, and the external device connected to the target chip; the object determination module 203 determines the target object identifier corresponding to the target data identifier based on the preset correspondence; the data transmission module 204 transmits the target data to the target data processing object corresponding to the target object identifier. In this way, the target data to be transmitted is received through the message distribution component, and then, without caring about the sender of the target data, the target data processing object corresponding to the target data is determined according to the preset correspondence, so that the target data can be transmitted to the target data processing object, and the target data can be efficiently transmitted between the cores of the target chip and between the target chip and the external device. The multi-terminal data transmission interaction is realized, and the data transmission efficiency is effectively improved.

[0113] Accordingly, the embodiment of the present application also provides a vehicle-mounted terminal, such as Figure 6 As shown, Figure 6A schematic diagram of the structure of the vehicle-mounted terminal provided in an embodiment of the present application. The vehicle-mounted terminal 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will appreciate that the vehicle-mounted terminal structure shown in the figure does not constitute a limitation on the vehicle-mounted terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.

[0114] The processor 301 is the control center of the vehicle terminal 300, and uses various interfaces and lines to connect various parts of the entire vehicle terminal 300. It executes various functions and processes data of the vehicle terminal 300 by running or loading software programs and / or units stored in the memory 302, and calling data stored in the memory 302. The processor 301 can be a processor CPU, a graphics processor GPU, a network processor (Network Processor, NP), etc., and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application.

[0115] In the embodiment of the present application, the processor 301 in the vehicle terminal 300 will load instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions, such as:

[0116] Receive target data through a message distribution component, the target data carrying a target data identifier; obtain a preset correspondence between the data identifier and the object identifier, wherein, in the preset correspondence, the object identifier is used to indicate a data processing object of the data corresponding to the received data identifier, the data processing object including at least one of an application running based on the first core, a second core of the target chip, and an external device connected to the target chip; determine a target object identifier corresponding to the target data identifier based on the preset correspondence; and transmit the target data to the target data processing object corresponding to the target object identifier.

[0117] Furthermore, various functions implemented by running the application program stored in the memory 302 can also be found in the description of the aforementioned embodiment, which will not be repeated here.

[0118] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0119] Optional, such as Figure 6As shown, the vehicle terminal 300 also includes: a touch screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306 and a power supply 307. Among them, the processor 301 is electrically connected to the touch screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306 and the power supply 307 respectively. Those skilled in the art can understand that Figure 6 The vehicle-mounted terminal structure shown in the figure does not constitute a limitation on the vehicle-mounted terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0120] The touch display screen 303 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 303 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the vehicle terminal, which can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), etc. The touch panel can be used to collect the user's touch operation on or near it (such as the user uses any suitable object or accessory such as a finger, stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute the corresponding program. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 301, and can receive the command sent by the processor 301 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 301 to determine the type of touch event, and then the processor 301 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 303 can also be used as a part of the input unit 306 to realize the input function.

[0121] The RF circuit 304 may be used to send and receive RF signals, so as to establish wireless communication with a network device or other vehicle-mounted terminals through wireless communication, and to send and receive signals with the network device or other vehicle-mounted terminals.

[0122] The audio circuit 305 can be used to provide an audio interface between the user and the vehicle-mounted terminal through a speaker and a microphone. The audio circuit 305 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305 and converted into audio data, and then the audio data is output to the processor 301 for processing, and then sent to another vehicle-mounted terminal through the radio frequency circuit 304, or the audio data is output to the memory 302 for further processing. The audio circuit 305 may also include an earplug jack to provide communication between an external headset and the vehicle-mounted terminal.

[0123] The input unit 306 may be used to receive input target video and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0124] The power supply 307 is used to supply power to various components of the vehicle-mounted terminal 300. Optionally, the power supply 307 can be logically connected to the processor 301 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 307 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0125] although Figure 6 Not shown, the vehicle terminal 300 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0126] In the above embodiments, the description of each embodiment has its own emphasis. For the parts not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. It should be noted that the vehicle-mounted terminal provided in the embodiment of the present application belongs to the same concept as the data transmission method in the above embodiment. The specific implementation process is detailed in the above method embodiment and will not be repeated here.

[0127] As can be seen from the above, the vehicle-mounted terminal provided by the embodiment of the present application can receive target data through a message distribution component, and the target data carries a target data identifier; obtain a preset correspondence between the data identifier and the object identifier, wherein, in the preset correspondence, the object identifier is used to indicate the data processing object of the data corresponding to the received data identifier, and the data processing object includes at least one of an application running on the first core, the second core of the target chip, and an external device connected to the target chip; based on the preset correspondence, determine the target object identifier corresponding to the target data identifier; and transmit the target data to the target data processing object corresponding to the target object identifier. In this way, the target data to be transmitted is received through the message distribution component, and then, without caring about the sender of the target data, the target data processing object corresponding to the target data is determined according to the preset correspondence, so that the target data can be transmitted to the target data processing object, realizing efficient multi-terminal data transmission interaction of the target data between the cores of the target chip and between the target chip and the external device, and effectively improving the data transmission efficiency.

[0128] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0129] To this end, an embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program is run on a vehicle-mounted terminal, the computer program is used to enable the vehicle-mounted terminal to perform any of the data transmission methods provided in the embodiments of the present application. For example, the computer program can perform the following steps of the data transmission method:

[0130] Receive target data through a message distribution component, the target data carrying a target data identifier; obtain a preset correspondence between the data identifier and the object identifier, wherein, in the preset correspondence, the object identifier is used to indicate a data processing object of the data corresponding to the received data identifier, the data processing object including at least one of an application running based on the first core, a second core of the target chip, and an external device connected to the target chip; determine a target object identifier corresponding to the target data identifier based on the preset correspondence; and transmit the target data to the target data processing object corresponding to the target object identifier.

[0131] Furthermore, for the detailed steps of the above method steps, reference can be made to the description in the above embodiments, which will not be repeated here.

[0132] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0133] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0134] Since the computer program stored in the computer-readable storage medium can execute any one of the data transmission methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the data transmission methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0135] According to one aspect of the present application, a computer program product is also provided, including a computer program, which is stored in a computer-readable storage medium; when the processor of a vehicle-mounted terminal reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the vehicle-mounted terminal executes the methods provided in the various optional implementation methods in the above-mentioned embodiments.

[0136] In the above-mentioned data transmission device, computer-readable storage medium, vehicle-mounted terminal, and computer program product embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and beneficial effects of the above-described data transmission device, computer-readable storage medium, computer program product, vehicle-mounted terminal and its corresponding units can refer to the description of the data transmission method in the above embodiment, and will not be repeated here.

[0137] The above is a detailed introduction to a data transmission method, device, vehicle-mounted terminal, vehicle, computer-readable storage medium and computer program product provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data transmission method, characterized in that: A message distribution component applied to a kernel, wherein the kernel is implemented based on a first core of a target chip, and the method comprises: Receiving target data through the message distribution component, the target data carrying a target data identifier; Acquire a preset correspondence relationship between a data identifier and an object identifier, wherein in the preset correspondence relationship, the object identifier is used to indicate a data processing object that receives data corresponding to the data identifier, and the data processing object includes at least one of an application running based on the first core, a second core of the target chip, and an external device connected to the target chip; Based on the preset corresponding relationship, determining a target object identifier corresponding to the target data identifier; The target data is transmitted to the target data processing object corresponding to the target object identifier.

2. The data transmission method according to claim 1, characterized in that: The first core and the second core have different structures.

3. The data transmission method according to claim 1, characterized in that: The transmitting the target data to the target data processing object corresponding to the target object identifier includes: In the thread pool of the target chip, a target thread is allocated for the target data distribution task; The target data is transmitted to the target data processing object corresponding to the target object identifier through the target thread.

4. The data transmission method according to claim 3, characterized in that: The number of first cores in the target chip is multiple, the thread pool is established in the kernel, and includes at least one thread corresponding to the first core, and the target thread is allocated to the target data distribution task in the thread pool of the target chip, including: Obtaining a processing resource occupancy rate of the at least one first core; Based on the processing resource occupancy rate, determining a target first core for processing the distribution task of the target data; A thread corresponding to the target first core is obtained from a thread pool of the target chip as a target thread corresponding to the target data distribution task.

5. The data transmission method according to claim 3, characterized in that: The transmitting the target data to the target data processing object corresponding to the target object identifier through the target thread includes: The target data is written into a memory corresponding to the target data processing object through the target thread, so that the target data processing object can read the target data.

6. The data transmission method according to claim 5, characterized in that: The data processing object includes a second core, and the target data is written into a memory corresponding to the target data processing object through the target thread so that the target data processing object reads the target data, including: The target data is written into the inter-core shared memory in the target chip through the target thread, so that the second core reads the target data in the inter-core shared memory.

7. The data transmission method according to claim 5, characterized in that: The data processing object includes an application program, and the target data is written into a memory corresponding to the target data processing object through the target thread so that the target data processing object reads the target data, including: The target data is written into the first memory corresponding to the application program through the target thread, and the process of the application program is triggered to call the corresponding data reading function to obtain the target data.

8. The data transmission method according to claim 5, characterized in that: The data processing object includes an external device connected to the target chip via a bus, and the target data is written into a memory corresponding to the target data processing object via the target thread so that the target data processing object reads the target data, including: The target thread calls the external bus driver in the target chip to write the target data into the second memory corresponding to the external device, so that the bus corresponding to the external device transmits the target data to the external device.

9. The data transmission method according to any one of claims 1 to 8, characterized in that: Before receiving the target data through the message distribution component, the method further includes: receiving a data access request of at least one data processing object, wherein the data access request carries a data identifier registered by the data processing object; Obtaining an object identifier corresponding to the data processing object; Based on the object identifier and the data identifier, a data routing table is generated to obtain a preset corresponding relationship between the data identifier and the object identifier.

10. The data transmission method according to claim 9, characterized in that: If the data processing object includes an application program, after receiving a data access request from at least one data processing object, the method further includes: A first memory for storing data is allocated to the data processing object.

11. A data transmission device, characterized in that: A message distribution component in a kernel is configured, and the kernel is implemented based on a first core of a target chip, including: A data acquisition module, used for receiving target data through the message distribution component, wherein the target data carries a target data identifier; an information acquisition module, used to acquire a preset correspondence between a data identifier and an object identifier, wherein in the preset correspondence, the object identifier is used to indicate a data processing object that receives data corresponding to the data identifier, and the data processing object includes at least one of an application running based on the first core, a second core of the target chip, and an external device connected to the target chip; An object determination module, configured to determine a target object identifier corresponding to the target data identifier based on the preset corresponding relationship; The data transmission module is used to transmit the target data to the target data processing object corresponding to the target object identifier.

12. A vehicle-mounted terminal, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the methods of claims 1 to 10.

13. A vehicle, characterized in that: The vehicle includes the vehicle-mounted terminal as claimed in claim 12.

14. A computer-readable storage medium, characterized in that: The method comprises a computer program. When the computer program is run on a vehicle-mounted terminal, the computer program is used to enable the vehicle-mounted terminal to execute the steps of any method described in claims 1 to 10.

Citation Information

Cited By

  • Cabin instrument reconstruction method for flight comment

    CN121433801A