Network deployment scheme recommendation method and system based on multi-stage similarity judgment
Through the multi-stage similarity determination network deployment solution recommendation method, combined with the staged comparison of text and graphics features, the problem of difficulty in providing efficient network deployment solutions in the prior art is solved, and the balance of accuracy and scalability is achieved.
Patent Information
- Application Number
- CN202210373431.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-11
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-04-11
AI Technical Summary
The prior art is difficult to provide efficient network deployment solution recommendation algorithms in terms of comprehensive consideration of accuracy and scalability, especially when facing diversified network application system needs.
Using a multi-stage similarity determination network deployment solution recommendation method, by extracting the overview and structural features of text and graphics from user needs, comparing them with the requirements in the requirements library in stages, filtering out the most similar needs, and recommending them Corresponding network deployment plan.
It realizes efficiently recommending network deployment solutions that meet user needs while ensuring accuracy and scalability, improving recommendation accuracy and balancing performance and accuracy.
Smart Images

Figure CN114860964B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network deployment technology, and in particular to a method and system for recommending network deployment solutions based on multi-stage similarity determination. Background Art
[0002] Recommendation system is a common application system. There are great differences in the recommendation methods or algorithms used by recommendation systems in different application fields. For example, the book recommendation system based on user collaborative filtering algorithm, its recommendation indicators are derived from borrowing duration, borrowing type and other borrowing fields, and user similarity is determined, so as to refer to and generate recommended books. The label-based recommendation algorithm is applied to the restaurant recommendation system. When analyzing new needs, the system will first pay attention to the labels of things, summarize label preferences, and recommend all foods that diners may like. In recent years, with the development of artificial intelligence (especially intelligent algorithms represented by deep neural networks), artificial intelligence algorithms are also being applied to recommendation systems in different fields.
[0003] With the rapid development of the information age, efficient network deployment solutions are essential to meet users' network needs. Therefore, how to find a network deployment solution recommendation algorithm that can combine accuracy and scalability is the focus of current research. Summary of the invention
[0004] In order to meet the network needs of users and provide an efficient network deployment solution, the present invention provides a network deployment solution recommendation method and system with multi-stage similarity determination.
[0005] On the one hand, the present invention provides a network deployment solution recommendation method based on multi-stage similarity determination, comprising:
[0006] Step 1: accepting user demand information, wherein the user demand information includes network topology information in the form of a directed graph and a demand description text, which are respectively recorded as a target directed graph and a target text;
[0007] Step 2: Extract the text profile features of the target text and compare them with the text profile features of each requirement in the requirement library, so as to filter out all requirements similar to the profile of the target text from the requirement library and add them to the text profile similarity set P t ;
[0008] Step 3: Extract the graphical features of the target directed graph and compare them with the textual profile similarity set P t The graphical profile features of each requirement in the text are compared to obtain the similarity set P of the text profile. t All requirements similar to the target directed graph are screened and added to the graph profile similarity set P g, the graph profile similarity set P g As a collection of demand recommendations;
[0009] Step 4: Query the network deployment solution corresponding to each requirement in the requirement recommendation set, and recommend them to the user in descending order of similarity.
[0010] Furthermore, before step 4, the method further includes:
[0011] Step A: Extract the text structure features of the target text and compare them with the text profile similarity set P t The text structure features of each requirement in the text are compared so as to select the similarity set P from the text profile. t All requirements with similar structure to the target text are screened and added to the text structure similarity set P sp ;
[0012] Step B: Use the addition algorithm and the subtraction algorithm to compare the graphical structure features of the target directed graph with the graphical profile similarity set P g The graphical structural features of each requirement are compared to obtain the graphical structural features of each requirement from the graphical profile similarity set P g All requirements similar to the structure of the target directed graph are screened and added to the graph structure similarity set P r ;
[0013] Step C: Use the subjective logic consensus operator to convert the text structure similarity set P sp The text similarity judgment opinions corresponding to each requirement in the structure similarity set P r The graph similarity judgment opinions corresponding to each demand in the fusion are combined to obtain a new demand recommendation set, which is used as the final demand recommendation set.
[0014] Furthermore, step 2 specifically includes:
[0015] Step 2.1: Extract the text profile features of the target text and read a text t from the demand library. i The text overview features include the text title, the number of text paragraphs and the text length;
[0016] Step 2.2: Align the text title of the target text with the text t i The text titles of the target text are compared to obtain the text title similarity determination result; the number of text paragraphs of the target text is compared with the text t i The number of text paragraphs is compared to obtain the similarity determination result of the number of text paragraphs; the text length of the target text is compared with the text t iThe text lengths are compared to obtain the text length similarity determination results; wherein each of the similarity determination results is represented by a quaternary of subjective logical opinions;
[0017] Step 2.3: Use the subjective logic consensus operator to fuse the text title similarity determination results, the text paragraph number similarity determination results and the text length similarity determination results to obtain the target text and text t i The text profile similarity opinion ω t ;
[0018] Step 2.4: Based on the text profile similarity opinion ω t Calculate the similarity result. If the similarity result is not less than the preset threshold k_t, the text t i The corresponding requirements are added to the text profile similarity set P t ;
[0019] Step 2.5: Read the text profile features of the next text from the demand library, and execute steps 2.2 to 2.4 on it until all the texts in the demand library have been compared with the target text, and the final text profile similarity set P is obtained. t .
[0020] Furthermore, in step 2.2, the text title similarity determination result ω is obtained according to formula (1): s :
[0021]
[0022] Among them, s represents the target text title, s i Indicates the text title in the requirements library, s i ∈s means s i is a substring of s;
[0023] According to formula (2), we can get the similarity determination result of the number of text paragraphs ω: n :
[0024]
[0025] Where n represents the number of target text paragraphs, n i Indicates the number of text paragraphs in the requirement library;
[0026] According to formula (3), we can get the text length similarity determination result ω l :
[0027]
[0028] Among them, l represents the target text length, l iIndicates the length of the text in the requirement library.
[0029] Furthermore, step 3 specifically includes:
[0030] Step 3.1: Extract the graph profile features of the target directed graph and determine the text profile similarity set P t The corresponding graph set G S , from the graph set G S Read a graph G in i The graph overview features include the number of vertices, the number of edges, the number of vertex out-degrees, and the number of vertex in-degrees;
[0031] Step 3.2: Compare the number of vertices of the target directed graph with the number of vertices of the graph G i Compare the number of vertices of the target directed graph with that of the graph G to obtain the vertex number similarity determination result; compare the number of edges of the target directed graph with that of the graph G i Compare the number of edges of the target directed graph with that of the graph G to obtain the edge number similarity judgment result; compare the vertex out-degree of the target directed graph with that of the graph G i Compare the vertex out-degree of the target directed graph with that of the graph G to obtain the out-degree similarity determination result; compare the vertex in-degree of the target directed graph with that of the graph G i The vertex in-degrees are compared to obtain the in-degree similarity determination results; wherein each similarity determination result is represented by a quaternion of subjective logical opinions;
[0032] Step 3.3: Use the subjective logic consensus operator to fuse the vertex number similarity determination results, the edge number similarity determination results, the out-degree similarity determination results and the in-degree similarity determination results to obtain the target directed graph and the graph G i The similarity judgment opinions of the graphic profiles;
[0033] Step 3.4: Calculate the similarity result based on the similarity judgment opinion of the graphic profile. If the similarity result is not less than the preset threshold k_g, then the graphic G i Add to graphics collection G T ;
[0034] Step 3.5: From the graph set G S Read the next graphic overview feature from the graph, and execute steps 3.2 to 3.4 on it until the graph set G S All the graphs in have been compared with the target directed graph to obtain the final graph set G T ;
[0035] Step 3.6: If the graph set G T If it is not an empty set, then query the requirements corresponding to each graph and add the requirements to the graph profile similarity set P g .
[0036] Furthermore, in step 3.2, the vertex number similarity determination result ω is obtained according to formula (6): v :
[0037]
[0038] Among them, num_v represents the number of vertices of the target directed graph, and num_v' represents the graph G i The number of vertices;
[0039] According to formula (7), we can get the edge number similarity determination result ω e :
[0040]
[0041] Among them, num_e represents the number of edges in the target directed graph, and num_e' represents the graph G i The number of edges;
[0042]
[0043] According to formula (8), we can get the in-degree similarity judgment result with in-degree x:
[0044]
[0045] Among them, di(x) represents the number of vertices with in-degree x in the target directed graph, and di'(x) represents the graph G. i The number of vertices with in-degree x;
[0046] According to formula (9), the out-degree similarity determination result of out-degree x is obtained:
[0047]
[0048] Among them, do(x) represents the number of vertices with out-degree x in the target directed graph, and do'(x) represents the graph G. i The number of vertices with out-degree x;
[0049] Based on formula (8) and formula (9), the similarity determination result ω of all degrees is calculated: io : Among them, ω i1 ,ω i2 ,…,ω im is the in-degree similarity judgment result obtained according to the number of vertices with in-degree 1, 2, …, maxi, ω o1 ,ω o2 ,…,ω omis the out-degree similarity judgment result obtained based on the number of vertices with out-degree 1, 2, …, maxo.
[0050] Furthermore, step A specifically includes:
[0051] Step A1: Set the text structure features to include keywords and phrase associations; and determine the text profile similarity set P t The corresponding text set T S ,
[0052] Step A2: From the text set T S Read a text t i The keyword set, then from the text t i Read a keyword in the keyword collection;
[0053] Step A3: Check whether the keyword exists in the target text;
[0054] Step A4: If it exists, record the position of the keyword in the target text, and compare the keyword in the target text and text t i The similarity between the number of occurrences in the target text and the text t is obtained to obtain the text keyword occurrence similarity determination result of the current keyword; according to the keyword respectively in the target text and the text t i The position in the text is calculated to obtain the text keyword association similarity determination result of the current keyword; wherein each of the similarity determination results is represented by a quaternary group of subjective logical opinions;
[0055] The subjective logic consensus operator is used to fuse the text keyword occurrence similarity determination result and the text keyword association similarity determination result to obtain the target text and text t i Opinions on the text structure similarity of the current keyword;
[0056] Step A5: If it does not exist, then extract the text t i The next keyword is read from the keyword collection, and the process jumps to step A3 until the text t is processed. i All the keywords in the keyword set are obtained by i Opinions on the text structure similarity of all keywords;
[0057] Step A6: Use the subjective logic consensus operator to compare the target text with the text t i The opinions on the text structure similarity of all keywords are integrated to obtain the target text and text t i The text structure similarity judgment opinion ω x , judging the opinion ω according to the text structure similarityx Calculate the similarity result. If the similarity result is not less than the preset threshold k_sp, the text t i The corresponding requirements are added to the text structure similarity set P sp ;
[0058] Step A7: From the text set T S The next keyword set of the text is read and processed according to steps A2 to A6 until the text set T S The keyword sets of all texts in have been processed, and the final text structure similarity set P is obtained. sp And the corresponding text structure similarity judgment opinions.
[0059] Further, in step A4, the similarity determination result ω of the number of occurrences of the text keywords is obtained according to formula (10): i :
[0060]
[0061] Among them, n i Indicates the keyword sp i In the text i The number of occurrences in n x Indicates the keyword sp i The number of occurrences in the target text;
[0062] According to formula (11), the correlation parameter △s between multiple positions of the same keyword in the target text is calculated respectively: a and text t i The correlation parameter △s between multiple positions of the same keyword in b ;
[0063]
[0064] Among them, set the keywords in the target text or text t i The position in is {pos 1 ,pos 2 ,...,pos n}, avg = (len 1 +len 2 +...+len n-1 ) / n-1,len i =pos i+1 -pos i ;
[0065] Based on formula (11), the text keyword association similarity determination result is obtained according to formula (12):
[0066]
[0067] Furthermore, step B specifically includes:
[0068] Step B1: Determine the graph profile similarity set P g The corresponding graph set G T , from the graph set G T Choose any shape G i ;
[0069] Step B2: Use the dot-adding algorithm to compare the graphical structural features of the target directed graph with the graph G i The graphic structural features of are compared, and the comparison process is recorded as the point adding process, which specifically includes:
[0070] Step B2.1: Add the vertices with the largest out-degree or in-degree in the target directed graph to the candidate set P 1 _X, the graph G i The vertices with the largest out-degree or in-degree are included in the candidate set P. 2 _X;
[0071] Step B2.2: Select one vertex from each of the two candidate sets to form a vertex pair and use it as the initial vertex pair;
[0072] Step B2.3: Starting from the selected initial vertex pair, perform vertex addition and edge connection operations on the two vertices respectively through the breadth-first traversal method to obtain two intermediate graphs, which are respectively recorded as the first intermediate graph and the second intermediate graph. Calculate the similarity judgment opinion and the corresponding similarity result of the first intermediate graph and the second intermediate graph after this operation. If the similarity result is not less than the preset threshold k_t, perform the next addition operation until the target directed graph and / or graph G is obtained. i All vertices of have been added, and then the similarity judgment opinions after each operation are merged using the subjective logic consensus operator to obtain the overall similarity judgment opinion of the current initial vertex pair; if the similarity result is less than the elimination threshold, the operation on the current initial vertex pair is stopped; wherein each similarity judgment opinion is represented by a quadruple of subjective logic opinions;
[0073] Step B2.4: Return to step B2.2 to select the next initial vertex pair and execute step B2.3 until all initial vertex pairs have been processed;
[0074] Step B2.5: Count the overall similarity judgment opinions and corresponding overall similarity results of all initial vertex pairs. If the largest overall similarity result is less than the preset threshold k_t, the graph G is i From the graph set G Tand return to step B1 to remove from the graph set G T Select the next graphic and execute step B2; otherwise, use the overall similarity judgment opinion corresponding to the maximum overall similarity result as the overall similarity judgment opinion of the point adding process, and jump to step B3;
[0075] Step B3: Use the point reduction algorithm to compare the graphical structural features of the target directed graph with the graph G i The graphic structural features of are compared, and the comparison process is recorded as the point reduction process, which specifically includes:
[0076] Step B3.1: Add all vertices in the target directed graph to the candidate set P 1 _Y, the graph G i All vertices in are added to the candidate set P 2 _Y;
[0077] Step B3.2: Select the vertex with the smallest out-degree or in-degree from the two candidate sets respectively;
[0078] Step B3.3: Delete the vertex with the smallest out-degree or in-degree and its connecting edge from the target directed graph, and obtain two intermediate graphs, which are respectively recorded as the third intermediate graph and the fourth intermediate graph. Calculate the similarity judgment opinion and the corresponding similarity result of the third intermediate graph and the fourth intermediate graph after this operation. If the similarity result is not less than the preset threshold k_t, perform the next deletion operation until the target directed graph and / or graph G is obtained. i All vertices of have been deleted, and then the similarity judgment opinions after each operation are merged using the subjective logic consensus operator to obtain the overall similarity judgment opinion of the point reduction process; if the similarity result is less than the elimination threshold, stop the current graph G i Operations;
[0079] Step B3.4: Calculate the similarity result based on the overall similarity judgment opinion of the point reduction process. If the similarity result is not less than the preset threshold k_t, the graph G i Add to graphics collection G R ;
[0080] Step B4: Use the consensus operator of subjective logic to merge the overall similarity judgment opinions of the adding process and the overall similarity judgment opinions of the subtracting process to obtain the target directed graph and graph G i The graph structure similarity judgment opinion ω r ;
[0081] Step B5: Repeat steps B1 to B4 until the graph set G T All the graphs in have been compared with the target directed graph, and the final graph set G is obtained.R , the graph set G R The demand set corresponding to each graph in is the graph structure similarity set P r .
[0082] Furthermore, formula (4) is used to fuse any two similarity determination results or similarity determination opinions:
[0083]
[0084] Among them, ω A and ω B Respectively represent any two similarity judgment results, ω A = {b A ,d A ,u A ,a A},ω B = {b B ,d B ,u B ,a B};ω A◇B It represents the fusion result of two similarity determination results. is a consensus operator, k = u A +u B -u A u B ;
[0085] And, the similarity result of any similarity determination result or similarity determination opinion is calculated according to formula (5):
[0086] E=b+u*a (5) Wherein, E represents the similarity determination result or the similarity determination opinion ω, E is a number between 0 and 1, and the larger the value, the more similar it is, ω=(b, d, u, a), b represents belief, d represents negative belief, u represents uncertainty, and a represents relative atomicity.
[0087] On the other hand, the present invention provides a network deployment solution recommendation system based on multi-stage similarity determination, comprising: a demand library, a solution library, a profile feature set, a determination unit and a library maintenance unit; wherein:
[0088] The solution library is used to store network deployment solutions;
[0089] The requirement library is used to store the requirements corresponding to each network deployment solution;
[0090] The overview feature set is used to centrally store the overview feature data extracted for each requirement, wherein the overview feature data includes text overview features and graphic overview features;
[0091] The determination unit is used to receive the network deployment requirements submitted by the user, and recommend a network deployment solution to the user using the network deployment solution recommendation method based on multi-stage similarity determination;
[0092] The library maintenance unit is used to complete the mapping relationship between the network deployment plan and the requirements; and to complete the maintenance of the solution library, the requirement library and the profile feature set.
[0093] Beneficial effects of the present invention:
[0094] In view of the unique background of network application system deployment, the present invention implements phased recommendations from two perspectives: demand text and network topology. Specifically, according to the general features and structural features of user needs, the needs in the demand library are screened in stages at the lowest possible cost, while gradually reducing the number of elements in the demand library and gradually increasing the depth of similarity analysis, and finally selecting the needs that are most similar to the user needs, and then recommending the network deployment plan corresponding to the most similar needs to the user. The screening algorithms used in each stage are not exactly the same. The basic principle is: the earlier the stage starts, the smaller the time overhead performance, but the worse the similarity analysis accuracy; the later the stage starts, the greater the time overhead performance, but the better the similarity analysis accuracy, such as Figure 2 shown.
[0095] Due to the diversity of network application system deployment requirements (including text and graphics), the present invention uses multiple algorithms to evaluate network application system deployment requirements in stages, which will form different types of similarity determination results. In order to classify these similarity determination results into the same dimension, the present invention uses subjective logic opinions to characterize the evaluation results of each algorithm, uses different methods to convert the similarity evaluation results into subjective logic opinions, and then uses the reasoning rules of subjective logic to reasonably integrate multiple evaluation results to form the final result.
[0096] The invention improves the recommendation accuracy by adopting multiple algorithms, stages and cross-validation, and achieves a balance between accuracy and performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0097] Figure 1 A schematic diagram of a flow chart of a method for recommending a network deployment solution based on multi-stage similarity determination provided by an embodiment of the present invention;
[0098] Figure 2 A schematic diagram of the depth of similarity analysis at different stages provided by an embodiment of the present invention;
[0099] Figure 3 A schematic diagram of a point adding process provided by an embodiment of the present invention;
[0100] Figure 4A schematic diagram of a point reduction process provided by an embodiment of the present invention;
[0101] Figure 5 A schematic diagram of the structure of a network deployment solution recommendation system based on multi-stage similarity determination provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0102] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0103] In order to make the technical solution of the present invention clearer, the following explanations are given for the relevant concepts in the present invention. Demand: that is, the deployment requirements of the network application system. Demand library: set the set of existing network application system deployment solutions as P = {p 1 ,p 2 ,...,p n}, where each network application system deployment solution p i Each corresponds to a network application system deployment requirement b i , all network application system deployment requirements form a set B = {b 1 ,b 2 ,...,b n}, the set B is the demand library. It can be understood that if the user demand is represented as a, the technical problem to be solved by the present invention is: how to find a demand b that is most similar to the user demand a from the set B x , thus requiring b x The corresponding network application system deployment solution P x Recommended to users.
[0104] Example 1
[0105] like Figure 1 As shown, an embodiment of the present invention provides a network deployment solution recommendation method based on multi-stage similarity determination, comprising the following steps:
[0106] S101: accepting user demand information, wherein the user demand information includes network topology information in the form of a directed graph and a demand description text, which are respectively recorded as a target directed graph and a target text;
[0107] Specifically, in actual applications, the deployment requirements of network application systems involve not only text information, but also directed graphs that reflect the network topology. Therefore, the user requirement information should include text information and directed graph information. As an implementable method, the user requirement a can be expressed as a={t,g}, where t represents the text corresponding to the requirement and g represents the directed graph corresponding to the requirement.
[0108] S102: extracting the text profile features of the target text and comparing them with the text profile features of each requirement in the requirement library, so as to filter out all requirements similar to the profile of the target text from the requirement library and add them into the text profile similarity set P t ;
[0109] Specifically, the most challenging part of the similarity determination process between two texts is to simulate humans to understand the meaning of the text in order to achieve a true determination of the text similarity. Generally speaking, similar texts will have similar keywords and similar sentences. If these keywords and sentences can be truly understood, the similarity can be accurately determined. In this step, the commonly used methods for determining text similarity in the prior art can be used, mainly including obtaining keywords and sentences using frequent pattern mining, or obtaining keywords and sentences using named entity recognition technology; then using the understanding of the semantics of these keywords and sentences and information such as position to determine the overall similarity between the two texts, or using a pattern recognition algorithm to determine the similarity between the two texts; or a text similarity determination method based on a deep neural network can be used. On the basis of the existing text similarity determination method, the final determination result or judgment opinion only needs to be represented by a quadruple of subjective logical opinions.
[0110] In addition to adopting the existing text similarity determination method, the embodiment of the present invention also provides the following feasible implementation method for text similarity determination, and the determination process mainly includes the following sub-steps:
[0111] S1021: Set the target text to t and the text set of the requirement library to T S ={t 1 ,t 2 ,...}, extract the text profile features of the target text t, read a text t from the demand library i The text overview features include text title s, number of text paragraphs n and text length l;
[0112] S1022: Combine the text title of the target text with the text t i The text titles of the target text are compared to obtain the text title similarity determination result; the number of text paragraphs of the target text is compared with the text t iThe number of text paragraphs is compared to obtain the similarity determination result of the number of text paragraphs; the text length of the target text is compared with the text t i The text lengths are compared to obtain the text length similarity determination results; wherein each of the similarity determination results is represented by a quaternary of subjective logical opinions;
[0113] Specifically, the so-called quaternary of subjective logical opinions can be expressed as (b, d, u, a), where b represents belief, d represents negative belief, u represents uncertainty, and a represents relative atomicity; the value range of the four is [0, 1], and b+d+u=1, and the relative atomicity represents the default discrimination. For the sake of discussion, in the following implementation of the present invention, the default value of the relative atomicity a is set to 0.5; but it can be understood that those skilled in the art can set the default value of the relative atomicity as needed.
[0114] As an implementation method, s is set to represent the target text title, s i Represents the text title in the demand library, then the text title similarity determination result ω is obtained according to formula (1): s :
[0115]
[0116] It should be noted that s i ∈s means s i A substring of s.
[0117] As an implementation method, n is set to represent the number of target text paragraphs, n i Represents the number of text paragraphs in the demand database. According to formula (2), the similarity determination result of the number of text paragraphs is obtained: n :
[0118]
[0119] As an implementation method, l is set to represent the target text length, l i The text length in the demand database is expressed as follows: According to formula (3), the text length similarity determination result ω is obtained. l :
[0120]
[0121] S1023: Using a subjective logic consensus operator to fuse the text title similarity determination result, the text paragraph number similarity determination result and the text length similarity determination result, to obtain the target text and the text t i The text profile similarity opinion ω t ;
[0122] Specifically, using represents the consensus operator of subjective logic, then The fusion rules of any two similarity determination results will be introduced in detail below and will not be repeated here.
[0123] S1024: Based on the text profile similarity opinion ω t Calculate the similarity result. If the similarity result is not less than the preset threshold k_t, the text t i The corresponding requirements are added to the text profile similarity set P t ;
[0124] S1025: Read the text profile features of the next text from the demand library, and execute steps S1022 to S1024 on it until the text set T in the demand library is S All texts of have been compared with the target text to obtain the final text profile similarity set P t .
[0125] S103: Extracting the graphical overview features of the target directed graph and comparing them with the text overview similarity set P t The graphical profile features of each requirement in the text are compared to obtain the similarity set P of the text profile. t All requirements similar to the target directed graph are screened and added to the graph profile similarity set P g , the graph profile similarity set P g As a collection of demand recommendations;
[0126] Specifically, through this step, a large number of dissimilar graphics can be quickly excluded, and directed graphs that basically meet the similarity determination conditions can be screened out, thereby greatly narrowing the screening range. In this step, the commonly used methods for directed graph similarity determination in the prior art can be adopted, mainly including proposing three different similarity comparison algorithms from the aspects of inner angle similarity, vertex similarity, and edge length similarity, as well as a similarity measurement method based on graph edit distance. Among them, the similarity comparison algorithm based on inner angle, the similarity comparison algorithm based on edge length, and the similarity algorithm based on vertex. The similarity comparison algorithm based on inner angle mainly obtains geometric similarity by calculating and comparing the angle (inner angle) features of the graphics; the similarity comparison algorithm based on edge length mainly obtains geometric similarity by calculating and comparing the edge length features of two-dimensional graphics in the same coordinate system; the similarity comparison algorithm based on vertex mainly obtains geometric similarity by calculating and comparing whether the vertices of the graphics are overlapped and the number of overlapping vertices after the coordinate system preprocessing; the similarity measurement method based on graph edit distance is to evaluate the similarity of the graph structure by calculating the number and intensity of deformations required to transform one graph into another. It can adapt to any structured graph without the restriction of node and edge label letters. In addition to the flexibility of graph edit distance, the concept of edit distance can be adapted to specific applications by determining the cost of editing operations. In summary, the similarity measurement method based on graph edit distance transforms the problem of evaluating graph structural similarity into the problem of finding the lowest cost editing path between graphs. On the basis of adopting the existing directed graph similarity determination method, the final determination result or judgment opinion only needs to be represented by a quadruple of subjective logical opinions.
[0127] In addition to adopting the existing directed graph similarity determination method, the embodiment of the present invention also provides the following feasible implementation method for directed graph similarity determination, and the determination process mainly includes the following sub-steps:
[0128] S1031: Set the target directed graph to G = (V, E), extract the graph profile features of the target directed graph G, and determine the text profile similarity set P t The corresponding graph set G S , from the graph set G S Read a graph G in i The graph overview features include the number of vertices, the number of edges, the number of vertex out-degrees, and the number of vertex in-degrees;
[0129] Specifically, a set S is used to store relevant information of traversed vertices; and the process of extracting the graph overview feature of the target directed graph G specifically includes:
[0130] S1: num_v is used to represent the number of vertices, num_e is used to represent the number of edges, num_out is used to represent the vertex out-degree, and num_in is used to represent the vertex in-degree;
[0131] S2: Based on the breadth-first traversal method, traverse G and collect the above-mentioned general features of G:
[0132] S2.1: Initially: num_v = 0; num_e = 0; vertex information set S2.2: Select an initial node v i , set num_v = 1; count vertex v i Outgoing degree num_out i , in-degree num_in i , record set S = {(v i , num_out i , num_in i )};
[0133] S2.3: With v i As the starting point, use the breadth-first traversal method to first query v i Neighbor node v j , set num_e = num_e + 1, num_v = num_v + 1, and record the vertex information into the set S every time a vertex is found; finally, the vertex information set S = {(v i , num_out i , num_in i ), (v j , num_out j , num_in j ), …}.
[0134] S1032: Compare the number of vertices of the target directed graph with the number of vertices of the graph G i Compare the number of vertices of the target directed graph with that of the graph G to obtain the vertex number similarity determination result; compare the number of edges of the target directed graph with that of the graph G i Compare the number of edges of the target directed graph with that of the graph G to obtain the edge number similarity judgment result; compare the vertex out-degree of the target directed graph with that of the graph G i Compare the vertex out-degree of the target directed graph with that of the graph G to obtain the out-degree similarity determination result; compare the vertex in-degree of the target directed graph with that of the graph G i The vertex in-degrees are compared to obtain the in-degree similarity determination results; wherein each similarity determination result is represented by a quaternion of subjective logical opinions;
[0135] Specifically, the four-tuple of so-called subjective logical opinions has been introduced above and will not be repeated here.
[0136] As an implementation method, set num_v to represent the number of vertices of the target directed graph, and num_v' to represent the number of vertices of the graph G. i According to formula (6), we can get the vertex number similarity determination result ω v :
[0137]
[0138] As an implementation method, num_e represents the number of edges in the target directed graph, and num_e' represents the graph G. i According to formula (7), we can get the edge number similarity determination result ω e :
[0139]
[0140] in, △ can be understood as the difference in the number of edges between two directed graphs.
[0141] The process of similarity determination for vertices with the same out-degree or in-degree is divided into two steps: ① similarity determination based on the out-degree or in-degree of a certain degree; ② fusion of the determination results of all degrees.
[0142] As an implementation method, the similarity determination of the first link is performed for vertices with the same in-degree according to the following process: Let di(x) represent the number of vertices with in-degree x in the target directed graph, and di'(x) represent the graph G i The number of vertices with in-degree x is obtained according to formula (8) to obtain the in-degree similarity determination result ω of in-degree x. x di :
[0143]
[0144] As an implementation method, the similarity determination of the first link is performed for vertices with the same out-degree according to the following process: let do(x) represent the number of vertices with out-degree x in the target directed graph, and do'(x) represent the graph G i The number of vertices with out-degree x is obtained according to formula (9):
[0145] It should be noted that the principles for setting the above formulas (8) and (9) are: the value range of belief b is [0, 0.5], and it increases monotonically as the difference in the number of vertices with in-degree x decreases; the value range of negative belief d is [0, 0.5), and it increases monotonically as the difference in the number of vertices with in-degree x increases; the value range of uncertainty u is [0.5, 1), and it increases monotonically as the difference in the number of vertices with in-degree x increases.
[0146] Finally, based on formula (8) and formula (9), the similarity determination of the second link is performed for vertices with the same out-degree or in-degree according to the following process, specifically including: calculating the out-degree similarity determination result ω of all degrees io :ω io =ω i1 ⊕ω i2 ⊕…⊕ω im ⊕ω o1 ⊕ω o2 ⊕…⊕ω om ; Among them, ω i1 ,ω i2 ,…,ω im is the in-degree similarity judgment result obtained according to the number of vertices with in-degree 1, 2, …, maxi, ω o1 ,ω o2 ,…,ω om is the out-degree similarity judgment result obtained based on the number of vertices with out-degree 1, 2, …, maxo.
[0147] It should be noted that there is a possibility that not all the levels of the two directed graphs have vertices. For example, the maximum in-degree of the target directed graph is 5, and the graph G i The maximum in-degree of is 6. In this case, the number of vertices with in-degree 6 in the target directed graph can be counted as 0.
[0148] S1033: Using a subjective logic consensus operator to fuse the vertex number similarity determination result, the edge number similarity determination result, the out-degree similarity determination result and the in-degree similarity determination result, to obtain the target directed graph and the graph G i The similarity judgment opinions of the graphic profiles;
[0149] Specifically, the fusion process is similar to the fusion of the similarity determination results in the text similarity determination process, and will not be described in detail here.
[0150] S1034: Calculate the similarity result according to the similarity judgment opinion of the graphic profile. If the similarity result is not less than the preset threshold k_g, then the graphic G i Add to graphics collection G T ;
[0151] S1035: From the graph set G S The graphic features of the next graphic are read, and steps S1032 to S1034 are executed on it until the graphic set G S All the graphs in have been compared with the target directed graph to obtain the final graph set G T ;
[0152] S1036: If the graphic set G T If it is not an empty set, then query the requirements corresponding to each graph and add the requirements to the graph profile similarity set P g , the graph profile similarity set P at this time g That is the recommended set of requirements; otherwise, the output is: no qualified directed graph is matched.
[0153] S104: Query the network deployment solution corresponding to each requirement in the requirement recommendation set, and recommend them to the user in order of similarity from large to small.
[0154] The embodiment of the present invention mainly compares the similarity between user needs and existing needs in the demand library from two aspects: text and directed graph. In the first stage, the two are compared from the text aspect to filter out needs with dissimilar texts from the demand library. In the second stage, based on the first stage, needs with dissimilar directed graphs are further filtered out to obtain a set of recommended needs.
[0155] Furthermore, in order to normalize the similarity judgment opinions at different stages or the similarity judgment results of different feature indicators at the same stage, the theory of subjective logic is introduced in the embodiment of the present invention, and subjective logic opinions are used to describe the similarity between each feature indicator. Then, the reasoning rules of subjective logic are used to reasonably integrate multiple judgment results or judgment opinions to form the final result.
[0156] Example 2
[0157] In order to further seek a network deployment solution that better meets user needs, based on the above embodiment 1, the embodiment of the present invention also provides a network deployment solution recommendation method based on multi-stage similarity determination, including the following steps:
[0158] S201: accepting user demand information, wherein the user demand information includes network topology information in the form of a directed graph and a demand description text, which are respectively recorded as a target directed graph and a target text;
[0159] S202: extracting the text profile features of the target text and comparing them with the text profile features of each requirement in the requirement library, so as to filter out all requirements similar to the profile of the target text from the requirement library and add them into the text profile similarity set P t ;
[0160] S203: Extract the graphical overview features of the target directed graph and compare them with the text overview similarity set P t The graphical profile features of each requirement in the text are compared to obtain the similarity set P of the text profile. t All requirements similar to the target directed graph are screened and added to the graph profile similarity set Pg , the graph profile similarity set P g As a collection of demand recommendations;
[0161] It should be noted that the implementation process of the above steps S201 to S203 can refer to the corresponding content in Example 1, and will not be repeated here.
[0162] S204: Extract the text structure features of the target text and compare them with the text profile similarity set P t The text structure features of each requirement in the text are compared so as to select the similarity set P from the text profile. t All requirements with similar structure to the target text are screened and added to the text structure similarity set P sp ;
[0163] Specifically, this step includes the following sub-steps:
[0164] S2041: Setting the text structure features to include keywords and phrase associations; and determining the text profile similarity set P t The corresponding text set T S ,
[0165] S2042: From the text set T S Read a text t i The keyword set, then from the text t i Read a keyword from the keyword collection; set the target text t and t i The initial similarity judgment opinion is ω 0 =(0,0,1,0.5);
[0166] S2043: Check whether the keyword exists in the target text;
[0167] S2044: If it exists, record the position of the keyword in the target text, and compare the keyword in the target text and the text t i The similarity between the number of occurrences in the text is obtained to obtain the text keyword number of occurrence similarity judgment result of the current keyword; the text keyword number of occurrence similarity judgment result is represented by a quaternary group of subjective logical opinions.
[0168] Specifically, the text keyword features in the demand library can be represented in a set manner, specifically: {(sp 1 ,n 1 ),(sp 2 ,n 2 ),...,(sp m ,n m )}. Among them, sp iFor keywords, n i The number of times or frequency of keyword occurrence.
[0169] As an implementation method, set n i Indicates the keyword sp i In the text i The number of occurrences in n x Indicates the keyword sp i The number of occurrences in the target text is calculated according to formula (10) to obtain the similarity determination result of the number of occurrences of the text keyword ω i :
[0170]
[0171] If the target text and a text in the demand library have the same keyword, in order to further examine the correlation between the two keywords, the distance between the keywords is examined, specifically: according to the keyword in the target text and the text t i The position in the text is calculated to obtain the text keyword association similarity determination result of the current keyword;
[0172] As an implementation method, set the keyword in the target text or text t i The position in is {pos 1 ,pos 2 ,...,pos n}, avg = (len 1 +len 2 +...+len n-1 ) / n-1,len i =pos i+1 -pos i First, calculate the correlation parameter △s between multiple positions of the same keyword in the target text according to formula (11): a and text t i The correlation parameter △s between multiple positions of the same keyword in b :
[0173]
[0174] Then, based on formula (11), the text keyword association similarity determination result is obtained according to formula (12):
[0175]
[0176] The subjective logic consensus operator is used to fuse the text keyword occurrence similarity determination result and the text keyword association similarity determination result to obtain the target text and text t iOpinions on the text structure similarity of the current keyword;
[0177] Specifically, the fusion process is similar to the fusion of the similarity determination results in the text similarity determination process, and will not be described in detail here.
[0178] S2045: If it does not exist, then read the text t i The next keyword is read from the keyword collection, and the process jumps to step S2043 until the text t is processed. i All the keywords in the keyword set are obtained by i Opinions on the text structure similarity of all keywords;
[0179] S2046: Using a subjective logic consensus operator to compare the target text with the text t i The opinions on the text structure similarity of all keywords are integrated to obtain the target text and text t i The text structure similarity judgment opinion ω x , judging the opinion ω according to the text structure similarity x Calculate the similarity result. If the similarity result is not less than the preset threshold k_sp, the text t i The corresponding requirements are added to the text structure similarity set P sp ;
[0180] S2047: From the text set T S The keyword set of the next text is read and processed according to steps S2042 to S2046 until the text set T S The keyword sets of all texts in have been processed, and the final text structure similarity set P is obtained. sp And the corresponding text structure similarity judgment opinions;
[0181] S205: Using the addition algorithm and the subtraction algorithm to compare the graph structure features of the target directed graph with the graph profile similarity set P g The graphical structural features of each requirement are compared to obtain the graphical structural features of each requirement from the graphical profile similarity set P g All requirements similar to the structure of the target directed graph are screened and added to the graph structure similarity set P r ;
[0182] Specifically, the purpose of this step is to further determine the similarity of the structures of the two graphics based on the graphics that have been preliminarily determined to be similar in general appearance, so as to effectively improve the accuracy of the determination. The process of determining the similarity of the graph structure specifically involves two parts: the addition algorithm and the subtraction algorithm. The addition algorithm can be understood as: based on the specific initial vertices of the two graphics, the vertices and corresponding edges are gradually added according to the original directed graph structure, thereby expanding the scale of the two graphics, and scoring their structural similarity based on subjective logic; the subtraction algorithm can be understood as: gradually deleting the vertices with the smallest out-degree or in-degree in the directed graph and the edges directly connected to the vertices, thereby reducing the scale of the two graphics, and scoring their structural similarity based on subjective logic. By comprehensively evaluating the evaluation results of the addition algorithm or the subtraction algorithm, the output result of the graph structure similarity is finally obtained.
[0183] As an implementable method, this step includes the following sub-steps:
[0184] S2051: Determine the graphic profile similarity set P g The corresponding graph set G T , from the graph set G T Choose any shape G i ;
[0185] S2052: Using the dot-adding algorithm to compare the graphical structural features of the target directed graph with the graph G i The graphic structural features of are compared, and the comparison process is recorded as the point adding process, which specifically includes:
[0186] S2052.1: Add the vertices with the largest out-degree or in-degree in the target directed graph to the candidate set P 1 _X, the graph G i The vertices with the largest out-degree or in-degree are included in the candidate set P. 2 _X;
[0187] Specifically, since the vertex adding process starts with a specific initial vertex, the selection of the initial vertex is very important for the vertex adding sub-algorithm. In the similarity comparison of two graphs, there are multiple choices for adding vertices.
[0188] As an implementable method, the embodiment of the present invention selects the vertex with the largest out-degree or in-degree as the corresponding initial vertex. Even so, when there are multiple vertices with the largest in-degree or out-degree in the graph, there are still multiple choices. To this end, the embodiment of the present invention includes these initial vertices that meet the conditions into the candidate set and gradually eliminates them in the subsequent point addition process.
[0189] For example, let num_Amax be the number of vertices in graph A with the largest out-degree or in-degree. Count all vertices in graph A that meet the conditions to form the initial vertex set V.A ; Let the number of the largest out-degree or in-degree of graph B be num_Bmax, count all the vertices that meet the conditions in graph B to form the initial vertex set V B ; Set the elimination threshold k_t; from V A and V B By randomly selecting a vertex, several initial vertex pairs can be formed.
[0190] S2052.2: Select one vertex from each of the two candidate sets to form a vertex pair as the initial vertex pair; and set the target directed graph and graph G i The initial similarity judgment opinion between them;
[0191] Specifically, the target directed graph and the graph G are initially selected according to the different initial vertex pairs. i The initial similarity judgment opinions between are set as follows:
[0192] (1) The selected initial vertices are the vertex with the largest out-degree and the vertex with the largest in-degree in their respective graphs (for example, the target directed graph selects the vertex with the largest out-degree, and the graph G i Select the vertex with the largest in-degree). When the difference between the in-degree and out-degree of two vertices is r, the initial similarity judgment opinion is set to (0.6-r / 2, 0.2+r / 4, 0.2+r / 4, 0.6).
[0193] (2) The selected initial vertices are all the vertices with the largest out-degree or in-degree in their respective graphs. When the difference between the out-degree and in-degree of two vertices is r (r>0), the initial similarity judgment opinion is set to (0.8-r / 2, 0.1+r / 4, 0.1+r / 4, 0.8);
[0194] (3) The selected initial nodes are all vertices with the largest out-degree or in-degree in their respective graphs, and when the out-degree and in-degree of the two vertices are the same, the initial similarity judgment opinion is set to (1, 0, 0, 0.5);
[0195] It should be noted that when two graphs each have one node, although the two graphs have the same number of nodes, the out-degree and in-degree of the nodes may be different. Therefore, the two nodes cannot be considered completely similar. Setting the initial similarity judgment opinion is also to prepare for subsequent screening to obtain the most accurate graph possible.
[0196] S2052.3: Starting from the selected initial vertex pair, perform a vertex addition and edge connection operation on the two vertices respectively through the breadth-first traversal method to obtain two intermediate graphs, which are respectively recorded as the first intermediate graph and the second intermediate graph. Calculate the similarity judgment opinion and the corresponding similarity result of the first intermediate graph and the second intermediate graph after this operation. If the similarity result is not less than the preset threshold k_t, perform the next addition operation until the target directed graph and / or graph G is obtained. i All vertices of have been added, and then the similarity judgment opinions after each operation are merged using the subjective logic consensus operator to obtain the overall similarity judgment opinion of the current initial vertex pair; if the similarity result is less than the elimination threshold, the operation on the current initial vertex pair is stopped;
[0197] For example, suppose the similarity judgment opinion of two directed graphs after each addition operation is ω i , then if n addition operations are performed in the entire process of adding points, the similarity judgment opinions after each addition operation are ω 1 ,ω 2 ,ω 3 ,…,ω n , the overall similarity judgment opinion after the entire point adding process ω=ω 1 ⊕ω 2 ⊕…⊕ω n .
[0198] Opinion on similarity judgment after each increase operationω i The calculation process of can mainly refer to formula (6) and formula (7) above.
[0199] For example, add vertices and connect edges to graphs A and B. In the current add operation step of graph A, the number of vertices added is ea, and the number of edges added is va; in the current add operation step of graph B, the number of vertices added is eb, and the number of edges added is vb. Then, referring to formula (6) and ea and eb, the similarity judgment opinion ω determined from the number of vertices can be obtained. i1 , referring to formula (7) and va and vb, we can get the similarity judgment opinion ω determined by the number of edges i2 , the consensus operator is used to fuse the above two similarity judgment opinions to obtain ω i =ω i1 ⊕ω i2 .
[0200] Combination Figure 3 , the whole process of adding points is further explained. Assuming that the user provides a directed graph such as Figure 3-1 -A, now from the graphic set G that has been filtered by the graphic overview T Choose a directed graph such as Figure 3-1 -B; (The following is only a comprehensive description of the point adding process, assuming that the similarity result after each addition operation in the point adding process is greater than the elimination threshold k_t.)
[0201] S1: According to the stored directed graph information, num_Amax=num_Bmax=3, select the vertex pair {a, a'} from the vertex set as the initial vertex pair, and put them into the set Q and the set Q' respectively, such as Figure 3-2 -A, as shown in 3-2-B;
[0202] S2: The first addition operation finds its adjacent vertices and the edges directly connected to the initial vertex, adds vertices b, c, d and directed edges (b, a), (c, a), (d, a) to set Q, and adds vertices b', c', d' and directed edges (b', a'), (c', a'), (d', a'), (a', c') to set Q'; Figure 3-3 -A, 3-3-B;
[0203] S3: The second addition operation, through the breadth-first traversal method, first traverses the vertex pair {b, b'}, finds the edges other than those connected to the initial vertex, and directly adds the directed edge (e, b) and the vertex e connected to the edge to the set Q, and adds the directed edge (c', b') to the set Q', forming Figure 3-4 -A and Figure 3-4 -The structure shown in B;
[0204] S4: The third addition operation traverses the vertex pair {c,c'}, finds the remaining directed edges and new vertices outside their respective sets, adds directed edges (c,e) and (c,d) to set Q, and adds directed edge (c',d') to set Q', forming Figure 3-5 -A. Figure 3-5 -The structure shown in B;
[0205] S5: The fourth increase operation traverses the vertex pair {d, d'}. Figure 3-1 -A and directed Figure 3-1 -B has completed all the points, and the entire point adding process is completed.
[0206] S2052.4: Return to step S2052.2 to select the next initial vertex pair, and execute step S2052.3 until all initial vertex pairs have been processed;
[0207] S2052.5: Count the overall similarity judgment opinions and corresponding overall similarity results of all initial vertex pairs. If the largest overall similarity result is less than the preset threshold k_t, the graph G is i From the graph set G Tand return to step B1 to remove from the graph set G T Select the next graphic and execute step B2; otherwise, use the overall similarity judgment opinion corresponding to the maximum overall similarity result as the overall similarity judgment opinion of the point adding process, and jump to step S2053;
[0208] S2053: Using a point reduction algorithm to compare the graphical structural features of the target directed graph with the graph G i The graphic structural features of are compared, and the comparison process is recorded as the point reduction process, which specifically includes:
[0209] S2053.1: Add all vertices in the target directed graph to the candidate set P 1 _Y, the graph G i All vertices in are added to the candidate set P 2 _Y;
[0210] Specifically, the initial graph of the point reduction algorithm is the original directed graph, so all vertices in the original directed graph need to be added to the candidate set first.
[0211] S2053.2: Select the vertex with the smallest out-degree or in-degree from each of the two candidate sets;
[0212] Specifically, the object of the point reduction algorithm is the vertex with the smallest out-degree or in-degree in the directed graph topology. When encountering vertices that meet the conditions, these vertices are deleted, and the original directed graph topology is continuously simplified in this way. When a structure that meets the algorithm end requirements is finally obtained, the algorithm ends. Therefore, it is necessary to select the vertex with the smallest out-degree or in-degree from the candidate set. It can be understood that in the calculation process, the similarity judgment opinions obtained by the point reduction step are constantly reduced.
[0213] S2053.3: Perform a deletion operation on the vertex with the smallest out-degree or in-degree and its connecting edges from the target directed graph to obtain two intermediate graphs, which are respectively recorded as the third intermediate graph and the fourth intermediate graph. Calculate the similarity judgment opinion and the corresponding similarity result of the third intermediate graph and the fourth intermediate graph after this operation. If the similarity result is not less than the preset threshold k_t, perform the next deletion operation until the structure of the third intermediate graph and the structure of the fourth intermediate graph meet the given structural requirements. Then, use the subjective logic consensus operator to merge the similarity judgment opinions after each operation to obtain the overall similarity judgment opinion of the point reduction process. If the similarity result is less than the elimination threshold, stop the current graph G. i Operations;
[0214] For example, set the elimination threshold k_t; search for the nodes with the smallest in- and out-degrees in the two directed graphs respectively; let the number of nodes with the smallest out-degree or in-degree in graph A be num_Amin each time the nodes are reduced, count all the vertices that meet the conditions in graph A, and delete the edges directly connected to the vertices; let the number of nodes with the smallest out-degree or in-degree in graph B be num_Bmin, count all the vertices that meet the conditions in graph B, and delete the edges directly connected to the vertices; for the directed graph structure after reducing the points, calculate the similarity of the directed graphs.
[0215] For example, suppose the similarity judgment opinion of two directed graphs after each deletion operation is ω i , then if n deletion operations are performed in the entire point reduction process, the similarity judgment after each deletion operation is ω 1 ,ω 2 ,ω 3 ,…,ω n , the overall similarity judgment opinion after the entire point reduction process
[0216] Opinion on similarity after each deletion operationω i The calculation process of can mainly refer to formula (6) and formula (7) above.
[0217] For example, when deleting vertices and connecting edges on graphs A and B, the number of vertices reduced in the current deletion operation step of graph A is ea, and the number of edges reduced is va; the number of vertices reduced in the current deletion operation step of graph B is eb, and the number of edges reduced is vb; then referring to formula (6) and ea and eb, the similarity judgment opinion ω determined from the number of vertices is obtained i1 , refer to formula (7) and va and vb, and get the similarity judgment opinion ω determined by the number of edges i2 , the consensus operator is used to fuse the above two similarity judgment opinions to obtain ω i =ω i1 ⊕ω i2 .
[0218] As an implementable method, in the subtraction algorithm, the given structure at the end is required to be divided into the following two cases: (1) The number of vertices with the same out-degree or in-degree in the final vertex set is greater than 1, that is, there is no root node. At this time, the final vertex structure is retained for the subsequent similarity judgment calculation. (2) The number of remaining vertices in the final vertex set is 1, that is, the root node. At this time, the root node is retained for the subsequent similarity judgment calculation.
[0219] Combination Figure 4 , the whole point reduction process is further explained. Assuming that the user provides a directed graph such as Figure 4-1 -A, now from the graphic set G that has been filtered by the graphic overviewT Choose a directed graph such as Figure 4-1 -B; put all the vertices of the two graphs into vertex sets T and T' respectively: (The following is only a comprehensive description of the point reduction process, assuming that the similarity result after each deletion operation in the point reduction process is greater than k_t.)
[0220] S1: The first deletion operation, according to the stored directed graph information, num_Amin=num_Bmin=1, the out-degree of node e and node d is 1, and the in-degree is 1, and node e and node d are deleted from the vertex set T; similarly, vertex d' is deleted from the vertex set T'; Figure 4-2 -A, as shown in 4-2-B;
[0221] S2: The second deletion operation, num_Amin = num_Bmin = 1, delete vertices b and c from the vertex set T, and delete vertex c' from the vertex set T', such as Figure 4-3 -A. Figure 4-3 -As shown in B;
[0222] S3: The third deletion operation. At this time, there is only one vertex left in the vertex set T, namely the root node. Figure 4-1 -A point reduction is completed, such as Figure 4-4 -A shows; div in vertex set T' out (a')=div out (b')=1,div in (a')=div in (a') = 1, retain the node structure, directed Figure 4-1 -B point reduction completed, such as Figure 4-4 -B; the algorithm ends.
[0223] S2053.4: Calculate the similarity result based on the overall similarity judgment opinion of the point reduction process. If the similarity result is not less than the preset threshold k_t, then the graph G i Add to graphics collection G R ;
[0224] S2054: Use the consensus operator of subjective logic to merge the overall similarity judgment opinions of the adding process and the overall similarity judgment opinions of the subtracting process to obtain the target directed graph and the graph G i The graph structure similarity judgment opinion ω r ;
[0225] S2055: Repeat steps S2051 to S2054 until the graph set G T All the graphs in have been compared with the target directed graph, and the final graph set G is obtained. R , the graph set G RThe demand set corresponding to each graph in is the graph structure similarity set P r .
[0226] S206: Using the subjective logic consensus operator to convert the text structure similarity set P sp The text similarity judgment opinions corresponding to each requirement in the structure similarity set P r The graph similarity judgment opinions corresponding to each demand in the fusion are combined to obtain a new demand recommendation set, which is used as the final demand recommendation set;
[0227] S207: Query the network deployment solution corresponding to each requirement in the requirement recommendation set, and recommend them to the user in descending order of similarity.
[0228] In the above embodiments, the fusion rule for fusing multiple similarity determination results or similarity determination opinions using the consensus operator of subjective logic is specifically as follows:
[0229] Setting A and ω B Respectively represent any two similarity judgment results, ω A = {b A ,d A ,u A ,a A},ω B = {b B ,d B ,u B ,a B};ω A◇B It represents the fusion result of two similarity determination results. Formula (4) is used to fuse any two similarity judgment results or similarity judgment opinions:
[0230]
[0231] in, is a consensus operator, k = u A +u B -u A u B ;
[0232] And, the similarity result of any similarity determination result or similarity determination opinion is calculated according to formula (5):
[0233] E=b+u*a (5)
[0234] Among them, E represents the similarity judgment result or the similarity result of the similarity judgment opinion ω, E is a number between 0 and 1, and the larger the value, the more similar it is, ω=(b, d, u, a), b represents belief, d represents negative belief, u represents uncertainty, and a represents relative atomicity.
[0235] The above-mentioned embodiment 1 mainly compares the user needs with the existing needs in the needs library from the aspect of overview (including text overview and graphic overview). The embodiment of the present invention goes further on the basis of embodiment 1 and compares the similarity between the two from the aspect of structure (including text structure and graphic structure). Based on the text overview comparison results of the first stage in embodiment 1, the first stage of the embodiment of the present invention further compares the two from the aspect of text structure, so as to further screen out the needs with dissimilar text structures; at the same time, based on the graphic overview comparison results of the second stage in embodiment 1, the second stage of the embodiment of the present invention further compares the two from the aspect of graphic structure, so as to further screen out the needs with dissimilar graphic structures. Finally, the judgment opinions of the two stages are integrated to obtain a new demand recommendation set, which is smaller in scope than the demand recommendation set in embodiment 1 and better meets user needs.
[0236] Example 3
[0237] like Figure 5 As shown, an embodiment of the present invention provides a network deployment solution recommendation system based on multi-stage similarity determination, including a demand library, a solution library, a profile feature set, a determination unit and a library maintenance unit;
[0238] Among them, the solution library is used to store network deployment solutions; the requirement library is used to store the requirements corresponding to each network deployment solution; the profile feature set is used to centrally store the profile feature data extracted for each requirement, and the profile feature data includes text profile features and graphic profile features; the determination unit is used to receive network deployment requirements submitted by users, and use the network deployment solution recommendation method in the above-mentioned embodiments to recommend network deployment solutions to users; the library maintenance unit is used to complete the mapping relationship between network deployment solutions and requirements; and to complete the maintenance (addition, deletion and modification) of the solution library, the requirement library and the profile feature set, and the work of extracting profile feature data from the requirements is also completed by the library maintenance unit.
[0239] It can be seen from the above method embodiments that the similarity determination algorithm adopted by the network deployment solution recommendation system is composed of multiple algorithms, including two parts: an overview similarity algorithm and a structural similarity algorithm. The overview similarity algorithm can match and screen the basic overview features of text and graphics to find out the requirements that basically meet the similarity conditions. The accuracy of the overview similarity determination is poor, but the determination efficiency is fast, and the time complexity is approximately O(n). The structural similarity determination algorithm is to determine the similarity of the structural features of the text and graphics based on the results of the overview similarity determination. The algorithm has high determination accuracy, but poor determination efficiency, and the time complexity is approximately O(nlog 2 n). The specific contents of the above-mentioned various algorithms have been described in detail in the above-mentioned method embodiments and will not be repeated here.
[0240] The present invention uses multi-stage similarity to determine the similarity between user needs and each need in the demand library from two perspectives: demand text and network topology. In terms of text, the present invention uses key words, phrase frequency, phrase position, etc. to make similarity determinations, forming a text overview similarity algorithm and a text structure similarity algorithm. In terms of network topology, the present invention uses directed graph features and directed graph structures to make similarity determinations, forming a graphic overview similarity algorithm and a graphic structure similarity algorithm. In order to unify the dimensions of the similarity determination results of multiple algorithms, the present invention uses subjective logic to describe the determination results, and uses subjective logic consensus rules to reasonably merge multiple results. For the use of the algorithm, we adopt the steps of overview first and structure later, first eliminating a large number of irrelevant needs from the demand library, and then comprehensively examining the similarities between the remaining needs, so that the algorithm accuracy and time complexity achieve a comprehensive balance.
[0241] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A network deployment solution recommendation method based on multi-stage similarity determination, characterized in that: include: Step 1: accepting user demand information, wherein the user demand information includes network topology information in the form of a directed graph and a demand description text, which are respectively recorded as a target directed graph and a target text; Step 2: Extract the text profile features of the target text and compare them with the text profile features of each requirement in the requirement library, so as to filter out all requirements similar to the profile of the target text from the requirement library and add them to the text profile similarity set P t ; Specifically include: Step 2.1: Extract the text profile features of the target text and read a text t from the demand library. i The text overview features include the text title, the number of text paragraphs and the text length; Step 2.2: Align the text title of the target text with the text t i The text titles of the target text are compared to obtain the text title similarity determination result; the number of text paragraphs of the target text is compared with the text t i The number of text paragraphs is compared to obtain the similarity determination result of the number of text paragraphs; the text length of the target text is compared with the text t i The text lengths are compared to obtain the text length similarity determination results; wherein each of the similarity determination results is represented by a quaternary of subjective logical opinions; Step 2.3: Use the subjective logic consensus operator to fuse the text title similarity determination results, the text paragraph number similarity determination results and the text length similarity determination results to obtain the target text and text t i The text profile similarity opinion ω t ; Step 2.4: Based on the text profile similarity opinion ω t Calculate the similarity result. If the similarity result is not less than the preset threshold k_t, the text t i The corresponding requirements are added to the text profile similarity set P t ; Step 2.5: Read the text profile features of the next text from the demand library, and execute steps 2.2 to 2.4 on it until all the texts in the demand library have been compared with the target text, and the final text profile similarity set P is obtained. t ; Step 3: Extract the graphical features of the target directed graph and compare them with the textual profile similarity set P t The graphical profile features of each requirement in the text are compared to obtain the similarity set P of the text profile. t All requirements similar to the target directed graph are screened and added to the graph profile similarity set P g , the graph profile similarity set P g As a set of requirements recommendations; specifically including: Step 3.1: Extract the graph profile features of the target directed graph and determine the text profile similarity set P t The corresponding graph set G S , from the graph set G S Read a graph G in i The graph overview features include the number of vertices, the number of edges, the number of vertex out-degrees, and the number of vertex in-degrees; Step 3.2: Compare the number of vertices of the target directed graph with the number of vertices of the graph G i Compare the number of vertices of the target directed graph with that of the graph G to obtain the vertex number similarity determination result; compare the number of edges of the target directed graph with that of the graph G i Compare the number of edges of the target directed graph with that of the graph G to obtain the edge number similarity judgment result; compare the vertex out-degree of the target directed graph with that of the graph G i Compare the vertex out-degree of the target directed graph with that of the graph G to obtain the out-degree similarity determination result; compare the vertex in-degree of the target directed graph with that of the graph G i The vertex in-degrees are compared to obtain the in-degree similarity determination results; wherein each similarity determination result is represented by a quaternion of subjective logical opinions; Step 3.3: Use the consensus operator of subjective logic to fuse the vertex number similarity determination results, the edge number similarity determination results, the out-degree similarity determination results and the in-degree similarity determination results to obtain the target directed graph and the graph G i The similarity judgment opinions of the graphic profiles; Step 3.4: Calculate the similarity result based on the similarity judgment opinion of the graphic profile. If the similarity result is not less than the preset threshold k_g, then the graphic G i Add to graphics collection G T ; Step 3.5: From the graph set G S Read the next graphic overview feature from the graph, and execute steps 3.2 to 3.4 on it until the graph set G S All the graphs in have been compared with the target directed graph to obtain the final graph set G T ; Step 3.6: If the graph set G T If it is not an empty set, then query the requirements corresponding to each graph and add the requirements to the graph profile similarity set P g ; Step 4: Query the network deployment solution corresponding to each requirement in the requirement recommendation set, and recommend them to the user in descending order of similarity.
2. The network deployment solution recommendation method based on multi-stage similarity determination according to claim 1 is characterized in that: Also include before step 4: Step A: Extract the text structure features of the target text and compare them with the text profile similarity set P t The text structure features of each requirement in the text are compared so as to select the similarity set P from the text profile. t All requirements with similar structure to the target text are screened and added to the text structure similarity set P sp ; Step B: Use the addition algorithm and the subtraction algorithm to compare the graphical structure features of the target directed graph with the graphical profile similarity set P g The graphical structural features of each requirement are compared to obtain the graphical structural features of each requirement from the graphical profile similarity set P g All requirements similar to the structure of the target directed graph are screened and added to the graph structure similarity set P r ; Step C: Use the subjective logic consensus operator to convert the text structure similarity set P sp The text similarity judgment opinions corresponding to each requirement in the structure similarity set P r The graph similarity judgment opinions corresponding to each demand in the fusion are combined to obtain a new demand recommendation set, which is used as the final demand recommendation set.
3. The network deployment solution recommendation method based on multi-stage similarity determination according to claim 1 is characterized in that: In step 2.2, the text title similarity determination result ω is obtained according to formula (1): s : Among them, s represents the target text title, s i Indicates the text title in the requirements library, s i ∈s means s i is a substring of s; According to formula (2), we can get the similarity determination result of the number of text paragraphs ω: n : Where n represents the number of target text paragraphs, n i Indicates the number of text paragraphs in the requirement library; According to formula (3), we can get the text length similarity determination result ω l : Among them, l represents the target text length, l i Indicates the length of the text in the requirement library.
4. The network deployment solution recommendation method based on multi-stage similarity determination according to claim 1 is characterized in that: In step 3.2, the vertex number similarity determination result ω is obtained according to formula (6): v : Among them, num_v represents the number of vertices of the target directed graph, and num_v' represents the graph G i The number of vertices; According to formula (7), we can get the edge number similarity determination result ω e : Among them, num_e represents the number of edges in the target directed graph, and num_e' represents the graph G i The number of edges; According to formula (8), we can get the in-degree similarity judgment result with in-degree x: Among them, di(x) represents the number of vertices with in-degree x in the target directed graph, and di'(x) represents the graph G. i The number of vertices with in-degree x; According to formula (9), the out-degree similarity determination result of out-degree x is obtained: Among them, do(x) represents the number of vertices with out-degree x in the target directed graph, and do'(x) represents the graph G. i The number of vertices with out-degree x; Based on formula (8) and formula (9), the similarity determination result ω of all degrees is calculated: io : Among them, ω i1 ,ω i2 ,…,ω im is the in-degree similarity judgment result obtained according to the number of vertices with in-degree 1, 2, …, maxi, ω o1 ,ω o2 ,…,ω om is the out-degree similarity judgment result obtained based on the number of vertices with out-degree 1, 2, …, maxo.
5. The network deployment solution recommendation method based on multi-stage similarity determination according to claim 2 is characterized in that: Step A specifically includes: Step A1: Set the text structure features to include keywords and phrase associations; and determine the text profile similarity set P t The corresponding text set T S , Step A2: From the text set T S Read a text t i The keyword set, then from the text t i Read a keyword in the keyword collection; Step A3: Check whether the keyword exists in the target text; Step A4: If it exists, record the position of the keyword in the target text, and compare the keyword in the target text and text t i The similarity between the number of occurrences in the target text and the text t is obtained to obtain the text keyword occurrence similarity determination result of the current keyword; according to the keyword respectively in the target text and the text t i The position in the text is calculated to obtain the text keyword association similarity determination result of the current keyword; wherein each of the similarity determination results is represented by a quaternary group of subjective logical opinions; The subjective logic consensus operator is used to fuse the text keyword occurrence similarity determination result and the text keyword association similarity determination result to obtain the target text and text t i Opinions on the text structure similarity of the current keyword; Step A5: If it does not exist, then extract the text t i The next keyword is read from the keyword collection, and the process jumps to step A3 until the text t is processed. i All the keywords in the keyword set are obtained by i Opinions on the text structure similarity of all keywords; Step A6: Use the subjective logic consensus operator to compare the target text with the text t i The opinions on the text structure similarity of all keywords are integrated to obtain the target text and text t i The text structure similarity judgment opinion ω x , judging the opinion ω according to the text structure similarity x Calculate the similarity result. If the similarity result is not less than the preset threshold k_sp, the text t i The corresponding requirements are added to the text structure similarity set P sp ; Step A7: From the text set T S The next keyword set of the text is read and processed according to steps A2 to A6 until the text set T S The keyword sets of all texts in have been processed, and the final text structure similarity set P is obtained. sp And the corresponding text structure similarity judgment opinions.
6. The network deployment solution recommendation method based on multi-stage similarity determination according to claim 5 is characterized in that: In step A4, the similarity determination result ω of the number of occurrences of the text keywords is obtained according to formula (10): i : Among them, n i Indicates the keyword sp i In the text i The number of occurrences in n x Indicates the keyword sp i The number of occurrences in the target text; According to formula (11), the correlation parameter △s between multiple positions of the same keyword in the target text is calculated respectively: a and text t i The correlation parameter △s between multiple positions of the same keyword in b ; The position of the keyword in the target text or text ti is set to {pos1,pos2,...,pos n },avg=(len1+len2+...+lenn-1) / n-1,len i =pos i+1 -pos i ; Based on formula (11), the text keyword association similarity determination result is obtained according to formula (12):
7. The network deployment solution recommendation method based on multi-stage similarity determination according to claim 2 is characterized in that: Step B specifically includes: Step B1: Determine the graph profile similarity set P g The corresponding graph set G T , from the graph set G T Choose any one of the shapes G i ; Step B2: Use the dot-adding algorithm to compare the graphical structural features of the target directed graph with the graph G i The graphic structural features of are compared, and the comparison process is recorded as the point adding process, which specifically includes: Step B2.1: Add the vertices with the largest out-degree or in-degree in the target directed graph to the candidate set P1_X. i The vertices with the largest out-degree or in-degree are included in the candidate set P2_X; Step B2.2: Select one vertex from each of the two candidate sets to form a vertex pair and use it as the initial vertex pair; Step B2.3: Starting from the selected initial vertex pair, perform a vertex addition and edge connection operation on the two vertices respectively through the breadth-first traversal method to obtain two intermediate graphs, which are respectively recorded as the first intermediate graph and the second intermediate graph. Calculate the similarity judgment opinion and the corresponding similarity result of the first intermediate graph and the second intermediate graph after this operation. If the similarity result is not less than the preset threshold k_t, perform the next addition operation until the target directed graph and / or graph G is obtained. i All vertices of have been added, and then the similarity judgment opinions after each operation are merged using the subjective logic consensus operator to obtain the overall similarity judgment opinion of the current initial vertex pair; if the similarity result is less than the elimination threshold, the operation on the current initial vertex pair is stopped; wherein each similarity judgment opinion is represented by a quadruple of subjective logic opinions; Step B2.4: Return to step B2.2 to select the next initial vertex pair and execute step B2.3 until all initial vertex pairs have been processed; Step B2.5: Count the overall similarity judgment opinions and corresponding overall similarity results of all initial vertex pairs. If the largest overall similarity result is less than the preset threshold k_t, the graph G is i From the graph set G T and return to step B1 to remove from the graph set G T Select the next graphic and execute step B2; otherwise, use the overall similarity judgment opinion corresponding to the maximum overall similarity result as the overall similarity judgment opinion of the point adding process, and jump to step B3; Step B3: Use the point reduction algorithm to compare the graphical structural features of the target directed graph with the graph G i The graphic structural features of are compared, and the comparison process is recorded as the point reduction process, which specifically includes: Step B3.1: Add all vertices in the target directed graph to the candidate set P1_Y and add the graph G i All vertices in are added to the candidate set P2_Y; Step B3.2: Select the vertex with the smallest out-degree or in-degree from the two candidate sets respectively; Step B3.3: Delete the vertex with the smallest out-degree or in-degree and its connecting edge from the target directed graph, and obtain two intermediate graphs, which are respectively recorded as the third intermediate graph and the fourth intermediate graph. Calculate the similarity judgment opinion and the corresponding similarity result of the third intermediate graph and the fourth intermediate graph after this operation. If the similarity result is not less than the preset threshold k_t, perform the next deletion operation until the target directed graph and / or graph G is obtained. i All vertices of have been deleted, and then the similarity judgment opinions after each operation are integrated using the subjective logic consensus operator to obtain the overall similarity judgment opinion of the point reduction process; if the similarity result is less than the elimination threshold, stop the current graph G i Operations; Step B3.4: Calculate the similarity result based on the overall similarity judgment opinion of the point reduction process. If the similarity result is not less than the preset threshold k_t, the graph G i Add to graphics collection G R ; Step B4: Use the consensus operator of subjective logic to merge the overall similarity judgment opinions of the adding process and the overall similarity judgment opinions of the subtracting process to obtain the target directed graph and graph G i The graph structure similarity judgment opinion ω r ; Step B5: Repeat steps B1 to B4 until the graph set G T All the graphs in have been compared with the target directed graph, and the final graph set G is obtained. R , the graph set G R The demand set corresponding to each graph in is the graph structure similarity set P r .
8. A network deployment solution recommendation system based on multi-stage similarity determination, characterized in that: include: Demand library, solution library, profile feature set, determination unit and library maintenance unit; among which: The solution library is used to store network deployment solutions; The requirement library is used to store the requirements corresponding to each network deployment solution; The overview feature set is used to centrally store the overview feature data extracted for each requirement, wherein the overview feature data includes text overview features and graphic overview features; The determination unit is configured to receive a network deployment requirement submitted by a user and recommend a network deployment solution to the user using the method described in any one of claims 1 to 7; The library maintenance unit is used to complete the mapping relationship between the network deployment plan and the requirements; and to complete the maintenance of the solution library, the requirement library and the profile feature set.