Data monitoring method and device for high-speed network port and data communication system
By real-time monitoring and automatic processing of the automatic gain control value and packet loss statistics of high-speed network cards, the target automatic gain control value for the optimal transmission time is determined using a micro database, and the training value is reset, which solves the problem of real-time monitoring and automatic processing in the existing technology, improves the reliability and efficiency of data transmission, and avoids the problem of network card gain state machine jamming.
Patent Information
- Application Number
- CN202411664588.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-04
AI Technical Summary
The existing technology cannot realize real-time monitoring and automatic processing of high-speed network cards, resulting in a decline in data transmission quality and a jam in the network card gain state machine, and it is impossible to restore the normal working state through manual restart.
By obtaining the mapping relationship between the automatic gain control value and the transmission time in real time, obtaining packet loss statistics value regularly, detecting the target training value, using the pre-built micro database to determine the target automatic gain control value corresponding to the optimal transmission time, and writing it to the network card register to reset the training value, realizing continuous monitoring and recovery of data transmission.
Real-time monitoring and automatic processing of high-speed network ports are realized, ensuring the reliability and efficiency of data transmission, avoiding the problem of network card gain state machine jamming, and automatically recovering when the training value deviation is too large.
Smart Images

Figure CN119561899A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication, and in particular to a data monitoring method and device for a high-speed network port, and a data communication system. Background Art
[0002] High-speed network cards (such as 10G network cards) generally need to calculate pre-training values before communication to adjust the network card communication signal. Since the signal adjustment scheme of high-speed network cards is relatively complex, the generated training values are prone to small probability deviations, which makes the signal gain adjustment (that is, the automatic gain control value Automatic Power Control, referred to as "APC" value) abnormal, thereby affecting the data transmission quality of the high-speed network card (Automatic Power Control, referred to as "APC" value). If the signal quality is too poor, the receiving end may not be able to correctly parse the data, which eventually leads to packet loss.
[0003] To solve the problem of packet loss during data transmission, current technologies usually rely on the instruction set provided by the manufacturer to obtain detailed information about the network card, including packet loss information, by executing relevant instructions. Although this method can detect packet loss on the network card, it requires manual operation and intervention can only be performed after the packet loss problem occurs, which cannot achieve real-time monitoring and automatic processing. More seriously, if the training value deviation is too large, it may cause the network card gain state machine (FSM) to get stuck, and even manually restarting the network card cannot restore its normal working state.
[0004] In view of this, the present invention provides a data monitoring solution for a high-speed network card to solve the above technical problems. Summary of the invention
[0005] The purpose of the present invention is to provide a data monitoring method and device for a high-speed network port, and a data communication system to solve the problem in the prior art that the enabling and disabling of a network card can only be controlled by manual operation, but real-time monitoring and automatic processing cannot be achieved.
[0006] A further object of the present invention is to solve the problem in the prior art that when the training value deviation is too large, the network card gain state machine is stuck and cannot be restored to a normal working state even by manually restarting the network card.
[0007] To achieve the above object, the present invention is achieved as follows:
[0008] In a first aspect, the present invention provides a data monitoring method for a high-speed network port, comprising:
[0009] Acquire in real time the mapping relationship between different automatic gain control values and the transmission time for maintaining stable data communication and obtain the packet loss statistics of the high-speed network port at regular intervals, so as to determine whether there is packet loss in the transmission data based on the packet loss statistics;
[0010] If there is packet loss in the transmitted data, detecting whether the high-speed network port generates a target training value;
[0011] In the case of generating the target training value, determining a target automatic gain control value corresponding to an optimal transmission time for maintaining stable data communication based on a pre-built micro database;
[0012] The target automatic gain control value is written into the network card register and the training value of the high-speed network port is reset, so as to repeatedly monitor the transmission data of the high-speed network port based on the reset training value and the target automatic gain control value.
[0013] In a second aspect, a data monitoring device for a high-speed network port is provided, comprising:
[0014] An acquisition unit, used to acquire in real time the mapping relationship between different automatic gain control values and the transmission time for maintaining stable data communication and to periodically acquire the packet loss statistics of the high-speed network port;
[0015] a detection unit, configured to determine whether there is packet loss in the transmission data according to the packet loss statistics, and to detect whether the high-speed network port generates a target training value when there is packet loss in the transmission data;
[0016] a determination unit, configured to determine a target automatic gain control value corresponding to an optimal transmission time for maintaining stable data communication according to a pre-built micro database when generating the target training value;
[0017] a processing unit, configured to write the target automatic gain control value into a network card register and reset the training value of the high-speed network port; and
[0018] The control unit is used to repeatedly monitor the transmission data of the high-speed network port according to the reset training value and the target automatic gain control value.
[0019] As a further improvement of the present invention, the micro database is used to store a mapping relationship between an automatic gain control value corresponding to when there is no packet loss in the transmitted data and a transmission time for maintaining stable data communication.
[0020] In a third aspect, a terminal device is provided for performing high-speed communication with a target device, including:
[0021] A high-speed network card with a high-speed network port that generates packet loss statistics and target training values at regular intervals;
[0022] A micro-database for storing a mapping relationship between different automatic gain control values corresponding to when no packet loss occurs in the transmission data and the transmission time for maintaining stable data communication, so as to determine a target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication when the high-speed network port generates a target training value;
[0023] The network card register is used to store a target automatic gain control value corresponding to an optimal transmission time for maintaining stable data communication, so as to restore data communication between the target automatic gain control value and a target network port of a target device according to the reset training value.
[0024] In a fourth aspect, a data communication system is provided, comprising:
[0025] A first terminal having a target network card, wherein a target network port of the target network card is used to periodically generate a packet loss statistic and a first training value; and,
[0026] a second terminal having a high-speed network card for transmitting data with the first terminal, wherein the high-speed network port of the high-speed network card periodically generates a packet loss statistic and a second training value and obtains a target training value based on the first training value and the second training value;
[0027] The second terminal has a micro-database and a network card register, and the micro-database is used to store the mapping relationship between different automatic gain control values corresponding to the transmission data when there is no packet loss and the transmission time for maintaining stable data communication, so as to determine the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication when the high-speed network port generates a target training value;
[0028] The network card register is used to store a target automatic gain control value corresponding to an optimal transmission time for maintaining stable data communication, so as to restore data communication between the target automatic gain control value and the target network port of the first terminal according to the reset training value.
[0029] As a further improvement of the present invention, the target network port is a high-speed network port or a low-speed network port.
[0030] In a fifth aspect, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in the second aspect are implemented.
[0031] The beneficial effects of the present invention are:
[0032] In the present invention, the data monitoring method for the high-speed network port first determines whether there is packet loss in the transmission data according to the packet loss statistics of the high-speed network port obtained at a fixed time, and then further detects whether the high-speed network port generates a target training value when it is determined that there is packet loss in the transmission data, so as to determine the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication according to the pre-built micro-database when the target training value is generated, so as to continue to monitor the transmission data of the high-speed network port according to the target automatic gain control value and the reset training value, so as to restore the data communication between the high-speed network port and other target network ports. In this way, the data monitoring method of the present invention can restore the data communication between the high-speed network port and other target network ports while continuing to monitor the communication data according to the target automatic gain control value and the reset training value, so as to ensure that the data transmission is not interrupted, thereby solving the problem in the prior art that the enabling and disabling of the network card can only be controlled by manual operation and the real-time monitoring and automatic processing cannot be realized, and the reliability and efficiency of the data transmission of the high-speed network card are improved.
[0033] Furthermore, the data monitoring method of the present invention determines the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication through a pre-constructed micro-database, so as to serve as a transition for the recovery of the network card without affecting the data transmission of the high-speed network card. The recovery of the network card can be achieved under the re-triggered training value, which solves the problem in the prior art that when the training value deviation is too large, the network card gain state machine is stuck and cannot be restored to a normal working state even by manually restarting the network card. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a schematic flow chart of a data monitoring method for a high-speed network port according to an embodiment of the present invention;
[0035] Figure 2 is a schematic flow chart of a data monitoring method for a high-speed network port according to another embodiment of the present invention;
[0036] Figure 3 is a schematic flow chart of a data monitoring method for a high-speed network port according to yet another embodiment of the present invention;
[0037] Figure 4 is a schematic flow chart of a data monitoring method for a high-speed network port according to yet another embodiment of the present invention;
[0038] Figure 5 is a schematic flow chart of a data monitoring method for a high-speed network port according to a specific embodiment of the present invention;
[0039] Figure 6 is a schematic structural block diagram of a data monitoring device for a high-speed network port according to an embodiment of the present invention;
[0040] Figure 7 is a schematic structural block diagram of a terminal device according to an embodiment of the present invention;
[0041] Figure 8 FIG. 4 is a schematic structural block diagram of a data communication system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The present invention is described in detail below in conjunction with the various embodiments shown in the accompanying drawings, but it should be noted that these embodiments are not limitations of the present invention, and any equivalent transformations or substitutions in functions, methods, or structures made by ordinary technicians in the field based on these embodiments are all within the scope of protection of the present invention.
[0043] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0044] Embodiment 1:
[0045] The high-speed network card is easily caused to lose data packets during data transmission when it is frequently enabled and disabled. To solve the problem of data packet loss during data transmission, the high-speed network card can only be disabled and enabled again by manual operation. Since the action of manually controlling the network card to enable and disable will cause the interruption of data transmission, it is necessary to wait for the network card to regenerate the training value before data transmission can be resumed. What's more, when the data packet loss problem is more serious due to the training value generated by the high-speed network card, the network card gain state machine (FSM) will be stuck. At this time, it can only be restored by re-powering the entire development board, that is, enabling and disabling the high-speed network card cannot restore it to normal working state.
[0046] In order to solve the above technical problems, an embodiment of the present invention provides a data monitoring method for a high-speed network port (hereinafter referred to as "data monitoring method" or "method"), which is applied to a data monitoring system for a high-speed network port (hereinafter referred to as "data monitoring system" or "system") or a data communication system, such as Figure 1 As shown, the method includes:
[0047] Step 102. Obtain in real time the mapping relationship between different automatic gain control values and the transmission time for maintaining stable data communication and periodically obtain the packet loss statistics of the high-speed network port to determine whether there is packet loss in the transmitted data based on the packet loss statistics. When using a network card, the real-time calculation function of APC is generally turned on by default, so that the mapping relationship between different automatic gain control values and data transmission time can be obtained in real time.
[0048] For the packet loss statistics of the high-speed network port, the system automatically reads the information of the packet loss statistics interface provided by the high-speed network card at intervals (such as 10s, 20s, 30s or 60s, etc.), without the need to manually obtain the packet loss information. Taking the 10G network card on the switch chip as an example, the switch chip runs the Linux operating system and can directly obtain various statistical information when sending and receiving data packets, including CRC check failure information. When CRC check failure occurs, it can be determined that the transmitted data has packet loss.
[0049] like Figure 2 As shown, after the operation of "determining whether there is packet loss in the transmission data based on the packet loss statistics" in step 102, the following is further included:
[0050] Step 103: If there is no packet loss in the transmitted data, the mapping relationship between the corresponding automatic gain control value and the transmission time for maintaining stable data communication is stored in the pre-built micro database. Then, the process goes to step 102 to continue the data monitoring process.
[0051] The APC value calculated by the automatic gain controller may sometimes deviate. Therefore, the system needs to store a stable APC value. When packet loss occurs during data transmission, the system can use the stored stable APC value to restore data transmission and prevent data from being lost.
[0052] Table 1 Mapping relationship between automatic gain control value and transmission time to maintain stable data communication
[0053] APC value Transfer time APC value 1 1 hour APC value 2 8 hours ...... ......
[0054] Among them, the stable APC value refers to the automatic gain control value obtained when there is no packet loss in the transmitted data, and the stable automatic gain control value and the corresponding transmission time for maintaining stable data communication are saved in the micro-database, as shown in Table 1. The pre-constructed micro-database is constructed by the system according to the preset automatic gain control value and the corresponding transmission time, or according to the results of real-time monitoring (the result of no packet loss in the transmitted data corresponding to different moments), the micro-database is constructed with different stable automatic gain control values and the corresponding transmission time for maintaining stable data communication, and the micro-database can realize the statistics of the good APC value without packet loss.
[0055] Step 104: If there is packet loss in the transmitted data, detect whether the high-speed network port generates a target training value.
[0056] The high-speed network card will be pre-trained before communication is enabled. The pre-trained value is the target training value, which is generally directly obtained by the operating system under the terminal device (such as the switch chip) through instructions. If two terminal devices communicate with each other through high-speed network ports, the two high-speed network ports will generate two training values, and finally the target training value for the two terminal devices to communicate will be obtained based on the two training values.
[0057] like Figure 3 As shown, the operations after step 104 further include:
[0058] Step 105: If the high-speed network port does not generate the target training value, the gain state machine is forced to restart to re-timingly obtain the high-speed network port packet loss value. Then, the process proceeds to step 102 to continue the data monitoring process.
[0059] During the detection, if it is found that the target training value is not generated, the gain state machine (FSM) will be in a stuck state. At this time, the FSM is forced to restart by driving the network card interface, and step 102 is entered to restart monitoring. It can be seen that when the high-speed network card has a relatively serious FSM state machine stuck, this embodiment can realize the automatic recovery of the high-speed network card by forcibly restarting the high-speed network card FSM state machine without restarting the operating system.
[0060] Step 106: When the target training value is generated, determine the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication based on the pre-built micro database.
[0061] The micro-database stores the mapping relationship between different stable APC values and the transmission time for maintaining stable data communication. The system will count the longest transmission time corresponding to the APC value, and take the longest transmission time for maintaining stable data communication as the optimal transmission time, thereby obtaining the target automatic gain control value corresponding to the optimal transmission time (such as the APC value 2 corresponding to 8 hours in Table 1 is the target automatic gain control value corresponding to the optimal transmission time). In this way, the problem of data transmission interruption caused by manually controlling the enabling and disabling of the network card can be solved, and the problem of waiting for the high-speed network card to regenerate the training value before re-transmitting data (that is, the network card cannot recover by itself) can be solved.
[0062] like Figure 4 As shown, before step 108 and after step 106, the following is also included:
[0063] Step 107: Disable the real-time calculation function of the automatic gain control value of the high-speed network card.
[0064] Step 108: Write the target automatic gain control value into the network card register and reset the training value of the high-speed network port, so as to repeatedly monitor the transmission data of the high-speed network port based on the reset training value and the target automatic gain control value.
[0065] In the prior art, the continued transmission of data is generally achieved by disabling and enabling the network card, but the network card will cause the interruption of data transmission when it is disabled, and it is necessary to manually control the retransmission of data. In this case, under the premise of writing the target automatic gain control value of the network card register, the data transmission can be automatically restored by directly restarting the pre-trained instruction to retrain and obtain the training value. That is, when the high-speed network card loses packets, the optimal APC value (i.e., the target automatic gain control value) is temporarily replaced as the transition for the recovery of the high-speed network card without affecting the normal data transmission between the terminal devices, and then the training is re-triggered to achieve the recovery of the high-speed network card.
[0066] In this embodiment, if Figure 4 As shown, the operations after step 108 also include:
[0067] Step 110. Restart the real-time calculation function of the automatic gain control value of the high-speed network card, and continue to obtain the packet loss statistics of the high-speed network port at regular intervals. That is, after obtaining the target automatic gain control value corresponding to the optimal transmission time and writing it into the network card register, the real-time calculation function of the automatic gain control value can be continued to be turned on to enter step 102 to implement the system's continued monitoring process.
[0068] It should be understood that the data monitoring method for the high-speed network port of the present embodiment first determines whether there is packet loss in the transmission data based on the packet loss statistics of the high-speed network port obtained at regular intervals, and then further detects whether the high-speed network port generates a target training value when it is determined that there is packet loss in the transmission data, so as to determine the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication based on the pre-built micro-database when the target training value is generated, so as to continue to monitor the transmission data of the high-speed network port based on the target automatic gain control value and the reset training value, so as to restore the data communication between the high-speed network port and other target network ports. In this way, the data monitoring method of the present embodiment can restore the data communication between the high-speed network port and other target network ports while continuing to monitor the communication data based on the target automatic gain control value and the reset training value, thereby solving the problem in the prior art that the enabling and disabling of the network card can only be controlled by manual operation and real-time monitoring and automatic processing cannot be achieved.
[0069] Furthermore, the data monitoring method of the present embodiment determines the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication through a pre-built micro-database, so as to serve as a transition for the recovery of the network card without affecting the data transmission of the high-speed network card. The recovery of the network card can be achieved under the re-triggered training value, which solves the problem in the prior art that the network card gain state machine is stuck when the training value deviation is too large and the normal working state cannot be restored even by manually restarting the network card.
[0070] Taking a 10G network card as an example, in a specific embodiment, Figure 5 As shown, the specific execution process of the data monitoring method for high-speed network ports of the present invention includes:
[0071] Step 51. Start the service and enable the real-time calculation function of the APC value to obtain the mapping relationship between different automatic gain control values and the transmission time to maintain stable data communication in real time. At the same time, obtain the packet loss statistics of the 10G network port at regular intervals to detect whether packet loss occurs in the transmitted data.
[0072] Step 521. If no packet loss occurs in the transmitted data, the mapping relationship between the corresponding automatic gain control value and the transmission time for maintaining stable data communication is stored in a pre-built micro-database, so as to realize the statistics of the good APC value without packet loss through the micro-database. Then, the process proceeds to step 51 to restart the monitoring of data communication.
[0073] Step 522: If packet loss occurs in the transmitted data, detect whether the 10G network port generates a target training value.
[0074] Step 531. If the 10G network port does not generate the target training value, the gain state machine is forced to restart, and the process goes to step 51 to re-timingly obtain the high-speed network port packet loss value and continue to monitor the data communication.
[0075] Step 532. If the 10G network port generates a target training value, the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication is determined according to the micro database.
[0076] Step 54. Disable the real-time calculation function of the APC value of the 10G network card.
[0077] Step 55. Write the target automatic gain control value into the network card register and re-trigger the training of the 10G network card. When the 10G network card loses packets, the optimal APC value (i.e., the target automatic gain control value) is temporarily replaced as the transition for the 10G network card to recover without affecting the normal data transmission between the terminal devices, and then re-trigger a training to achieve the recovery of the 10G network card.
[0078] Step 56: Restart the real-time calculation function of the automatic gain control value of the high-speed network card, and enter step 51 to implement the system's continued monitoring process.
[0079] It can be understood that the data monitoring method of this embodiment can restore the data communication between the high-speed network port and other target network ports while continuing to monitor the communication data according to the target automatic gain control value and the reset training value, thereby solving the problem in the prior art that the enabling and disabling of the network card can only be controlled by manual operation and real-time monitoring and automatic processing cannot be achieved. At the same time, the data monitoring method of this embodiment determines the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication through a pre-built micro-database, which serves as a transition for the recovery of the network card without affecting the data transmission of the high-speed network card. The recovery of the network card can be achieved under the re-triggered training value, thereby solving the problem in the prior art that when the training value deviation is too large, the network card gain state machine is stuck and cannot be restored to a normal working state even if the network card is manually restarted.
[0080] It should be noted that the high-speed network card involved in the method of this embodiment refers to a 1G network card, a 10G network card, a 25G network card, a 40G network card or a 100G network card, etc., and is not limited to the scope defined in this embodiment. The high-speed network port is the physical connection port on the high-speed network card, which is usually used to connect to external network communication equipment (such as switches, routers, etc.).
[0081] In addition, for two terminal devices that communicate with each other, the port of the high-speed network card on one of the terminal devices should be configured as a high-speed network port, and the network card port configured on the other terminal device can be configured as a high-speed network port or a low-speed network port. If the network card ports configured on both terminal devices are high-speed network ports, their speeds can be the same or different. For example, if a terminal device has a 10G high-speed network card, the network card of the other terminal device can be configured as a 1G, 10G or 25G high-speed network card, etc.
[0082] The terminal device involved in this embodiment is configured as a laptop, a switch, a router, a desktop computer, or other hardware device that can process the method of this embodiment.
[0083] Embodiment 2:
[0084] like Figure 6As shown, this embodiment also provides a data monitoring device 600 for a high-speed network port, including: an acquisition unit 601, used to acquire the mapping relationship between different automatic gain control values and the transmission time for maintaining stable data communication in real time and to obtain the packet loss statistics of the high-speed network port at regular intervals; a detection unit 602, used to determine whether there is packet loss in the transmission data according to the packet loss statistics, and to detect whether the high-speed network port generates a target training value when there is packet loss in the transmission data; a determination unit 603, used to determine the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication according to a pre-built micro-database when the target training value is generated; a processing unit 604, used to write the target automatic gain control value into the network card register and reset the training value of the high-speed network port; and a control unit 605, used to repeatedly monitor the transmission data of the high-speed network port according to the reset training value and the target automatic gain control value. Among them, the micro-database is used to store the mapping relationship between the automatic gain control value corresponding to the transmission data when there is no packet loss and the transmission time for maintaining stable data communication.
[0085] It should be understood that the data monitoring device 600 for the high-speed network port of this embodiment detects whether there is packet loss in the transmission data according to the packet loss statistics of the high-speed network port obtained by the acquisition unit 601 at regular intervals through the detection unit 602, and further detects whether the high-speed network port generates a target training value when it is determined that there is packet loss in the transmission data, so that the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication is determined by the determination unit 603 according to the pre-built micro database when the target training value is generated, so that the target automatic gain control value is written into the network card register and the training value of the high-speed network port is reset through the processing unit 604, and finally the transmission data of the high-speed network port is continuously monitored by the control unit 605 according to the target automatic gain control value and the reset training value, so as to restore the data communication between the high-speed network port and other target network ports. In this way, the data monitoring device of this embodiment can restore the data communication between the high-speed network port and other target network ports while continuing to monitor the communication data according to the target automatic gain control value and the reset training value, thereby solving the problem that the enabling and disabling of the network card can only be controlled by manual operation in the prior art, and real-time monitoring and automatic processing cannot be realized.
[0086] Furthermore, the data monitoring device 600 of the present embodiment determines the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication through a pre-built micro-database, so as to serve as a transition for the recovery of the network card without affecting the data transmission of the high-speed network card. The recovery of the network card can be achieved under the re-triggered training value, which solves the problem in the prior art that when the training value deviation is too large, the network card gain state machine is stuck and cannot be restored to a normal working state even by manually restarting the network card.
[0087] It should be noted that the scheme or principle involved in the data monitoring device for a high-speed network port of this embodiment is the same as the scheme or principle of the data monitoring method for a high-speed network port, and the same or similar contents will not be described in detail.
[0088] Embodiment three:
[0089] like Figure 7 As shown, this embodiment provides a terminal device 700 for high-speed communication with a target device, such as Figure 7 As shown, it includes a high-speed network card 701 with a high-speed network port, which is used to periodically generate packet loss statistics and generate target training values; a micro database 702, which is used to store the mapping relationship between different automatic gain control values corresponding to the transmission time when there is no packet loss in the transmitted data and the transmission time for maintaining stable data communication, so as to determine the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication when the high-speed network port generates the target training value; a network card register 703, which is used to store the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication, so as to restore data communication between the reset training value, the target automatic gain control value and the target network port of the target device.
[0090] It should be understood that the terminal device 700 of this embodiment generates packet loss statistics and target training values through the high-speed network port of its high-speed network card 701 at regular intervals, and stores the mapping relationship between different automatic gain control values corresponding to the transmission time for maintaining stable data communication when the transmission data is not lost through the micro database 702, and calculates the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication when the high-speed network port generates the target training value, so as to write it into the network card register 703, so as to restore data communication between the target network port of the target device according to the reset training value, the target automatic gain control value. In this way, the terminal device of this embodiment can restore data communication between the high-speed network port and other target network ports while continuing to monitor the communication data according to the target automatic gain control value and the reset training value, which solves the problem that the enabling and disabling of the network card can only be controlled by manual operation in the prior art, and real-time monitoring and automatic processing cannot be achieved.
[0091] In addition, the terminal device 700 may also include a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program is executed by the processor to implement the above Figure 1-5 The various processes of the embodiment of the data monitoring method for a high-speed network port shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0092] It should be noted that the scheme or principle involved in the terminal device of this embodiment is the same as the scheme or principle of the data monitoring method for the high-speed network port, and the same or similar contents will not be described in detail.
[0093] Embodiment 4:
[0094] like Figure 8 As shown, this embodiment also provides a data communication system 800, which has a first terminal 81 with a target network card 810, and the target network port of the target network card 810 periodically generates packet loss statistics and generates a first training value; and, a second terminal 82 with a high-speed network card 820 for transmitting data with the first terminal 81, and the high-speed network port of the high-speed network card 820 periodically generates packet loss statistics and generates a second training value, so as to obtain a target training value based on the first training value and the second training value; wherein the second terminal 82 has a micro database 821 and a network card register 822, wherein the micro database 821 is used to store a mapping relationship between different automatic gain control values corresponding to when the transmission data is not packet lost and the transmission time for maintaining stable data communication, so as to determine the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication when the high-speed network port of the high-speed network card 820 generates a target training value; the network card register 822 is used to store the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication, so as to restore data communication between the reset training value, the target automatic gain control value and the target network port of the first terminal. The target network card is a high-speed network card or a low-speed network card.
[0095] It can be understood that in the data communication system 800 of this embodiment, the target network card 810 of the first terminal 81 communicates with the high-speed network card 820 of the second terminal 82. The target network port of the target network card 810 and the high-speed network port of the high-speed network card 820 are pre-trained to generate target training values to ensure high-speed transmission of data between the two terminals, and the mapping relationship between different automatic gain control values corresponding to the transmission time for maintaining stable data communication when the transmission data is not lost is stored through the micro database 821, and the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication when the high-speed network port generates the target training value is counted, so as to write the network card register 822, so as to restore data communication between the target network port of the first terminal according to the reset training value, the target automatic gain control value. In this way, the data communication system 800 of this embodiment can restore data communication between the high-speed network port and other target network ports while continuing to monitor the communication data according to the target automatic gain control value and the reset training value, solving the problem that the enabling and disabling of the network card can only be controlled by manual operation in the prior art, and real-time monitoring and automatic processing cannot be achieved.
[0096] It should be noted that the scheme or principle involved in the data communication system 800 of this embodiment is the same as the scheme or principle of the data monitoring method for the high-speed network port, and the same or similar contents will not be described in detail.
[0097] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, which implements the above-mentioned Figure 1-5 The various processes of the data monitoring method for high-speed network ports shown in the figure can achieve the same technical effect, and are not repeated here to avoid repetition. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0098] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention. They are not intended to limit the scope of protection of the present invention. Any equivalent implementation methods or changes that do not deviate from the technical spirit of the present invention should be included in the scope of protection of the present invention.
[0099] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0100] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A data monitoring method for a high-speed network port, characterized in that: include: Acquire in real time the mapping relationship between different automatic gain control values and the transmission time for maintaining stable data communication and obtain the packet loss statistics of the high-speed network port at regular intervals, so as to determine whether there is packet loss in the transmission data based on the packet loss statistics; If there is packet loss in the transmitted data, detecting whether the high-speed network port generates a target training value; In the case of generating the target training value, determining a target automatic gain control value corresponding to an optimal transmission time for maintaining stable data communication based on a pre-built micro database; The target automatic gain control value is written into the network card register and the training value of the high-speed network port is reset, so as to repeatedly monitor the transmission data of the high-speed network port based on the reset training value and the target automatic gain control value.
2. The data monitoring method according to claim 1, characterized in that: After determining whether there is packet loss in the transmission data based on the packet loss statistics, the method includes: If there is no packet loss in the transmitted data, the mapping relationship between the corresponding automatic gain control value and the transmission time for maintaining stable data communication is stored in the pre-constructed micro database.
3. The data monitoring method according to claim 1, characterized in that: After detecting whether the high-speed network port generates a target training value, the method includes: If the high-speed network port does not generate the target training value, the gain state machine is forced to restart to re-timingly obtain the high-speed network port packet loss value.
4. The data monitoring method according to any one of claims 1 to 3, characterized in that: After resuming data communication with the target device based on the reset training value and the target automatic gain control value, the method further includes: Restart the real-time calculation function of the automatic gain control value of the high-speed network card, and continue to obtain the packet loss statistics of the high-speed network port at regular intervals.
5. The data monitoring method according to claim 4, characterized in that: Before writing the target automatic gain control value into the network card register and after determining the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication based on the pre-built micro database, the method includes: Disable the real-time calculation function of the automatic gain control value of the high-speed network card.
6. A data monitoring device for a high-speed network port, characterized in that: include: An acquisition unit, used to acquire in real time the mapping relationship between different automatic gain control values and the transmission time for maintaining stable data communication and to periodically acquire the packet loss statistics of the high-speed network port; a detection unit, configured to determine whether there is packet loss in the transmission data according to the packet loss statistics, and to detect whether the high-speed network port generates a target training value when there is packet loss in the transmission data; a determination unit, configured to determine a target automatic gain control value corresponding to an optimal transmission time for maintaining stable data communication according to a pre-built micro database when generating the target training value; A processing unit, used to write the target automatic gain control value into a network card register and reset the training value of the high-speed network port; as well as, The control unit is used to repeatedly monitor the transmission data of the high-speed network port according to the reset training value and the target automatic gain control value.
7. The data monitoring device according to claim 6, characterized in that: The micro database is used to store the mapping relationship between the automatic gain control value corresponding to when there is no packet loss in the transmission data and the transmission time for maintaining stable data communication.
8. A terminal device for high-speed communication with a target device, characterized in that: include: A high-speed network card with a high-speed network port that generates packet loss statistics and target training values at regular intervals; A micro-database for storing a mapping relationship between different automatic gain control values corresponding to when no packet loss occurs in the transmission data and the transmission time for maintaining stable data communication, so as to determine a target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication when the high-speed network port generates a target training value; The network card register is used to store a target automatic gain control value corresponding to an optimal transmission time for maintaining stable data communication, so as to restore data communication between the target automatic gain control value and a target network port of a target device according to the reset training value.
9. A data communication system, characterized in that: include: A first terminal having a target network card, wherein a target network port of the target network card periodically generates a packet loss statistic and a first training value; and, a second terminal having a high-speed network card for transmitting data with the first terminal, wherein the high-speed network port of the high-speed network card periodically generates a packet loss statistic and a second training value and obtains a target training value based on the first training value and the second training value; The second terminal has a micro-database and a network card register, and the micro-database is used to store the mapping relationship between different automatic gain control values corresponding to the transmission data when there is no packet loss and the transmission time for maintaining stable data communication, so as to determine the target automatic gain control value corresponding to the optimal transmission time for maintaining stable data communication when the high-speed network port generates a target training value; The network card register is used to store a target automatic gain control value corresponding to an optimal transmission time for maintaining stable data communication, so as to restore data communication between the target automatic gain control value and the target network port of the first terminal according to the reset training value.
10. The data communication system according to claim 9, characterized in that: The target network card is a high-speed network card or a low-speed network card.