Method, system and storage medium for accelerating information processing between vehicle and mobile terminal
By setting up a data pool ring buffer on the vehicle computer side to process decoding and rendering in parallel, the problem of video data display in the information interaction between the vehicle computer and the mobile side is solved, and faster data processing and better user experience is achieved.
Patent Information
- Application Number
- CN202111577568.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2041-12-22
AI Technical Summary
In the prior art, during the information interaction between the vehicle and the mobile terminal, the decoding and display of video data cannot be completed within 140ms, resulting in insufficient fluency and affecting the user experience.
Set up a data pool ring buffer on the vehicle side to store the decoded video data frames and identify the serial number. The rendering thread Renderthread() extracts frames from the ring buffer according to the serial number for rendering and displaying, and determines whether the frame difference is greater than or equal to 2 before rendering to avoid frame loss and ensures data synchronization and timely release.
Through parallel processing, decoding and rendering, the data processing time per frame is reduced by 4 to 7 milliseconds, and the data processing time of 60 frames is optimized by at least 240 milliseconds, improving the user experience.
Smart Images

Figure CN114327708B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information communication technology, and in particular to a method, system and storage medium for accelerating interactive information processing between a vehicle computer and a mobile terminal. Background Art
[0002] With the development of in-vehicle infotainment systems, there are more and more interconnected applications between car computers and mobile phones, such as CarPlay, Android Auto, CarLife, HiCar, etc. These interactions require the mobile phone to transmit video data to the car computer, which then decodes and displays it. Therefore, the decoding and display of the car computer must also be smooth enough. For example, clicking on the CarPlay interface needs to respond within 140ms. This means that the entire process of sending instructions, receiving video data, decoding, rendering, and displaying must be completed within 140ms, and the current round of data processing must be completed before the next frame of data processing can be processed. Serial processing often does not meet this requirement. Executing a loop for each frame and a refresh rate of 60 frames will result in an unsmooth experience. Summary of the Invention
[0003] In response to the above technical problems, the present invention proposes a method, system, and storage medium for accelerating the processing of interactive information between a vehicle computer and a mobile terminal. The method includes the following steps:
[0004] S1: The mobile terminal communicates with the vehicle terminal, and the mobile terminal transmits video data to the vehicle terminal;
[0005] S2: The vehicle terminal decodes the video data and saves the decodebuffer into the data pool ringbuffer, and identifies the serial number of the data frame;
[0006] S3: The rendering thread Renderthread() calls the Setbuffer function to extract the decodebuffer frame from the ringbuffer according to the serial number identifier for rendering and display.
[0007] Among them, before each rendering, the rendering thread Renderthread() determines whether the difference between the serial number identifier of the decodebuffer frame and the previous frame is greater than or equal to 2. If so, it is judged as a frame loss and the rendering operation is not performed; otherwise, rendering and display are performed.
[0008] Furthermore, for the decodebuffer frame that has completed the rendering operation, the data pool ring buffer is synchronized and updated and the data is released after the rendering is completed.
[0009] Furthermore, each time the data pool ring buffer releases a frame of data, a new decodebuffer is received and stored, and the serial number identifier of the previously released decodebuffer frame is inherited.
[0010] Furthermore, the serial number identifier is recorded as i, and i takes values of 1, 2, ..., N; the rendering thread performs rendering operations in sequence from 1 to N according to the serial number identifier i, and enters the next round of 1 to N rendering operations after completion.
[0011] The mobile terminal includes at least one of a mobile phone, a tablet, or a laptop.
[0012] Preferably, the present invention further provides a system for accelerating information processing between a vehicle computer and a mobile terminal, comprising:
[0013] The data decoding unit continuously receives video data sent by the mobile terminal, calls the decoding program to complete the video data decoding and saves the decodebuffer to the data pool ring buffer.
[0014] The ring buffer identifies the serial number of the data frame of the decodebuffer, receives the data from the data decoding unit, and responds to the Setbuffer function to output the decodebuffer frame data to the rendering unit.
[0015] The rendering unit calls the rendering thread Renderthread() to render the decodebuffer frame.
[0016] The display unit receives the data rendered by the rendering unit and displays it.
[0017] Furthermore, the rendering thread Renderthread() determines whether the difference between the serial number identifier of the decodebuffer frame and the previous frame is greater than or equal to 2 before each rendering. If so, it is determined to be a frame loss and the rendering operation is not performed; otherwise, rendering and display are performed;
[0018] For decodebuffer frames that have completed rendering operations, the data pool ring buffer performs data synchronization updates and releases the data after rendering is completed.
[0019] Furthermore, each time the data pool ring buffer releases a frame of data, it receives and saves a new decodebuffer and inherits the serial number identifier of the previously released decodebuffer frame; the serial number identifier is recorded as i, and i takes values 1, 2,..., N; the rendering thread performs rendering operations in sequence from 1 to N according to the serial number identifier i, and enters the next round of 1 to N rendering operations after completion.
[0020] As another preferred embodiment, the present invention further provides a storage medium, including a storage medium arranged on a vehicle side, a processor and a computer program stored on the storage medium and executable by the processor, wherein the computer program is used to execute the method described above.
[0021] In summary, the present invention provides a method, system and storage medium for accelerating the interactive information processing between a vehicle computer and a mobile terminal. The method sets a data pool ring buffer on the vehicle computer as an intermediate station for data transmission between the mobile terminal and the vehicle computer, stores the decodebuffer decoded by the vehicle computer and identifies the serial number of the data frame, and then simultaneously calls the Setbuffer function through the rendering thread Renderthread() to extract the decodebuffer frame from the ring buffer according to the serial number identification for rendering and display, thereby ensuring the smoothness and timeliness of the data display on the vehicle computer. 60 frames of data are optimized by at least 240ms, effectively saving data processing time and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 This is a flow chart of a method for accelerating information processing between a vehicle computer and a mobile terminal according to the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0024] like Figure 1 As shown, the present invention proposes a method, system and storage medium for accelerating the interactive information processing between a vehicle computer and a mobile terminal, wherein the method includes the following steps:
[0025] S1: The mobile terminal communicates with the vehicle terminal, and the mobile terminal transmits video data to the vehicle terminal;
[0026] S2: The vehicle terminal decodes the video data and saves the decodebuffer into the data pool ringbuffer, and identifies the serial number of the data frame;
[0027] S3: The rendering thread Renderthread() calls the Setbuffer function to extract the decodebuffer frame from the ringbuffer according to the serial number identifier for rendering and display.
[0028] Among them, before each rendering, the rendering thread Renderthread() determines whether the difference between the serial number identifier of the decodebuffer frame and the previous frame is greater than or equal to 2. If so, it is judged as a frame loss and the rendering operation is not performed; otherwise, rendering and display are performed.
[0029] Furthermore, for the decodebuffer frame that has completed the rendering operation, the data pool ring buffer is synchronized and updated and the data is released after the rendering is completed.
[0030] Furthermore, each time the data pool ring buffer releases a frame of data, a new decodebuffer is received and stored, and the serial number identifier of the previously released decodebuffer frame is inherited.
[0031] Furthermore, the serial number identifier is recorded as i, and i takes values of 1, 2, ..., N; the rendering thread performs rendering operations in sequence from 1 to N according to the serial number identifier i, and enters the next round of 1 to N rendering operations after completion.
[0032] The mobile terminal includes at least one of a mobile phone, a tablet, or a laptop computer, but is not limited thereto.
[0033] In order to better explain the above-mentioned interactive information processing method, the program principles adopted by the present invention in the data processing process are as follows:
[0034] Begin
[0035] PhoneNotifyData() / *Notification data is ready* /
[0036] (Open the decoder;
[0037] If the opening is successful then
[0038] (do start Renderthread)
[0039] else
[0040] return
[0041] End if)
[0042] PhoneStreamDate(Data Rawbuffer) / * The phone continuously transmits data. * /
[0043] { if the decoder has been opened then
[0044] (Do decode the Rawbuffer, and put the decoded data into the decodebuffer and mark the sequence identifier of each frame;)
[0045] else
[0046] return
[0047] End if}
[0048] Renderthread() / * Rendering display thread * /
[0049] {While (the decoder is open)
[0050] ( if the number of decoded frames in the <ringbuffer> is less than or equal to 2 then
[0051] ( Get a data frame from the decodebuffer;
[0052] if <the obtained frame identifier is valid> then (
[0054] Do render and display a data frame;
[0055] Do release the data frame. )
[0057] else
[0058] return;)
[0059] else (
[0061] Do not render and discard the frame;
[0062] return; )
[0064] End if)}
[0065] End
[0066] The present invention sets decoding and rendering display as parallel processing. After decoding, the data sent by the mobile phone is placed in a data pool as the following ring buffer, and the serial number of the data frame is identified. The rendering thread then extracts the decoded data frame from it according to the frame serial number for rendering and display. Before each rendering, the rendering thread will judge the size of the ring buffer. If it exceeds 2, the frame will be dropped and the rendering operation will not be performed. This solves the image delay problem caused by insufficient rendering performance without affecting the user experience. At the same time, this data pool will synchronize the data according to the serial number of the data frame, and release the data after the rendering is completed. It ensures that after the mobile phone sends the data for decoding, it immediately needs to wait for rendering in a loop, and only needs to render in parallel from the data pool.
[0067] Preferably, the present invention further provides a system for accelerating information processing between a vehicle computer and a mobile terminal, comprising:
[0068] The data decoding unit continuously receives video data sent by the mobile terminal, calls the decoding program to complete the video data decoding and saves the decodebuffer to the data pool ring buffer.
[0069] The ring buffer identifies the serial number of the data frame of the decodebuffer, receives the data from the data decoding unit, and responds to the Setbuffer function to output the decodebuffer frame data to the rendering unit.
[0070] The rendering unit calls the rendering thread Renderthread() to render the decodebuffer frame.
[0071] The display unit receives the data rendered by the rendering unit and displays it.
[0072] Furthermore, the rendering thread Renderthread() determines whether the difference between the serial number identifier of the decodebuffer frame and the previous frame is greater than or equal to 2 before each rendering. If so, it is determined to be a frame loss and the rendering operation is not performed; otherwise, rendering and display are performed;
[0073] For decodebuffer frames that have completed rendering operations, the data pool ring buffer performs data synchronization updates and releases the data after rendering is completed.
[0074] Furthermore, each time the data pool ring buffer releases a frame of data, it receives and saves a new decodebuffer and inherits the serial number identifier of the previously released decodebuffer frame; the serial number identifier is recorded as i, and i takes values 1, 2,..., N; the rendering thread performs rendering operations in sequence from 1 to N according to the serial number identifier i, and enters the next round of 1 to N rendering operations after completion.
[0075] As another preferred embodiment, the present invention further provides a storage medium, including a storage medium arranged on a vehicle side, a processor and a computer program stored on the storage medium and executable by the processor, wherein the computer program is used to execute the method described above.
[0076] In summary, it can be seen that the interactive information processing method described in the present invention saves 4 to 7 milliseconds of data for each frame of data, and 60 frames of data are optimized by at least 240ms, which is a significant improvement compared to the existing technology.
[0077] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. A method for accelerating information processing between a vehicle computer and a mobile terminal, characterized in that: The following steps are involved: S1: The mobile terminal communicates with the vehicle terminal, and the mobile terminal transmits video data to the vehicle terminal; S2: The vehicle terminal decodes the video data and saves the decodebuffer into the data pool ringbuffer, and identifies the serial number of the data frame; S3: the rendering thread Renderthread() calls the Setbuffer function to extract the decodebuffer frame from the ring buffer according to the serial number identifier for rendering and display; Among them, for the decodebuffer frame that completes the rendering operation, the data pool ring buffer performs data synchronization update and releases the data after the rendering is completed; each time the data pool ring buffer releases a frame of data, it receives and saves a new decodebuffer and inherits the serial number identifier of the previously released decodebuffer frame.
2. The method for accelerating information processing between a vehicle computer and a mobile terminal according to claim 1, characterized in that: Also includes: Before each rendering, the rendering thread Renderthread() determines whether the difference between the serial number identifier of the decodebuffer frame and the previous frame is greater than or equal to 2. If so, it is determined to be a frame loss and the rendering operation is not performed; otherwise, rendering and display are performed.
3. The method for accelerating information processing between a vehicle computer and a mobile terminal according to claim 2, characterized in that: Also includes: The serial number is denoted as i, where i takes values of 1, 2, ..., N; The rendering thread performs rendering operations in sequence from 1 to N according to the serial number identifier i, and enters the next round of 1 to N rendering operations after completion.
4. The method for accelerating information processing between a vehicle computer and a mobile terminal according to claim 3, characterized in that: The mobile terminal includes at least one of a mobile phone, a tablet, or a laptop.
5. A system for accelerating information processing between a vehicle computer and a mobile terminal, characterized in that: include: The data decoding unit continuously receives video data sent by the mobile terminal, calls the decoding program to complete the video data decoding and saves the decodebuffer to the data pool ring buffer; The ring buffer identifies the serial number of the data frame of the decodebuffer, receives the data from the data decoding unit, and responds to the Setbuffer function to output the decodebuffer frame data to the rendering unit; The rendering unit calls the rendering thread Renderthread() to render the decodebuffer frame; A display unit receives and displays the data rendered by the rendering unit; Before each rendering, the rendering thread Renderthread() determines whether the difference between the serial number identifier of the decodebuffer frame and the previous frame is greater than or equal to 2. If so, it is judged as a frame loss and the rendering operation is not performed; otherwise, rendering and display are performed; For decodebuffer frames that have completed rendering operations, the data pool ring buffer performs data synchronization updates and releases the data after rendering is completed; Each time the data pool ring buffer releases a frame of data, a new decodebuffer is received and saved, and the serial number identifier of the previously released decodebuffer frame is inherited; the serial number identifier is recorded as i, and i takes values 1, 2, ..., N; the rendering thread performs rendering operations in sequence from 1 to N according to the serial number identifier i, and enters the next round of 1 to N rendering operations after completion.
6. A storage medium, characterized in that It includes a storage medium arranged on the vehicle side, a processor and a computer program stored on the storage medium and executable by the processor, wherein the computer program is used to execute the method according to claims 1-4.
Citation Information
Patent Citations
Video processing method, terminal device and machine-readable storage medium
CN110832875A