Data receiving method and device, storage medium and electronic equipment
By receiving and verifying data in the non-transparent bridge link and using the reference data subset for error correction, the problem of low data transmission efficiency in the prior art is solved, and efficient data transmission and resource utilization are achieved.
Patent Information
- Application Number
- CN202510022505.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-01-03
AI Technical Summary
In the prior art, data transmission efficiency is low, especially when the channel transmission quality is not high, resulting in increased data transmission burden, reduced backup efficiency and waste of resources.
When the non-transparent bridge link between the first host and the second host has been established, the link description parameters are obtained, and after determining that the link meets the transmission conditions, the target data set is received from the link. The data set includes a first data subset, a first reference data subset, and a second reference data subset. The first data subset is verified by the first reference data subset. If erroneous data is found, the second reference data subset is corrected to obtain the corrected second data subset, and it is determined as the received target data subset.
By directly receiving corrected corrected data on the receiving end, data retransmission is avoided, data transmission efficiency is improved, and resource waste is reduced.
Smart Images

Figure CN120045483A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of computers, and more particularly, to a data receiving method, apparatus, storage medium, and electronic device. Background Art
[0002] With the rapid development of information technology, in order to meet the requirements of increasing data processing capabilities and communication efficiency between processors, a method of multi-host data communication through backplane lines in a back-to-back manner has emerged, called NTB (Non-Transparent Bridge). This method connects two host systems through backplane lines and realizes data transmission and access between different hosts through specific chips, solving the problems of data transmission bottlenecks and communication delays. At the same time, in order to ensure data consistency,
[0003] During the data transmission process, to ensure the integrity of data transmission, NTB technology performs data integrity detection to detect incorrect data. After detecting incorrect data, data integrity needs to be restored through data retransmission. However, the data retransmission process increases the data transmission burden, reduces the backup efficiency, and wastes resources, which is particularly obvious when the channel transmission quality is not high. That is to say, there is a technical problem of low data transmission efficiency in the prior art.
[0004] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention
[0005] Embodiments of the present application provide a data receiving method, apparatus, storage medium, and electronic device to at least solve the technical problem of low data transmission efficiency in the related art.
[0006] According to one aspect of the embodiments of the present application, a data receiving method is provided, including: obtaining at least one link description parameter of a non-transparent bridge link when the non-transparent bridge link between a first host and a second host has been established; receiving a target data set from the non-transparent bridge link when it is determined that the non-transparent bridge link meets the transmission conditions according to the link description parameters, where the target data set includes a first data subset, a first reference data subset, and a second reference data subset; verifying the first data subset according to the first reference data subset; correcting the incorrect data in the first data subset according to the second reference data subset to obtain a second data subset when the verification result of the first data subset indicates that there is incorrect data in the first data subset; and determining the second data subset as the received target data subset.
[0007] Optionally, correct the error data in the first data subset according to the second reference data subset to obtain a second data subset, including: when the second reference data subset is a BCH code matching the first data subset, determining the target position of the error data in the first data subset according to the first processing result of processing the second reference data subset by the BCH decoding algorithm; determining the correction data corresponding to the error data according to the second processing result of processing the second reference data subset by the BCH decoding algorithm; and processing the first data subset according to the correction data to obtain the second data subset.
[0008] Optionally, after processing the first data subset according to the correction data to obtain the second data subset, it further includes one of the following: verifying the second data subset according to the first reference data subset; when the verification result of the second data subset indicates that there is error data in the second data subset, correcting the error data in the second data subset according to the second reference data subset to obtain a third data subset; when the second data subset does not meet the error correction condition, sending an error correction indication message to the first host, where the error correction indication message is used to request the first host to resend the target data set.
[0009] Optionally, before receiving the target data set from the data transmission link when it is determined that the transparent bridge link meets the transmission condition according to the link description parameters, it further includes: obtaining the bit error rate parameter matching the non-transparent bridge link in the first data transmission period; when the bit error rate parameter is within the first parameter range, determining that the non-transparent bridge link meets the transmission condition; obtaining the transmission rate reference value matching the non-transparent bridge link in the second data transmission period; when the transmission rate reference value is greater than or equal to the target rate value, obtaining the link stability parameter matching the transparent bridge link; and when the link stability parameter indicates that the transparent bridge link is in a stable state, determining that the transparent bridge link meets the transmission condition.
[0010] Optionally, before verifying the first data subset according to the first reference data subset, it further includes at least one of the following: when it is detected that the non-transparent bridge link is in the first link error state, sending a first warning message, where the first warning message is used to indicate that the first host and / or the second host is in a disconnected state; when it is detected that the non-transparent bridge link is in the second link error state, sending a second warning message, where the second warning message is used to indicate that there is a fault in the memory area of the first host and / or the second host.
[0011] Optionally, when it is determined that the transparent bridge link meets the transmission conditions according to the link description parameters, receiving a target data set from the data transmission link, including: when the non-transparent bridge link is in the first transmission state, in response to a direct memory access request received from the data transmission link, receiving the target data set from the data transmission link; when the non-transparent bridge link is in the second transmission state, receiving the target data set from the data transmission link according to a memory copy operation.
[0012] Optionally, after correcting the error data in the first data subset according to the second reference data subset, it further includes: when the correction of the first data subset fails, sending error correction indication information to the first host through the non-transparent bridge link, where the error correction indication information is used to request the first host to re-send a reference data set matching the target data set; when the position of the error data is located, the error correction indication information includes an error correction indication bitmap, and each bit in the error correction indication bitmap corresponds to a data object in the target data set respectively; the setting status of each bit in the error correction indication bitmap is used to indicate the data objects included in the reference data set; when the position of the error data is not located, the error correction indication information is used to indicate that the target data set is determined as the reference data set.
[0013] According to another aspect of the embodiments of the present application, there is also provided a data receiving device, including: an obtaining unit, configured to obtain at least one link description parameter of a non-transparent bridge link when the non-transparent bridge link between the first host and the second host is established; a receiving unit, configured to receive a target data set from the data transmission link when it is determined that the non-transparent bridge link meets the transmission conditions according to the link description parameters, where the target data set includes a first data subset, a first reference data subset and a second reference data subset; a verification unit, configured to verify the first data subset according to the first reference data subset; a correction unit, configured to correct the error data in the first data subset according to the second reference data subset to obtain a second data subset when the verification result of the first data subset indicates that there is error data in the first data subset; a determination unit, configured to determine the second data subset as the received target data subset.
[0014] According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is set to execute the above-mentioned cabinet identification management method when running.
[0015] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data reception method or the training method of the performance index prediction model as described above.
[0016] According to yet another aspect of the embodiments of the present application, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to execute the data reception method or the training method of the performance index prediction model as described above through the computer program.
[0017] Through the above-described implementation manner of the present application, at least one link description parameter of the non-transparent bridge link can be obtained after the non-transparent bridge link between the first host and the second host has been established; then, when it is determined according to the link description parameter that the non-transparent bridge link meets the transmission condition, the target data set is received from the non-transparent bridge link, where the target data set includes a first data subset, a first reference data subset, and a second reference data subset; further, the first data subset is verified according to the first reference data subset; and then, when the verification result of the first data subset indicates that there is incorrect data in the first data subset, the incorrect data in the first data subset is corrected according to the second reference data subset to obtain a second data subset; and the second data subset is determined as the received target data subset. Thus, the correction of incorrect data generated during transmission is realized, and the receiving end can directly receive the corrected correct data without using data retransmission, solving the technical problem of low data transmission efficiency in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0019] Figure 1 is a hardware structure block diagram of a server device of a data reception method according to an embodiment of the present application;
[0020] Figure 2 is a flowchart of a data reception method according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of a data reception method according to an embodiment of the present application;
[0022] Figure 4Schematic diagram of another data receiving method according to an embodiment of the present application;
[0023] Figure 5 Flowchart of another data receiving method according to an embodiment of the present application;
[0024] Figure 6 Flowchart of yet another data receiving method according to an embodiment of the present application;
[0025] Figure 7 Flowchart of yet another data receiving method according to an embodiment of the present application;
[0026] Figure 8 Flowchart of yet another data receiving method according to an embodiment of the present application;
[0027] Figure 9 Flowchart of yet another data receiving method according to an embodiment of the present application;
[0028] Figure 10 Schematic diagram of the structure of a data receiving device according to an embodiment of the present application;
[0029] Figure 11 Schematic diagram of the structure of a data receiving electronic device according to an embodiment of the present application. Detailed implementation manners
[0030] In the following, embodiments of the present application will be described in detail with reference to the accompanying drawings and in conjunction with the embodiments.
[0031] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0033] The method embodiments provided in the embodiments of the present application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 is a hardware structural block diagram of a server device for a data processing method according to an embodiment of the present application. As Figure 1 shown, the server device may include one or more ( Figure 1 only one is shown in Figure 1 processors 102 (the processors 102 may include, but are not limited to, processing devices such as a microprocessor MCU or a field programmable gate array FPGA) and a memory 104 for storing data. Among them, the above server device may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown in Figure 1 is only schematic and does not limit the structure of the above server device. For example, the server device may further include more or fewer components than
[0034] shown in
[0035] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the method for adjusting the read voltage in a memory in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include a high-speed random access memory, and may further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories may be connected to the server device through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0036] As an alternative embodiment, as Figure 2 shown, the above data receiving method includes:
[0037] S202, when a non-transparent bridge link between a first host and a second host has been established, obtain at least one link description parameter of the non-transparent bridge link;
[0038] S204, when it is determined according to the link description parameter that the non-transparent bridge link meets the transmission condition, receive a target data set from the non-transparent bridge link, where the target data set includes a first data subset, a first reference data subset, and a second reference data subset;
[0039] S206, verify the first data subset according to the first reference data subset;
[0040] S208, when the verification result of the first data subset indicates that there is incorrect data in the first data subset, correct the incorrect data in the first data subset according to the second reference data subset to obtain a second data subset;
[0041] S210, determine the second data subset as the received target data set.
[0042] It should be noted that the above non-transparent bridge link is a direct communication channel established between two or more storage systems. Through a special hardware bridging mechanism, data can be efficiently transmitted between different storage systems without passing through the network stack. For the transmission architecture of a traditional non-transparent bridge link between two hosts, refer to Figure 3 , Figure 3 In, the host 302 and the host 304 communicate through a non-transparent bridge link built by their respective NTB EPs.
[0043] In the above steps S202 to S210, in the data transmission based on the above non-transparent bridge link, during the process of data being transmitted from one host (the first host) to another host (the second host), verification and correction operations will be performed to verify the data correctness.
[0044] Specifically, first execute the above step S202. When a non-transparent bridge link between the first host and the second host has been established, obtain at least one link description parameter of the non-transparent bridge link. It can be understood that the above step S202 is carried out after confirming that the non-transparent bridge link between the first host and the second host has been successfully established. The successful establishment of the non-transparent bridge link is a prerequisite for data transmission. The non-transparent bridge link ensures that there is an effective communication channel between the two hosts. Once the above non-transparent bridge link is established, obtain at least one parameter describing the state of the non-transparent bridge link, that is, the above link description parameter.
[0045] It should be noted that the above link description parameters are used to describe the maximum transmission rate and the number of bandwidth indication channels of the non-transparent bridge link. The above maximum transmission rate is used to indicate the maximum data transmission rate of the non-transparent bridge link, and the number of bandwidth indication channels is used to describe the pre-configured available channels of the non-transparent bridge link. It can be understood that when the non-transparent bridge link uses all the channel numbers, the non-transparent bridge link has the maximum data transmission rate.
[0046] After obtaining the link description parameters through the above step S202, it is necessary to determine whether the non-transparent bridge link meets the transmission conditions according to the link description parameters. It should be noted that the setting of the above transmission conditions is based on the performance requirements of the non-transparent bridge link. For example, when the current occupied channel number and the current transmission rate of the link reach a certain threshold, and the currently established non-transparent bridge link can perform normal data transmission, etc., that is, when the bit error rate of data transmission is less than the preset bit error rate threshold, it is determined that the non-transparent bridge link meets the transmission conditions.
[0047] Furthermore, when it is determined that the non-transparent bridge link meets the transmission conditions, the target data set is received from the non-transparent bridge link. The above target data set includes the actually transmitted data (the first data subset), the first reference data subset for verifying data redundancy information, and the second reference data subset for error correction. It should be noted that the above first reference data subset can be a data subset generated by CRC encoding, and the second reference data subset can be a data subset generated by BCH encoding.
[0048] Specifically, during the data transmission process, a part of redundant data will be added to the data to be transmitted (the first data subset). The above redundant data can be divided into two parts. One part is obtained by performing CRC encoding on the original data, that is, the above first reference data subset, which is used to determine whether an error has occurred during data transmission by checking the CRC-encoded data at the receiving end. The other part is obtained by BCH encoding, that is, the above second data reference subset, which is used to correct the error data of multiple bits in the case of data transmission errors.
[0049] Furthermore, perform the above step S206 to verify the integrity of the data by verifying the first data subset according to the first reference data subset. Specifically, it is completed by calculating the check value of the first data subset and comparing it with the check value in the first reference data subset. If the calculated check value matches the reference value, it indicates that no error has occurred during data transmission, and subsequent operations can be continued; otherwise, it indicates that the data may be incorrect and further error correction processing is required.
[0050] It can be understood that if an error is detected in the data of the first data subset in the above S206, the error correction phase is entered, that is, the above step S208 is executed. In the above step S208, the information in the second reference data subset is used to correct the error data to restore the integrity of the data. The second reference data subset contains complex error correction information, such as error correction codes generated by BCH coding. By decoding the error correction codes generated by BCH coding, the error data can be corrected, and the corrected first data subset is used as the above second data subset.
[0051] It can be understood that after the error data is corrected through the above step S208, the above second data subset will be used as the target data subset received by the receiving party. That is to say, at this time, the errors generated during the data transmission process have been effectively processed, and the receiving party can receive the second data subset as correct and error-free data.
[0052] In the above embodiment, at least one link description parameter of the non-transparent bridge link can be obtained first when the non-transparent bridge link between the first host and the second host has been established; then, when it is determined that the non-transparent bridge link meets the transmission conditions according to the link description parameters, the target data set is received from the data transmission link, where the target data set includes the first data subset, the first reference data subset, and the second reference data subset; further, the first data subset is verified according to the first reference data subset; and then, when the verification result of the first data subset indicates that there is error data in the first data subset, the error data in the first data subset is corrected according to the second reference data subset to obtain the second data subset; and the second data subset is determined as the received target data subset. Thus, the error data generated during transmission is corrected, and the receiving end can directly receive the corrected correct data without using data retransmission, solving the technical problem of low data transmission efficiency in the prior art.
[0053] As an optional embodiment, correcting the error data in the first data subset according to the second reference data subset to obtain the second data subset includes:
[0054] S1, when the second reference data subset is a BCH code matching the first data subset, determining the target position of the error data in the first data subset according to the first processing result of processing the second reference data subset by the BCH decoding algorithm;
[0055] S2, obtaining the correction data corresponding to the error data according to the second processing result of processing the second reference data subset by the BCH decoding algorithm;
[0056] S3. Process the first data subset according to the correction data to obtain a second data subset;
[0057] It should be noted that the above steps S1 to S3 are to correct the data of the above first data subset by using BCH coding to obtain the above second data subset. Specifically, first execute the above step S1 to locate the error data.
[0058] It can be understood that during data transmission, if the received first data subset contains error data. At this time, the receiving end will process the second reference data subset using the BCH decoding algorithm. The processing results include two aspects. The first aspect is the result containing the error data position information, that is, the above first processing result. The other aspect of the result is the result carrying error correction information, that is, the above second processing result. The specific position of the error data can be determined through the above first processing result containing the error data position information, that is, the above target position.
[0059] After determining the target position of the error data through the above step S1, generate the correction data corresponding to the error data according to the error correction information carried in the second processing result of the BCH decoding algorithm. Specifically, the above error information is the above correction data, that is, the data in the above error correction information is used as the correction data in the above step S3. It can be understood that the above correction data is calculated through the BCH decoding algorithm based on the BCH coding information in the received second reference data subset.
[0060] Further, after obtaining the correction data, repair the error data in the first data subset through the correction data. For example, perform modulo 2 addition (XOR operation) between the bits corresponding to the error data and the correction data to restore the original state of the data. That is, the above process the first data subset according to the correction data to obtain a second data subset.
[0061] In the above embodiment, through the BCH decoding method, first determine the target position of the error data in the first data subset according to the first processing result of processing the second reference data subset by the BCH decoding algorithm; then determine the correction data corresponding to the error data according to the second processing result of processing the second reference data subset by the BCH decoding algorithm; and further process the first data subset according to the correction data to obtain a second data subset, thereby realizing the correction of the error data generated during the transmission process and solving the technical problem in the prior art that the error data generated during the transmission process cannot be corrected.
[0062] As an alternative embodiment, after processing the first data subset with the correction data to obtain a second data subset, it further includes one of the following:
[0063] Method 1: Verify the second data subset according to the first reference subset; in the case where the verification result of the second data subset indicates that there is incorrect data in the second data subset, correct the incorrect data in the second data subset according to the second reference data subset to obtain a third data subset;
[0064] Method 2: In the case where the second data subset does not meet the error correction condition, send an error correction indication message to the first host, where the error correction indication message is used to request the first host to re - send the target data set.
[0065] It should be noted that after the first data subset undergoes error correction to obtain the second data subset, two optional methods need to be further adopted to enhance the reliability of data transmission, namely the above - mentioned Method 1 and Method 2. Among them, Method 1 is the method when the second data subset meets the error correction condition, for example, receiving a return value representing the successful generation of the second data subset, and at this time, execute Method 1. Method 2 is the method when the second data subset does not meet the error correction condition, for example, receiving a return value representing the unsuccessful generation of the second data subset, and at this time, execute Method 2.
[0066] It should be noted that for the above - mentioned Method 1, the first data subset becomes the theoretically error - free second data subset through the correction of the BCH decoding algorithm, but at this time, it is not immediately considered that the data transmission process is completed. Instead, the first reference data subset is further used for secondary verification to verify the integrity of the second data subset.
[0067] Specifically, in the above - mentioned Method 1, use the first reference data subset (such as CRC check code) to verify the second data subset to further verify the data correctness of the second data subset. If the verification result shows that there is still incorrect data in the second data subset, then the incorrect data will be corrected again according to the BCH coding information in the second reference data subset to obtain a third data subset.
[0068] It can be understood that in the above - mentioned Method 2, the second data subset may not meet the error correction condition because the number of errors exceeds the correction ability. For example, a memory overflow occurs during the error correction process, resulting in the inability to complete the error correction, or due to an exception in the hardware environment responsible for executing the error correction, such as a system crash, resulting in the inability to complete the error correction. At this time, the generated second data subset only contains partial corrected data or contains invalid data. At this time, it is considered that the second data subset does not meet the error correction condition. In this case, an error correction indication message is sent to the first host that sent the above - mentioned target data set: request the first host to re - send the target data set.
[0069] Through the above implementation manners, on the one hand, in the case where the above-mentioned second data subset that meets the error correction condition is successfully generated through the error correction mechanism, the verification operation is continued for the second data subset to ensure the correctness of the data in the second data subset, that is, the error correction process is correct. On the other hand, in the case where the above-mentioned second data subset that meets the error correction condition cannot be generated through the error correction mechanism, the first host is requested to retransmit the target data set to ensure that the receiving end can receive the correct data to be transmitted.
[0070] As an optional implementation manner, after determining the second data subset as the received target data subset, it further includes:
[0071] S1. Obtain a first correction description parameter within the target data transmission period, where the first correction description parameter is used to indicate the frequency of performing the correction operation within the target data transmission period;
[0072] S2. When the first correction description parameter is within the first parameter range, send first negotiation information to the first host, where the first negotiation information is used to instruct the first host to adjust the current BCH coding method to the first BCH coding method. The complexity of the first BCH coding method is lower than that of the current BCH coding method, and the first effective data ratio of the data set determined according to the first BCH coding method is higher than the second effective data ratio of the data set determined according to the current BCH coding method;
[0073] S3. When the first correction description parameter is within the second parameter range, send second negotiation information to the first host, where the second negotiation information is used to instruct the first host to adjust the current BCH coding method to the second BCH coding method. The complexity of the second BCH coding method is higher than that of the current BCH coding method, and the third effective data ratio of the data set determined according to the second BCH coding method is higher than the second effective data ratio of the data set determined according to the current BCH coding method;
[0074] Wherein, the first parameter value in the first parameter range is less than or equal to any second parameter value in the second parameter range.
[0075] It should be noted that a trade-off needs to be made between the complexity and error correction ability of the BCH coding. The higher the complexity of the BCH coding, the stronger the error correction ability, but at the same time, it will reduce the amount of effective data transmitted and affect the data transmission efficiency. Therefore, it is necessary to dynamically adjust the strategy of the BCH coding method according to the real-time data correction requirements.
[0076] Specifically, first, in the target data transmission cycle through the above step S1, the first correction description parameter is obtained in real time. The first correction description parameter is used to indicate the frequency of performing data error correction operations in the current cycle. It can be understood that the level of the error correction frequency reflects the size of the error rate in the data transmission process, and thus can be used as a basis for adjusting the complexity of the BCH coding method.
[0077] Further, in the case of a low error correction frequency, that is, when the first correction description parameter is in the first parameter interval, it indicates that the error rate in the data transmission process is low. At this time, the system will send the first negotiation information to the first host, instructing the first host to adjust the currently used BCH coding method to the first BCH coding method with lower complexity. Since the first BCH coding method has low complexity, it can increase the proportion of effective data, that is, the first effective data proportion, so as to improve the data transmission efficiency on the premise of ensuring data reliability.
[0078] In the case of a high error correction frequency, that is, when the first correction description parameter is in the second parameter interval, it indicates that the error rate in the data transmission process is high. The second negotiation information is sent to the first host, instructing the first host to adjust the currently used BCH coding method to the second BCH coding method with higher complexity. By reducing the proportion of effective data (that is, the third effective data proportion), the data error correction ability is improved, so as to ensure the integrity of data transmission and improve the stability of data transmission.
[0079] Through the above implementation manner, by obtaining the first correction description parameter in the target data transmission cycle, the error correction frequency in the data transmission process is monitored in real time, and the complexity of the BCH coding method is dynamically adjusted according to the level of the error correction frequency. In the case of a low error correction frequency, a BCH coding method with lower complexity is selected to increase the effective data transmission volume and ensure the data transmission efficiency; in the case of a high error correction frequency, a BCH coding method with higher complexity is selected to enhance the error correction ability and ensure the reliability of data transmission. Thus, the data error correction ability and transmission efficiency are balanced. Ensure the optimal configuration under different data transmission conditions and improve the adaptability and robustness of data communication.
[0080] As an optional implementation manner, after determining the second data subset as the received target data subset, it further includes:
[0081] S1. Obtain the second correction description parameter in the target data transmission cycle, where the second correction description parameter is used to indicate the average duration of performing the correction operation in the target data transmission cycle;
[0082] S2. When the second correction description parameter is within the third parameter range, send third negotiation information to the first host, where the third negotiation information is used to instruct the first host to adjust the current BCH coding method to a third BCH coding method, and the complexity of the third BCH coding method is lower than that of the current BCH coding method.
[0083] S3. When the second correction description parameter is within the fourth parameter range, send fourth negotiation information to the first host, where the fourth negotiation information is used to instruct the first host to adjust the current BCH coding method to a fourth BCH coding method, and the complexity of the fourth BCH coding method is higher than that of the current BCH coding method.
[0084] Wherein, the third parameter value in the third parameter range is less than or equal to the fourth parameter value of any one in the fourth parameter range.
[0085] It can be understood that within the target data transmission period, by obtaining the second correction description parameter within the target data transmission period, the average duration of performing the data correction operation is monitored and statistically analyzed in real time. The above-mentioned second correction description parameter is used to reflect the average time required to process data errors and complete the correction operation.
[0086] Furthermore, for the above step S2, when the second correction description parameter is within the third parameter range, that is, at a low average correction duration, the BCH coding complexity is reduced through the third negotiation information. Specifically, if the second correction description parameter (average correction duration) is within the preset third parameter range, it indicates that the error correction operation has a short processing time and high efficiency. At this time, the complexity of the BCH coding can be appropriately reduced to improve the real-time performance of data transmission. Therefore, send the third negotiation information to the first host, instructing the first host to adjust the currently used BCH coding method to a third BCH coding method with lower complexity. By reducing the complexity of the BCH coding, the computational delay in the encoding and decoding processes can be reduced, and the data transmission speed can be increased.
[0087] For the above step S3, when the second correction description parameter is within the fourth parameter range, that is, at a high average correction duration, the BCH coding complexity is increased through the fourth negotiation information. Specifically, if the second correction description parameter (average correction duration) is within the preset fourth parameter range, it indicates that the data error correction operation takes a long time and has low efficiency. In this case, send the fourth negotiation information to the first host, instructing the first host to adjust the currently used BCH coding method to a fourth BCH coding method with higher complexity to enhance the error correction ability and shorten the error correction time.
[0088] Through the above embodiments, by obtaining the second correction description parameter within the target data transmission period, the average correction duration within the target data transmission period is monitored in real time, and according to the level of the average correction duration, negotiation information is sent to the first host to adjust the complexity strategy of the BCH coding method, achieving the optimal balance between data transmission real-time performance and stability, and improving the overall data communication quality and the stability of system operation.
[0089] As an alternative embodiment, before receiving the target data set from the non-transparent bridge link when it is determined that the transparent bridge link meets the transmission conditions according to the link description parameter, it further includes:
[0090] S1. Obtain the bit error rate parameter matching the non-transparent bridge link within the first data transmission period; when the bit error rate parameter is within the first parameter interval, determine that the non-transparent bridge link meets the transmission conditions;
[0091] S2. Obtain the transmission rate reference value matching the non-transparent bridge link within the second data transmission period; when the transmission rate reference value is equal to the target rate value, obtain the link stability parameter matching the transparent bridge link; when the link stability parameter indicates that the transparent bridge link is in a stable state, determine that the transparent bridge link meets the transmission conditions.
[0092] It should be noted that before data transmission through the above non-transparent bridge link, it is necessary to dynamically judge whether the non-transparent bridge link meets the transmission conditions according to the real-time performance indicators of the non-transparent bridge link, so as to avoid data transmission errors caused by the non-transparent bridge link not meeting the data transmission conditions.
[0093] Specifically, first execute the above step S1 to obtain the above bit error rate parameter related to the non-transparent bridge link within the first data transmission period. It should be noted that the bit error rate refers to the ratio of the number of error bits to the total number of transmitted bits during data transmission. If the obtained bit error rate parameter is within a preset first parameter interval, it indicates that the communication quality of the above non-transparent bridge link is good, and the occurrence rate of error bits is within an acceptable range. At this time, it can be considered that the non-transparent bridge link meets the basic conditions for data transmission and can safely perform data transmission.
[0094] Further, after the preliminary confirmation of the basic communication quality of the non-transparent bridge link is completed through the above step S1, further execute the above step S2 to obtain the transmission rate reference value matching the non-transparent bridge link within the second data transmission period.
[0095] It should be noted that the above reference value of the transmission rate directly reflects the current transmission capacity of the non-transparent bridge link and is used to determine whether the link can meet the established data transmission rate requirements. If the reference value of the transmission rate is equal to the target rate value, it indicates that the current transmission efficiency of the link has reached or exceeded the preset rate standard.
[0096] Specifically, the above transmission rate parameters can be the current transmission rate and the currently occupied bandwidth (number of channels) of the non-transparent bridge link, and the target rate value is the maximum transmission rate and the bandwidth indication number of channels of the non-transparent bridge link. As described above, the maximum transmission rate is used to indicate the maximum data transmission rate of the non-transparent bridge link, and the bandwidth indication number of channels is used to describe the pre-configured available number of channels of the non-transparent bridge link. It can be understood that when the non-transparent bridge link uses all the channel numbers, the non-transparent bridge link has the maximum data transmission rate.
[0097] Furthermore, when the current transmission rate of the non-transparent bridge link is equal to the maximum transmission rate and the currently occupied number of channels is the bandwidth indication number of channels, it is considered that the transmission rate of the non-transparent bridge link meets the data transmission requirements. It should be noted that the above method of confirming that the transmission rate meets the data transmission requirements by both the current transmission rate and the currently occupied number of channels is only an example. In fact, since the maximum transmission rate will be achieved when all available channel numbers are occupied, it is also possible to compare only one of the current transmission rate and the currently occupied number of channels with the target rate value (when comparing with the current transmission rate, the target rate value is the maximum transmission rate value, and when comparing with the currently occupied number of channels, the target rate value is the bandwidth indication number of channels). No specific limitation is made here.
[0098] Further, after comparing the reference value of the transmission rate with the target rate value as described above, when the reference value of the transmission rate is equal to the target rate value, a link stability parameter matching the transparent bridge link is obtained. The above link stability parameter is used to describe the comparison results of the above reference value of the transmission rate and the above target rate value obtained at each sampling moment within a certain time range. If the above reference value of the transmission rate obtained at each sampling moment is not less than the above target rate value, the link stability parameter indicates that the transparent bridge link is in a stable state, and thus it can be determined that the transparent bridge link meets the transmission conditions.
[0099] Through the above implementation manner, before data transmission, it is possible to dynamically judge the transmission conditions of the link based on dynamic link performance indicators (bit error rate, transmission rate, and link stability), thereby avoiding data transmission errors and retransmissions caused by poor link communication quality, insufficient transmission rate, or unstable link, and improving the efficiency and reliability of data transmission.
[0100] In an alternative implementation, after obtaining the transmission rate reference value that matches the non-transparent bridge link during the second data transmission period, the following steps are further included:
[0101] S1. When the transmission rate reference value is less than the target rate value, send a reconnection instruction to the first host, where the reconnection instruction is used to re-enable the non-transparent bridge link between the first host and the second host;
[0102] S2. When the non-transparent bridge link is re-established, re-obtain the transmission rate reference value that matches the non-transparent bridge link during the third data transmission period;
[0103] S3. When the re-obtained transmission rate reference value is less than the target rate value, repeat the above steps;
[0104] S4. When the number of times of re-enabling the non-transparent bridge link is greater than or equal to the target number of times, disconnect the non-transparent bridge link between the first host and the second host.
[0105] It should be noted that during the above-mentioned second data transmission period, the transmission rate reference value that matches the non-transparent bridge link is obtained. If this transmission rate reference value is less than the above-mentioned target rate value, it indicates that the transmission efficiency of the current link fails to reach the expected standard. At this time, the system will send a reconnection instruction to the first host.
[0106] Furthermore, when the non-transparent bridge link is re-established, the transmission rate is re-evaluated. Specifically, the transmission rate reference value that matches the non-transparent bridge link during the third data transmission period is re-obtained. When the re-obtained transmission rate reference value is less than the target rate value, repeat the above steps.
[0107] It can be understood that if the transmission rate reference value is still less than the target rate value after multiple reconnections, it is very difficult to make the transmission rate reference value equal to the target rate value by continuing to reconnect. At this time, the non-transparent bridge link between the first host and the second host is disconnected.
[0108] As an alternative implementation, after obtaining the link stability parameter that matches the transparent bridge link, the following steps are further included:
[0109] S1. When the link stability parameter indicates that the transparent bridge link is in an unstable state, reduce the target rate value to the reference rate value and send a reconnection instruction to the first host, where the reconnection instruction is used to re-enable the non-transparent bridge link between the first host and the second host;
[0110] S2. When the non-transparent bridge link is re-established, re-obtain the transmission rate reference value that matches the non-transparent bridge link during the fourth data transmission period.
[0111] It should be noted that in the above step S1, after the system obtains the link stability parameter matching the transparent bridge link, if the parameter indicates that the link is in an unstable state, it means that the current link condition may not support the stable transmission of data at the preset target rate value. At this time, the target rate value is adjusted to a lower reference rate value. Subsequently, the system sends a reconnection instruction to the first host, instructing the first host to re-establish the non-transparent bridge link with the second host.
[0112] Furthermore, after responding to the reconnection instruction and completing the re-establishment of the non-transparent bridge link, a new data transmission cycle (the fourth data transmission cycle) is entered, and at this time, the transmission rate reference value matching the non-transparent bridge link is re-obtained.
[0113] As an optional implementation manner, before verifying the first data subset according to the first reference data subset, at least one of the following is further included:
[0114] S1. When it is detected that the non-transparent bridge link is in the first link error state, a first warning message is sent, where the first warning message is used to indicate that the first host and / or the second host is in a disconnected state;
[0115] S2. When it is detected that the non-transparent bridge link is in the second link error state, a second warning message is sent, where the second warning message is used to indicate that a fault has occurred in the memory area of the first host and / or the second host.
[0116] It should be noted that before verifying the first data subset, the state of the above non-transparent bridge link is monitored in real time to ensure that the data transmission channel is in a normal working state. If the system detects that the non-transparent bridge link is in the first link error state, it means that the link connection is interrupted or the host is disconnected. At this time, the system is triggered to send the first warning message. The above first warning message clearly indicates that the first host and / or the second host is in a disconnected state.
[0117] In addition, in addition to the above first link error state, it is also necessary to monitor whether the non-transparent bridge link is in the second link error state, and the above second link error state is used to indicate the situation where a fault has occurred in the memory area. It should be noted that during the data communication process, a memory fault may cause errors in the data transmission process, thereby affecting the integrity of the data and the stability of the system. When the second link error state is detected, a second warning message is sent to indicate that a fault has occurred in the memory area of the involved host.
[0118] As an optional implementation manner, when it is determined according to the link description parameter that the transparent bridge link meets the transmission conditions, receiving a target data set from the non-transparent bridge link, including:
[0119] S1. When the non-transparent bridge link is in the first transmission state, in response to a direct memory access request received from the non-transparent bridge link, receive a target data set from the data transmission link;
[0120] S2. When the non-transparent bridge link is in the second transmission state, receive a target data set from the non-transparent bridge link according to a memory copy operation.
[0121] In the above step S1, when the non-transparent bridge link is in a stable first transmission state, in response to a direct memory access (DMA) request received from the non-transparent bridge link, a DMA transmission method is adopted to receive the target data set. It should be noted that the DMA transmission method allows data to be directly transmitted between the source memory and the target memory without passing through the CPU, thus significantly improving the data transmission rate and reducing the CPU load.
[0122] It should be noted that in the above step S2, if the real-time state of the non-transparent bridge link drops to the second transmission state, it indicates that the transmission state of the non-transparent bridge link is not good at this time, such as a decrease in signal quality or an increase in the data transmission error rate. At this time, receive the target data set from the non-transparent bridge link according to a memory copy operation. It is worth noting that different from the above step S1, the memory copy transmission operation in step S2 adds CPU control and monitoring during the data transmission process, thus ensuring the accuracy and integrity of the data transmission.
[0123] As an optional implementation manner, after correcting the error data in the first data subset according to the second reference data subset, it further includes:
[0124] S1. When the correction of the first data subset fails, send error correction indication information to the first host through the non-transparent bridge link;
[0125] Among them, the error correction indication information is used to request the first host to retransmit a reference data set that matches the target data set;
[0126] When the position of the error data is located, the error correction indication information includes an error correction indication bitmap, and each bit in the error correction indication bitmap corresponds to a data object in the target data set respectively; the setting conditions of the bits in the error correction indication bitmap are used to indicate the data objects included in the reference data set;
[0127] When the position of the error data is not located, the error correction indication information is used to indicate that the target data set is determined as the reference data set.
[0128] It can be understood that when the receiving end attempts to correct the error data in the first data subset using the second reference data subset but the correction fails, the receiving end will send error correction indication information to the sending end (the first host) through the non-transparent bridge link.
[0129] It should be noted that there are two cases where the correction fails. One is that the positioning of the error data has been completed, but the correction of the error data has not been completed. At this time, an error correction indication bitmap will be generated. Each bit in the error correction indication bitmap corresponds to a data object in the target data set, and the bit is defaulted to 0. When a transmission error occurs in this data object, the corresponding bit is set (set to 1). It can also be that the 1 value is used as the default value. When a transmission error occurs in this data object, the corresponding bit is set to 0. No specific limitation is made here.
[0130] Furthermore, each bit in the error correction indication bitmap can indicate the data object that the first host needs to resend. For example, when the bit is defaulted to 0, in the target data set, the data object corresponding to at least one bit with a value of 1 is determined as the above reference data set.
[0131] It should be noted that if it is confirmed that the data error correction fails and the positioning of the error data has not been completed, then the above error correction indication bitmap is no longer carried in the error correction indication information at this time. At this time, the error correction indication information indicates that the first host sends the target data set as the above reference data set.
[0132] Figure 4 It is a schematic diagram of another data receiving method according to an embodiment of the present application. Specifically, Figure 4 shows two traditional NTB deployment schemes. As Figure 4 shown, when the data is transmitted, it first passes through the local NTB module (NTB module 406), and the local NTB module (NTB module 406) performs address translation. After that, the data will reach the peer NTB module (NTB module 486), and then the peer NTB module (NTB module 486) performs address translation, and finally the data transmission is completed.
[0133] Specifically, Figure 4 the NTB technology in
[0134] The resource management module (including resource management module 412 and resource management module 492) is used to be responsible for the application and release of the required resources, such as the physical memory required for DMA transmission.
[0135] The channel management module (including channel management modules 404 and 484) is used to be called by the upper-layer service. The upper-layer service will continuously poll the NTB data transmission channels and select appropriate channels for data transmission.
[0136] The NTB module (including NTB modules 406 and 486) is responsible for the initialization configuration of the NTB chip and completing the address translation work. This module mainly includes three parts: device initialization, link initialization, and data transmission. Device initialization is responsible for the initialization work of the NTB device, such as processes like device registration, resource allocation, and registration of interrupt handling callback functions; link initialization is responsible for the initialization work of the link, mainly including the initialization settings of link registers, DMA device initialization, etc.; data transmission is mainly responsible for data transmission and data verification. After each data transmission is completed, it will detect whether there are errors in the current link and whether there are errors in packet reception. If there are errors, data retransmission may be required through the retransmission mechanism (in the case of data transmission errors, if there is a problem with the link, it may be necessary to re-initialize the link).
[0137] The data transmission module (including data transmission modules 408 and 488) has two modes: DMA and non-DMA. Among them, the DMA mode uses a DMA chip for data transmission. The advantage of this method is that it does not require CPU participation and has high transmission efficiency; the non-DMA method requires CPU participation to perform data transmission through memory copying, with low efficiency.
[0138] The error handling module (including error handling modules 410 and 490) includes two parts: link error and output transmission error. Among them, the link error mainly handles errors in the link process, such as the peer link going offline. Generally, this error will be reported to the front end, and the front-end personnel will handle it according to the prompt; errors generated during data transmission, such as incorrect CRC verification, indicate that the data has been interfered with during transmission, resulting in data errors. At this time, the error will be reported to the upper-layer service system, and this system will initiate a data retransmission process after receiving the error.
[0139] It should be noted that, as Figure 4 shown in the existing solution, data transmission can only detect data errors and cannot correct them. Therefore, in the event of data transmission errors, it can only be compensated through the retransmission mechanism.
[0140] Figure 5 is a flowchart of another data reception method according to an embodiment of the present application. Hereinafter, taking Figure 5 as an example, a complete data transmission process will be described.
[0141] S502, The business layer initiates an instruction. Specifically, the system is initialized and step S592, resource management, is executed. The resource management module is called to complete the resource application in the entire NTB system.
[0142] S504, Channel management. Specifically, the channel management module is called. The channel management module is called by the upper-layer service. The upper-layer service will continuously poll the NTB data transmission channel to check the status of the data transmission channel, and decide whether to initiate the data transmission service and the selection of the transmission mode by judging the channel status.
[0143] S506, NTB module configuration. Specifically, the NTB module is called to configure the NTB device to complete device initialization, link initialization, and data transmission. It should be noted that the above device initialization is mainly used to complete processes such as the registration of the NTB device, resource allocation, and the registration of the interrupt handling callback function. The above link initialization mainly completes link configuration, link negotiation, and DMA device initialization. Among them, link configuration is a necessary configuration for NTB, mainly setting the NTB device registers to complete the address conversion configuration; link negotiation is mainly for the establishment of the data transmission link; DMA initialization is responsible for the initialization work of the DMA device. If the data transmission uses the DMA mode, then this module is a required module. In addition, the above data transmission is mainly responsible for operations such as data transmission (calling the data transmission module), data encoding, and data verification.
[0144] It should be noted that after the device initialization is completed, the upper-layer service will continuously perform data transmission through the channel management module and implement data transmission through the data transmission module.
[0145] S508, Data transmission module call. Specifically, the data transmission module is called to perform the initialization configuration of the DMA engine and data transmission.
[0146] It is worth noting that after the data transmission is completed, error handling will be performed through the error handling module. The types of errors handled include link errors and data transmission errors. Link errors are mainly link errors. For example, the peer link drops or UCE / CE errors occur in the link. At this time, generally, the error will be reported to the front end, and the front-end personnel will handle it according to the prompt. In addition, the above data transmission errors mainly refer to data errors generated during the data transmission process. For example, the CRC check is incorrect. At this time, it indicates that the data has errors due to signal interference during the transmission process. At this time, the error will be sent to the error correction module. If there are still errors, it will be reported to the business layer, and the business layer will initiate a data retransmission request, and the current transmission is completed.
[0147] S510, Error correction module call. When a data error type is received, the error correction module is called. According to the pre-set algorithm, error correction is performed. If the correction is successful, subsequent operations are continued. If the correction fails, step S512 is executed, and the error handling module is called. Further, the error handling module reports to the upper-layer service that the current transmission is complete.
[0148] The following further describes the modules used in the above complete data transmission process.
[0149] The resource management module, as described above, is used to apply for and release resources through system functions; resource application is performed when the service starts, and resource release is performed when the service shuts down.
[0150] The channel management module, as described above, is used to be called by the upper-layer service module. When data transmission is performed, it first checks the channel status. If the channel status is LINKUP, that is, the link is in a normal state and it is not test data, it further checks the transmission mode and calls the NTB module to initiate a data transmission request.
[0151] The NTB module is used for device initialization, link initialization, and data transmission. The specific implementation of the NTB module Figure 6 .
[0152] Specifically, as Figure 6 shown, the NTB module 602 first executes step S602, device initialization. It should be noted that step S602 is an operation performed when the system starts. It includes processes such as device registration, resource allocation, and registration of the interrupt handling callback function; if an error occurs during the initialization process, corresponding logs will be given and subsequent operations will be aborted.
[0153] S604, link initialization. As Figure 6 shown, this step includes multiple sub-steps. First, step S604-1, link configuration, is executed. Step S604-1 is used for the initialization of the link, responsible for completing the configuration of the NTB device registers, address translation, etc.; if the initialization fails, the current initialization process is aborted.
[0154] S604-2, link negotiation. The specific negotiation process is referred to Figure 9 .
[0155] After the link negotiation process in the above step S604-2 is completed, it is necessary to wait for the initialization of the peer host, and then complete the final link negotiation process. For example, verify the validity of the peer, the consistency of the protocol version (such as whether the CRC check function is enabled), and step S604-3, whether DMA is enabled, that is, determine whether the DMA transmission mode is enabled. If the judgment result is yes, step S604-4, DAM initialization, is executed.
[0156] It should be noted that after the link is officially and completely set up, a test data will be sent to detect the connectivity of the link; and then it will enter the LINKUP stage to confirm the final state after the link is correctly configured. If it is in the LINKUP state, data transmission can be carried out, that is, if data transmission is to be carried out, the link state must be in the LINKUP state.
[0157] Further, execute step S606, data transmission. Specifically, in the above-mentioned step S606-1, determine whether to enable error correction. If so, execute step S606-2, BCH encoding, and then execute step S606-3, CRC encoding. If the judgment result is no, skip step S606-2 and directly execute step S606-3.
[0158] It should be noted that the above data transmission is an operation performed by the NTB module 602. During the data transmission process, after the NTB module 602 completes its required operations, the system calls the data transmission module 604 to perform subsequent operations during the data transmission process. And data verification is performed after the data transmission is completed. The data verification includes link error verification and data error verification. If it is a data error, the error handling module is further called for error handling; if it is a link error, it may be necessary to report the error or reset the link at this time.
[0159] The following combines Figure 9 to illustrate the specific process of link negotiation involved in step S604-2.
[0160] It should be noted that during the implementation of the above-mentioned implementation method, that is, during the initialization process of the link, the maximum rate and bandwidth value of the device will be obtained, and the maximum rate and bandwidth value (the available maximum bandwidth) will be used as the target value together;
[0161] When entering the negotiation stage, first execute step S902. Whether the number of times is less than 3 and the physical link is in the DOWN state. Specifically, determine whether the physical link state is a normal state. If the physical link state cannot be normal after 3 attempts, execute step S910 to abort the negotiation. If the physical link state is normal, execute step S904 to obtain the current SPEED / WIDTH, that is, obtain the current rate value and the current bandwidth value again.
[0162] Further, compare the current rate value with the maximum rate value and the current bandwidth value with the bandwidth value respectively; if both current values (the current rate value and the current bandwidth value) are less than the device target values (the maximum rate value and the bandwidth value), it indicates that the link is still unstable at this time (it is necessary to delay for a period of time and be automatically processed by the hardware). It should be noted that the judgment condition for step S906 above is that as long as one of the current values is less than the target value, it is judged as no, and it is not necessary to judge as no when both current values are less than the target value.
[0163] Then obtain the current current values again for comparison. If they are still less than the device target values (it is sufficient that one of the current rate value and the current bandwidth value is less than the corresponding target value, and it is not necessary for both to be less), execute step S912, and then re-enable the link.
[0164] If the current values are equal to the target values (here it is required that both the current rate value and the current bandwidth value are equal to the corresponding target values), then stability detection is required, that is, execute step S908. Specifically, continuously obtain multiple current values within a preset time range. If the multiple obtained current values are still equal to the target values, the judgment result of step S906 is yes. If a situation where the current value is less than the target value occurs, execute step S914 to reduce the speed and set the target value.
[0165] The operations performed by the data transmission module are as Figure 7 shown, Figure 7 In it, the data transmission module 702 executes steps S701 to S708. It should be noted that the data transmission module includes two modes: DMA transmission and non-DMA transmission.
[0166] Step S701, determine whether DMA is enabled, that is, determine whether the data transmission module is in the DMA mode. If it is in the DMA mode, execute step S702 to submit a DMA request. Specifically, first complete the filling of the DMA descriptor and then submit the request to the DMA, and then skip step S704 and directly execute step S706, CRC check, and then execute step S708. If the judgment result of step S708 is no, the transmission is completed. If the judgment result of S708 is yes, call the error correction module 704.
[0167] If the judgment result of the above step S701 is no, that is, in the non-DMA mode, perform address conversion and perform data transmission by means of memory copy, that is, execute step S704, and then execute the above steps S706 to S708.
[0168] In addition, an error handling module and an error correction module are also used in the above complete data transmission process to implement operations such as error detection and correction.
[0169] For the error handling module, it is responsible for error handling and reporting, including link errors and data transmission errors. It should be noted that for the above-mentioned link errors, such as the peer link going offline (by checking the link status), UCE / CE errors (by checking the AER register), at this time, the error will be reported to the front end, and the front-end personnel will handle it according to the prompt;
[0170] It should be noted that the above-mentioned data transmission errors mainly refer to data errors generated during the data transmission process. After the data transmission is completed, error checking will be performed. For example, the CRC value is checked. If the CRC value is incorrect, it means that the data has errors during the transmission process due to signal interference. At this time, the error will be sent to the error correction module and wait for the correction result. If there are still errors, it will be reported to the service layer, and the service layer will initiate a data retransmission request.
[0171] For the process executed by the error correction module, see Figure 8 . The error correction module 802 first executes the above-mentioned step S802, BCH decoding. Specifically, error correction is performed using BCH coding, which can correct multiple bit errors. The stronger the correction ability, the higher the computational complexity required and the more bandwidth it occupies. Therefore, it is necessary to balance the error correction granularity; then execute step S804, error recovery, and step S806, whether the recovery is successful. If the recovery is successful, continue with the subsequent operations. If the recovery fails, return an error to the error handling module 804, and the error handling module 804 reports it to the upper service layer.
[0172] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0173] According to another aspect of the embodiments of the present application, there is also provided a data receiving device for implementing the above data receiving method. As Figure 10 shown, the device includes:
[0174] An acquisition unit 1002, configured to acquire at least one link description parameter of the non-transparent bridge link when the non-transparent bridge link between the first host and the second host has been established;
[0175] A receiving unit 1004, configured to receive a target data set from a non-transparent bridge link when it is determined that the non-transparent bridge link meets the transmission conditions according to link description parameters, where the target data set includes a first data subset, a first reference data subset, and a second reference data subset;
[0176] A verification unit 1006, configured to verify the first data subset according to the first reference data subset;
[0177] A correction unit 1008, configured to correct the error data in the first data subset according to the second reference data subset to obtain a second data subset when the verification result of the first data subset indicates that there is error data in the first data subset;
[0178] A determination unit 1010, configured to determine the second data subset as the received target data set.
[0179] According to another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the above data receiving method, and the electronic device may be Figure 1 the terminal device or server shown. This embodiment is described by taking the electronic device as a mobile phone or a computer as an example. As Figure 11 shown, the electronic device includes a memory 1102 and a processor 1104. A computer program is stored in the memory 1102, and the processor 1104 is configured to execute the steps in any one of the above method embodiments through the computer program.
[0180] Optionally, in this embodiment, the above electronic device may be at least one of multiple network devices in a computer network.
[0181] Optionally, in this embodiment, the above processor may be configured to execute the following steps through a computer program:
[0182] S1. When a non-transparent bridge link between a first host and a second host has been established, obtain at least one link description parameter of the non-transparent bridge link;
[0183] S2. When it is determined that the non-transparent bridge link meets the transmission conditions according to the link description parameters, receive a target data set from the non-transparent bridge link, where the target data set includes a first data subset, a first reference data subset, and a second reference data subset;
[0184] S3. Verify the first data subset according to the first reference data subset;
[0185] S4. When the verification result of the first data subset indicates that there is error data in the first data subset, correct the error data in the first data subset according to the second reference data subset to obtain a second data subset;
[0186] S5. Determine the second data subset as the received target data subset.
[0187] Optionally, those of ordinary skill in the art can understand that Figure 11 The structure shown is only illustrative, and the electronic device can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, and terminal devices such as Mobile Internet Devices (MID), PAD, etc. Figure 11 It does not limit the structure of the above-mentioned electronic device. For example, the electronic device may further include more or fewer components (such as a network interface, etc.) than those shown in Figure 11 or have a different configuration from that shown in Figure 11
[0188] Among them, the memory 1102 can be used to store software programs and modules, such as the program instructions / modules corresponding to the data reception method and device in the embodiments of the present application. The processor 1104 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102, that is, implements the above data reception method. The memory 1102 includes an acquisition unit 1002, a reception unit 1004, a verification unit 1006, a correction unit 1008, and a determination unit 1010. The memory 1102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 1102 may further include a memory remotely disposed relative to the processor 1104, and these remote memories can be connected to the terminal through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof. Among them, the memory 1102 can specifically but not limitedly be used to store information such as page elements and page styles. This will not be elaborated in this example.
[0189] Optionally, the above transmission device 1106 is used to receive or send data via a network. Specific examples of the above network may include a wired network and a wireless network. In one instance, the transmission device 1106 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router through a network cable so as to communicate with the Internet or a local area network. In one instance, the transmission device 1106 is a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0190] In addition, the above-mentioned electronic device further includes: a display 1108 for displaying the above-mentioned target page; and a connection bus 1110 for connecting each module component in the above-mentioned electronic device.
[0191] In other embodiments, the above-mentioned terminal device or server may be a node in a distributed system. Among them, the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes in a form of network communication. Among them, the nodes can form a point-to-point network, and any form of computing device, such as electronic devices like servers and terminals, can become a node in the blockchain system by joining the point-to-point network.
[0192] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A data receiving method, characterized in that: include: When a non-transparent bridge link between the first host and the second host has been established, obtaining at least one link description parameter of the non-transparent bridge link; In a case where it is determined according to the link description parameters that the non-transparent bridge link meets the transmission condition, receiving a target data set from the non-transparent bridge link, wherein the target data set includes a first data subset, a first reference data subset, and a second reference data subset; verifying the first data subset according to the first reference data subset; When the verification result of the first data subset indicates that erroneous data exists in the first data subset, correcting the erroneous data in the first data subset according to the second reference data subset to obtain a second data subset; The second data subset is determined as the received target data subset.
2. The method according to claim 1, characterized in that The correcting the erroneous data in the first data subset according to the second reference data subset to obtain the second data subset includes: In a case where the second reference data subset is a BCH code matching the first data subset, determining a target position of the erroneous data in the first data subset according to a first processing result of processing the second reference data subset by a BCH decoding algorithm; Determining corrected data corresponding to the erroneous data according to a second processing result of processing the second reference data subset by the BCH decoding algorithm; The first data subset is processed according to the corrected data to obtain the second data subset.
3. The method according to claim 2, characterized in that After the first data subset is processed according to the corrected data to obtain the second data subset, the method further includes one of the following: Verifying the second data subset according to the first reference data subset; if the verification result of the second data subset indicates that erroneous data exists in the second data subset, correcting the erroneous data in the second data subset according to the second reference data subset to obtain a third data subset; In the case that the second data subset does not meet the error correction condition, error correction indication information is sent to the first host, wherein the error correction indication information is used to request the first host to resend the target data set.
4. The method according to claim 1, characterized in that: Before receiving the target data set from the non-transparent bridge link when it is determined according to the link description parameter that the transparent bridge link meets the transmission condition, the method further includes: Acquire a bit error rate parameter matching the non-transparent bridge link in a first data transmission cycle; and determine that the non-transparent bridge link meets the transmission condition when the bit error rate parameter is in a first parameter interval; Obtain a transmission rate reference value that matches the non-transparent bridge link during a second data transmission period; when the transmission rate reference value is equal to a target rate value, obtain a link stability parameter that matches the transparent bridge link; when the link stability parameter indicates that the transparent bridge link is in a stable state, determine that the transparent bridge link meets the transmission conditions.
5. The method according to claim 1, characterized in that Before verifying the first data subset according to the first reference data subset, the method further includes at least one of the following: When detecting that the non-transparent bridge link is in a first link error state, sending a first alarm message, wherein the first alarm message is used to indicate that the first host and / or the second host is in an offline state; When it is detected that the non-transparent bridge link is in a second link error state, second alarm information is sent, wherein the second alarm information is used to indicate that a fault occurs in a memory area of the first host and / or the second host.
6. The method according to claim 1, characterized in that The receiving a target data set from the non-transparent bridge link when it is determined according to the link description parameter that the transparent bridge link meets the transmission condition comprises: When the non-transparent bridge link is in a first transmission state, in response to a direct memory access request received from the data transmission link, receiving the target data set from the data transmission link; When the non-transparent bridge link is in the second transmission state, the target data set is received from the data transmission link according to a memory copy operation.
7. The method according to claim 1, characterized in that After correcting the erroneous data in the first data subset according to the second reference data subset, the method further includes: In case of a failure in correcting the first data subset, sending error correction indication information to the first host via the non-transparent bridge link; The error correction indication information is used to request the first host to resend a reference data set matching the target data set; In the case where the position of the erroneous data is located, the error correction indication information includes an error correction indication bitmap, each bit in the error correction indication bitmap corresponds to a data object in the target data set; the setting of each bit in the error correction indication bitmap is used to indicate the data object included in the reference data set; In the case where the position of the erroneous data is not located, the error correction indication information is used to indicate that the target data set is determined as the reference data set.
8. A data receiving device, characterized in that: include: an acquisition unit, configured to acquire at least one link description parameter of the non-transparent bridge link when the non-transparent bridge link between the first host and the second host has been established; a receiving unit, configured to receive a target data set from the non-transparent bridge link when it is determined according to the link description parameter that the non-transparent bridge link meets the transmission condition, wherein the target data set includes a first data subset, a first reference data subset, and a second reference data subset; a verification unit, configured to verify the first data subset according to the first reference data subset; a correction unit, configured to correct the erroneous data in the first data subset according to the second reference data subset to obtain a second data subset when the verification result of the first data subset indicates that erroneous data exists in the first data subset; A determining unit is used to determine the second data subset as the received target data subset.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Data reading method and device, data storage system, and equipment
CN108509156A
Method and device for transmitting data between nodes of a storage controller and storage medium
CN110008152A
Data error correction method and device, equipment and storage medium
CN115408198A
Data management method and device, storage medium and electronic equipment
CN117009430A
Data processing method, data fault tolerance method and device and storage medium
CN117112312A
Cited By
Cross-domain communication method, electronic equipment and medium
CN120389978A
Fault processing method of storage device, controller, device, medium and product
CN121008975A
Fault processing method, controller, device, medium and product of storage device
CN121008975B
Data transmission method and electronic equipment
CN121585327A