In-vehicle video transmission method and in-vehicle video reception method, device, and storage medium
By segmenting the vehicle video frames and calculating feature values and XOR values to generate verification data, the problem of the receiving device being unable to recover vehicle video with a stable frame rate is solved, achieving a balance between high real-time performance and stable transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2026-03-31
AI Technical Summary
In autonomous driving scenarios, existing technologies cannot recover stable in-vehicle video based on received frame block data, which easily leads to data errors and data loss.
By dividing the in-vehicle video frames to be transmitted into blocks, calculating the feature values and XOR values of the video data blocks, generating verification data, and sending the verification data and frame block data to the receiving device, the receiving device can recover the unreceived frame block data and verify the obtained frame block data.
It reduces errors in recovering in-vehicle video frames due to data loss and transmission errors, while maintaining both high real-time performance and stable transmission.
Smart Images

Figure CN115914574B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving, and in particular to a method, apparatus, and storage medium for transmitting and receiving in-vehicle video. Background Technology
[0002] In autonomous driving scenarios, video data captured by in-vehicle cameras is crucial and needs to be transmitted to multiple receiving devices so that each device can perform its corresponding functions based on the received video data. Depending on the functions required by each receiving device, the real-time transmission requirements for video data vary. To ensure that receiving devices with high real-time requirements can receive the real-time video data captured by the in-vehicle cameras within the corresponding transmission latency, the vehicle's computer can divide a single in-vehicle video frame into multiple frame blocks and transmit these blocks in parallel to reduce transmission latency. However, this transmission method is prone to data errors and data loss, causing the receiving devices to be unable to reconstruct a stable frame rate in-vehicle video from the received frame block data. Summary of the Invention
[0003] The purpose of this application is to at least solve one of the aforementioned technical defects, particularly the technical defect in the prior art where the receiving device cannot recover stable in-vehicle video based on the received frame block data.
[0004] In a first aspect, embodiments of this application provide a method for transmitting in-vehicle video, the method comprising the following steps:
[0005] Identify the vehicle-mounted video frames to be transmitted;
[0006] The vehicle video frame to be transmitted is divided into blocks to obtain multiple video data blocks, and multiple frame block data are generated according to each video data block and the block order identifier corresponding to each video data block.
[0007] Calculate the first feature value corresponding to the vehicle video frame to be transmitted, and perform bitwise XOR on each of the video data blocks to obtain the first XOR value;
[0008] Generate verification data based on the first feature value and the first XOR value;
[0009] The verification data and each of the frame block data are sent to the receiving device so that the receiving device can obtain the unreceived frame block data based on the first XOR value and the received frame block data, and / or obtain the frame block data based on the first feature value verification.
[0010] In one embodiment, the in-vehicle video transmission method further includes:
[0011] Obtain the XOR step size of the data block, wherein the XOR step size of the data block is a positive integer greater than 1;
[0012] The XOR step size of the data block is taken as the number of XOR operations M, and the flag value k is set to 0.
[0013] If (k×M+1) is less than the total number T of the vehicle video frames to be transmitted in the current round, then according to the block order identifiers corresponding to each video data block, the video data blocks from the (k×M+1)th block to the min[((k+1)×M), T]th block are bitwise XORed to obtain a second XOR value. The block order identifiers corresponding to the (k×M+1)th block to the min[((k+1)×M), T]th block, the second XOR value calculated in the current round, and the video frame identifier of the vehicle video frames to be transmitted are used as a set of correction data, and k is updated to (k+1) and enters the next round; where min[((k+1)×M), T] is the smaller value between the positive integer ((k+1)×M) and the positive integer T.
[0014] Each set of correction data is transmitted to the receiving device so that the receiving device can obtain the unreceived frame block data based on each set of correction data and the received frame block data.
[0015] In one embodiment, prior to the step of transmitting each set of the correction data to the receiving device, the method further includes:
[0016] If in the current round, (k×M+1) is greater than or equal to the total number of blocks, and the number of XOR operations on the data blocks M is less than the total number of blocks, then M is updated to (M+N), and the flag value k is updated to 0, and the process proceeds to the next round, where N is the XOR step size of the data blocks.
[0017] In one embodiment, the step of generating multiple frame block data based on each of the video data blocks and the block order identifier corresponding to each of the video data blocks includes:
[0018] For each video data block, calculate the second feature value corresponding to the video data block, and combine the first feature value, the video data block, the second feature value corresponding to the video data block, and the block order identifier corresponding to the video data block as a frame block data.
[0019] In one embodiment, the in-vehicle video transmission method further includes:
[0020] Obtain the start time corresponding to the vehicle video frame to be transmitted, and use the start time and the first feature value as frame data;
[0021] The frame data is transmitted to the receiving device so that the receiving device can obtain each frame block data based on the first feature value verification and determine the start time corresponding to the vehicle data frame to be transmitted.
[0022] In one embodiment, the step of generating verification data based on the first feature value and the first XOR value includes:
[0023] The first XOR value is XORed with the start time to obtain a third XOR value, and the first feature value and the third XOR value are used as the verification data.
[0024] Secondly, embodiments of this application provide a vehicle-mounted video transmitting device, which includes:
[0025] The video frame determination module is used to determine the vehicle-mounted video frames to be transmitted.
[0026] The frame block data acquisition module is used to divide the vehicle video frame to be transmitted into blocks to obtain multiple video data blocks, and generate multiple frame block data according to each video data block and the block order identifier corresponding to each video data block;
[0027] The calculation module is used to calculate the first feature value corresponding to the vehicle video frame to be transmitted, and to perform bitwise XOR on each of the video data blocks to obtain the first XOR value.
[0028] The verification data generation module is used to generate verification data based on the first feature value and the first XOR value;
[0029] The sending module is configured to send the verification data and each of the frame block data to the receiving device, so that the receiving device can obtain the unreceived frame block data based on the first XOR value and the received frame block data, and / or obtain the frame block data based on the first feature value verification.
[0030] Thirdly, embodiments of this application provide a method for receiving in-vehicle video, the method comprising the following steps:
[0031] Determine the deadline for data reception;
[0032] Based on the data of each frame block received before the data reception deadline, determine whether data verification and / or data correction are required;
[0033] If data verification is required, the video data blocks in each of the received frame block data are spliced together according to the block order identifier in each frame block data to obtain a spliced video frame, and the third feature value corresponding to the spliced video frame is calculated. When verification data is received, the third feature value is compared with the first feature value in the verification data to obtain the verification result.
[0034] If data correction is required, if the number of unreceived frame block data is less than or equal to a preset threshold, the video data blocks in each received frame block data are bitwise XORed to obtain a fourth XOR value. If the verification data is received, the unreceived frame block data is obtained based on the fourth XOR value and the verification data.
[0035] In one embodiment, the in-vehicle video receiving method further includes:
[0036] Receive calibration data from each group;
[0037] If data correction is required, if the number of unreceived frame block data exceeds the preset threshold, the target block sequence identifier corresponding to each unreceived frame block data is determined, and target correction data is determined from each group of correction data according to each target block sequence identifier. The unreceived frame block data is obtained according to the target correction data and each received frame block data.
[0038] Fourthly, embodiments of this application provide a vehicle-mounted video receiving device, the vehicle-mounted video receiving device comprising:
[0039] The deadline determination module is used to determine the deadline for data reception;
[0040] The judgment module is used to determine whether data verification and / or data correction are required based on the data block data received before the data reception deadline.
[0041] The verification module is used to splice video data blocks in each received frame block data according to the block order identifier in each received frame block data when data verification is required, so as to obtain a spliced video frame, and calculate the third feature value corresponding to the spliced video frame. When verification data is received, the third feature value is compared with the first feature value in the verification data to obtain the verification result.
[0042] The correction module is used to perform bitwise XOR on the video data blocks in each received frame block data when data correction is required. If the number of unreceived frame block data is less than or equal to a preset threshold, the module obtains a fourth XOR value. If verification data is received, the module obtains the unreceived frame block data based on the fourth XOR value and the verification data.
[0043] Fifthly, embodiments of this application provide a storage medium storing computer-readable instructions. When executed by one or more processors, the computer-readable instructions cause the one or more processors to perform the steps of the vehicle video transmission method described in any of the above embodiments or the steps of the vehicle video reception method described in any of the above embodiments.
[0044] Sixthly, embodiments of this application provide a computer device, including: one or more processors, and a memory;
[0045] The memory stores computer-readable instructions, which, when executed by the one or more processors, perform the steps of the vehicle video transmission method described in any of the above embodiments or the steps of the vehicle video reception method described in any of the above embodiments.
[0046] In the vehicle-mounted video transmission method, vehicle-mounted video reception method, apparatus, and storage medium of this application, after dividing the vehicle-mounted video frame to be transmitted into multiple video data blocks, the vehicle can perform a bitwise XOR operation on each video data block to obtain a first XOR value, and calculate a first feature value corresponding to the vehicle-mounted video frame to be transmitted. The vehicle can generate verification data based on the first XOR value and the first feature value, and transmit the verification data and each frame block data to the receiving device. This allows the receiving device to recover the unreceived frame block data based on the first XOR value in the verification data and the frame block data received by the receiving device, thereby minimizing the problem of being unable to recover the vehicle-mounted video frame due to data loss. The vehicle sends verification data to the receiving device, enabling the receiving device to perform data verification on each frame block data obtained by the receiving device based on the first feature value, thereby minimizing the problem of vehicle-mounted video frame recovery errors due to data transmission errors. In this way, the transmitting device can reduce transmission latency through block transmission, and the receiving device can also recover vehicle-mounted video with a stable frame rate based on the received frame block data, thus achieving both high real-time performance and stable transmission. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a flowchart illustrating a method for transmitting in-vehicle video in one embodiment;
[0049] Figure 2 This is a flowchart illustrating an in-vehicle video receiving method in one embodiment;
[0050] Figure 3 This is a schematic diagram of the structure of an in-vehicle video transmission device in one embodiment;
[0051] Figure 4 This is a schematic diagram of the structure of an in-vehicle video receiving device in one embodiment;
[0052] Figure 5 This is a schematic diagram of the structure of a computer device in one embodiment. Detailed Implementation
[0053] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0054] In one embodiment, this application provides a method for transmitting in-vehicle video. The following embodiment illustrates this method using a computer device installed in a vehicle as an example. Figure 1 As shown, the in-vehicle video transmission method of this application may include the following steps:
[0055] S102: Determine the vehicle video frame to be transmitted.
[0056] In this system, video files are stored in the computer as consecutive images, with each image representing a video frame. The computer in the vehicle can determine which video frame needs to be transmitted, for example, by using the most recently acquired video frame or by sequentially using each video frame according to its chronological order.
[0057] S104: Divide the vehicle video frame to be transmitted into multiple video data blocks, and generate multiple frame block data according to each video data block and the block order identifier corresponding to each video data block.
[0058] The computer equipment on the vehicle can segment the complete data stream of the vehicle-mounted video frame to be transmitted into multiple video data blocks according to preset segmentation parameters, preset segmentation rules, and / or preset segmentation algorithms. Each video data block is smaller than the original vehicle-mounted video frame. In one embodiment, the computer equipment can segment the vehicle-mounted video frame to be transmitted into multiple fixed-size video data blocks, ensuring that every two video data blocks are of the same size.
[0059] In this step, the computer device can determine the block order identifier corresponding to each video data block according to the block order. This block order identifier reflects the relative position of the corresponding video data block within the vehicle-mounted video frame to be transmitted. For each video data block, the computer device can generate a frame block data based on the video data block and its corresponding block order identifier, such that the generated frame block data carries the video data block and its corresponding block order identifier. In this way, the computer device can obtain multiple frame block data for each video data block individually.
[0060] S106: Calculate the first feature value corresponding to the vehicle video frame to be transmitted, and perform bitwise XOR on each of the video data blocks to obtain the first XOR value.
[0061] Specifically, the computer device can calculate a first feature value based on the complete data stream of the in-vehicle video frames to be transmitted. In one embodiment, the first feature value can be an MD5 (Message-Digest Algorithm) feature value.
[0062] Each video data block can be represented in binary form. In this step, the computer device can perform a bitwise XOR operation on each video data block, that is, XOR the value of the same bit in each video data block to obtain the first XOR value. For example, the computer device divides the vehicle video frame to be transmitted into a first video data block and a second video data block, and both video data blocks have a binary length of 8 bits. In this case, the computer device can XOR the first binary number of the first video data block with the first binary number of the second video data block to obtain the first binary number of the first XOR value, and XOR the second binary number of the first video data block with the second binary number of the second video data block to obtain the second binary number of the first XOR value. This process continues until the 8-bit binary number of the first XOR value is calculated.
[0063] S108: Generate verification data based on the first feature value and the first XOR value.
[0064] In this step, the computer equipment on the vehicle can generate verification data based on the first feature value and the first XOR value. For example, the computer equipment can use the first feature value and the first XOR value as verification data, or the computer equipment can further process the first feature value and / or the first XOR value and obtain verification data based on the processing result.
[0065] S110: Send the verification data and each of the frame block data to the receiving device, so that the receiving device can obtain the unreceived frame block data based on the first XOR value and the received frame block data, and / or obtain the frame block data based on the first feature value verification.
[0066] The computer equipment on the vehicle can send checksum data and various frame block data to the receiving device according to a preset transmission algorithm. For example, the computer equipment can create a process pool, which includes at least two transmission processes. Each transmission process determines the target data in each data to be transmitted based on the receiving device identifier corresponding to each data to be transmitted (each data to be transmitted can be frame block data or checksum data) and the pre-set device priority of each receiving device, and transmits the target data to the corresponding receiving device. Alternatively, the computer equipment can prioritize sending each frame block data in the manner described above, and after each frame block data has been sent, send the checksum data in the manner described above.
[0067] In this application's solution, after dividing the vehicle-mounted video frame to be transmitted into multiple video data blocks, the vehicle can perform a bitwise XOR operation on each video data block to obtain a first XOR value, and calculate a first feature value corresponding to the vehicle-mounted video frame to be transmitted. The vehicle can generate verification data based on the first XOR value and the first feature value, and transmit the verification data and each frame block data to the receiving device. This allows the receiving device to recover the unreceived frame block data based on the first XOR value in the verification data and the frame block data received by the receiving device, thereby minimizing the problem of unrecoverable vehicle-mounted video frames due to data loss. The vehicle sends verification data to the receiving device, enabling the receiving device to perform data verification on each frame block data obtained by the receiving device based on the first feature value, thereby minimizing the problem of vehicle-mounted video frame recovery errors due to data transmission errors. In this way, the transmitting device can reduce transmission latency through block transmission, and the receiving device can also recover vehicle-mounted video with a stable frame rate based on the received frame block data, thus achieving both high real-time performance and stable transmission.
[0068] In one embodiment, the in-vehicle video transmission method of this application may further include the following steps:
[0069] Obtain the XOR step size of the data block, wherein the XOR step size of the data block is a positive integer greater than 1;
[0070] The XOR step size of the data block is taken as the number of XOR operations M, and the flag value k is set to 0.
[0071] If (k×M+1) is less than the total number T of the vehicle video frames to be transmitted in the current round, then according to the block order identifiers corresponding to each video data block, the video data blocks from the (k×M+1)th block to the min[((k+1)×M), T]th block are bitwise XORed to obtain a second XOR value. The block order identifiers corresponding to the (k×M+1)th block to the min[((k+1)×M), T]th block, the second XOR value calculated in the current round, and the video frame identifier of the vehicle video frames to be transmitted are used as a set of correction data, and k is updated to (k+1) and enters the next round; where min[((k+1)×M), T] is the smaller value between the positive integer ((k+1)×M) and the positive integer T.
[0072] Each set of correction data is transmitted to the receiving device so that the receiving device can obtain the unreceived frame block data based on each set of correction data and the received frame block data.
[0073] The data block XOR step size can be used to indicate the basic number of video data blocks that need to be XORed during the acquisition of a set of correction data. In one embodiment, the data block XOR step size can be preset or determined by the computer device based on real-time network parameters (such as network bandwidth, network latency, and / or packet loss rate). This application does not impose specific limitations on this. The total number of blocks refers to the total number of video data blocks obtained after dividing a vehicle-mounted video frame to be transmitted into blocks.
[0074] Specifically, after dividing the vehicle-mounted video frame to be transmitted into multiple video data blocks, the computer device can perform bitwise XOR operations on the sequentially adjacent video data blocks according to the block order to obtain multiple sets of correction data. Specifically, the computer device can determine the video frame identifier of the vehicle-mounted video frame to be transmitted. In the first round, k = 0, M is less than T, and the computer device can perform bitwise XOR operations on the first to Mth video data blocks (a total of M blocks) according to the block order to obtain a second XOR value. The second XOR value corresponding to the first to M video data blocks, the block order identifier, and the video frame identifier are used as a set of correction data. Then, the value of k is updated from 0 to 1, and the process proceeds to the next round. In the second round, if (M+1) is less than T, the computer device can determine whether 2M is greater than T. When 2M is less than or equal to T, the computer device can perform a bitwise XOR operation on the (M+1)th to 2Mth (M blocks in total) video data blocks to obtain a second XOR value. In this case, the computer device can use the second XOR value corresponding to the (M+1)th to 2Mth video data blocks, the block order identifier, and the video frame identifier of the vehicle video frame to be transmitted as a set of correction data. When 2M is greater than T, the computer device can perform a bitwise XOR operation on the (M+1)th to Tth video data blocks to obtain a second XOR value. The computer device can use the second XOR value corresponding to the (M+1)th to Tth video data blocks, the block order identifier, and the video frame identifier of the vehicle video frame to be transmitted as a set of correction data. Then, the value of k is updated from 1 to 2, and the process proceeds to the next round. The steps performed by the computer device in the third round are analogous to the first and second rounds, and will not be repeated here, until (k×M+1) is greater than or equal to T.
[0075] In one embodiment, if (k×M+1) equals T, then the Tth video data block can be sent to the receiving device so that the receiving device can obtain the Tth video data block with correct data.
[0076] In this embodiment, by calculating multiple sets of correction data in the manner described above, the receiving device can obtain the lost frame block data through the correction data even when multiple frame block data are lost, thereby further achieving stable transmission.
[0077] Considering that correction data may be lost during transmission, to further improve the success rate of the receiving device in recovering lost frame block data and to further achieve stable transmission, in one embodiment, before the step of transmitting each set of correction data to the receiving device, the method further includes:
[0078] If in the current round, (k×M+1) is greater than or equal to the total number of blocks, and the number of XOR operations on the data blocks M is less than the total number of blocks, then M is updated to (M+N), and the flag value k is updated to 0, and the process proceeds to the next round, where N is the XOR step size of the data blocks.
[0079] Specifically, when M = N, the computer device can perform a bitwise XOR operation on every N video data blocks to obtain each set of correction data. Then, the computer device can adjust M to 2N and perform a bitwise XOR operation on every 2N video data blocks to obtain each set of correction data. After obtaining each set of correction data, if 2N is less than T, the computer device can adjust M to 3N and perform a bitwise XOR operation on every 3N video data blocks to obtain each set of correction data. After obtaining each set of correction data with 3N as the number of XOR operations on the data blocks, if 3N is less than T, the computer device can update M to 4N and calculate each set of correction data according to the aforementioned process until M is greater than or equal to the total number of blocks.
[0080] For example, when T=8 and M=2, the computer device can calculate the XOR values of the first to second video data blocks, the third to fourth video data blocks, the fifth to sixth video data blocks, the seventh to eighth video data blocks, the first to fourth video data blocks, the fifth to eighth video data blocks, and the first to eighth video data blocks, respectively, according to the block division order. Based on these XOR values, each set of correction data can be obtained.
[0081] In one embodiment, the step of generating multiple frame block data based on each video data block and the block order identifier corresponding to each video data block includes: for each video data block, calculating a second feature value corresponding to the video data block, and taking the first feature value, the video data block, the second feature value corresponding to the video data block, and the block order identifier corresponding to the video data block as a frame block data.
[0082] Specifically, for each video data block, the computer device can calculate a second feature value corresponding to the individual video data block, and combine the second feature value of the video data block, the first feature value of the vehicle video frame to which the video data block belongs, the block sequence identifier of the video data block, and the data corresponding to the video data block into a frame block data. The computer device can obtain each frame block data according to the aforementioned process, and each frame block data includes all the data corresponding to one video data block. In this way, the receiving device can determine the video frame to which the frame block data belongs based on the first feature value in the frame block data, and use the second feature value included in the frame block data to perform data verification on the individual video data blocks, so as to verify whether there are data errors in each received video data block, thereby further reducing the problem of vehicle video frame recovery errors caused by data transmission errors.
[0083] In one embodiment, the in-vehicle video transmission method of this application may further include the following steps:
[0084] Obtain the start time corresponding to the vehicle video frame to be transmitted, and use the start time and the first feature value as frame data;
[0085] The frame data is transmitted to the receiving device so that the receiving device can obtain each frame block data based on the first feature value verification and determine the start time corresponding to the vehicle data frame to be transmitted.
[0086] The start time can be the time corresponding to the video frame recorded by the vehicle video frame to be transmitted, such as the time when the vehicle camera captures and / or generates the vehicle video frame.
[0087] The vehicle's computer equipment can use the start time corresponding to the vehicle-mounted video frame to be transmitted and the first feature value corresponding to the vehicle-mounted video frame to be transmitted as frame data, and send this frame data to the receiving device. This allows the receiving device to determine the start time corresponding to the vehicle-mounted video frame to be recovered from the received frame data, facilitating subsequent video playback. Furthermore, the receiving device can also verify the received frame block data based on the first feature value upon receiving the frame data. This prevents the receiving device from being unable to perform data verification if verification data is lost, thereby further reducing the problem of vehicle-mounted video frame recovery errors caused by data transmission errors.
[0088] In one embodiment, the step of generating verification data based on the first feature value and the first XOR value includes: XORing the first XOR value with the start time corresponding to the vehicle video frame to be transmitted to obtain a third XOR value, and using the first feature value and the third XOR value as verification data. Specifically, the computer device can determine the binary value corresponding to the start time, and perform a bitwise XOR operation between the binary value corresponding to the start time and the first XOR value to obtain the third XOR value. Upon receiving the verification data, the receiving device can obtain the start time corresponding to the vehicle video frame based on the verification data and the received frame block data, so as to facilitate subsequent video playback. This avoids the problem of video frames being unplayable due to frame data loss, ensuring that the receiving device can play vehicle video with a stable frame rate.
[0089] In one embodiment, this application provides a method for receiving in-vehicle video. The following embodiment illustrates this method using a computer device installed in a receiving device as an example. Figure 2 As shown, the in-vehicle video receiving method includes the following steps:
[0090] S202: Determine the data reception deadline.
[0091] Each in-vehicle video frame can correspond to a different data reception cutoff time. In one embodiment, the data reception time corresponding to the current in-vehicle video frame can be the sum of the start time corresponding to the previous in-vehicle video frame and a preset duration.
[0092] S204: Based on the data of each frame block received before the data reception deadline, determine whether data verification and / or data correction are required.
[0093] Specifically, the computer in the receiving device can determine whether the receiving device has received all the frame block data and verification data of the vehicle video frame before the data reception deadline corresponding to the vehicle video frame, based on the block order identifier in the received frame block data, and then determine whether data verification and / or data correction are required.
[0094] In one embodiment, if the computer in the receiving device receives all the frame block data corresponding to the vehicle video frame, and receives the frame data or check data corresponding to the vehicle video frame, before the data reception deadline corresponding to the vehicle video frame, then it can be determined that data verification is required. If the computer in the receiving device does not receive all the frame block data corresponding to the vehicle video frame when the data reception deadline corresponding to the vehicle video frame arrives, then it can be determined that data correction is required.
[0095] S206: If data verification is required, the video data blocks in the received frame block data are spliced together according to the block order identifier in each frame block data to obtain a spliced video frame, and the third feature value corresponding to the spliced video frame is calculated. When verification data is received, the third feature value is compared with the first feature value in the verification data to obtain the verification result.
[0096] When data verification is required, the computer device can sequentially splice the received video data blocks to obtain a spliced video frame. Based on the complete data stream corresponding to the spliced video frame, a third feature value is calculated. In one embodiment, the third feature value can be an MD5 value.
[0097] If the computer device receives the verification data, it can compare the third feature value with the first feature value in the verification data. If the third feature value matches the first feature value, it indicates that the stitched video frame matches the in-vehicle video frame obtained from the vehicle, and the verification passes. If the third feature value does not match the first feature value, it indicates that the data of the stitched video frame is different from the data of the in-vehicle video frame obtained from the vehicle, and the verification fails.
[0098] In one embodiment, the computer equipment on the vehicle can send frame data according to the steps described in the above embodiment of the in-vehicle video transmission method. Upon receiving the frame data, the receiving device can extract a first feature value from the frame data and compare the first feature value with a third feature value to obtain a verification result. That is, if either the frame data or the verification data is lost, the receiving device can perform data verification based on the other unlost data.
[0099] In one embodiment, the computer equipment on the vehicle can generate multiple frame block data according to the above embodiments, by using a first feature value, each video data block, a second feature value corresponding to each video data block, and a block sequence identifier corresponding to each video data block. In this case, when the receiving device receives the frame block data, it can extract the video data block and the second feature value from the frame block data respectively, calculate the fourth feature value corresponding to the extracted video data block, and compare the fourth feature value with the extracted second feature value to verify whether the video data block has a data error.
[0100] S208: If data correction is required, if the number of unreceived frame block data is less than or equal to a preset threshold, the video data blocks in each received frame block data are bitwise XORed to obtain a fourth XOR value. If the verification data is received, the unreceived frame block data is obtained according to the fourth XOR value and the verification data.
[0101] The preset quantity threshold can be determined based on actual circumstances, and this application does not impose specific restrictions on it. In one embodiment, the preset quantity threshold can be 1.
[0102] Specifically, when data correction is required and the number of unreceived frame blocks is less than or equal to a preset threshold, the computer at the receiving device can extract each video data block from the received frame blocks and perform a bitwise XOR operation on each extracted video data block to obtain a fourth XOR value. Upon receiving verification data, the computer can recover the unreceived video data block based on the verification data and the fourth XOR value. For example, when there is one unreceived frame block and the verification data includes a first XOR value, the computer can XOR the fourth XOR value with the first XOR value to obtain the unreceived video data block.
[0103] In one embodiment, the verification data may include a third XOR value. In this case, the computer device can extract the start time corresponding to the vehicle video frame from the frame data and XOR the start time, the fourth XOR value, and the third XOR value to obtain the unreceived video data block.
[0104] In one embodiment, if the receiving device does not receive frame data, but the receiving device receives all frame block data and check data, the computer device at the receiving device can extract each video data block from each frame block data, and perform bitwise XOR on each video data block to obtain a fifth XOR value, and then perform XOR on the fifth XOR value with the third XOR value, thereby obtaining the start time corresponding to the vehicle video frame.
[0105] In this embodiment, the receiving device can recover the missing frame block data based on the verification data and the received frame block data, thereby minimizing the problem of unrecoverable vehicle video frames due to data loss. The receiving device can also perform data verification on the acquired frame block data based on a first feature value to minimize the problem of vehicle video frame recovery errors due to data transmission errors. Thus, the sending device can reduce transmission latency through block transmission, and the receiving device can recover vehicle video with a stable frame rate based on the received frame block data, thereby achieving both high real-time performance and stable transmission.
[0106] In one embodiment, the vehicle-mounted video receiving method of this application further includes the following steps:
[0107] Receive calibration data from each group;
[0108] If data correction is required, if the number of unreceived frame block data exceeds the preset threshold, the target block sequence identifier corresponding to each unreceived frame block data is determined, and target correction data is determined from each group of correction data according to each target block sequence identifier. The unreceived frame block data is obtained according to the target correction data and each received frame block data.
[0109] Specifically, the receiving device can receive each set of correction data. Each set of correction data includes a block sequence identifier corresponding to each video data block, a second XOR value, and a video frame identifier of the vehicle video frame to be transmitted. Therefore, after determining the block sequence identifier (i.e., the target block sequence identifier) corresponding to each unreceived frame block data, the computer device at the receiving device can determine the target correction data associated with the unreceived frame block data from each set of received correction data based on the target block sequence identifier, and obtain the unreceived video data block based on the target correction data.
[0110] For example, if the received sets of correction data include the XOR values of video data blocks 1 and 2, 3 and 4, 5 and 6, and 7 and 8 respectively, and if the unreceived frame blocks are blocks 1 and 7, the computer can perform a bitwise XOR operation between the second video data block and the XOR values of the first and second video data blocks to calculate the first video data block. Similarly, the computer can perform a bitwise XOR operation between the eighth video data block and the XOR values of the seventh and eighth video data blocks to calculate the seventh video data block.
[0111] In one embodiment, if all video data blocks corresponding to the vehicle-mounted video frame are recovered based on the received sets of correction data and the received frame block data, then all video data blocks can be stitched together to obtain a stitched video frame. The stitched video frame is then decoded to obtain the corresponding video frame data, and played according to the start time corresponding to that video frame data.
[0112] In one embodiment, if it is impossible to recover all video data blocks corresponding to the vehicle video frame based on the received sets of correction data and the received frame block data, the computer device may discard all data corresponding to the vehicle video frame.
[0113] In this embodiment, when the receiving device loses multiple frame block data, it can obtain the lost frame block data through each set of correction data, thereby further achieving stable transmission.
[0114] The in-vehicle video transmitting device provided in the embodiments of this application is described below. The in-vehicle video transmitting device described below can be referred to in correspondence with the in-vehicle video transmitting method described above.
[0115] In one embodiment, this application provides an in-vehicle video transmitting device 300. For example... Figure 3 As shown, the vehicle-mounted video transmitting device 300 includes a video frame determination module 310, a frame block data acquisition module 320, a calculation module 330, a verification data generation module 340, and a transmitting module 350. Wherein:
[0116] The video frame determination module 310 is used to determine the vehicle-mounted video frame to be transmitted;
[0117] The frame block data acquisition module 320 is used to divide the vehicle video frame to be transmitted into blocks to obtain multiple video data blocks, and generate multiple frame block data according to each video data block and the block order identifier corresponding to each video data block.
[0118] The calculation module 330 is used to calculate the first feature value corresponding to the vehicle video frame to be transmitted, and to perform bitwise XOR on each of the video data blocks to obtain the first XOR value.
[0119] The verification data generation module 340 is used to generate verification data based on the first feature value and the first XOR value;
[0120] The sending module 350 is used to send the verification data and each of the frame block data to the receiving device, so that the receiving device can obtain the unreceived frame block data based on the first XOR value and the received frame block data, and / or obtain the frame block data based on the first feature value verification.
[0121] In one embodiment, the vehicle-mounted video transmitting device 300 further includes a step size acquisition module and a correction data acquisition module. The step size acquisition module is used to acquire the XOR step size of the data blocks, and uses this step size as the number of XOR operations M for the data blocks, and sets the flag value k to 0, wherein the XOR step size of the data blocks is a positive integer greater than 1. The correction data acquisition module is used to perform bitwise XOR on the video data blocks from the (k×M+1)th block to the min[((k+1)×M), T]th block according to the block order identifier corresponding to each video data block, to obtain a second XOR value. The block order identifier corresponding to the (k×M+1)th block to the min[((k+1)×M), T]th block, the second XOR value calculated in the current round, and the video frame identifier of the video data frame to be transmitted are used as a set of correction data, and k is updated to (k+1) and entered into the next round; where min[((k+1)×M), T] is the smaller value between the positive integer ((k+1)×M) and the positive integer T. The transmitting module 350 is also configured to transmit each set of correction data to the receiving device, so that the receiving device can obtain the unreceived frame block data based on each set of correction data and the received frame block data.
[0122] In one embodiment, the correction data acquisition module is further configured to update M to (M+N) and update the tag value k to 0 if (k×M+1) is greater than or equal to the total number of blocks in the current round and the number of XOR operations of the data blocks M is less than the total number of blocks, and then proceed to the next round, where N is the XOR step size of the data blocks.
[0123] In one embodiment, the frame block data acquisition module 320 includes a frame block data generation unit. This frame block data generation unit is configured to calculate a second feature value corresponding to each video data block, and to combine the first feature value, the video data block, the second feature value corresponding to the video data block, and the block order identifier corresponding to the video data block as a single frame block data.
[0124] In one embodiment, the vehicle-mounted video transmitting device 300 further includes a frame data acquisition module. This frame data acquisition module is used to acquire the start time corresponding to the vehicle-mounted video frame to be transmitted, and uses the start time and the first feature value as frame data. The transmitting module 350 is further used to transmit the frame data to the receiving device, so that the receiving device verifies the acquired frame block data based on the first feature value, and determines the start time corresponding to the vehicle-mounted data frame to be transmitted.
[0125] In one embodiment, the verification data generation module 340 is used to XOR the first XOR value with the start time to obtain a third XOR value, and use the first feature value and the third XOR value as the verification data.
[0126] The vehicle-mounted video receiving device provided in the embodiments of this application is described below. The vehicle-mounted video receiving device described below can be referred to in correspondence with the vehicle-mounted video receiving method described above.
[0127] In one embodiment, this application provides an in-vehicle video receiving device 400. For example... Figure 4 As shown, the vehicle-mounted video receiving device 400 includes a cutoff time determination module 410, a judgment module 420, a verification module 430, and a correction module 440. Wherein:
[0128] The deadline determination module 410 is used to determine the data reception deadline.
[0129] The judgment module 420 is used to determine whether data verification and / or data correction are required based on the data block data received before the data reception deadline.
[0130] The verification module 430 is used to splice video data blocks in each received frame block data according to the block order identifier in each received frame block data when data verification is required, so as to obtain a spliced video frame, and calculate the third feature value corresponding to the spliced video frame. When verification data is received, the third feature value is compared with the first feature value in the verification data to obtain the verification result.
[0131] The correction module 440 is used to perform bitwise XOR on the video data blocks in each received frame block data when data correction is required, if the number of unreceived frame block data is less than or equal to a preset number threshold, to obtain a fourth XOR value, and to obtain the unreceived frame block data according to the fourth XOR value and the verification data when verification data is received.
[0132] In one embodiment, the vehicle-mounted video receiving device 400 further includes a correction data receiving module. This correction data receiving module is used to receive each set of correction data. The correction module 440 is also used to, when data correction is required, if the number of unreceived frame block data exceeds a preset threshold, determine the target block sequence identifier corresponding to each unreceived frame block data, determine target correction data from each set of correction data based on each target block sequence identifier, and obtain the unreceived frame block data based on the target correction data and the received frame block data.
[0133] In one embodiment, this application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the vehicle video transmission method described in any of the above embodiments or the steps of the vehicle video reception method described in any of the above embodiments.
[0134] In one embodiment, this application also provides a computer device. The computer device stores computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the vehicle-mounted video transmission method described in any of the above embodiments or the steps of the vehicle-mounted video reception method described in any of the above embodiments.
[0135] Indicatively, Figure 5 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. (Refer to...) Figure 5 The computer device 900 includes a processing component 902, which further includes one or more processors, and memory resources represented by memory 901 for storing instructions executable by the processing component 902, such as application programs. The application programs stored in memory 901 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 902 is configured to execute instructions to perform the steps of the in-vehicle video transmission method described in any of the above embodiments or the steps of the in-vehicle video reception method described in any of the above embodiments.
[0136] The computer device 900 may also include a power supply component 903 configured to perform power management of the computer device 900, a wired or wireless network interface 904 configured to connect the computer device 900 to a network, and an input / output (I / O) interface 905. The computer device 900 may operate on an operating system stored in memory 901, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.
[0137] Those skilled in the art will understand that the internal structure of the computer device shown in this application is merely a block diagram of a portion of the structure related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0138] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. In this document, "a," "an," "the," "the," and "its" may also include plural forms unless the context clearly indicates otherwise. "Multiple" refers to at least two, such as 2, 3, 5, or 8, etc. "And / or" includes any and all combinations of the related listed items.
[0139] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0140] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A vehicle-mounted video transmission method characterized by comprising: The method comprises: determining a vehicle-mounted video frame to be transmitted; blocking the vehicle-mounted video frame to be transmitted to obtain a plurality of video data blocks, and generating a plurality of frame block data according to each video data block and the block order identifier corresponding to each video data block; calculating a first feature value corresponding to the vehicle-mounted video frame to be transmitted, and performing bitwise XOR on each video data block to obtain a first XOR value; obtaining a starting time corresponding to the vehicle-mounted video frame to be transmitted, and taking the starting time and the first feature value as frame data; performing XOR on the first XOR value and the starting time to obtain a third XOR value; taking the first feature value and the third XOR value as check data; sending the check data and each frame block data to a receiving device, so that the receiving device obtains the frame block data not received based on the first XOR value and each frame block data received, and checks each frame block data obtained based on the first feature value; transmitting the frame data to the receiving device, so that the receiving device determines the starting time corresponding to the vehicle-mounted video frame corresponding to each frame block data from the frame data when the frame data is received; and checks the frame block data received based on the first feature value when the frame data is received, to avoid that the receiving device cannot perform data checking when the check data is lost.
2. The vehicle-mounted video transmission method according to claim 1, characterized by, The method further comprises: obtaining a data block XOR step, which is a positive integer greater than 1; taking the data block XOR step as the number M of data block XOR, and confirming the marker value k as 0; if (k×M+1) is less than the total number T of blocks corresponding to the vehicle-mounted video frame to be transmitted in the current round, performing bitwise XOR on the (k×M+1)th to min[((k+1)×M), T]th video data blocks according to the block order identifier corresponding to each video data block to obtain a second XOR value, and taking the block order identifier corresponding to the (k×M+1)th to min[((k+1)×M), T]th video data blocks, the second XOR value calculated in the current round, and the video frame identifier of the vehicle-mounted video frame to be transmitted as a set of correction data, updating k to (k+1), and entering the next round; wherein min[((k+1)×M), T] is the smaller value between the positive integer ((k+1)×M) and the positive integer T; transmitting each set of correction data to the receiving device, so that the receiving device obtains the frame block data not received based on each set of correction data and each frame block data received.
3. The vehicle-mounted video transmission method according to claim 2, characterized by, Before the step of transmitting each set of correction data to the receiving device, the method further comprises: if (k×M+1) is greater than or equal to the total number of blocks in the current round, and the number M of data block XOR is less than the total number of blocks, updating M to (M+N), updating the marker value k to 0, and entering the next round, wherein N is the data block XOR step.
4. The vehicle-mounted video transmission method according to claim 1, characterized by, The step of generating the plurality of frame block data according to each of the video data blocks and the block order identifier corresponding to each of the video data blocks comprises: For each of the video data blocks, a second feature value corresponding to the video data block is calculated, and the first feature value, the video data block, the second feature value corresponding to the video data block, and the block order identifier corresponding to the video data block are taken as a frame block data.
5. A vehicle-mounted video receiving method based on the vehicle-mounted video transmitting method according to claim 2 or 3, characterized by, The method comprises: determining a data receiving deadline; judging whether data verification and / or data correction is needed according to each frame block data received before the data receiving deadline; if data verification is needed, splicing the video data blocks in each frame block data received according to the block order identifier in each frame block data received to obtain a spliced video frame, calculating a third feature value corresponding to the spliced video frame, and comparing the third feature value with the first feature value in the verification data to obtain a verification result in the case that verification data is received; if data correction is needed, performing bitwise XOR on the video data blocks in each frame block data received in the case that the number of frame block data not received is less than or equal to a preset number threshold, and obtaining the frame block data not received according to the fourth XOR value and the verification data in the case that verification data is received.
6. The vehicle-mounted video reception method according to claim 5, characterized by, The method further comprises: receiving each group of correction data; if data correction is needed, determining target block order identifiers corresponding to each frame block data not received in the case that the number of frame block data not received is greater than the preset number threshold, determining target correction data from each group of the correction data according to each of the target block order identifiers, and obtaining the frame block data not received according to the target correction data and each frame block data received.
7. A vehicle-mounted video transmission apparatus characterized by comprising: The device comprises: a video frame determination module configured to determine a vehicle-mounted video frame to be transmitted; a frame block data acquisition module configured to divide the vehicle-mounted video frame to be transmitted into a plurality of video data blocks, and generate a plurality of frame block data according to each of the video data blocks and a block order identifier corresponding to each of the video data blocks; a calculation module configured to calculate a first feature value corresponding to the vehicle-mounted video frame to be transmitted, and perform bitwise XOR on each of the video data blocks to obtain a first XOR value; a frame data acquisition module configured to acquire a starting time corresponding to the vehicle-mounted video frame to be transmitted, and take the starting time and the first feature value as frame data; a verification data generation module configured to perform XOR on the first XOR value and the starting time to obtain a third XOR value, and take the first feature value and the third XOR value as verification data; a sending module configured to send the verification data and each of the frame block data to a receiving device, so that the receiving device obtains frame block data not received based on the first XOR value and each frame block data received, and / or verifies each frame block data obtained based on the first feature value. The sending module is further configured to transmit the frame data to the receiving device, so that the receiving device determines a starting time corresponding to a vehicle-mounted video frame corresponding to each frame block data from the frame data when the frame data is received, and checks the received frame block data based on the first feature value when the frame data is received, so as to avoid that the receiving device cannot perform data checking when data loss occurs.
8. A vehicle-mounted video receiving apparatus based on the vehicle-mounted video receiving method according to claim 5 or 6, characterized by The apparatus comprises: A cutoff time determining module configured to determine a data receiving cutoff time; A judging module configured to judge whether data checking and / or data correction is needed according to each frame block data received before the data receiving cutoff time; A checking module configured to, when data checking is needed, splice video data blocks in each frame block data received according to a block order identifier in each frame block data received to obtain a spliced video frame, and calculate a third feature value corresponding to the spliced video frame, and compare the third feature value with a first feature value in the checking data to obtain a checking result when the checking data is received; A correction module configured to, when data correction is needed, perform bitwise XOR on video data blocks in each frame block data received to obtain a fourth XOR value if a number of frame block data not received is less than or equal to a preset number threshold, and obtain frame block data not received according to the fourth XOR value and the checking data when the checking data is received.
9. A storage medium, characterized by The storage medium has computer readable instructions stored therein, and the computer readable instructions are executed by one or more processors to cause the one or more processors to perform steps of the vehicle-mounted video sending method according to any one of claims 1 to 4, or perform steps of the vehicle-mounted video receiving method according to claim 5 or 6.
10. A computer device, comprising: Comprise: One or more processors, and a memory; The memory has computer readable instructions stored therein, and the computer readable instructions are executed by the one or more processors to perform steps of the vehicle-mounted video sending method according to any one of claims 1 to 4, or perform steps of the vehicle-mounted video receiving method according to claim 5 or 6.
Citation Information
Patent Citations
Video tamper-proofing method and video verification method
CN113660389A
Image data communication method and image data communication device
KR1020150079367A