A data transmission method, apparatus, device, and storage medium

By integrating network status detection and data precision conversion algorithms into smart network interface cards (NICs), and dynamically adjusting data transmission strategies, the problem of supercomputing power failure caused by network congestion was solved, achieving efficient data transmission and bandwidth saving.

CN116708301BActive Publication Date: 2025-12-16INSPUR (BEIJING) ELECTRONICS INFORMATION IND CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310868402.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-14
Publication Date
2025-12-16
Estimated Expiration
2043-07-14

AI Technical Summary

Technical Problem

In large-scale distributed training, network congestion can cause supercomputing power to fail. Existing technologies have failed to effectively consider the adverse effects of the network environment on training, and automatic mixed-precision training mainly targets the internal operators of the GPU rather than distributed multi-node communication.

Method used

The network status detection and data precision conversion algorithm is integrated into the smart network interface card. The data transmission strategy is dynamically adjusted according to the network status, and the data precision is reduced to reduce the amount of communication. This includes congestion detection and data precision conversion.

Benefits of technology

It achieves both network training accuracy and reduced network communication volume in large-scale distributed training, saving bandwidth usage and improving communication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116708301B_ABST
    Figure CN116708301B_ABST
Patent Text Reader

Abstract

The application discloses a data transmission method and device, equipment and storage medium, and relates to the computer technical field. The method is applied to a data sending end of an intelligent network card, and comprises the following steps: determining a current network state; obtaining original data precision to-be-transmitted data, and determining a data transmission strategy corresponding to the original data precision to-be-transmitted data according to the current network state; determining a corresponding target data precision when data transmission is performed based on the data transmission strategy, and determining target data precision to-be-transmitted data based on the original data precision to-be-transmitted data; and sending the target data precision to-be-transmitted data to a data receiving end, so that the data receiving end determines data processing logic corresponding to the target data precision to-be-transmitted data according to the target data precision. Through the technical scheme of the application, the data transmission precision can be determined according to the network state, and the network state detection and judgment, data precision detection and conversion and other operations are implemented in the intelligent network card.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a data transmission method and device, equipment and storage medium. BACKGROUND

[0002] With the advent of deep learning, under the assistance of explosive growth of computing power and big data, artificial intelligence has experienced a vigorous development in the past decade and has achieved fruitful results in many fields. In recent years, artificial intelligence has developed super large-scale models. Super large-scale intelligent models (referred to as "large models") can significantly solve the problems existing in the development process of small models, have strong generalization ability, and can complete multiple scene tasks by fine-tuning or without fine-tuning using a small amount of data. Facing the training of large models with hundreds of billions of parameters, automatic mixed precision (AMP) training is usually used. At present, people often ignore the important role of network transmission in training speedup when considering factors affecting deep learning training. Especially in the scene of large-scale cluster and distributed training, network congestion may directly cause the failure of supercomputing power. The existing large-scale distributed training technical solutions do not specifically consider the adverse effects of network environment, especially network congestion, on training.

[0003] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a data transmission method, device, equipment and storage medium, which can dynamically determine the actual data transmission precision in the network according to the actual state of the network, thereby ensuring the precision of network training while reducing the network communication amount and saving network bandwidth occupation. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a data transmission method applied to a data sending end of an intelligent network card, comprising:

[0006] determining a current network state;

[0007] obtaining original data precision data to be transmitted, and determining a data transmission strategy corresponding to the original data precision data to be transmitted according to the current network state;

[0008] determining a target data precision corresponding to data transmission based on the data transmission strategy, and determining data to be transmitted at the target data precision based on the original data precision data to be transmitted;

[0009] send the data to be transmitted with the target data precision to a data receiving end, so that the data receiving end determines data processing logic corresponding to the data to be transmitted with the target data precision according to the target data precision.

[0010] Optionally, the determining the current network state comprises:

[0011] determining a network protocol currently used for data transmission;

[0012] determining a corresponding congestion control component based on the network protocol;

[0013] judging whether the current network is in a network congestion state according to the congestion control component.

[0014] Optionally, the obtaining the data to be transmitted with the original data precision and determining a data transmission strategy corresponding to the data to be transmitted with the original data precision according to the current network state comprises:

[0015] obtaining the data to be transmitted with the original data precision;

[0016] if the current network is not in the network congestion state, determining a first data transmission strategy corresponding to the data to be transmitted with the original data precision; the first data transmission strategy is a data transmission strategy using the original data precision as a corresponding data precision during data transmission;

[0017] if the current network is in the network congestion state, determining a second data transmission strategy corresponding to the data to be transmitted with the original data precision; the second data transmission strategy is a data transmission strategy using a first data precision as a corresponding data precision during data transmission; the first data precision is lower than the original data precision.

[0018] Optionally, when the network protocol is a transmission control protocol network, the determining the corresponding congestion control component based on the network protocol comprises:

[0019] tracking and maintaining a congestion window by using an intelligent network card program corresponding to the transmission control protocol network; data stored in the congestion window is data for which no reply is received after a preset data segment is sent to the data receiving end;

[0020] Correspondingly, the judging whether the current network is in the network congestion state according to the congestion control component comprises:

[0021] if the congestion window successfully receives an acknowledgement packet corresponding to the preset data segment returned by the data receiving end within a preset time interval, it is determined that the current network is not in the network congestion state;

[0022] If the data receiving end returns no acknowledgement message corresponding to the preset data segment within the preset time interval, or returns multiple acknowledgement messages corresponding to the preset data segment successively, it is determined that the current network is in a network congestion state.

[0023] Optionally, the target data precision corresponding to data transmission is determined based on the data transmission strategy, and the target data precision of the to-be-transmitted data is determined based on the original data precision of the to-be-transmitted data, including:

[0024] If the current network is in a network congestion state, the first data precision is determined as the target data precision corresponding to data transmission based on the second data transmission strategy.

[0025] The value range of the original data precision is compared with the value range of the first data precision.

[0026] If the value range of the original data precision overlaps with the value range of the first data precision, the to-be-transmitted data of the original data precision corresponding to the overlapping part is directly converted into the to-be-transmitted data of the first data precision.

[0027] If the value range of the original data precision exceeds the value range of the first data precision, it is determined whether the original data precision can be adjusted to the first data precision through an initial scaling factor; the initial scaling factor is a proportion factor for initial precision adjustment.

[0028] If the original data precision can be adjusted to the first data precision through the initial scaling factor, the to-be-transmitted data of the original data precision is converted into the to-be-transmitted data of the first data precision based on the initial scaling factor.

[0029] If the original data precision cannot be adjusted to the first data precision through the initial scaling factor, an updated scaling factor is obtained by updating the initial scaling factor, and the to-be-transmitted data of the original data precision is converted into the to-be-transmitted data of the first data precision based on the updated scaling factor.

[0030] Optionally, the to-be-transmitted data of the target data precision is sent to the data receiving end, so that the data receiving end determines the data processing logic corresponding to the to-be-transmitted data of the target data precision according to the target data precision, including:

[0031] send the data to be transmitted of the target data precision to a data receiving end, so that the data receiving end judges whether the data to be transmitted of the target data precision needs to be recovered in data precision by comparing the target data precision with the original data precision, if not, directly transmits the data to be transmitted of the target data precision to a preset network device, if yes, recovers the data to be transmitted of the target data precision to the data to be transmitted of a second data precision, and transmits the data to be transmitted of the second data precision to the preset network device; the second data precision is the same as the original data precision;

[0032] If the target data precision is the same as the original data precision, it is determined that the recovery operation is not needed, and if the target data precision is not the same as the original data precision, it is determined that the recovery operation is needed.

[0033] In a second aspect, the application discloses a data transmission method applied to a data receiving end of an intelligent network card, comprising:

[0034] receiving data to be transmitted of a target data precision sent by a data sending end; wherein the target data precision is a data precision corresponding to data transmission determined by the data sending end based on a data transmission strategy; the data transmission strategy is a data transmission strategy corresponding to data to be transmitted of an original data precision determined by the data sending end according to a current network state;

[0035] determining data processing logic corresponding to the data to be transmitted of the target data precision according to the target data precision, so as to process the data to be transmitted of the target data precision by using the data processing logic.

[0036] In a third aspect, the application discloses a data transmission device applied to a data sending end of an intelligent network card, comprising:

[0037] a network state determination module, configured to determine a current network state;

[0038] a data transmission strategy determination module, configured to acquire data to be transmitted of an original data precision, and determine a data transmission strategy corresponding to the data to be transmitted of the original data precision according to the current network state;

[0039] a target data precision determination module, configured to determine a target data precision corresponding to data transmission based on the data transmission strategy, and determine data to be transmitted of the target data precision based on the data to be transmitted of the original data precision;

[0040] The data sending module is configured to send the data to be transmitted with the target data precision to a data receiving end, so that the data receiving end determines data processing logic corresponding to the data to be transmitted with the target data precision according to the target data precision.

[0041] In a fourth aspect, the present application discloses an electronic device, comprising a processor and a memory; wherein the memory is configured to store a computer program, and the computer program is loaded and executed by the processor to implement the data transmission method as described above.

[0042] In a fifth aspect, the present application discloses a computer readable storage medium configured to store a computer program; wherein the computer program is executed by a processor to implement the data transmission method as described above.

[0043] The present application provides a data transmission method applied to a data sending end of an intelligent network card, comprising: determining a current network state; obtaining data to be transmitted with an original data precision, and determining a data transmission strategy corresponding to the data to be transmitted with the original data precision according to the current network state; determining a target data precision corresponding to data transmission according to the data transmission strategy, and determining data to be transmitted with the target data precision based on the data to be transmitted with the original data precision; sending the data to be transmitted with the target data precision to a data receiving end, so that the data receiving end determines data processing logic corresponding to the data to be transmitted with the target data precision according to the target data precision. The present application has the beneficial technical effects that: the data sending end and the data receiving end intelligently integrate network state judgment and data processing logic, the processing algorithm and the network state detection method are integrated in the intelligent network card, the data transmission strategy corresponding to the actual transmission data in the network is dynamically determined according to the actual network state, so that the real-time conversion of the network transmission data precision is realized. The data transmission precision is determined in real time according to the network condition, which not only ensures the data transmission speed, but also effectively reduces the network communication amount, saves the network bandwidth occupation, and improves the communication efficiency.

[0044] In addition, the data transmission device, the electronic device and the storage medium provided by the present application correspond to the above-mentioned data transmission method, and have the same effects. BRIEF DESCRIPTION OF DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description only belong to the embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on the provided drawings.

[0046] Figure 1A data transmission method flow chart disclosed by the application;

[0047] Figure 2 A network data real-time mixed precision transmission schematic diagram disclosed by the application;

[0048] Figure 3 A specific data transmission method flow chart disclosed by the application;

[0049] Figure 4 A specific data transmission method flow chart disclosed by the application;

[0050] Figure 5 A data transmission processing logic flow chart of a data sending end disclosed by the application;

[0051] Figure 6 A data transmission method flow chart disclosed by the application;

[0052] Figure 7 A data transmission processing logic flow chart of a data receiving end disclosed by the application;

[0053] Figure 8 A data transmission device structure schematic diagram disclosed by the application;

[0054] Figure 9 An electronic equipment structure diagram disclosed by the application. DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the application.

[0056] At present, the institutions such as OpenAI, Google, Microsoft and Facebook of the United States are all deploying the research and development of large-scale intelligent models, and have formed the trillion or ten trillion parameter large model such as GPT-3 (Generative Pre-trained Transformer 3, a natural language processing model based on artificial intelligence technology developed by OpenAI company) and Switch Transformer (a language model proposed by Google Brain). With the development of AI (Artificial Intelligence) model in the direction of large-scale training data and large model training, the distributed training related technology is again widely concerned. Through distributed training, a super large model can be trained, the training process is accelerated, and the time consumption is reduced. For the factors affecting the deep learning training, people often ignore the important role of network transmission in the training speedup. Especially in the scene of large-scale cluster and distributed training, the network congestion may directly lead to the failure of supercomputing power.

[0057] Therefore, the application provides a data transmission scheme, which can dynamically determine the actual transmission data precision in the network according to the actual state of the network, so as to realize the network training precision in the large-scale distributed training, and reduce the network communication amount and save the network bandwidth occupation.

[0058] The embodiment of the application discloses a data transmission method, which is applied to a data sending end of an intelligent network card, and the method comprises the steps of: Figure 1

[0059] Step S11: determining the current network state.

[0060] ​Automatic mixed precision training is to train a model with numerical precision FP32, and some operators (specific algorithms for operating data) operate with numerical precision FP16, and the rest of the operators operate with numerical precision FP32. In this way, without changing the model and without reducing the training precision of the model, the training time can be shortened, the storage requirement can be reduced, and therefore more batchsize, larger models and larger input sizes can be trained. From the above description, it can be found that the existing automatic mixed precision technology mainly has two problems: on the one hand, automatic mixed precision training is for the internal operators of the GPU (graphics processing unit), not for the case of communication between distributed multiple nodes through a low-speed network. On the other hand, automatic mixed precision is for some operators operating data, usually gradient update data, not for all transmission data. Therefore, due to the important role of network transmission in training speedup, and considering the actual application scenario, in the embodiments of the present application, network state detection and judgment, data precision detection and conversion, etc. are implemented in the smart network card, and the processing algorithm and network congestion detection method are integrated in the hardware chip such as FPGA (Field Programmable Gate Array) in the smart network card communication equipment.

[0061] It can be understood that the network card (Network Interface Card, NIC for short) is a device for connecting a computer to a local area network. The network card is plugged into the bus slot of the computer mainboard, responsible for converting the data to be transmitted by the user into a format that can be recognized by network devices, and transmitting it through network media. The smart network card (Smart NIC) is also called a smart network adapter. In addition to being able to complete the network transmission function of a standard network card, it also provides built-in programmable and configurable hardware acceleration engines to improve the performance of applications and significantly reduce CPU (Central Processing Unit) consumption in communication, providing more CPU resources for applications.

[0062] Due to the training of large models with hundreds of billions or trillions of parameters, the communication volume required for gradient synchronization within a single calculation iteration is up to the order of hundreds of GB (Gigabyte), in addition to the communication requirements introduced by various parallel modes and acceleration frameworks, making the bandwidth of traditional low-speed networks far unable to support the efficient calculation of GPU clusters. The communication speed and efficiency between computing nodes have become the biggest bottleneck of model training. In the embodiments of the present application, after being applied to the smart network card, not only does it expand the existing single-GPU automatic mixed precision training related methods to communication between multiple computing nodes connected by a network, but also theoretically supports data operations on all transmission data.

[0063] The current network status is categorized into a good state and a congestion state. Network congestion refers to a situation in a packet-switched network where the number of packets transmitted is too high, causing a decline in network transmission performance due to the limited resources of store-and-forward nodes. When network congestion occurs, data loss, increased latency, and decreased throughput generally occur, and in severe cases, it can even lead to "congestion collapse." Typically, network congestion occurs when the network load increases excessively, causing a decline in network performance. In this embodiment, if the current network is not in a congested state, it is determined to be in a good state. Real-time determination of the network status is achieved by obtaining the current network status.

[0064] Step S12: Obtain the data to be transmitted with the original data precision, and determine the data transmission strategy corresponding to the data to be transmitted with the original data precision based on the current network status.

[0065] In this embodiment, the data transmission strategy for the data to be transmitted is determined based on the current network state, and this data transmission strategy dynamically determines the actual data transmission accuracy in the network. It is understood that when model training requires data exchange and communication between multiple nodes, currently data is directly sent to the receiver through existing network devices. However, in this embodiment, real-time detection of network congestion and decision-making on data transmission strategies are implemented on the intelligent network devices at both the data sending and receiving ends. That is, based on the current network state, if network congestion occurs, the data accuracy will be reduced and the data will be converted.

[0066] like Figure 2 The diagram illustrates the improved bidirectional data transmission process. For a given distributed neural network model, frequent data exchange is required between different interconnected computing nodes during training. Since model parameters are currently mostly represented using FP32 floating-point numbers, therefore... Figure 2 In the following description, FP32 is used as an example to represent the original data precision, and FP16 is used to represent the target data precision after reduction. It should be noted that this invention is not limited to FP32 to FP16 conversion, but is applicable to all cases of representing high-precision data with lower precision, and is not specifically limited here.

[0067] Step S13: Determine the target data precision corresponding to the data transmission based on the data transmission strategy, and determine the data to be transmitted with the target data precision based on the data to be transmitted with the original data precision.

[0068] It can be understood that, since the data transmission strategy dynamically determines the actual transmission data precision in the network, the data precision does not need to be reduced when the network state is good, and the data precision needs to be reduced to ensure the data transmission speed when network congestion occurs. Therefore, the corresponding target data precision during data transmission in the embodiments of the present application can be the original data precision without change in data precision, or the target data precision obtained by reducing the data precision from the original data precision. Further, after determining the target data precision corresponding to data transmission, the target data precision to be transmitted is determined based on the original data precision to be transmitted.

[0069] Step S14: sending the target data precision to-be-transmitted data to the data receiving end, so that the data receiving end determines the data processing logic corresponding to the target data precision to-be-transmitted data according to the target data precision.

[0070] In the embodiments of the present application, the data sending end processes the original data precision to-be-processed data, and when it is determined whether to convert the precision and whether to convert the data according to the current network state, the data sending end sends the target data precision to-be-transmitted data to the data receiving end. When the network state is good, the data transmission precision can be guaranteed not to be affected, and when the network state deteriorates, the actual transmission data volume is significantly reduced. Thus, the network communication volume is effectively reduced, and further deterioration of the network state is avoided.

[0071] After the data receiving end receives the target data precision to-be-processed data, it determines the data processing logic corresponding to the target data precision to-be-transmitted data according to the target data precision. It can be understood that, if the target data precision corresponding to the target data precision to-be-transmitted data is the same as the original data precision before transmission, it means that the current to-be-transmitted data does not change the data precision and can be directly transmitted; if the target data precision corresponding to the target data precision to-be-transmitted data is lower than the original data precision before transmission, it means that the target data precision needs to be restored to the original data precision before data transmission.

[0072] The application provides a data transmission method, applied to a data sending end of an intelligent network card, comprising: determining a current network state; obtaining original data precision to-be-transmitted data, and determining a data transmission strategy corresponding to the original data precision to-be-transmitted data according to the current network state; determining a target data precision corresponding to data transmission based on the data transmission strategy, and determining the target data precision to-be-transmitted data based on the original data precision to-be-transmitted data; sending the target data precision to-be-transmitted data to a data receiving end, so that the data receiving end determines a data processing logic corresponding to the target data precision to-be-transmitted data according to the target data precision. The application has the beneficial technical effects that: the data sending end and the data receiving end intelligently integrate network state judgment and data processing logic, the processing algorithm and the network state detection method are integrated in the intelligent network card, the data transmission strategy corresponding to the actual transmission data in the network is dynamically determined according to the actual network state, so that the real-time conversion of the network transmission data precision is realized. The data transmission precision is determined in real time according to the network condition, which not only ensures the data transmission speed, but also effectively reduces the network communication amount, saves the network bandwidth occupation, and improves the communication efficiency.

[0073] The embodiment of the application discloses a specific data transmission method, referring to Figure 3 The method comprises the following steps.

[0074] Step S21: determining a network protocol during current data transmission; determining a corresponding congestion control component based on the network protocol; and determining whether the current network is in a network congestion state according to the congestion control component.

[0075] In the embodiment of the application, since the current network state needs to be obtained to realize congestion detection, there is no accurate method or explicit signal to inform the sender whether the congestion condition has occurred. Generally, whether congestion occurs is inferred by whether there is a packet loss. In order to obtain the current network state, firstly, the network protocol during current data transmission is determined, and then the corresponding congestion control component is determined based on the network protocol. The congestion control component corresponds to the congestion control method under different network protocols, and the congestion control method selected when transmitting data under different network protocols can be different.

[0076] In a specific embodiment, in TCP (Transmission Control Protocol), packet loss is used as an index to determine whether congestion occurs or not, to measure whether corresponding response measures are implemented. Therefore, the embodiment of the application is specifically illustrated in detail taking TCP network as an example. If the network protocol in the current data transmission is TCP network, the TCP intelligent network card program in the data sending end will track and maintain a congestion window (cwnd) variable to perform congestion control. In the TCP sending end, all the data segments to be sent but not yet received confirmation must fall within this window.

[0077] Further, the congestion control component is used to determine whether the current network is in network congestion state, including: if the congestion window successfully receives the confirmation packet corresponding to the preset data segment returned by the data receiving end within a preset time interval, it is determined that the current network is not in network congestion state; if the congestion window does not receive the confirmation packet corresponding to the preset data segment returned by the data receiving end within the preset time interval, or continuously receives the confirmation packet corresponding to the preset data segment returned by the data receiving end multiple times, it is determined that the current network is in network congestion state.

[0078] In the specific execution process, the program will speculate whether the network is congested by some phenomena of data sending, such as: if a data segment is sent and the confirmation packet of the receiving end is successfully received, it can be considered that the network is not congested; if a data segment is sent and no confirmation packet is received within a specified time (lost or too large delay), it can be considered that the network is congested; if three redundant confirmations (i.e. four confirmations) of the same packet are continuously received by the receiving end, it can be speculated that the packet is lost, i.e. congestion occurs.

[0079] Step S22: obtaining the original data precision of the data to be transmitted.

[0080] Step S23: if the current network is not in network congestion state, determining the first data transmission strategy corresponding to the original data precision of the data to be transmitted.

[0081] In the embodiment of the application, according to the foregoing logic, if the network state is normal, i.e. the current network is not in network congestion state, the first data transmission strategy corresponding to the original data precision of the data to be transmitted is determined. It should be pointed out that the first data transmission strategy is a data transmission strategy taking the original data precision as the corresponding data precision when data transmission is performed. That is, if the current network is not in network congestion state, the first data transmission strategy is a direct data transmission strategy.

[0082] Step S24: If the current network is in a state of network congestion, determine the second data transmission strategy corresponding to the data to be transmitted with the original data precision.

[0083] In this embodiment, following the aforementioned logic, if network congestion occurs, a second data transmission strategy corresponding to the data to be transmitted with the original data precision is determined. It should be noted that the second data transmission strategy is a data transmission strategy that uses a first data precision as the corresponding data precision for data transmission; the first data precision is lower than the original data precision. That is, if the current network is in a congested state, a data compression transmission process will subsequently be initiated, reducing the original data precision to the first data precision.

[0084] Step S25: Determine the target data precision corresponding to the data transmission based on the data transmission strategy, and determine the data to be transmitted with the target data precision based on the data to be transmitted with the original data precision.

[0085] Step S26: Send the data to be transmitted with the target data precision to the data receiving end, so that the data receiving end can determine the data processing logic corresponding to the data to be transmitted with the target data precision based on the target data precision.

[0086] For more detailed processing procedures regarding steps S25 and S26, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0087] As can be seen, in this embodiment, the overall network detection and data transmission process includes two stages: network detection and data transmission / recovery. Before the data sending end begins data processing, it first determines whether network congestion has occurred based on the current network status. If the network status is normal, data transmission proceeds directly; if network congestion occurs, the data compression process begins. This directly achieves real-time conversion of network transmission data accuracy and detection of network congestion. Thus, the data transmission accuracy is determined in real-time based on network conditions, ensuring data transmission speed while effectively reducing network traffic and improving communication efficiency.

[0088] In one specific implementation, if the data transmission strategy for the data to be transmitted is determined to be the second data transmission strategy based on the current network status, a data compression transmission process will then proceed. This process involves determining the target data precision for data transmission based on the data transmission strategy, and determining the data to be transmitted with the target data precision based on the original data precision. Figure 4 As shown, it includes:

[0089] Step S1301: If the current network is in a network congestion state, determining the first data precision as the target data precision corresponding to data transmission based on the second data transmission strategy.

[0090] In the embodiments of the present application, if the current network is in a network congestion state, the data communication amount is reduced by reducing the data precision. Since the second data transmission strategy is a data transmission strategy in which the first data precision is used as the data precision corresponding to data transmission, the target data precision corresponding to data transmission determined based on the second data transmission strategy is the first data precision.

[0091] Step S1302: Comparing the numerical range of the original data precision with the numerical range of the first data precision.

[0092] In the embodiments of the present application, FP32 is still used as an example of the original data precision, and FP16 is used as an example of the target data precision (first data precision) after the precision is reduced. Precision conversion is achieved by setting a data compression transmission process. Specifically, the numerical range of the original data precision is compared with the numerical range of the first data precision.

[0093] Step S1303: If there is an overlapping part between the numerical range of the original data precision and the numerical range of the first data precision, the to-be-transmitted data of the original data precision corresponding to the overlapping part is directly converted into to-be-transmitted data of the first data precision.

[0094] In the current mainstream computer numerical precision representation method, the numerical range of the original data precision FP32 is about -3.4028234663852886e+38~3.4028234663852886e+38, and the numerical range of the first data precision FP16 is about -65504~65504. Except for a small part of overlap (different precision in the overlapping range), the numerical ranges of FP32 and FP16 do not overlap.

[0095] In the embodiments of the present application, if the FP32 data can be directly represented by the FP16 data (i.e., the data does not need to be transformed, and the FP16 and FP32 overlap), the data is directly processed into FP16 for the next network transmission.

[0096] Step S1304: If the numerical range of the original data precision exceeds the numerical range of the first data precision, it is determined whether the original data precision can be adjusted to the first data precision by an initial scaling factor.

[0097] In the embodiment of the present application, if the FP32 data exceeds the representation range of the FP16 data (both upward and downward), it indicates that the data needs to be scaled. At this time, the factor judgment link is entered to determine whether the original data precision can be adjusted to the first data precision by the initial scaling factor. It should be noted that the scaling factor is a proportional factor introduced when converting high and low precision data. The FP32 represented value is scaled to the FP16 representable range by determining the appropriate proportion, which is generally an integer power of 2 and its reciprocal. The initial scaling factor is the proportional factor for initial precision adjustment.

[0098] Step S1305: If the original data precision can be adjusted to the first data precision by the initial scaling factor, the original data precision to be transmitted is converted to the first data precision to be transmitted based on the initial scaling factor.

[0099] In the embodiment of the present application, if the initial scaling factor is suitable for the existing data, that is, the FP32 can be scaled to the FP16 representation range by the initial scaling factor, the initial scaling factor is kept unchanged, the original data precision to be transmitted is converted to the first data precision to be transmitted, and then the data is processed and transmitted.

[0100] The precision conversion process is represented by the formula: NumFP32 = NumFP16 * scale_factor. The data sending end scales the data to the data range suitable for the converted precision representation according to the selected scaling factor, and then converts the data precision.

[0101] Step S1306: If the original data precision cannot be adjusted to the first data precision by the initial scaling factor, an updated scaling factor is obtained by updating the initial scaling factor, and the original data precision to be transmitted is converted to the first data precision to be transmitted based on the updated scaling factor.

[0102] In the embodiment of the present application, if the to-be-transmitted data changes greatly, such as the precision changes from the original thousandth standard to the percentage standard, the initial scaling factor may no longer be suitable. At this time, the initial scaling factor is updated, and the updated scaling factor is re-determined. Further, the original data precision to be transmitted is converted to the first data precision to be transmitted based on the updated scaling factor.

[0103] It should be pointed out that when the initial scaling factor is updated, the updated scaling factor needs to be synchronized to the data receiving end, and the data processing and transmission are confirmed after the synchronization update. This way of determining whether the factor changes and synchronously confirming before transmitting new data can first ensure the accuracy of data transmission, and at the same time can reduce the influence of factor data transmission on the overall data volume.

[0104] As shown in Figure 5 The data processing logic of the data sending end is shown. The specific steps are: when the FP32 data needs to be processed by the data sending end and then sent, first, according to the network state collected by the intelligent network device, make a comprehensive judgment, and make a decision whether to convert according to the network state. After completing the network state detection and judgment, if directly sent, the data is directly transmitted through the network protocol. If precision conversion is needed, the precision conversion process is entered. That is, if the FP32 data can be directly represented by the FP16 data, the data is directly processed into the FP16 for the next network transmission. If the FP32 data exceeds the representation range of the FP16 data, it indicates that the data needs to be scaled. At this time, enter the factor judgment link, if the initial scaling factor is suitable for the existing data, keep the initial scaling factor unchanged, and process and transmit the data. If the initial scaling factor is no longer suitable, the scaling factor is determined again, the updated scaling factor is synchronized to the data receiving end, and the data processing and transmission are confirmed after the synchronization update.

[0105] It can be seen that by integrating the network state judgment and data processing logic of the intelligent network device of the data sending end, the actual transmission data precision in the network is dynamically decided according to the actual network state, so as to ensure the precision of the network training, and at the same time, the network communication amount can be reduced, and the network bandwidth occupation can be saved. The scaling factor synchronization and update mechanism ensures the correctness of data processing at both ends.

[0106] The embodiment of the application discloses a data transmission method, which realizes real-time data processing logic at the data receiving end to restore data representation precision. Referring to Figure 6 The data receiving end applied to the intelligent network card, the method comprises:

[0107] Step S31: receiving the to-be-transmitted data of the target data precision sent by the data sending end.

[0108] In the embodiments of the present application, the data receiving end receives the target data precision to-be-transmitted data sent by the data sending end. The target data precision is the data precision corresponding to data transmission determined by the data sending end based on a data transmission strategy. The data transmission strategy is the data transmission strategy corresponding to the original data precision to-be-transmitted data determined by the data sending end according to the current network state. In a specific implementation, the target data precision is equal to the original data precision, that is, the data precision does not change. In another specific implementation, the target data precision is lower than the original data precision, that is, the data precision is reduced.

[0109] Step S32: determining the data processing logic corresponding to the target data precision to-be-transmitted data according to the target data precision, so as to perform corresponding processing on the target data precision to-be-transmitted data by using the data processing logic.

[0110] In the embodiments of the present application, after the data receiving end receives the target data precision to-be-transmitted data, it first judges the data precision, and directly judges whether to enter the data restoration process or to perform the transmission process according to the real-time precision of the transmission data. If no conversion is needed, the data continues to be transmitted. If conversion is needed, the current data scaling factor is used to perform reverse operation (scaling or unchanged) to restore the data precision.

[0111] Specifically, the data receiving end judges whether the data precision restoration operation needs to be performed on the target data precision to-be-transmitted data by comparing the target data precision with the original data precision. If not, the target data precision to-be-transmitted data is directly transmitted to a preset network device. If yes, the target data precision to-be-transmitted data is restored to second data precision to-be-transmitted data, and the second data precision to-be-transmitted data is transmitted to the preset network device. The second data precision is the same as the original data precision. If the target data precision is the same as the original data precision, it is determined that the restoration operation is not needed. If the target data precision is not the same as the original data precision, it is determined that the restoration operation is needed.

[0112] In this embodiment of the application, the step of restoring the data to be transmitted at the target data precision to the data to be transmitted at the second data precision if necessary, and transmitting the data to be transmitted at the second data precision to the preset network device, includes: if necessary, obtaining the current scaling factor and determining whether the target data precision can be restored to the second data precision through the current scaling factor; if the target data precision can be restored to the second data precision through the current scaling factor, then restoring the data to be transmitted at the target data precision to the data to be transmitted at the second data precision based on the current scaling factor, and transmitting the data to be transmitted at the second data precision to the preset network device; if the target data precision cannot be restored to the second data precision through the current scaling factor, then updating the current scaling factor to obtain the currently updated scaling factor, restoring the data to be transmitted at the target data precision to the data to be transmitted at the second data precision based on the currently updated scaling factor, and then transmitting the data to be transmitted at the second data precision to the preset network device.

[0113] Understandably, since the formula for precision conversion during the aforementioned reduction of the original data precision is: NumFP32 = NumFP16 * scale_factor, the receiving end reverses this process to restore the target data precision to the original precision. In this process, multiplication is replaced with division, thus restoring the data to its original precision. The sending and receiving ends maintain the same scale factor through communication and update it continuously.

[0114] like Figure 7 The diagram illustrates the data processing logic at the data receiver. Upon receiving data of the target precision, the receiver performs a precision determination. If the data is of FP32 precision, it can be transmitted directly. If the data is of FP16 precision (not FP32), it determines whether data scaling is necessary. If the current scaling factor can directly convert FP16 precision data to FP32 precision data, the current scaling factor remains unchanged, and the data is processed and transmitted. If the current scaling factor is no longer suitable, a new scaling factor is determined, and based on the updated scaling factor, the data of the target precision is restored to the original precision before transmission, and the data is processed and transmitted.

[0115] The application provides a data transmission method applied to a data receiving end of an intelligent network card, comprising: receiving target data precision to-be-transmitted data sent by a data sending end; determining data processing logic corresponding to the target data precision to-be-transmitted data according to the target data precision, so as to process the target data precision to-be-transmitted data by using the data processing logic. The application has the beneficial technical effects that: by intelligently integrating network state judgment and data processing logic of the data sending end and the data receiving end, the processing algorithm and the network state detection method are integrated in the intelligent network card, the data transmission strategy corresponding to the actual transmission data in the network is dynamically determined according to the actual network state, so that the real-time conversion of the network transmission data precision is realized. The data transmission precision is determined in real time according to the network condition, which not only ensures the data transmission speed, but also effectively reduces the network communication amount, saves the network bandwidth occupation, and improves the communication efficiency.

[0116] Correspondingly, the application also discloses a data transmission device applied to a data sending end of an intelligent network card, as shown in Figure 8 The device comprises:

[0117] a network state determination module 11, used for determining a current network state;

[0118] a data transmission strategy determination module 12, used for acquiring original data precision to-be-transmitted data, and determining data transmission strategy corresponding to the original data precision to-be-transmitted data according to the current network state;

[0119] a target data precision determination module 13, used for determining target data precision corresponding to data transmission based on the data transmission strategy determination, and determining target data precision to-be-transmitted data based on the original data precision to-be-transmitted data;

[0120] a data sending module 14, used for sending the target data precision to-be-transmitted data to a data receiving end, so that the data receiving end determines data processing logic corresponding to the target data precision to-be-transmitted data according to the target data precision.

[0121] Wherein, the more specific working process of each module can refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0122] Therefore, by the above scheme of the embodiment, the data sending end applied to the intelligent network card comprises: determining a current network state; obtaining original data precision to-be-transmitted data, and determining a data transmission strategy corresponding to the original data precision to-be-transmitted data according to the current network state; determining a target data precision corresponding to data transmission based on the data transmission strategy, and determining the target data precision to-be-transmitted data based on the original data precision to-be-transmitted data; and sending the target data precision to-be-transmitted data to a data receiving end, so that the data receiving end determines a data processing logic corresponding to the target data precision to-be-transmitted data according to the target data precision. The application has the beneficial technical effects that: the data sending end and the data receiving end intelligently integrate network state judgment and data processing logic, the processing algorithm and the network state detection method are integrated in the intelligent network card, the data transmission strategy corresponding to the actual transmission data in the network is dynamically determined according to the actual network state, so that the real-time conversion of the network transmission data precision is realized. The data transmission precision is determined in real time according to the network condition, which not only ensures the data transmission speed, but also effectively reduces the network communication amount, saves the network bandwidth occupation, and improves the communication efficiency.

[0123] Further, the embodiment of the application further discloses an electronic device, Figure 9 is an electronic device 20 structure diagram shown according to an exemplary embodiment, the contents in the figure cannot be considered as any limitation on the use range of the application.

[0124] Figure 9 A structure diagram of an electronic device 20 is provided for the embodiment of the application. The electronic device 20 can specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26. The memory 22 is used to store a computer program, the computer program is loaded and executed by the processor 21 to realize the related steps in the data transmission method disclosed in any of the preceding embodiments. In addition, the electronic device 20 in the embodiment can be a computer.

[0125] In the embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the application, which is not limited here; the input / output interface 25 is used to obtain external input data or output data to the outside, and the specific interface type can be selected according to the specific application needs, which is not limited here.

[0126] In addition, the memory 22 can be a read-only memory, a random access memory, a magnetic or optical disk, etc., as a carrier for storing resources. The resources stored on the memory 22 can include an operating system 221, a computer program 222, and data 223, etc. The data 223 can include various data. The storage mode can be temporary storage or permanent storage.

[0127] The operating system 221 is used to manage and control various hardware devices on the electronic device 20 and the computer program 222, and can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of completing the data transmission method performed by the electronic device 20 disclosed in any of the preceding embodiments, the computer program 222 can further include a computer program capable of completing other specific work.

[0128] Further, the embodiments of the present application also disclose a computer readable storage medium. The computer readable storage medium can include a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a magnetic or optical disk, or any other form of storage medium known in the technical field. The computer program is executed by a processor to implement the data transmission method. For the specific steps of the method, refer to the corresponding content disclosed in the preceding embodiments, which will not be described here.

[0129] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same or similar parts between the embodiments, refer to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and for the related parts, refer to the method part.

[0130] The steps of the data transmission method or algorithm described in combination with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable magnetic disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0131] Finally, it needs to be pointed out that in this document, relational terms such as first and second and the like can only be intended to distinguish one entity or operation from another entity or operation without necessarily requiring or implying any such actual relationship or order between such entities or operations. Moreover, the terms "comprising", "including", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus including the stated element.

[0132] The above describes in detail the data transmission method, device, equipment and storage medium provided by the present application. The principles and implementation manners of the present application are described by applying specific examples. The above description of the embodiments is only for helping to understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges can be changed. In summary, the content of the specification should not be understood as limiting the present application.

Claims

1. A data transmission method, characterized by, The application is applied to a data sending end of an intelligent network card, comprising: determining a current network state; obtaining original data precision to-be-transmitted data, and determining a data transmission strategy corresponding to the original data precision to-be-transmitted data according to the current network state; determining a target data precision corresponding to data transmission based on the data transmission strategy, and determining the target data precision to-be-transmitted data based on the original data precision to-be-transmitted data; the target data precision includes two cases of unchanged data precision and reduced data precision; sending the target data precision to-be-transmitted data to a data receiving end, so that the data receiving end determines a data processing logic corresponding to the target data precision to-be-transmitted data according to the target data precision; the determination of the target data precision corresponding to data transmission based on the data transmission strategy, and the determination of the target data precision to-be-transmitted data based on the original data precision to-be-transmitted data, comprising: if the current network is in a network congestion state, determining the first data precision as the target data precision corresponding to data transmission based on a second data transmission strategy; the second data transmission strategy is a data transmission strategy taking the first data precision as the data precision corresponding to data transmission, and the first data precision is lower than the original data precision; comparing a numerical range of the original data precision with a numerical range of the first data precision; if there is an overlapping part between the numerical range of the original data precision and the numerical range of the first data precision, directly converting the original data precision to-be-transmitted data corresponding to the overlapping part into the first data precision to-be-transmitted data; if the numerical range of the original data precision exceeds the numerical range of the first data precision, determining whether the original data precision can be adjusted to the first data precision through an initial scaling factor; wherein the initial scaling factor is a proportion factor for initial precision adjustment; if the original data precision can be adjusted to the first data precision through the initial scaling factor, converting the original data precision to-be-transmitted data into the first data precision to-be-transmitted data based on the initial scaling factor; if the original data precision cannot be adjusted to the first data precision through the initial scaling factor, updating the initial scaling factor to obtain an updated scaling factor, and converting the original data precision to-be-transmitted data into the first data precision to-be-transmitted data based on the updated scaling factor; the determination of the current network state comprises: determining a network protocol for current data transmission; determining a corresponding congestion control component based on the network protocol; determining whether the current network is in a network congestion state according to the congestion control component; the congestion control component corresponds to a congestion control method for different network protocols; the obtaining of the original data precision to-be-transmitted data and the determination of the data transmission strategy corresponding to the original data precision to-be-transmitted data according to the current network state, comprising: obtaining original data precision to-be-transmitted data; If the current network is not in a network congestion state, a first data transmission strategy corresponding to the to-be-transmitted data of the original data precision is determined; the first data transmission strategy is a data transmission strategy taking the original data precision as a corresponding data precision during data transmission; If the current network is in a network congestion state, a second data transmission strategy corresponding to the to-be-transmitted data of the original data precision is determined; When the network protocol is a transmission control protocol network, the corresponding congestion control component is determined based on the network protocol, including: A congestion window is tracked and maintained by using a smart network card program corresponding to the transmission control protocol network; the data stored in the congestion window is data that has not received a reply after a preset data segment is sent to the data receiving end; Correspondingly, whether the current network is in a network congestion state is determined according to the congestion control component, including: If the congestion window successfully receives the acknowledgement message corresponding to the preset data segment returned by the data receiving end within a preset time interval, it is determined that the current network is not in a network congestion state; If the congestion window does not receive the acknowledgement message corresponding to the preset data segment returned by the data receiving end within the preset time interval, or continuously receives the acknowledgement message corresponding to the preset data segment returned by the data receiving end multiple times, it is determined that the current network is in a network congestion state; The to-be-transmitted data of the target data precision is sent to the data receiving end, so that the data receiving end determines the data processing logic corresponding to the to-be-transmitted data of the target data precision according to the target data precision, including: The to-be-transmitted data of the target data precision is sent to the data receiving end, so that the data receiving end determines whether to perform a data precision recovery operation on the to-be-transmitted data of the target data precision by comparing the target data precision with the original data precision; if not, the to-be-transmitted data of the target data precision is directly transmitted to a preset network device; if so, the to-be-transmitted data of the target data precision is recovered to to-be-transmitted data of a second data precision, and the to-be-transmitted data of the second data precision is transmitted to the preset network device; the second data precision is the same as the original data precision; If the target data precision is the same as the original data precision, it is determined that the recovery operation is not needed; if the target data precision is not the same as the original data precision, it is determined that the recovery operation is needed.

2. A data transmission method, characterized by, The data receiving end applied to a smart network card, including: The data receiving end sends target data precision of the data to be transmitted; wherein, the target data precision is the data precision corresponding to data transmission determined by the data sending end based on a data transmission strategy; the data transmission strategy is a data transmission strategy corresponding to the data to be transmitted with the original data precision determined by the data sending end according to the current network state; the target data precision includes two cases of unchanged data precision and reduced data precision; determining the current network state includes: determining the network protocol currently used for data transmission; determining the corresponding congestion control component based on the network protocol; determining whether the current network is in a network congestion state according to the congestion control component; the congestion control component corresponds to different network protocols; obtaining the data to be transmitted with the original data precision through the data sending end; if the current network is not in a network congestion state, determining a first data transmission strategy corresponding to the data to be transmitted with the original data precision; the first data transmission strategy is a data transmission strategy taking the original data precision as the corresponding data precision during data transmission; if the current network is in a network congestion state, determining a second data transmission strategy corresponding to the data to be transmitted with the original data precision; when the network protocol is a transmission control protocol network, using the intelligent network card program corresponding to the transmission control protocol network to track and maintain a congestion window; wherein, the data stored in the congestion window is the data that has not received a reply after sending a preset data segment to the data receiving end; if the congestion window successfully receives the acknowledgement message corresponding to the preset data segment returned by the data receiving end within a preset time interval, it is determined that the current network is not in a network congestion state; if the congestion window does not receive the acknowledgement message corresponding to the preset data segment returned by the data receiving end within the preset time interval, or continuously receives the acknowledgement message corresponding to the preset data segment returned by the data receiving end multiple times, it is determined that the current network is in a network congestion state; According to the target data precision, determine the data processing logic corresponding to the data to be transmitted with the target data precision, so as to use the data processing logic to process the data to be transmitted with the target data precision accordingly; The data sending end determines the corresponding data precision during data transmission based on a data transmission strategy, including: If the current network is in a network congestion state, determine the first data precision as the target data precision corresponding to data transmission based on the second data transmission strategy; the second data transmission strategy is a data transmission strategy taking the first data precision as the corresponding data precision during data transmission, and the first data precision is lower than the original data precision; Correspondingly, according to the target data precision, determine the data processing logic corresponding to the data to be transmitted with the target data precision, so as to use the data processing logic to process the data to be transmitted with the target data precision accordingly, including: comparing the target data precision with the original data precision to determine whether a data precision recovery operation needs to be performed on the target data precision data to be transmitted; if not, directly transmitting the target data precision data to be transmitted to a preset network device; if so, obtaining a current scaling factor and determining whether the target data precision can be restored to a second data precision through the current scaling factor; the second data precision is the same as the original data precision; if the target data precision can be restored to the second data precision through the current scaling factor, restoring the target data precision data to be transmitted to the second data precision data to be transmitted based on the current scaling factor, and transmitting the second data precision data to be transmitted to the preset network device; if the target data precision cannot be restored to the second data precision through the current scaling factor, updating the current scaling factor to obtain a current updated scaling factor, restoring the target data precision data to be transmitted to the second data precision data to be transmitted based on the current updated scaling factor, and then transmitting the second data precision data to be transmitted to the preset network device; the data processing logic corresponding to the target data precision data to be transmitted is determined according to the target data precision, so that the target data precision data to be transmitted is processed correspondingly by using the data processing logic, including: determining whether a data precision recovery operation needs to be performed on the target data precision data to be transmitted by comparing the target data precision with the original data precision, if not, directly transmitting the target data precision data to be transmitted to a preset network device, if so, restoring the target data precision data to be transmitted to the second data precision data to be transmitted, and transmitting the second data precision data to be transmitted to the preset network device; the second data precision is the same as the original data precision; if the target data precision is the same as the original data precision, it is determined that the recovery operation is not needed, and if the target data precision is not the same as the original data precision, it is determined that the recovery operation is needed.

3. A data transmission apparatus characterized by comprising: The data sending end applied to the intelligent network card comprises: a network state determination module for determining a current network state; a data transmission strategy determination module for obtaining original data precision data to be transmitted, and determining a data transmission strategy corresponding to the original data precision data to be transmitted according to the current network state; a target data precision determination module for determining a target data precision corresponding to data transmission based on the data transmission strategy, and determining target data precision data to be transmitted based on the original data precision data to be transmitted; the target data precision includes two cases of unchanged data precision and reduced data precision; The data sending module is configured to send the target data precision data to be transmitted to a data receiving end, so that the data receiving end determines a data processing logic corresponding to the target data precision data to be transmitted according to the target data precision. The target data precision determination module is specifically configured to: If the current network is in a network congestion state, determine the first data precision as the target data precision corresponding to data transmission based on a second data transmission strategy; the second data transmission strategy is a data transmission strategy in which the first data precision is used as the data precision corresponding to data transmission, and the first data precision is lower than the original data precision; Compare the numerical range of the original data precision with the numerical range of the first data precision; If the numerical range of the original data precision overlaps with the numerical range of the first data precision, directly convert the original data precision data to be transmitted corresponding to the overlapping part into the first data precision data to be transmitted; If the numerical range of the original data precision exceeds the numerical range of the first data precision, determine whether the original data precision can be adjusted to the first data precision through an initial scaling factor; the initial scaling factor is a scaling factor used for initial precision adjustment; If the original data precision can be adjusted to the first data precision through the initial scaling factor, convert the original data precision data to be transmitted into the first data precision data to be transmitted based on the initial scaling factor; If the original data precision cannot be adjusted to the first data precision through the initial scaling factor, update the initial scaling factor to obtain an updated scaling factor, and convert the original data precision data to be transmitted into the first data precision data to be transmitted based on the updated scaling factor; The network state determination module is specifically configured to: determine a network protocol currently used for data transmission; determine a corresponding congestion control component based on the network protocol; and determine whether the current network is in a network congestion state according to the congestion control component; the congestion control component corresponds to a congestion control method for different network protocols; When the network protocol is a transmission control protocol network, use an intelligent network card program corresponding to the transmission control protocol network to track and maintain a congestion window; the data stored in the congestion window is data for which no reply is received after a preset data segment is sent to the data receiving end; If the congestion window successfully receives an acknowledgement packet corresponding to the preset data segment returned by the data receiving end within a preset time interval, it is determined that the current network is not in a network congestion state; If the congestion window does not receive the acknowledgement packet corresponding to the preset data segment returned by the data receiving end within the preset time interval, or continuously receives the acknowledgement packet corresponding to the preset data segment returned by the data receiving end multiple times, it is determined that the current network is in a network congestion state; The data transmission strategy determination module is specifically configured to: Obtain original data precision data to be transmitted; If the current network is not in a network congestion state, a first data transmission strategy corresponding to the to-be-transmitted data of the original data precision is determined; the first data transmission strategy is a data transmission strategy taking the original data precision as a corresponding data precision during data transmission; If the current network is in a network congestion state, a second data transmission strategy corresponding to the to-be-transmitted data of the original data precision is determined; The data sending module is specifically configured to: send the to-be-transmitted data of the target data precision to a data receiving end, so that the data receiving end judges whether a data precision recovery operation needs to be performed on the to-be-transmitted data of the target data precision by comparing the target data precision with the original data precision, if not, directly transmits the to-be-transmitted data of the target data precision to a preset network device, if yes, restores the to-be-transmitted data of the target data precision to to-be-transmitted data of a second data precision, and transmits the to-be-transmitted data of the second data precision to the preset network device; the second data precision is the same as the original data precision; If the target data precision is the same as the original data precision, it is determined that the recovery operation is not needed, and if the target data precision is not the same as the original data precision, it is determined that the recovery operation is needed.

4. An electronic device, comprising: The electronic device comprises a processor and a memory; wherein the memory is used to store a computer program, the computer program is loaded and executed by the processor to realize the data transmission method as claimed in claim 1 or 2.

5. A computer readable storage medium, characterized in that, A computer program is stored; wherein the computer program is executed by a processor to realize the data transmission method as claimed in claim 1 or 2.

Citation Information

Patent Citations

  • Data transmission method and device and electronic equipment

    CN110781150A

  • Data processing method, device and equipment and storage medium

    CN111967608A

  • Data flow rate control method, intelligent network card, cloud equipment and storage medium

    CN115396372A