Traffic scheduling method, device, electronic device and storage medium
By allocating data traffic to the data processing center according to preset priority and matching conditions, the problem of insufficient adaptability between the data processing center and the traffic is solved, and more efficient data processing is achieved.
Patent Information
- Application Number
- CN202210841140.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-07-18
AI Technical Summary
In the prior art, the traffic allocation method results in poor adaptability between the data processing center and the data traffic, affecting the data processing efficiency.
By determining the data processing center corresponding to the data traffic based on the preset priority, and allocating it according to the matching between the network address of the data traffic and the data group address of the data processing center, the data traffic is assigned to the high-priority data processing center or resource pool.
It improves the adaptability of data traffic and data processing center, reduces the synchronization time of data processing, and improves the processing efficiency of data traffic.
Smart Images

Figure CN115766594B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a traffic scheduling method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of the Internet, network traffic has grown rapidly. The explosion of traffic means the explosion of data volume, which requires a large number of data processing centers to support it. There are also more and more ways to distribute traffic between data processing centers.
[0003] In the existing technology, the method of traffic distribution adopts fixed rules, such as allocating traffic according to high and low priorities set for the center or allocating traffic according to a fixed ratio. The adaptability of traffic to the data processing center is poor. For example, traffic data from the same data source is allocated to different data processing centers in different places according to fixed rules, resulting in a long synchronization time for data processing, which greatly affects the processing efficiency of data traffic.
[0004] At present, the traffic distribution method has the problem of poor compatibility between traffic and data processing centers, resulting in low traffic processing efficiency. There is an urgent need for a data scheduling method that improves the compatibility between data traffic and data processing centers. Summary of the Invention
[0005] The present invention provides a traffic scheduling method, device, electronic device and storage medium to enhance the adaptability of data traffic and a data processing center and improve the processing efficiency of data traffic.
[0006] According to one aspect of the present invention, a traffic scheduling method is provided, wherein the method includes:
[0007] Determine the data processing center corresponding to the data traffic according to the preset priority;
[0008] Determine whether the network address of the data traffic matches the data group address of the data processing center;
[0009] Data traffic is distributed to the data processing center according to the matching situation.
[0010] According to another aspect of the present invention, a traffic scheduling device is provided, wherein the device includes:
[0011] A center determination module is used to determine the data processing center corresponding to the data flow according to a preset priority;
[0012] A matching check module is used to determine whether the network address of the data flow matches the data group address of the data processing center;
[0013] The traffic distribution module is used to distribute data traffic to the data processing center according to the matching situation.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the traffic scheduling method of any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the traffic scheduling method of any embodiment of the present invention when executed.
[0019] The technical solution of the embodiment of the present invention determines the data processing center corresponding to the data traffic according to a preset priority, and distributes the data traffic to the corresponding data processing center according to the matching between the network address of the data traffic and the data group address of the data processing center, thereby enhancing the adaptability of the data traffic and the data processing center, reducing the synchronization time of data processing, and improving the processing efficiency of the data traffic.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 This is a flow chart of a traffic scheduling method provided according to the first embodiment of the present invention;
[0023] Figure 2 This is a flow chart of a traffic scheduling method provided according to the second embodiment of the present invention;
[0024] Figure 3 This is a flow chart of a traffic scheduling method provided according to the third embodiment of the present invention;
[0025] Figure 4This is a structural diagram of a traffic scheduling device provided according to Embodiment 3 of the present invention;
[0026] Figure 5 It is a structural diagram of an electronic device that implements the traffic scheduling method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] Example 1
[0030] Figure 1 This is a flow chart of a traffic scheduling method provided according to the first embodiment of the present invention. This embodiment is applicable to scheduling traffic distribution. The method can be executed by a traffic scheduling device. The traffic scheduling device can be implemented in the form of hardware and / or software. The traffic scheduling device can be configured in a network device. Figure 1 As shown, the method includes:
[0031] S110: Determine a data processing center corresponding to the data flow according to a preset priority.
[0032] Among them, the preset priority may refer to a parameter of the priority level of the system resources of the data processing center that is pre-set. The preset priority may be stored in a network device. The network device may include a load balancing device, a router, a gateway, etc. Different data processing centers may have different priorities set accordingly. The network device may determine the order of allocating data traffic based on the priority of the data processing center. The data processing center may refer to a specific device network for global collaboration, which may be used to transmit, calculate, and store data information on the Internet infrastructure. The data processing center may house electronic equipment for processing information required by the enterprise. There may be two or more data processing centers to realize the scheduling of data traffic between multiple data centers. Data traffic may refer to the amount of information generated during data transmission or exchange. Data traffic may be sent by a data source. The data source may be one or more. Data traffic may include various forms of messages, such as Transmission Control Protocol (TCP) messages, Internet Protocol (IP) messages, etc.
[0033] Specifically, a data source may send data traffic to a network device, and the network device may send the data traffic to a data processing center according to different pre-set priorities. The network device may read the priority values of the data processing centers stored locally and determine the data processing center with the highest priority value. The network device may determine the order in which data traffic is allocated based on the priorities of the data processing centers, and may match traffic data starting with the data processing center with the highest priority value. For example, the network center receives data traffic from a data source and, based on the pre-set priorities of the data processing centers, preferentially sends the data traffic to the data processing center with the highest priority value.
[0034] S120: Determine whether the network address of the data flow matches the data group address of the data processing center.
[0035] Among them, the network address can refer to the logical address of a node on the Internet in the network. The network address can be an IP address, MAC address, etc. The network address of the data flow can include the source address or the destination address. The network address can be extracted through the corresponding field in the data flow message; the data group address can refer to an address database containing multiple data addresses, which can include a large number of IP addresses. The data group address can be pre-set in the data processing center. The matching situation can include two situations: match and mismatch. When the data group address of the data processing center has the network address of the data flow, the matching situation can be considered to be a match; when the data group address of the data processing center does not have the network address of the data flow, the matching situation can be considered to be a mismatch.
[0036] Specifically, network traffic feature extraction tools can be used to extract the network addresses of data traffic and determine whether the network addresses in the data traffic match the data group addresses of the data center. The network addresses of the data traffic can be searched for the data group addresses of the data processing center according to the longest match principle of the router. If the data group address of the data processing center contains the network address of the data traffic, the match can be considered a match; if the data group address of the data processing center does not contain the network address of the data traffic, the match can be considered a mismatch.
[0037] S130: Allocate data traffic to the data processing center according to the matching situation.
[0038] Specifically, data traffic can be distributed to different data processing centers through network devices based on the matching of the network address of the data traffic and the data address of the data processing center. When the network address of the data traffic matches the data address of the data processing center, the data traffic can be distributed to this data processing center; when the network address of the data traffic does not match the data address of the data processing center, the data traffic can be distributed to a data processing center with a lower priority for re-matching or to a data processing center in the resource pool waiting to be re-assigned to the data processing center.
[0039] In an embodiment of the present invention, the data processing center corresponding to the data traffic is determined by presetting the priority, the network address of the data traffic is extracted, and the matching situation between the network address of the data traffic and the data group address of the data processing center is judged. The data traffic is allocated to the corresponding data processing center according to the matching situation, thereby improving the matching degree between the data traffic and the data processing center, realizing the directional diversion of the data traffic, and improving the efficiency of data processing.
[0040] Furthermore, in the preset priority, the data processing center sets at least two priority values for different network addresses.
[0041] Specifically, there can be two or more data processing centers. Different priorities can be set for different processing centers. Different priorities correspond to different priority values. Different network addresses can be matched in the order of the priority values of the data processing centers. Data processing centers with higher priorities can be matched first. Since there are two or more data processing centers, at least two priority values can be set for different network addresses in the preset priority.
[0042] Furthermore, the data group address includes at least one network address of data traffic, and the data group address is pre-configured in the data processing center.
[0043] Specifically, the data processing center can pre-set the data group address, which can be used to match the network address of the data traffic. The data group address can include one or more network addresses of the data traffic. When the network address of the data traffic is the same as the data group address, the data traffic matches the data processing center, and the data source traffic can be sent to the data processing center.
[0044] Example 2
[0045] Figure 2 This is a flow chart of a traffic scheduling method provided according to the second embodiment of the present invention. The technical solution of this embodiment is based on the above technical solution, taking the network device as a load balancing device as an example, to further refine the traffic scheduling method. Figure 2 As shown, the method includes:
[0046] S210: Read the preset priority according to the network address of the data flow.
[0047] Furthermore, the preset priority includes a priority value corresponding to at least one data processing center.
[0048] Among them, the preset priority can refer to different priorities set for different data center network addresses. The preset priority includes priority values corresponding to one or more data processing centers. The preset priority can be stored in a storage file. Different data processing centers can have different priorities set accordingly. The load balancing device can decide the order of allocating data traffic based on the priority of the data processing center. Each load balancing device can store the same set of preset priority information, and the load balancing device can be set in each data processing center.
[0049] Specifically, the load balancing device can extract a preset priority storage file, read the data file into a cache, and read the preset priorities of different data processing centers in the storage file according to the network address of the data flow.
[0050] S220: Extract the highest value with the highest priority value within the preset priorities, and determine the data processing center corresponding to the highest value.
[0051] Specifically, the highest numerical priority within the preset priorities may refer to the highest priority currently online. The preset priority values for each data processing center may be different. The load balancing device can extract the priority values from the storage file, read the highest priority value for the currently online data processing center in the storage file, and determine the data processing center corresponding to the highest value. During each traffic data scheduling, traffic data can be matched starting with the data processing center with the highest priority value.
[0052] S230: Extract the network address from the data flow.
[0053] Furthermore, the network address includes at least one of the following: a source address or a destination address.
[0054] Among them, the network address is the logical address of a node on the Internet in the network, which can be used to address the node. The network address can be extracted from the corresponding field in the data traffic message; the source address can refer to the network address of the sender of the data traffic; the destination address can refer to the network address of the receiver of the data traffic.
[0055] Specifically, network traffic feature extraction tools can be used to extract the network address of data traffic, which can include a source address or a destination address. The source address or destination address can be extracted from the corresponding field in the data traffic message. The network address can be extracted from the data traffic and confirmed in the network address.
[0056] S240: Determine whether the network address is the same as the data group address.
[0057] Specifically, the data group address can be pre-configured in the data processing center. The data group address can contain the network addresses of multiple data flows. The pre-configured data group address can be used to match the network address of the data flow. The corresponding network address field of the data group address can be extracted and compared with the network address to determine whether the network address is the same as the network address in the data group address.
[0058] S250: If the network address is the same as the data group address, it is determined that the matching condition is that the data flow matches the data processing center.
[0059] Specifically, it is possible to determine whether the network address is the same as the data group address, extract the corresponding network address field of the data group address and compare it with the network address. When it is determined that the network address is the same as the data group address, that is, the data group address contains the network address, it can be confirmed that the data flow can match the data processing center, and the matching situation is determined to be a match between the data flow and the data processing center.
[0060] S260: If the network address is different from the data group address, it is determined that the matching condition is that the data flow does not match the data processing center.
[0061] Specifically, it is possible to determine whether the network address and the data group address are the same, extract the corresponding network address field of the data group address and compare it with the network address. When it is determined that the network address and the data group address are not the same, that is, the data group address does not contain the network address, it can be confirmed that the data traffic cannot match the data processing center, and the matching situation is determined to be that the data traffic does not match the data processing center.
[0062] S270: If the data traffic matches the data processing center, send the data traffic to the data processing center.
[0063] Specifically, when it is determined that the matching situation is that the data traffic matches the data processing center, and the data group address includes the network address, that is, the network address is the same as the data group address, the data traffic can be sent to the data processing center.
[0064] S280: When the matching condition is that the data traffic does not match the data processing center, the data traffic is allocated to the resource pool according to the network address.
[0065] Specifically, when it is determined that the data traffic does not match the data processing center, that is, the data group address does not contain the data traffic network address, the data traffic can be allocated to resource pools based on the network address. There can be one or more resource pools, and resource pools can be configured according to data processing priorities. Different resource pools can be set according to the priority policy for several different data centers. Data traffic can be allocated to resource pools in various ways, including random allocation, hash algorithm-based allocation, and least connection allocation. When data traffic is allocated to resource pools using random allocation, data traffic can be randomly allocated to different resource pools based on the network address. When data traffic is allocated to resource pools using hash algorithm allocation, any data traffic can be calculated to obtain a fixed-length output, and the data traffic can be allocated to different resource pools based on the output. When data traffic is allocated to resource pools using least connection allocation, when data traffic occurs, the resource pool with the fewest connections will be selected to handle the request. The resource pool with the fewest connections can be searched and the data traffic can be allocated based on the network address.
[0066] In an embodiment of the present invention, the preset priority is read through the network address of the data traffic, and the highest value within the preset priority is extracted to determine the data processing center corresponding to the highest value. The network address is extracted from the data traffic. The matching between the network address and the data processing center data group address is compared, and the data traffic is allocated to the corresponding data processing center according to the matching situation, thereby achieving directional diversion of data traffic to specific addresses. By setting different resource pools according to the priority setting strategy for several different data centers, it is possible to achieve rapid switching of network traffic when an abnormality occurs in a data processing center.
[0067] Furthermore, data traffic is allocated to resource pools according to network addresses, including:
[0068] Extract the network address of the data flow and determine the address value of the third digit in the network address; determine the remainder between the address value and the preset parameter; and send each data flow to the resource pool associated with the remainder.
[0069] The preset parameters may be calculation parameters for a modular operation pre-set in the load balancing device. The modular operation may be a remainder obtained by calculating the value of the third digit of any network address and the preset parameters. The remainder may refer to the remainder generated by the modular operation of the third digit of the network address and the preset parameters. Data traffic may be allocated to different resource pools based on the size of the remainder. A resource pool may be configured to be associated with at least one remainder. Resource pools may be a configuration mechanism set according to data processing priorities. Different resource pools may be set according to a priority policy for several different data centers.
[0070] Specifically, a network address is the logical address of a node on the Internet, which can be used to address the node. Network traffic feature extraction tools can be used to extract the network address of data traffic and determine the address value of the third digit in the network address. The address values of the third digit in different network addresses can be the same or different. A modulo operation can be performed on the address value of the third digit in the network address with preset parameters, and the remainder generated by the modulo operation can be obtained. The address value of the third digit in the network address can be extracted from the data traffic. The modulo operation can be pre-set in the load balancing device. The preset parameters can be calculation parameters for the modulo operation set according to requirements. For example, the preset parameters stored in the load balancing device can be values such as 3 or 10. The corresponding remainder can be obtained by dividing the address value of the third digit in the network address by 3 or 10. Each data traffic can be allocated to a different resource pool. A resource pool can be configured to be associated with one or more remainders. The remainder generated by the modulo operation of the address value of the third digit in the network address with the preset parameters can be used to allocate each data traffic to a different resource pool. A remainder threshold can be set to determine the resource pool to which data traffic is allocated. The remainder threshold can be any pre-set integer less than 10, which is used to adjust the resource pool ratio. For example, the remainder threshold can be a value such as 3, 4, or 5. For example, if there are two data processing centers and the remainder threshold is 4, resource pool 1 and resource pool 2 can be set according to the policy that center A has a high priority and center B has a low priority, or center A has a low priority and center B has a high priority. Since center A has a high priority and center B has a low priority in resource pool 1, the data traffic goes to center A; and in resource pool 2, center A has a low priority and center B has a high priority, so the data traffic goes to center B. It can be set that when the remainder generated by the modulo operation of the third digit of the address value in the network address and the preset parameter is less than 4, the data traffic is allocated to resource pool 1; when the remainder generated by the modulo operation of the third digit of the address value in the network address and the preset parameter is greater than or equal to 4, the data traffic is allocated to resource pool 2, so as to realize scheduling traffic distribution.
[0071] Example 3
[0072] Figure 3 This is a flow chart of a traffic scheduling method provided according to the third embodiment of the present invention. This embodiment is a specific embodiment of the traffic scheduling method based on the above embodiment. For example, a dedicated global scheduling load balancing device is deployed at the core network layer of two data centers in the same city to specifically handle transaction data scheduling across data centers. The modulo operation is the third digit of the IP address divided by 10, and the result remainder threshold N is equal to 4. For example, the process of the traffic scheduling method is explained, wherein the remainder threshold N is a pre-set adjustable parameter, which can be any integer less than 10, and is used to adjust the resource pool ratio. Figure 3 As shown, the method includes the following steps:
[0073] S310: Input the user's transaction data.
[0074] S320: The load balancing device performs global load balancing.
[0075] S330 , prioritize matching the IP address of the A center data group. If the match is successful, proceed to S340 ; if the match is unsuccessful, proceed to S350 .
[0076] S340. If the IP address of the data group of center A is matched successfully, the system enters center A.
[0077] S350. If the IP address of the data group of center A is not matched successfully, the IP address of the data group of center B is matched. If the match is successful, enter S360; if the match is not successful, enter S370.
[0078] If the IP addresses of the S360 and B center data groups match successfully, the system will enter the B center.
[0079] S370. If the IP address of the data group of center B is not matched successfully, the global scheduling device performs a modular operation based on the IP address, divides the third digit of the IP address by 10, and obtains the remainder value of the modular operation.
[0080] S380: When the remainder value is less than 4, enter resource pool 1.
[0081] S390: When the remainder value is greater than or equal to 4, enter resource pool 2.
[0082] In one embodiment, the external service entry addresses of business zone applications in data centers A and B can be assigned to resource pools 1 and 2, respectively, based on policies where center B has higher priority and center A has lower priority, or center B has lower priority and center A has higher priority. When a user needs to access an application, the global scheduling device performs a modulo operation on the user's IP address. If the modulo remainder is less than N, the application enters resource pool 1. Since center B has higher priority and center A has lower priority in resource pool 1, the traffic is routed to center B. If the modulo remainder is greater than N, the application enters resource pool 2. Since center B has lower priority and center A has higher priority in resource pool 2, the traffic is routed to center A. The remainder threshold can be set to any integer less than 10, for example, 3, 4, 5, etc. This achieves active-active data center applications and avoids idle resources in device centers. When a service anomaly occurs in one center, traffic automatically switches to another center. For example, when service anomaly occurs in center A, the low-priority center B in resource pool 2 becomes the only available resource in the resource pool, and traffic automatically switches to center B.
[0083] Example 4
[0084] Figure 4 Schematic diagram of a flow scheduling device according to the third embodiment of the present invention. Figure 4 As shown, the device includes: a center determination module 41, a matching check module 42, and a traffic distribution module 43.
[0085] The center determination module 41 is used to determine the data processing center corresponding to the data flow according to a preset priority.
[0086] The matching check module 42 is used to determine whether the network address of the data flow matches the data group address of the data processing center.
[0087] The traffic distribution module 43 is used to distribute the data traffic to the data processing center according to the matching situation.
[0088] In an embodiment of the present invention, the center determination module determines the data processing center corresponding to the data traffic through a preset priority, extracts the network address of the data traffic, and determines the matching status between the network address of the data traffic and the data group address of the data processing center through the matching check module. The traffic allocation module allocates the data traffic to the corresponding data processing center according to the matching status, thereby improving the matching degree between the data traffic and the data processing center, realizing the directional diversion of the data traffic, and improving the efficiency of data processing.
[0089] Furthermore, based on the above embodiment, the center determination module 41 includes:
[0090] The priority reading unit is used to read the preset priority according to the network address of the data flow, wherein the preset priority includes a priority value corresponding to at least one data processing center.
[0091] The highest value confirmation unit is used to extract the highest value with the highest priority value within the preset priority level and determine the data processing center corresponding to the highest value.
[0092] Furthermore, based on the above embodiment, the matching check module 42 includes:
[0093] The network address extraction unit is used to extract the network address in the data flow, wherein the network address includes at least one of the following: a source address or a destination address.
[0094] The address matching unit is used to determine whether the network address is the same as the data group address.
[0095] The first address matching unit is configured to determine that the matching condition is that the data flow matches the data processing center if the network address is identical to the data group address.
[0096] The second address matching unit is configured to determine that the matching condition is that the data flow does not match the data processing center if the network address is different from the data group address.
[0097] Furthermore, based on the above embodiment, the traffic distribution module 43 includes:
[0098] The first traffic distribution unit is configured to send the data traffic to the data processing center when the matching condition is that the data traffic matches the data processing center.
[0099] The second traffic distribution unit is configured to distribute the data traffic to the resource pool according to the network address when the matching condition is that the data traffic does not match the data processing center.
[0100] Furthermore, based on the above embodiment, the second flow distribution unit includes:
[0101] The address value confirmation unit is used to extract the network address of the data flow and determine the address value of the third digit in the network address.
[0102] The remainder confirmation unit determines the remainder between the address value and the preset parameter.
[0103] The resource pool allocation unit is configured to send each data flow to a resource pool associated with the remainder, wherein the resource pool is configured to be associated with at least one remainder.
[0104] Furthermore, the data processing center in the preset priority in the center determination module 41 sets at least two priority values for different network addresses.
[0105] Furthermore, the data group address in the matching check module 42 includes a network address of at least one data flow, and the data group address is pre-configured in the data processing center.
[0106] The traffic scheduling device provided in the embodiment of the present invention can execute the traffic scheduling method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0107] Example 5
[0108] Figure 5 1 is a schematic structural diagram of an electronic device 10 for implementing the traffic scheduling method according to an embodiment of the present invention.
[0109] Electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the invention described and / or claimed herein.
[0110] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0111] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0112] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the traffic scheduling method.
[0113] In some embodiments, the traffic scheduling method can be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the traffic scheduling method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the traffic scheduling method in any other appropriate manner (e.g., by means of firmware).
[0114] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0115] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0116] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0117] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0118] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0119] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0120] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0121] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A traffic scheduling method, characterized in that: include: Determine the data processing center corresponding to the data traffic according to the preset priority; Determining a match between a network address of the data traffic and a data group address of the data processing center; Allocating the data traffic to the data processing center according to the matching situation; The allocating the data traffic to the data processing center according to the matching condition includes: When the matching condition is that the data traffic matches the data processing center, sending the data traffic to the data processing center; When the matching condition is that the data traffic does not match the data processing center, allocating the data traffic to a resource pool according to the network address; The allocating the data traffic to the resource pool according to the network address includes: Extracting the network address of the data traffic and determining the address value of the third digit in the network address; Determine the remainder between the address value and a preset parameter; Each of the data flows is sent to the resource pool associated with the remainder, wherein the resource pool is configured to be associated with at least one remainder.
2. The method according to claim 1, characterized in that Determining the data processing center corresponding to the data flow according to the preset priority includes: Reading the preset priority according to the network address of the data traffic, wherein the preset priority includes a priority value corresponding to at least one of the data processing centers; A highest value among the preset priorities is extracted, and the data processing center corresponding to the highest value is determined.
3. The method according to claim 1, characterized in that The determining of a match between the network address of the data traffic and the data group address of the data processing center includes: Extracting the network address within the data traffic, wherein the network address includes at least one of the following: a source address or a destination address; Determining whether the network address is the same as the data group address; If the network address is the same as the data group address, determining that the matching condition is that the data flow matches the data processing center; If the network address is different from the data group address, it is determined that the matching condition is that the data traffic does not match the data processing center.
4. The method according to claim 1, characterized in that In the preset priority, the data processing center sets at least two priority values for different network addresses.
5. The method according to claim 1, characterized in that: The data group address includes at least one network address of data traffic, and the data group address is pre-configured in the data processing center.
6. A flow scheduling device, characterized in that: include: A center determination module is used to determine the data processing center corresponding to the data flow according to a preset priority; a matching checking module, configured to determine whether the network address of the data flow matches the data group address of the data processing center; A traffic distribution module, configured to distribute the data traffic to the data processing center according to the matching situation; Wherein, the traffic distribution module includes: a first traffic distribution unit, configured to send the data traffic to the data processing center if the matching condition is that the data traffic matches the data processing center; a second traffic distribution unit, configured to distribute the data traffic to a resource pool according to the network address when the matching condition is that the data traffic does not match the data processing center; Wherein, the second flow distribution unit includes: an address value confirmation unit, configured to extract the network address of the data flow and determine the address value of the third digit in the network address; A remainder confirmation unit, used to determine the remainder between the address value and a preset parameter; A resource pool allocation unit is configured to send each of the data flows to the resource pool associated with the remainder, wherein the resource pool is configured to be associated with at least one remainder.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the traffic scheduling method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the traffic scheduling method according to any one of claims 1 to 5 when executed.
Citation Information
Patent Citations
Method and apparatus for locating candidate data centers for application migration
US20090144393A1
Data packet processing method and apparatus
WO2015113410A1