A data transmission method and system
By dynamically determining the target default gateway address and monitoring gateway traffic in real time through the server, the problems of low efficiency of manual configuration and high load of static gateways in large networks are solved, thereby improving network transmission efficiency.
Patent Information
- Application Number
- CN202411748819.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-30
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2044-11-30
AI Technical Summary
In large networks, manually configuring network configuration information is inefficient for network administrators, and static gateway IP addresses can lead to excessive gateway load and reduce network transmission efficiency.
The server dynamically determines the target default gateway address based on the router's default gateway address and data traffic. The client only needs to configure the Internet Protocol address and subnet mask. The router and server exchange identity information and data traffic through a preset protocol, and the server monitors and updates the gateway address in real time.
It improves network configuration efficiency, avoids the problem of excessive load on static gateways, reduces data transmission congestion, and achieves improved network transmission efficiency.
Smart Images

Figure CN119402423B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer network technology, and in particular to a data transmission method and system. Background Technology
[0002] In computer networks, a gateway is a device that connects different networks, allowing data to be transmitted from one network to another. A default gateway is a special gateway within a network used to transmit data to other networks. When the destination of the data is not in the current network, the data will be forwarded to another network through the default gateway. Clients need to know network configuration information (such as Internet Protocol (IP) address, subnet mask, and default gateway) to send and receive data packets.
[0003] In large networks, when network administrators manually configure network information, there is a problem of low configuration efficiency. In addition, for the sake of management convenience, static (i.e., fixed) gateway IP addresses are used uniformly. When clients need to transmit data, they all use this gateway for data transmission, resulting in a high load on the gateway and reducing the network transmission efficiency.
[0004] Therefore, how to efficiently and rationally configure network information to improve network transmission efficiency is a technical problem that urgently needs to be solved by those in this field. Summary of the Invention
[0005] The purpose of this invention is to provide a data transmission method and system to solve the problems of low configuration efficiency when network administrators manually configure network configuration information in large networks, and the problem that static gateway IP addresses are uniformly used for management convenience, resulting in high load on the gateway and reduced network transmission efficiency when clients need to transmit data.
[0006] To address the aforementioned technical problems, this invention provides a data transmission method applied to a client, the method comprising:
[0007] Obtain the target default gateway address output by the server connected to the client; wherein, the target default gateway address is determined by the server based on the router's default gateway address and the data traffic received at the default gateway address;
[0008] Receive the Internet Protocol address and subnet mask configured by the user for the client;
[0009] Get the data to be transmitted;
[0010] Controlling transmission of the data to be transmitted according to the default gateway address, the internet protocol address and the subnet mask.
[0011] In one aspect, the server comprises:
[0012] The server receives the default gateway address and the condition of the data flow received by the default gateway address sent by the router through a preset protocol; wherein the preset protocol is a protocol for automatically sending data and containing a reserved field in the protocol; the reserved field is used to store the default gateway address and the condition of the data flow received by the default gateway address.
[0013] In another aspect, when the router sends the default gateway address and the condition of the data flow received by the default gateway address through the preset protocol, the preset protocol further comprises:
[0014] The target router is the router sending the default gateway address and the condition of the data flow received by the default gateway address; and the target server is a server pre-set to receive the default gateway address and the condition of the data flow received by the default gateway address sent by the target router.
[0015] After the server receives the data sent by the router through the preset protocol, before determining the target default gateway address according to the condition of the data flow received by the default gateway address of the router, the server further comprises:
[0016] The server acquires the current identity information within a first preset time period since receiving the data sent by the router through the preset protocol.
[0017] The server compares the current identity information with the identity information of the target server.
[0018] In the case of detecting that the comparison result is consistent, the server enters the step of determining the target default gateway address according to the condition of the data flow received by the default gateway address of the router.
[0019] In the case of detecting that the comparison result is inconsistent, the server sends prompt information representing that the destination address of the sent data is wrong to the target router, so that the target router re-determines the target server; and returns to receive the data sent by the router through the preset protocol.
[0020] In another aspect, before determining the target default gateway address according to the condition of the default gateway address of the router and the data traffic received by the default gateway address, the server further comprises:
[0021] The server determines whether the data traffic of the default gateway address meets a preset requirement within a second preset time period since obtaining the data traffic received by the default gateway address;
[0022] If yes, the target default gateway address is determined according to the condition of the default gateway address of the router and the data traffic received by the default gateway address;
[0023] If no, the default gateway address that does not meet the preset requirement is obtained, prompt information indicating a default gateway address failure is sent to the router corresponding to the default gateway address that does not meet the preset requirement, and the default gateway address that does not meet the preset requirement and the data traffic corresponding to the default gateway address that does not meet the preset requirement are deleted; wherein the preset requirement at least includes one of the following:
[0024] Preset requirement one: the data traffic value of the default gateway address within the second preset time period is less than a preset traffic value;
[0025] Preset requirement two: the data traffic value of the default gateway address within the second preset time period shows a change trend.
[0026] In another aspect, the server determines the target default gateway address according to the condition of the default gateway address of the router and the data traffic received by the default gateway address comprises:
[0027] The data traffic state of the default gateway address is determined by a preset model according to the data traffic received by the default gateway address; wherein the data traffic state of the default gateway address includes a first state, a second state and a third state; wherein the busy degree of the default gateway address represented by the first state is higher than the busy degree of the default gateway address represented by the second state, and the busy degree of the default gateway address represented by the second state is higher than the busy degree of the default gateway address represented by the third state;
[0028] The default gateway address whose data traffic state is the first state or the second state is obtained;
[0029] The default gateway address whose data traffic state is the first state or the second state is taken as the target default gateway address.
[0030] In another aspect, after the server obtains the default gateway address whose data flow state is the first state or the second state, the server further comprises:
[0031] transmitting data by using the target default gateway address and obtaining a data transmission efficiency when the data is transmitted by using the target default gateway address;
[0032] In a case where the data transmission efficiency is greater than a preset transmission efficiency, sending prompt information to the client, the prompt information being indicative of transmitting the data to be transmitted by using the target default gateway address;
[0033] In a case where the data transmission efficiency is less than or equal to the preset transmission efficiency, returning to the step of determining the data flow state of the default gateway address by using a preset model and data flow received by the default gateway address.
[0034] In another aspect, after the server obtains the default gateway address whose data flow state is the first state or the second state, the server further comprises:
[0035] obtaining a number of clients to be sent data and an amount of data to be sent on the clients to be sent data;
[0036] In a case where the number of clients to be sent data is greater than a preset number, sorting the clients to be sent data according to the amount of data to be sent;
[0037] sending the default gateway address whose data flow state is the first state or the second state to the clients to be sent data in sequence; wherein the busy degree of the default gateway address is negatively correlated with the amount of data to be sent on the clients to be sent data.
[0038] In another aspect, before the server obtains the target default gateway address connected with the client, the server further comprises:
[0039] determining whether the target device and the client are in the same local area network; wherein the target device is a device interacting with the client;
[0040] If not, the server enters the step of obtaining the target default gateway address connected with the client.
[0041] To solve the above technical problems, the application further provides a data transmission system, comprising a router, a server and a client; the router is connected with the server, and the server is connected with the client;
[0042] The router is configured to send the default gateway address and data traffic received by the default gateway address to the server.
[0043] The server is configured to determine the target default gateway address according to the default gateway address of the router and the data traffic received by the default gateway address.
[0044] The client is configured to obtain the target default gateway address output by the server connected to the client, receive the internet protocol address and subnet mask of the client configured by the user, obtain data to be transmitted, and control transmission of the data to be transmitted according to the default gateway address, the internet protocol address, and the subnet mask.
[0045] In another aspect, when the router is multiple, the server is one; and the server and the client are located in the same local area network.
[0046] The data transmission method has the advantages that the router and the client are connected through the server, the client receives the target default gateway address output by the server connected to the client, that is, the default gateway address set by the server for the client to transmit data, and when the client transmits data, the user only needs to configure the internet protocol address and the subnet mask, without manually configuring the default gateway address, thereby improving the efficiency of manually configuring network information compared with the previous method of manually configuring the default gateway address, the internet protocol address, and the subnet mask; and when the server outputs the target default gateway address to the client, the server determines the target default gateway address according to the default gateway address of the router and the data traffic received by the default gateway address, so that the target default gateway address determined is dynamically variable, the method provided by the application avoids the load being concentrated on the static gateway address, makes the network information configuration more reasonable, reduces the problem of data transmission blockage, and improves the transmission efficiency of the network.
[0047] In addition, the server receives the default gateway address and the data traffic received by the default gateway address sent by the router through a preset protocol capable of automatically sending data and containing a reserved field in the protocol, so that the server can monitor the data traffic on the default gateway address of the router in real time, and update the default gateway.
[0048] The preset protocol further comprises identity information of the target router and identity information of the target server, so that the server can verify the identity information of the server in the received data packet according to the identity information of the server after obtaining the data sent by the router through the preset protocol, and in the case where the comparison result is inconsistent, the server sends prompt information to the target router to indicate that the destination address sent is incorrect, so that the target router can re-send the data to the correct server, thereby meeting the actual data transmission requirement of the router.
[0049] The server judges whether the data flow of the default gateway address meets the preset requirement within the second preset time period after obtaining the data flow received by the default gateway address, specifically, judges whether the data flow value of the default gateway address within the second preset time period is less than the preset flow value and / or whether the data flow value of the default gateway address within the second preset time period is in a change trend. The data flow value of the default gateway address within the second preset time period being less than the preset flow value and / or the data flow value of the default gateway address within the second preset time period being in a change trend both indicate that the default gateway address can work normally, that is, the target default gateway address is determined according to the default gateway address of the router and the data flow received by the default gateway address only in the case where it is determined that the default gateway address works normally, thereby ensuring that the client can use the target default gateway address for data transmission and ensuring that the data can be transmitted successfully as much as possible.
[0050] The server determines the data flow state of the default gateway address according to the preset model and the data flow received by the default gateway address, wherein the data flow state of the default gateway address comprises a first state, a second state and a third state. The data flow state of the default gateway address represents the degree of busyness of the default gateway address. That is, the data flow state of the determined default gateway address is relative, so that the target default gateway address determined according to the data flow state of the default gateway address is more accurate.
[0051] After the server takes the default gateway address with the data flow state of the first state or the second state as the target default gateway address, the server transmits data by using the target default gateway address and obtains the data transmission efficiency when the data is transmitted by using the target default gateway address, thereby verifying whether the confirmed target default gateway address is reasonable according to the data transmission efficiency when the data is transmitted by using the target default gateway address.
[0052] The server assigns the default gateway address to each client with data to be sent according to the size of the data with data to be sent on the client with data to be sent after obtaining the default gateway address in the first state or the second state of the data flow state of the default gateway address, and the busy degree of the default gateway address is negatively related to the size of the data with data to be sent on the client with data to be sent, so that the load balancing in the network is ensured as much as possible.
[0053] In addition, the application also provides a data transmission system, which has the same or corresponding technical features and effects as the data transmission method mentioned above. BRIEF DESCRIPTION OF DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0055] Figure 1 A schematic diagram of a data transmission system provided for the embodiments of the present application is shown in
[0056] Figure 2 A flowchart of a data transmission method applied to a client provided for the embodiments of the present application is shown in DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0058] The core of the present application is to provide a data transmission method and system to solve the problem of low configuration efficiency when a network administrator directly manually configures network configuration information in a large network, and to solve the problem of high load on the gateway and low network transmission efficiency when a static gateway IP address is uniformly used for the convenience of management, and the gateway is used for data transmission when a client needs to transmit data.
[0059] In order to enable those skilled in the art to better understand the present application, the present application will be further described in detail with reference to the drawings and specific embodiments. Figure 1 A schematic diagram of a data transmission system provided for the embodiments of the present application is shown in Figure 1As shown, the data transmission system includes a routing system, a server and a client. The routing system includes a router. The router is connected with the server, and the server is connected with the client. The number of the router, the server and the client is not limited, and is determined according to actual conditions. Figure 2 A flow chart of a data transmission method applied to a client provided by an embodiment of the present application is shown in Figure 2 As shown, the method includes:
[0060] S10: obtaining a target default gateway address output by a server connected with the client; wherein the target default gateway address is determined by the server according to a default gateway address of a router and a data flow received by the default gateway address;
[0061] S11: receiving an internet protocol address and a subnet mask of the client configured by a user;
[0062] S12: obtaining data to be transmitted;
[0063] S13: controlling transmission of the data to be transmitted according to the default gateway address, the internet protocol address and the subnet mask.
[0064] It should be noted that, in order to effectively configure the network information of the client, in the implementation, before obtaining the target default gateway address output by the server connected with the client, the method further includes:
[0065] determining whether the target device and the client are in the same local area network; wherein the target device is a device interacting with the client;
[0066] If not, the step of obtaining the target default gateway address output by the server connected with the client is entered.
[0067] That is, the client needs to interact with a device not in the same local area network, and then the configuration of the default gateway address, the internet protocol address and the subnet mask is performed. In order to ensure that the client can interact with the device not in the same local area network, first, the router sends its own default gateway address and the data flow received by the default gateway address to the server. The router can send its own default gateway address and the data flow received by the default gateway address to the server spontaneously, or the server sends information requesting the default gateway address to the router, and the router sends its own default gateway address and the data flow received by the default gateway address to the server after receiving the information requesting the default gateway address sent by the server.
[0068] In the implementation, in order to enable the server to monitor the data flow of the router in real time, the server according to the default gateway address of the router and the data flow received by the default gateway address includes:
[0069] The server receives the default gateway address sent by the router through a preset protocol and the data flow received by the default gateway address; wherein the preset protocol is a protocol that can automatically send data and contains a reserved field in the protocol; the reserved field is used to store the default gateway address and the data flow received by the default gateway address.
[0070] The preset protocol is not limited, as long as it can automatically send data and contains a reserved field in the protocol. For example, the preset protocol is Link Layer Discovery Protocol (LLDP). In order to make the router and the server know the communication parties in the data transmission process, the data packet transmitted through the preset protocol includes not only the default gateway address and the data flow received by the default gateway address, but also the identification for representing the identity information of the communication parties. That is, when the router sends the default gateway address and the data flow received by the default gateway address through the preset protocol, the preset protocol also includes the identity information of the target router and the identity information of the target server. Wherein, the target router is the router that sends the default gateway address and the data flow received by the default gateway address; the target server is the server that is preset to receive the default gateway address and the data flow received by the default gateway address sent by the target router. The target router can be any router in the routing system.
[0071] Taking the adopted preset protocol as Link Layer Discovery Protocol (LLDP) as an example, the process of the router sending data including the default gateway address and the data flow received by the default gateway address to the server is described.
[0072] In each router, an LLDP environment is built, and then the default gateway address of the router is sent to the server. The router sends its gateway IP to the server through the LLDP protocol, and the server allocates the gateway address, which is equivalent to building a bridge between the router and the client. Table 1 is the transmission data format of the LLDP protocol.
[0073] Table 1
[0074]
[0075] Wherein, the Link Layer Discovery Protocol Data Unit (LLDPDU) is the payload of the LLDP, which is used to carry the message to be sent. In the embodiment of the application, the information such as the default gateway and the data flow received by the gateway is transmitted through the LLDPDU. Table 2 is the format of the LLDPDU.
[0076] Table 2
[0077]
[0078] Wherein, ChassisID, PortID, etc. are filled according to the server's Media Access Control address (MAC) address, HostNmae, etc. These data can be used to verify the uniqueness of the server. The optional data is stored in order according to the default gateway, network traffic, etc. Each piece of information occupies two bytes, and can be added according to requirements.
[0079] After the server receives the data sent by the router through the preset protocol, before determining the target default gateway address according to the router's default gateway address and the data traffic received by the default gateway address, it further includes:
[0080] The server acquires the current identity information within a first preset time period after receiving the data sent by the router through the preset protocol;
[0081] Compare the current identity information with the identity information of the target server;
[0082] In the case where the comparison result is consistent, enter the step of determining the target default gateway address according to the router's default gateway address and the data traffic received by the default gateway address;
[0083] In the case where the comparison result is inconsistent, send a prompt information representing that the destination address of the sent data is wrong to the target router, so that the target router re-determines the target server; return to receive the data sent by the router through the preset protocol.
[0084] The first preset time period is not limited, and is determined according to the actual situation. For example, the identity information of the server in the preset protocol is A device, but the identity information of the server receiving the data sent by the target router C through the preset protocol is B device. At this time, the comparison result is inconsistent, then B device sends a prompt information representing that the destination address of the sent data is wrong to the target router C, and then the target router C re-determines the target server as A device, and then A device receives the data sent by the target router C.
[0085] After the server obtains the data sent by the router through the preset protocol, the server verifies the server identity information in the received data packet according to the identity information of the server, and in the case of inconsistent comparison results, the server sends prompt information to the target router to indicate that the destination address sent is incorrect, so that the target router can re-send data to the correct server, meeting the actual data transmission requirements of the router.
[0086] After the router sends its own default gateway address and the data flow received by the default gateway address to the server, although the server receives the default gateway address, there may be a default gateway address failure in practice. In order to avoid the situation that the faulty default gateway address is allocated to the client, resulting in the failure of the client data transmission, in the implementation, after the server receives the default gateway address and the data flow received by the default gateway address sent by the router through the preset protocol, before determining the target default gateway address according to the situation of the default gateway address and the data flow received by the default gateway address of the router, it further comprises:
[0087] The server determines whether the data flow of the default gateway address meets the preset requirement within the second preset time period after obtaining the data flow received by the default gateway address.
[0088] If yes, the target default gateway address is determined according to the situation of the default gateway address and the data flow received by the default gateway address of the router.
[0089] If not, the default gateway address that does not meet the preset requirement is obtained, prompt information indicating that the default gateway address is faulty is sent to the router corresponding to the default gateway address that does not meet the preset requirement, and the default gateway address that does not meet the preset requirement and the data flow corresponding to the default gateway address that does not meet the preset requirement are deleted.
[0090] The preset requirement is not limited, such as the preset requirement at least comprising one of the following:
[0091] Preset requirement one: the data flow value of the default gateway address within the second preset time period is less than the preset flow value.
[0092] Preset requirement two: the data flow value of the default gateway address within the second preset time period shows a change trend.
[0093] The value of the second preset time length and the preset flow rate is not limited, and is determined according to actual conditions. When the preset requirement is preset requirement one, the data flow value of the default gateway address in the second preset time length is greater than or equal to the preset flow rate, that is, it is determined that the flow data of the default gateway address is always large, and it is determined that the default gateway address is faulty; when the preset requirement is preset requirement two, the data flow value of the default gateway address in the second preset time length has no change trend, which indicates that the default gateway address is faulty. In practice, the data flow value of the default gateway address in the second preset time length may be less than the preset flow rate value (that is, the flow data of the default gateway address is small), but the data flow value of the default gateway address in the second preset time length has no change trend, and the default gateway address is also considered to be faulty.
[0094] In the method, the normal or fault of the default gateway address is determined according to the data flow of the default gateway address in the second preset time length, and the target default gateway address is determined according to the default gateway address of the router and the data flow received by the default gateway address only when it is determined that the default gateway address is normal, so that the client can use the target default gateway address for data transmission, and data transmission is ensured to be successful as much as possible.
[0095] When the server determines the target default gateway address according to the default gateway address of the router and the data flow received by the default gateway address, a threshold value can be set, for example, when the data flow received by the default gateway address is less than the threshold value, the default gateway address is taken as the target default gateway address; otherwise, the default gateway address is not taken as the target default gateway address. If this method is used, the selection of the threshold value is very important, and if the selection is not appropriate, the selected target default gateway address will be unreasonable. In order to make the determined target default gateway address more appropriate, the server determines the target default gateway address according to the default gateway address of the router and the data flow received by the default gateway address, including:
[0096] Determine the data flow state of the default gateway address according to the data flow received by the default gateway address through the preset model;
[0097] Obtain the default gateway address whose data flow state is the first state or the second state;
[0098] Take the default gateway address whose data flow state is the first state or the second state as the target default gateway address.
[0099] The preset model is not limited, and for example, a clustering algorithm is used. The data flow state of the default gateway address is not limited, and in this embodiment, the data flow state of the default gateway address is divided into three states, including a first state, a second state and a third state. The busy degree of the default gateway address represented by the first state is higher than the busy degree of the default gateway address represented by the second state, and the busy degree of the default gateway address represented by the second state is higher than the busy degree of the default gateway address represented by the third state. For example, the first state can be defined as a busy state, the second state can be defined as a general state, and the third state can be defined as an unbusy state.
[0100] It is worth noting that, in order to verify the accuracy of determining the data flow state of the default gateway address according to the data flow received by the default gateway address, the server further includes the following steps after taking the default gateway address with the data flow state of the first state or the second state as the target default gateway address:
[0101] transmitting data by using the target default gateway address and obtaining the data transmission efficiency when the data is transmitted by using the target default gateway address;
[0102] In the case where the data transmission efficiency is greater than the preset transmission efficiency, sending prompt information to the client for indicating that the data to be transmitted is transmitted by using the target default gateway address;
[0103] In the case where the data transmission efficiency is less than or equal to the preset transmission efficiency, returning to the step of determining the data flow state of the default gateway address according to the data flow received by the default gateway address by using the preset model.
[0104] The preset transmission efficiency is not limited. When the data transmission efficiency is greater than the preset transmission efficiency, it indicates that the default gateway address is indeed in an unbusy state (including general or unbusy); when the data transmission efficiency is less than or equal to the preset transmission efficiency, it indicates that the default gateway address is indeed in a busy state. In the case of a judgment error, reinforcement learning can be used to correct the classification result of the preset model.
[0105] In summary, in the method of data transmission, the server mainly plays two roles, the first is to receive the default gateway addresses sent by the routing system and store these addresses, and the second is to build an automatic network state monitoring system, which mainly uses clustering algorithm and reinforcement learning to achieve self-adaptation. Specifically, the received gateway devices are first divided by clustering algorithm according to network traffic, and the division level is divided into three states: busy, general and not busy. The purpose of reinforcement learning is to correct the results of self-adaptation. When the classification result of the clustering algorithm leads to good performance, the model of machine learning is rewarded to make it more robust, and when the classification result of the clustering algorithm leads to network congestion, the model of machine learning is punished, so that the parameters in the model of machine learning can be adjusted in time.
[0106] In order to avoid the increase of the load of the default gateway addresses, the method takes the default gateway addresses whose data flow states are the first state or the second state as the target default gateway addresses.
[0107] The algorithm of the system for automatically monitoring the network state combines the clustering algorithm and the reinforcement learning algorithm in the artificial intelligence algorithm, which can monitor the traffic and network topology in the network transmission in real time, so as to dynamically assign the default gateway to the device sending the request and avoid network congestion. For example, when it is detected that a gateway address in the network receives a large number of data packets, the default gateway of the device waiting to send network data packets is modified to another gateway address in the network, which can reduce the network load of the first gateway address, improve the efficiency and speed of network transmission, and make the network load in a balanced transmission mode.
[0108] In the method provided in the embodiment, the server determines the data flow state of the default gateway address according to a preset model and the data flow received by the default gateway address, wherein the data flow state of the default gateway address includes a first state, a second state and a third state. The data flow state of the default gateway address represents the busy degree of the default gateway address. That is, the determined data flow state of the default gateway address is relative, so that the target default gateway address determined according to the data flow state of the default gateway address is more accurate. After the server takes the default gateway address whose data flow state is the first state or the second state as the target default gateway address, the server transmits data by using the target default gateway address and obtains the data transmission efficiency when the data is transmitted by using the target default gateway address, so as to verify whether the confirmed target default gateway address is reasonable according to the data transmission efficiency when the data is transmitted by using the target default gateway address.
[0109] In the data transmission process, there can be multiple clients that need to transmit data across the network, i.e., multiple clients that need to be configured with a default gateway address. In order to make the default gateway address assigned to each client more appropriate, after obtaining the default gateway address whose data flow state is the first state or the second state, the server further includes:
[0110] obtaining the number of clients with data to be sent and the amount of data to be sent on the clients with data to be sent;
[0111] In the case where the number of clients with data to be sent is greater than the preset number, the clients with data to be sent are sorted according to the size of the amount of data to be sent;
[0112] sending the default gateway addresses whose data flow state is the first state or the second state to the clients with data to be sent in turn; wherein the busy degree of the default gateway address is negatively related to the amount of data to be sent on the clients with data to be sent.
[0113] For example, if the target default gateway addresses are default gateway one, default gateway two and default gateway three, the result of sorting the default gateways according to the busy degree from high to low is default gateway one, default gateway two and default gateway three; there are three clients that need to transmit data across the network, which are client a, client b and client c; the result of sorting the clients according to the amount of data to be sent from large to small is client a, client b and client c; then the default gateways assigned to client a, client b and client c are default gateway three, default gateway two and default gateway one in turn.
[0114] In this method, after obtaining the default gateway address whose data flow state is the first state or the second state, the server assigns a default gateway address to each client with data to be sent according to the size of the amount of data to be sent on the client with data to be sent, and the busy degree of the default gateway address is negatively related to the size of the amount of data to be sent on the client with data to be sent, which as much as possible ensures the load balancing in the network.
[0115] After the client obtains the target default gateway address output by the server, an Intelligent Platform Management Interface (IPMI) command that can receive the default gateway setting is constructed inside the Baseboard Management Controller (BMC), the BMC sets the default gateway of the server after receiving the IPMI command, and takes effect immediately. If data packets need to be transmitted across the network, the data is thrown to the newly set default gateway.
[0116] In practice, after the client obtains the target default gateway address output by the server, the client may fail to successfully configure the target default gateway address. At this time, the client can verify whether the default gateway is successfully set. Specifically, after controlling the transmission of the to-be-transmitted data according to the default gateway address, the Internet protocol address, and the subnet mask, the method further includes:
[0117]
[0118] If yes, the server is sent prompt information indicating that the default gateway address is successfully set.
[0119] If no, the server is sent prompt information indicating that the target default gateway address is determined according to the data flow received according to the default gateway address of the router and the default gateway address.
[0120] The preset time is not limited, and can be determined according to the size of the amount of data transmitted. In the method, by judging whether the prompt information sent by the target device to indicate that the data is received is received within the preset time, the verification of whether the target default gateway address is successfully set by the client is realized. In addition, for the unsuccessful setting, the step of obtaining the target default gateway address is returned again, so as to ensure that the client can quickly and successfully transmit data to the devices of other local area networks.
[0121] The above describes a data transmission method, and the embodiment also provides a data transmission system, including a router, a server, and a client. The router is connected with the server, and the server is connected with the client.
[0122] The router is configured to send the default gateway address and the data flow received according to the default gateway address to the server.
[0123] The server is configured to determine the target default gateway address according to the data flow received according to the default gateway address of the router and the default gateway address.
[0124] The client is configured to obtain the target default gateway address output by the server connected with the client; receive the Internet protocol address and the subnet mask of the client configured by a user; obtain the to-be-transmitted data; and control the transmission of the to-be-transmitted data according to the default gateway address, the Internet protocol address, and the subnet mask.
[0125] In order to reduce costs and facilitate communication between the server and the client, in the implementation, the server is one when the routers are multiple; the server and the client are located in the same local area network. That is, each router in the routing system interacts with the same server.
[0126] Specifically, the routing system is responsible for sending the addresses of all gateways to the default gateway receiving server through the LLDP protocol. The server will build an automatic network status monitoring system. After receiving the data sent by the routing system through the LLDP protocol, the server analyzes the traffic and outputs the network traffic status of all default gateways. According to the size of the network traffic, the server sends the IP of the default gateway to the client. After receiving the server's instruction IP, the client sets the default gateway to the received IP. If it is detected that a gateway receives too many redundant data packets, the client's default gateway will be automatically replaced by a gateway with less data traffic.
[0127] The data transmission system provided by the embodiment has the same or corresponding technical features as the data transmission method described above. The embodiments of the data transmission method have been described in detail above, and the embodiments of the data transmission system will not be described again.
[0128] The data transmission system provided by the embodiment can continuously monitor the network status, real-time acquire and update the information of the default gateway, reduce manual intervention, automatically identify the changes of the network configuration, and replace the default gateway according to the real-time status of the network, improve the speed and efficiency of network transmission, and improve the network management efficiency; can automatically adjust the settings to adapt to new demands according to the changes of the network environment. And it can improve its recognition and processing ability by constantly learning and adapting to new data; automated monitoring and analysis reduce the dependence on manual operation and reduce labor costs. Administrators can invest more energy into policy making and optimization rather than daily monitoring; in addition, the gateway address can be analyzed for fault according to the gateway traffic.
[0129] The data transmission method and system provided by the present application are described in detail above. The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part. It should be noted that for ordinary skilled in the art, without departing from the principles of the present application, the present application can be improved and modified in several ways, and these improvements and modifications also fall within the scope of the present application.
[0130] It also needs to be explained that in the present specification, the relational terms such as first and second and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations 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 include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
Claims
1. A data transmission method, characterized by, The application is applied to a client, a router is connected with a server, and the server is connected with the client; the method comprises the following steps: obtaining a target default gateway address output by a server connected with the client; wherein the target default gateway address is determined by the server according to a default gateway address of a router and a data flow received by the default gateway address; receiving an internet protocol address and a subnet mask of the client configured by a user; obtaining data to be transmitted; controlling transmission of the data to be transmitted according to the default gateway address, the internet protocol address and the subnet mask; so that the client does not need to manually configure the default gateway address when data transmission is to be performed, the user only needs to configure the internet protocol address and the subnet mask, the target default gateway address determined is dynamically changeable, load is avoided from being concentrated on a static gateway address, network information configuration is more reasonable, a problem of blockage during data transmission is reduced, and transmission efficiency of the network is improved; the server receives the default gateway address and the data flow received by the default gateway address sent by the router through a preset protocol; wherein the preset protocol is a protocol for automatically sending data and containing a reserved field in the protocol; the reserved field is used for storing the default gateway address and the data flow received by the default gateway address. when the router sends the default gateway address and the data flow received by the default gateway address through the preset protocol, the preset protocol further comprises identity information of a target router and identity information of a target server; 2. The data transmission method of claim 1, wherein, wherein the target router is the router sending the default gateway address and the data flow received by the default gateway address; the target server is a server pre-set to receive the default gateway address and the data flow received by the default gateway address sent by the target router; after the server receives the data sent by the router through the preset protocol, before determining the target default gateway address according to the default gateway address of the router and the data flow received by the default gateway address, the server further comprises the following steps: the server obtains current identity information within a first preset time period since the data sent by the router through the preset protocol is received; comparing the current identity information with the identity information of the target server; in the case that the comparison result is consistent, entering the step of determining the target default gateway address according to the default gateway address of the router and the data flow received by the default gateway address; in the case that the comparison result is inconsistent, sending prompt information representing that the destination address of the sent data is wrong to the target router, so that the target router re-determines the target server; returning to receive the data sent by the router through the preset protocol. 3. The data transmission method of claim 2, wherein, The server further comprises, after receiving the default gateway address sent by the router through the preset protocol and the data traffic received by the default gateway address, determining the target default gateway address according to the default gateway address of the router and the condition of the data traffic received by the default gateway address, before: The server judges whether the data traffic of the default gateway address meets the preset requirement within the second preset time period since the data traffic received by the default gateway address is obtained; If yes, the target default gateway address is determined according to the default gateway address of the router and the condition of the data traffic received by the default gateway address; If no, the default gateway address that does not meet the preset requirement is obtained, prompt information representing the failure of the default gateway address is sent to the router corresponding to the default gateway address that does not meet the preset requirement, and the default gateway address that does not meet the preset requirement and the data traffic corresponding to the default gateway address that does not meet the preset requirement are deleted; wherein the preset requirement at least includes one of the following: Preset requirement one: the data traffic value of the default gateway address within the second preset time period is less than a preset traffic value; Preset requirement two: the data traffic value of the default gateway address within the second preset time period shows a change trend.
4. The data transmission method according to any one of claims 1 to 3, characterized in that, The server determines the target default gateway address according to the condition of the default gateway address of the router and the data traffic received by the default gateway address, which comprises: Determining the data traffic state of the default gateway address through a preset model and according to the data traffic received by the default gateway address; wherein the data traffic state of the default gateway address includes a first state, a second state and a third state; wherein the busy degree of the default gateway address represented by the first state is higher than the busy degree of the default gateway address represented by the second state, and the busy degree of the default gateway address represented by the second state is higher than the busy degree of the default gateway address represented by the third state; Obtaining the default gateway address whose data traffic state is the first state or the second state; Taking the default gateway address whose data traffic state is the first state or the second state as the target default gateway address.
5. The data transmission method of claim 4, wherein, The server further comprises, after taking the default gateway address whose data traffic state is the first state or the second state as the target default gateway address: Transmitting data by using the target default gateway address and obtaining the data transmission efficiency when transmitting data by using the target default gateway address; In the case where it is detected that the data transmission efficiency is greater than a preset transmission efficiency, sending prompt information representing that the data to be transmitted is transmitted by using the target default gateway address to the client; In the case where it is detected that the data transmission efficiency is less than or equal to a preset transmission efficiency, returning to the step of determining the data traffic state of the default gateway address through a preset model and according to the data traffic received by the default gateway address.
6. The data transmission method of claim 5, wherein, The server further comprises, after obtaining the default gateway address whose data traffic state is the first state or the second state, The number of clients with data to be sent and the amount of data to be sent on the clients with data to be sent are acquired; In a case where it is detected that the number of the clients with data to be sent is greater than a preset number, the clients with data to be sent are sorted according to the amount of data to be sent; The default gateway addresses with data flow states of the default gateway addresses being the first state or the second state are sequentially sent to the clients with data to be sent; wherein the degree of busyness of the default gateway addresses is in a negative correlation with the amount of data to be sent on the clients with data to be sent.
7. The data transmission method of claim 1, wherein, Before the target default gateway address output by the server connected with the client is acquired, further comprising: Judging whether the target device and the client are in the same local area network; wherein the target device is a device interacting with the client; If not, entering the step of acquiring the target default gateway address output by the server connected with the client.
8. A data transmission system, characterized by Comprising: A router, a server and a client; The router is connected with the server, and the server is connected with the client; The router is configured to send the default gateway addresses and data flow received by the default gateway addresses to the server; The server is configured to determine a target default gateway address according to the default gateway addresses of the router and the condition of the data flow received by the default gateway addresses; The client is configured to acquire the target default gateway address output by the server connected with the client; receive an internet protocol address and a subnet mask of the client configured by a user; and acquire data to be transmitted; According to the default gateway addresses, the internet protocol address and the subnet mask, the transmission of the data to be transmitted is controlled; so that when the client needs to transmit data, the user does not need to manually configure the default gateway addresses, the user only needs to configure the internet protocol address and the subnet mask, and the determined target default gateway address is dynamically changeable, avoiding the load being concentrated on the static gateway addresses, making the network information configuration more reasonable, reducing the problem of blockage during data transmission, and improving the transmission efficiency of the network; The server according to the default gateway addresses of the router and the condition of the data flow received by the default gateway addresses comprises: The server receives the default gateway addresses and the condition of the data flow received by the default gateway addresses sent by the router through a preset protocol; wherein the preset protocol is a protocol for automatically sending data and containing a reserved field; the reserved field is configured to store the default gateway addresses and the data flow received by the default gateway addresses.
9. The data transmission system of claim 8, wherein, In a case where the router is multiple, the server is one; the server and the client are located in the same local area network.
Citation Information
Patent Citations
Gateway access method and device, computer equipment and storage medium
CN111935752A