CN108255937B - SDN-based resource cleaning method and device, storage medium and computer equipment - Google Patents

SDN-based resource cleaning method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN108255937B
CN108255937B CN201711292149.1A CN201711292149A CN108255937B CN 108255937 B CN108255937 B CN 108255937B CN 201711292149 A CN201711292149 A CN 201711292149A CN 108255937 B CN108255937 B CN 108255937B
Authority
CN
China
Prior art keywords
resource
resources
sdn
cleaning
dirty data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711292149.1A
Other languages
Chinese (zh)
Other versions
CN108255937A (en
Inventor
张建军
刘俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Weikun Shanghai Technology Service Co Ltd
Original Assignee
Weikun Shanghai Technology Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Weikun Shanghai Technology Service Co Ltd filed Critical Weikun Shanghai Technology Service Co Ltd
Priority to CN201711292149.1A priority Critical patent/CN108255937B/en
Publication of CN108255937A publication Critical patent/CN108255937A/en
Application granted granted Critical
Publication of CN108255937B publication Critical patent/CN108255937B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a resource cleaning method, a resource cleaning device, a computer readable storage medium and a computer device based on SDN, wherein the method comprises the following steps: sending a resource collection instruction to the SDN node; receiving resource information fed back by the SDN node; the resource information represents resources present in the SDN node; according to the received resource information, the control state of the resource is related and inquired in a resource data table; the resource data table is used for storing records for controlling resources on the SDN node; determining dirty data in the resource based on the control state; sending a notification to the SDN node to delete the dirty data. The scheme provided by the application can improve the efficiency of resource cleaning.

Description

SDN-based resource cleaning method and device, storage medium and computer equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a resource cleaning method and apparatus based on SDN, a storage medium, and a computer device.
Background
With the development of computer technology, an SDN (Software Defined Network) technology appears, and the SDN is a novel Network innovation architecture and an implementation manner of Network virtualization. SDN technology is increasingly being used because of the advantage of enabling flexible control of network traffic. At present, systems using software defined networking often have more and more resources, such as routers, subnets, IP addresses, etc., which are no longer used in the system as the systems are enlarged and used. These unused resources can seriously affect the operating efficiency of the system and therefore need to be cleared in a timely manner.
The traditional resource cleaning mode is usually to clean up the redundant or unused resources of the system by adopting modes of cleaning up files in a specific directory or cleaning up files with the same suffix name, but only mechanical judgment is carried out according to a preset standard built in a program, only specified files can be deleted, and other junk files needing to be deleted are easily missed. In order to delete the junk files more comprehensively, the search needs to be checked repeatedly or deletion needs to be designated manually, so that the resource cleaning efficiency is low.
Disclosure of Invention
Based on this, it is necessary to provide a resource cleaning method, device, storage medium and computer device based on SDN for the technical problem of inefficient resource cleaning.
A method of SDN-based resource cleanup, the method comprising:
sending a resource collection instruction to the SDN node;
receiving resource information fed back by the SDN node; the resource information represents resources present in the SDN node;
according to the received resource information, the control state of the resource is related and inquired in a resource data table; the resource data table is used for storing records for controlling resources on the SDN node;
determining dirty data in the resource based on the control state;
sending a notification to the SDN node to delete the dirty data.
An SDN-based resource cleaning apparatus, the apparatus comprising:
the sending module is used for sending a resource collecting instruction to the SDN node;
a receiving module, configured to receive resource information fed back by the SDN node; the resource information represents resources present in the SDN node;
the association query module is used for associating and querying the control state of the resource in a resource data table according to the received resource information; the resource data table is used for storing records for controlling resources on the SDN node;
a determining module, configured to determine dirty data in the resource according to the control state;
the sending module is further configured to send a notification to the SDN node to delete the dirty data.
A computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of the SDN based resource cleaning method.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the SDN based resource cleaning method.
According to the resource cleaning method, device, storage medium and computer equipment based on the SDN, the SDN node collects and reports the resources existing in the SDN node after receiving the instruction by sending the resource collection instruction to the SDN node, so that the resource information in the SDN node can be efficiently and comprehensively obtained. Control states of resources present in the SDN node are then queried by associating in a resource data table in order to determine dirty data in the SDN node. Therefore, resources existing in the SDN nodes are comprehensively associated and inquired in the resource data table, all dirty data can be efficiently and accurately determined, so that the resources can be cleaned conveniently, and the efficiency of cleaning the resources is improved.
Drawings
Fig. 1 is a diagram of an application environment of a SDN-based resource cleaning method in an embodiment;
figure 2 is a schematic flow diagram of a SDN based resource cleaning method in one embodiment;
FIG. 3 is a flowchart illustrating the steps of control state recording of a resource in one embodiment;
FIG. 4 is a flowchart illustrating steps for determining an automatic resource cleanup cycle in one embodiment;
FIG. 5 is a flowchart illustrating steps for adjusting an automatic resource cleanup cycle in one embodiment;
figure 6 is a block diagram of an SDN based resource cleaning apparatus in one embodiment;
fig. 7 is a block diagram of a SDN-based resource cleaning apparatus according to another embodiment;
fig. 8 is a block diagram illustrating a structure of an SDN-based resource cleaning apparatus according to still another embodiment;
fig. 9 is a block diagram of a SDN-based resource cleaning apparatus according to still another embodiment;
fig. 10 is a block diagram of a SDN-based resource cleaning apparatus according to another embodiment;
FIG. 11 is a block diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In particular, in the present embodiment, in order to be able to clean resources efficiently, a resource cleaning method based on SDN is proposed, which can be implemented by relying on a computer program and running on a computer system based on von neumann architecture. As shown in fig. 1, the computer system may be a central control node in the SDN based network system shown in fig. 1.
Fig. 1 illustrates an SDN-based network system, including a central control node 110 and SDN nodes 120. It should be noted that the central control node 110 may be a single hardware entity device of the server, or may be a server cluster formed by a plurality of servers, and the servers in the server cluster may respectively implement a plurality of logic functions of the central control node. The SDN node 120 may be a single server device or a server cluster formed by a plurality of servers.
As shown in fig. 2, in one embodiment, a resource cleaning method based on SDN is provided. The present embodiment is mainly illustrated by applying the method to the central control node 110 in fig. 1. Referring to fig. 2, the resource cleaning method based on the SDN specifically includes the following steps:
s202, a resource collection instruction is sent to the SDN node.
The resource is network equipment or file information in the SDN node, and the network equipment may specifically be a router (router), a Virtual Machine (VM), a subnet (subnet), and the like; the file information may specifically be a port (port) name, an Internet Protocol (IP) address, and the like. Specifically, the central control node may send a resource collection instruction to the SDN node, and the SDN node collects resources existing in the SDN node after receiving the resource collection instruction.
In one embodiment, the central control node may send resource gathering instructions to the SDN node upon detecting the trigger operation. The triggering operation is a preset operation acting on the central control node, and may specifically be a touch operation, a cursor operation, a key operation, or the like.
In one embodiment, the central control node may automatically send resource gathering instructions to the SDN node at regular intervals. For example, the central control node may be set by a timer-like timing device to automatically send a resource collection instruction to the SDN node every preset time period, so that the SDN node starts to collect resources.
In one embodiment, different classes of applications may be preconfigured on the SDN node such that each class of application can handle a single class of resources. The application programs of different categories are responsible for receiving instructions issued by the central control node, such as instructions of resource creation, resource collection or resource deletion, and executing corresponding actions. Therefore, after the SDN node receives the resource collection instruction sent by the central control node, the resources of different types in the node can be respectively collected by the application programs of different types, and the resource collection efficiency can be greatly improved.
S204, receiving resource information fed back by the SDN node; the resource information represents resources present in the SDN node.
The resource information is information used to represent resources existing in the SDN node, and may specifically be name information of the resources or statistical data obtained by performing statistics on the resources. Specifically, after receiving a resource collection instruction sent by a central control node, the SDN node collects resources existing in the SDN node, collates the collected resources into resource information, and reports the resource information to the central control node.
S206, according to the received resource information, associating the control state of the query resource in the resource data table; the resource data table is used for storing records for controlling resources on the SDN node.
The resource data table is a record table of the control state of the resource and is used for storing records for controlling the resource on the SDN node. The control state is a state in which the resource is located when the resource is controlled, and may be, for example, an operating state, a deletion state, a suspended operating state, or the like.
Specifically, the central control node may pre-establish a resource data table, where the resource data table records the name and control state of the resource. And after the central control node receives the resource information reported by the SDN node, the central control node associates and queries the control state of the resource in the resource data table according to the received resource information and the name of the resource.
In one embodiment, the central control node may pre-establish a resource data table of resources of different categories, and the resource data table may record a name of the resource, a resource associated with the resource, a control state of the resource, and the like. And the central control node records the state information of the resources in the corresponding resource data table after receiving the instruction of creating or deleting the resources. Different classes of resources such as resources of virtual machine state, resources of virtual machine performance, resources associated with subnets, etc.
For example, in the resource data table of the virtual machine state, resources related to the virtual machine state, such as an ID (identification card), a name (name), a tenant ID (tenant ID), a status (state), a task state (task state), and a power state, are recorded in the resource data table. For another example, the resource data table related to the performance of the virtual machine records resources related to the performance of the virtual machine, such as an ID, a hard disk, and a Central Processing Unit (CPU) of the virtual machine.
Further, in an embodiment, the central control node may query the control state of the resource and the associated resource of the resource in the resource data table according to the resource name in the resource information. And then determines the control state of the associated resource by associated query of other resource data tables.
For example, if the resource information received by the central control node includes name information of a virtual machine, such as VM1, the resource ID associated with VM1 is 34567, the control state is running state, and other information according to the resource data table of the virtual machine state. By looking up the resource data table relating to the virtual machine performance when the resource ID associated with the virtual machine VM1 is 34567, the hard disk resource, CPU resource, and the like associated with the virtual machine VM1 having the ID of 34567 can be found.
S208, dirty data in the resource is determined according to the control state.
The dirty data is a resource that is no longer used or redundant, and may be a resource whose control state is a deletion state, for example. Specifically, when the central control node queries in the resource data table that the control state of the resource is the deletion state, it may be determined that the resource is dirty data.
In one embodiment, when the central control node associates and queries the resource in the resource data table that the control state of the resource is the deletion state, and determines the resource associated with the resource through a plurality of resource data tables, when the associated resource is uniquely corresponding to the resource, the resource and the associated resource can be confirmed as dirty data.
And S210, sending a notice of deleting the dirty data to the SDN node.
Specifically, when the central control node determines dirty data in resources present in the SDN node, a notification of deleting the dirty data is sent to the SDN node. And after receiving the notification, the SDN node executes an action of deleting the dirty data to delete the dirty data in the SDN node, so that resource cleaning is completed.
In one embodiment, different classes of applications may be preconfigured on the SDN node such that each class of application can handle a single class of resources. And when the SDN node receives the notification of deleting the dirty data, the SDN node starts to execute actions of deleting the dirty data of the corresponding category by the application programs of different categories which are configured in advance on the SDN node.
According to the resource cleaning method based on the SDN, the SDN node collects and reports the resources existing in the SDN node after receiving the instruction by sending the resource collection instruction to the SDN node, so that the resource information in the SDN node can be efficiently and comprehensively obtained. Control states of resources present in the SDN node are then queried by associating in a resource data table in order to determine dirty data in the SDN node. Therefore, resources existing in the SDN nodes are comprehensively associated and inquired in the resource data table, all dirty data can be efficiently and accurately determined, so that the resources can be cleaned conveniently, and the efficiency of cleaning the resources is improved.
In one embodiment, the SDN-based resource cleaning method further includes a step of recording a control state of the resource, where the step of recording the control state of the resource specifically includes:
s302, resource control information is obtained.
The resource control information is information of a change of a resource control state, and may specifically be an instruction for controlling a resource, such as resource creation or resource deletion. The resource control information may include a control state of the resource or a resource associated with the resource, etc. In one embodiment, the central control node may obtain the resource control information upon receiving an instruction to control the resource.
S304, determining the resource corresponding to the resource control information.
Specifically, when the central control node acquires the resource control information, the resource corresponding to the resource control information is determined. For example, when the resource control information acquired by the central control node is the deletion of the virtual machine VM1, the resource corresponding to the resource control information, for example, the resource such as ID, tentat ID, state, IP address, connected subnet, memory space, CPU, etc. of the virtual machine VM1 can be determined.
S306, recording the control state of the determined resource according to the resource control information in the resource data table corresponding to the category to which the determined resource belongs.
Specifically, after determining the resource corresponding to the resource control information, the central control node records the control state of the resource according to the resource control information in the resource data table corresponding to the category to which the resource belongs.
For example, when the resource control information acquired by the central control node is the deletion of the virtual machine VM1, the resource corresponding to the resource control information may be determined. For example, the virtual machine VM1 has resources such as ID, tentat ID, state, IP address, subnet connected, memory space, CPU, etc. The resources such as the ID, tententid, and state of the virtual machine VM1 belong to a virtual machine state category, and the control state of each resource is recorded as a deletion state in a resource data table corresponding to the virtual machine state category. The resources such as the IP address and the connected subnet belong to network resource categories, and the control state of each resource is recorded as a deletion state in a resource data table corresponding to the network resource categories.
In the above embodiment, the control state of the resource corresponding to the resource control information is recorded in the resource data table by the resource control information, and the latest control state of the resource can be recorded in real time, so that the latest and accurate control state of the resource is stored in the resource data table.
In one embodiment, step S208 includes: determining resources related to the resources according to the resource association relation recorded in the resource data table; and when the control state is the deletion state, determining the resources represented by the resource information and the associated resources as dirty data.
The resource association relationship is an association relationship between resources, for example, an association relationship between a virtual machine and a subnet is an association relationship between a virtual machine and a subnet accessed by the virtual machine. Specifically, after the central control node acquires the resource information, the resource associated with the resource may be determined according to the resource association relationship recorded in the resource data table. When the control state of the resource is the deletion state, and the associated resource of the resource corresponds to the resource only, it may be determined that the resource associated with the resource should also be deleted, and thus the central control node determines the resource and the associated resource represented by the resource information as dirty data.
In the above embodiment, according to the resource association relationship recorded in the resource data table, the resource uniquely associated with the resource may be acquired. When the control state of the resource is the deletion state, the resource and the associated resource can be directly determined to be dirty data without sequentially searching and judging the associated resource, so that the calculation amount is reduced, and the determination efficiency of the dirty data is improved.
In one embodiment, step S208 includes: determining resources related to the resources according to the resource association relation recorded in the resource data table; counting the number of resources with the control state being a deletion state in the associated resources; when the counted number of resources is greater than or equal to the threshold, the resources and associated resources represented by the resource information are determined to be dirty data.
In one embodiment, after the central control node obtains the resource information, the resource associated with the resource and the control state of the associated resource can be determined according to the resource association relationship recorded in the resource data table. The central control node can count the number of the resources with the control state being the deletion state in the associated resources through a counter and other tools. When the counted number of resources is greater than or equal to a preset threshold, the resources corresponding to the counted associated resources may be considered as dirty data. And all the associated data of the data are associated and inquired through the resource data table, and the associated resources are determined as dirty data.
In the above embodiment, the resource associated with the resource may be acquired according to the resource association relationship recorded in the resource data table. When the number of the associated resources in which the statistical control state is the deletion state is greater than the threshold, the action of associating the control state of the search resource can be stopped, and the resources corresponding to the associated resources and all the associated resources are directly determined as dirty data, so that the calculation amount is reduced, and the determination efficiency of the dirty data is improved.
In one embodiment, the SDN-based resource cleaning method further includes a step of determining an automatic resource cleaning period, where the step of determining the automatic resource cleaning period specifically includes:
s402, counting the single resource cleaning duration; the single resource cleaning duration comprises the duration from sending the resource collection instruction to successfully deleting the dirty data.
The single resource cleaning duration is the duration of successful deletion of dirty data from the SDN node to the resource collection instruction sent by the central control node. Specifically, when the SDN node succeeds in deleting the dirty data, information that the deletion of the dirty data succeeds may be reported to the central control node. The central control node can start timing when sending a resource collection instruction to the SDN node and stop timing when receiving the information of the dirty data deletion degree fed back by the SDN node to calculate the single resource cleaning time.
S404, determining an automatic resource cleaning period according to the single resource cleaning duration; the automatic resource cleaning period is longer than the single resource cleaning time.
The resource automatic cleaning cycle is the time length from the time when the secondary central control node sends the resource collection instruction to the SDN node to the time when the resource collection instruction is sent next time. The central control node can determine the automatic resource cleaning period according to the pre-acquired single resource cleaning duration. The automatic resource cleaning period is longer than the single resource cleaning time.
In one embodiment, after the central control node determines the automatic resource cleaning period, the automatic resource cleaning time may be determined to be a time when the SDN node is in a low load state, for example, two or three points in the morning, according to the load condition of the SDN node.
S406, according to the automatic resource cleaning period, a step of sending a resource collection instruction to the SDN node is periodically executed.
Specifically, the central control node may set, by using a timer-like timing device, that the central control node automatically sends a resource collection instruction to the SDN node in each cleaning cycle, so that the SDN node starts to collect resources.
In the above embodiment, the automatic resource cleaning period is determined by counting the single resource cleaning duration. According to the automatic resource cleaning period, resource collection instructions are sent to the SDN node regularly, so that the whole resource cleaning action can be automatically executed, and the operation and maintenance labor cost is saved.
In one embodiment, the SDN-based resource cleaning method further includes a step of adjusting an automatic resource cleaning cycle, where the step of adjusting the automatic resource cleaning cycle specifically includes:
and S502, counting the quantity of the dirty data deleted in each resource automatic cleaning period in the counting time period.
In one embodiment, the central control node may count the determined amount of dirty data per resource auto-cleaning cycle. Further, the amount of dirty data determined in each resource automatic cleaning cycle in the statistical time period is obtained.
In one embodiment, the amount of the dirty data deleted by the central control node is reported to the SDN node when the SDN node deletes the dirty data successfully. Further, the central control node may count the number of dirty data deleted in each resource automatic cleaning cycle within a statistical time period.
And S504, determining the change trend of the quantity of the dirty data according to the counted quantity of the dirty data.
In one embodiment, the central control node may plot the statistics as a function of the number of dirty data, based on the number of dirty data for the statistics. And determining the change trend of the amount of the dirty data according to the fitted function.
In one embodiment, the central control node can determine the dirty data quantity change trend according to the difference of the quantity of the dirty data deleted in the adjacent resource automatic cleaning period.
And S506, adjusting the automatic resource cleaning period according to the change trend of the amount of the dirty data.
Specifically, the central control node can correspondingly adjust the automatic resource cleaning period according to the change trend of the dirty data quantity. For example, when the change trend of the amount of the dirty data is an ascending trend, the duration of the automatic resource cleaning period is reduced, so that the resource cleaning is more frequent; and when the change trend of the amount of the dirty data is a descending trend, the duration of the automatic resource cleaning period is prolonged, and the frequency of resource cleaning is reduced.
For example, when the automatic resource cleaning period is 24h and the automatic resource cleaning time is 2 or 3 am, the automatic resource cleaning period may be adjusted according to actual conditions, such as 48h, as the number of times of resource cleaning increases and then the dirty data to be cleaned decreases.
In the above embodiment, in the statistical time period, the number of the dirty data deleted in each resource automatic cleaning cycle is counted, and the resource automatic cleaning cycle is correspondingly adjusted according to the variation trend of the number of the dirty data. Therefore, the frequency of resource cleaning is matched with the condition of dirty data in the SDN node, the purpose of resource cleaning can be achieved, the calculation amount of the central control node and the SDN node can be reduced, and the workload is reduced.
In one embodiment, the SDN-based resource cleaning method further includes a step of canceling the resource cleaning, where the step of canceling the resource cleaning specifically includes: acquiring a load state of an SDN node; and when the load state represents a high load state, the step of sending a resource collection instruction to the SDN node is cancelled in the current automatic resource cleaning period.
Wherein the load state is a state of resource consumption in the SDN node. The load state may be, for example, a high load state, a low load state, or an idle state. Specifically, the central control node may directly receive a self-load state fed back by the SDN node; or the central control node may obtain the load state of the SDN node from a monitoring device monitoring the SDN node. Wherein the step of obtaining the load state of the SDN node may be performed periodically. And when the load state of the SDN node represents a high load state, the step of sending a resource collection instruction to the SDN node is cancelled in the current automatic resource cleaning period.
In one embodiment, when the load state of the SDN node indicates a low load state or an idle state, the step of sending the resource collection instruction to the SDN node is performed in a current resource automatic cleaning cycle.
In the above embodiment, when the load state of the SDN node indicates a high load state, an action of sending a resource collection instruction to the SDN node is cancelled. Therefore, the step of sending the resource collection instruction to the SDN node is executed when the SDN node is in a low-load or idle state, and the step of sending the resource collection instruction to the SDN node is cancelled when the SDN node is in a high-load state, so that the computing pressure can be reduced, the resources can be saved, and the resource cleaning can be effectively realized.
Fig. 2 is a schematic flowchart of a resource cleaning method based on SDN in an embodiment. It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
As shown in fig. 6, in one embodiment, an SDN-based resource cleaning apparatus 600 is provided and includes a sending module 601, a receiving module 602, an association query module 603, and a determining module 604.
A sending module 601, configured to send a resource collection instruction to an SDN node.
A receiving module 602, configured to receive resource information fed back by an SDN node; the resource information represents resources present in the SDN node.
An association query module 603, configured to associate a control state of a query resource in a resource data table according to the received resource information; the resource data table is used for storing records for controlling resources on the SDN node.
A determining module 604 for determining dirty data in the resource according to the control status.
The sending module 601 is further configured to send a notification to delete the dirty data to the SDN node.
According to the resource cleaning device based on the SDN, the SDN node collects and reports the resources existing in the SDN node after receiving the instruction by sending the resource collection instruction to the SDN node, so that the resource information in the SDN node can be efficiently and comprehensively obtained. Control states of resources present in the SDN node are then queried by associating in a resource data table in order to determine dirty data in the SDN node. Therefore, resources existing in the SDN nodes are comprehensively associated and inquired in the resource data table, all dirty data can be efficiently and accurately determined, so that the resources can be cleaned conveniently, and the efficiency of cleaning the resources is improved.
In one embodiment, as shown in fig. 7, the SDN-based resource cleaning apparatus 600 further includes an obtaining module 605 and a recording module 606.
An obtaining module 605, configured to obtain the resource control information.
The determining module 604 is further configured to determine a resource corresponding to the resource control information.
A recording module 606, configured to record the control state of the determined resource according to the resource control information in the resource data table corresponding to the category to which the determined resource belongs.
In the above embodiment, the control state of the resource corresponding to the resource control information is recorded in the resource data table by the resource control information, and the latest control state of the resource can be recorded in real time, so that the latest and accurate control state of the resource is stored in the resource data table.
In one embodiment, the determining module 604 is further configured to determine a resource associated with the resource according to the resource association relationship recorded in the resource data table; and when the control state is the deletion state, determining the resources represented by the resource information and the associated resources as dirty data.
In the above embodiment, according to the resource association relationship recorded in the resource data table, the resource uniquely associated with the resource may be acquired. When the control state of the resource is the deletion state, the resource and the associated resource can be directly determined to be dirty data without sequentially searching and judging the associated resource, so that the calculation amount is reduced, and the determination efficiency of the dirty data is improved.
In one embodiment, the determining module 604 is further configured to determine a resource associated with the resource according to the resource association relationship recorded in the resource data table; counting the number of resources with the control state being a deletion state in the associated resources; when the counted number of resources is greater than or equal to the threshold, the resources and associated resources represented by the resource information are determined to be dirty data.
In the above embodiment, the resource associated with the resource may be acquired according to the resource association relationship recorded in the resource data table. When the number of the associated resources in which the statistical control state is the deletion state is greater than the threshold, the action of associating the control state of the search resource can be stopped, and the resources corresponding to the associated resources and all the associated resources are directly determined as dirty data, so that the calculation amount is reduced, and the determination efficiency of the dirty data is improved.
In one embodiment, as shown in fig. 8, the SDN based resource cleaning apparatus 600 further includes a statistic module 607 and an execution module 608.
A counting module 607 for counting the single resource cleaning duration; the single resource cleaning duration comprises the duration from sending the resource collection instruction to successfully deleting the dirty data.
The determining module 604 is further configured to determine an automatic resource cleaning period according to the single resource cleaning duration; the automatic resource cleaning period is longer than the single resource cleaning time.
The executing module 608 is configured to periodically execute a step of sending a resource collection instruction to the SDN node according to the automatic resource cleaning cycle.
In the above embodiment, the automatic resource cleaning period is determined by counting the single resource cleaning duration. According to the automatic resource cleaning period, resource collection instructions are sent to the SDN node regularly, so that the whole resource cleaning action can be automatically executed, and the operation and maintenance labor cost is saved.
In one embodiment, as shown in fig. 9, the SDN based resource cleaning apparatus 600 further includes an adjusting module 609.
The counting module 607 is further configured to count the amount of the dirty data deleted in each resource automatic cleaning cycle in the counting time period.
The determining module 604 is further configured to determine a dirty data amount variation trend according to the counted dirty data amount;
and the adjusting module 609 is configured to adjust an automatic resource cleaning period according to the dirty data quantity change trend.
In the above embodiment, in the statistical time period, the number of the dirty data deleted in each resource automatic cleaning cycle is counted, and the resource automatic cleaning cycle is correspondingly adjusted according to the variation trend of the number of the dirty data. Therefore, the frequency of resource cleaning is matched with the condition of dirty data in the SDN node, the purpose of resource cleaning can be achieved, the calculation amount of the central control node and the SDN node can be reduced, and the workload is reduced.
In one embodiment, as shown in fig. 10, the SDN based resource cleaning apparatus 600 further includes a cancellation module 610.
The obtaining module 605 is further configured to obtain a load status of the SDN node.
A canceling module 610, configured to cancel, when the load state indicates a high load state, a step of sending a resource collection instruction to the SDN node in a current resource automatic cleaning cycle.
In the above embodiment, when the load state of the SDN node indicates a high load state, an action of sending a resource collection instruction to the SDN node is cancelled. Therefore, the step of sending the resource collection instruction to the SDN node is executed when the SDN node is in a low-load or idle state, and the step of sending the resource collection instruction to the SDN node is cancelled when the SDN node is in a high-load state, so that the computing pressure can be reduced, the resources can be saved, and the resource cleaning can be effectively realized.
FIG. 11 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be the central control node 110 in fig. 1. As shown in fig. 11, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal or SDN node through a network connection. The computer program is executed by a processor to implement a SDN based resource cleaning method.
Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the SDN-based resource cleaning apparatus provided herein may be implemented in the form of a computer program, which is executable on a computer device as shown in fig. 11. The memory of the computer device may store various program modules constituting the SDN-based resource cleaning apparatus, such as the sending module, the receiving module, the association query module, and the determination module shown in fig. 6. The computer program constituted by the program modules causes the processor to execute the steps in the SDN-based resource cleaning method according to the embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 11 may execute step S202 through a sending module in the SDN-based resource cleaning apparatus shown in fig. 6. The computer device may perform step S204 through the receiving module. The computer device may perform step S206 by the association query module. The computer device may perform step S208 by the determination module. The computer device may perform step S210 through the transmission module.
In one embodiment, there is provided a computer device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of: sending a resource collection instruction to the SDN node; receiving resource information fed back by the SDN node; the resource information represents resources present in the SDN node; according to the received resource information, the control state of the resource is related and inquired in a resource data table; the resource data table is used for storing records for controlling resources on the SDN nodes; determining dirty data in the resource according to the control state; sending a notification to the SDN node to delete the dirty data.
In one embodiment, the computer program causes the processor to perform the further steps of: acquiring resource control information; determining resources corresponding to the resource control information; and recording the control state of the determined resource according to the resource control information in the resource data table corresponding to the category to which the determined resource belongs.
In one embodiment, the computer program causes the processor, when performing the step of determining dirty data in the resource from the control state, to perform in particular the steps of: determining resources related to the resources according to the resource association relation recorded in the resource data table; and when the control state is the deletion state, determining the resources represented by the resource information and the associated resources as dirty data.
In one embodiment, the computer program causes the processor, when performing the step of determining dirty data in the resource from the control state, to perform in particular the steps of: determining resources related to the resources according to the resource association relation recorded in the resource data table; counting the number of resources with the control state being a deletion state in the associated resources; when the counted number of resources is greater than or equal to the threshold, the resources and associated resources represented by the resource information are determined to be dirty data.
In one embodiment, the computer program causes the processor to perform the further steps of: counting the single resource cleaning time; the single resource cleaning duration comprises the duration from sending a resource collecting instruction to successfully deleting dirty data; determining an automatic resource cleaning period according to the single resource cleaning duration; the automatic resource cleaning period is longer than the single resource cleaning time; and according to the automatic resource cleaning period, regularly executing the step of sending a resource collection instruction to the SDN node.
In one embodiment, the computer program causes the processor to perform the further steps of: in the statistical time period, counting the quantity of the dirty data deleted in each resource automatic cleaning period; determining the change trend of the quantity of the dirty data according to the counted quantity of the dirty data; and adjusting the automatic resource cleaning period according to the change trend of the amount of the dirty data.
In one embodiment, the computer program causes the processor to perform the further steps of: acquiring a load state of an SDN node; and when the load state represents a high load state, the step of sending a resource collection instruction to the SDN node is cancelled in the current automatic resource cleaning period.
The computer equipment sends the resource collection instruction to the SDN node, so that the SDN node collects and reports the resources existing in the SDN node after receiving the instruction, and thus, the resource information in the SDN node can be efficiently and comprehensively obtained. Control states of resources present in the SDN node are then queried by associating in a resource data table in order to determine dirty data in the SDN node. Therefore, resources existing in the SDN nodes are comprehensively associated and inquired in the resource data table, all dirty data can be efficiently and accurately determined, so that the resources can be cleaned conveniently, and the efficiency of cleaning the resources is improved.
A computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of: sending a resource collection instruction to the SDN node; receiving resource information fed back by the SDN node; the resource information represents resources present in the SDN node; according to the received resource information, the control state of the resource is related and inquired in a resource data table; the resource data table is used for storing records for controlling resources on the SDN nodes; determining dirty data in the resource according to the control state; sending a notification to the SDN node to delete the dirty data.
In one embodiment, the computer program causes the processor to perform the further steps of: acquiring resource control information; determining resources corresponding to the resource control information; and recording the control state of the determined resource according to the resource control information in the resource data table corresponding to the category to which the determined resource belongs.
In one embodiment, the computer program causes the processor, when performing the step of determining dirty data in the resource from the control state, to perform in particular the steps of: determining resources related to the resources according to the resource association relation recorded in the resource data table; and when the control state is the deletion state, determining the resources represented by the resource information and the associated resources as dirty data.
In one embodiment, the computer program causes the processor, when performing the step of determining dirty data in the resource from the control state, to perform in particular the steps of: determining resources related to the resources according to the resource association relation recorded in the resource data table; counting the number of resources with the control state being a deletion state in the associated resources; when the counted number of resources is greater than or equal to the threshold, the resources and associated resources represented by the resource information are determined to be dirty data.
In one embodiment, the computer program causes the processor to perform the further steps of: counting the single resource cleaning time; the single resource cleaning duration comprises the duration from sending a resource collecting instruction to successfully deleting dirty data; determining an automatic resource cleaning period according to the single resource cleaning duration; the automatic resource cleaning period is longer than the single resource cleaning time; and according to the automatic resource cleaning period, regularly executing the step of sending a resource collection instruction to the SDN node.
In one embodiment, the computer program causes the processor to perform the further steps of: in the statistical time period, counting the quantity of the dirty data deleted in each resource automatic cleaning period; determining the change trend of the quantity of the dirty data according to the counted quantity of the dirty data; and adjusting the automatic resource cleaning period according to the change trend of the amount of the dirty data.
In one embodiment, the computer program causes the processor to perform the further steps of: acquiring a load state of an SDN node; and when the load state represents a high load state, the step of sending a resource collection instruction to the SDN node is cancelled in the current automatic resource cleaning period.
The computer-readable storage medium sends the resource collection instruction to the SDN node, so that the SDN node collects and reports resources existing in the SDN node after receiving the instruction, and thus, resource information in the SDN node can be efficiently and comprehensively obtained. Control states of resources present in the SDN node are then queried by associating in a resource data table in order to determine dirty data in the SDN node. Therefore, resources existing in the SDN nodes are comprehensively associated and inquired in the resource data table, all dirty data can be efficiently and accurately determined, so that the resources can be cleaned conveniently, and the efficiency of cleaning the resources is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (14)

1. A method of SDN-based resource cleanup, the method comprising:
sending a resource collection instruction to the SDN node;
receiving resource information fed back by the SDN node; the resource information represents resources present in the SDN node;
according to the received resource information, the control state of the resource is related and inquired in a resource data table; the resource data table is used for storing records for controlling resources on the SDN node;
determining dirty data in the resource based on the control state;
sending a notification to the SDN node to delete the dirty data;
wherein, the recording step of the control state of the resource in the resource data table comprises:
acquiring resource control information and determining a resource corresponding to the resource control information;
and recording the control state of the determined resource according to the resource control information in a resource data table corresponding to the category to which the determined resource belongs.
2. The method of claim 1, wherein determining dirty data in the resource based on the control state comprises:
determining resources related to the resources according to the resource association relation recorded in the resource data table;
and when the control state is a deletion state, determining the resources represented by the resource information and the associated resources as dirty data.
3. The method of claim 1, wherein determining dirty data in the resource based on the control state comprises:
determining resources related to the resources according to the resource association relation recorded in the resource data table;
counting the number of resources with the control state being a deletion state in the associated resources;
when the counted number of resources is greater than or equal to a threshold, determining the resources represented by the resource information and the associated resources as dirty data.
4. The method of any of claims 1 to 3, further comprising:
counting the single resource cleaning time; the single resource cleaning duration comprises a duration from sending the resource collecting instruction to successfully deleting the dirty data;
determining an automatic resource cleaning period according to the single resource cleaning duration; the automatic resource cleaning period is longer than the single resource cleaning duration;
and according to the automatic resource cleaning period, periodically executing the step of sending a resource collection instruction to the SDN node.
5. The method of claim 4, further comprising:
in the statistical time period, counting the quantity of the dirty data deleted in each resource automatic cleaning period;
determining the change trend of the quantity of the dirty data according to the counted quantity of the dirty data;
and adjusting the automatic resource cleaning period according to the dirty data quantity change trend.
6. The method of claim 4, further comprising:
acquiring a load state of the SDN node;
when the load state represents a high load state, then
And in the current automatic resource cleaning period, canceling the step of sending the resource collection instruction to the SDN node.
7. An SDN-based resource cleaning apparatus, the apparatus comprising:
the sending module is used for sending a resource collecting instruction to the SDN node;
a receiving module, configured to receive resource information fed back by the SDN node; the resource information represents resources present in the SDN node;
the association query module is used for associating and querying the control state of the resource in a resource data table according to the received resource information; the resource data table is used for storing records for controlling resources on the SDN node;
a determining module, configured to determine dirty data in the resource according to the control state;
the sending module is further configured to send a notification to the SDN node to delete the dirty data;
wherein, the recording step of the control state of the resource in the resource data table comprises:
acquiring resource control information and determining a resource corresponding to the resource control information;
and recording the control state of the determined resource according to the resource control information in a resource data table corresponding to the category to which the determined resource belongs.
8. The apparatus according to claim 7, wherein the determining module is further configured to determine the resource associated with the resource according to the resource association relationship recorded in the resource data table; and when the control state is a deletion state, determining the resources represented by the resource information and the associated resources as dirty data.
9. The apparatus according to claim 7, wherein the determining module is further configured to determine the resource associated with the resource according to the resource association relationship recorded in the resource data table; counting the number of resources with the control state being a deletion state in the associated resources; when the counted number of resources is greater than or equal to a threshold, determining the resources represented by the resource information and the associated resources as dirty data.
10. The apparatus of any one of claims 7 to 9, further comprising:
the counting module is used for counting the single resource cleaning time; the single resource cleaning duration comprises a duration from sending the resource collecting instruction to successfully deleting the dirty data;
the determining module is further used for determining an automatic resource cleaning period according to the single resource cleaning duration; the automatic resource cleaning period is longer than the single resource cleaning duration;
and the execution module is used for periodically executing the step of sending the resource collection instruction to the SDN node according to the automatic resource cleaning period.
11. The apparatus of claim 10, further comprising:
the statistical module is also used for counting the quantity of the dirty data deleted in each resource automatic cleaning period in a statistical time period;
the determining module is further used for determining the change trend of the quantity of the dirty data according to the counted quantity of the dirty data;
and the adjusting module is used for adjusting the automatic resource cleaning period according to the dirty data quantity change trend.
12. The apparatus of claim 10, further comprising:
the obtaining module is further configured to obtain a load state of the SDN node;
a cancellation module, configured to cancel, when the load state indicates a high load state, the step of sending the resource collection instruction to the SDN node in a current resource automatic cleaning cycle.
13. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 6.
14. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 6.
CN201711292149.1A 2017-12-08 2017-12-08 SDN-based resource cleaning method and device, storage medium and computer equipment Active CN108255937B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711292149.1A CN108255937B (en) 2017-12-08 2017-12-08 SDN-based resource cleaning method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711292149.1A CN108255937B (en) 2017-12-08 2017-12-08 SDN-based resource cleaning method and device, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN108255937A CN108255937A (en) 2018-07-06
CN108255937B true CN108255937B (en) 2020-09-29

Family

ID=62722395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711292149.1A Active CN108255937B (en) 2017-12-08 2017-12-08 SDN-based resource cleaning method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN108255937B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106850985B (en) 2017-02-04 2019-07-05 Oppo广东移动通信有限公司 Control method, device and the mobile terminal of mobile terminal sensor
CN113342758B (en) * 2021-08-06 2021-11-19 联想凌拓科技有限公司 Metadata management method, device, equipment and medium of file system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135539A (en) * 2014-08-15 2014-11-05 华为技术有限公司 Data storage method, SDN controller and distributed network storage system
CN104199913A (en) * 2014-08-28 2014-12-10 北京金山安全软件有限公司 Terminal resource cleaning method and device and terminal
CN104901903A (en) * 2015-04-07 2015-09-09 北京邮电大学 Multi-domain resource processing method and system for software defined network
CN106326308A (en) * 2015-07-03 2017-01-11 华中科技大学 Intranet duplicated data deletion method and system based on SDN (Software Defined Network)
CN106341252A (en) * 2015-07-10 2017-01-18 中兴通讯股份有限公司 Resource management method and device and control terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170056879A (en) * 2015-11-16 2017-05-24 한국전자통신연구원 Multi-orchestrators of SDN(Software Defined Networking)

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135539A (en) * 2014-08-15 2014-11-05 华为技术有限公司 Data storage method, SDN controller and distributed network storage system
CN104199913A (en) * 2014-08-28 2014-12-10 北京金山安全软件有限公司 Terminal resource cleaning method and device and terminal
CN104901903A (en) * 2015-04-07 2015-09-09 北京邮电大学 Multi-domain resource processing method and system for software defined network
CN106326308A (en) * 2015-07-03 2017-01-11 华中科技大学 Intranet duplicated data deletion method and system based on SDN (Software Defined Network)
CN106341252A (en) * 2015-07-10 2017-01-18 中兴通讯股份有限公司 Resource management method and device and control terminal

Also Published As

Publication number Publication date
CN108255937A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
CN106980636B (en) Policy data processing method and device
CN107688496B (en) Task distributed processing method and device, storage medium and server
EP3297213B1 (en) Method and apparatus for identifying application information in network traffic
CN110113224B (en) Capacity monitoring method and device, computer equipment and storage medium
CN108897638B (en) Data backup method and device, computer equipment and storage medium
CN111143133B (en) Virtual machine backup method and backup virtual machine recovery method
US11119911B2 (en) Garbage collection method and device
CN106230997B (en) Resource scheduling method and device
US9792231B1 (en) Computer system for managing I/O metric information by identifying one or more outliers and comparing set of aggregated I/O metrics
CN111262726B (en) Configuration information updating method and device and computer readable storage medium
CN110888889A (en) Data information updating method, device and equipment
CN102385536B (en) Method and system for realization of parallel computing
CN108255937B (en) SDN-based resource cleaning method and device, storage medium and computer equipment
CN110489317B (en) Cloud system task operation fault diagnosis method and system based on workflow
CN111782134A (en) Data processing method, device, system and computer readable storage medium
CN108763046B (en) Thread running monitoring method, device, computer equipment and storage medium
CN109474470A (en) One kind is from monitoring method and device
CN111694793A (en) Log storage method and device and log query method and device
CN110659272A (en) Data cleaning method and system
CN105893150B (en) Interface calling frequency control method and device and interface calling request processing method and device
CN113656178A (en) Data processing method, device, equipment and readable storage medium
CN106815318B (en) Clustering method and system for time sequence database
CN103226572A (en) Expandable monitoring method and monitoring system based on data compression
CN110955460A (en) Service process starting method and device, electronic equipment and storage medium
CN110825732A (en) Data query method and device, computer equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200201

Address after: 200120 floor 15, 1333 Lujiazui Ring Road, free trade Experimental Zone, Pudong New Area, Shanghai

Applicant after: Weikun (Shanghai) Technology Service Co., Ltd

Address before: 200120 13 floor, 1333 Lujiazui Road, Pudong New Area free trade pilot area, Shanghai.

Applicant before: Lujiazui Shanghai international financial assets market Limited by Share Ltd

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant