CN113065093B - Method and device for determining link to be repaired - Google Patents

Method and device for determining link to be repaired Download PDF

Info

Publication number
CN113065093B
CN113065093B CN202110275642.2A CN202110275642A CN113065093B CN 113065093 B CN113065093 B CN 113065093B CN 202110275642 A CN202110275642 A CN 202110275642A CN 113065093 B CN113065093 B CN 113065093B
Authority
CN
China
Prior art keywords
current
link
function
optimal solution
vector
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
CN202110275642.2A
Other languages
Chinese (zh)
Other versions
CN113065093A (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.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
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 Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN202110275642.2A priority Critical patent/CN113065093B/en
Publication of CN113065093A publication Critical patent/CN113065093A/en
Application granted granted Critical
Publication of CN113065093B publication Critical patent/CN113065093B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a method and a device for determining a link to be repaired, which are used for calculating an obtained current optimal solution of a target function as a current optimal solution of a target; calculating a first function value of a current objective function corresponding to the current target optimal solution and a maximum value of the current objective function based on the current target optimal solution to serve as a second function value; if the first function value and the second function value meet the preset convergence condition, determining the current link to be repaired based on the current target optimal solution; and if the first function value and the second function value do not meet the preset convergence condition, determining a current data discarding decision vector, a current flow distribution vector and a current node actual calculation vector based on the current target optimal solution so as to update the current target function, and executing the step of calculating the optimal solution of the current target function as the current target optimal solution. Based on the processing, the success rate of processing the computing task by the target edge computing network can be improved.

Description

Method and device for determining link to be repaired
Technical Field
The present invention relates to the field of computer network technologies, and in particular, to a method and an apparatus for determining a link to be repaired.
Background
The edge computing network may include a plurality of edge nodes, each for processing data assigned to the edge node. Every two connected edge nodes in the edge computing network form a link. Because the data that can be processed by an edge node is limited, for each edge node, when the edge node receives more data, a part of data (which may be referred to as to-be-processed data) may be sent to another edge node in a link (which may be referred to as a target link) to which the edge node belongs, and then, the another edge node in the target link processes the to-be-processed data.
If an edge node in a link (which may be referred to as a damaged link) is maliciously attacked, or hardware of the edge node is damaged, or a line connecting two edge nodes in the damaged link is damaged, the edge node in the link cannot complete data processing.
Therefore, damaged links in the edge computing network need to be repaired in time, and since repair resources (e.g., repair personnel, replaceable devices, etc.) are limited, it is necessary to determine a damaged link (which may be referred to as a link to be repaired) that needs to be repaired currently from among the damaged links and repair the link to be repaired, so that an edge node in the link to be repaired can process a computing task.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for determining a link to be repaired, so as to avoid that more data cannot be processed, and further improve the success rate of processing a computing task by a target edge computing network. The specific technical scheme is as follows:
in a first aspect, to achieve the above object, an embodiment of the present invention provides a method for determining a link to be repaired, where the method includes:
acquiring a current objective function; the current objective function represents the minimum value of the total resources required by each damaged link in the repair target edge calculation network based on the link repair decision vector, the data discard decision vector, the flow distribution vector and the node actual calculation vector; the arguments of the current objective function include a link repair decision vector; first elements in the link repair decision vector correspond to the damaged links one by one, and one first element represents a processing mode of the damaged link corresponding to the first element, wherein the processing mode is repair or non-repair; second elements in the data discarding decision vector correspond to edge nodes in the target edge computing network one to one, one second element represents a data amount which needs to be discarded currently by the edge node corresponding to the second element, third elements in the flow allocation vector correspond to links in the target edge computing network one to one, one third element represents a total data amount which can be migrated currently by each edge node in the link corresponding to the third element, fourth elements in the node actual computation vector correspond to the edge nodes in the target edge computing network one to one, and one fourth element represents a data amount which can be processed currently by the edge node in data locally stored by the edge node corresponding to the fourth element;
calculating the optimal solution of the current target function as the current target optimal solution;
calculating a function value of a current objective function corresponding to the current target optimal solution based on the current target optimal solution to serve as a first function value and a maximum value of the current objective function to serve as a second function value;
if the first function value and the second function value meet a preset convergence condition, determining a current link to be repaired based on a current target optimal solution;
and if the first function value and the second function value do not meet the preset convergence condition, determining a current data discarding decision vector, a current flow distribution vector and a current node actual calculation quantity vector based on a current target optimal solution so as to update the current target function, and returning to execute the step of calculating the optimal solution of the current target function as the current target optimal solution.
Optionally, the current objective function is:
Figure BDA0002976518330000021
Figure BDA0002976518330000022
represents the current objective function, mine,ηRepresenting a minimum function with e and eta as arguments, e representing the current link repair decision vector, and eta representing the current link repair decision vectorAn optimal cut plane of the objective function, the current optimal cut plane of the objective function being determined based on the current data discard decision vector, the current flow allocation vector and the current node actual computation vector, E0A set representing the composition of damaged links in the target edge computing network, cijRepresents the resources required for repairing the link ij, the link ij is the link composed of the ith edge node and the jth edge node, eijRepairing an element, e, corresponding to the link ij in the decision vector for the current linkijThe processing mode of the link ij is shown.
Optionally, the calculating, based on the current target optimal solution, a function value of a current objective function corresponding to the current target optimal solution as a first function value and a maximum value of the current objective function as a second function value includes:
calculating a function value of a current objective function corresponding to the current target optimal solution to serve as a first function value;
calculating the optimal solution of the subfunction of the current objective function based on the current optimal solution of the objective and a network maximum flow problem solving algorithm; wherein the sub-function is:
mind,f,pθ=Σi∈Naidi
wherein the content of the first and second substances,
Figure BDA0002976518330000031
Figure BDA0002976518330000032
mind,d,pθ represents the sub-function, mind,d,pRepresenting a minimum function with d, f and p as independent variables, d representing a current data discarding decision vector, f representing a current flow allocation vector, p representing a current node actual calculation vector, N representing a set of edge nodes in the target edge calculation network, aiMeans that the ith edge node discards per unitCost of data of size, diDiscarding the element in the decision vector corresponding to the ith edge node for the current data, diIndicating the amount of data that the ith edge node currently needs to discard,
Figure BDA0002976518330000033
indicating the link capacity, e, of the link ijijFor the element, e, corresponding to the link ij in the current target optimal solutionijIndicates the processing mode of the link ij, fijThe current flow is assigned the element, f, in the vector corresponding to link ijijRepresenting the total data volume that each edge node in the link ij can currently migrate, wherein the link ij is a link composed of the ith edge node and the jth edge node, and piFor the element, p, in the current node actual computation quantity vector corresponding to the ith edge nodeiRepresenting the data quantity which can be currently processed by the ith edge node in the data locally stored by the ith edge node, fihThe current flow is assigned the element, f, in the vector corresponding to link ihihRepresenting the total data volume that each edge node in the link ih can be currently migrated, the link ih is a link composed of the ith edge node and the h-th edge node, E1A set representing the composition of undamaged links in the target edge computing network, riRepresenting the amount of data stored locally by the ith edge node;
calculating a function value of the sub-function corresponding to the optimal solution of the sub-function as a third function value;
calculating the maximum value of the current objective function as a second function value based on the third function value, the current target optimal solution, the last determined maximum value of the current objective function and a first preset formula; wherein the first preset formula is as follows:
Figure BDA0002976518330000041
Figure BDA0002976518330000042
the value of the second function is represented,
Figure BDA0002976518330000043
representing the maximum value of the last calculated current objective function, cijIndicating the resources required to repair link ij, eijFor the element, e, corresponding to the link ij in the current target optimal solutionijRepresents the processing mode of the link ij, and theta represents the third function value.
Optionally, if the first function value and the second function value do not satisfy the preset convergence condition, based on the current target optimal solution, determining a current data discarding decision vector, a current flow allocation vector, and a current node actual computation vector, so as to update the current target function, and returning to perform the computation of the current optimal solution of the target function, where the step of determining the current optimal solution of the target function as the current target optimal solution includes:
if the first function value and the second function value do not meet the preset convergence condition, updating the optimal cutting plane of the current target function based on the current target optimal solution and the third function value so as to update the current target function, and returning to execute the step of calculating the optimal solution of the current target function as the current target optimal solution; wherein, the updated optimal cutting plane is as follows:
Figure BDA0002976518330000044
eta' represents the updated optimal cutting plane, theta represents the third function value, E0Represents a set of damaged links, μ, in the target edge computing networkijRepresenting the degree of influence of the link capacity of the link ij on the function value of the sub-function,
Figure BDA0002976518330000051
represents link capacity, e 'of link ij'ijElement, e 'corresponding to link ij in the link repair decision vector determined for the next time needed'ijProcessing mode for representing link ij,eijFor the element, e, corresponding to the link ij in the current target optimal solutionijThe processing mode of the link ij is shown.
Optionally, the preset convergence condition is:
Figure BDA0002976518330000052
Figure BDA0002976518330000053
the value of the second function is represented,
Figure BDA0002976518330000054
and representing the first function value, and epsilon represents a preset threshold value.
In a second aspect, to achieve the above object, an embodiment of the present invention provides an apparatus for determining a link to be repaired, where the apparatus includes:
the acquisition module is used for acquiring a current target function; the current objective function represents the minimum value of the total resources required by each damaged link in the repair target edge calculation network based on the link repair decision vector, the data discard decision vector, the flow distribution vector and the node actual calculation vector; the arguments of the current objective function include a link repair decision vector; first elements in the link repair decision vector correspond to the damaged links one by one, and one first element represents a processing mode of the damaged link corresponding to the first element, wherein the processing mode is repair or non-repair; second elements in the data discarding decision vector correspond to edge nodes in the target edge computing network one to one, one second element represents a data amount which needs to be discarded currently by the edge node corresponding to the second element, third elements in the flow allocation vector correspond to links in the target edge computing network one to one, one third element represents a total data amount which can be migrated currently by each edge node in the link corresponding to the third element, fourth elements in the node actual computation vector correspond to the edge nodes in the target edge computing network one to one, and one fourth element represents a data amount which can be processed currently by the edge node in data locally stored by the edge node corresponding to the fourth element;
the first determining module is used for calculating the optimal solution of the current objective function as the current optimal solution of the objective;
a second determining module, configured to calculate, based on the current target optimal solution, a function value of a current target function corresponding to the current target optimal solution, as a first function value, and a maximum value of the current target function, as a second function value;
a third determining module, configured to determine, based on a current target optimal solution, a current link to be repaired if the first function value and the second function value satisfy a preset convergence condition;
and the updating module is used for determining a current data discarding decision vector, a current flow distribution vector and a current node actual calculation vector based on a current target optimal solution if the first function value and the second function value do not meet the preset convergence condition so as to update the current target function, and returning to execute the step of calculating the optimal solution of the current target function as the current target optimal solution.
Optionally, the current objective function is:
Figure BDA0002976518330000061
Figure BDA0002976518330000062
represents the current objective function, mine,ηRepresenting a minimum function with E and eta as independent variables, E representing a current link repair decision vector, eta representing an optimal cut plane of a current objective function, the optimal cut plane of the current objective function being determined based on a current data discard decision vector, a current flow allocation vector and a current node actual computation vector, E0Representing a damaged link in the target edge computing networkSet of constituents, cijRepresents the resources required for repairing the link ij, the link ij is the link composed of the ith edge node and the jth edge node, eijRepairing the element, e, corresponding to the link ij in the decision vector for the current linkijThe processing mode of the link ij is shown.
Optionally, the second determining module is specifically configured to calculate a function value of a current objective function corresponding to the current target optimal solution, as the first function value;
calculating the optimal solution of the subfunction of the current objective function based on the current optimal solution of the objective and a network maximum flow problem solving algorithm; wherein the sub-function is:
mind,f,pθ=Σi∈Naidi
wherein the content of the first and second substances,
Figure BDA0002976518330000063
Figure BDA0002976518330000071
mind,d,pθ represents the sub-function, mind,d,pRepresenting a minimum function with d, f and p as independent variables, d representing a current data discarding decision vector, f representing a current flow allocation vector, p representing a current node actual calculation vector, N representing a set of edge nodes in the target edge calculation network, aiRepresents the cost of the ith edge node discarding data per unit size, diDiscarding the element in the decision vector corresponding to the ith edge node for the current data, diIndicating the amount of data that the ith edge node currently needs to discard,
Figure BDA0002976518330000072
indicating the link capacity, e, of the link ijijFor the element, e, corresponding to the link ij in the current target optimal solutionijIndicates the processing mode of the link ij, fijThe current flow is assigned the element, f, in the vector corresponding to link ijijRepresenting the total data volume that each edge node in the link ij can currently migrate, wherein the link ij is a link composed of the ith edge node and the jth edge node, and piFor the element, p, in the vector of actual calculated quantities of the current node corresponding to the ith edge nodeiRepresents the data amount that the ith edge node can process currently in the data locally stored by the ith edge node, fihThe current flow is assigned the element, f, in the vector corresponding to link ihihRepresenting the total data volume that each edge node in the link ih can be currently migrated, the link ih is a link composed of the ith edge node and the h-th edge node, E1A set representing a composition of intact links in said target edge computing network, riRepresenting the amount of data stored locally by the ith edge node;
calculating a function value of the sub-function corresponding to the optimal solution of the sub-function as a third function value;
calculating the maximum value of the current target function as a second function value based on the third function value, the current target optimal solution, the last determined maximum value of the current target function and a first preset formula; wherein the first preset formula is as follows:
Figure BDA0002976518330000073
Figure BDA0002976518330000074
the value of the second function is represented,
Figure BDA0002976518330000075
representing the maximum value of the last calculated current objective function, cijIndicating the resources required to repair link ij, eijFor the element, e, corresponding to the link ij in the current target optimal solutionijRepresents the processing mode of the link ij, and theta represents the third function value.
Optionally, the updating module is specifically configured to update the optimal cutting plane of the current objective function based on the current target optimal solution and the third function value if the first function value and the second function value do not satisfy the preset convergence condition, so as to update the current objective function, and return to perform the step of calculating the optimal solution of the current objective function as the current target optimal solution; wherein, the updated optimal cutting plane is as follows:
Figure BDA0002976518330000081
eta' represents the updated optimal cutting plane, theta represents the third function value, E0Represents a set of damaged links, μ, in the target edge computing networkijRepresenting the degree of influence of the link capacity of the link ij on the function value of the sub-function,
Figure BDA0002976518330000082
represents link capacity, e 'of link ij'ijElement, e 'corresponding to link ij in the link repair decision vector determined for the next time needed'ijIndicates the processing mode of the link ij, eijFor the element, e, corresponding to the link ij in the current target optimal solutionijThe processing mode of the link ij is shown.
Optionally, the preset convergence condition is:
Figure BDA0002976518330000083
Figure BDA0002976518330000084
the second function value is represented as a function of the first function value,
Figure BDA0002976518330000085
and representing the first function value, and epsilon represents a preset threshold value.
The embodiment of the invention also provides electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for determining the link to be repaired when the program stored in the memory is executed.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method for determining a link to be repaired according to any of the above-mentioned steps is implemented.
An embodiment of the present invention further provides a computer program product including instructions, which when run on a computer, causes the computer to execute any one of the above methods for determining a link to be repaired.
The method for determining the link to be repaired, provided by the embodiment of the invention, comprises the steps of obtaining a current objective function; calculating the optimal solution of the current target function as the current target optimal solution; calculating a function value of a current objective function corresponding to the current target optimal solution based on the current target optimal solution to serve as a first function value, and calculating a maximum value of the current objective function to serve as a second function value; if the first function value and the second function value meet the preset convergence condition, determining the current link to be repaired based on the current target optimal solution; and if the first function value and the second function value do not meet the preset convergence condition, determining the current data discarding decision vector, the current flow distribution vector and the current node actual calculation vector based on the current target optimal solution so as to update the current target function, and returning to execute the step of calculating the optimal solution of the current target function as the current target optimal solution.
Based on the above processing, the objective function represents the minimum value of the total resources required to repair each damaged link in the target edge computation network, which is determined based on the link repair decision vector, the data drop decision vector, the flow allocation vector, and the node actual computation amount vector. Because the data discarding decision vector, the flow distribution vector and the node actual calculation vector can represent the current unprocessed data volume of each edge node, the optimal solution of the objective function is determined based on the current unprocessed data volume of each edge node, that is, the current link to be repaired is determined based on the current unprocessed data volume of each edge node, so that the problem that more data cannot be processed can be avoided, and the success rate of processing calculation tasks by the target edge calculation network can be improved.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a flowchart of a method for determining a link to be repaired according to an embodiment of the present invention;
fig. 2 is a flowchart of another method for determining a link to be repaired according to an embodiment of the present invention;
fig. 3 is a flowchart of another method for determining a link to be repaired according to an embodiment of the present invention;
fig. 4 is a flowchart of another method for determining a link to be repaired according to an embodiment of the present invention;
fig. 5 is a structural diagram of a device for determining a link to be repaired according to an embodiment of the present invention;
fig. 6 is a structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived from the embodiments given herein by one of ordinary skill in the art, are within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a method for determining a link to be repaired according to an embodiment of the present invention, where the method is applied to an electronic device, and the method may include the following steps:
s101: and acquiring a current objective function.
And the current objective function represents the minimum value of the total resources required for repairing each damaged link in the target edge computing network, which is determined based on the link repairing decision vector, the data discarding decision vector, the flow distribution vector and the node actual computation vector. The arguments of the current objective function include the link repair decision vector. First elements in the link repair decision vector correspond to all damaged links one by one, and one first element represents a processing mode of the damaged link corresponding to the first element, wherein the processing mode is repair or non-repair; second elements in the data discarding decision vector correspond to edge nodes in a target edge computing network one to one, one second element represents the data volume which needs to be discarded at present by the edge node corresponding to the second element, third elements in the flow distribution vector correspond to links in the target edge computing network one to one, one third element represents the total data volume which can be migrated by each edge node in the link corresponding to the third element, fourth elements in the node actual computing volume vector correspond to the edge nodes in the target edge computing network one to one, and one fourth element represents the data volume which can be processed at present by the edge node in the data locally stored by the edge node corresponding to the fourth element.
S102: and calculating the optimal solution of the current objective function as the current target optimal solution.
S103: and calculating a function value of the current objective function corresponding to the current target optimal solution as a first function value and a maximum value of the current objective function as a second function value based on the current target optimal solution.
S104: and if the first function value and the second function value meet the preset convergence condition, determining the current link to be repaired based on the current target optimal solution.
S105: and if the first function value and the second function value do not meet the preset convergence condition, determining the current data discarding decision vector, the current flow allocation vector and the current node actual calculation vector based on the current target optimal solution so as to update the current target function, and returning to execute the step S102.
Based on the determination method for the link to be repaired provided by the embodiment of the invention, the objective function represents the minimum value of the total resources required by each damaged link in the calculation network for repairing the target edge determined based on the link repair decision vector, the data discard decision vector, the flow distribution vector and the node actual calculation vector. Because the data discarding decision vector, the flow distribution vector and the node actual calculation vector can represent the current unprocessed data volume of each edge node, the optimal solution of the objective function is determined based on the current unprocessed data volume of each edge node, that is, the current link to be repaired is determined based on the current unprocessed data volume of each edge node, so that the problem that more data cannot be processed can be avoided, and the success rate of processing calculation tasks by the target edge calculation network can be improved.
The electronic device may be connected to each edge node in the target edge computing network, and further, the electronic device may obtain, from each edge node, a current unprocessed data volume of the edge node, where the current unprocessed data volume of the edge node is also a data volume locally stored by the edge node; or, the electronic device may also have no connection relationship with each edge node in the target edge computing network, and the user may obtain the data amount locally stored by each edge node, and store the obtained data amount locally stored by each edge node in the electronic device.
Furthermore, the electronic device may execute the method for determining a link to be repaired provided in the embodiment of the present invention, and determine the current link to be repaired based on the data amount locally stored in each edge node.
In step S101, the target edge computing network may be an edge computing network where a damaged link currently exists.
Referring to fig. 2, fig. 2 is a block diagram of a target edge computing network according to an embodiment of the present invention. The target edge computing network includes a plurality of edge nodes, and this embodiment takes as an example that the target edge computing network includes 6 edge nodes, where the 6 edge nodes include: edge node 1, edge node 2, edge node 3, edge node 4, edge node 5, and edge node 6.
In fig. 2, a link composed of edge nodes connected by a dotted line represents a damaged link, and a link composed of edge nodes connected by a solid line represents an undamaged link. The damaged link includes: a link composed of edge node 1 and edge node 2 (which may be referred to as link 12), a link composed of edge node 1 and edge node 3 (which may be referred to as link 13), and a link composed of edge node 2 and edge node 3 (which may be referred to as link 23).
The method provided by the embodiment of the invention can determine the current link to be repaired from the link 12, the link 13 and the link 23.
When the current link to be repaired is determined, if the current link to be repaired is determined to be more, after the current link to be repaired is repaired, the computing capability of the edge computing network is better recovered, and correspondingly, more resources are needed for repairing the current link to be repaired. If the determined current link to be repaired is less, the resources needed for repairing the current link to be repaired are less, but the computing capability of the edge computing network is still not high, more data can be discarded because the edge node cannot process the data, and further the edge computing network cannot complete the computing task.
Therefore, the total resources required for repairing each damaged link in the target edge computing network, the current unprocessed data volume of each edge node in the target edge computing network, that is, the data volume locally stored by each edge node in the target edge computing network, need to be considered comprehensively. The corresponding relationship between the total resources required for repairing each damaged link in the target edge computing network and the data amount locally stored by each edge node in the target edge computing network can be expressed as the following formula (1):
Figure BDA0002976518330000121
wherein the content of the first and second substances,
Figure BDA0002976518330000122
Figure BDA0002976518330000123
represents the total resources, min, required to repair each damaged link in the target edge computing networke,d,f,pRepresenting a minimum function with e, d, f and p as arguments, e representing the current link repair decision vector, d representing the current data drop decision vector, f representing the current flow allocation vector, p representing the current node actual computation vector, cijIndicating the resources required for repairing the link ij, the link ij is a link composed of the ith edge node and the jth edge node, eijRepairing the element, e, corresponding to the link ij in the decision vector for the current linkijIndicates the processing mode of the link ij, aiRepresents the cost of the ith edge node discarding data per unit size, diDiscarding the element in the decision vector corresponding to the ith edge node for the current data, diRepresenting the amount of data discarded by the ith edge node, piFor the element, p, in the current node actual computation quantity vector corresponding to the ith edge nodeiRepresenting the data quantity which can be currently processed by the ith edge node in the data locally stored by the ith edge node, fijThe current flow is assigned the element, f, in the vector corresponding to link ijijRepresents the total data volume f that each edge node in the link ij can currently migrateihThe current flow is assigned the element, f, in the vector corresponding to link ihihRepresents the total data volume that each edge node in the link ih can currently migrateThe link ih is a link composed of the ith edge node and the h edge node, E1Set representing the composition of undamaged links in a target edge computing network, riRepresenting the amount of data stored locally at the ith edge node.
The data amount stored locally by the ith edge node, that is, the data amount currently not processed by the ith edge node. Data amount r locally stored by ith edge nodeiThe method comprises the following steps: the data amount which is received and unprocessed by the ith edge node and the data amount which is received by the ith edge node in the process of repairing the link which the ith edge node belongs to.
Resources c required for repairing link ijijMay be determined according to the damage degree of the link ij (e.g., the damage degree of an edge node in the link ij, the damage degree of a line connecting the ith edge node and the jth edge node, etc.), and the greater the damage degree of the link ij is, the greater the resource c required for repairing the link ij isijThe larger. Cost a of the ith edge node discarding data per unit sizeiThe economic loss per unit size of data can be discarded for the ith edge node.
The amount d of data that the ith edge node needs to discard currentlyiComprises the following steps: data amount r locally stored by ith edge nodeiSubtracting the data amount p which can be currently processed by the ith edge nodeiThen subtract the amount of data that the ith edge node can currently migrate (i.e. the amount of data that can be migrated by the ith edge node)
Figure BDA0002976518330000131
) The resulting difference.
The data volume p which can be currently processed by the ith edge node in the data locally stored by the ith edge nodeiThe following conditions are satisfied:
Figure BDA0002976518330000132
Figure BDA0002976518330000141
indicating the maximum amount of data that can be processed by the ith edge node,
Figure BDA0002976518330000142
the maximum data volume that can be processed by an edge node is larger as the rotation speed of the CPU (Central Processing Unit) of the ith edge node is larger.
When f isij>When 0, it represents that the data is migrated from the ith edge node to the jth edge node, when fij<When 0, it means that the data is migrated from the jth edge node to the ith edge node. Total data amount f that each edge node in link ij can currently migrateijThe following conditions are satisfied:
Figure BDA0002976518330000143
Figure BDA0002976518330000144
the link capacity of the link ij is represented, and the link capacity of the link ij represents the maximum data volume that can be transmitted by the link ij in a preset time period. The preset time period may be set by a technician based on experience.
When the link ij is a damaged link, the total data amount f that each edge node in the link ij can currently migrateijThe following conditions are satisfied:
Figure BDA0002976518330000145
eijrepairing the element, e, corresponding to the link ij in the decision vector for the current linkijThe processing mode of the link ij is shown.
When e isijWhen the value is a first value, the processing mode of the link ij is represented as repairing, and when e isijWhen the value is the second value, it indicates that the link ij is not repaired. The first value and the second value may both be set empirically by the skilled person, the first value beingThe value is different from the second value. For example, when the first value is 1 and the second value is 0, eijWhen the number is 1, the link ij is treated as repair, and when e isijWhen 0, it indicates that the link ij is not repaired.
Since the calculation amount of the optimal solution of the function shown in the formula (1) is large, in order to improve the calculation speed and improve the efficiency of determining the link to be repaired, the function shown in the formula (1) can be decomposed based on a Benders (planning problem decomposition of complex variables) algorithm to obtain the current objective function and the current sub-function of the objective function. Subsequently, the current link to be repaired may be determined based on the current objective function and the subfunction of the current objective function.
The current objective function may be:
Figure BDA0002976518330000151
Figure BDA0002976518330000152
represents the current objective function, mine,ηRepresenting a minimum function with E and eta as independent variables, E representing a current link repair decision vector, eta representing an optimal cut plane of a current objective function, the optimal cut plane of the current objective function being determined based on a current data discard decision vector, a current flow allocation vector and a current node actual calculation vector, E0Representing a set of broken links in the target edge computing network, cijIndicating the resources required for repairing the link ij, the link ij is a link composed of the ith edge node and the jth edge node, eijRepairing the element, e, corresponding to the link ij in the decision vector for the current linkijThe processing mode of the link ij is shown.
In step S102, the electronic device may obtain the last determined optimal solution of the current objective function, and calculate the optimal solution of the sub-function of the current objective function based on the last determined optimal solution of the current objective function and the network maximum flow problem solving algorithm. The specific way for the electronic device to calculate the optimal solution of the sub-function of the current objective function can be referred to in the related description of the following embodiments.
Then, the electronic device may calculate a function value (may be referred to as a fourth function value) of the sub-function of the current objective function corresponding to the optimal solution of the sub-function of the current objective function. Furthermore, the electronic device may calculate an optimal cut plane of the current objective function based on the last determined optimal solution of the current objective function and the fourth function value, and calculate the optimal solution of the current objective function as the current target optimal solution based on the optimal cut plane of the current objective function and a preset algorithm.
The preset algorithm may be an ant colony algorithm, a simulated annealing algorithm, or a genetic algorithm, but is not limited thereto.
It can be understood that, when calculating the optimal solution of the current objective function at the 1 st time, the electronic device may randomly select a link repair decision vector as the optimal solution of the current objective function determined at the last time.
In one embodiment of the present invention, referring to fig. 3, step S103 may include the steps of:
s1031: and calculating a function value of the current objective function corresponding to the current target optimal solution as a first function value.
S1032: and calculating the optimal solution of the subfunction of the current objective function based on the current optimal solution of the target and a network maximum flow problem solving algorithm.
Wherein the sub-functions are:
mind,f,pθ=∑i∈Naidi (7)
wherein the content of the first and second substances,
Figure BDA0002976518330000161
Figure BDA0002976518330000162
mind,d,pdenotes a subfunction, mind,d,pRepresenting a minimum function with d, f and p as independent variables, d representing a current data discarding decision vector, f representing a current flow allocation vector, p representing a current node actual calculation vector, N representing a set of edge nodes in a target edge calculation network, aiRepresents the cost of the ith edge node discarding data per unit size, diDiscarding the element in the decision vector corresponding to the ith edge node for the current data, diIndicating the amount of data that the ith edge node currently needs to discard,
Figure BDA0002976518330000163
indicating the link capacity, e, of the link ijijFor the element, e, corresponding to the link ij in the current target optimal solutionijIndicates the processing mode of the link ij, fijThe current flow is assigned the element, f, in the vector corresponding to link ijijRepresenting the total data volume that each edge node in the link ij can currently migrate, wherein the link ij is a link composed of the ith edge node and the jth edge node, and piFor the element, p, in the current node actual computation quantity vector corresponding to the ith edge nodeiRepresenting the data quantity which can be currently processed by the ith edge node in the data locally stored by the ith edge node, fihThe current flow is assigned the element, f, in the vector corresponding to link ihihRepresenting the total data volume that each edge node in the link ih can be currently migrated, the link ih is a link composed of the ith edge node and the h th edge node, E1Set representing the composition of undamaged links in a target edge computing network, riRepresenting the amount of data stored locally at the ith edge node.
S1033: and calculating a function value of the subfunction corresponding to the optimal solution of the subfunction as a third function value.
S1034: and calculating the maximum value of the current target function as a second function value based on the third function value, the current target optimal solution, the last determined maximum value of the current target function and the first preset formula.
Wherein, the first preset formula is as follows:
Figure BDA0002976518330000171
Figure BDA0002976518330000172
the value of the second function is represented,
Figure BDA0002976518330000173
representing the maximum value of the last calculated current objective function, cijIndicating the resources required to repair link ij, eijFor the element, e, corresponding to the link ij in the current target optimal solutionijRepresents the processing mode of the link ij, and θ represents the third function value. The current target optimal solution is the link repair decision vector determined this time (i.e. the current link repair decision vector).
In one implementation, since the optimal cutting plane of the current objective function is already calculated when the optimal solution of the current objective function (i.e., the current target optimal solution) is calculated, after the current target optimal solution is calculated, the function value of the current objective function corresponding to the current target optimal solution can be calculated as the first function value based on the current target optimal solution and the above formula (6).
The electronic device may further calculate an optimal solution of a subfunction of the current objective function based on the current target optimal solution and a network maximum flow problem solving algorithm, where the optimal solution of the subfunction of the current objective function includes the calculated values of the current data discard decision vector, the current flow allocation vector, and the current node actual calculation amount vector. The network maximum flow problem solving algorithm may be a Dinic algorithm, or an EdmondsKarp algorithm, or a Ford-Fulkerson (greedy algorithm), but is not limited thereto.
After calculating the optimal solution of the sub-function of the current objective function, the electronic device may calculate a function value of the sub-function of the current objective function as a third function value based on the optimal solution of the sub-function of the current objective function and the above equation (7), equation (8), and equation (9). Further, the electronic device may calculate the maximum value of the current objective function as the second function value based on the third function value, the current target optimal solution, the last calculated maximum value of the current objective function, and the above equation (9).
When the maximum value of the current objective function is calculated 1 st time, the maximum value of the current objective function calculated last time
Figure BDA0002976518330000174
Can be as follows: and + ∞.
In step S104, if the first function value and the second function value satisfy the preset convergence condition, it indicates that the current target function has converged, and the link to be repaired corresponding to the current target optimal solution is repaired, and the required repair resources are less. Therefore, the electronic device may determine the current link to be repaired based on the current target optimal solution.
In an implementation manner, the electronic device may determine, from the current target optimal solution, a first element of a first numerical value, where a processing manner of a damaged link corresponding to the first element is repair, and the electronic device may determine, as a current link to be repaired, the damaged link whose processing manner is repair. Furthermore, the current link to be repaired can be repaired, so that the link to be repaired can process the computing task.
In one embodiment of the present invention, the preset convergence condition may be:
Figure BDA0002976518330000181
Figure BDA0002976518330000182
the value of the second function is represented,
Figure BDA0002976518330000183
representing the first function value and epsilon representing a preset threshold value. The preset threshold may be set by a technician according to experience, for example, the preset threshold may be 0.02, or may also be 0.01, but is not limited thereto. Meeting the preset convergence condition means that more damaged links can be repaired when fewer repair resources are available.
In step S105, if the first function value and the second function value do not satisfy the preset convergence condition, which indicates that the current objective function is not converged, the electronic device may update the current objective function, use the updated objective function as the current objective function, and calculate the optimal solution of the current objective function again, and so on until the first function value and the second function value corresponding to the determined current target optimal solution satisfy the preset convergence condition, and the electronic device may determine the current link to be repaired based on the current target optimal solution.
In one embodiment of the present invention, referring to fig. 4, step S105 may include the steps of:
s1051: and if the first function value and the second function value do not meet the preset convergence condition, updating the optimal cutting plane of the current target function based on the current target optimal solution and the third function value so as to update the current target function, and returning to execute the step S102.
Wherein, the updated optimal cutting plane is as follows:
Figure BDA0002976518330000184
eta' represents the updated optimal cutting plane, theta represents the third function value, E0Representing a set of damaged links, mu, in a target edge computing networkijRepresenting the degree of influence of the link capacity of link ij on the function value of the subfunction,
Figure BDA0002976518330000191
represents link capacity, e 'of link ij'ijFor the next element in the link repair decision vector that needs to be determined corresponding to link ij,e′ijindicates the processing mode of the link ij, eijFor the element, e, corresponding to the link ij in the current target optimal solutionijThe processing mode of the link ij is shown.
Wherein the content of the first and second substances,
Figure BDA0002976518330000192
Figure BDA0002976518330000193
indicating the link capacity of link ij at the last calculation, theta "being based on
Figure BDA0002976518330000194
And calculating function values of the sub-functions of the current objective function.
In one implementation, if the first function value and the second function value do not satisfy the preset convergence condition, the electronic device may obtain an optimal solution for a sub-function of the current objective function. The optimal solution of the sub-function of the current objective function comprises: a current data drop decision vector, a current flow allocation vector, and a current node actual computation vector. Then, the electronic device may calculate a function value (i.e., a third function value) of the sub-function of the current objective function corresponding to the optimal solution of the sub-function of the current objective function.
Furthermore, the electronic device may calculate to obtain an updated optimal cutting plane based on the current target optimal solution, the third function value and the formula (11), further, may use the objective function including the updated optimal cutting plane as the current objective function, and calculate the optimal solution of the current objective function again, and so on, until the first function value and the second function value corresponding to the determined current target optimal solution satisfy the preset convergence condition, the electronic device may determine the current link to be repaired based on the current target optimal solution.
In order to make those skilled in the art better understand the technical solutions of the embodiments of the present invention, the technical solutions of the embodiments of the present invention are exemplarily described.
After decomposing the function shown in formula (1) based on the Benders algorithm to obtain the current objective function and the current sub-function of the objective function, a link repair decision vector e1 can be randomly selected as the optimal solution of the current objective function (i.e., the current target optimal solution), and the optimal solutions d1, f1 and p1 of the sub-function of the current objective function are calculated based on the current target optimal solution e1 and the above formula (7), formula (8) and formula (9).
Then, the function value θ 1 of the corresponding sub-function of the current objective function may be calculated based on the optimal solutions d1, f1, p1 of the sub-function of the current objective function and the above equation (7), and the optimal cut plane η 1 of the current objective function may be determined based on the function value θ 1 of the sub-function of the current objective function and the above equation (11). Furthermore, the electronic device may calculate a function value of the current objective function based on the current target optimal solution e1, the current optimum cutting plane η 1 of the objective function, and the above equation (6)
Figure BDA0002976518330000201
(i.e., the first function value), and based on the current target optimum solution e1, the function value θ 1 of the sub-function of the current objective function, and the above equation (9), the maximum value of the current objective function is calculated
Figure BDA0002976518330000202
(i.e., the second function value).
Furthermore, the electronic device can determine the first function value
Figure BDA0002976518330000203
And a second function value
Figure BDA0002976518330000204
Whether the preset convergence condition is satisfied or not, when the first function value is satisfied
Figure BDA0002976518330000205
And a second function value
Figure BDA0002976518330000206
When the preset convergence condition is met, a first element which is a first numerical value in the current target optimal solution e1 may be determined, and the damaged link corresponding to the first element is determined to be the current link to be repaired.
When the first function value
Figure BDA0002976518330000207
And a second function value
Figure BDA0002976518330000208
When the preset convergence condition is not satisfied, the current optimal solution e2 of the objective function may be calculated as the current target optimal solution based on the current optimal cut plane η 1 of the objective function and the above equation (6), and the optimal solutions d2, f2 and p2 of the sub-functions of the current objective function may be calculated based on the current target optimal solution e2 and the above equation (7), equation (8) and equation (9).
Then, the function value θ 2 of the corresponding sub-function of the current objective function may be calculated based on the optimal solutions d2, f2, and p2 of the sub-function of the current objective function and the above equation (7), and the optimal cut plane η 2 of the current objective function may be determined based on the function value θ 2 of the sub-function of the current objective function and the above equation (11). Furthermore, the electronic device may calculate a function value of the current objective function based on the current target optimal solution e2, the current optimum cut plane η 2 of the objective function, and the above equation (6)
Figure BDA0002976518330000209
(i.e., the first function value) and based on the current target optimum solution e2, the function value θ 2 of the sub-function of the current objective function, and the above equation (9), the maximum value of the current objective function is calculated
Figure BDA0002976518330000211
(i.e., the second function value).
The electronic device can continue to determine the first function
Figure BDA0002976518330000212
And a second function value
Figure BDA0002976518330000213
Whether the preset convergence condition is met or not, and so on until the determined condition is met
Figure BDA0002976518330000214
And
Figure BDA0002976518330000215
satisfies a predetermined convergence condition, and further, can be determined
Figure BDA0002976518330000216
And
Figure BDA0002976518330000217
and determining the damaged link corresponding to the first element as the current link to be repaired, wherein the corresponding current target optimal solution en is the first element of the first numerical value.
Corresponding to the embodiment of the method in fig. 1, referring to fig. 5, fig. 5 is a structural diagram of a device for determining a link to be repaired according to an embodiment of the present invention, where the device includes:
an obtaining module 501, configured to obtain a current objective function; the current objective function represents the minimum value of total resources required by each damaged link in the repair target edge calculation network based on the link repair decision vector, the data discard decision vector, the flow distribution vector and the node actual calculation vector; the arguments of the current objective function include a link repair decision vector; first elements in the link repair decision vector correspond to the damaged links one by one, and one first element represents a processing mode of the damaged link corresponding to the first element, wherein the processing mode is repair or non-repair; second elements in the data discarding decision vector correspond to edge nodes in the target edge computing network in a one-to-one manner, one second element represents the data amount which needs to be discarded at present by the edge node corresponding to the second element, third elements in the flow allocation vector correspond to links in the target edge computing network in a one-to-one manner, one third element represents the total data amount which can be migrated at present by each edge node in the link corresponding to the third element, fourth elements in the node actual computed amount vector correspond to the edge nodes in the target edge computing network in a one-to-one manner, and one fourth element represents the data amount which can be processed at present by the edge node in data stored locally by the edge node corresponding to the fourth element;
a first determining module 502, configured to calculate an optimal solution of a current objective function as a current target optimal solution;
a second determining module 503, configured to calculate, based on the current target optimal solution, a function value of a current target function corresponding to the current target optimal solution as a first function value, and a maximum value of the current target function as a second function value;
a third determining module 504, configured to determine, based on the current target optimal solution, a current link to be repaired if the first function value and the second function value satisfy a preset convergence condition;
an updating module 505, configured to determine, based on the current target optimal solution, a current data discarding decision vector, a current flow allocation vector, and a current node actual computation vector if the first function value and the second function value do not satisfy the preset convergence condition, so as to update the current target function, and return to perform the step of computing the optimal solution of the current target function as the current target optimal solution.
Optionally, the current objective function is:
Figure BDA0002976518330000221
Figure BDA0002976518330000222
represents the current objective function, mine,ηRepresenting a minimum function with e and eta as arguments, e representing the current link repair decision vector, and eta representing the current link repair decision vectorThe optimal cutting plane of the objective function, which is determined based on the current data discarding decision vector, the current flow allocation vector and the current node actual calculation vector, E0Representing a set of broken links in the target edge computing network, cijRepresents the resources required for repairing the link ij, the link ij is the link composed of the ith edge node and the jth edge node, eijRepairing the element, e, corresponding to the link ij in the decision vector for the current linkijThe processing mode of the link ij is shown.
Optionally, the second determining module 503 is specifically configured to calculate a function value of a current objective function corresponding to the current target optimal solution, as a first function value;
calculating the optimal solution of the subfunction of the current objective function based on the current optimal solution of the objective and a network maximum flow problem solving algorithm; wherein the sub-function is:
mind,f,pθ=Σi∈Naidi
wherein the content of the first and second substances,
Figure BDA0002976518330000223
Figure BDA0002976518330000224
mind,d,pθ denotes the sub-function, mind,d,pRepresenting a minimum function with d, f and p as independent variables, d representing a current data discarding decision vector, f representing a current flow allocation vector, p representing a current node actual calculation vector, N representing a set of edge nodes in the target edge calculation network, aiRepresents the cost of the ith edge node discarding data per unit size, diDiscarding the element in the decision vector corresponding to the ith edge node for the current data, diIndicating the amount of data that the ith edge node currently needs to discard,
Figure BDA0002976518330000231
indicating the link capacity, e, of the link ijijFor the element, e, corresponding to the link ij in the current target optimal solutionijIndicates the way in which the link ij is processed, fijThe current flow is assigned the element, f, in the vector corresponding to link ijijRepresenting the total data volume that each edge node in the link ij can currently migrate, wherein the link ij is a link composed of the ith edge node and the jth edge node, and piFor the element, p, in the vector of actual calculated quantities of the current node corresponding to the ith edge nodeiRepresenting the data quantity which can be currently processed by the ith edge node in the data locally stored by the ith edge node, fihThe current flow is assigned the element, f, in the vector corresponding to link ihihRepresenting the total data volume that each edge node in the link ih can be currently migrated, the link ih is a link composed of the ith edge node and the h th edge node, E1A set representing the composition of undamaged links in the target edge computing network, riRepresenting the amount of data stored locally by the ith edge node;
calculating a function value of the sub-function corresponding to the optimal solution of the sub-function as a third function value;
calculating the maximum value of the current target function as a second function value based on the third function value, the current target optimal solution, the last determined maximum value of the current target function and a first preset formula; wherein the first preset formula is as follows:
Figure BDA0002976518330000232
Figure BDA0002976518330000233
the value of the second function is represented,
Figure BDA0002976518330000234
representing the current target of the last calculationMaximum value of function, cijIndicating the resources required to repair link ij, eijFor the element, e, corresponding to the link ij in the current target optimal solutionijRepresents the processing mode of the link ij, and theta represents the third function value.
Optionally, the updating module 505 is specifically configured to update the optimal cutting plane of the current objective function based on the current target optimal solution and the third function value if the first function value and the second function value do not satisfy the preset convergence condition, so as to update the current objective function, and return to perform the step of calculating the optimal solution of the current objective function as the current target optimal solution; wherein, the updated optimal cutting plane is as follows:
Figure BDA0002976518330000241
eta' represents the updated optimal cutting plane, theta represents the third function value, E0Represents a set of damaged links, μ, in the target edge computing networkijRepresenting the degree of influence of the link capacity of the link ij on the function value of the sub-function,
Figure BDA0002976518330000242
represents link capacity, e 'of link ij'ijThe element, e ', in the link repair decision vector corresponding to link ij that needs to be determined next time'ijIndicates the manner of processing of the link ij, eijFor the element, e, corresponding to the link ij in the current target optimal solutionijThe processing mode of the link ij is shown.
Optionally, the preset convergence condition is:
Figure BDA0002976518330000243
Figure BDA0002976518330000244
representing said second functionThe value of the one or more of the one,
Figure BDA0002976518330000245
and representing the first function value, and epsilon represents a preset threshold value.
Based on the determination device for the link to be repaired provided by the embodiment of the present invention, the objective function represents the minimum value of the total resources required for repairing each damaged link in the target edge calculation network, which is determined based on the link repair decision vector, the data discard decision vector, the flow allocation vector, and the node actual calculation amount vector. Because the data discarding decision vector, the flow distribution vector and the node actual calculation vector can represent the current unprocessed data volume of each edge node, the optimal solution of the objective function is determined based on the current unprocessed data volume of each edge node, that is, the current link to be repaired is determined based on the current unprocessed data volume of each edge node, so that the problem that more data cannot be processed can be avoided, and the success rate of processing calculation tasks by the target edge calculation network can be improved.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604;
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
acquiring a current objective function; the current objective function represents the minimum value of the total resources required by each damaged link in the repair target edge calculation network based on the link repair decision vector, the data discard decision vector, the flow distribution vector and the node actual calculation vector; the arguments of the current objective function include a link repair decision vector; first elements in the link repair decision vector correspond to the damaged links one by one, and one first element represents a processing mode of the damaged link corresponding to the first element, wherein the processing mode is repair or non-repair; second elements in the data discarding decision vector correspond to edge nodes in the target edge computing network one to one, one second element represents a data amount which needs to be discarded currently by the edge node corresponding to the second element, third elements in the flow allocation vector correspond to links in the target edge computing network one to one, one third element represents a total data amount which can be migrated currently by each edge node in the link corresponding to the third element, fourth elements in the node actual computation vector correspond to the edge nodes in the target edge computing network one to one, and one fourth element represents a data amount which can be processed currently by the edge node in data locally stored by the edge node corresponding to the fourth element;
calculating the optimal solution of the current target function as the current target optimal solution;
calculating a function value of a current objective function corresponding to the current target optimal solution based on the current target optimal solution to serve as a first function value, and calculating a maximum value of the current objective function to serve as a second function value;
if the first function value and the second function value meet a preset convergence condition, determining a current link to be repaired based on a current target optimal solution;
and if the first function value and the second function value do not meet the preset convergence condition, determining a current data discarding decision vector, a current flow distribution vector and a current node actual calculation quantity vector based on a current target optimal solution so as to update the current target function, and returning to execute the step of calculating the optimal solution of the current target function as the current target optimal solution.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also 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.
Based on the electronic device provided by the embodiment of the invention, the objective function represents the minimum value of the total resources required for repairing each damaged link in the target edge computing network, which is determined based on the link repairing decision vector, the data discarding decision vector, the flow distribution vector and the node actual computation vector. Because the data discarding decision vector, the flow allocation vector and the node actual calculation vector can represent the current unprocessed data volume of each edge node, the optimal solution of the objective function is determined based on the current unprocessed data volume of each edge node, that is, the current link to be repaired is determined based on the current unprocessed data volume of each edge node, so that the situation that more data cannot be processed can be avoided, and the success rate of processing the calculation task by the target edge calculation network can be improved.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above methods for determining a link to be repaired.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for determining a link to be repaired according to any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to be performed in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to them, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (8)

1. A method for determining a link to be repaired, the method comprising:
acquiring a current objective function; the current objective function represents the minimum value of the total resources required by each damaged link in the repair target edge calculation network based on the link repair decision vector, the data discard decision vector, the flow distribution vector and the node actual calculation vector; the arguments of the current objective function include a link repair decision vector; first elements in the link repair decision vector correspond to the damaged links one by one, and one first element represents a processing mode of the damaged link corresponding to the first element, wherein the processing mode is repair or non-repair; second elements in the data discarding decision vector correspond to edge nodes in the target edge computing network one to one, one second element represents a data amount which needs to be discarded currently by the edge node corresponding to the second element, third elements in the flow allocation vector correspond to links in the target edge computing network one to one, one third element represents a total data amount which can be migrated currently by each edge node in the link corresponding to the third element, fourth elements in the node actual computation vector correspond to the edge nodes in the target edge computing network one to one, and one fourth element represents a data amount which can be processed currently by the edge node in data locally stored by the edge node corresponding to the fourth element;
calculating the optimal solution of the current target function as the current target optimal solution;
calculating a function value of a current objective function corresponding to the current target optimal solution based on the current target optimal solution to serve as a first function value, and calculating a maximum value of the current objective function to serve as a second function value;
if the first function value and the second function value meet a preset convergence condition, determining a current link to be repaired based on a current target optimal solution;
if the first function value and the second function value do not meet the preset convergence condition, determining a current data discarding decision vector, a current flow distribution vector and a current node actual calculation quantity vector based on a current target optimal solution so as to update a current target function, and returning to execute the optimal solution for calculating the current target function as the current target optimal solution;
the current objective function is:
Figure FDA0003639011920000011
Figure FDA0003639011920000012
represents the current objective function, mine,ηRepresenting a minimum function with e and eta as independent variables, e representing a current link repair decision vector, eta representing an optimal cut plane of a current objective function, the optimal cut plane of the current objective function being actually calculated based on the current data discard decision vector, the current flow allocation vector and the current nodeQuantity vector determined, E0A set representing the composition of damaged links in the target edge computing network, cijIndicating the resources required for repairing the link ij, the link ij is a link composed of the ith edge node and the jth edge node, eijRepairing the element, e, corresponding to the link ij in the decision vector for the current linkijThe processing mode of the link ij is shown.
2. The method of claim 1, wherein calculating a function value of a current objective function corresponding to the current target optimal solution as a first function value and a maximum value of the current objective function as a second function value based on the current target optimal solution comprises:
calculating a function value of a current objective function corresponding to the current target optimal solution to serve as a first function value;
calculating the optimal solution of the subfunction of the current objective function based on the current optimal solution of the objective and a network maximum flow problem solving algorithm; wherein the sub-function is:
mind,f,pθ=Σi∈Naidi
wherein, the first and the second end of the pipe are connected with each other,
Figure FDA0003639011920000021
Figure FDA0003639011920000022
mind,d,pθ represents the sub-function, mind,d,pRepresenting a minimum function with d, f and p as independent variables, d representing a current data discarding decision vector, f representing a current flow allocation vector, p representing a current node actual calculation vector, N representing a set of edge nodes in the target edge calculation network, aiRepresents the cost of the ith edge node discarding data per unit size, diIs currentElement in the data discard decision vector corresponding to the ith edge node, diIndicating the amount of data that the ith edge node currently needs to discard,
Figure FDA0003639011920000023
indicating the link capacity, e, of the link ijijFor the element, e, corresponding to the link ij in the current target optimal solutionijIndicates the way in which the link ij is processed, fijThe current flow is assigned the element, f, in the vector corresponding to link ijijRepresenting the total data volume that each edge node in the link ij can currently migrate, wherein the link ij is a link composed of the ith edge node and the jth edge node, and piFor the element, p, in the current node actual computation quantity vector corresponding to the ith edge nodeiRepresents the data amount that the ith edge node can process currently in the data locally stored by the ith edge node, fihThe current flow is assigned the element, f, in the vector corresponding to link ihihRepresenting the total data volume that each edge node in the link ih can be currently migrated, the link ih is a link composed of the ith edge node and the h-th edge node, E1A set representing the composition of undamaged links in the target edge computing network, riRepresenting the data amount locally stored by the ith edge node;
calculating a function value of the sub-function corresponding to the optimal solution of the sub-function as a third function value;
calculating the maximum value of the current objective function as a second function value based on the third function value, the current target optimal solution, the last determined maximum value of the current objective function and a first preset formula; wherein the first preset formula is as follows:
Figure FDA0003639011920000031
Figure FDA0003639011920000032
the second function value is represented as a function of the first function value,
Figure FDA0003639011920000033
representing the maximum value of the last calculated current objective function, cijIndicating the resources required to repair link ij, eijFor the element, e, corresponding to the link ij in the current target optimal solutionijRepresents the processing mode of the link ij, and theta represents the third function value.
3. The method of claim 2, wherein the step of determining a current data discard decision vector, a current flow allocation vector, and a current node actual computation amount vector based on a current target optimal solution if the first function value and the second function value do not satisfy the preset convergence condition to update the current target function and returning to perform the computation of the optimal solution of the current target function as the current target optimal solution comprises:
if the first function value and the second function value do not meet the preset convergence condition, updating the optimal cutting plane of the current objective function based on the current target optimal solution and the third function value so as to update the current objective function, and returning to execute the step of calculating the optimal solution of the current objective function as the current target optimal solution; wherein, the updated optimal cutting plane is as follows:
Figure FDA0003639011920000041
eta' represents the updated optimal cutting plane, theta represents the third function value, E0Represents a set of damaged links, μ, in the target edge computing networkijRepresenting the degree of influence of the link capacity of the link ij on the function value of the sub-function,
Figure FDA0003639011920000042
represents link capacity, e 'of link ij'ijIs the next oneThe element, e ', in the link repair decision vector corresponding to link ij that needs to be determined next'ijIndicates the processing mode of the link ij, eijFor the element, e, corresponding to the link ij in the current target optimal solutionijThe processing mode of the link ij is shown.
4. The method according to claim 1, wherein the preset convergence condition is:
Figure FDA0003639011920000043
Figure FDA0003639011920000044
the value of the second function is represented,
Figure FDA0003639011920000045
and representing the first function value, and epsilon represents a preset threshold value.
5. An apparatus for determining a link to be repaired, the apparatus comprising:
the acquisition module is used for acquiring a current target function; the current objective function represents the minimum value of the total resources required by each damaged link in the repair target edge calculation network based on the link repair decision vector, the data discard decision vector, the flow distribution vector and the node actual calculation vector; the arguments of the current objective function include a link repair decision vector; first elements in the link repair decision vector correspond to the damaged links one by one, and one first element represents a processing mode of the damaged link corresponding to the first element, wherein the processing mode is repair or non-repair; second elements in the data discarding decision vector correspond to edge nodes in the target edge computing network one to one, one second element represents a data amount which needs to be discarded currently by the edge node corresponding to the second element, third elements in the flow allocation vector correspond to links in the target edge computing network one to one, one third element represents a total data amount which can be migrated currently by each edge node in the link corresponding to the third element, fourth elements in the node actual computation vector correspond to the edge nodes in the target edge computing network one to one, and one fourth element represents a data amount which can be processed currently by the edge node in data locally stored by the edge node corresponding to the fourth element;
the first determining module is used for calculating the optimal solution of the current objective function as the current optimal solution of the objective;
a second determining module, configured to calculate, based on the current target optimal solution, a function value of a current target function corresponding to the current target optimal solution, as a first function value, and a maximum value of the current target function, as a second function value;
a third determining module, configured to determine, based on a current target optimal solution, a current link to be repaired if the first function value and the second function value satisfy a preset convergence condition;
an updating module, configured to determine, based on a current target optimal solution, a current data discarding decision vector, a current flow allocation vector, and a current node actual computation vector if the first function value and the second function value do not satisfy the preset convergence condition, so as to update the current target function, and return to perform the step of computing the optimal solution of the current target function as the current target optimal solution;
the current objective function is:
Figure FDA0003639011920000051
Figure FDA0003639011920000052
represents the current objective function, mine,ηThe minimum function with e and eta as independent variables is represented, e represents the current link repair decision vector, and eta represents the current link repair decision vectorThe current optimal cut plane of the objective function is determined based on the current data discarding decision vector, the current flow allocation vector and the current node actual calculation vector, E0Representing a set of broken links in the target edge computing network, cijRepresents the resources required for repairing the link ij, the link ij is the link composed of the ith edge node and the jth edge node, eijRepairing the element, e, corresponding to the link ij in the decision vector for the current linkijThe processing mode of the link ij is shown.
6. The apparatus according to claim 5, wherein the second determining module is specifically configured to calculate a function value of the current objective function corresponding to the current target optimal solution as the first function value;
calculating the optimal solution of the subfunction of the current objective function based on the current optimal solution of the objective and a network maximum flow problem solving algorithm; wherein the sub-function is:
mind,f,pθ=Σi∈Naidi
wherein the content of the first and second substances,
Figure FDA0003639011920000061
Figure FDA0003639011920000062
mind,d,pθ represents the sub-function, mind,d,pRepresenting a minimum function with d, f and p as independent variables, d representing a current data discarding decision vector, f representing a current flow allocation vector, p representing a current node actual calculation vector, N representing a set of edge nodes in the target edge calculation network, aiRepresents the cost of the ith edge node discarding data per unit size, diDiscarding the ith edge of the decision vector for the current dataElement corresponding to edge node, diIndicating the amount of data that the ith edge node currently needs to discard,
Figure FDA0003639011920000063
indicating the link capacity, e, of the link ijijFor the element, e, corresponding to the link ij in the current target optimal solutionijIndicates the processing mode of the link ij, fijThe current flow is assigned the element, f, in the vector corresponding to link ijijRepresenting the total data volume that each edge node in the link ij can currently migrate, wherein the link ij is a link composed of the ith edge node and the jth edge node, and piFor the element, p, in the current node actual computation quantity vector corresponding to the ith edge nodeiRepresenting the data quantity which can be currently processed by the ith edge node in the data locally stored by the ith edge node, fihThe current flow is assigned the element, f, in the vector corresponding to link ihihRepresenting the total data volume that each edge node in the link ih can be currently migrated, the link ih is a link composed of the ith edge node and the h-th edge node, E1A set representing a composition of intact links in said target edge computing network, riRepresenting the amount of data stored locally by the ith edge node;
calculating a function value of the sub-function corresponding to the optimal solution of the sub-function as a third function value;
calculating the maximum value of the current target function as a second function value based on the third function value, the current target optimal solution, the last determined maximum value of the current target function and a first preset formula; wherein the first preset formula is as follows:
Figure FDA0003639011920000064
Figure FDA0003639011920000071
the value of the second function is represented,
Figure FDA0003639011920000072
representing the maximum value of the last calculated current objective function, cijIndicating the resources required to repair link ij, eijFor the element, e, corresponding to the link ij in the current target optimal solutionijRepresents the processing mode of the link ij, and theta represents the third function value.
7. The apparatus according to claim 6, wherein the updating module is specifically configured to update the optimal cutting plane of the current objective function based on the current target optimal solution and the third function value to update the current objective function if the first function value and the second function value do not satisfy the preset convergence condition, and return to perform the step of calculating the optimal solution of the current objective function as the current target optimal solution; wherein, the updated optimal cutting plane is as follows:
Figure FDA0003639011920000073
eta' represents the updated optimal cutting plane, theta represents the third function value, E0Represents a set of damaged links, μ, in the target edge computing networkijRepresenting the degree of influence of the link capacity of the link ij on the function value of the sub-function,
Figure FDA0003639011920000074
represents link capacity, e 'of link ij'ijThe element, e ', in the link repair decision vector corresponding to link ij that needs to be determined next time'ijIndicates the processing mode of the link ij, eijFor the element, e, corresponding to the link ij in the current target optimal solutionijThe processing mode of the link ij is shown.
8. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 4 when executing a program stored in the memory.
CN202110275642.2A 2021-03-15 2021-03-15 Method and device for determining link to be repaired Active CN113065093B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110275642.2A CN113065093B (en) 2021-03-15 2021-03-15 Method and device for determining link to be repaired

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110275642.2A CN113065093B (en) 2021-03-15 2021-03-15 Method and device for determining link to be repaired

Publications (2)

Publication Number Publication Date
CN113065093A CN113065093A (en) 2021-07-02
CN113065093B true CN113065093B (en) 2022-07-12

Family

ID=76560726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110275642.2A Active CN113065093B (en) 2021-03-15 2021-03-15 Method and device for determining link to be repaired

Country Status (1)

Country Link
CN (1) CN113065093B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104518893A (en) * 2013-09-29 2015-04-15 中国电信股份有限公司 Method and device for positioning key nodes and links in IGP (Interior Gateway Protocol) topology of large-scale IP network
CN111694664A (en) * 2020-06-04 2020-09-22 海南大学 Calculation unloading distribution method of edge server
CN111935089A (en) * 2020-07-04 2020-11-13 吴静昱 Data processing method based on big data and edge calculation and artificial intelligence server

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9118421B2 (en) * 2012-05-16 2015-08-25 Ciena Corporation Extending control plane functions to the network edge in an optical transport network
CN111865781B (en) * 2019-04-25 2022-10-11 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for path optimization

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104518893A (en) * 2013-09-29 2015-04-15 中国电信股份有限公司 Method and device for positioning key nodes and links in IGP (Interior Gateway Protocol) topology of large-scale IP network
CN111694664A (en) * 2020-06-04 2020-09-22 海南大学 Calculation unloading distribution method of edge server
CN111935089A (en) * 2020-07-04 2020-11-13 吴静昱 Data processing method based on big data and edge calculation and artificial intelligence server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Competitive percolation strategies for network recovery;SMITH AM 等;《Scientific Reports》;20190814;全文 *

Also Published As

Publication number Publication date
CN113065093A (en) 2021-07-02

Similar Documents

Publication Publication Date Title
CN112579194B (en) Block chain consensus task unloading method and device based on time delay and transaction throughput
WO2023066084A1 (en) Computing power distribution method and apparatus, and computing power server
CN110942248B (en) Training method and device for transaction wind control network and transaction risk detection method
CN111026536B (en) Task processing method and device based on trust fusion evaluation and edge node
CN112749221A (en) Data task scheduling method and device, storage medium and scheduling tool
US20120072456A1 (en) Adaptive resource allocation for multiple correlated sub-queries in streaming systems
CN112039702A (en) Model parameter training method and device based on federal learning and mutual learning
CN107819745B (en) Method and device for defending against abnormal traffic
CN111967655A (en) Short-term load prediction method and system
CN112633842A (en) Task pushing method, device and system
CN113378498B (en) Task allocation method and device
CN113065093B (en) Method and device for determining link to be repaired
CN112532625B (en) Network situation awareness evaluation data updating method and device and readable storage medium
US20220122016A1 (en) Evolutionary software prioritization protocol for digital systems
CN112488843A (en) Enterprise risk early warning method, device, equipment and medium based on social network
CN111275308B (en) Resource allocation method and device
CN109902831B (en) Service decision processing method and device
CN109344047B (en) System regression testing method, computer-readable storage medium, and terminal device
CN114722025A (en) Data prediction method, device and equipment based on prediction model and storage medium
CN111625720A (en) Method, device, equipment and medium for determining data decision item execution strategy
CN116781389B (en) Determination method of abnormal data list, electronic equipment and storage medium
CN112600756B (en) Service data processing method and device
CN116757388B (en) Electric power market clearing method and device based on redundancy constraint screening
CN117634688A (en) Project development duration prediction method, device, equipment and storage medium
CN115878415A (en) Cluster server intelligent fault prediction method, system, terminal and 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
GR01 Patent grant
GR01 Patent grant