Data transmission method and device, electronic equipment and computer storage medium
By detecting and repairing corrupted data packets in the video surveillance system, and combining channel retransmission and physical layer adjustments, the problem of corrupted data packets in the MIPI CSI-2 interface was solved, thereby improving the accuracy and efficiency of data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG DAHUA TECH CO LTD
- Filing Date
- 2025-12-08
- Publication Date
- 2026-04-10
AI Technical Summary
In the field of video surveillance, the MIPI CSI-2 interface suffers from data packet corruption or loss due to physical layer interference and channel congestion, affecting the accuracy and efficiency of data transmission.
By detecting corrupted data packets in the data stream, if the number is small, they are retransmitted; if the number is large, they are located and repaired. Error data is repaired using checksums, and the channel operating mode is dynamically adjusted at the physical layer to match the bandwidth capacity, thereby reducing image resolution or frame rate.
It improves the accuracy and efficiency of data transmission, ensures the reliable transmission of critical data, and optimizes the transmission efficiency of non-critical data.
Smart Images

Figure CN121842166A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data processing, and in particular to a data transmission method and device, electronic equipment and computer storage medium. BACKGROUND
[0002] In the field of video monitoring (for example, security video monitoring), the interface (for example, MIPI CSI-2 interface) in the data transmission system is often damaged or lost due to physical layer interference and channel congestion in the data stream of the transmitted data. Therefore, there is an urgent need for a data transmission method to ensure the accuracy of data transmission. SUMMARY
[0003] The present application provides a data transmission method for ensuring the accuracy and efficiency of data transmission.
[0004] In a first aspect, the present application provides a data transmission method, comprising:
[0005] Obtaining each data stream transmitted by each channel respectively;
[0006] For any one channel, determining the number of damaged data packets in the data stream transmitted by the channel according to the data stream;
[0007] Determining whether the number of damaged data packets is less than a specified threshold;
[0008] If yes, sending a data retransmission instruction to a sending end connected to the channel, so that the sending end re-sends the original data packet corresponding to the damaged data packet;
[0009] If no, locating the error data in the first data packet according to the data in the first data packet and the check code, to obtain the error data in the first data packet; wherein the first data packet is any one of the damaged data packets;
[0010] Repairing the error data in the first data packet using the check code to obtain a repaired first data packet;
[0011] Replacing the first data packet in the data stream with the repaired first data packet, and sending the data stream.
[0012] In the present application, when it is determined that the transmitted data stream has damaged data packets, if it is determined that the number of damaged data packets is small, data retransmission is performed, and if it is determined that the data of damaged data packets is large, the damaged data is located and repaired, thereby avoiding a long response time of retransmitted data. Therefore, the present application ensures the accuracy and transmission efficiency of data.
[0013] In a possible implementation, the determining the number of damaged data packets in the data stream according to the data stream transmitted by the channel comprises:
[0014] performing a cyclic redundancy check (CRC) on the data in the data packet to obtain an actual CRC code;
[0015] comparing the actual CRC code with a standard CRC code stored in a packet header of the data packet;
[0016] if the actual CRC code is the same as the standard CRC code, determining that the data packet is not damaged; or
[0017] if the actual CRC code is not the same as the standard CRC code, determining that the data packet is damaged.
[0018] In the embodiments of the present application, the actual CRC code is obtained by performing a cyclic redundancy check (CRC) on the data in the data packet, and the actual CRC code is compared with a standard CRC code stored in a packet header of the data packet, and whether the data packet is damaged is determined based on the comparison result, thereby ensuring the accuracy of the determined result.
[0019] In a possible implementation, the locating the error data in the first data packet according to the data in the first data packet and the check codes comprises:
[0020] determining each temporary code based on each data in the first data packet, wherein the number of the temporary codes is the same as the number of the check codes, and each temporary code has a corresponding check code, the check code is determined by using each original data corresponding to the first data packet according to a preset calculation manner, and the calculation manners corresponding to different check codes are different, and the temporary code corresponding to each check code is determined by using each data in the first data packet according to the calculation manner corresponding to the check code;
[0021] determining a target position of the error data in the ordering of the data by using the temporary codes and the check codes;
[0022] determining the data at the target position in the data as the error data.
[0023] In the embodiments of the present application, each temporary code is determined based on each data in the first data packet, and a target position of the error data in the ordering of the data is determined by using the temporary codes and the check codes, thereby obtaining the error data, and the accuracy of the determined error data is ensured.
[0024] In a possible implementation, the temporary codes include a first temporary code, a second temporary code and a third temporary code; the check codes include a first check code, a second check code and a third check code; the first temporary code corresponds to the first check code, the second temporary code corresponds to the second check code, and the third temporary code corresponds to the third check code.
[0025] The determining the target position of the error data in the ordering of the data by using the temporary codes includes:
[0026] Subtracting the first temporary code from the first check code to obtain a first intermediate value;
[0027] Dividing the second intermediate value from the first intermediate value to obtain the target position; the second intermediate value is a difference between the second temporary code and the second check code.
[0028] In a possible implementation, before determining the data at the target position in the data as the error data, the method further includes:
[0029] Obtaining a verification position by using the third intermediate value and the first intermediate value; the third intermediate value is a difference between the third temporary value and the third check value;
[0030] If the verification position is the same as the target position, it is determined that the verification is passed, and the data at the target position in the data is determined as the error data;
[0031] If the verification position is not the same as the target position, it is determined that the verification is not passed, and the method ends.
[0032] In the embodiments of the present application, after the target position corresponding to the error data is determined, verification is needed, and the data corresponding to the target position is determined as the error data only when the verification is passed, which further improves the accuracy of the determined error data.
[0033] In a possible implementation, the obtaining the verification position by using the third intermediate value and the first intermediate value includes:
[0034] Dividing the third intermediate value from the first intermediate value to obtain a fourth intermediate value;
[0035] Squaring the fourth intermediate value to obtain the verification position.
[0036] In a possible implementation, after determining the number of damaged data packets in the data stream transmitted according to the channel, the method further includes:
[0037] determining whether a backup channel exists in the channel;
[0038] if the backup channel exists, obtaining the data stream from the backup channel and transmitting the data stream;
[0039] if the backup channel does not exist, performing the step of determining whether the number of damaged data packets is less than a specified threshold.
[0040] In the embodiments of the application, the corresponding data is obtained through the backup channel to ensure the accuracy of data transmission.
[0041] In a possible implementation, before determining whether the number of damaged data packets is less than a specified threshold, the method further includes:
[0042] if it is determined that there are damaged data packets in the data stream, closing the channel;
[0043] adjusting the working mode of each channel based on the number of closed channels, wherein the working mode is used to represent the number of opened channels;
[0044] reducing the resolution and / or frame rate of image data in the data stream.
[0045] In the embodiments of the application, the faulty channel is closed in real time and the working mode of the channel is reconfigured and adjusted through dynamic degradation of the transmission mode at the physical layer, and the image resolution or frame rate is adaptively adjusted to match the bandwidth capacity after degradation, thereby ensuring the continuous transmission of the basic data stream.
[0046] In a possible implementation, the data stream includes image data and / or structural data.
[0047] After obtaining the data streams respectively transmitted by each channel, the method further includes:
[0048] for any one channel, if there is a damaged second data packet in the data stream transmitted by the channel, and the damaged data in the second data packet is image data, detecting a damaged image block in the image data;
[0049] determining a repair mask of the image block by using adjacent frames of the image data;
[0050] repairing the image data by using the repair mask to obtain a repaired image;
[0051] Replace the image data in the second data packet with the repaired image data.
[0052] In the embodiments of the present application, visual compensation based on interpolation of adjacent pixels is performed on the image data that cannot be completely repaired, so as to ensure the accuracy of data transmission.
[0053] In a possible implementation, the detecting of the damaged image block in the image data comprises:
[0054] Obtaining the YUV check value corresponding to each image block in the header of the second data packet;
[0055] For any one image block in the image data, determining the YUV actual value of the image according to the YUV value of each pixel point in the image block;
[0056] If the YUV actual value of the image block is different from the YUV check value of the image block, it is determined that the image block is damaged; or
[0057] If the YUV actual value of the image block is the same as the YUV check value of the image block, it is determined that the image block is not damaged.
[0058] In a possible implementation, the data stream comprises image data and structure data.
[0059] After obtaining the data stream transmitted by each channel respectively, the method further comprises:
[0060] For any one channel, if there is a damaged second data packet in the data stream transmitted by the channel;
[0061] If the damaged data in the second data packet is structure data, obtaining the priority label of the structure data from the header of the second data packet;
[0062] If the priority label is a first specified label, sending a data retransmission instruction to the sending end to make the sending end perform data retransmission, wherein the first specified label is used to represent that the structure data is critical data.
[0063] If the priority is a second specified label, discarding the data; wherein the second specified label is used to represent that the structure data is non-critical data.
[0064] In the embodiments of the present application, the packet loss strategy is implemented on the data with lower priority, so as to ensure the efficiency of data transmission.
[0065] In a second aspect, the embodiments of the present application provide a data transmission method, which comprises:
[0066] acquire each data stream transmitted by each channel respectively;
[0067] For any one channel, determine whether there is a damaged data packet in the data stream transmitted by the channel according to the data stream;
[0068] If yes, close the channel;
[0069] And adjust the working mode of each channel based on the number of closed channels; wherein the working mode is used to represent the number of channels that have been opened;
[0070] Reduce the resolution and / or frame rate of image data in the data stream.
[0071] In the embodiment of the application, the dynamic degradation transmission mode is used in the physical layer to close the faulty channel in real time, and the working mode of the channel is reconfigured and adjusted, and the image resolution or frame rate is adaptively adjusted to match the bandwidth capacity after degradation, thereby ensuring the continuous transmission of the basic data stream and ensuring the accuracy and efficiency of data transmission.
[0072] In a third aspect, the embodiment of the application provides a data transmission method, the method comprising:
[0073] Acquire each data stream transmitted by each channel respectively;
[0074] For any one channel, if there is a damaged second data packet in the data stream transmitted in the channel, determine the data type of the second data packet;
[0075] Repair the second data packet according to the data type of the second data packet to obtain a repaired data packet;
[0076] Replace the second data packet in the data stream with the repaired data packet to obtain a repaired data stream, and send the repaired data stream.
[0077] In the embodiment of the application, the damaged data packet is repaired by the data type of the data in the data packet, which ensures the accuracy of the data.
[0078] In a fourth aspect, the embodiment of the application provides a data transmission device, the device comprising:
[0079] A first acquisition module for acquiring each data stream transmitted by each channel respectively;
[0080] A damaged data packet determination module for determining the number of damaged data packets in the data stream transmitted by any one channel according to the data stream;
[0081] A first judgment module for judging whether the number of damaged data packets is less than a specified threshold.
[0082] the instruction sending module is configured to send a data retransmission instruction to a sending end connected with the channel, if yes, so that the sending end retransmits original data packets corresponding to the damaged data packets;
[0083] the data positioning module is configured to position error data in the first data packet according to data in the first data packet and the check code, if no, to obtain the error data in the first data packet, wherein the first data packet is any one of the damaged data packets;
[0084] the first data repairing module is configured to repair the error data in the first data packet by using the check code to obtain the repaired first data packet;
[0085] the first data replacing module is configured to replace the first data packet in the data stream by using the repaired first data packet, and send the data stream.
[0086] In a fifth aspect, an embodiment of the present application provides a data transmission device, and the device comprises:
[0087] the second obtaining module is configured to obtain data streams respectively transmitted by channels;
[0088] the second judging module is configured to determine, for any one channel, whether a data stream transmitted by the channel has a damaged data packet according to the data stream;
[0089] the channel closing module is configured to close the channel, if yes;
[0090] the working mode adjusting module is configured to adjust working modes of the channels based on a number of closed channels, wherein the working mode is used to represent a number of opened channels;
[0091] the image adjusting module is configured to reduce resolution and / or frame rate of image data in the data stream.
[0092] In a sixth aspect, an embodiment of the present application provides a data transmission device, and the device comprises:
[0093] the third obtaining module is configured to obtain data streams respectively transmitted by channels;
[0094] the third judging module is configured to determine a data type of a second data packet in a data stream transmitted by any one channel, if the data stream has the damaged second data packet;
[0095] the second data repairing module is configured to repair the second data packet according to the data type of the second data packet to obtain a repaired data packet;
[0096] The second data replacement module is configured to replace a second data packet in the data stream with the repaired data packet to obtain a repaired data stream, and transmit the repaired data stream.
[0097] In a seventh aspect, an electronic device is provided, which includes a memory and a processor, wherein:
[0098] The memory is configured to store a computer program.
[0099] The processor is configured to execute the computer program stored in the memory to implement the data transmission method described above.
[0100] In an eighth aspect, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps of the data transmission method described above.
[0101] The technical effects that can be achieved by each of the above-mentioned second to eighth aspects and each aspect are described above with respect to the technical effects that can be achieved by each of the possible schemes of the first aspect, and thus will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0102] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0103] Figure 1 The flowchart of the data transmission method provided by the embodiments of the present application is shown.
[0104] Figure 2 The flowchart of determining the error data in the first data packet provided by the embodiments of the present application is shown.
[0105] Figure 3 The flowchart of the data transmission method of the hardware layer provided by the embodiments of the present application is shown.
[0106] Figure 4 The flowchart of the data processing of the software layer provided by the embodiments of the present application is shown.
[0107] Figure 5 The flowchart of the data repair of the image data provided by the embodiments of the present application is shown.
[0108] Figure 6 The flowchart of the repair of the structure data provided by the embodiments of the present application is shown.
[0109] Figure 7 Fig. 1 is a structural schematic diagram of a data transmission device according to an embodiment of the present application;
[0110] Figure 8 Fig. 2 is another structural schematic diagram of a data transmission device according to an embodiment of the present application;
[0111] Figure 9 Fig. 3 is a third structural schematic diagram of a data transmission device according to an embodiment of the present application;
[0112] Figure 10 Fig. 4 is a structural schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0113] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings. The specific operation method in the method embodiment can also be applied to the device embodiment or the system embodiment.
[0114] In the description of the present application, "multiple" is understood as "at least two". The association relationship of "and / or" describing the associated objects means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. A is connected with B, which can represent the following two cases: A is directly connected with B and A is connected with B through C. In addition, in the description of the present application, "first", "second", and the like are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating or implying order.
[0115] At present, in the field of video monitoring (for example, security video monitoring), the interface (for example, MIPICSI-2 interface) in the data transmission system often causes the data packets in the transmitted data stream to be damaged or lost due to physical layer interference and channel congestion. Therefore, there is an urgent need for a data transmission method to ensure the accuracy of data transmission.
[0116] To this end, the embodiment of the present application provides a data transmission method. When it is determined that the transmitted data stream has damaged data packets, if it is determined that the number of damaged data packets is small, data retransmission will be performed. If it is determined that the number of damaged data packets is large, the damaged data will be located and repaired, avoiding a long response time of retransmitted data. Therefore, the accuracy and transmission efficiency of data are ensured in the embodiment of the present application.
[0117] In the high-speed data transmission process in the embodiment of the present application, when the system detects that a data channel (Lane) fails to pass the check, the integrity and reliability of data transmission can be dynamically ensured through the fault-tolerant mechanism of at least one of the hardware layer, the protocol layer and the application layer. The methods corresponding to the three layers in the embodiment of the present application are described below.
[0118] First, the data transmission method corresponding to the protocol layer in the embodiment of the present application is introduced. Referring to FIG. 1, a flowchart of a data transmission method provided by the embodiment of the present application is shown, and the specific implementation process of the method is as follows: Figure 1
[0119] Step 101: Obtain each data stream transmitted by each channel respectively;
[0120] Step 102: For any one channel, determine the number of damaged data packets in the data stream transmitted by the channel according to the data stream;
[0121] In a possible implementation, step 102 can be specifically implemented as follows: for a data packet in any one data stream, perform CRC check on the data in the data packet to obtain an actual CRC code; compare the actual CRC code with a standard CRC code stored in the header of the data packet; if the actual CRC code is the same as the standard CRC code, it is determined that the data packet is not damaged; if the actual CRC code is different from the standard CRC code, it is determined that the data packet is damaged.
[0122] The CRC check method in the embodiment of the present application is to perform XOR operation on the data in the data packet and a preset password to obtain the actual CRC code. The standard CRC code in the embodiment of the present application is also obtained by performing XOR operation on the original data and the preset password, but the standard CRC code is determined at the sending end and is stored in the header of the data packet.
[0123] It should be noted that the password in the embodiment of the present application can be a numerical value and a letter, etc. The specific value of the preset password is not limited in the embodiment of the present application, and the preset numerical value can be set according to the actual situation.
[0124] In a possible implementation, before step 103 is performed, the data can also be transmitted through the following way: judging whether there is a backup channel for the channel; if there is, obtaining the data stream from the backup channel and sending the data stream; if there is not, performing step 103.
[0125] In the embodiments of the present application, whether the backup channel corresponding to the channel exists can be determined through the identifier corresponding to the channel. If the identifier of the channel is the first specified identifier, it is determined that the backup channel corresponding to the channel exists. If the identifier of the channel is the second specified identifier, it is determined that the backup channel corresponding to the channel does not exist.
[0126] For example, if the first specified identifier is "1" and the second specified identifier is "0", the identifier corresponding to channel 1 is 1, and it is determined that the backup channel corresponding to channel 1 exists. If the identifier corresponding to channel 2 is "0", it is determined that the backup channel corresponding to channel 2 does not exist.
[0127] It should be noted that the first specified identifier and the second specified identifier in the embodiments of the present application can be set according to the actual situation, and the first specified identifier and the second specified identifier are not limited in the embodiments of the present application.
[0128] Step 103: Determine whether the number of damaged data packets is less than a specified threshold. If yes, execute step 104, and if no, execute step 105.
[0129] In a possible implementation, in order to solve the problem of data transmission interruption caused by channel damage, before step 103 is executed, if it is determined that there are damaged data packets in the data stream, the channel is closed. The working mode of each channel is adjusted based on the number of closed channels. The working mode is used to represent the number of channels that have been opened. The resolution and / or frame rate of the image data in the data stream are reduced.
[0130] In the embodiments of the present application, the method of data transmission at the hardware layer is executed, and details can be found in the following Figure 3 Corresponding content, the embodiments of the present application will not be described here.
[0131] It should be noted that the specific value of the specified threshold is not limited in the embodiments of the present application, and the specified threshold in the embodiments of the present application can be set according to the actual situation.
[0132] Step 104: Send a data retransmission instruction to the sending end connected to the channel, so that the sending end retransmits the original data packet corresponding to the damaged data packet.
[0133] For example, the data stream sent by the sending end includes data packet 1, data packet 2 and data packet 3. If data 2 is damaged in the process of data stream transmission, that is, the original data in data packet 2 is: a, b, c, and the data received by the receiving end in data packet 2 is: a, b, b. The receiving end sends a data retransmission instruction to the sending end to retransmit the data packet, and the sending end retransmits the data packet, that is, data packet 2: [a, b, c].
[0134] Step 105: locating error data in the first data packet according to the data in the first data packet and the check code, to obtain error data in the first data packet; wherein the first data packet is any one of the damaged data packets;
[0135] Next, the way of determining error data in the first data packet in the embodiment of the application is introduced, Figure 2 The flowchart for determining error data in the first data packet is specifically as follows:
[0136] Step 201: determining each temporary code based on each data in the first data packet; wherein the number of temporary codes is the same as the number of check codes, and there is a corresponding check code for any one temporary code, the check code is determined by using each original data corresponding to the first data packet according to the preset calculation method, and the calculation methods corresponding to different check codes are not the same, and the temporary code corresponding to any one check code is determined by using each data in the first data packet according to the calculation method corresponding to the check code;
[0137] In the embodiment of the application, each temporary code includes a first temporary code, a second temporary code and a third temporary code. The check code includes a first check code, a second check code and a third check code. The first temporary code corresponds to the first check code, the second temporary code corresponds to the second check code, and the third temporary code corresponds to the third check code.
[0138] In a possible implementation, each temporary code is determined by the following method:
[0139] First temporary code: adding each data in the first data packet to obtain the first temporary code. The first temporary code can be obtained by formula (1):
[0140] P1 ′ =D1+D2+D3+…+D n ……(1);
[0141] Wherein, P1 is the first temporary code, D1~D n is each data in the data packet, and n is the total number of data in the data packet.
[0142] Second temporary code: the sum of the products between each data in the first data packet and the serial number corresponding to each data is determined as the second temporary code. Wherein, the serial number corresponding to any one data is used to represent the position of the data in the data packet, and the serial number corresponding to any one data can be directly obtained. The second temporary code can be obtained by formula (2):
[0143] P2 ′D1 x q1 + D2 x q2 + D3 x q3 +... + Dn x qn (1) n P2 n (2);
[0144] Wherein, q1-q4 are the respective serial numbers corresponding to each data.
[0145] The third temporary code is determined by the sum of the product of each data in the first data packet and the square of the respective serial number corresponding to each data. The third temporary code can be obtained by formula (3):
[0146]
[0147] It should be noted that the preset calculation method in the embodiments of the present application can be set according to the actual situation, and the embodiments of the present application are not limited herein.
[0148] Step 202: determining the target position of the error data in the ordering of the data by using the temporary codes and the check codes.
[0149] In one possible implementation, step 202 can be specifically implemented by subtracting the first temporary code from the first check code to obtain a first intermediate value, and dividing a second intermediate value from the first intermediate value to obtain the target position, wherein the second intermediate value is the difference between the second temporary code and the second check code. The target position can be obtained by formula (4):
[0150]
[0151] Wherein, i is the target position, P2 ′ is the second temporary code, P2 is the second check code, P1 ′ is the first temporary code, and P1 is the first check code.
[0152] Step 203: determining the data at the target position in the data as the error data.
[0153] In order to ensure the accuracy of the determined error data, in one possible implementation, before step 203 is executed, a verification position is obtained by using the third intermediate value and the first intermediate value, wherein the third intermediate value is the difference between the third temporary value and the third check value; if the verification position and the target position are the same, it is determined that the verification is passed, and step 203 is executed; if the verification position and the target position are not the same, it is determined that the verification is not passed, and the process is ended.
[0154] In a possible implementation, the verification position is determined by dividing the third intermediate value by the first intermediate value to obtain a fourth intermediate value, and then taking the square root of the fourth intermediate value to obtain the verification position. The verification position can be obtained by formula (5):
[0155]
[0156] where i ′ is the verification position, n1 is the first intermediate value, and P3 is the third check code.
[0157] Step 106: repairing the error data in the first data packet using the check code to obtain a repaired first data packet;
[0158] In a possible implementation, step 106 can be specifically implemented by subtracting the error data from the first intermediate value to obtain repaired data, replacing the error data with the repaired data, deleting the check code in the first data packet, and obtaining the repaired first data packet.
[0159] For example, the data packet sent by the sending end is [1, 2, 3, 4, 10, 30, 100], where [1, 2, 3, 4] is the corresponding data in the data packet, 10 is the first check code, 30 is the second check code, and 100 is the third check code. If an error occurs during transmission, the data packet received by the receiving end is [1, 7, 3, 4, 10, 30, 100].
[0160] At this time, the receiving end determines the temporary codes based on the data in the received data packet: the first temporary code P1 ′ = 1 + 7 + 3 + 4 = 15. The second temporary code P2 ′ = 1 * 1 + 7 * 2 + 3 * 3 + 4 * 4 = 1 + 14 + 9 + 16 = 40. The third temporary code P3 ′ = 1 * 1 + 7 * 4 + 3 * 9 + 4 * 16 = 1 + 28 + 27 + 64 = 120. At this time, it can be determined that the first temporary code 15 is not equal to the first check code 10, the second temporary code 40 is not equal to the second check code 30, and the third temporary code 120 is not equal to the third check code 100. Therefore, it is more certain that the received data packet is incorrect. Conclusion: the accompanying formula [P1'-P1, P2'-P2, P3'-P3] = [5, 10, 20] is not zero, indicating that the data is incorrect. The target position of the error data is located as follows: assuming that the error occurs at position i, and the error value is e:
[0161] 1. Accompanying formula 1: e = 5
[0162] 2. Accompanying formula 2: e*i = 10 → i = 2. At this time, the target position is obtained as 2, that is, the data 7 in the data packet is erroneous.
[0163] 3. Verification: e*i 2 = 20 → 5*4 = 20 (verification passed). At this time, it is determined that the data 7 is erroneous data.
[0164] Finally, the positioning result: the error occurs at the 2nd byte (i = 2), and the error value e = 5 (that is, the correct value = erroneous data - e = 7 - 5 = 2). At this time, it is determined that the repaired data is 2. Then, the 2nd byte is corrected from 7 to 2. The repaired data packet is obtained as [1, 2, 3, 4, 10, 30, 100], and then the check bit is discarded to obtain the original data: [1, 2, 3, 4], and the original data is output.
[0165] Step 107: replacing the first data packet in the data stream with the repaired first data packet, and sending the data stream.
[0166] In a possible implementation, if the obtained data stream includes image data and structure data, the data can be repaired by using a corresponding data repair method of a software layer, and specific content can be found in Figure 5 and Figure 6 corresponding content, which will not be described herein again. In the embodiment of the application, the type of data corresponding to the data processing method of the protocol layer is other data than image data and structure data, and the method corresponding to the protocol layer is used for processing.
[0167] Next, the data transmission method of the hardware layer in the embodiment of the application will be described. As shown in Figure 3 , it is a flowchart of the data transmission method of the hardware layer, which can specifically include the following steps:
[0168] Step 301: obtaining each data stream transmitted by each channel respectively;
[0169] Step 302: for any one channel, determining whether the data stream transmitted by the channel includes a damaged data packet according to the data stream, if yes, performing step 303, and if not, ending;
[0170] In the embodiment of the application, the way of determining whether the data stream includes a damaged data packet is the same as the number of damaged data packets in step 102, that is, if the number of damaged data packets is greater than 0, it is determined that the data stream includes a damaged data packet, and if not, it is determined that the data stream does not include a damaged data packet. The embodiment of the application will not be described herein again.
[0171] Step 303: closing the channel;
[0172] Step 304: adjusting the working mode of each channel based on the number of closed channels; wherein the working mode is used to represent the number of opened channels;
[0173] In a possible implementation, the number of currently opened channels is obtained according to the number of closed channels and the total number of channels, and the working mode corresponding to the number of currently opened channels is determined by using a preset corresponding relationship between the number of opened channels and the working mode.
[0174] In the embodiment of the present application, the number of currently opened channels is obtained by subtracting the number of closed channels from the total number of channels.
[0175] For example, the original working mode is 8line, one channel is closed at this time, the number of currently opened channels is 7, and according to the corresponding relationship, if it is determined that the working mode should be adjusted to 4line, the working mode is adjusted, that is, three channels are closed.
[0176] It should be noted that the corresponding relationship between the number of opened channels and the working mode in the embodiment of the present application can be set according to the actual situation, which is not limited in the embodiment of the present application.
[0177] Step 305: reducing the resolution and / or frame rate of image data in the data stream.
[0178] The specific way of reducing the resolution or frame rate of image data is not limited in the embodiment of the present application.
[0179] Finally, the data processing method of the software layer in the embodiment of the present application is introduced. Figure 4 The flowchart of the data processing of the software layer is shown in the figure, which can include the following steps:
[0180] Step 401: obtaining each data stream transmitted by each channel respectively;
[0181] Step 402: for any one channel, if there is a damaged second data packet in the data stream transmitted by the channel, determining the data type of the second data packet;
[0182] The data type is included in the packet header of the data packet in the embodiment of the present application, and the data type in the embodiment of the present application includes image data and structured data.
[0183] Step 403: repairing the second data packet according to the data type of the second data packet to obtain a repaired data packet.
[0184] Next, the repair methods of each type of data are introduced, such as Figure 5As shown, a flowchart for data repair of image data is shown, and can include the following steps:
[0185] Step 501: For any channel, if there is a damaged second data packet in the data stream transmitted in the channel, and the damaged data in the second data packet is image data, detecting the damaged image block in the image data;
[0186] In a possible implementation, step 501 can be specifically implemented as follows: obtaining the YUV check value corresponding to each image block in the packet header of the second data packet; for any image block in the image data, determining the YUV actual value of the image according to the YUV value of each pixel point in the image block; if the YUV actual value of the image block is different from the YUV check value of the image block, it is determined that the image block is damaged; or, if the YUV actual value of the image block is the same as the YUV check value of the image block, it is determined that the image block is not damaged.
[0187] In the embodiment of the application, the YUV actual value in the image block is determined by: performing XOR operation on the YUV values of each pixel point in the image block to obtain the YUV actual value in the image block.
[0188] Step 502: determining a repair mask of the image block using adjacent frames of the image data;
[0189] In the embodiment of the application, the adjacent frames of the image data are the previous frame of the image data and the next frame of the image data.
[0190] In a possible implementation, step 502 can be specifically implemented as follows: inputting the previous frame of the image data and the next frame of the image data into an optical flow algorithm to obtain a motion vector field, inputting the damaged image block and the motion vector field into a pre-trained convolutional neural network model to obtain a repair mask.
[0191] The optical flow algorithm and the convolutional neural network model in the embodiment of the application both belong to the prior art, and will not be described here in the embodiment of the application. The optical flow algorithm in the embodiment of the application can be a Horn-Schunck optical flow algorithm, but the optical flow algorithm is not limited herein.
[0192] Step 503: repairing the image data using the repair mask to obtain a repaired image;
[0193] In a possible implementation, step 503 can be specifically implemented as follows: performing interpolation processing on the repair mask and the image data to obtain the repaired image data.
[0194] Step 504: replacing the image data in the second data packet with the repaired image data.
[0195] The image data in the second data packet after replacement in the embodiments of the present application is all undamaged data.
[0196] Step 404: replacing the second data packet in the data stream with the repaired data packet to obtain a repaired data stream, and sending the repaired data stream.
[0197] After introducing the repair method of the image data, the structural data in the embodiments of the present application is introduced. Figure 6 The flowchart for repairing the structural data can include the following steps:
[0198] Step 601: for any channel, if there is a damaged second data packet in the data stream transmitted in the channel;
[0199] Step 602: if the damaged data in the second data packet is structural data, obtaining the priority label of the structural data from the packet header of the second data packet;
[0200] Step 603: if the priority label is a first specified label, sending a data retransmission instruction to the sending end to make the sending end perform data retransmission, wherein the first specified label is used to represent that the structural data is key data.
[0201] Step 604: if the priority is a second specified label, discarding the data; wherein the second specified label is used to represent that the structural data is non-key data.
[0202] For example, the first specified label is R0, R1, R2, and the second specified label is R3, R4, R5, R6, R7. If it is determined that the priority label of the structural data is R1, a data retransmission instruction is sent to the sending end. If the priority label of the structural data is R6, the structural data is directly discarded.
[0203] It should be noted that the first specified label and the second specified label in the embodiments of the present application can be set according to the actual situation, and the embodiments of the present application do not limit the specific values of the first specified label and the second specified label.
[0204] The schemes of the hardware layer, the protocol layer and the software layer in the embodiments of the present application can be used independently or in combination. If used in combination, the order is: hardware layer, protocol layer and software layer. Therefore, in the embodiments of the present application, the cooperative mechanism of the hardware layer for rapid degradation, the protocol layer for intelligent repair and the software layer for flexible processing can be used to maximize the use of bandwidth while ensuring the reliable transmission of key data, thereby reducing the invalid retransmission traffic and improving the transmission efficiency of non-key data.
[0205] Based on the same inventive concept, the present application also provides a data transmission device, which is described below with reference to Figure 7 The device 700 comprises:
[0206] A first acquisition module 710 is configured to acquire data streams transmitted by respective channels.
[0207] A damaged data packet determination module 720 is configured to determine the number of damaged data packets in a data stream transmitted by a channel according to the data stream.
[0208] A first determination module 730 is configured to determine whether the number of damaged data packets is less than a specified threshold.
[0209] An instruction sending module 740 is configured to send a data retransmission instruction to a sending end connected to the channel if the number of damaged data packets is less than the specified threshold, so that the sending end retransmits original data packets corresponding to the damaged data packets.
[0210] A data positioning module 750 is configured to position error data in a first data packet according to data in the first data packet and a check code if the number of damaged data packets is not less than the specified threshold, to obtain the error data in the first data packet. The first data packet is any one of the damaged data packets.
[0211] A first data repair module 760 is configured to repair the error data in the first data packet using the check code, to obtain a repaired first data packet.
[0212] A first data replacement module 770 is configured to replace the first data packet in the data stream with the repaired first data packet and send the data stream.
[0213] The present application also provides another data transmission device, which is described below with reference to Figure 8 The device 800 comprises:
[0214] A second acquisition module 810 is configured to acquire data streams transmitted by respective channels.
[0215] The second judgment module 820 is used to determine, for any given channel, whether there are corrupted data packets in the data stream transmitted through the channel;
[0216] The channel shutdown module 830 is used to shut down the channel if the condition is met.
[0217] The operating mode adjustment module 840 is used to adjust the operating mode of each channel based on the number of closed channels; wherein the operating mode is used to represent the number of open channels;
[0218] Image adjustment module 850 is used to reduce the resolution and / or frame rate of image data in the data stream.
[0219] This application also provides another data transmission device, see [link to relevant documentation] Figure 9 The device 900 includes:
[0220] The third acquisition module 910 is used to acquire each data stream transmitted by each channel respectively;
[0221] The third judgment module 920 is used to determine the data type of the second data packet if there is a corrupted second data packet in the data stream transmitted in any channel.
[0222] The second data repair module 930 is used to repair the second data packet according to the data type of the second data packet to obtain the repaired data packet;
[0223] The second data replacement module 940 is used to replace the second data packet in the data stream with the repaired data packet to obtain the repaired data stream and send the repaired data stream.
[0224] Based on the same inventive concept, this application also provides an electronic device. The electronic device can realize the function of the aforementioned data transmission device, see reference... Figure 10 The electronic device includes:
[0225] At least one processor 1001 and a memory 1002 connected to at least one processor 1001. In this embodiment, the specific connection medium between the processor 1001 and the memory 1002 is not limited. Figure 10 The example shown is the connection between processor 1001 and memory 1002 via bus 1000. Bus 1000 is... Figure 10 The connections between other components are shown in bold lines only and are not intended to be limiting. The Bus 1000 can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 10Only one bus is shown for each bus interface for simplicity, but there can be a plurality of buses. Generally, the bus allows data to be passed between each element of the data processing system 1000. The processor 1001 can be implemented with one or more processors from any manufacturer, and is not limited to a specific manufacturer. The processor 1001 can also be referred to as a controller, without limitation.
[0226] In the embodiments of the present application, the memory 1002 stores instructions executable by the at least one processor 1001, and the at least one processor 1001 can execute the method for dividing the signal control period discussed above by executing the instructions stored in the memory 1002. The processor 1001 can implement the functions of the modules of the apparatus shown in the embodiments of the present application. Figure 10 The functions of the modules of the apparatus shown in the embodiments of the present application.
[0227] The processor 1001 is the control center of the apparatus, and can connect each part of the entire control device through various interfaces and lines, and monitor the entire apparatus by running or executing the instructions stored in the memory 1002 and calling the data stored in the memory 1002, thereby processing data and monitoring the entire apparatus.
[0228] In a possible design, the processor 1001 can include one or more processing units, and the processor 1001 can integrate an application processor and a modem processor, where the application processor mainly processes operating systems, user interfaces, and application programs, and the modem processor mainly processes wireless communication. It can be understood that the modem processor can also not be integrated into the processor 1001. In some embodiments, the processor 1001 and the memory 1002 can be implemented on the same chip, and in some embodiments, they can also be implemented on separate chips respectively.
[0229] The processor 1001 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the data transmission method disclosed in the embodiments of the present application can be directly embodied as execution completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0230] The memory 1002, as a non-volatile computer readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 1002 can include at least one type of storage medium, for example, can include flash memory, hard disk, multimedia card, card type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. The memory 1002 is any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but is not limited thereto. The memory 1002 in the embodiments of the present application can also be a circuit or any other device capable of realizing a storage function, used for storing program instructions and / or data.
[0231] By designing and programming the processor 1001, the code corresponding to the signal control period division method introduced in the foregoing embodiments can be fixed in the chip, so that the chip can execute the steps of the data transmission method of the embodiments shown in the running time. Figure 2 How to design and program the processor 1001 is a technology known to those skilled in the art, which will not be described here.
[0232] The embodiments of the present application also provide a computer readable storage medium storing computer executable instructions required for the processor to execute, which contains programs required for the processor to execute.
[0233] In some possible implementation manners, various aspects of the data transmission method provided by the present application can also be implemented in the form of a program product, which includes program code for causing the electronic device to execute the steps of the data transmission method according to various exemplary embodiments of the present application described in the present specification when the program product is running on the electronic device.
[0234] Those skilled in the art will appreciate that embodiments of the application can be devised for a method, an apparatus, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.
[0235] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0236] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0237] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0238] While preferred embodiments of the application have been described, modifications and variations can be apparent to those skilled in the art once aware of the general underlying concepts. Accordingly, the appended claims are intended to embrace all such modifications and variations as fall within the scope of the application.
[0239] Obviously, many modifications and variations of the present application are possible in light of the above teachings. It is, therefore, to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. A data transmission method, characterized in that, The method includes: Obtain the data streams transmitted on each channel; For any given channel, determine the number of corrupted data packets in the data stream transmitted through the channel; Determine whether the number of corrupted data packets is less than a specified threshold; If so, a data retransmission instruction is sent to the transmitting end connected to the channel, so that the transmitting end retransmits the original data packet corresponding to the damaged data packet; If not, then based on the data in the first data packet and the checksum, the erroneous data in the first data packet is located to obtain the erroneous data in the first data packet; wherein, the first data packet is any one of the corrupted data packets; The error data in the first data packet is repaired using the check code to obtain the repaired first data packet; The repaired first data packet is used to replace the first data packet in the data stream, and the data stream is then sent.
2. The method according to claim 1, characterized in that, Determining the number of corrupted data packets in the data stream transmitted through the channel includes: For any data packet in a data stream, perform a cyclic redundancy check (CRC) on the data in the data packet to obtain the actual CRC verification code; The actual CRC checksum is compared with the standard CRC checksum stored in the header of the data packet; If the actual CRC checksum is the same as the standard CRC checksum, then the data packet is determined to be undamaged; or, If the actual CRC checksum is different from the standard CRC checksum, then the data packet is determined to be corrupted.
3. The method according to claim 1, characterized in that, The step of locating erroneous data in the first data packet based on the data and checksum in the first data packet, and obtaining the erroneous data in the first data packet, includes: Each temporary code is determined based on each data in the first data packet; wherein, the number of each temporary code is the same as the number of check codes, and each temporary code has a corresponding check code. The check code is determined by using each original data corresponding to the first data packet according to the preset calculation method, and the calculation methods corresponding to different check codes are not the same. The temporary code corresponding to any check code is determined by using each data in the first data packet according to the calculation method corresponding to the check code. Using the temporary codes and the check codes, the target position where erroneous data exists in the sorting of the data is determined; The data located at the target position among the data is identified as the erroneous data.
4. The method according to claim 3, characterized in that, Each temporary code includes a first temporary code, a second temporary code, and a third temporary code; the check code includes a first check code, a second check code, and a third check code; the first temporary code corresponds to the first check code, the second temporary code corresponds to the second check code, and the third temporary code corresponds to the third check code; The step of using the temporary codes to determine the target location where erroneous data exists in the sorting of the data includes: Subtract the first temporary code from the first check code to obtain the first intermediate value; The target position is obtained by dividing the second intermediate value by the first intermediate value; wherein the second intermediate value is the difference between the second temporary code and the second check code.
5. The method according to claim 3, characterized in that, Before determining the data located at the target position from among the data as the erroneous data, the method further includes: The verification position is obtained using the third intermediate value and the first intermediate value; wherein, the third intermediate value is the difference between the third temporary value and the third verification value; If the verification location and the target location are the same, the verification is deemed successful, and the data located at the target location among the data is identified as the erroneous data. If the verification location and the target location are not the same, the verification is determined to be unsuccessful and the process ends.
6. The method according to claim 5, characterized in that, The step of obtaining the verification location using the third intermediate value and the first intermediate value includes: Divide the third intermediate value by the first intermediate value to obtain the fourth intermediate value; The verification position is obtained by taking the square root of the fourth intermediate value.
7. The method according to claim 1, characterized in that, After determining the number of corrupted data packets in the data stream transmitted through the channel, the method further includes: Determine whether a backup channel exists for the stated channel; If it exists, the data stream is obtained from the backup channel and then sent. If it does not exist, then proceed to determine whether the number of corrupted data packets is less than a specified threshold.
8. The method according to claim 1, characterized in that, Before determining whether the number of corrupted data packets is less than a specified threshold, the method further includes: If corrupted data packets are detected in the data stream, the channel is shut down; The operating mode of each channel is adjusted based on the number of closed channels; wherein the operating mode is used to characterize the number of open channels. Reduce the resolution and / or frame rate of the image data in the data stream.
9. The method according to claim 1, characterized in that, The data stream includes image data and / or structural data; After acquiring the data streams transmitted on each channel, the method further includes: For any given channel, if the data stream transmitted in the channel contains a corrupted second data packet, and the corrupted data in the second data packet is image data, then the corrupted image block in the image data is detected. Using adjacent frames of the image data, determine the restoration mask for the image block; The image data is repaired using the repair mask to obtain the repaired image; The repaired image data is used to replace the image data in the second data packet.
10. The method according to claim 9, characterized in that, The detection of damaged image blocks in the image data includes: Obtain the YUV checksum corresponding to each image block in the header of the second data packet; For any image block in the image data, the actual YUV value of the image is determined based on the YUV values of each pixel in the image block. If the actual YUV value of the image block is different from the YUV checksum of the image block, then the image block is determined to be corrupted; or, If the actual YUV value of the image block is the same as the YUV checksum of the image block, then the image block is determined to be undamaged.
11. The method according to claim 1, characterized in that, The data stream includes image data and structural data; After acquiring the data streams transmitted on each channel, the method further includes: For any given channel, if the data stream transmitted in the channel contains a corrupted second data packet; If the corrupted data in the second data packet is structured data, then the priority label of the structured data is obtained from the header of the second data packet; If the priority label is a first designated label, a data retransmission instruction is sent to the sending end to enable the sending end to retransmit the data, wherein the first designated label is used to characterize the structured data as key data; If the priority is the second specified label, then the data is discarded; wherein the second specified label is used to characterize the structured data as non-critical data.
12. A data transmission method, characterized in that, The method includes: Obtain the data streams transmitted on each channel; For any given channel, based on the data stream transmitted through the channel, determine whether there are any corrupted data packets in the data stream; If so, then close the channel; The operating mode of each channel is adjusted based on the number of closed channels; wherein the operating mode is used to characterize the number of open channels. Reduce the resolution and / or frame rate of the image data in the data stream.
13. A data transmission method, characterized in that, The method includes: Obtain the data streams transmitted on each channel; For any given channel, if a corrupted second data packet exists in the data stream transmitted in the channel, determine the data type of the second data packet; The second data packet is repaired according to its data type to obtain a repaired data packet; The repaired data packet is used to replace the second data packet in the data stream to obtain a repaired data stream, which is then sent.
14. The method according to claim 13, characterized in that, The data types include structural data and image data; The step of repairing the data according to the data type of the second data packet to obtain the repaired data includes: If the corrupted data in the second data packet is image data, then detect the corrupted image blocks in the image data; The target pixel value of the image block is determined using adjacent frames of the image data; The repair mask for the image block is determined using the target pixel value; The image data is repaired using the repair mask to obtain the repaired image; The repaired image data is used to replace the image data in the second data packet.
15. The method according to claim 13, characterized in that, The data types include structural data and image data; The step of repairing the data according to the data type of the second data packet to obtain the repaired data includes: If the corrupted data in the second data packet is structured data, then the priority label of the structured data is obtained from the header of the second data packet; If the priority label is a first designated label, a data retransmission instruction is sent to the sending end to enable the sending end to retransmit the data, wherein the first designated label is used to characterize the structured data as key data; If the priority is the second specified label, then the data is discarded; wherein the second specified label is used to characterize the structured data as non-critical data.
16. A data transmission device, characterized in that, The device includes: The first acquisition module is used to acquire each data stream transmitted on each channel. The corrupted data packet determination module is used to determine the number of corrupted data packets in the data stream transmitted through the channel for any given channel. The first judgment module is used to determine whether the number of damaged data packets is less than a specified threshold. The instruction sending module is used to send a data retransmission instruction to the sending end connected to the channel if the condition is met, so that the sending end retransmits the original data packet corresponding to the damaged data packet. The data location module is used to locate the erroneous data in the first data packet based on the data and checksum in the first data packet if no error is found, thereby obtaining the erroneous data in the first data packet; wherein the first data packet is any one of the corrupted data packets. The first data repair module is used to repair the erroneous data in the first data packet using the verification code, so as to obtain the repaired first data packet; The first data replacement module is used to replace the first data packet in the data stream with the repaired first data packet and send the data stream.
17. A data transmission device, characterized in that, The device includes: The second acquisition module is used to acquire each data stream transmitted by each channel respectively; The second judgment module is used to determine, for any given channel, whether there are any corrupted data packets in the data stream transmitted through the channel. A channel shutdown module, used to shut down the channel if the condition is met; The operating mode adjustment module is used to adjust the operating mode of each channel based on the number of closed channels; wherein, the operating mode is used to represent the number of open channels; An image adjustment module is used to reduce the resolution and / or frame rate of image data in the data stream.
18. A data transmission device, characterized in that, The device includes: The third acquisition module is used to acquire the data streams transmitted by each channel respectively; The third judgment module is used to determine the data type of the second data packet if, for any channel, the data stream transmitted in the channel contains a corrupted second data packet. The second data repair module is used to repair the second data packet according to the data type of the second data packet to obtain the repaired data packet; The second data replacement module is used to replace the second data packet in the data stream with the repaired data packet to obtain the repaired data stream, and then send the repaired data stream.
19. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a computer program stored in the memory, implements the method of any one of claims 1-15.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-15.
21. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of claims 1-15.