Disclosure of Invention
In view of the foregoing analysis, embodiments of the present invention provide a service-oriented global network resource allocation method and apparatus, so as to solve the problems that the existing distributed load balancing routing policy is not based on a service, and also does not consider the load condition of a global network resource, and no global network resource is referred to in the network resource allocation process, which easily causes conflicts and irrationality in network resource allocation among services, and the utilization rate of the whole network is low.
In order to achieve the purpose, the invention adopts the following technical scheme:
in a first aspect of the present invention, a service-oriented global network resource allocation method is provided, including: acquiring service information and network resource information of global network resource equipment; generating service strategy information according to the network resource information and the service information; judging whether the service strategy information is matched with the current network equipment topology information; and when the service strategy information is matched with the current network equipment topology information, performing network resource allocation on each service according to the service strategy information.
With reference to the first aspect, in a first implementation manner of the first aspect, generating service policy information according to the network resource information and the service information includes: determining the type and the required network resource amount of each service according to the service information; determining the service resource grade of each service according to the type of each service and the required network resource amount; generating service policy information of each service according to the network resource information and the service resource level of each service, wherein the service policy information comprises: and the network equipment information and the distributed network resource amount information corresponding to each service.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, after determining a service resource level of each service, before generating service policy information of each service according to the network resource information and the service resource level of each service, the method further includes: obtaining difference value information of the network resource amount corresponding to the service resource grade of each service and the required network resource amount according to the service resource grade of each service and the required network resource amount of each service; judging whether the service resource grade of each service is reasonable or not according to the type of each service and the difference information; and when the service resource grade of each service is judged to be reasonable, executing the step of generating service strategy information according to the network resource information and the service resource grade of each service.
With reference to the second implementation manner of the first aspect, in the third implementation manner of the first aspect, the determining whether the service resource level of each service is reasonable according to the type of each service and the difference information includes: judging whether the difference value corresponding to the difference value information of each type of service is within a preset threshold value of each type of service; when the difference value corresponding to the difference value information of each type of service is within a preset threshold value of each type of service, judging the service resource grade of each service to be reasonable; and when the difference value corresponding to the difference value information of each type of service exceeds a preset threshold value of each type of service, generating second difference value information of the difference value information and the preset threshold value, re-determining the service resource grade of each service according to the second difference value information, and returning to the step of generating the service strategy information of each service according to the network resource information and the service resource grade of each service.
With reference to the first implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the determining whether the service policy information matches the current network device topology information includes: acquiring the topology information of the current network equipment; judging whether network equipment corresponding to the network equipment information in the service strategy information is available or not according to the current network equipment topology information, and whether the network resource quantity of the network equipment is larger than the distributed network resource quantity or not; and when the network equipment corresponding to the network equipment information in the service policy information is available and the network resource amount of the network equipment is greater than the allocated network resource amount, judging that the service policy information is matched with the current network equipment topology information.
In a second aspect of the present invention, a service-oriented global network resource allocation apparatus is provided, including: the service information and network resource information acquisition module is used for acquiring service information and network resource information of the global network resource equipment; the service strategy information generating module is used for generating service strategy information according to the network resource information and the service information; the first judging module is used for judging whether the service strategy information is matched with the current network equipment topology information; and the network resource allocation module is used for allocating network resources to each service according to the service strategy information when the service strategy information is matched with the current network equipment topology information.
With reference to the second aspect, in a first implementation manner of the second aspect, the traffic policy information generating module includes: the type and resource amount determining module is used for determining the type and the required network resource amount of each service according to the service information; a service resource grade determining module, configured to determine a service resource grade of each service according to the type of each service and the required network resource amount; a service policy information generating submodule, configured to generate service policy information of each service according to the network resource information and a service resource level of each service, where the service policy information includes: and the network equipment information and the distributed network resource amount information corresponding to each service.
With reference to the first embodiment of the second aspect, in a second embodiment of the second aspect, the first determining module includes: the topology information acquisition module is used for acquiring the topology information of the current network equipment; a second judging module, configured to judge, according to the current network device topology information, whether a network device corresponding to the network device information in the service policy information is available, and whether a network resource amount of the network device is greater than the allocated network resource amount; and the judging module is used for judging that the service strategy information is matched with the current network equipment topology information when the network equipment corresponding to the network equipment information in the service strategy information is available and the network resource amount of the network equipment is greater than the allocated network resource amount.
In a third aspect of the present invention, a computer-readable storage medium is provided, where the computer-readable storage medium stores computer instructions for causing the computer to execute the method for allocating global network resources for service according to the first aspect of the present invention or any implementation manner of the first aspect.
In a fourth aspect of the present invention, a network resource allocation device is provided, including: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the method for allocating resources to a global service-oriented network according to the first aspect of the present invention or any embodiment of the first aspect.
Compared with the prior art, the technical scheme of the invention at least has the following advantages:
the embodiment of the invention provides a service-oriented global network resource allocation method and a device, the service-oriented global network resource allocation method is based on services, generates service strategy information according to the acquired service information and network resource information of global network resource equipment, considers the load condition of the global network resource, and performs network resource allocation on each service according to the service strategy information by judging whether the service strategy information is matched with the current network equipment topology information or not when the service strategy information is matched with the current network equipment topology information.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it is to be noted that, unless otherwise explicitly specified or limited, the term "connected" is to be interpreted broadly, e.g. as a fixed connection, a detachable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The embodiment of the invention provides a service-oriented global network resource allocation method, as shown in fig. 1, the service-oriented global network resource allocation method mainly comprises the following steps:
step S1: acquiring service information and network resource information of global network resource equipment; the service information includes all issued new services, the network resource information of the global network resource device includes global network device information used for allocating network resources and network resource amount information that can be provided by each network device, the network resource amount information that can be provided by each network device can reflect the network resource amount that can be provided by each network device (for example, at time T1), and specifically, Netflix software may be used to obtain the network resource information, but the present invention is not limited thereto.
Step S2: generating service strategy information according to the network resource information and the service information; the service policy information is generated based on the network resource amount that each network device can provide and the network resource amount required by the service, and is information based on the correspondence between each service and the network resource amount for allocating to each service.
Step S3: judging whether the service strategy information is matched with the current network equipment topology information; since the network resource load of the network device is constantly updating, it is necessary to determine whether the service policy information generated based on the network resource load condition of the network device at the time T1 matches the topology information of the current (at the time T2), that is, whether the current network device can perform network resource allocation according to the generated service policy information.
Step S4: and when the service strategy information is matched with the current network equipment topology information, performing network resource allocation on each service according to the service strategy information.
Through the steps S1 to S4, the service-oriented global network resource allocation method provided in the embodiment of the present invention generates the service policy information according to the acquired service information and the network resource information of the global network resource device based on the service, considers the load condition of the global network resource, determines whether the service policy information matches the current network device topology information, and performs network resource allocation on each service according to the service policy information when the service policy information matches the current network device topology information.
Specifically, in a preferred embodiment, as shown in fig. 2, the step S2 of generating the traffic policy information according to the network resource information and the traffic information includes the following steps:
step S201: determining the type of each service and the required network resource amount according to the service information; specifically, the service type and the required network resource amount may be included when the service is issued, or the type and the required network resource amount of each service may be obtained by analyzing the service.
Step S202: determining the service resource grade of each service according to the type of each service and the required network resource amount; specifically, the service resource classes may be divided according to the service types and the network resource amount, and the determined service resource classes include the service type information and the network resource amount information to be allocated to the service.
Step S203: generating service strategy information of each service according to the network resource information and the service resource grade of each service, wherein the service strategy information comprises: the network equipment information reflects which network equipment is adopted to allocate network resources for the service, and the allocated network resource amount information reflects how many network resources are allocated for the service.
In a preferred embodiment, as shown in fig. 2, after the step S202 determines the service resource level of each service, and before the step S203 generates the service policy information of each service according to the network resource information and the service resource level of each service, the step S2 further includes the following steps:
step S204: and obtaining difference value information of the network resource amount corresponding to the service resource grade of each service and the required network resource amount according to the service resource grade of each service and the required network resource amount of each service.
Step S205: and judging whether the service resource grade of each service is reasonable or not according to the type of each service and the difference information.
In a preferred embodiment, as shown in fig. 3, the step S205 determines whether the service resource level of each service is reasonable according to the type of each service and the difference information, and specifically includes the following steps:
step S2051: judging whether the difference value corresponding to the difference value information of each type of service is within a preset threshold value of each type of service; a threshold value is set for each type of service in advance, different threshold values are set for different types of services, and whether the service resource grade is reasonable or not can be judged according to whether the difference value between the network resource quantity corresponding to the service resource grade of the service and the required network resource quantity exceeds the threshold value or not.
Step S2052: when the difference value corresponding to the difference value information of each type of service is within the preset threshold value of each type of service, judging the service resource grade of each service to be reasonable; when the service resource level of each service is judged to be reasonable, the step S203 is executed, and service policy information is generated according to the network resource information and the service resource level of each service.
Step S2053: when the difference corresponding to the difference information of each type of service exceeds the preset threshold of each type of service, determining that the service resource level of each service is unreasonable, generating second difference information between the difference information and the preset threshold, re-determining the service resource level of each service according to the second difference information, and returning to the step S203 of generating the service policy information of each service according to the network resource information and the service resource level of each service.
In the above steps S2051 to S2053, whether the service resource level of each service is reasonable is determined by determining whether the difference between the network resource amount corresponding to the service resource level of each service and the required network resource amount is within the preset threshold, when the service resource level of each service is unreasonable, that is, when the difference between the network resource amount corresponding to the service resource level and the required network resource amount exceeds the preset threshold, the service resource level is re-determined according to the generated second difference information capable of reflecting the unreasonable degree of the service resource level, and the step S203 of generating the service policy information of each service according to the network resource information and the service resource level of each service is returned, thereby avoiding the unreasonable allocation of network resources due to the unreasonable service resource level and the waste of network resources.
In a preferred embodiment, as shown in fig. 2, the step S3 of determining whether the service policy information matches the current network device topology information includes the following steps:
step S301: acquiring current network equipment topology information; the current network device topology information includes current (at time T2) network device information and network resource amount information that can be provided by current network devices.
Step S302: judging whether the network equipment corresponding to the network equipment information in the service strategy information is available or not and whether the network resource quantity of the network equipment is greater than the distributed network resource quantity or not according to the current network equipment topology information; specifically, it may be determined whether the network device is available according to the network device information (where the availability may specifically be no fault), and it is determined whether the network resource amount of the network device is greater than the allocated network resource amount according to the network resource amount that can be provided by the current network device, that is, it is determined whether the current network device can provide a sufficient amount of network resources to allocate a service; when the network device corresponding to the network device information in the service policy information is available and the network resource amount of the network device is greater than the allocated network resource amount, determining that the service policy information is matched with the current network device topology information, thereby performing the step S4 of allocating network resources to each service according to the service policy information; when the network device corresponding to the network device information in the service policy information is unavailable or the amount of the network resource of the network device is not greater than the allocated network resource amount, returning to step S203 of generating the service policy information of each service according to the network resource information and the service resource level of each service according to the network device information that is unavailable or the amount of the network resource is not greater than the allocated network resource amount (i.e., the allocated network resource amount in the service policy information cannot be provided), and re-generating the service policy information.
An embodiment of the present invention further provides a service-oriented global network resource allocation apparatus, as shown in fig. 4, the service-oriented global network resource allocation apparatus includes: a service information and network resource information obtaining module 1, configured to obtain service information and network resource information of a global network resource device; a service policy information generating module 2, configured to generate service policy information according to the network resource information and the service information; the first judging module 3 is used for judging whether the service strategy information is matched with the current network equipment topology information; and the network resource allocation module 4 is configured to perform network resource allocation on each service according to the service policy information when the service policy information matches the current network device topology information.
Through the service information and network resource information acquisition module 1, the service policy information generation module 2, the first judgment module 3 and the network resource allocation module 4, the service-oriented global network resource allocation device provided by the embodiment of the invention is based on services, generating service policy information according to the acquired service information and network resource information of the global network resource device, considering the load condition of the global network resource, by judging whether the service policy information is matched with the topology information of the current network device, when the service strategy information is matched with the current network equipment topology information, network resource allocation is carried out on each service according to the service strategy information, because the network resource allocation is carried out on the services by referring to the global network resources, the conflict of the network resource allocation among the services is reduced, the network resource allocation is more reasonable, and the utilization rate of the whole network is improved.
As shown in fig. 5, the service policy information generating module 2 includes: a type and resource amount determining module 21, configured to determine the type and the required network resource amount of each service according to the service information; a service resource grade determining module 22, configured to determine a service resource grade of each service according to the type of each service and the required network resource amount; a service policy information generating sub-module 23, configured to generate service policy information of each service according to the network resource information and a service resource level of each service, where the service policy information includes: and the network equipment information and the distributed network resource amount information corresponding to each service.
As shown in fig. 6, the first determining module 3 includes: a topology information obtaining module 31, configured to obtain topology information of the current network device; a second determining module 32, configured to determine, according to the current network device topology information, whether a network device corresponding to the network device information in the service policy information is available, and whether a network resource amount of the network device is greater than the allocated network resource amount; a determining module 33, configured to determine that the service policy information matches the current network device topology information when the network device corresponding to the network device information in the service policy information is available and the network resource amount of the network device is greater than the allocated network resource amount.
For specific details and technical effects of the service-oriented global network resource allocation apparatus, reference may be made to the related description in the foregoing method embodiments, and details are not described herein again.
As a specific implementation manner, as shown in fig. 7, the service-oriented global network resource allocation apparatus may include: a traffic analysis module 701, a coordination module 702, a policy management module 703 and a global traffic control module 704, where the traffic analysis module 701 is configured to obtain network traffic information, the coordination module 702 is configured to obtain service information, and the functions of the traffic analysis module 701 and the coordination module 702 correspond to the service information and network resource information obtaining module 1; the policy management module 703 is configured to generate policy information according to the network traffic information and the service information, and send the policy information to the global traffic control module 704, and corresponds to the service policy information generation module 2; the global traffic control module 704 is configured to receive the policy information issued by the policy management module 703, obtain current network topology information, determine whether the policy information matches the current network topology information, generate device control information when the policy information matches the current network topology information, and control the network device to perform traffic distribution, where the device control information corresponds to the first determining module 3 and the network resource distribution module 4.
An embodiment of the present invention further provides a service-oriented global network resource allocation device, as shown in fig. 8, the service-oriented global network resource allocation device may include a processor 5 and a memory 6, where the processor 5 and the memory 6 may be communicatively connected to each other through a bus or in another manner.
The processor 5 may be a Central Processing Unit (CPU). The Processor 5 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or any combination thereof.
The memory 6, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, instructions, and modules, such as program instructions/modules corresponding to the service-oriented global network resource allocation apparatus in the embodiments of the present invention. The processor 5 executes various functional applications and data processing of the processor 5 by running non-transitory software programs, instructions and modules stored in the memory 6, that is, implements the service-oriented global network resource allocation method in the above method embodiment.
The memory 6 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 5, and the like. Further, the memory 6 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 6 may optionally include memory located remotely from the processor 5, which may be connected to the processor 5 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more of the modules described above are stored in the memory 6 and, when executed by the processor 5, perform the traffic oriented global network resource allocation method in the embodiments shown in fig. 1 to 3.
The specific details of the service-oriented global network resource allocation device may be understood by referring to the corresponding related descriptions and effects in the embodiments shown in fig. 1 to fig. 3, and are not described herein again.
Those skilled in the art will understand that all or part of the processes in the methods according to the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and the computer program stores computer instructions for causing a computer to execute the service-oriented global network resource allocation method shown in fig. 1 to 3. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.