Network scheduling method, system, equipment and medium

By establishing network bitmaps and dynamically updating, the problem that traditional network card configuration methods cannot meet efficient scheduling is solved, and flexible adjustment of network card priority and optimization of network performance are achieved.

CN119521261AInactive Publication Date: 2025-02-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411624492.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-02-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing network card configuration methods cannot meet the needs of efficient scheduling, especially in multiple network card devices, traditional methods are difficult to dynamically adjust priority, resulting in inefficient network data transmission.

Method used

By establishing a network bitmap, the target network card is determined to transmit network data packets based on the data and preset rules of the configured network card. The method includes obtaining network card data, establishing a bitmap, associating network card and bitmap, and dynamically updating the bitmap to respond to changes in network card status.

Benefits of technology

It improves the efficiency and flexibility of network scheduling, simplifies the configuration and management of network card priority, dynamically adjusts network card priority to adapt to changes in the network environment, and ensures network performance and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119521261A_ABST
    Figure CN119521261A_ABST
Patent Text Reader

Abstract

The invention provides a network scheduling method, system and device and a medium, and the method comprises the steps: building a network bitmap according to the network card data of a configured network card and a preset rule; in response to the detected network data packet, determining a target network card matched with the network data packet according to the network bitmap; and transmitting the network data packet to the target terminal according to the target network card. On the basis of performing network card priority configuration in a bitmap mode, the invention provides a network scheduling method and system. The configuration and management of network card priorities are simplified by using a bitmap technology, so that the efficiency and flexibility of network scheduling are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a network scheduling method, system, device and medium. Background Art

[0002] In order to improve the stability and speed of network connections, more and more computer devices are equipped with multiple network cards; however, with the sharp increase in network traffic, traditional network configuration methods can no longer meet the needs of data transmission efficiency.

[0003] Existing network card configuration methods usually rely on manual configuration or configuration through simple algorithms, which cannot meet the needs of efficient scheduling.

[0004] Therefore, a simple and efficient method is urgently needed to solve the above technical problems. Summary of the invention

[0005] Based on this, it is necessary to provide a network scheduling method, system, device and medium to address the above technical problems.

[0006] In a first aspect, the present application provides a network scheduling method, the method comprising:

[0007] Establish a network bitmap based on the network card data of the configured network card and preset rules;

[0008] In response to detecting a network data packet, determining a target network card matching the network data packet according to the network bitmap;

[0009] The network data packet is transmitted to the target terminal according to the target network card.

[0010] In some embodiments, the network card data includes the number of network cards and the priority of the network cards, and the establishing of a network bitmap according to the configured network card data and preset rules includes:

[0011] Establishing the network bitmap with a number of bits matching the number of network cards;

[0012] According to the priority of the network card, an association relationship between the network card and the number of bits of the network bitmap is established.

[0013] In some embodiments, establishing an association relationship between the network card and the network bitmap according to the priority of the network card includes:

[0014] Get the first network card with the highest priority among the unassociated network cards;

[0015] In the network bitmap, traverse the designated bits whose values ​​are not set to the first preset value starting from the start bit;

[0016] The first network card is associated with the designated bit, and a value corresponding to the designated bit is set to a first preset value.

[0017] In some embodiments, in response to detecting the network data packet, determining a target network card matching the network data packet according to the network bitmap includes:

[0018] In response to detecting that the value corresponding to the start bit is a first preset value, determining a network card matching the start bit number as a target network card;

[0019] In response to detecting that the value corresponding to the start bit is a second preset value, determining that the bit next to the start bit is the target bit;

[0020] In response to detecting that the value corresponding to the target bit is a first preset value, determining a network card matching the target bit as a target network card;

[0021] In response to detecting that the value corresponding to the target bit is a second preset value, updating the target bit according to the next bit of the target bit;

[0022] After updating the target bit, the target bit is detected.

[0023] The corresponding value is determined until the value corresponding to the target bit is detected to be a first preset value, and the network card matching the target bit with the value of the first preset value is determined as the target network card.

[0024] In some embodiments, before establishing a network bitmap according to the network card data of the configured network card and the preset rules, the method further includes:

[0025] Get the configuration file of the configured network card;

[0026] Detecting whether a metric value exists in the configuration file;

[0027] In response to detecting that the metric value does not exist in the configuration file, establishing a network bitmap according to the network card data of the configured network card and a preset rule;

[0028] In response to detecting that the metric value exists in the configuration file, pre-checking the configuration file;

[0029] After pre-checking, a network bitmap is established based on the network card data of the configured network card and preset rules.

[0030] In some embodiments, in response to detecting that the configuration file contains a metric value, pre-checking the configuration file includes:

[0031] Detecting whether the measurement value in the configuration file is a preset value;

[0032] If the measurement value in the configuration file is a preset value, determining that the configuration file passes the pre-verification;

[0033] If the metric value in the configuration file is not a preset value, it is determined that the configuration file has not passed the pre-verification, and the metric value in the configuration file is modified to be a preset value.

[0034] In some embodiments, in response to detecting the network data packet, before determining the target network card matching the network data packet according to the network bitmap, the method includes:

[0035] Check the network card status of the configured network card;

[0036] In response to detecting that there is a faulty network card whose network card status is disconnected, the value of the designated bit matching the faulty network card in the network bitmap is updated to a second preset value.

[0037] In a second aspect, the present application provides a network scheduling system, the system comprising:

[0038] A bitmap configuration module, which establishes a network bitmap according to the network card data of the configured network card and preset rules;

[0039] A network card matching module, configured to determine a target network card matching the network data packet according to the network bitmap in response to detecting the network data packet;

[0040] A traffic scheduling module is used to transmit the network data packet to the target terminal according to the target network card.

[0041] In a third aspect, the present application provides a computer program product, which implements the steps of the following method when the computer program is executed by a processor:

[0042] Establish a network bitmap based on the network card data of the configured network card and preset rules;

[0043] In response to detecting a network data packet, determining a target network card matching the network data packet according to the network bitmap;

[0044] The network data packet is transmitted to the target terminal according to the target network card.

[0045] In a fourth aspect, the present application provides an electronic device, the electronic device comprising:

[0046] one or more processors;

[0047] and a memory associated with one or more processors, the memory being used to store program instructions, which, when read and executed by the one or more processors, perform the following operations:

[0048] Establish a network bitmap based on the network card data of the configured network card and preset rules;

[0049] In response to detecting a network data packet, determining a target network card matching the network data packet according to the network bitmap;

[0050] The network data packet is transmitted to the target terminal according to the target network card.

[0051] In a fifth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program enables a computer to perform the following operations:

[0052] Establish a network bitmap based on the network card data of the configured network card and preset rules;

[0053] In response to detecting a network data packet, determining a target network card matching the network data packet according to the network bitmap;

[0054] The network data packet is transmitted to the target terminal according to the target network card.

[0055] The beneficial effects achieved by this application are:

[0056] The present application provides a network scheduling method, including establishing a network bitmap according to the network card data of a configured network card and preset rules; in response to detecting a network data packet, determining a target network card that matches the network data packet according to the network bitmap; and transmitting the network data packet to a target terminal according to the target network card. Based on the configuration of network card priorities in a bitmap manner, a network scheduling method and system are provided. By using bitmap technology to simplify the configuration and management of network card priorities, the efficiency and flexibility of network scheduling are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0058] Figure 1 This is a server system architecture diagram provided by an embodiment of the present application;

[0059] Figure 2 It is a schematic diagram of a network scheduling method provided by an embodiment of the present application;

[0060] Figure 3 is a flow chart of a network scheduling method provided by an embodiment of the present application;

[0061] Figure 4 This is a network scheduling system architecture diagram provided by an embodiment of the present application;

[0062] Figure 5 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0064] It should be understood that in the description of the present application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like in the entire specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, the meaning of "including but not limited to".

[0065] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.

[0066] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not specifically refer to the order or sequence, nor are they used to limit the present application. They are only for the convenience of describing the method of the present application, and cannot be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.

[0067] As mentioned in the background technology, with the continuous development of computer network technology, more and more devices are equipped with multiple network cards. For example, in data centers or large enterprise networks, efficient management and scheduling of network traffic are very important to ensure network performance and stability. Especially in server equipment, multiple network interface cards are usually installed to achieve load balancing and redundant backup.

[0068] However, there is a problem of poor flexibility in configuring devices with multiple network cards. Existing solutions usually implement priority configuration for multiple network cards by modifying the metric value in the routing table. The smaller the metric value, the higher the priority. Existing solutions are weak in automation and dynamic adjustment of priorities. Priority configuration is only configured at initialization and cannot be adjusted.

[0069] It is understandable that the present application can be applied to a server device, and can also be applied to any other device configured with multiple network cards, and the present application does not limit this.

[0070] Embodiment 1

[0071] The present application embodiment provides a network scheduling method, which is specifically applied to Figure 1 In the server system shown in the figure, the bitmap configuration module sets and updates the bitmap of the network card priority. The control center generates priority information according to the configured bitmap and passes it to the network traffic scheduling module. The network traffic scheduling module schedules and processes network traffic according to the bitmap data (i.e., the bitmap storing the priority configuration). According to the priority configuration, the target network card is selected to process the traffic with priority. The specific method is as follows Figure 2 The flowchart shown includes the following contents:

[0072] S1. Obtain network card data of a configured network card.

[0073] In a specific implementation scenario, all network cards configured under the server device can be determined by searching the / sys / class / net / directory, specifically by traversing all subdirectories under this directory, and the number of subdirectories is the number of network cards in the local machine. In addition, the priority of the network card needs to be obtained, where the priority of the network card can be the initial priority set during the initial configuration. The specific acquisition means are conventional technical means and this application does not limit it here.

[0074] S2. Create and initialize a bitmap and establish an association between the network card and the bitmap.

[0075] Specifically, a network bitmap is established according to the network card data of the configured network card and preset rules; and an association relationship between the network card and the number of bits in the network bitmap is established according to the priority of the network card.

[0076] In a specific implementation scenario, the above-mentioned establishment of a network bitmap based on the network card data of the configured network card and the preset rules includes: establishing a network bitmap with a number of bits that matches the number of network cards; and establishing an association between the number of bits of the network card and the number of bits of the network bitmap based on the priority of the network card. The present application implements the priority configuration and management of the network card with a bitmap structure. The bit operations in the bitmap directly operate on the binary bits, and do not require complex conversions and calculations like other operations. Therefore, the speed of storing and querying the bitmap is faster, which can greatly improve the overall network performance and response speed.

[0077] It is understandable that when the server system starts, a bitmap structure is created according to the number and priority of the network cards. In this application, this bitmap structure is called a network bitmap. Specifically, the number of bits in the network bitmap is the same as the number of network cards. In some scenarios, the number of bits in the network bitmap may also exceed the number of network cards, and this application does not limit this. For example, if a server is configured with N network cards, with priorities ranging from 1 to N, then the length of the bitmap is also N, that is, the bitmap length is N. Figure 1 There are N bits in total, each bit corresponds to a priority. Therefore, after determining the number of network cards and priorities, it is first necessary to create a network bitmap with a number of bits that matches the number of network cards and initialize each bit to a second preset value, which is preferably set to 0 or set according to the actual scenario, and this application does not limit this.

[0078] Then, it is necessary to set the association relationship between the network bitmap and the network card, set the matching designated bit in the bitmap according to the priority assigned to the network card, specifically, obtain the first network card with the highest priority among the unassociated network cards; traverse the designated bit whose value is not set to the first preset value in the network bitmap from the starting bit; associate the first network card with the designated bit, and set the value corresponding to the designated bit to the first preset value, and the above-mentioned first preset value is preferably set to 1. Since each bit in the bitmap represents only one network card, there will be no situation where the priority is seized and the network card conflict occurs. Take the example shown in Table 1 for illustration, assuming that there are 4 network cards A, B, C, and D in the server, and the priorities are A>B>C>D from high to low. The priority of network card A is 1, then the 0th bit in the bitmap is set to 1; the priority of network card B is 2, then the 1st bit in the bitmap is set to 1, the priority of network card C is 3, then the 2nd bit in the bitmap is set to 1, the priority of network card D is 4, then the 3rd bit in the bitmap is set to 1; the final bitmap state bitmap is 1111.

[0079] Table 1

[0080] Network Card Priority Bitmap representation A 1 0001 B 2 0010 C 3 0100

[0081] This application implements the priority configuration and management of network cards in the form of a bitmap. Network cards with high priority can process traffic first, reducing the complexity of manually configuring each network card. The bitmap can be easily expanded to support any number of network cards, greatly improving the configuration flexibility. It only needs to expand the length of the bitmap, without complex modifications to the entire server system, reducing the difficulty of configuration.

[0082] It should be noted that in order to improve system stability, when configuring the network card priority, if the configuration is performed in the form of a bitmap, the present application also proposes to ensure that the current environment is an available environment before step S2, that is, to avoid conflicts between the originally used metric value to manage the priority and the currently used bitmap to manage the priority. Specifically, obtain the configuration file of the configured network card; detect whether there is a metric value in the configuration file; in response to detecting that there is no metric value in the configuration file, that is, there is no conflict between the scheme of setting the priority by the metric value and the scheme of configuring the priority in the form of a bitmap, at this time, establish a network bitmap according to the network card data of the configured network card and preset rules.

[0083] In response to detecting the presence of a metric value in a configuration file, the configuration file is pre-checked; after the pre-check, a network bitmap is established according to the network card data of the configured network card and preset rules. In response to detecting the presence of a metric value in a configuration file, the configuration file is pre-checked, including: detecting whether the metric value in the configuration file is a preset value; if the metric value in the configuration file is a preset value, determining that the configuration file has passed the pre-check; if the metric value in the configuration file is not a preset value, determining that the configuration file has not passed the pre-check, and modifying the metric value in the configuration file to the preset value. In particular, the preset value can be a specific value set manually, such as a priority of 2, which is not limited in this application, and is only limited to passing the pre-check when the metric value in the configuration file of each configured network card is the same value.

[0084] In a specific implementation scenario, a selection switch may be set on the GUI interface to select whether to manage the priority by a metric value or by a bitmap.

[0085] S3. Check the network card status and update the bitmap for the faulty network card.

[0086] Detect the network card status of the configured network card; in response to detecting that there is a faulty network card in a disconnected state, update the value of the designated bit matching the faulty network card in the network bitmap to a second preset value. Specifically, the "nmcli device status" command can be used to detect whether the network card is in a connected state or a disconnected state. The disconnected state means that the network card is a faulty network card, and the designated bit corresponding to the network card in the bitmap needs to be updated. The server system will recalculate and apply the priority according to the new bitmap, so that the configuration can be adjusted according to the change of the network state to maintain the optimization of network performance. Based on the above-mentioned disclosed example, when the state of network card A changes from a connected state to a disconnected state, the first bit in the bitmap is set to a second preset value. Through the above method, the present application realizes the dynamic adjustment of the network card. When the network card is unavailable, the influence of the faulty network card is eliminated when selecting to transmit network data packets by updating the bitmap; thereby adapting to changes in the network environment and ensuring efficient scheduling of network traffic. At the same time, by adjusting the bitmap, the traffic on the faulty network card is quickly redistributed to other normally working network cards, thereby improving the reliability and stability of the system.

[0087] In addition, the present application also provides a user interface (GUI) or command line interface (CLI) so that network administrators can easily edit the bitmap, thereby simplifying the configuration and management of network card priorities. For example, if there are N network cards in the system, the status of the current N bits of the bitmap will be displayed in the GUI interface, and each bit can be edited separately. Of course, you can also view and modify it through the command line, such as writing a configuration management tool config, through . / config net list, to view the bitmap status; . / config setnetN 1 / 0, set the Nth bit (Nth network card) of the bitmap to 1 or 0.

[0088] Among them, for detecting the network card status of a configured network card, the application also discloses:

[0089] In response to detecting that the association relationship between the network card and the number of bits of the network bitmap has been established, polling is started, and the current time node is updated as the polling start time node;

[0090] In response to detecting that the time interval between the current time node and the polling start time node is the preset time interval, the network card status of the configured network card is detected and the current time node is updated to the polling start time node. The preset time interval can be set according to actual scene requirements, and this application does not limit this.

[0091] This application sets a polling mechanism to regularly monitor the network card status of the network card, which not only realizes the monitoring of the network card status, but also saves computing resources to a certain extent, greatly improving the operating efficiency of the entire system.

[0092] It is understandable that when resources are not tight, real-time monitoring of the network card status can also be set.

[0093] S4. In response to detecting the network data packet, determine a target network card that matches the network data packet according to the network bitmap.

[0094] Specifically, the target network card determination step includes: in response to detecting that the value corresponding to the start bit is a first preset value, determining the network card matching the start bit number as the target network card; in response to detecting that the value corresponding to the start bit is a second preset value, determining the next bit of the start bit as the target bit; in response to detecting that the value corresponding to the target bit is a first preset value, determining the network card matching the target bit as the target network card; in response to detecting that the value corresponding to the target bit is a second preset value, updating the target bit according to the next bit of the target bit; after updating the target bit, detecting the value corresponding to the target bit until detecting that the value corresponding to the target bit is a first preset value, and determining that the network card matching the target bit with the value of the first preset value is the target network card. If the entire bitmap is traversed and no value is found to be the first preset value, there is no available network card at this time, and an alarm is triggered to prompt the salary personnel to repair it. That is, first check the highest priority bit in the bitmap, if the bit is the first preset value, select the corresponding network card for transmission; if the bit is the second preset value, check the second highest priority bit, and so on, until an available network card is found. Through the above method, the present application realizes the rapid positioning of the best network card during data transmission, improves the efficient scheduling of the network, and greatly improves the efficiency of data transmission.

[0095] The present application provides a method and system for network scheduling based on the bitmap configuration of network card priorities. The configuration and management of network card priorities are simplified by using bitmap technology, thereby improving the efficiency and flexibility of network scheduling. In addition, the network card configuration by bitmap method simplifies the priority configuration process in a multi-network card network environment, improves the level of configuration automation, and provides dynamic adjustment capabilities to optimize network performance and stability; and in a multi-network card configuration, there will be no priority grabbing and thus network card conflicts.

[0096] Embodiment 2

[0097] Corresponding to the above-mentioned embodiment 1, the present application also provides a network scheduling method in an embodiment, such as Figure 3 The flowchart shown specifically includes:

[0098] 3100. Establish a network bitmap according to the network card data of the configured network card and preset rules;

[0099] Preferably, the network card data includes the number of network cards and the priority of the network cards, and the establishing of a network bitmap according to the configured network card data and preset rules includes:

[0100] 3110. Establish the network bitmap whose number of bits matches the number of network cards;

[0101] 3120. Establish an association relationship between the network card and the number of bits of the network bitmap according to the priority of the network card.

[0102] Preferably, establishing an association relationship between the network card and the network bitmap according to the priority of the network card includes:

[0103] 3121. Obtain the first network card with the highest priority among the unassociated network cards;

[0104] 3122. Starting from the start bit, traverse the designated bits whose values ​​are not set to the first or second preset values ​​in the network bitmap;

[0105] 3123. Associate the first network card with the designated bit, and set the value corresponding to the designated bit to 1.

[0106] Preferably, before establishing the network bitmap according to the network card data of the configured network card and the preset rules, the method further comprises:

[0107] 3130. Obtain the configuration file of the configured network card;

[0108] 3140. Detect whether there is a metric value in the configuration file;

[0109] 3150. In response to detecting that the metric value does not exist in the configuration file, establishing a network bitmap according to the network card data of the configured network card and a preset rule;

[0110] 3160. In response to detecting that a metric value exists in the configuration file, pre-check the configuration file;

[0111] Preferably, in response to detecting that there is a metric value in the configuration file, pre-checking the configuration file includes:

[0112] 3161. Detect whether the metric value in the configuration file is a preset value;

[0113] 3162. If the metric value in the configuration file is a preset value, determine that the configuration file passes the pre-verification;

[0114] 3163. If the metric value in the configuration file is not a preset value, determine that the configuration file has not passed the pre-verification, and modify the metric value in the configuration file to a preset value.

[0115] 3170. After pre-checking, a network bitmap is established according to the network card data of the configured network card and preset rules.

[0116] 3200. In response to detecting a network data packet, determining a target network card matching the network data packet according to the network bitmap;

[0117] Preferably, in response to detecting the network data packet, determining the target network card matching the network data packet according to the network bitmap includes:

[0118] 3210. In response to detecting that the value corresponding to the start bit is a first preset value, determining a network card matching the start bit number as a target network card;

[0119] 3220. In response to detecting that the value corresponding to the start bit is a second preset value, determining that the bit next to the start bit is the target bit;

[0120] 3230. In response to detecting that the value corresponding to the target bit is a first preset value, determining a network card matching the target bit as a target network card;

[0121] 3240. In response to detecting that the value corresponding to the target bit is a second preset value, updating the target bit according to the next bit of the target bit;

[0122] 3250. After updating the target bit, detect the value corresponding to the target bit until it is detected that the value corresponding to the target bit is a first preset value, and determine that the network card that matches the target bit whose value is the first preset value is the target network card.

[0123] Preferably, in response to detecting the network data packet, before determining the target network card matching the network data packet according to the network bitmap, the method comprises:

[0124] 3260. Check the network card status of the configured network card;

[0125] 3270. In response to detecting a faulty network card whose network card status is disconnected, update the value of a designated bit in the network bitmap that matches the faulty network card to a second preset value.

[0126] 3300. Transmit the network data packet to a target terminal according to the target network card.

[0127] Embodiment 3

[0128] Corresponding to the above-mentioned embodiment 1 and embodiment 2, as Figure 4 As shown, the embodiment of the present application also provides a network scheduling system, including:

[0129] A bitmap configuration module 410, which establishes a network bitmap according to the network card data of the configured network card and preset rules;

[0130] A network card matching module 420, configured to determine a target network card matching the network data packet according to the network bitmap in response to detecting the network data packet;

[0131] The traffic scheduling module 430 is used to transmit the network data packet to the target terminal according to the target network card.

[0132] In some embodiments, the bitmap configuration module 410 is further used to establish the network bitmap whose bit number matches the number of network cards; and to establish an association relationship between the network card and the bit number of the network bitmap according to the priority of the network card.

[0133] In some embodiments, the bitmap configuration module 410 is also used to obtain the first network card with the highest priority among the unassociated network cards; traverse the designated bits in the network bitmap whose values ​​are not set to the first preset value starting from the starting bit; associate the first network card with the designated bit, and set the value corresponding to the designated bit to the first preset value.

[0134] In some embodiments, the network card matching module 420 is also used to, in response to detecting that the value corresponding to the starting bit is a first preset value, determine that the network card that matches the starting bit number is the target network card; in response to detecting that the value corresponding to the starting bit is a second preset value, determine that the next bit of the starting bit is the target bit; in response to detecting that the value corresponding to the target bit is the first preset value, determine that the network card that matches the target bit is the target network card; in response to detecting that the value corresponding to the target bit is the second preset value, update the target bit according to the next bit of the target bit; after updating the target bit, detect the value corresponding to the target bit until the value corresponding to the target bit is detected to be the first preset value, and determine that the network card that matches the target bit with the value of the first preset value is the target network card.

[0135] In some embodiments, the system also includes a preprocessing module (not shown in the figure), which is used to obtain a configuration file of a configured network card; detect whether there is a measurement value in the configuration file; in response to detecting that there is no measurement value in the configuration file, establish a network bitmap according to the network card data of the configured network card and preset rules; in response to detecting that there is a measurement value in the configuration file, pre-check the configuration file; after pre-checking, establish a network bitmap according to the network card data of the configured network card and preset rules.

[0136] In some embodiments, the preprocessing module is also used to detect whether the metric value in the configuration file is a preset value; if the metric value in the configuration file is a preset value, it is determined that the configuration file has passed the pre-verification; if the metric value in the configuration file is a non-preset value, it is determined that the configuration file has not passed the pre-verification, and the metric value in the configuration file is modified to the preset value.

[0137] In some embodiments, the network card matching module 420 is also used to detect the network card status of the configured network card;

[0138] In response to detecting that there is a faulty network card whose network card status is disconnected, the value of the designated bit matching the faulty network card in the network bitmap is updated to a second preset value.

[0139] Embodiment 4

[0140] Corresponding to all the above embodiments, the present application provides a computer program product, which implements the steps of the following method when the computer program is executed by a processor:

[0141] Establish a network bitmap based on the network card data of the configured network card and preset rules;

[0142] In response to detecting a network data packet, determining a target network card matching the network data packet according to the network bitmap;

[0143] The network data packet is transmitted to the target terminal according to the target network card.

[0144] Embodiment 5

[0145] Corresponding to all the above embodiments, an embodiment of the present application provides an electronic device, including: one or more processors; and a memory associated with the one or more processors, the memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, the following operations are performed:

[0146] Establish a network bitmap based on the network card data of the configured network card and preset rules;

[0147] In response to detecting a network data packet, determining a target network card matching the network data packet according to the network bitmap;

[0148] The network data packet is transmitted to the target terminal according to the target network card.

[0149] in, Figure 5 The architecture of the electronic device is shown as an example, which may include a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, and a memory 520. The processor 510, the video display adapter 511, the disk drive 512, the input / output interface 513, the network interface 514, and the memory 520 may be communicatively connected via a bus 530.

[0150] Among them, the processor 510 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in this application.

[0151] The memory 520 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 520 can store an operating system 521 for controlling the execution of the electronic device 500, and a basic input and output system (BIOS) 522 for controlling the low-level operations of the electronic device 500. In addition, a web browser 523, a data storage management system 524, and an icon font processing system 525, etc. can also be stored. The above-mentioned icon font processing system 525 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided in the present application is implemented by software or firmware, the relevant program code is stored in the memory 520 and is called and executed by the processor 510.

[0152] The input / output interface 513 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0153] The network interface 514 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0154] The bus 530 comprises a pathway for transmitting information between the various components of the device (eg, the processor 510, the video display adapter 511, the disk drive 512, the input / output interface 513, the network interface 514, and the memory 520).

[0155] In addition, the electronic device 500 can also obtain information on specific collection conditions from the virtual resource object collection condition information database for use in condition judgment, etc.

[0156] It should be noted that, although the above device only shows a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, a memory 520, a bus 530, etc., in the specific implementation process, the device may also include other components necessary for normal execution. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.

[0157] It can be seen from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for a computer device (which can be a personal computer, a cloud service end, or a network device, etc.) to execute the methods of various embodiments of the present application or certain parts of the embodiments.

[0158] Embodiment 6

[0159] Corresponding to all the above embodiments, the embodiments of the present application further provide a computer-readable storage medium storing a computer program, which enables a computer to perform the following operations:

[0160] Establish a network bitmap based on the network card data of the configured network card and preset rules;

[0161] In response to detecting a network data packet, determining a target network card matching the network data packet according to the network bitmap;

[0162] The network data packet is transmitted to the target terminal according to the target network card.

[0163] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0164] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A network scheduling method, characterized in that: The method comprises: Establish a network bitmap based on the network card data of the configured network card and preset rules; In response to detecting a network data packet, determining a target network card matching the network data packet according to the network bitmap; The network data packet is transmitted to the target terminal according to the target network card.

2. The method according to claim 1, characterized in that The network card data includes the number of network cards and the priority of the network cards. The network bitmap is established according to the configured network card data and preset rules, including: Establishing the network bitmap with a number of bits matching the number of network cards; According to the priority of the network card, an association relationship between the network card and the number of bits of the network bitmap is established.

3. The method according to claim 2, characterized in that The establishing, according to the priority of the network card, an association relationship between the network card and the network bitmap includes: Get the first network card with the highest priority among the unassociated network cards; In the network bitmap, traverse the designated bits whose values ​​are not set to the first preset value starting from the start bit; The first network card is associated with the designated bit, and a value corresponding to the designated bit is set to a first preset value.

4. The method according to claim 3, characterized in that In response to detecting the network data packet, determining a target network card matching the network data packet according to the network bitmap includes: In response to detecting that the value corresponding to the start bit is a first preset value, determining a network card matching the start bit number as a target network card; In response to detecting that the value corresponding to the start bit is a second preset value, determining that the bit next to the start bit is the target bit; In response to detecting that the value corresponding to the target bit is a first preset value, determining a network card matching the target bit as a target network card; In response to detecting that the value corresponding to the target bit is a second preset value, updating the target bit according to the next bit of the target bit; After the target bit is updated, a value corresponding to the target bit is detected until the value corresponding to the target bit is detected to be a first preset value, and a network card matching the target bit having the first preset value is determined as the target network card.

5. The method according to claim 1, characterized in that Before establishing the network bitmap according to the network card data of the configured network card and the preset rules, the method further includes: Get the configuration file of the configured network card; Detecting whether a metric value exists in the configuration file; In response to detecting that the metric value does not exist in the configuration file, establishing a network bitmap according to the network card data of the configured network card and a preset rule; In response to detecting that the metric value exists in the configuration file, pre-checking the configuration file; After pre-checking, a network bitmap is established based on the network card data of the configured network card and preset rules.

6. The method according to claim 5, characterized in that In response to detecting that the configuration file contains a metric value, pre-checking the configuration file includes: Detecting whether the measurement value in the configuration file is a preset value; If the measurement value in the configuration file is a preset value, determining that the configuration file passes the pre-verification; If the metric value in the configuration file is not a preset value, it is determined that the configuration file has not passed the pre-verification, and the metric value in the configuration file is modified to be a preset value.

7. The method according to any one of claims 1 to 6, characterized in that: In response to detecting the network data packet, before determining the target network card matching the network data packet according to the network bitmap, the method includes: Check the network card status of the configured network card; In response to detecting that there is a faulty network card whose network card status is disconnected, the value of the designated bit matching the faulty network card in the network bitmap is updated to a second preset value.

8. A network scheduling system, characterized in that: The system comprises: A bitmap configuration module, which establishes a network bitmap according to the network card data of the configured network card and preset rules; A network card matching module, configured to determine a target network card matching the network data packet according to the network bitmap in response to detecting the network data packet; A traffic scheduling module is used to transmit the network data packet to the target terminal according to the target network card.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; And a memory associated with the one or more processors, the memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, the method according to any one of claims 1 to 7 is executed.

10. A computer-readable storage medium, characterized in that: The computer program stores a computer program, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Network management method, device and equipment

    CN116405379A

  • Network card management method and device, electronic equipment and storage medium

    CN116684388A