Dummy resource management system automatic test method, system, device, medium and product
By employing automated testing methods based on relational graphs and state machine models, the complex scenario testing challenges of passive dumb resource management systems for optical communication networks were solved. This enabled efficient and accurate resource allocation and optical path verification, thereby improving the system's stability and reliability.
Patent Information
- Application Number
- CN202610055604.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-16
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2046-01-16
AI Technical Summary
Existing technologies are insufficient to fully cover the complex scenarios of passive dumb resource management systems in optical communication networks. Manual testing is inefficient and prone to errors, while automated testing lacks specificity and cannot achieve efficient and accurate resource configuration and optical path verification.
An automated testing method is constructed using relational graphs and state machine models. Resource configuration information is obtained through the graph construction module, and the test process is automatically switched between multiple states based on the state machine model to perform full-process testing. Graph traversal and rule matching algorithms are used for automated verification.
It enables efficient and comprehensive automated testing of passive dumb resource management systems, improves test coverage and accuracy, significantly enhances testing efficiency and reliability, and ensures accurate system operation in complex environments.
Smart Images

Figure CN121531259A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of optical network communication testing technology, and specifically relates to automatic testing methods, systems, equipment, media and products for dumb resource management systems. Background Technology
[0002] As optical networks continue to expand, the management of passive dummy resources (such as equipment rooms, optical distribution boxes, patch panels, and optical cable segments) becomes increasingly complex. A passive dummy resource management system for communication optical networks is used to manage and verify these resources, ensuring the accuracy of resource information. However, during the development and testing phase of this system, numerous challenges were encountered: 1. Complex Business Scenarios: Passive dumb resources have multi-level and multi-dimensional relationships. For example, patch panels need to be built in the equipment room, optical cable segments need to be bound to patch panels or optical distribution boxes, ports and optical fiber segments are bound to each other, and optical paths are formed through complex patching. Traditional testing methods are difficult to fully cover these complex scenarios, and key test points are easily missed, leading to problems such as incorrect resource relationships after the system goes live.
[0003] 2. Manual testing is inefficient and error-prone: Manual testing requires testers to manually simulate resource uploading, relationship configuration, complex jumpers, and other operations. The process is cumbersome and prone to errors, making it difficult to meet the testing needs of rapid system iteration. Furthermore, the accuracy of manually judging resource relationships is also subject to significant errors, failing to guarantee the accuracy and reliability of test results.
[0004] 3. Lack of specificity in automated testing: Existing automated testing technologies lack dedicated testing solutions for passive dumb resource management systems, making it difficult to effectively handle the verification of complex logical relationships between resources and achieve comprehensive testing of the system's functional integrity and accuracy.
[0005] There is an urgent need for an automated testing method that can efficiently, comprehensively, and accurately verify the complex resource configuration relationships and optical path service scenarios of passive dumb resource management systems in communication optical networks, in order to fundamentally ensure the quality and reliability of the system. Summary of the Invention
[0006] To address the aforementioned issues, this application provides an automated testing method, system, device, medium, and product for a passive dumb resource management system. This enables fully automated testing of the passive dumb resource management system, from static data configuration to dynamic business processes, thereby providing efficient, comprehensive, and accurate verification of passive dumb resources with extremely complex business logic.
[0007] To achieve the above objectives, this application provides the following technical solution: In a first aspect, embodiments of this application provide an automatic testing method for a dumb resource management system, comprising: Based on the configuration information of the passive dumb resources obtained from the passive dumb resource management system, a relationship graph G=(V,E) of the passive dumb resources is constructed. Based on a predefined state machine model, the control test process automatically switches between multiple preset states to perform a full-process test from passive dummy resource data preparation to optical path verification. In the test process, after experiencing at least one non-terminating preset state, an automated verification is performed based on the relationship graph, and the automated verification result is used as the trigger condition for the state machine model to perform state transitions and as the basis for judging the test results of the entire process.
[0008] Secondly, embodiments of this application provide an automatic testing system for a dumb resource management system, the system comprising: The graph construction module is used to construct a relation graph G=(V,E) of passive dumb resources based on the configuration information of passive dumb resources obtained from the passive dumb resource management system. The test control module is used to control the test process to automatically switch between multiple preset states based on the predefined state machine model, so as to perform the full-process test from passive dummy resource data preparation to optical path verification. The test control module includes a graph verification submodule, which is used to automatically verify the relationship graph after experiencing at least one non-terminating preset state in the test process, and use the automatic verification result as the trigger condition for the state machine model to perform state transition and the basis for judging the test result of the whole process.
[0009] Thirdly, embodiments of this application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program or instructions to implement the aforementioned automatic testing method for a dumb resource management system.
[0010] Fourthly, embodiments of this application also provide a computer storage medium storing a computer program or instructions, which, when executed by a processor, implements the aforementioned automatic testing method for a dumb resource management system.
[0011] Fifthly, embodiments of this application also provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the aforementioned automatic testing method for a dumb resource management system.
[0012] Compared with the prior art, this application has the following advantages: 1. By introducing relational graphs and state machine models, it realizes full-process, automated, and high-precision testing of the optical network dumb resource management system from static data configuration to dynamic business processes, which significantly improves the test coverage, efficiency, and reliability; 2. Highly efficient coverage of complex scenarios: The automated verification of resource configuration and the automated testing framework for complex optical path scenarios based on relationship graphs fully cover the complex relationship configuration between passive resources and optical path scenarios, increasing the test coverage to over 95% and effectively solving the testing challenges of complex scenarios; 3. Improve testing efficiency and accuracy: Automated testing can significantly reduce manual operations, and improve the efficiency of resource configuration verification and complex optical path testing. At the same time, through precise verification by algorithms and models, the accuracy of test results is greatly improved compared with traditional methods, effectively reducing the probability of false positives and false negatives. 4. Ensure system reliability: Through comprehensive testing simulating various typical scenarios, ensure that the passive dumb resource management system for communication optical networks can operate accurately in real-world complex application environments, effectively reduce failures caused by resource relationship errors or optical path problems after going online, and ensure the stability and reliability of the test system.
[0013] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 A flowchart of an automatic testing method for a dumb resource management system according to an embodiment of this application is shown; Figure 2A The pseudocode illustration of the full-process test in the embodiments of this application is shown. Figure 1 ; Figure 2B The second pseudocode diagram illustrates the full-process test in an embodiment of this application. Figure 2C The pseudocode illustration of the full-process test in the embodiments of this application is shown. Figure 3 ; Figure 2D The pseudocode illustration of the full-process test in the embodiments of this application is shown. Figure 4 ; Figure 3 A pseudocode diagram of automated verification in an embodiment of this application is shown; Figure 4This paper illustrates a schematic diagram of the structure of an automatic testing system for a dumb resource management system according to an embodiment of this application. Figure 5 A schematic diagram of the structure of an electronic device according to an embodiment of this application is shown. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0017] To address the shortcomings of existing technologies, this application discloses an automatic testing method for a dumb resource management system, such as... Figure 1 As shown, it includes the following steps: Step S1: Obtain the configuration information of the passive dumb resources from the passive dumb resource management system, and construct the relationship graph of the passive dumb resources G=(V,E); Step S2: Based on a predefined state machine model, control the test process to automatically switch between multiple preset states to perform a full-process test from passive dummy resource data preparation to optical path verification; In the test process, after experiencing at least one non-terminating preset state, an automated verification is performed based on the relationship graph, and the automated verification result is used as the trigger condition for the state transition of the state machine model or as the basis for determining the full-process test result.
[0018] In some specific embodiments, step S1: Based on the configuration information of the passive dummy resources obtained from the passive dummy resource management system, construct a relational graph G=(V,E) of the passive dummy resources, including the following: Step S1: Obtain passive dumb resource configuration information from the dumb resource management system; abstract various passive dumb resources such as computer rooms, optical distribution boxes, patch panels, optical cable segments and ports into nodes of a relational graph to form a node set V; abstract the relationships between passive dumb resources into edges of a relational graph to form a relational edge set E; and construct the relational graph G=(V,E); where G represents the topology of the passive dumb resources.
[0019] Among them, the node set In the formula, Represents the set of data center nodes. Represents the set of optical distribution box nodes. Represents the set of patch panel nodes. Represents the set of nodes in an optical cable segment. This represents a set of port nodes.
[0020] Data center node set Each element in the set Each data center node represents a data center node. Each data center node includes attribute information such as data center name, location, and number, which are used to identify data center resources.
[0021] Optical junction box node set Each element in the set This represents an optical distribution box node. Each optical distribution box node includes attribute information such as the specifications, capacity, and installation location of the optical distribution box, which is used to reflect the resource characteristics of the optical distribution box.
[0022] Patch panel node set Each element in the set Each patch panel node represents a data patch panel node. Each patch panel node includes attribute information such as the data center to which the patch panel belongs, the number of ports, and the port type, which are used to describe the resource attributes of the patch panel.
[0023] Optical cable segment node set Each element in the set Each fiber optic segment node represents a fiber optic cable segment node. Each fiber optic cable segment node contains attribute information such as fiber optic cable segment length, model, and start and end binding devices, which are used to clarify the fiber optic cable segment resource status.
[0024] Port node set Each element in the set Each port node represents a port node, which includes attribute information such as the device to which the port belongs, port number, and connected fiber core. It is a key node for resource connection.
[0025] Set of relation edges E: Represents a node With nodes There are relationships between them, and each edge has related attributes for the relationship; the related attributes for the relationship include the relationship type (such as contain, bind, connect, etc.) and the relationship priority; For example, if (And if its relationship type is containment, it indicates a node in a certain data center) Includes a patch panel node ;like If the relationship type is a connection relationship, then it represents a certain port node. With a certain optical cable segment node The fiber cores are interconnected.
[0026] For example, a simple network: Data center A contains patch panel B, patch panel B has port C, and port C is bound to fiber optic cable segment D; this would be a path in the network diagram. .
[0027] It is important to note that in practical applications, the nodes in each set need to be sorted and numbered for easy differentiation and subsequent use.
[0028] In some specific embodiments, based on the relationship graph G=(V,E) constructed in step S1, relevant constraints for subsequent automated verification are defined, including the following: Define resource relationship constraint functions This is used to verify whether the relationship between any two edges conforms to predefined relationship rules; where C represents the resource relationship constraint function; E represents the set of relationship edges, which is the input domain of the resource relationship constraint function C; Define a resource attribute validation function. This is used to verify whether the attributes of any node conform to predefined attribute rules; among which, This represents the resource attribute validation function. This represents a set of nodes and is a resource attribute validation function. The input field.
[0029] Based on the constraints and verification functions defined above, the verification condition formulas for automated verification include: (1) Resource relationship constraints: , indicating that there exists one and only if the node and Relationship It satisfies the predefined relational rules.
[0030] For example, regarding the relationship between a patch panel and a data center, a relationship is only valid if the data center attribute of the patch panel node matches that of the data center node, and the relationship type between the two is "containment". talent .
[0031] (2) Resource attribute verification conditions: , indicating that there exists a if and only if node All attribute information values conform to the preset attribute rules.
[0032] For example, the length attribute of an optical cable segment node must be a positive number, and the model attribute must be in a predefined model list. When these conditions are met... talent .
[0033] By setting relevant constraints, the configuration information of passive dummy resources in the passive dummy resource communication system under test can be analyzed and verified, so as to automatically generate the expected resource relationship model and provide a benchmark for automated verification.
[0034] In some specific embodiments, step S2: Based on a predefined state machine model, the test process is controlled to automatically switch between multiple preset states to perform a full-process test from passive dummy resource data preparation to optical path verification, including the following: Step S21: Construct a predefined state machine model, specifically including: The state machine model is constructed as follows: This defines the entire test process state and state transition conditions; among them, Represents a preset set of states. Represents the set of state transitions. Represents the input set, Indicates the output set. This represents the set of termination states.
[0035] In this context, the business processes in the passive dumb resource management system are abstracted into preset states, generating a preset state set S. Including resource upload status Relationship configuration status Optical path formation state Optical path verification status and error handling status That is, the set of states The business process described corresponds to the full-process testing from passive dumb resource data preparation to optical path verification.
[0036] The resource upload status This indicates the simulated user uploading passive dumb resource information to the dumb resource management system; the relationship configuration status. This indicates the configuration operation for the association between passive dummy resources; the optical path forming state. This indicates that complex optical paths are automatically generated or manually configured based on the association relationships of passive dummy resources; the optical path verification status. This indicates that the correctness and integrity of the generated or configured complex optical path are being verified; the error handling status... This indicates how to handle various error situations that occur during the testing process.
[0037] The state transition set Define the transition logic of the state machine from the current state to the next state under different test process operations; for example, when the test process completes the resource upload operation and the automated verification passes, the state machine changes from the resource upload state. Transition to relational configuration state .
[0038] The input set It includes test scenario parameters and user operation simulation instructions, and the input set is the triggering condition for state transition; wherein, the test scenario parameters include resource quantity, relationship type combination, optical path complexity, etc., and the user operation simulation instructions include instructions such as upload, configuration and delete operations.
[0039] The output set This includes various types of output data during the testing process, such as test result reports, error logs, and optical path performance indicators.
[0040] Termination State Set Through the set of termination states Define that when the optical path verification is completed and the result is correct, or after all error information is recorded, the state machine enters the termination state, indicating the end of the test process.
[0041] In step S2, this embodiment constructs an automated testing framework for complex optical path scenarios based on a state machine model. Therefore, the state machine is the control core of the entire complex optical path scenario testing process (i.e., full-process testing).
[0042] Step S22: Control the test process to automatically switch between multiple preset states to perform a full-process test from passive dummy resource data preparation to optical path verification, specifically including: Based on the test scenario parameters and user operation simulation instructions in the input set I of the state machine model, test cases are dynamically generated; the state machine instantiated based on the state machine model is run. The state machine executes the test cases and, according to the definition of the state transition set T, controls the test process to automatically switch between resource upload state, relationship configuration state, optical path formation state, optical path verification state, and error handling state quality inspection to complete the full-process test and realize automated testing of complex optical path scenarios.
[0043] The test process is configured to execute along a sequence from resource upload state, relationship configuration state, optical path formation state to optical path verification state as the main test path; and at each state switch, the state machine calls the business operation function corresponding to that state to send the corresponding business process operation instruction to the passive dumb resource management system.
[0044] After experiencing at least one non-terminating preset state in the test process, the passive dummy resource configuration is automatically verified based on the relation graph using graph traversal and rule matching algorithms. The automatic verification result is used as the trigger condition for the state transition of the state machine model or as the basis for determining the full process test result.
[0045] In some specific embodiments, the full-process testing procedure (i.e., the automated testing procedure for complex optical path scenarios) specifically includes: like Figure 2A , Figure 2B , Figure 2C and Figure 2D As shown in the pseudocode, this implementation demonstrates how a state machine drives the test process corresponding to the business process in a complete passive dumb management system. The state machine model D of its test framework is instantiated, and its input set I specifies the test scenario.
[0046] In the pseudocode, the following definition is made: S: Preset state set, which contains all states in the test process; : Indicates the current state, which switches between various states in the preset state set S according to different conditions during the test; Error report collection, recording various error messages that occur during the testing process; M: Expected resource relationship model, which generates the correct resource relationships and configuration expectations based on pre-defined attribute rules, relationship rules and business logic, and is used to compare and verify with the results of automated verification. G=(V,E): Passive dummy resource relationship graph, where V is a set of nodes, including various resource nodes such as data centers and optical distribution boxes; E is a set of relationship edges, recording the association relationships between each resource node; C: Resource relationship constraint function, used to determine whether the association relationship between resource nodes conforms to the preset relationship rules. The input is the relationship edge, and the output is True or False. V check : Resource attribute validation function, used to verify whether the attributes of a resource node are correct. The input is the resource node, and the output is True or False; visited: The set of visited nodes. It records the nodes that have been visited during the traversal of the relationship graph to avoid repeated visits. S: Node access stack, used to store nodes to be visited during depth-first traversal of the relationship graph, following the last-in-first-out principle.
[0047] The complexOpticalPathTest function is the main function for automated testing of complex optical path scenarios. It controls the entire testing process by switching between different states (resource upload, relationship configuration, optical path formation, optical path verification, and error handling) through loops and state machine logic until the test ends and returns a set of error reports.
[0048] Based on the above definition, the test process is implemented using pseudocode as follows: The test framework is initialized based on the state machine model, and the initial state of the state machine is set to the resource upload state.
[0049] (1) Resource upload status ( ): When the current state of the state machine is the resource upload state, the state machine controls the test framework to call the uploadResources function. This function obtains the passive dumb resource configuration information from the test data (obtained through a pre-set test data template and input set). Subsequently, the test framework calls the system interface to perform the resource upload operation, thereby simulating the behavior of a user uploading passive dumb resource configuration information to the passive dumb resource management system (i.e., the system under test).
[0050] The testing framework obtains the relationship graph of the current passive dummy resource through the verifyResourceRelations function, traverses all resource nodes in the relationship graph (i.e., the nodes corresponding to the uploaded passive dummy resource), and calls the resource attribute verification function V through the verifyResourceRelations function. check Perform attribute validation on each node, that is, check whether the attributes of the passive dummy resource are correct and whether they conform to the preset attribute rules; If the attribute validation passes, meaning all node attributes are correct, then return true and the state machine transitions to the relation configuration state. ; If the attribute validation fails, meaning there is an error in the node's attribute, then false is returned and the state machine transitions to the error handling state. .
[0051] The preset attribute rules include the following: The preset attribute rules for optical cable segment nodes include: Length: Must be a real number greater than 0; Number of fiber cores: an enumeration type, only values in {12, 48, 96, 144} are allowed; Model number: Must exist in the predefined list of optical cable models; Start and end devices: must point to an existing device node in the system, and cannot be the same device.
[0052] The preset attribute rules for port nodes include: Port numbering: must conform to predefined numbering rules (such as a three-level numbering structure of "frame-disk-port"); Connection status: enumerated values, including "idle", "completed", "jumped", "service occupied", etc.; The equipment must be a valid patch panel or optical distribution box node.
[0053] The preset attribute rules for data center nodes include the following: Computer room number: must conform to coding rules and be globally unique; Location information: Must be a string that conforms to geocoding standards.
[0054] The preset attribute rules for patch panel or optical distribution box nodes include the following: Specifications and model number: Must be listed in the equipment model list; Capacity: The total number of ports must be a positive integer, and the actual number of ports cannot exceed the capacity limit.
[0055] The general rules for all nodes include: all node identification attributes (such as ID, number) cannot be empty and must be globally unique; all attributes involving foreign key associations (such as "belonging data center" and "bound device") must point to nodes that already exist in the passive dumb resource management system.
[0056] (2) Relationship configuration status ( ): When the current state of the state machine is the relationship configuration state, the test framework generates the relationship configuration data between passive dummy resources according to the test scenario parameters through the configureResourceRelations function, and completes the resource relationship configuration by calling the system interface through the configureResourceRelations function to build the logical relationship between passive dummy resources; The test framework obtains the relationship graph of the current passive dummy resources through the verifyResourceRelations function, traverses each relationship edge in the relationship graph, and calls the resource relationship constraint function C through the verifyResourceRelations function to perform relationship verification on each edge, that is, to verify whether the association relationship of the passive dummy resources represented by the edge conforms to the preset relationship rules: If the relationship verification passes, meaning that the association relationships of all edges are correct, then return true and the state machine transitions to the optical path forming state; If the relationship validation fails, meaning there is an error in the edge association, then return false and proceed to the error handling state.
[0057] The predefined relationship rules include the following: The inclusion relationship between a data center and a patch panel: A patch panel must belong to a data center, meaning there must be an edge of type "inclusion" pointing from the data center node to the patch panel node, and the "data center to which the patch panel belongs" attribute must be consistent with the identifier attribute of the data center node.
[0058] Internal structural relationships of patch panels / optical distribution boxes: Patch panels or optical distribution boxes can further contain substructures such as "faces", "frames", and "panels", and finally define port nodes on the "panels"; ports must be connected to the upper-level structures (panels, frames, faces) through edges of the "belonging" type, and ultimately belong to a patch panel or optical distribution box node.
[0059] Optical cable segment termination rules: If both ends of an optical cable segment are connected to the port nodes of a patch panel or optical distribution box via "bundled" type edges, then the optical cable segment is in the "terminated at both ends" state; the ports at the two ends of the same optical cable segment cannot belong to the same equipment node.
[0060] Connection relationship between port and service equipment: If the port of the patch panel or optical distribution box is connected to the service equipment (such as OTN / PTN equipment or splitter) through a pigtail, then a "connection" type edge should be established between the port and the service equipment node to indicate that it forms a service optical path.
[0061] Inter-port jumper connection rules: If a pigtail is drawn from a port of a patch panel or optical distribution box and connected to another port that has been terminated (belonging to another patch panel or optical distribution box), a "jump" type edge should be established between the two port nodes to indicate that different optical cable segments are connected by jumpers to form an end-to-end optical path.
[0062] Resource level constraints: Except for the optical distribution box, which can be deployed independently of the equipment room, the patch panel must be located inside the equipment room, the port must belong to the patch panel or optical distribution box, and the optical cable segment must be associated with the equipment through the port. Hanging edges or invalid connections are prohibited.
[0063] (3) Optical path formation state ( ): When the current state of the state machine is the optical path forming state, the test framework generates a complex optical path based on the configured resource association relationship through the formOpticalPath function, and determines the direction and connection method of the optical path; then the state machine transitions to the optical path verification state.
[0064] (4) Optical path verification status ( ): When the current state of the state machine is the optical path verification state, the test framework performs comprehensive verification of the generated optical path through the verifyOpticalPath function; If the comprehensive verification passes, true is returned, a successful test report is generated, and the state machine enters the termination state. If the comprehensive verification fails, it returns false, and the state machine transitions to the error handling state.
[0065] The comprehensive verification includes four main categories: optical path connectivity verification, fiber core bonding accuracy verification, resource attribute verification, and resource relationship verification. The optical path connectivity verification includes path existence check, fiber jumper point logic verification, and full route backtracking check; the fiber core binding accuracy verification includes start / end point matching check; the resource attribute verification includes end-to-end status verification, attribute matching verification, and performance index verification; and the resource relationship verification includes resource conflict check and correlation review.
[0066] The resource attribute verification and the resource relationship verification are performed by combining the attribute / relationship verification results of step (4) to verify the resource association relationship involved in the optical path.
[0067] (5) Error handling status ( ): When the current state of the state machine is the error handling state, the test framework calls the handleError function to perform the corresponding error handling operation (such as recording error logs, attempting to fix errors, etc.) according to the error type. After execution, the state machine transitions back to the previous state or the optical path verification state.
[0068] In this embodiment, the logic of fully automated testing of optical routes is fully implemented through the above pseudocode, including core functions such as state machine state transition, optical route quality monitoring and judgment, fault handling, and resource release.
[0069] In some specific embodiments, a graph traversal and rule matching algorithm is used to automatically verify the passive dummy resource configuration based on the relationship graph, and the automatic verification result is used as the trigger condition for the state transition of the state machine model or as the basis for determining the full-process test result, including the following: (1) Automated verification: This step primarily employs a graph traversal and rule matching algorithm for automated verification of passive dummy resource allocation. The variables and symbols involved in this algorithm include: This represents the relationship graph of passive dummy resources, where C represents the resource relationship constraint function. This represents the resource attribute validation function. This represents the expected resource relationship model. This represents the set of visited nodes. Represents a set of error reports. Represents the node access stack. Each of these represents a node in the relational graph.
[0070] The pseudocode for the algorithm that performs automated verification is as follows: Figure 3 As shown: Starting from any root node, the relation graph is traversed along the relation edges using either depth-first or breadth-first traversal. During the traversal, the resource attribute verification function is called for each visited node v to perform attribute verification (checking whether the attributes are correct, such as checking whether the length of the optical cable segment is a positive value), and the resource relationship constraint function is called for each traversed edge to perform relationship verification (checking whether the relationship between nodes conforms to the predetermined rules, such as checking whether the attribute of the equipment room to which the patch panel belongs is the specified R1 instead of R2), and the verification result is generated. The verification result is compared with the expected resource relationship model M. If there is a deviation between the verification result and the expected resource relationship model M, the error information is recorded and a structured (such as JSON or HTML format) verification result report containing error nodes, error types (such as attribute errors, relationship binding errors) and detailed descriptions is generated.
[0071] The specific traversal process is as follows: Initialization: Starting from any root node, put it into a stack (DFS) or a queue (BFS); Looping through the nodes: Retrieve a node v from the stack / queue and mark it as visited. Call the resource attribute verification function to check if the attributes of node v are correct. If an error is found, record it in the verification result report. Then, find all edges e connected to this node. For each edge e, call the resource relationship constraint function to check if the association relationship is correct. If an error is found, record it in the verification result report. Finally, find the adjacent nodes v through edge e. next If node v next If an item is not visited, it is placed in a stack / queue and the loop continues. Loop termination: The traversal ends when the stack / queue is empty, and a complete error report is generated.
[0072] For example, during the algorithm execution, starting from the initial port node, the entire optical network topology is explored along the fiber core connection edge depth; during each node access, the node connection relationship is double-checked strictly according to the port type matching function and the fiber core connection priority function (both of which belong to resource relationship constraint functions); once a deviation is found between the actual connection relationship and the expected mapping model, a detailed error report is immediately generated until the traversal and verification of all port mapping relationships are completed.
[0073] (2) Application of automated verification results: The triggering condition for the state transition of the state machine is as follows: When the state machine is in the resource upload state and the resource upload operation is completed, the resource attribute verification function is automatically called to trigger the attribute verification of the uploaded passive dummy resources in the passive dummy resource management system and generate the attribute verification result. If the attribute verification result is passed, the state machine transitions from the resource upload state to the relationship configuration state. If the attribute verification result is failed, the state machine transitions to the error handling state. Once the state machine is in the relationship configuration state and has completed the relationship configuration operation, it automatically calls the resource relationship constraint function to trigger the relationship verification of the configured passive dummy resource relationships in the passive dummy resource management system and generates the relationship verification result. If the relationship verification result is successful, the state machine transitions to the optical path forming state; if the relationship verification result is unsuccessful, the state machine transitions to the error handling state.
[0074] As a basis for judging the results of the entire process test: When the state machine is in the optical path verification state, the optical path verification function is called to perform optical path verification. The process of calling the optical path verification function to perform optical path verification includes: based on the current relational graph G, performing path backtracking on the optical path generated by the passive dumb resource management system, checking whether all nodes and edges traversed by the optical path can pass the automatic verification of the resource relation constraint function and the resource attribute verification function, generating an automatic verification result, and determining whether the optical path is correct based on the verification result.
[0075] Existing technologies lack dedicated testing solutions for passive dummy resource management systems in optical communication networks. This application, for the first time, introduces relational graph theory and state-driven models into this field, applying them respectively for resource configuration verification and testing in complex optical path scenarios. This constructs a complete and unique automated testing system, demonstrating significant innovation in its technical solution. Furthermore, addressing the difficulty of traditional testing methods in handling complex relationships of passive dummy resources and complex optical path scenarios, this application achieves accurate verification of resource configuration and fully automated testing of complex optical paths through an automated verification and testing framework. This provides a novel solution and method for a long-standing challenge in the field of optical network testing, filling a technological gap.
[0076] This application discloses an automatic testing system for a dumb resource management system, such as... Figure 4 As shown, the system includes: The graph construction module is used to construct a relation graph G=(V,E) of passive dumb resources based on the configuration information of passive dumb resources obtained from the passive dumb resource management system. The test control module is used to control the test process to automatically switch between multiple preset states based on the predefined state machine model, so as to perform the full-process test from passive dummy resource data preparation to optical path verification. The test control module includes a graph verification submodule, which is used to automatically verify the relationship graph after experiencing at least one non-terminating preset state in the test process, and use the automatic verification result as the trigger condition for the state transition of the state machine model or the basis for judging the test result of the whole process.
[0077] Regarding the system in the above embodiments, the specific manner in which each unit module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.
[0078] Based on the same inventive concept, embodiments of this application also provide an electronic device, the structure of which is as follows: Figure 5 As shown, it includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program or instructions to implement the aforementioned automatic testing method for a dumb resource management system.
[0079] Based on the same inventive concept, this application also provides a computer storage medium storing a computer program or instructions, which, when executed by a processor, implements the aforementioned automatic testing method for a dumb resource management system.
[0080] Based on the same inventive concept, this application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the aforementioned automatic testing method for a dumb resource management system.
[0081] Example 1: Automated Verification of Test Environment Setup and Resource Configuration 1. Set up a simulated testing environment: Deploy a passive, dumb resource management system (i.e., the system under test); simultaneously, deploy the automated testing system of this application and interconnect with the system under test via an API interface. To simulate a real-world scenario, initialize the configuration parameters of the system under test (i.e., the input parameters corresponding to the test process) and import the test data templates for basic resources to provide a basic environment for testing.
[0082] The configuration parameters are as follows: Create 3 simulator rooms (R1, R2, R3); Create 5 optical distribution boxes (C1-C5) and 8 patch panels (D1-D8), and configure their affiliation (e.g., D1 belongs to R1). Create 15 fiber optic cable segments (F1-F) 15 ), and set its properties (length > 0, number of cores is the preset value); A total of 200 ports are configured on the optical distribution box and patch panel, and the port numbering conforms to the specifications; 2. Relationship Graph Construction and Verification Implementation: (1) The test system initiates an automated resource configuration verification process. The test system obtains the configuration information of all the above resources through the API interface and constructs a relational graph G of passive dummy resources. For example, the computer room R1 is abstracted as node v. R1 Patch panel D1 is abstracted as node v D1 and create a path from v R1 Pointing to v D1 Edges of type "containment".
[0083] (2) The test system loads pre-defined attribute rules and relationship rules, which are implemented as resource attribute / relationship verification functions; Among them, the resource relationship constraint function C(e) is as follows: For example, the rule "the patch panel must belong to a certain computer room" is implemented as follows: For edge e of type "contains", check whether the "belonging computer room" attribute of the terminating node (patch panel) is consistent with the ID of the starting node (computer room).
[0084] The attribute validation function Vcheck(v) is as follows: For example, the rule "the length of the optical cable segment must be a real number greater than 0" is implemented as follows: for the optical cable segment node v, check whether its "length" attribute value is valid.
[0085] (3) Based on the aforementioned relationship graph, graph traversal and rule matching algorithm, and resource attribute / relationship verification function, from the data center node Initially, a depth-first traversal was performed on the entire relationship graph for verification. During the verification process, it was discovered that... The patch panel belongs to the wrong data center; it is associated with the wrong data center. It should actually belong to It was also detected One end of the optical cable segment was not properly secured to the patch panel or optical distribution box.
[0086] The graph traversal and rule matching algorithm generates detailed error reports (including error nodes, error types, and specific error information) based on the expected resource relationship model, helping testers quickly locate and fix resource configuration problems.
[0087] Example 2: Using a full-process testing framework for complex optical path scenarios, three typical complex optical path test scenarios are simulated: 1. Basic optical path configuration scenario: The test scenario parameters in input set I are set to a simple optical path configuration with a small number of resources and a single relationship type.
[0088] The test system reads the resource upload status. Upon startup, the system sequentially performs resource upload, relationship configuration, optical path formation, and optical path verification operations.
[0089] In the resource upload phase, the system simulates the upload of resources from two data centers, three optical distribution boxes, four patch panels, five optical cable segments, and their corresponding ports. In the relationship configuration phase, the system configures the relationships (such as binding and inclusion) between passive dummy resources according to preset attribute / relationship rules. In the optical path formation phase, the system generates a basic optical path. In the optical path verification phase, the system verifies the connectivity of the optical path and the accuracy of the resource relationships by combining the results of automated verification.
[0090] The entire testing process is completed automatically. If a fiber core connection error is found in the optical path, the system enters error handling mode, records the error information and attempts to recover, and finally generates a test result report.
[0091] 2. Multi-level complex optical path scenarios: Increase the number of resources and the complexity of relationships in the input set I to simulate a scenario with multi-level cascaded optical distribution boxes and patch panels, and complex patching of a large number of optical cable segments.
[0092] During the state transition process, the test system strictly follows the rules of the state machine model to perform operations.
[0093] During the relationship configuration phase, complex resource binding relationships are handled; during optical path formation, a complex optical path containing multiple branches and jumps is generated; during the optical path verification process, each connection point and each fiber core binding relationship of the optical path is carefully checked through multiple traversals and rule matching. If the binding relationship between a certain optical cable segment and a port is detected to be inconsistent with expectations, the test system triggers an error handling process, records the error information in detail, provides a basis for developers to fix the problem, and ensures the accuracy of the optical path configuration of the system in complex scenarios.
[0094] 3. Resource changes and optical path reconstruction scenarios: Based on the generated optical path, resource change operations are triggered by inputting user operation simulation commands from set I, such as deleting an optical distribution box or modifying the port attributes of a patch panel.
[0095] The test system, based on the rules of the state transition set T, transitions from the current state to the corresponding processing state, reconfigures resource relationships, automatically generates a new optical path, and performs verification. For example, when deleting... After the optical distribution box, the test system promptly adjusts the connection relationship of relevant optical cable segments and ports, generates a reconstructed optical path, and verifies the correctness of the new optical path. The test system's optical path processing capability under dynamic resource changes ensures the stability and accuracy of the passive dumb resource management system in actual resource change scenarios.
[0096] Example 3: The complete process of automated testing of the entire optical path: Test scenario: The test system is designed to automatically configure the optical path for a "cross-data center enterprise leased line" service. Initial conditions: The test framework is initialized, and the state machine is in the resource upload state. The input parameter I contains test case information: two server rooms, two patch panels, one fiber optic cable segment, and two ports need to be created.
[0097] Process execution: 1. Resource upload status ( ): (1) Action: The uploadResources() function reads the test case data. The test system drives the system under test to perform resource upload operation by calling the API interface of the system under test (i.e., the passive dumb resource management system). That is, it drives the system under test to automatically create equipment resources (R1, R2 in the computer room; DH1-in-R1, DH2-in-R2 patch panel; F1 optical cable segment; P1-on-DH1, P2-on-DH2 port).
[0098] (2) Verification: The verifyResourceAttributes() function is triggered, calling the resource attribute verification function. Perform attribute verification on each passive dummy resource (e.g., data center coding compliance, optical cable segment length > 0, fiber core count = 12).
[0099] (3) Result: All resource attributes pass the verification, and the state machine automatically transitions to the relation configuration state. .
[0100] 2. Relationship Configuration Status : (1) Action: The configureResourceRelations() function configures the relationships through the system API according to the business logic of the system under test: ① The computer room R1 "contains" the patch panel DH1, and R2 "contains" DH2; ② One end of the optical cable segment F1 is "bound" to port P1, and the other end is "bound" to port P2.
[0101] (2) Verification: The verifyResourceRelations() function is triggered to obtain the current relationship graph and call the resource relationship constraint function C to verify the relationship of each edge (such as checking whether DH1 is indeed in R1 and whether F1 is successfully bound at both ends).
[0102] (3) Result: The relationship verification of all edges passed and all conformed to the preset relationship rules. The state machine automatically transitioned to the optical path forming state. .
[0103] 3. Optical path formation state ( ): (1) Action: Executed via the formOpticalPath() function; the test framework simulates user operation, submitting a request to create an optical path to the system under test (i.e., the passive dumb resource management system), with the optical path parameter being "from P1 to P2". The system should automatically calculate the path ( And generate an optical path object OpticalPath1.
[0104] (2) Result: The optical path was successfully generated, and the state machine automatically transitioned to the optical path verification state. .
[0105] 4. Optical path verification status ( ): (1) Action: The verifyOpticalPath(OpticalPath) function performs comprehensive verification: The graph verification submodule is invoked to confirm the existence of the complete path in the relationship graph and that the attributes and relationships of all resources are correct. The graph verification module is used for automated verification based on the relationship graph.
[0106] Check business consistency: Confirm that the optical path status is "activated" and that the optical path ID is associated with the test business order.
[0107] (2) Results: The optical path verification was successful, the test framework generated a success report, the state machine entered the termination state F, and the test process ended.
[0108] 5. Example of an error handling branch: Scenario: Assume that in the relationship configuration state in step (2), the interface of the system under test is abnormal, causing the optical cable segment F1 to fail to bind port P2.
[0109] (1) Detection: When the verifyResourceRelations() function traverses the edge set based on the relation spectrum, it finds that C(F1,P2) is incorrect and returns False (the binding relationship does not exist).
[0110] (2) Action: When the function returns False, the state machine transitions to the error handling state. .
[0111] (3) Error handling: The handleError() function logs the error: "Relationship configuration error: Fiber optic segment F1 failed to bind to port P2".
[0112] According to the preset strategy, the test framework attempts to retry the resource configuration operation.
[0113] If the retry is successful, the state machine returns to the relation configuration state. Continue with the subsequent procedures.
[0114] If multiple retries still fail, a serious error is recorded, and the state machine transitions to the optical path verification state. The test will terminate after the final error report is generated.
[0115] Example 4: Specific Implementation of Optical Path Verification Optical path verification is a crucial step in ensuring that the entire physical optical path from start to finish conforms to business logic and physical rules. The `verifyOpticalPath` function in this application primarily verifies the following aspects, as illustrated in the following specific implementation examples: 1. Example A: Basic Connectivity and Endpoint Verification: (1) Scenario description: Verify a simple direct optical path from the patch panel port of computer room A to the optical distribution box port of computer room B.
[0116] (2) Verification process: Path existence check (belonging to optical path connectivity verification): The graph traversal algorithm traverses the relationship graph to confirm that all nodes (equipment room, patch panel, optical cable segment, optical distribution box) and edges (containment, binding, connection) in the optical path exist and the path is complete without breaks.
[0117] Ending status verification (belongs to resource attribute verification): Check whether the status attributes of the two ends of the optical path (patch panel port and optical distribution box port) are "occupied" or "terminated"; confirm that the fiber core of the optical cable segment connecting the two has been correctly "bound" to the port at both ends and is in the "ending status" state.
[0118] Attribute matching verification (belonging to resource attribute verification): Check whether the transmission attributes such as the model and loss value of the fiber core of the optical cable segment are within the tolerance range allowed by the system to ensure physical connectivity.
[0119] 2. Example B: Verification of a complex optical path including jumpers: (1) Scenario description: Verify a complex optical path that spans multiple computer rooms and connects different patch panel ports via jumper cables.
[0120] (2) Verification process: Fiber patching point logic verification (belonging to optical path connectivity verification): At the fiber patching point (such as patch panel port A1 and port A2 connected by a pigtail), the algorithm not only checks their physical connection relationship, but also verifies their business logic consistency. For example, if port A1 is bound to the drop cable and port A2 is bound to the trunk cable, is this fiber patching relationship allowed in terms of business logic?
[0121] Full route backtracking check (belonging to optical path connectivity verification): Backtracking from the optical path endpoint to the starting point to ensure that the relationship type ("connection" or "fiber jumper") of every connection point (fusion splice, jumper) on the entire path conforms to the predefined rules, and there are no loop routes or illegal jumpers.
[0122] Resource conflict check (belonging to resource relationship verification): Check whether there are state conflicts of resources such as ports and fiber cores occupied along the optical path throughout their entire life cycle (such as a fiber core being occupied by another optical path, or a port being incorrectly multiplexed for multiple optical paths).
[0123] 3. Example 3: Service Bearer Consistency Verification: (1) Scenario description: Verify whether the optical path configured for a certain customer service (such as a leased line) is consistent with the order requirements.
[0124] (2) Verification process: Start / end point matching check (belonging to fiber core bonding accuracy verification): Verify whether the actual start and end points of the optical path in the equipment room and equipment port are consistent with the locations specified in the customer's order.
[0125] Performance index verification (belonging to resource attribute verification): Based on all optical cable segments and jumper points along the optical path, calculate the theoretical total loss, length and other performance indicators to determine whether they meet the specifications for service activation.
[0126] Relevance review (belonging to resource relationship verification): Check whether the optical path has been correctly associated with the corresponding business document to ensure traceability in management.
[0127] Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. An automatic testing method for a dumb resource management system, characterized in that, The method includes: Based on the configuration information of the passive dumb resources obtained from the passive dumb resource management system, a relationship graph G=(V,E) of the passive dumb resources is constructed. Based on a predefined state machine model, the control test process automatically switches between multiple preset states to perform a full-process test from passive dummy resource data preparation to optical path verification. In the test process, after experiencing at least one non-terminating preset state, an automated verification is performed based on the relationship graph, and the automated verification result is used as the trigger condition for the state machine model to perform state transitions and as the basis for judging the test results of the entire process.
2. The automatic testing method for a dumb resource management system according to claim 1, characterized in that, The construction of the relational graph G=(V,E) of passive dummy resources includes: Obtain passive dumb resource configuration information of the communication optical network from the dumb resource management system; Based on the configuration information of the passive dummy resources, various passive dummy resources are abstracted into nodes of a relational graph to form a node set V. The various passive dummy resources include equipment rooms, optical distribution boxes, patch panels, optical cable segments, and ports. Based on the passive dummy resource configuration information, the association relationships between passive dummy resources are abstracted into the edges of a relationship graph to form a set of relationship edges E, and each edge is attached with relevant attributes of the association relationship; among which, the relevant attributes of the association relationship include relationship type and association priority; Represents a node With nodes There is a relationship between them; Based on the node set V and the relation edge set E, the relation graph G=(V,E) is formed; Among them, the node set In the formula, Represents the set of data center nodes. Represents the set of optical distribution box nodes. Represents the set of patch panel nodes. Represents the set of nodes in an optical cable segment. This represents a set of port nodes.
3. The automatic testing method for a dumb resource management system according to claim 1, characterized in that, The automated verification based on the relationship graph includes: Define resource relationship constraint functions This is used to verify whether the relationship between any two edges conforms to predefined relationship rules; where C represents the resource relationship constraint function; E represents the set of relationship edges, which is the input domain of the resource relationship constraint function C; Define resource attribute validation function This is used to verify whether the attributes of any node conform to predefined attribute rules; where, This represents the resource attribute validation function. This represents a set of nodes and is a resource attribute validation function. The input field; The relationship graph is traversed starting from any root node using a graph traversal algorithm. During the traversal, the resource attribute verification function is called to verify the attributes of each visited node v, and the resource relationship constraint function is called to verify the relationship of each traversed edge, and the verification results are generated. The verification results are compared with the expected resource relationship model M to generate a verification result report for passive dummy resource configuration. The verification results are compared with the expected resource relationship model M to generate a verification report for passive dummy resource configuration, including: If the verification result deviates from the expected resource relationship model M, the error information is recorded, and a verification result report containing the error node, error type, and detailed description is generated.
4. An automatic testing method for a dumb resource management system according to claim 1 or 3, characterized in that, Construct a predefined state machine model, including: The state machine model is constructed as follows: ;in, Represents a preset set of states. Represents the set of state transitions. Represents the input set, Indicates the output set. Represents the set of termination states; In this context, the business processes in the passive dumb resource management system are abstracted into preset states, generating a preset state set S. This includes resource upload status, relationship configuration status, optical path formation status, optical path verification status, and error handling status; the business process corresponds to the full-process test from passive dummy resource data preparation to optical path verification. The state transition set Define the transition logic of the state machine from the current state to the next state under different test process operations; The input set This includes test scenario parameters and user operation simulation commands, with the input set serving as the triggering condition for state transitions; The output set This includes various output data during the testing process, such as test result reports, error logs, and optical path performance indicators. Through the set of termination states Definition: When the optical path verification is completed and the result is correct, or after all error information is recorded, the state machine enters the termination state, indicating the end of the test process.
5. The automatic testing method for a dumb resource management system according to claim 4, characterized in that, The predefined state machine model controls the automated testing process to automatically switch between multiple preset states to perform a full-process test, from passive dummy resource data preparation to optical path verification, including: Based on the test scenario parameters and user operation simulation instructions in the input set I of the state machine model, test cases are dynamically generated; the state machine instantiated based on the state machine model is run, and the state machine controls the test process to automatically switch between resource upload state, relationship configuration state, optical path formation state, optical path verification state and error handling state quality inspection by executing test cases and according to the definition of the state transition set T; The test process is configured to execute along a sequence from resource upload state, relationship configuration state, optical path formation state to optical path verification state as the main test path; and at each state switch, the state machine calls the business operation function corresponding to the switched state to send the corresponding business process operation instruction to the passive dumb resource management system.
6. The automatic testing method for a dumb resource management system according to claim 1, characterized in that, The step of using the automated verification result as a trigger condition for state transition in the state machine includes: When the state machine is in the resource upload state and the resource upload operation is completed, the resource attribute verification function is automatically called to trigger the attribute verification of the uploaded passive dummy resources in the passive dummy resource management system and generate the attribute verification result. If the attribute verification result is passed, the state machine transitions from the resource upload state to the relationship configuration state. If the attribute verification result is failed, the state machine transitions to the error handling state. Once the state machine is in the relationship configuration state and has completed the relationship configuration operation, it automatically calls the resource relationship constraint function to trigger the relationship verification of the configured passive dummy resource relationships in the passive dummy resource management system and generates the relationship verification result. If the relationship verification result is successful, the state machine transitions to the optical path forming state; if the relationship verification result is unsuccessful, the state machine transitions to the error handling state.
7. The automatic testing method for a dumb resource management system according to claim 1, characterized in that, Using automated verification results as the basis for determining the overall test results includes: When the state machine is in the optical path verification state, the optical path verification function is called to perform optical path verification. The process of calling the optical path verification function to perform optical path verification includes: based on the current relational graph G, performing path backtracking on the optical path generated by the passive dumb resource management system, checking whether all nodes and edges traversed by the optical path can pass the automatic verification of the resource relation constraint function and the resource attribute verification function, generating an automatic verification result, and determining whether the optical path is correct based on the verification result.
8. An automatic testing system for a dumb resource management system, characterized in that, The system includes: The graph construction module is used to construct a relation graph G=(V,E) of passive dumb resources based on the configuration information of passive dumb resources obtained from the passive dumb resource management system. The test control module is used to control the test process to automatically switch between multiple preset states based on a predefined state machine model, so as to perform the full-process test from passive dummy resource data preparation to optical path verification. The test control module includes a graph verification submodule, which is used to automatically verify the relationship graph after experiencing at least one non-terminating preset state in the test process, and use the automatic verification result as the trigger condition for the state machine model to perform state transition and the basis for judging the test result of the whole process.
9. An electronic device, characterized in that, The system includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program or instructions to implement an automatic testing method for a dumb resource management system as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program or instructions, which, when executed by a processor, implement the automatic testing method for a dumb resource management system as described in any one of claims 1-7.
11. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the automatic testing method for a dumb resource management system as described in any one of claims 1-7.
Citation Information
Patent Citations
Optical network knowledge graph construction method and device, computer equipment and storage medium
CN118246532A
Dummy resource monitoring system and method, electronic equipment, storage medium and product
CN118802974A
Communication dumb resource position calibration method and device
CN118803975A
Optical fiber network intelligent regular checking and fault closed-loop processing system, method and equipment
CN120934615A
Dummy resource management method and system, electronic equipment, storage medium and program product
CN121151345A
Cited By
New line railway transmission and data network port intelligent planning method and system
CN121924025A