CN112492014A - Vehicle-mounted data transmission method and device - Google Patents

Vehicle-mounted data transmission method and device Download PDF

Info

Publication number
CN112492014A
CN112492014A CN202011303658.1A CN202011303658A CN112492014A CN 112492014 A CN112492014 A CN 112492014A CN 202011303658 A CN202011303658 A CN 202011303658A CN 112492014 A CN112492014 A CN 112492014A
Authority
CN
China
Prior art keywords
vehicle
buffer
preset
transmission
mounted data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011303658.1A
Other languages
Chinese (zh)
Other versions
CN112492014B (en
Inventor
王保磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Xiaopeng Motors Technology Co Ltd
Guangzhou Chengxingzhidong Automotive Technology Co., Ltd
Original Assignee
Guangzhou Xiaopeng Motors Technology Co Ltd
Guangzhou Chengxingzhidong Automotive Technology Co., Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Xiaopeng Motors Technology Co Ltd, Guangzhou Chengxingzhidong Automotive Technology Co., Ltd filed Critical Guangzhou Xiaopeng Motors Technology Co Ltd
Priority to CN202011303658.1A priority Critical patent/CN112492014B/en
Publication of CN112492014A publication Critical patent/CN112492014A/en
Application granted granted Critical
Publication of CN112492014B publication Critical patent/CN112492014B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9021Plurality of buffers per packet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Abstract

The embodiment of the invention provides a vehicle-mounted data transmission method and a device, which are applied to a vehicle-mounted system, wherein a Direct Memory Access (DMA) is deployed on the vehicle-mounted system and is used for receiving vehicle-mounted data, and the method comprises the following steps: filling the vehicle-mounted data received by the DMA into a preset first buffer area by a Hardware Abstraction Layer (HAL) process; the replication function replicates the vehicle-mounted data in the filled first buffer area to a preset second transmission buffer area; and the HAL process calls the preset second transmission buffer zone to transmit the vehicle-mounted data to a display buffer zone. The embodiment of the invention adopts double buffer areas for transmission, thereby effectively solving the problems of unstable transmission of vehicle-mounted image data and mutual influence of display and transmission.

Description

Vehicle-mounted data transmission method and device
Technical Field
The invention relates to the technical field of vehicle-mounted vehicles, in particular to a vehicle-mounted data transmission method and a vehicle-mounted data transmission device.
Background
With the development of vehicles, the scenes of the users viewing the vehicle-mounted images are gradually increased, and the requirements on the stability of vehicle-mounted data transmission are gradually increased.
In the prior art, a single-cycle buffer is employed. The materials are used from top to bottom in sequence, and are recycled after being used up. This solution is not problematic for electronic devices, but in vehicle systems, the transmission link is always unstable due to the long transmission line and the jolt and shake during the actual operation. This single cycle system transfer is unstable and the upper layer appears to interact with the lower layer transfer. Because the upper display system is stuck, the operation is slow, and the buffer returned to the kernel is not timely. The bottom layer can have frame loss, overflow and other exceptions because the buffer filling cannot be taken. Vice versa, when the bottom hardware has a problem, the buffer cannot be filled in time, and the upper layer cannot acquire the prepared buffer, so that the problem of state disorder and even crash (downtime) can be caused.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide an in-vehicle data transmission method and a corresponding in-vehicle data transmission apparatus that overcome or at least partially solve the above problems.
In order to solve the above problem, an embodiment of the present invention discloses a vehicle data transmission method, which is applied to a vehicle system, wherein a direct memory access DMA is deployed on the vehicle system, and the DMA is used for receiving vehicle data, and the method includes:
filling the vehicle-mounted data received by the DMA into a preset first buffer area by a Hardware Abstraction Layer (HAL) process;
the replication function replicates the vehicle-mounted data in the filled first buffer area to a preset second transmission buffer area;
and the HAL process calls the preset second transmission buffer zone to transmit the vehicle-mounted data to a display buffer zone.
Optionally, the step of filling the vehicle data received by the DMA into a preset first buffer includes:
determining the preset first buffer area;
and filling the vehicle-mounted data received by the DMA into a preset first buffer area.
Optionally, after the step of copying, by the copy function, the vehicle-mounted data in the filled first buffer to a preset second transmission buffer, the method further includes:
and when the vehicle-mounted data is copied, releasing the preset first buffer area by the HAL management process.
Optionally, the step of invoking, by the HAL process, the preset second transmission buffer to transmit the vehicle-mounted data to a display buffer includes:
the HAL process calls an idle queue in the preset second transmission buffer area;
writing the vehicle-mounted data into the idle queue to obtain a transfer queue;
transmitting the transfer queue to a display buffer;
and releasing the transmission queue to obtain an idle queue.
Optionally, the in-vehicle system is connected with an application program, and the method further includes:
and the application program process transmits the vehicle-mounted data in the display buffer area to an application program, and the application program is used for displaying the vehicle-mounted data.
Optionally, the preset first buffer and the preset second buffer are buffers managed in the HAL process.
Optionally, the preset first buffer area is an image buffer area graphic buffer, and the preset second buffer area is a local window buffer area native window buffer.
The embodiment of the invention also discloses a vehicle-mounted data transmission device, which is applied to a vehicle-mounted system, wherein the vehicle-mounted system is provided with a direct memory access DMA, and the DMA is used for receiving vehicle-mounted data, and the device comprises:
the filling module is used for filling the vehicle-mounted data received by the DMA into a preset first buffer area by the hardware abstraction layer HAL process;
the copying module is used for copying the vehicle-mounted data in the filled first buffer area to a preset second transmission buffer area by the copying function;
and the transmission module is used for calling the preset second transmission buffer zone by the HAL process to transmit the vehicle-mounted data to a display buffer zone.
The embodiment of the invention also discloses a vehicle comprising:
one or more processors; and
one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the vehicle to perform one or more methods as described above.
Embodiments of the invention also disclose one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform one or more of the methods described above.
The embodiment of the invention has the following advantages:
the vehicle-mounted data received by the DMA is filled into a preset first buffer area through a Hardware Abstraction Layer (HAL) process; the replication function replicates the vehicle-mounted data in the filled first buffer area to a preset second transmission buffer area; and the HAL process calls the preset second transmission buffer zone to transmit the vehicle-mounted data to a display buffer zone. According to the embodiment of the invention, the double buffer areas are adopted for transmission, so that the upper layer buffer area and the bottom layer buffer area are respectively recycled, the stability of the transmission process and the stability of the display process are not influenced mutually, and the problems of unstable transmission of vehicle-mounted image data and mutual influence of display and transmission are effectively solved.
Drawings
Fig. 1 is a schematic diagram of an example of a conventional on-board data transmission method;
FIG. 2 is a flow chart illustrating steps of an embodiment of a method for transmitting vehicle data according to the present invention;
FIG. 3 is a schematic diagram of an exemplary in-vehicle data transmission method of the present invention;
fig. 4 is a block diagram of an embodiment of the vehicle-mounted data transmission device according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a schematic diagram illustrating an example of an existing on-board data transmission method is shown; the specific execution flow is as follows:
first, a native window buffer is applied for a buffer for HAL (Hardware Abstraction Layer) process management. After the application is successful, the native window buffer is in a state to be filled; at this time, the map enters kernel space.
Waiting for data of a Direct Memory Access (DMA) of hardware equipment to be filled; the hardware device DMA enables data on the hardware device to be transmitted without passing through the CPU.
Filling data received by a hardware device DMA to the native window buffer, and marking the native window buffer as a buffer done (buffer full load); and notifies the surface (operation layer) of the current buffer done.
After the buffer done is known by the Surface, the APP (Application) acquires data in the buffer done through the Surface to display and consume; after display, the surface marks the buffer that has been consumed as queue (dequeue) to continue the buffer for looping.
Therefore, the existing vehicle-mounted data transmission method carries out transmission through a single buffer, the vehicle-mounted data transmission method is used from top to bottom in sequence, the upper layer is used up and is returned to the bottom layer, and the vehicle-mounted data transmission method is recycled. However, as the transmission line in the vehicle-mounted system is extremely long, and the occurrence of accidental vibration in the actual operation process can cause some unstable conditions to the data transmission link, the transmission process is blocked, so that the transmission of the single circulation system is unstable; and the upper layer display and the bottom layer transmission use the same buffer, when the upper layer display system is stuck, the circulating process can be operated slowly, and the buffer returned to the kernel is not in time. The bottom layer can have the abnormal phenomena of frame loss, overflow and the like because the buffer filling cannot be taken. Vice versa, when the bottom hardware has a problem, the buffer cannot be filled in time, and the upper layer cannot acquire the prepared buffer, so that the problem of state disorder and even crash (downtime) can be caused. When the buffer circulation has problems, the phenomenon that the upper layer display and the bottom layer transmission have mutual influence is caused, and therefore the vehicle-mounted data transmission scheme is provided.
Referring to fig. 2, a flowchart of steps of an embodiment of a vehicle data transmission method according to the present invention is shown, where the method is applied to a vehicle-mounted system, and the vehicle-mounted system is deployed with a direct memory access DMA, and the DMA is used for receiving vehicle-mounted data.
It should be noted that, in the embodiment of the present invention, during initialization, the buffer managed in the HAL process applies for two buffers, that is, applies for a preset first buffer and a preset second transfer buffer, where the preset first buffer is used for a bottom-layer hardware DMA fill data cycle, and the preset second buffer is used for an upper-layer display cycle. The use of the buffer area is necessary to release the buffer area when the buffer area is used up, return the buffer area to the kernel after the buffer area is occupied, and then recycle the buffer area.
DMA is an input/output operation mode that realizes automatic batch data exchange between a high-speed peripheral and a main memory under the control of special hardware (DMA controller) to minimize the intervention of a Central Processing Unit (CPU). Because the CPU does not participate in the transmission operation at all, the operations of fetching instruction, fetching number, sending number and the like of the CPU are omitted. Memory address modification, counting of the number of transferred words, etc., are not implemented in software, but directly in hardware circuitry. Therefore, the DMA mode can meet the requirement of high-speed I/O equipment and is beneficial to the exertion of CPU efficiency. Therefore, the DMA is deployed on the vehicle-mounted system, and a batch of data can be carried from the source address of the hardware equipment to the destination address of the bottom layer of the vehicle-mounted system without intervention of the CPU as long as the source address of the hardware equipment and the destination address of the bottom layer of the vehicle-mounted system are set through software. .
The method may specifically comprise the steps of:
step 201, a hardware abstraction layer HAL process fills vehicle-mounted data received by the DMA into a preset first buffer area;
the applied preset first buffer zone is in a state to be filled when the application is successful, and no vehicle-mounted data is stored in the preset first buffer zone; at this point, the map may enter kernel space; the vehicle-mounted system receives vehicle-mounted data generated by bottom hardware equipment through DMA; the vehicle-mounted data may be vehicle-mounted image data, or the like. The vehicle-mounted image data and the vehicle-mounted image data may be images or image data captured by a vehicle-mounted camera disposed on the vehicle, and at this time, the hardware device corresponds to the vehicle-mounted camera disposed on the vehicle. The vehicle-mounted data received by the vehicle-mounted system through the DMA is vehicle-mounted image data and vehicle-mounted image data sent by the vehicle-mounted camera. And the HAL process fills the vehicle-mounted data received by the DMA into a preset first buffer area in a to-be-filled state.
Optionally, the step of filling the vehicle data received by the DMA into a preset first buffer includes:
step S1, determining the preset first buffer area;
when vehicle-mounted data filling needs to be carried out on a preset first buffer area, determining the preset first buffer area in a state to be filled; because the preset first buffer area is in a state to be filled when the application is successful, the data can be filled; however, if the preset first buffer area is already filled with the vehicle-mounted data, the preset first buffer area is in a full-load state at this time, the data is stored in the preset first buffer area, and the vehicle-mounted data cannot be filled any more, and the preset first buffer area in the state to be filled is determined for subsequent filling of the vehicle-mounted data only when the stored vehicle-mounted data is restored to the state to be filled after being copied by the copy function.
In step S2, the HAL process fills the vehicle data received by the DMA into a preset first buffer.
After determining the preset first buffer area in the state to be filled, the HAL process may fill the vehicle-mounted data received from the hardware device through the DMA into the preset first buffer area in the state to be filled, mark the preset first buffer area as buffered (buffer done) after the filling is completed, where the preset first buffer area is in the state to be used at this time, and the vehicle-mounted data in the preset first buffer area may be read.
Step 202, the replication function replicates the vehicle-mounted data in the filled first buffer area to a preset second transmission buffer area;
when the filling of the preset first buffer area is finished and the buffer is marked as finished, the HAL management process can take out the vehicle-mounted data stored in the preset first buffer area, and the replication function can replicate the vehicle-mounted data taken out by the HAL management process and stored in the preset first buffer area to a preset second transmission buffer area; the preset second transmission buffer area receives the vehicle-mounted data copied by the copy function, namely at the moment, the vehicle-mounted data enters the upper layer from the bottom layer, and the vehicle-mounted data is stored in the preset second transmission buffer area; and because the copying function has copied the vehicle-mounted data to the second transmission buffer area preset in the upper layer, the preset first buffer area does not need to participate in the display transmission cycle process of displaying the vehicle-mounted data in the upper layer. Thereby separating the process of bottom layer data filling transmission from the display transmission process of the upper layer. The copy function may be a memcpy (memory copy function) function, that is, the vehicle-mounted data stored in the filled first buffer may be copied to the preset second transmission buffer in the memcpy function.
Optionally, after the step of copying, by the copy function, the vehicle-mounted data in the filled first buffer to a preset second transmission buffer, the method further includes:
step S3, when the vehicle-mounted data is copied, the HAL management process releases the preset first buffer.
And when the HAL management process takes out the cached first buffer area and the replication function completes the replication operation of the vehicle-mounted data stored in the filled first buffer area, the HAL management process releases the filled preset first buffer area, marks the preset first buffer area as the preset first buffer area in a state to be filled, returns the preset first buffer area to the kernel space, and continues to perform filling circulation.
Step 203, the HAL process calls the preset second transmission buffer to transmit the vehicle-mounted data to a display buffer.
When the vehicle-mounted data are copied to the upper layer for display circulation, the HAL process calls a preset second transmission buffer area to store the vehicle-mounted data and transmit the vehicle-mounted data to the display buffer area, so that the vehicle-mounted data can be obtained by the application program process through the display buffer area, and the vehicle-mounted data can be displayed by the application program.
Optionally, the step of invoking, by the HAL process, the preset second transmission buffer to transmit the vehicle-mounted data to a display buffer includes:
step S4, the HAL process calls an idle queue in the preset second transmission buffer;
and calling a second buffer area to perform display transfer circulation of the vehicle-mounted data by the HAL process, and calling an idle queue in a preset second transmission buffer area to perform the display transfer circulation.
Step S5, writing the vehicle-mounted data into the idle queue to obtain a transfer queue;
after the called idle queue in the preset second transmission buffer area is determined, the vehicle-mounted data copied to the upper layer is written into the idle queue, so that the vehicle-mounted data is stored in the idle queue to obtain a transfer queue, and in order to ensure the integrity of the vehicle-mounted data in the process of transferring the vehicle-mounted data by the transfer queue, the transfer queue can be locked, and other operations are not allowed to modify the operation data in the transfer queue.
Step S6, transmitting the transmission queue to a display buffer area;
and transmitting the transmission queue stored with the vehicle-mounted data to a display buffer area.
And step S7, releasing the transfer queue to obtain a free queue.
When the transmission queue is transmitted into the display buffer area, unlocking and releasing the transmission queue, storing the vehicle-mounted data into the display buffer area, and waiting for the application program process to be extracted to the application program for display; and meanwhile, the release of the transmission queue can continuously obtain an idle queue for the display transmission cycle use of the upper layer.
Optionally, the in-vehicle system is connected with an application program, and the method further includes:
and step S8, the application program process transmits the vehicle-mounted data in the display buffer area to an application program, and the application program is used for displaying the vehicle-mounted data.
And the application program process extracts the vehicle-mounted data in the display buffer area and transmits the vehicle-mounted data to the application program, and the application program receives the vehicle-mounted data and displays the vehicle-mounted data.
Optionally, the preset first buffer and the preset second buffer are buffers managed in the HAL process.
Optionally, the preset first buffer area is an image buffer area graphic buffer, and the preset second buffer area is a local window buffer area native window buffer.
The vehicle-mounted data received by the DMA is filled into a preset first buffer area through a Hardware Abstraction Layer (HAL) process; the replication function replicates the vehicle-mounted data in the filled first buffer area to a preset second transmission buffer area; and the HAL process calls the preset second transmission buffer zone to transmit the vehicle-mounted data to a display buffer zone. According to the embodiment of the invention, the double buffer areas are adopted for transmission, so that the upper layer buffer area and the bottom layer buffer area are respectively recycled, the stability of the transmission process and the stability of the display process are not influenced mutually, and the problems of unstable transmission of vehicle-mounted image data and mutual influence of display and transmission are effectively solved.
For a better understanding of the embodiments of the present invention, a specific embodiment is described; referring to fig. 3, there is shown a schematic diagram of an example of a vehicle-mounted data transmission method of the present invention;
in the embodiment of the invention, two buffer areas are applied in a buffer managed by a HAL process, namely a native window buffer area of a local window and a graphic buffer area of an image buffer area, wherein the image buffer area is used for filling data circulation by a bottom-layer hardware DMA, and the local window buffer area is used for displaying circulation at an upper layer. And the usage process of the native window buffer or the graphic buffer is used up to release the occupation, returned to the filling and recycled.
Firstly, explaining the process of transferring vehicle-mounted data at the bottom layer, the applied graphic buffer is in a to-be-filled state, no vehicle-mounted data is stored in the image cache region at this time, and the map enters a kernel space. And the HAL process fills the vehicle-mounted data received by the DMA of the hardware equipment into a preset first buffer area, marks the filled vehicle-mounted data as buffer done, and at the moment, the first buffer area is in a state to be used. And notifying the buffer done to the HAL management process, wherein the HAL management process takes out the vehicle-mounted data in the done buffer (full load buffer), marks the preset first buffer as the buffer to be filled, and returns the buffer to the kernel filling cycle.
The vehicle-mounted data copying process between the bottom layer and the upper layer is that when the HAL management process is used for fetching the vehicle-mounted data in the done buffer, the vehicle-mounted system can copy all the vehicle-mounted data in the done buffer, which are fetched by the HAL management process, to the native window buffer through a memcpy function; the preset second transmission buffer zone receives the vehicle-mounted data copied by the memcpy function, namely at the moment, the vehicle-mounted data enters the upper layer from the bottom layer, and the native window buffer stores the vehicle-mounted data needing to be displayed; and because the memcpy function copies the vehicle-mounted data from the graphic buffer for data transmission from the bottom layer to the native window buffer of the upper layer, the graphic buffer does not need to continuously participate in the display transmission cycle process of displaying the vehicle-mounted data by the upper layer, but returns the graphic buffer to the kernel for bottom layer transmission of the data. Therefore, the bottom layer data filling transmission process is separated from the upper layer display transmission process, the data filling transmission line is shortened, and the occurrence of abnormal phenomena such as frame loss, overflow and the like caused by unexpected conditions in the actual operation process is reduced.
In the process that the memcpy function copies the vehicle-mounted data, the HAL manages and takes out all the vehicle-mounted data in the done buffer, the memcpy function copies the vehicle-mounted data, the HAL process determines queue information in the native window buffer to determine a queue capable of storing and transmitting the vehicle-mounted data, and the memcpy function stores the copied vehicle-mounted data in the queue in the native window buffer.
And in the process of vehicle-mounted data display transmission circulation, all vehicle-mounted data in the graphic buffer copied by the memcpy function are stored in a queue in the native window buffer, at this time, the native window buffer is in a full-load state in a buffer area, the HAL process marks the native window buffer as a buffer done, and at this time, the native window buffer is in a to-be-used state. And informing the buffer done to mark as enquene, and transmitting the vehicle-mounted information to the surface through the queue, wherein the surface is used for being connected with the application program, so that the vehicle-mounted data can be displayed on an application layer. After the surface display consumption, marking the sequence of the consumed native window buffer as dequeue, and continuing the cycle of display transmission. Therefore, the process of transmitting the display data at the upper layer does not need the participation of the graphic buffer at the lower layer, and the process of transmitting the display data at the upper layer is separated from the process of filling the data at the lower layer.
In addition, the embodiment of the invention can also be connected with an application program, the application program process can extract the vehicle-mounted data in the display buffer area and transmit the vehicle-mounted data to the application program, and the application program receives the vehicle-mounted data and displays the vehicle-mounted data.
The vehicle-mounted data received by the DMA is filled into a graphic buffer through a hardware abstraction layer HAL process; the memcpy function copies the vehicle-mounted data in the filled graphic buffer into the native window buffer; and the HAL process calls the native window buffer to transmit the vehicle-mounted data to the surface. The embodiment of the invention realizes that the upper layer buffer area and the bottom layer buffer area are respectively recycled by adopting the double buffer areas for transmission, so that the stability is not influenced by each other in the transmission process and the display process, even if the upper layer display system is stuck, the system runs very slowly, and the buffer returned to the kernel is not timely. However, the bottom layer graphic buffer is only used for data filling circulation of the bottom layer, and the buffer is sufficient, so that abnormal phenomena such as frame loss, overflow and the like caused by the fact that the buffer filling cannot be carried out are effectively avoided. Similarly, even when the bottom hardware has a problem, the native window buffer is only used for transmission circulation of the upper display data, and the HAL process can fill the buffer in time, so that the prepared buffer can be obtained, the phenomenon that the vehicle-mounted system generates state disorder and even crash (downtime) is avoided, and the problems that the vehicle-mounted image data is unstable in transmission and the display and transmission are mutually influenced are effectively solved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 4, a block diagram of a vehicle-mounted data transmission apparatus according to an embodiment of the present invention is shown, where the apparatus is applied to a vehicle-mounted system, and the vehicle-mounted system is deployed with a direct memory access DMA, where the DMA is used to receive vehicle-mounted data, and the apparatus specifically includes the following modules:
a filling module 401, wherein the hardware abstraction layer HAL process fills the vehicle data received by the DMA into a preset first buffer area;
the copying module 402 copies the vehicle-mounted data in the filled first buffer area to a preset second transmission buffer area by using a copying function;
and a transmission module 403, where the HAL process calls the preset second transmission buffer to transmit the vehicle-mounted data to a display buffer.
Optionally, the filling module 401 includes:
the first lock stator module is used for determining the preset first buffer area;
and the filling submodule is used for filling the vehicle-mounted data received by the DMA into a preset first buffer area.
Optionally, the apparatus further comprises:
and the first releasing module is used for releasing the preset first buffer zone by the HAL management process after the vehicle-mounted data is copied.
Optionally, the transmission module 403 includes:
a calling submodule, configured to call, by the HAL process, an idle queue in the preset second transmission buffer;
the writing sub-module is used for writing the vehicle-mounted data into the idle queue to obtain a transmission queue;
the transmission submodule is used for transmitting the transmission queue to a display buffer area;
and the second release submodule is used for releasing the transmission queue to obtain an idle queue.
Optionally, the in-vehicle system is connected to an application program, and the apparatus further includes:
and the display module is used for transmitting the vehicle-mounted data in the display buffer area to an application program in an application program process, and the application program is used for displaying the vehicle-mounted data.
Optionally, the preset first buffer and the preset second buffer are buffers managed in the HAL process.
Optionally, the preset first buffer area is an image buffer area graphic buffer, and the preset second buffer area is a local window buffer area native window buffer.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides a vehicle, including:
one or more processors; and
one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the vehicle to perform one or more methods as described above.
Embodiments of the invention also provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform one or more methods as described above.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The vehicle-mounted data transmission method and the vehicle-mounted data transmission device provided by the invention are described in detail, specific examples are applied in the text to explain the principle and the implementation mode of the invention, and the description of the examples is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A vehicle-mounted data transmission method is applied to a vehicle-mounted system, a direct memory access DMA is deployed on the vehicle-mounted system, and the DMA is used for receiving vehicle-mounted data, and the method comprises the following steps:
filling the vehicle-mounted data received by the DMA into a preset first buffer area by a Hardware Abstraction Layer (HAL) process;
the replication function replicates the vehicle-mounted data in the filled first buffer area to a preset second transmission buffer area;
and the HAL process calls the preset second transmission buffer zone to transmit the vehicle-mounted data to a display buffer zone.
2. The method according to claim 1, wherein the step of filling the DMA-received in-vehicle data into a preset first buffer comprises:
determining the preset first buffer area;
and the HAL process fills the vehicle-mounted data received by the DMA into a preset first buffer area.
3. The method according to claim 2, wherein after the step of copying the vehicle data in the filled first buffer to the preset second transmission buffer by the copy function, the method further comprises:
and when the vehicle-mounted data is copied, releasing the preset first buffer area by the HAL management process.
4. The method as claimed in claim 1, wherein the step of the HAL process invoking the preset second transmission buffer to transmit the vehicle-mounted data to a display buffer comprises:
the HAL process calls an idle queue in the preset second transmission buffer area;
writing the vehicle-mounted data into the idle queue to obtain a transfer queue;
transmitting the transfer queue to a display buffer;
and releasing the transmission queue to obtain an idle queue.
5. The method of any of claims 1-4, wherein the in-vehicle system interfaces with an application, the method further comprising:
and the application program process transmits the vehicle-mounted data in the display buffer area to an application program, and the application program is used for displaying the vehicle-mounted data.
6. The method of claim 1, wherein the predetermined first buffer and the predetermined second buffer are buffers managed by the HAL process.
7. The method according to claim 6, wherein the preset first buffer area is an image buffer graphic buffer, and the preset second buffer area is a native window buffer.
8. An on-vehicle data transmission device is applied to an on-vehicle system, wherein a Direct Memory Access (DMA) is deployed on the on-vehicle system, and the DMA is used for receiving on-vehicle data, and the device comprises:
the filling module is used for filling the vehicle-mounted data received by the DMA into a preset first buffer area by the hardware abstraction layer HAL process;
the copying module is used for copying the vehicle-mounted data in the filled first buffer area to a preset second transmission buffer area by the copying function;
and the transmission module is used for calling the preset second transmission buffer zone by the HAL process to transmit the vehicle-mounted data to a display buffer zone.
9. A vehicle, characterized by comprising:
one or more processors; and
one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the vehicle to perform the method of one or more of claims 1-7.
10. One or more machine readable media having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method of one or more of claims 1-7.
CN202011303658.1A 2020-11-19 2020-11-19 Vehicle-mounted data transmission method and device Active CN112492014B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011303658.1A CN112492014B (en) 2020-11-19 2020-11-19 Vehicle-mounted data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011303658.1A CN112492014B (en) 2020-11-19 2020-11-19 Vehicle-mounted data transmission method and device

Publications (2)

Publication Number Publication Date
CN112492014A true CN112492014A (en) 2021-03-12
CN112492014B CN112492014B (en) 2024-01-09

Family

ID=74932075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011303658.1A Active CN112492014B (en) 2020-11-19 2020-11-19 Vehicle-mounted data transmission method and device

Country Status (1)

Country Link
CN (1) CN112492014B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114786056A (en) * 2022-05-07 2022-07-22 中国第一汽车股份有限公司 Cross-operating-system video projection display method, system and device based on Hypervisor and vehicle

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1834933A (en) * 2005-03-17 2006-09-20 富士通株式会社 Remote copy method and storage system
US7730238B1 (en) * 2005-10-07 2010-06-01 Agere System Inc. Buffer management method and system with two thresholds
JP2015172974A (en) * 2015-06-26 2015-10-01 日立オートモティブシステムズ株式会社 Electronic control unit for automobile
CN109491937A (en) * 2018-10-24 2019-03-19 山东超越数控电子股份有限公司 A kind of data transmission method and device of Scatter-Gather DMA
CN110012346A (en) * 2019-03-26 2019-07-12 合肥杰发科技有限公司 User applies method and apparatus, the equipment of the frame data in quick obtaining frame buffer
CN110391999A (en) * 2018-04-18 2019-10-29 海能达通信股份有限公司 A kind of data communications method and system
CN111708717A (en) * 2015-06-30 2020-09-25 华为技术有限公司 Data copying method, direct memory access controller and computer system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1834933A (en) * 2005-03-17 2006-09-20 富士通株式会社 Remote copy method and storage system
US7730238B1 (en) * 2005-10-07 2010-06-01 Agere System Inc. Buffer management method and system with two thresholds
JP2015172974A (en) * 2015-06-26 2015-10-01 日立オートモティブシステムズ株式会社 Electronic control unit for automobile
CN111708717A (en) * 2015-06-30 2020-09-25 华为技术有限公司 Data copying method, direct memory access controller and computer system
CN110391999A (en) * 2018-04-18 2019-10-29 海能达通信股份有限公司 A kind of data communications method and system
CN109491937A (en) * 2018-10-24 2019-03-19 山东超越数控电子股份有限公司 A kind of data transmission method and device of Scatter-Gather DMA
CN110012346A (en) * 2019-03-26 2019-07-12 合肥杰发科技有限公司 User applies method and apparatus, the equipment of the frame data in quick obtaining frame buffer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114786056A (en) * 2022-05-07 2022-07-22 中国第一汽车股份有限公司 Cross-operating-system video projection display method, system and device based on Hypervisor and vehicle

Also Published As

Publication number Publication date
CN112492014B (en) 2024-01-09

Similar Documents

Publication Publication Date Title
CN110703978B (en) Information display method, reader, and computer storage medium
CN103544207B (en) A kind of method and system of picture loaded and displayed
KR101394094B1 (en) Method and device for displaying application image
US10446113B2 (en) Method and system for inversion of raster images
US20170015246A1 (en) Early rear view camera video display in a multiprocessor architecture
DE102011101202A1 (en) Non-volatile storage for graphics hardware
JP5120125B2 (en) Image composition system, display control method, drawing processing apparatus, and control program
CN109697739B (en) Reverse color display method of handwriting reading equipment and handwriting reading equipment
CN103823690A (en) Online image loading method and system
CN113010466B (en) Interface switching method of ink screen equipment, ink screen equipment and storage medium
CN112492014A (en) Vehicle-mounted data transmission method and device
US20190227918A1 (en) Method for allocating memory resources, chip and non-transitory readable medium
CN113222874B (en) Data enhancement method, device, equipment and storage medium applied to target detection
CN110020305A (en) Webpage loading method, device, computer equipment and storage medium
CN107077376A (en) Frame buffer implementation method, device, electronic equipment and computer program product
CN106557148A (en) A kind of interface circuit, display driver, terminal device and display control method
CN108134906B (en) Image processing method and system
US20140237195A1 (en) N-dimensional collapsible fifo
US11449442B2 (en) Single command for reading then clearing a memory buffer
EP2530640A1 (en) Image copying method and device
TWI263941B (en) Method and device for handling requests for changing system mode
US20140089604A1 (en) Bipolar collapsible fifo
CN112784283A (en) Capability management method and computer equipment
CN114359029B (en) Image processing method, image processing apparatus, image processing system, and storage medium
CN113590250B (en) Image processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant