Route configuration matching method and device, electronic equipment and medium

By converting capability description information and routing configuration information into machine-recognizable feature vectors, the problem of low efficiency in manual adaptation judgment in existing technologies is solved, and efficient and accurate network adaptation matching is achieved.

CN121864680APending Publication Date: 2026-04-14GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In existing technologies, manually determining the compatibility of functional modules with the network is inefficient and prone to oversights.

Method used

The capability description information of the module to be connected and the routing configuration information of the current network are converted into standardized, machine-recognizable feature vectors, matched and compared, and user prompt information is generated.

Benefits of technology

This improved the efficiency and reliability of the matching process, generated accurate user prompts, and ensured the accuracy and repeatability of the adaptation results between functional modules and the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121864680A_ABST
    Figure CN121864680A_ABST
Patent Text Reader

Abstract

The invention discloses a routing configuration matching method and device, electronic equipment and a medium, and belongs to the technical field of network routing. The method comprises the following steps: acquiring capability description information of a to-be-accessed module, and converting the capability description information into a first feature vector; the capability description information comprises at least one of routing protocol data, routing table structure data and label set data supported by the to-be-accessed module; obtaining routing configuration information of the current network, and converting the routing configuration information into a second feature vector; the routing configuration information comprises at least one of routing protocol data, routing table structure data and label set data of the current network; matching the first feature vector with the second feature vector to obtain a matching result; and according to the matching result, user prompt information is generated, and the user prompt information is used for indicating whether the to-be-accessed module adapts to the current network. Therefore, the embodiment of the invention can solve the problems of low efficiency and easy omission of the matching method in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of network routing technology, specifically relating to a routing configuration matching method, device, electronic device, and medium. Background Technology

[0002] With the widespread adoption of cloud computing, containerization, and microservice architectures, various functional modules need to be dynamically connected and run in the current network environment. Therefore, the normal operation of these functional modules depends on the adaptation between the functional modules and the current network configuration.

[0003] In existing technologies, maintenance personnel typically rely on querying relevant files to determine the compatibility of functional modules with the current network. This method is inefficient and prone to oversights. Summary of the Invention

[0004] The purpose of this invention is to provide a routing configuration matching method, device, electronic device, and medium that can solve the problems of low efficiency and easy omission in the prior art, which relies on manual judgment of compatibility.

[0005] To solve the above-mentioned technical problems, the present invention is implemented as follows: In a first aspect, embodiments of the present invention provide a route configuration matching method, the method comprising: Obtain the capability description information of the module to be accessed, and convert the capability description information into a first feature vector; the capability description information includes at least one of the routing protocol data, routing table structure data, and label set data supported by the module to be accessed; Obtain the routing configuration information of the current network and convert the routing configuration information into a second feature vector; the routing configuration information includes at least one of the routing protocol data, routing table structure data, and label set data of the current network; The first feature vector and the second feature vector are matched to obtain the matching result; Based on the matching result, a user prompt message is generated, which indicates whether the module to be accessed is compatible with the current network.

[0006] Optionally, obtaining the capability description information of the module to be accessed and converting the capability description information into a first feature vector includes: The data type of each data in the capability description information is determined, and each data is mapped to the same numerical space according to the data type corresponding to each data to obtain the first feature vector.

[0007] Optionally, determining the data type of each data in the capability description information, and mapping each data to the same numerical space according to the data type corresponding to each data to obtain a first feature vector, includes: Determine the discrete and continuous data in each piece of the capability description information; Map the discrete data to discrete encoded values; Map the continuous data to continuous encoded values; The discrete encoded value and the continuous encoded value are concatenated to obtain the first feature vector.

[0008] Optionally, the matching of the first feature vector and the second feature vector to obtain a matching result includes: Obtain the first routing protocol vector and the second routing protocol vector corresponding to the routing protocol data from the first feature vector and the second feature vector, respectively. When the second routing protocol vector contains or is equal to the first routing protocol vector, the first feature vector and the second feature vector are determined to be a protocol match.

[0009] Optionally, the step of matching the first feature vector and the second feature vector to obtain a matching result further includes: The first routing table vector and the second routing table vector, which correspond to the routing table structure data in the first feature vector and the second feature vector, are obtained respectively. The first routing table vector is used to represent the routing table entry required by the module to be accessed, and the second routing table vector is used to represent the current routing table entry of the current network. When the second routing table vector contains or is equal to the first routing table vector, and the state of the routing table entry in the current network is active, it is determined that the first feature vector and the second feature vector are a routing table match.

[0010] Optionally, the step of matching the first feature vector and the second feature vector to obtain a matching result further includes: Obtain the first label vector and the second label vector, which correspond to the label set data, from the first feature vector and the second feature vector, respectively; When the second label vector contains or is equal to the first label vector, it is determined that the first feature vector and the second feature vector are a label match.

[0011] Optionally, generating user prompt information based on the matching result includes: When the matching result is not a match, an adaptation failure message containing the mismatch item identifier and repair suggestions is generated; When the matching result is a successful match, a success message is generated.

[0012] Optionally, the route configuration matching method also includes: Perform length verification on the first feature vector and the second feature vector, and obtain the length verification result; When the length verification result is inconsistent, the first feature vector of the capability description information and the second feature vector of the routing configuration information are regenerated.

[0013] Secondly, embodiments of the present invention provide a routing configuration matching device, comprising: The first feature vector generation module is used to obtain the capability description information of the module to be accessed and convert the capability description information into a first feature vector; the capability description information includes at least one of the routing protocol data, routing table structure data, and label set data supported by the module to be accessed. The second feature vector generation module is used to obtain the routing configuration information of the current network and convert the routing configuration information into a second feature vector; the routing configuration information includes at least one of the routing protocol data, routing table structure data, and label set data of the current network. The matching module is used to match the first feature vector and the second feature vector to obtain a matching result; The prompt information generation module is used to generate user prompt information based on the matching result. The user prompt information is used to indicate whether the module to be accessed is compatible with the current network.

[0014] Optionally, the first feature vector generation module includes: The first feature vector generation submodule is used to determine the data type of each data in the capability description information, and to map each data to the same numerical space according to the data type corresponding to each data to obtain the first feature vector.

[0015] Optionally, the first feature vector generation submodule includes: A classification unit is used to determine discrete and continuous data in the various data of the capability description information; The first mapping unit is used to map the discrete data into discrete coded values; The second mapping unit is used to map the continuous data into continuous encoded values; The concatenation unit is used to concatenate the discrete encoded value and the continuous encoded value to obtain the first feature vector.

[0016] Optionally, the matching module includes: The protocol vector submodule is used to obtain, respectively, the first routing protocol vector and the second routing protocol vector corresponding to the routing protocol data from the first feature vector and the second feature vector; The protocol matching submodule is used to determine that the first feature vector and the second feature vector are protocol matched when the second routing protocol vector contains or is equal to the first routing protocol vector.

[0017] Optionally, the matching module further includes: The routing table vector submodule is used to obtain the first routing table vector and the second routing table vector corresponding to the routing table structure data in the first feature vector and the second feature vector, respectively. The first routing table vector is used to represent the routing table entry required by the module to be accessed, and the second routing table vector is used to represent the current routing table entry of the current network. The routing table matching submodule is used to determine that the first feature vector and the second feature vector are a routing table match when the second routing table vector contains or is equal to the first routing table vector and the state of the routing table entry of the current network is active.

[0018] Optionally, the matching module further includes: The label vector submodule is used to obtain, respectively, the first label vector and the second label vector corresponding to the label set data in the first feature vector and the second feature vector; The label matching submodule is used to determine that the first feature vector and the second feature vector are a label match when the second label vector contains or is equal to the first label vector.

[0019] Optionally, the prompt information generation module includes: The first prompt submodule is used to generate an adaptation failure prompt message containing an incompatible item identifier and repair suggestions when the matching result is an incompatible match. The second prompt submodule is used to generate a prompt message indicating successful adaptation when the matching result is a match.

[0020] Optionally, the route configuration matching device further includes: The length verification module is used to verify the length of the first feature vector and the second feature vector, and obtain the length verification result; The regeneration module is used to regenerate the first feature vector of the capability description information and the second feature vector of the routing configuration information when the length verification results are inconsistent.

[0021] Thirdly, embodiments of the present invention provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0022] Fourthly, embodiments of the present invention provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0023] In this embodiment of the invention, the routing configuration matching method obtains the capability description information of the module to be accessed and transforms the capability description information into a first feature vector. It also obtains the routing configuration information of the current network and transforms the routing configuration information into a second feature vector. By converting the capability description information and routing configuration information into standardized, machine-recognizable first and second feature vectors, a foundation is laid for the subsequent matching process. This allows for comparison of the first and second feature vectors within a unified vector space, ensuring that the matching results of the first and second feature vectors are more accurate and repeatable, thus improving the efficiency and reliability of the matching process. Based on the matching results, user prompt information is generated. The user prompt information indicates whether the module to be accessed is compatible with the current network. Users can obtain quickly generated and accurate user prompt information, thereby clarifying the matching result of the module to be accessed.

[0024] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0025] Figure 1 This is a flowchart of a routing configuration matching method according to an embodiment of the present invention; Figure 2 This is a flowchart of a routing configuration matching method in another embodiment of the present invention; Figure 3 This is a structural block diagram of a routing configuration matching device according to an embodiment of the present invention. Detailed Implementation

[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] The terms "first," "second," etc., used in the specification and claims of this invention are used to distinguish similar objects and are not used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0028] With the widespread adoption of cloud computing, containerization, and microservice architectures, various functional modules need to be dynamically connected and run in the current network environment. Therefore, the normal operation of these functional modules depends on the adaptation between the functional modules and the current network configuration.

[0029] In existing technologies, maintenance personnel typically rely on querying relevant files to determine the compatibility of functional modules with the current network. This method is inefficient and prone to oversights.

[0030] Therefore, one of the core concepts of this invention is to lay the foundation for the subsequent matching process by converting capability description information and routing configuration information into standardized, machine-recognizable first and second feature vectors. This allows for comparison of the first and second feature vectors within a unified vector space, ensuring that the matching results of the first and second feature vectors are more accurate and repeatable, thereby improving the efficiency and reliability of the matching process and enabling users to obtain efficient and accurate matching information.

[0031] This invention provides a routing configuration matching method, device, electronic device, and medium, which can solve the problems of low efficiency and easy omission in the prior art, which relies on manual judgment of compatibility.

[0032] The routing configuration matching method provided by the embodiments of the present invention will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0033] Figure 1 This is a flowchart of a routing configuration matching method in one embodiment of the present invention, as follows: Figure 1 As shown, this routing configuration matching method is applicable to electronic devices, such as terminals and controllers. Figure 1 The illustrated embodiment includes at least the following steps 101-104.

[0034] In step 101, the capability description information of the module to be accessed is obtained, and the capability description information is converted into a first feature vector; the capability description information includes at least one of the routing protocol data, routing table structure data, and label set data supported by the module to be accessed.

[0035] In step 101 above, the capability description information of the module to be accessed is obtained. The capability description information includes the routing protocol data, routing table structure data, and label set data supported by the module to be accessed. It can be understood that the routing protocol data defines how the network discovers and maintains its paths, the routing table structure data includes information on the routing entries required by the module to be accessed, and the label set data is used to bind network policies to specific workloads.

[0036] Furthermore, the routing protocol data, routing table structure data, and label set data are in complex formats. By transforming these data into a first feature vector, the standardization of capability description information and machine-readable characteristics are achieved. By converting capability description information, which might otherwise be expressed in natural language or various structured formats (such as YAML and JSON), into a unified first feature vector with a clear mathematical definition, a foundation is laid for subsequent matching. This not only eliminates ambiguities and omissions that might arise from manual data interpretation but also enables subsequent complex requirements to be quickly and accurately parsed by the routing configuration matching method.

[0037] In some embodiments of the present invention, the module to be accessed refers to an independently deployable or loadable unit in the system architecture that is responsible for determining the direction of traffic based on route matching. It may include network plugins, etc. By obtaining the capability description information of the module to be accessed during the startup or loading process of the module to be accessed, the network and routing environment required by the module to be accessed can be clarified.

[0038] In step 102, the routing configuration information of the current network is obtained and the routing configuration information is converted into a second feature vector; the routing configuration information includes at least one of the routing protocol data, routing table structure data and label set data of the current network.

[0039] In step 102 above, by obtaining the routing configuration information of the current network and converting it into a second feature vector, the real-time nature and standardization of the current network configuration status are ensured. Specifically, since the current network configuration is dynamically changing, this step obtains a complete snapshot of the current network routing configuration in real time through a programmatic interface, limiting the network routing configuration to the current, i.e., the latest state, and converting it into a second feature vector according to the same rules as the first feature vector. This ensures that the current network state on which the comparison is based is real-time and accurate. At the same time, the second feature vector is also standardized and machine-recognizable, thereby overcoming the problem of delayed or incomplete state information that may exist in manual verification, and ensuring the timeliness and accuracy of the subsequent matching process.

[0040] In step 103, the first feature vector and the second feature vector are matched to obtain a matching result.

[0041] Based on steps 101 to 103 above, it can be seen that the first feature vector and the second feature vector are located in a unified vector space. Therefore, the first feature vector and the second feature vector can be accurately compared, such as by performing set operations or numerical comparisons. Furthermore, both the first feature vector and the second feature vector are standard and can be recognized by machines. Thus, the matching process is entirely executed by the system, replacing the cumbersome and error-prone manual comparison process. This results in highly consistent and repeatable matching results, improving the efficiency and reliability of the matching process.

[0042] In step 104, based on the matching result, a user prompt message is generated, which indicates whether the module to be accessed is compatible with the current network.

[0043] In step 104 above, user prompt information is generated based on the matching results. In some embodiments, the prompt information generated in step 104 is used to inform the module to be accessed and the current network whether they are compatible or not. It can also generate more targeted information based on the specific mismatch dimensions revealed by the first feature vector and the second feature vector during the matching process, thereby shortening the problem diagnosis and repair cycle and reducing the technical threshold of operation and maintenance.

[0044] In this embodiment of the invention, the routing configuration matching method obtains the capability description information of the module to be accessed and transforms it into a first feature vector. It also obtains the routing configuration information of the current network and transforms it into a second feature vector. By converting the capability description information and routing configuration information into standardized, machine-recognizable first and second feature vectors, a foundation is laid for the subsequent matching process. This allows for comparison of the first and second feature vectors within a unified vector space, ensuring that the matching results are more accurate and repeatable, thus improving the efficiency and reliability of the matching process. Based on the matching results, user prompt information is generated. This user prompt information indicates whether the module to be accessed is compatible with the current network. Users receive quickly generated and accurate user prompt information, thereby clarifying the matching result of the module to be accessed. Figure 2 This is a flowchart of a routing configuration matching method in another embodiment of the present invention, such as... Figure 2 As shown, this routing configuration matching method is applicable to electronic devices, such as terminals and controllers. Figure 2 The illustrated embodiment includes at least the following steps 201-206.

[0045] In step 201, the capability description information of the module to be accessed is obtained, and the capability description information is converted into a first feature vector; the capability description information includes at least one of the routing protocol data, routing table structure data, and label set data supported by the module to be accessed.

[0046] In step 201 above, the capability description information of the module to be accessed is obtained. The capability description information includes the routing protocol data, routing table structure data, and label set data supported by the module to be accessed. It can be understood that the routing protocol data defines how the network discovers and maintains its paths, the routing table structure data includes information on the routing entries required by the module to be accessed, and the label set data is used to bind network policies to specific workloads.

[0047] Furthermore, the routing protocol data, routing table structure data, and label set data are in complex formats. By transforming these data into a first feature vector, the standardization of capability description information and machine-readable characteristics are achieved. By converting capability description information, which might otherwise be expressed in natural language or various structured formats (such as YAML and JSON), into a unified first feature vector with a clear mathematical definition, a foundation is laid for subsequent matching. This not only eliminates ambiguities and omissions that might arise from manual data interpretation but also enables subsequent complex requirements to be quickly and accurately parsed by the routing configuration matching method.

[0048] In some embodiments of the present invention, the module to be accessed refers to an independently deployable or loadable unit in the system architecture that is responsible for determining the direction of traffic based on route matching. It may include network plugins, etc. By obtaining the capability description information of the module to be accessed during the startup or loading process of the module to be accessed, the network and routing environment required by the module to be accessed can be clarified.

[0049] Step 201 above also includes the following sub-steps: determining the data type of each data in the capability description information, and mapping each data to the same numerical space according to the data type corresponding to each data to obtain the first feature vector.

[0050] In some embodiments, since the capability description information contains data in various formats, the data types of each piece of data in the capability description information are determined to classify the data, facilitating processing according to different methods after classification. Furthermore, based on the data classification, it is possible to intelligently identify and distinguish data of different natures, such as protocol names, priority values, routing prefixes, and tags. This allows subsequent processing to select appropriate mathematical expressions based on the essential attributes of the data, thereby avoiding information confusion or semantic loss that may result from concatenating data of different natures.

[0051] Furthermore, by mapping each data point to the same numerical space according to its corresponding data type, a first feature vector is obtained, thereby achieving the unification and standardization of different data forms. This transforms data such as text, numbers, and ranges into a set of numerical values ​​that can be computed by the machine, namely the first feature vector. This not only eliminates the technical obstacles caused by differences in data types to the subsequent matching process, but also creates a unified mathematical basis for comparison, making it feasible to match the first feature vector with the second feature vector.

[0052] The above sub-steps also include the following sub-steps: Sub-step S11: Determine the discrete and continuous data in each data of the capability description information.

[0053] First, the discrete and continuous data in each data set of the capability description information are identified to classify the capability description information. That is, the capability description information is divided based on its fundamental attributes in the configuration logic (such as whether it belongs to a finite enumeration set or whether it has a comparable size relationship). This classification method provides precise guidance for subsequent conversion using corresponding mathematical tools and lays the foundation for achieving high-quality coding.

[0054] Sub-step S12: Map the discrete data to discrete encoded values.

[0055] In step S12 above, the discrete data is mapped to discrete encoded values. For data that is essentially categorical or state-based, such as routing protocol data and tag set data key values, encoding techniques suitable for discrete spaces (e.g., one-hot encoding, hash encoding) are used to homogenize text or numbers into numerical vectors, ensuring that text and numerical information can be mapped to the same numerical space.

[0056] In some embodiments, to identify discrete data and map it to discrete encoded values, a unified dictionary is constructed to address the problem of incomparability between different types of data. Specifically, the unified dictionary is constructed by scanning all content of capability description information, collecting a full range of non-repeating terms, such as protocol types, key values ​​and tag values ​​of all tags, etc., and assigning unique and fixed numerical indices to these terms. This allows the discrete data within the capability description information to be characterized by finding a unique numerical index in the unified dictionary after identification, and the required discrete encoded values ​​to be obtained based on the numerical index and encoding techniques.

[0057] Sub-step S13: Map the continuous data to continuous encoded values.

[0058] Mapping the continuous data to continuous encoded values ​​is used for data with continuously changing characteristics, such as routing metrics, priority values, and time intervals. It employs a transformation method suitable for continuous spaces (such as normalization and standardization steps) to preserve the relative size, proportion, or range relationship in the original data and maps it to a unified, usually bounded, numerical range. This eliminates the interference caused by different continuous units (such as priority 1-100 and bandwidth values) on vector comparisons, making subsequent numerical comparisons (such as determining priority range inclusion) more reasonable.

[0059] Sub-step S14: The discrete encoded value and the continuous encoded value are concatenated to obtain the first feature vector.

[0060] The discrete encoded value and the continuous encoded value are concatenated to obtain the first feature vector, thereby constructing a mathematical vector with a unified structure and complete information. In some embodiments, the concatenation in a fixed order ensures the strict alignment of feature vectors generated from different data. That is, each segment of the first feature vector corresponds to a specific type and meaning configuration requirement, which facilitates subsequent matching with the second feature vector.

[0061] In some embodiments, the fixed order is protocol vector, prefix vector, label key vector, label value vector and priority vector, and the first feature vector can be L2 normalized to facilitate machine learning. This invention is not limited in this respect.

[0062] In addition, in some other embodiments, the above vectors are stored in memory or local files to avoid repeated parsing.

[0063] In step 202, the routing configuration information of the current network is obtained and the routing configuration information is converted into a second feature vector; the routing configuration information includes at least one of the routing protocol data, routing table structure data and label set data of the current network.

[0064] In step 202 above, by obtaining the routing configuration information of the current network and converting it into a second feature vector, the real-time nature and standardization of the current network configuration status are ensured. Specifically, since the current network configuration is dynamically changing, this step obtains a complete snapshot of the current network routing configuration in real time through a programmatic interface, limiting the network routing configuration to the current, i.e., the latest state, and converting it into a second feature vector according to the same rules as the first feature vector. This ensures that the current network state on which the comparison is based is real-time and accurate. At the same time, the second feature vector is also standardized and machine-recognizable, thereby overcoming the problem of potentially lagging or incomplete state information that may exist in manual verification, and ensuring the timeliness and accuracy of the subsequent matching process.

[0065] It is understood that the step of obtaining the second feature vector in step 202 can refer to the step of obtaining the first feature vector in step 201, and will not be described in detail here.

[0066] In step 203, the first feature vector and the second feature vector are matched to obtain a matching result.

[0067] Based on steps 201 to 203 above, it can be seen that the first feature vector and the second feature vector are located in a unified vector space. Therefore, the first feature vector and the second feature vector can be accurately compared, such as by performing set operations or numerical comparisons. Furthermore, both the first feature vector and the second feature vector are standard and can be recognized by machines. Thus, the matching process is entirely executed by the system, replacing the cumbersome and error-prone manual comparison process. This results in highly consistent and repeatable matching results, improving the efficiency and reliability of the matching process.

[0068] Step 203 further includes the following sub-steps: obtaining the first routing protocol vector and the second routing protocol vector corresponding to the routing protocol data from the first feature vector and the second feature vector, respectively; when the second routing protocol vector contains or is equal to the first routing protocol vector, determining that the first feature vector and the second feature vector are protocol matched.

[0069] The first and second routing protocol vectors corresponding to the routing protocol data are obtained from the first and second feature vectors, respectively. This enables the parsing of the first and second feature vectors and the precise location of the data to be matched. Since the first and second feature vectors are concatenated vectors containing multi-dimensional information, the sub-vector segments used to characterize the protocol support can be accurately extracted according to the preset vector structure definition. This ensures that the subsequent matching calculation strictly focuses on protocol compatibility and avoids mutual interference between data of different dimensions.

[0070] Specifically, when the second routing protocol vector contains or is equal to the first routing protocol vector, the first feature vector and the second feature vector are determined to be a protocol match. This means that all protocols required by the module to be accessed must be supported by the current network, equivalent to a set inclusion or equality relationship in vector space. Therefore, the judgment is based on protocol matching from a vector perspective. For example, if the first routing protocol vector represents that the module to be accessed needs to support protocols {1, 2}, and the second routing protocol vector represents that the current network supports protocols {1, 2, 3}, then the latter contains the former, and is determined to be a match. This eliminates potential omissions or misjudgments that might occur from manual item-by-item verification, ensuring the absolute objectivity and consistency of the matching results.

[0071] Furthermore, the first routing table vector and the second routing table vector, which correspond to the routing table structure data in the first feature vector and the second feature vector, are obtained respectively. The first routing table vector is used to represent the routing table entry required by the module to be accessed, and the second routing table vector is used to represent the current routing table entry of the current network. When the second routing table vector contains or is equal to the first routing table vector, and the state of the routing table entry of the current network is active, it is determined that the first feature vector and the second feature vector are a routing table match.

[0072] In the above embodiments, the first routing table vector and the second routing table vector are obtained respectively, thereby achieving alignment of routing requirements and network status at the data plane level. The specific routing table entry requirements (such as target network segment and next hop) declared by the module to be accessed and the actual routing table entries currently existing in the network are encoded into comparable mathematical objects, ensuring that the subsequent comparison is performed on the specific content of the routing table, rather than on vague policy or protocol declarations, so that the detection results can more accurately reflect the network connectivity foundation of the module to be accessed during actual operation.

[0073] Furthermore, when the second routing table vector contains or is equal to the first routing table vector, and the current network's routing table entry is active, the first feature vector and the second feature vector are determined to be a routing table match. The fact that the second routing table vector contains or is equal to the first routing table vector ensures that every specific routing prefix or path required for the operation of the module to be accessed has a corresponding entry in the current network's routing table. Determining that the corresponding entry is active introduces consideration of the network's operational status, effectively excluding routing entries that exist in the configuration but have not actually taken effect due to faults, management operations, or protocol convergence. This accurately simulates the actual requirements for routing entries during packet forwarding, avoiding situations where routes may exist but are actually unusable based solely on static configuration lists. This significantly improves the reliability and business guidance value of the routing matching conclusions.

[0074] Obtain the first label vector and the second label vector corresponding to the label set data from the first feature vector and the second feature vector, respectively; when the second label vector contains or is equal to the first label vector, determine that the first feature vector and the second feature vector are a label match.

[0075] In other embodiments, the first label vector and the second label vector corresponding to the label set data are obtained from the first feature vector and the second feature vector, respectively, thereby focusing on the policy label dimension. By accurately extracting the sub-vectors that only represent label information from the first feature vector and the second feature vector, an analysis space free from other interference is created for subsequent policy matching. This enables the independent handling of label policy issues closely related to business logic, security grouping, or environmental isolation.

[0076] It should be noted that when the second label vector contains or is equal to the first label vector, the first feature vector and the second feature vector are determined to be a label match. Through the relationship of inclusion or equality, the set of resources covered by the label selector defined by logical expressions (such as equality, set membership, existence judgment) that may be involved in the system-side routing policy is compared with the identity identified by the label set of the module to be accessed at the set theory level. This realizes the judgment of whether the label identity of the module to be accessed falls within the set allowed by the policy, avoiding policy mismatch due to human misunderstanding (such as the policy of allowing access being misjudged as denying, or vice versa).

[0077] In step 204 above, user prompt information is generated based on the matching results. In some embodiments, the prompt information generated in step 104 is used to inform the module to be accessed and the current network whether they are compatible or not. It can also generate more targeted information based on the specific mismatch dimensions revealed by the first feature vector and the second feature vector during the matching process, thereby shortening the problem diagnosis and repair cycle and reducing the technical threshold of operation and maintenance.

[0078] Step 204 further includes the following sub-steps: when the matching result is not a match, generate an adaptation failure message containing an incompatible item identifier and repair suggestions; when the matching result is a match, generate an adaptation success message.

[0079] Specifically, by identifying incompatible items, the system can clearly point out the specific technical dimensions of the mismatch (e.g., protocol mismatch, missing specific routes, label policy conflicts) and even specific parameters (e.g., missing BGP protocol, missing routes to 10.0.0.0 / 24). This presents the root cause of the mismatch in a structured way and provides repair suggestions. Based on the technical logic of the mismatch (e.g., if the protocol is missing, it is recommended to enable it; if the route is missing, it is recommended to add it), the system generates actionable configuration modification guidelines. This allows users to take corrective measures based on the prompts, improving operational efficiency and system availability.

[0080] When the matching result is a successful match, a success message is generated, which provides the user with clear confirmation of deployment or loading permission, thus improving the user experience.

[0081] In step 205, the lengths of the first feature vector and the second feature vector are checked, and the length check results are obtained.

[0082] Since the first and second feature vectors are independently generated from capability description information and network configuration information through encoding rules that may involve multiple processing steps, any abnormal execution of the encoding rules, sudden changes in the data source format, or program errors on either side may lead to the final generated feature vectors not conforming to the global dimension specification. Therefore, length verification can detect such problems in real time, preventing subsequent matching calculations of input vectors that are mathematically incomparable due to inconsistent dimensions. This fundamentally avoids calculation errors, system anomalies, or meaningless matching results that may be caused by this, ensuring the output quality of the core matching results.

[0083] In step 206, when the length verification result is inconsistent, the first feature vector of the capability description information and the second feature vector of the routing configuration information are regenerated.

[0084] By regenerating the first feature vector of capability description information and the second feature vector of routing configuration information, the system is instructed to retry when the length verification result is found to be inconsistent. This effectively addresses encoding failures caused by temporary system load, resource contention, or occasional incomplete data reading, allowing the system to correct faults automatically without manual intervention. This improves the overall matching success rate and makes the routing configuration matching method more reliable.

[0085] Secondly, Figure 3 This is a structural block diagram of a routing configuration matching device according to an embodiment of the present invention. Please refer to it. Figure 3 This invention provides a route configuration matching device, comprising: The first feature vector generation module 301 is used to obtain the capability description information of the module to be accessed and convert the capability description information into a first feature vector; the capability description information includes at least one of the routing protocol data, routing table structure data and label set data supported by the module to be accessed. The second feature vector generation module 302 is used to obtain the routing configuration information of the current network and convert the routing configuration information into a second feature vector; the routing configuration information includes at least one of the routing protocol data, routing table structure data and label set data of the current network. The matching module 303 is used to match the first feature vector and the second feature vector to obtain a matching result; The prompt information generation module 304 is used to generate user prompt information based on the matching result. The user prompt information is used to indicate whether the module to be accessed is compatible with the current network.

[0086] In this embodiment of the invention, the routing configuration matching method obtains the capability description information of the module to be accessed and transforms the capability description information into a first feature vector. It also obtains the routing configuration information of the current network and transforms the routing configuration information into a second feature vector. By converting the capability description information and routing configuration information into standardized, machine-recognizable first and second feature vectors, a foundation is laid for the subsequent matching process. This allows for comparison of the first and second feature vectors within a unified vector space, ensuring that the matching results of the first and second feature vectors are more accurate and repeatable, thus improving the efficiency and reliability of the matching process. Based on the matching results, user prompt information is generated. The user prompt information indicates whether the module to be accessed is compatible with the current network. Users can obtain quickly generated and accurate user prompt information, thereby clarifying the matching result of the module to be accessed.

[0087] In some embodiments, the first feature vector generation module 301 includes: The first feature vector generation submodule is used to determine the data type of each data in the capability description information, and to map each data to the same numerical space according to the data type corresponding to each data to obtain the first feature vector.

[0088] In some embodiments, the first feature vector generation submodule includes: A classification unit is used to determine discrete and continuous data in the various data of the capability description information; The first mapping unit is used to map the discrete data into discrete coded values; The second mapping unit is used to map the continuous data into continuous encoded values; The concatenation unit is used to concatenate the discrete encoded value and the continuous encoded value to obtain the first feature vector.

[0089] In some embodiments, the matching module 303 includes: The protocol vector submodule is used to obtain, respectively, the first routing protocol vector and the second routing protocol vector corresponding to the routing protocol data from the first feature vector and the second feature vector; The protocol matching submodule is used to determine that the first feature vector and the second feature vector are protocol matched when the second routing protocol vector contains or is equal to the first routing protocol vector.

[0090] In some embodiments, the matching module 303 further includes: The routing table vector submodule is used to obtain the first routing table vector and the second routing table vector corresponding to the routing table structure data in the first feature vector and the second feature vector, respectively. The first routing table vector is used to represent the routing table entry required by the module to be accessed, and the second routing table vector is used to represent the current routing table entry of the current network. The routing table matching submodule is used to determine that the first feature vector and the second feature vector are a routing table match when the second routing table vector contains or is equal to the first routing table vector and the state of the routing table entry of the current network is active.

[0091] In some embodiments, the matching module 303 further includes: The label vector submodule is used to obtain, respectively, the first label vector and the second label vector corresponding to the label set data in the first feature vector and the second feature vector; The label matching submodule is used to determine that the first feature vector and the second feature vector are a label match when the second label vector contains or is equal to the first label vector.

[0092] In some embodiments, the prompt information generation module 304 includes: The first prompt submodule is used to generate an adaptation failure prompt message containing an incompatible item identifier and repair suggestions when the matching result is an incompatible match. The second prompt submodule is used to generate a prompt message indicating successful adaptation when the matching result is a match.

[0093] In some embodiments, the route configuration matching device further includes: The length verification module is used to verify the length of the first feature vector and the second feature vector, and obtain the length verification result; The regeneration module is used to regenerate the first feature vector of the capability description information and the second feature vector of the routing configuration information when the length verification results are inconsistent.

[0094] As the apparatus embodiment is basically similar to the method embodiment, it is described in a relatively simple manner. For relevant details, please refer to the description of the method embodiment.

[0095] This invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described routing configuration matching method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0096] This invention also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described routing configuration matching method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0097] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0098] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of the present invention is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0099] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, electronic device, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0100] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

Claims

1. A routing configuration matching method, characterized in that, include: Obtain the capability description information of the module to be connected, and convert the capability description information into a first feature vector; The capability description information includes at least one of the following: routing protocol data, routing table structure data, and label set data supported by the module to be accessed. Obtain the routing configuration information of the current network and convert the routing configuration information into a second feature vector; the routing configuration information includes at least one of the routing protocol data, routing table structure data, and label set data of the current network; The first feature vector and the second feature vector are matched to obtain the matching result; Based on the matching result, a user prompt message is generated, which indicates whether the module to be accessed is compatible with the current network.

2. The routing configuration matching method according to claim 1, characterized in that, The step of obtaining the capability description information of the module to be accessed and converting the capability description information into a first feature vector includes: The data type of each data in the capability description information is determined, and each data is mapped to the same numerical space according to the data type corresponding to each data to obtain the first feature vector.

3. The routing configuration matching method according to claim 2, characterized in that, The step of determining the data type of each data in the capability description information, and mapping each data to the same numerical space according to the data type corresponding to each data to obtain a first feature vector, includes: Determine the discrete and continuous data in each piece of the capability description information; Map the discrete data to discrete encoded values; Map the continuous data to continuous encoded values; The discrete encoded value and the continuous encoded value are concatenated to obtain the first feature vector.

4. The routing configuration matching method according to claim 1, characterized in that, The matching of the first feature vector and the second feature vector to obtain the matching result includes: Obtain the first routing protocol vector and the second routing protocol vector corresponding to the routing protocol data from the first feature vector and the second feature vector, respectively. When the second routing protocol vector contains or is equal to the first routing protocol vector, the first feature vector and the second feature vector are determined to be a protocol match.

5. The routing configuration matching method according to claim 4, characterized in that, The step of matching the first feature vector and the second feature vector to obtain a matching result further includes: The first routing table vector and the second routing table vector, which correspond to the routing table structure data in the first feature vector and the second feature vector, are obtained respectively. The first routing table vector is used to represent the routing table entry required by the module to be accessed, and the second routing table vector is used to represent the current routing table entry of the current network. When the second routing table vector contains or is equal to the first routing table vector, and the state of the routing table entry in the current network is active, it is determined that the first feature vector and the second feature vector are a routing table match.

6. The routing configuration matching method according to claim 4, characterized in that, The step of matching the first feature vector and the second feature vector to obtain a matching result further includes: Obtain the first label vector and the second label vector, which correspond to the label set data, from the first feature vector and the second feature vector, respectively; When the second label vector contains or is equal to the first label vector, it is determined that the first feature vector and the second feature vector are a label match.

7. The routing configuration matching method according to claim 1, characterized in that, The step of generating user prompt information based on the matching result includes: When the matching result is not a match, an adaptation failure message containing the mismatch item identifier and repair suggestions is generated; When the matching result is a successful match, a success message is generated.

8. The routing configuration matching method according to claim 1, characterized in that, Also includes: Perform length verification on the first feature vector and the second feature vector, and obtain the length verification result; When the length verification result is inconsistent, the first feature vector of the capability description information and the second feature vector of the routing configuration information are regenerated.

9. A routing configuration matching device, characterized in that, include: The first feature vector generation module is used to obtain the capability description information of the module to be accessed and convert the capability description information into a first feature vector. The capability description information includes at least one of the following: routing protocol data, routing table structure data, and label set data supported by the module to be accessed. The second feature vector generation module is used to obtain the routing configuration information of the current network and convert the routing configuration information into a second feature vector; the routing configuration information includes at least one of the routing protocol data, routing table structure data, and label set data of the current network. The matching module is used to match the first feature vector and the second feature vector to obtain a matching result; The prompt information generation module is used to generate user prompt information based on the matching result. The user prompt information is used to indicate whether the module to be accessed is compatible with the current network.

10. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the routing configuration matching method as described in claims 1-8.

11. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the routing configuration matching method as described in claims 1-8.