Method and equipment for solving serial bus data loss of gold alloy wire equipment
By obtaining the data quantity and transmission speed in the metal alloy wire device, dividing the data for parity check, and using digital waveform encoding to transmit clock information when the loss is detected, the problem of serial bus data loss of the metal alloy wire device is solved, improving the The reliability of data transmission.
Patent Information
- Application Number
- CN202411185793.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The metal alloy wire equipment has the problem of data loss in the serial bus, and the prior art has not been effectively solved, resulting in unstable data transmission and low reliability.
By acquiring the data quantity and data transmission speed, the data transmission time is divided into a sub-time period for parity check. If data loss is detected, the clock information of the transmitter is obtained and transmitted using digital waveform encoding method to achieve self-synchronization of the data.
It realizes intelligent detection and solves the problem of serial bus data loss in metal alloy wire equipment, and improves the reliability and stability of data transmission.
Smart Images

Figure CN119088606A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of serial bus data transmission, and in particular to a method and device for solving the problem of data loss in the serial bus of a gold alloy wire device. Background Art
[0002] Gold alloy wire usually refers to alloy wire composed of multiple metal elements. Because of its high toughness and ductility, it is often used in the field of electronic device connection. For example, gold alloy wire is used in the production of serial bus. Serial bus is a communication protocol and interface standard for transmitting data and control information in computer systems. It is a communication method that connects multiple devices to one or more physical lines, and communicates by transmitting data one by one. The advantages of serial bus include simplified line layout and reduced cost, but there is a risk of data loss in the process of data transmission of serial bus, because the serial bus has high requirements for clock synchronization when transmitting data, that is, the sending and receiving ends need to maintain good clock synchronization, otherwise there may be data transmission errors and data loss risks, and the serial bus has high requirements for the quality of the transmission line when transmitting data. If the quality of the transmission line is not good, it may cause signal attenuation, interference and other problems, thereby affecting the reliability of data transmission, and if the serial bus has a single point failure problem, it may cause the transmission link to be interrupted, and there is a risk of data loss. These problems will cause data loss when the serial bus is transmitting data. At present, there is no effective solution to the problem of data loss in the serial bus of gold alloy wire equipment. Summary of the invention
[0003] The present application provides a method and device for solving the problem of data loss in the serial bus of a gold alloy wire device, so as to solve the problem of data loss in the serial bus of a gold alloy wire device.
[0004] In a first aspect, the present application provides a method for solving the problem of data loss in a serial bus of a gold alloy wire device, the method comprising:
[0005] Acquire the data volume and data transmission speed of the gold alloy wire device serial bus data, and determine the data transmission time according to the data volume and the data transmission speed;
[0006] Dividing the data transmission time into a preset number of sub-time periods, performing a parity check on the data transmitted in each sub-time period; and determining a data transmission loss detection result according to the parity check result;
[0007] If the data transmission loss detection result is a data loss exception, the clock information of the sending device is obtained and the clock information is sent to the receiving device; wherein the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data using return-to-zero encoding to complete self-synchronization of the transmitted data; the receiving device receives the transmission data in chronological order from the sending device.
[0008] In a second aspect, the present application provides a device for solving the data loss of the serial bus of the gold alloy wire device, the device comprising:
[0009] A determination module, used to obtain the data volume and data transmission speed of the gold alloy wire device serial bus data, and determine the data transmission time according to the data volume and the data transmission speed;
[0010] A detection module, used to divide the data transmission time into a preset number of sub-time periods, perform parity check on the data transmitted in each sub-time period; and determine a data transmission loss detection result according to the parity check result;
[0011] A processing module is used to obtain the clock information of the sending device if the data transmission loss detection result is a data loss exception, and send the clock information to the receiving device; wherein the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data using a return-to-zero encoding to complete the self-synchronization of the transmitted data; the receiving device receives the transmission data in chronological order from the sending device.
[0012] In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0013] Memory, used to store computer programs;
[0014] The processor is used to implement the method steps when executing the program stored in the memory.
[0015] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described are implemented.
[0016] The present application provides a method and device for solving the data loss of the serial bus of a gold alloy wire device, the method comprising: obtaining the data volume and data transmission speed of the serial bus data of the gold alloy wire device, and determining the data transmission time according to the data volume and the data transmission speed; dividing the data transmission time into a preset number of sub-time periods, and performing a parity check on the data transmitted in each sub-time period; determining a data transmission loss detection result according to the parity check result; if the data transmission loss detection result is a data loss exception, obtaining the clock information of a sending end device, and sending the clock information to a receiving end device; wherein the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data using a return-to-zero encoding to complete the self-synchronization of the transmitted data; the receiving end device receives the transmission data in chronological order from the sending end device.
[0017] The above technical solution has the following advantages or beneficial effects:
[0018] In the present application, firstly, a solution for intelligently detecting data loss is provided, namely, obtaining the data volume and data transmission speed of the serial bus data of the gold alloy wire device, determining the data transmission time according to the data volume and data transmission speed; dividing the data transmission time into a preset number of sub-time periods, performing parity check on the data transmitted in each sub-time period; and determining the data transmission loss detection result according to the parity check result. Secondly, the present application provides a solution for data loss in the serial bus of the gold alloy wire device, namely, if the data transmission loss detection result is a data loss anomaly, obtaining the clock information of the sending end device, and sending the clock information to the receiving end device; wherein, the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data with a return-to-zero encoding to complete the self-synchronization of the transmitted data; the receiving end device receives the transmission data in chronological order from the sending end device. Thus, a technical solution for solving the data loss in the serial bus of the gold alloy wire device is realized. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic diagram of the first process for solving the data loss of the gold wire device serial bus provided by the present application;
[0020] Figure 2 A schematic diagram of a second process for solving the data loss of the gold wire device serial bus provided by the present application;
[0021] Figure 3 A schematic diagram of a third process for solving the data loss of the gold wire device serial bus provided by the present application;
[0022] Figure 4 A system architecture diagram for solving the problem of data loss on the serial bus of the gold alloy wire device provided by this application;
[0023] Figure 5 A schematic diagram of the structure of a device for solving the problem of data loss in the serial bus of a gold alloy wire device provided by the present application;
[0024] Figure 6 This is a schematic diagram of the electronic device structure provided in this application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] Figure 1 The first process for solving the data loss of the gold wire device serial bus provided by the present application is a schematic diagram, and the process includes the following steps:
[0027] S101: Acquire the data volume and data transmission speed of the gold alloy wire device serial bus data, and determine the data transmission time according to the data volume and the data transmission speed;
[0028] S102: Divide the data transmission time into a preset number of sub-time periods, perform parity check on the data transmitted in each sub-time period; and determine a data transmission loss detection result according to the parity check result;
[0029] S103: If the data transmission loss detection result is a data loss exception, the clock information of the sending device is obtained, and the clock information is sent to the receiving device; wherein the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data using return-to-zero encoding to complete self-synchronization of the transmitted data; the receiving device receives the transmission data in chronological order from the sending device.
[0030] The method for solving the data loss of the gold alloy wire device serial bus provided in the present application is applied to electronic devices, which may be computers, servers and other devices.
[0031] For the gold alloy wire device serial bus data to be transmitted, the electronic device first obtains the data volume of the gold alloy wire device serial bus data, which data volume refers to the total data volume of the gold alloy wire device serial bus data to be transmitted. And obtains the data transmission speed, which can be a pre-configured data transmission speed. According to the data volume and data transmission speed of the gold alloy wire device serial bus data, the data transmission time can be determined. Optionally, the ratio of the data volume and data transmission speed of the gold alloy wire device serial bus data is used as the data transmission time. The data transmission time refers to the length of time required to transmit the gold alloy wire device serial bus data according to the data transmission speed, for example, 1 minute, 2 minutes, 5 minutes, etc.
[0032] The data transmission time is divided into a preset number of sub-time periods. Optionally, the data transmission time is evenly divided into 10 sub-time periods. For example, the data transmission time is t, and the data transmission time is evenly divided into 10 sub-time periods, namely t1 to t10. Then the data transmitted in each sub-time period is obtained. That is, the data transmitted in the t1 sub-time period is obtained, the data transmitted in the t2 sub-time period is obtained, ..., the data transmitted in the t10 sub-time period is obtained. Then, a parity check is performed on the data transmitted in each sub-time period to determine the parity check result of the data transmitted in each sub-time period. That is, a parity check is performed on the data transmitted in the t1 sub-time period to determine the parity check result of the data transmitted in the t1 sub-time period, a parity check is performed on the data transmitted in the t2 sub-time period to determine the parity check result of the data transmitted in the t2 sub-time period, ..., a parity check is performed on the data transmitted in the t10 sub-time period to determine the parity check result of the data transmitted in the t2 sub-time period. Among them, the parity check result includes parity check pass and parity check fail.
[0033] Parity check is a method used to check the correctness of data transmission. Parity check can detect partial errors in the transmitted data (1 bit error can be detected, 2 bits or more cannot be detected), and it cannot correct errors. After an error is found, it can only request retransmission. It is widely used because of its simplicity. This method adds a Parity bit , and is transmitted, that is, each byte sends nine bits (8 bits + 1 check bit) of data. 1 byte (byte) = 8 bits (bit). Before data transmission, it is usually determined whether it is odd parity or even parity to ensure that the sender and the receiver use the same check method for data verification. If the check bit does not match, it is considered that the transmission is wrong. Odd parity: If the number of 1s in the binary data is odd, it is odd parity; Even parity: If the number of 1s in the binary data is even, it is even parity.
[0034] The data transmission loss detection result is determined according to the parity check result. Optionally, if the number of sub-time periods in which the parity check fails in the parity check results of the data transmitted in each sub-time period is greater than a preset number threshold, the data transmission loss detection result is determined to be abnormal data loss, otherwise the data transmission loss detection result is determined to be normal data transmission. Thus, intelligent detection of abnormal data loss in the serial bus of the gold alloy wire device is realized.
[0035] Considering that the clock synchronization anomaly between the data transmission sending end device and the receiving end device may be the cause of the data loss anomaly, after determining that the data transmission loss detection result is a data loss anomaly, the clock information of the sending end device is obtained and the clock information is sent to the receiving end device; wherein the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data using return-to-zero encoding to complete the self-synchronization of the transmitted data; the receiving end device receives the transmission data in time sequence from the sending end device. For example, the digital waveform encoding is RZ encoding.
[0036] The characteristics of serial bus when transmitting data are: Master-slave structure: Serial bus usually adopts master-slave structure, in which one device acts as the master device to control the entire communication process, and other devices act as slave devices to transmit and respond to data according to the instructions of the master device. When data is transmitted through the serial bus, the system sets the sender as the master device and the receiver as the slave device. The system obtains the clock information of the sender. The system sends the clock information from the master device to the slave device. After the slave device receives the clock information from the master device, it starts to receive data. The specific implementation is as follows: the system uses RZ encoding to transmit clock information. There will be 3 levels on the communication signal line, positive level, negative level and 0 level. The positive level represents logic 1 and the negative level represents logic 0. After each bit of data is transmitted, the signal returns to 0 level. The slave device completes data sampling before the signal returns to zero. The slave device obtains the actual data transmitted on the serial bus. The clock signal is encoded into the transmitted data with return to zero, realizing the self-synchronization of the transmitted data. The slave device receives the transmission data in chronological order from the master device. After the system starts the clock synchronization adjustment mode, data is sent from the master device to the slave device through the serial bus. The system starts the serial bus data loss detection. The detection system again determines whether the retransmitted data is lost. If not, it is determined that the gold alloy wire device serial bus data loss problem has been solved.
[0037] In the present application, firstly, a solution for intelligently detecting data loss is provided, namely, obtaining the data volume and data transmission speed of the serial bus data of the gold alloy wire device, determining the data transmission time according to the data volume and data transmission speed; dividing the data transmission time into a preset number of sub-time periods, performing parity check on the data transmitted in each sub-time period; and determining the data transmission loss detection result according to the parity check result. Secondly, the present application provides a solution for data loss in the serial bus of the gold alloy wire device, namely, if the data transmission loss detection result is a data loss anomaly, obtaining the clock information of the sending end device, and sending the clock information to the receiving end device; wherein, the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data with a return-to-zero encoding to complete the self-synchronization of the transmitted data; the receiving end device receives the transmission data in chronological order from the sending end device. Thus, a technical solution for solving the data loss in the serial bus of the gold alloy wire device is realized.
[0038] In the present application, in order to make the determination of the data transmission loss detection result more accurate, determining the data transmission loss detection result according to the parity check result includes:
[0039] Determine the proportion of the sub-time periods in which the parity check fails to account for the preset number of sub-time periods, and when the proportion is greater than a preset proportion threshold, determine that the data transmission loss detection result is abnormal data loss; otherwise, determine that the data transmission loss detection result is normal data transmission.
[0040] The present application does not limit the preset number, and the preset number can be 10, or 8, 12, 15, etc. Determine the number of sub-time periods in which the parity check fails, and use the ratio of the number to the preset number as the proportion of the sub-time periods in which the parity check fails to account for the preset number of sub-time periods. For example, if the preset number of sub-time periods is 10 sub-time periods, and the number of sub-time periods in which the parity check fails is 5, then it is determined that the proportion of the sub-time periods in which the parity check fails to account for the preset number of sub-time periods is 5 / 10=0.5. The preset ratio threshold is, for example, 0.3, 0.4, etc. When the proportion of the sub-time periods in which the parity check fails to account for the preset number of sub-time periods is greater than the preset ratio threshold, it is determined that the data transmission loss detection result is abnormal data loss; when the proportion of the sub-time periods in which the parity check fails to account for the preset number of sub-time periods is not greater than the preset ratio threshold, it is determined that the data transmission loss detection result is normal data transmission.
[0041] Figure 2 A schematic diagram of a second process for solving the data loss of the gold alloy wire device serial bus provided by the present application, the process comprising the following steps:
[0042] S201: Acquire the data volume and data transmission speed of the gold alloy wire device serial bus data, and determine the data transmission time according to the data volume and the data transmission speed;
[0043] S202: Divide the data transmission time into a preset number of sub-time periods, and perform a parity check on the data transmitted in each sub-time period; determine the proportion of sub-time periods that fail the parity check to the preset number of sub-time periods, and when the proportion is greater than a preset proportion threshold, determine that the data transmission loss detection result is a data loss abnormality; otherwise, determine that the data transmission loss detection result is a normal data transmission;
[0044] S203: If the data transmission loss detection result is a data loss exception, the clock information of the sending device is obtained, and the clock information is sent to the receiving device; wherein the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data using return-to-zero encoding to complete self-synchronization of the transmitted data; the receiving device receives the transmission data in chronological order from the sending device.
[0045] In this application, the method further includes:
[0046] If the ratio is greater than a preset first ratio threshold and less than a preset second ratio threshold, the data loss anomaly level is determined to be a primary data loss anomaly;
[0047] If the ratio is greater than or equal to a preset second ratio threshold and less than a preset third ratio threshold, it is determined that the data loss anomaly level is a medium data loss anomaly;
[0048] If the ratio is greater than or equal to a preset third ratio threshold and less than a preset fourth ratio threshold, determining that the data loss anomaly level is a high-level data loss anomaly;
[0049] If the ratio is greater than or equal to a preset fourth ratio threshold, it is determined that the data loss anomaly level is the highest level of data loss anomaly.
[0050] The preset first ratio threshold is, for example, 0.3, 0.4, etc., the preset second ratio threshold is, for example, 0.5, 0.6, etc., the preset third ratio threshold is, for example, 0.7, 0.8, etc., and the preset fourth ratio threshold is, for example, 0.9, 1.0, etc.
[0051] In the present application, if the data transmission loss detection result is a data loss anomaly, the clock information of the sending end device is obtained, and the clock information is sent to the receiving end device; wherein, the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data with a return to zero to complete the self-synchronization of the transmitted data; the receiving end device receives the transmission data in chronological order from the sending end device. Then the data transmission loss detection result is determined again, that is, after the clock synchronization, the data volume and data transmission speed of the gold alloy wire device serial bus data are obtained again, and the data transmission time is determined according to the data volume and data transmission speed; the data transmission time is divided into a preset number of sub-time periods, and a parity check is performed on the data transmitted in each sub-time period; the data transmission loss detection result is determined according to the parity check result. At this time, the data transmission loss detection result is determined, and if the data transmission loss detection result is a data loss anomaly, an alternative line of a transmission protocol different from the current transmission protocol is determined, and the data is transmitted using the alternative line.
[0052] Determining an alternative route of a transmission protocol different from the current transmission protocol includes:
[0053] If the data loss anomaly level is a primary data loss anomaly, determining a line of a transmission protocol different from the current transmission protocol and having a weak anti-interference capability as an alternative line;
[0054] If the data loss anomaly level is a medium data loss anomaly, a line of a transmission protocol different from the current transmission protocol and having a strong anti-interference capability is determined as an alternative line.
[0055] In this application, considering that lines with different transmission protocols may cause data loss, when data is transmitted on a serial bus, it is easy to be interfered by external signals, resulting in data loss, and the more links there are, the stronger the interference to the transmission, so a method is needed to solve the existing problem.
[0056] Different transmission protocols will cause different interference strengths. When the electronic device determines that the data transmission loss detection result is a data loss anomaly, it will feedback the anomaly information and trigger a retransmission instruction to retransmit the data. If the data loss anomaly level detected at this time is a primary data loss anomaly, or the data loss anomaly level is a medium data loss anomaly, the transmission protocol switching mode will be performed.
[0057] The system switches lines of different transmission protocols, and different transmission protocols support different transmission rates. By selecting a transmission protocol that suits the needs, the anti-interference ability of data transmission can be adjusted. If it is judged as an intermediate data loss anomaly, the system switches the line of the transmission protocol with strong anti-interference ability for data transmission. If it is judged as a primary data loss anomaly, the system switches the line of the transmission protocol with weak anti-interference ability for data transmission. Switching different transmission protocols according to different levels of data loss anomalies has achieved the effect of balancing interference capabilities. After switching the line of the transmission protocol, the data can be retransmitted and it can be judged again whether the retransmitted data is lost. If not, it means that the problem of data loss on the serial bus of the gold alloy wire equipment has been solved.
[0058] Figure 3 A schematic diagram of a third process for solving the data loss of the gold wire device serial bus provided by the present application, the process includes the following steps:
[0059] S301: Acquire the data volume and data transmission speed of the gold alloy wire device serial bus data, and determine the data transmission time according to the data volume and the data transmission speed;
[0060] S302: Divide the data transmission time into a preset number of sub-time periods, and perform a parity check on the data transmitted in each sub-time period; determine the proportion of sub-time periods that fail the parity check to the preset number of sub-time periods, and when the proportion is greater than a preset proportion threshold, determine that the data transmission loss detection result is abnormal data loss; otherwise, determine that the data transmission loss detection result is normal data transmission;
[0061] S303: If the data transmission loss detection result is a data loss exception, the clock information of the sending device is obtained, and the clock information is sent to the receiving device; wherein the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data using return-to-zero encoding to complete self-synchronization of the transmitted data; the receiving device receives the transmission data in chronological order from the sending device.
[0062] S304: Trigger data retransmission and determine the data transmission loss detection result again. If the data transmission loss detection result is a data loss exception, and the data loss exception level is a primary data loss exception, a line of a transmission protocol with a weak anti-interference capability that is different from the current transmission protocol is determined as an alternative line; if the data loss exception level is a medium data loss exception, a line of a transmission protocol with a strong anti-interference capability that is different from the current transmission protocol is determined as an alternative line.
[0063] If the data is retransmitted after switching the line of the transmission protocol, it is determined again whether the retransmitted data is lost. If it is lost, or it is determined that the previous data loss exception level is a high-level data loss exception, the data is transmitted simultaneously on three signal lines, wherein the signals on two signal lines are equal and have opposite polarities, and the third signal line is used as a reference line.
[0064] When the transmitter transmits data to the receiver through the serial bus, the system turns on the anti-interference enhancement mode, and the data is transmitted on three signal lines at the same time (sending the same data), where the signals on two of the signal lines are equal and have opposite polarities. The third signal line is used as a reference line. During the same time period of data transmission, the system compares the difference a between the two lines with opposite polarities, and then determines whether the logic state is 1 or 0 based on the difference a. Logic 1 means that the data transmission is intact, and logic 0 means that the data is erroneous or lost. The third signal line is used as a reference signal line to compare whether interference will affect data transmission (the intensity of the interference is the main factor. If the intensity of the interference is large, the data transmitted on the third signal line will be lost and it will be determined as logic 0). When encountering interference noise (interference noise generally has equal interference intensity at equal distances), the interference noise is loaded on the three signal lines at the same time, the difference a is 0, and the judged logic state is 1, which ensures that the noise has no effect on the logical meaning of the signal; when encountering electromagnetic interference, since two of them have opposite polarities and the transmitted signal amplitudes are the same, the amplitudes of the coupled electromagnetic fields between the two signal lines and the ground wire are equal, and their electromagnetic fields will cancel each other out, achieving the purpose of small electromagnetic interference.
[0065] After the data is transmitted on the three signal lines simultaneously, it can be determined again whether the retransmitted data is lost. If not, it means that the problem of data loss on the gold alloy wire device serial bus has been solved.
[0066] After the data is transmitted on the three signal lines simultaneously, it can be determined again whether the retransmitted data is lost. If lost, or if it is determined that the previous data loss exception level is the highest level data loss exception, a pre-configured alternative data transmission link is used to send a test signal to the current data transmission link; based on whether a response signal from the current data transmission link is received, it is determined whether the current data transmission link is abnormal. If so, the alternative data transmission link is used to transmit data.
[0067] The electronic device switches the transmission link to the backup data transmission link. The backup data transmission link sends a test signal to the main transmission link. After receiving the test signal, the main transmission link responds with a corresponding binary packet to the backup data transmission link. The backup data transmission link determines whether the main transmission link is operating normally based on whether the binary packet is received. If the binary packet is not received, it is determined that a single point failure occurs in the main data transmission link, and the backup data transmission link is switched to replace the main data transmission link.
[0068] Re-enable the serial bus data loss detection, and the detection system will determine whether the retransmitted data is lost. If not, the data loss problem has been solved. If it is still lost, it can be reported to the management staff for manual re-judgment of the gold alloy wire equipment serial bus data loss.
[0069] Figure 4 The system architecture diagram for solving the data loss problem of the gold alloy wire equipment serial bus provided in this application includes: a serial bus data loss detection module 41, a clock synchronization data loss solution module 42, a serial bus data transmission anti-interference module 43, a single point failure-caused data loss control module 44 and an error reporting and log feedback module 45.
[0070] The serial bus data loss detection module 41 is described as follows:
[0071] The serial bus has the following characteristics when transmitting data: The serial bus uses a single physical line for data transmission, and transmits data bit by bit or byte by byte; Point-to-point communication: Each device in the serial bus has a unique address, and data transmission is point-to-point communication from one device to another. When transmitting data, each device needs to send the data to the next device until it reaches the target device.
[0072] Data is transmitted through a serial bus, the data is converted into binary data, and the data is transmitted in sequence on a single physical line. The data volume and data transmission speed of the gold alloy wire device serial bus data are obtained, and the data transmission time is determined according to the data volume and the data transmission speed; the detection module is used to divide the data transmission time into a preset number of sub-time periods, and perform parity check on the data transmitted in each sub-time period; the data transmission loss detection result is determined according to the parity check result.
[0073] For example, the data transmission time is divided into 10 sub-time periods. After the parity check is completed, the detection system makes a judgment based on the parity check result of the partition data. If there are 3 zones of data that fail the check, the detection system determines it as a primary data loss anomaly. If there are 6 zones of data that fail the check, the detection system determines it as an intermediate data loss anomaly. If there are 9 zones of data that fail the check, the detection system determines it as a high-level data loss anomaly. If all 10 zones of data fail the check, the system under test determines it as a complete data loss anomaly, which is the highest level of data loss anomaly. The detection system interrupts data transmission and gives feedback. If all 10 zones of data have passed the check, the detection system determines that the data is complete. The detection system restores the partition data after the parity check and completes the sequential data transmission.
[0074] The clock synchronization module 42 for resolving data loss is described as follows:
[0075] When data is transmitted on a serial bus, the sender and receiver need to maintain good clock synchronization. If there is a problem with clock synchronization, data transmission errors or loss may occur. If it is determined that data loss is abnormal during serial data transmission, the detection system will feedback the abnormal information and trigger a retransmission instruction. While the data is retransmitted, the system starts the clock synchronization adjustment mode. Characteristics of the serial bus when transmitting data: Master-slave structure: The serial bus usually adopts a master-slave structure, in which one device acts as a master device to control the entire communication process, and the other devices act as slave devices to transmit and respond to data according to the instructions of the master device. Obtain the clock information of the sending device and send the clock information to the receiving device; wherein, the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data with a return-to-zero encoding to complete the self-synchronization of the transmitted data; the receiving device receives the transmission data in chronological order from the sending device.
[0076] Clock synchronization technology includes: clock synchronization (frequency synchronization) and time synchronization (phase synchronization). Clock synchronization is to adjust the rate values of frequency sources distributed in different places to a certain accuracy or a certain degree of conformity through frequency comparison, while time synchronization is to adjust the time values of clocks distributed in different places to a certain accuracy or a certain degree of conformity through time comparison. The relationship between clock synchronization and phase synchronization can be explained by the example of a stopwatch. Suppose there are two stopwatches with second hands. If the frequencies of the two watches are synchronized, it means that the second hands of the two watches have the same "jump" cycle, that is, the two watches run at the same speed. But this does not mean that the phases indicated by the two watches are the same. Phase synchronization first requires that the two watches have the same time scale (Time Scale), that is, the starting point (Epoch) and the fixed time interval (Time Interval). Usually, one of the watches is selected as the synchronization reference source, that is, the master clock; the other watch is used as the slave clock to keep it synchronized with the master clock in frequency and phase. In order to eliminate the phase difference, the master clock can provide a reference pulse signal with a period of 60 seconds (i.e., the "watch alignment" signal), so that the jump position of the second hand of the slave clock is consistent with the jump position of the second hand of the master clock when each reference signal pulse appears, so that the two watches can maintain phase alignment (or phase synchronization) and frequency synchronization.
[0077] The serial bus data transmission anti-interference module 43 is described as follows:
[0078] When data is transmitted on a serial bus, it is easily interfered by external signals, resulting in data loss. The more links there are, the stronger the interference to the transmission. Therefore, a method is needed to solve the existing problem.
[0079] The serial bus data transmission anti-interference module includes two modes, namely, the transmission protocol switching mode and the anti-interference enhanced transmission mode. If the data loss exception level is a primary data loss exception or an intermediate data loss exception, the transmission protocol switching mode is executed, that is, if the data loss exception level is a primary data loss exception, a line of a transmission protocol with weak anti-interference ability different from the current transmission protocol is determined as an alternative line; if the data loss exception level is an intermediate data loss exception, a line of a transmission protocol with strong anti-interference ability different from the current transmission protocol is determined as an alternative line. The alternative line is used to transmit data. If the data loss exception level is a high-level data loss exception, the anti-interference enhanced transmission mode is executed, that is, the data is transmitted on three signal lines at the same time, wherein the signals on two signal lines are equal and opposite in polarity, and the third signal line is used as a reference line.
[0080] The single point failure leads to data loss control module 44 as follows:
[0081] If a single point of failure occurs, whether it is a failure at the sending end or the receiving end, data loss will occur. If the data loss anomaly level is the highest level of data loss anomaly, control of data loss caused by single point failure is performed, that is, a pre-configured alternative data transmission link is used to send a test signal to the current data transmission link; based on whether a response signal from the current data transmission link is received, it is determined whether the current data transmission link is abnormal, and if so, the alternative data transmission link is used to transmit data.
[0082] The error reporting and log feedback module 45 is described as follows:
[0083] The system collects data on data loss during transmission on the serial bus, as well as data on judgment and adjustment methods after data loss. The system combines the data to generate data loss error reports and logs, and provides feedback to the system.
[0084] Figure 5 The schematic diagram of the structure of the device for solving the data loss of the serial bus of the gold alloy wire device provided in this application includes:
[0085] A determination module 51 is used to obtain the data volume and data transmission speed of the gold alloy wire device serial bus data, and determine the data transmission time according to the data volume and the data transmission speed;
[0086] A detection module 52 is used to divide the data transmission time into a preset number of sub-time periods, perform a parity check on the data transmitted in each sub-time period, and determine a data transmission loss detection result according to the parity check result;
[0087] The processing module 53 is used to obtain the clock information of the sending device if the data transmission loss detection result is a data loss exception, and send the clock information to the receiving device; wherein the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data using return-to-zero to complete the self-synchronization of the transmitted data; the receiving device receives the transmission data in chronological order from the sending device.
[0088] The detection module 52 is specifically used to determine the proportion of the sub-time periods in which the parity check fails to account for the preset number of sub-time periods. When the proportion is greater than a preset proportion threshold, the data transmission loss detection result is determined to be a data loss abnormality; otherwise, the data transmission loss detection result is determined to be a normal data transmission.
[0089] The detection module 52 is further used to determine that the data loss anomaly level is a primary data loss anomaly if the ratio is greater than a preset first ratio threshold and less than a preset second ratio threshold; determine that the data loss anomaly level is a medium data loss anomaly if the ratio is greater than or equal to the preset second ratio threshold and less than a preset third ratio threshold; determine that the data loss anomaly level is a high-level data loss anomaly if the ratio is greater than or equal to the preset third ratio threshold and less than a preset fourth ratio threshold; and determine that the data loss anomaly level is a highest-level data loss anomaly if the ratio is greater than or equal to the preset fourth ratio threshold.
[0090] The processing module 53 is further configured to determine a data transmission loss detection result. If the data transmission loss detection result is a data loss exception, determine an alternative line of a transmission protocol different from the current transmission protocol, and use the alternative line to transmit data.
[0091] The processing module 53 is specifically used to determine, if the data loss exception level is a primary data loss exception, a line of a transmission protocol with a weak anti-interference ability different from the current transmission protocol as an alternative line; if the data loss exception level is a medium data loss exception, determine a line of a transmission protocol with a strong anti-interference ability different from the current transmission protocol as an alternative line.
[0092] The processing module 53 is further configured to transmit data on three signal lines simultaneously if the data loss exception level is a high-level data loss exception, wherein the signals on two signal lines are equal and have opposite polarities, and the third signal line is used as a reference line.
[0093] The processing module 53 is also used to, if the data loss anomaly level is the highest level data loss anomaly, use a pre-configured alternative data transmission link to send a test signal to the current data transmission link; and determine whether the current data transmission link is abnormal based on whether a response signal from the current data transmission link is received, and if so, use the alternative data transmission link to transmit data.
[0094] The present application also provides an electronic device, such as Figure 6 As shown, it includes: a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62, and the memory 63 communicate with each other through the communication bus 64;
[0095] The memory 63 stores a computer program, and when the program is executed by the processor 61, the processor 61 executes any one of the above method steps.
[0096] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0097] The communication interface 62 is used for communication between the above electronic device and other devices.
[0098] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0099] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a digital signal processor (DSP), 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, etc.
[0100] The present application also provides a computer storage readable storage medium, wherein the computer readable storage medium stores a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device implements any of the above method steps when executing.
[0101] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0102] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
[0103] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present application.
Claims
1. A method for solving the data loss of the gold alloy wire device serial bus, characterized in that: The method comprises: Acquire the data volume and data transmission speed of the gold alloy wire device serial bus data, and determine the data transmission time according to the data volume and the data transmission speed; Dividing the data transmission time into a preset number of sub-time periods, performing a parity check on the data transmitted in each sub-time period; and determining a data transmission loss detection result according to the parity check result; If the data transmission loss detection result is a data loss exception, the clock information of the sending device is obtained and the clock information is sent to the receiving device; wherein the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data using return-to-zero encoding to complete self-synchronization of the transmitted data; the receiving device receives the transmission data in chronological order from the sending device.
2. The method according to claim 1, characterized in that Determining the data transmission loss detection result based on the parity check result includes: Determine the proportion of the sub-time periods in which the parity check fails to account for the preset number of sub-time periods, and when the proportion is greater than a preset proportion threshold, determine that the data transmission loss detection result is abnormal data loss; otherwise, determine that the data transmission loss detection result is normal data transmission.
3. The method according to claim 2, characterized in that The method further comprises: If the ratio is greater than a preset first ratio threshold and less than a preset second ratio threshold, the data loss anomaly level is determined to be a primary data loss anomaly; If the ratio is greater than or equal to a preset second ratio threshold and less than a preset third ratio threshold, it is determined that the data loss anomaly level is a medium data loss anomaly; If the ratio is greater than or equal to a preset third ratio threshold and less than a preset fourth ratio threshold, determining that the data loss anomaly level is a high-level data loss anomaly; If the ratio is greater than or equal to a preset fourth ratio threshold, it is determined that the data loss anomaly level is the highest level of data loss anomaly.
4. The method according to claim 3, characterized in that After the receiving end device receives the transmission data in time sequence from the transmitting end device, the method further includes: A data transmission loss detection result is determined. If the data transmission loss detection result is a data loss exception, an alternative line of a transmission protocol different from the current transmission protocol is determined, and the alternative line is used to transmit data.
5. The method according to claim 4, characterized in that Determining an alternative route of a transmission protocol different from the current transmission protocol includes: If the data loss anomaly level is a primary data loss anomaly, determining a line of a transmission protocol different from the current transmission protocol and having a weak anti-interference capability as an alternative line; If the data loss anomaly level is a medium data loss anomaly, a line of a transmission protocol different from the current transmission protocol and having a strong anti-interference capability is determined as an alternative line.
6. The method according to claim 4, characterized in that The method further comprises: If the data loss exception level is a high-level data loss exception, data is transmitted simultaneously on three signal lines, wherein the signals on two signal lines are equal and have opposite polarities, and the third signal line is used as a reference line.
7. The method according to claim 4, characterized in that The method further comprises: If the data loss anomaly level is the highest level data loss anomaly, a pre-configured alternative data transmission link is used to send a test signal to the current data transmission link; based on whether a response signal from the current data transmission link is received, it is determined whether the current data transmission link is abnormal; if so, the alternative data transmission link is used to transmit data.
8. A device for solving the problem of data loss in the serial bus of a gold alloy wire device, characterized in that: The device comprises: A determination module, used to obtain the data volume and data transmission speed of the gold alloy wire device serial bus data, and determine the data transmission time according to the data volume and the data transmission speed; A detection module, used to divide the data transmission time into a preset number of sub-time periods, perform parity check on the data transmitted in each sub-time period; and determine a data transmission loss detection result according to the parity check result; A processing module is used to obtain the clock information of the sending device if the data transmission loss detection result is a data loss exception, and send the clock information to the receiving device; wherein the clock information is transmitted using a digital waveform encoding method, and the clock signal is encoded into the transmitted data using a return-to-zero encoding to complete the self-synchronization of the transmitted data; the receiving device receives the transmission data in chronological order from the sending device.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.
