Equipment connection method and device, computer equipment, readable storage medium and program product

By obtaining the equipment topology diagram and inventory information, and using the pre-built device connection rule model, the port connection table is automatically generated, which solves the problem of low equipment connection efficiency in the existing technology and realizes an efficient automated connection process.

CN119484297AActive Publication Date: 2025-02-18CHINA TELECOM CLOUD TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411762801.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-02-18
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

In the prior art, equipment connection requires a large amount of labor costs, resulting in low efficiency.

Method used

By obtaining the device topology diagram and device list information, based on the pre-constructed device connection rule model, the target connection rules are determined, and a port connection table is generated to automate the equipment connection process.

Benefits of technology

No manual production of port connection information is required, which significantly improves the efficiency of equipment connection and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484297A_ABST
    Figure CN119484297A_ABST
Patent Text Reader

Abstract

The invention relates to an equipment connection method and device, computer equipment, a readable storage medium and a program product. The method comprises the following steps: acquiring an equipment topological graph and equipment list information corresponding to the equipment topological graph; determining at least one piece of equipment connection information contained in the topological graph according to the equipment topological graph; the equipment connection information at least comprises source end equipment and opposite end equipment; determining a target connection rule based on a pre-constructed equipment connection rule model, the equipment connection information and the equipment list information; based on the target connection rule, generating a port connection table corresponding to the device connection information; the port connection table at least comprises port connection information between the source end equipment and the opposite end equipment. By adopting the method, the equipment connection efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a device connection method, apparatus, computer equipment, readable storage medium, and program product. Background Art

[0002] With the development of internet technology, cloud computing networks are growing rapidly, and the scale of data centers is also increasing. This has led to an increasing number of physical devices (such as switches and other network devices, as well as servers) that need to be managed. These physical devices often have numerous connections, and only when each connection is properly connected can the entire network function properly.

[0003] In related technologies, technicians need to read a large number of specification documents provided by the production and research department and fully understand the connection logic of different products and scenarios. Then, based on the connection requirements of physical devices in the current data center, they need to design the port connection table between each physical device.

[0004] However, the above connection design method requires a lot of labor costs, resulting in low efficiency of device connection. Summary of the Invention

[0005] Based on this, it is necessary to provide a device connection method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of device connection in order to address the above technical problems.

[0006] In a first aspect, the present application provides a device connection method, the method comprising:

[0007] Obtaining a device topology diagram and device list information corresponding to the device topology diagram;

[0008] Determine, based on the device topology diagram, at least one device connection information included in the topology diagram; the device connection information at least includes a source device and a peer device;

[0009] Determining a target connection rule based on a pre-built device connection rule model, the device connection information, and the device list information;

[0010] Based on the target connection rule, a port connection table corresponding to the device connection information is generated; the port connection table at least includes the port connection information between the source-end device and the opposite-end device.

[0011] In one embodiment, the device list information includes parameter information of each device in the device topology diagram; the device connection information further includes connection configuration information;

[0012] The determining of the target connection rule based on the pre-built device connection rule model, the device connection information, and the device list information includes:

[0013] For each device connection information, obtain parameter information of the source device and parameter information of the peer device contained in the device connection information from the device list information;

[0014] In a pre-stored device connection rule model, a target connection rule that matches the parameter information of the source device, the parameter information of the opposite device, and the connection configuration information is determined.

[0015] In one embodiment, generating a port connection table corresponding to the device connection information based on the target connection rule includes:

[0016] Based on the target connection rule, port access processing is performed on the source device and the opposite device, and a port connection table is generated based on the accessed ports of the source device and the opposite device.

[0017] In one embodiment, the method further comprises:

[0018] If the target connection rule is not determined in the pre-stored device connection rule model, outputting prompt information, the prompt information being used to prompt configuration of port connection information between the source device and the peer device;

[0019] In response to the port configuration instruction, the port connection information between the source device and the opposite device is acquired, and a port connection table is generated.

[0020] In one embodiment, determining, based on the device topology map, at least one device connection information included in the topology map includes:

[0021] Parsing the device topology diagram in a preset order to obtain a device pair connected to each device line included in the device topology diagram;

[0022] A source device and a counterpart device in a device pair are determined, and connection configuration information between the source device and the counterpart device is identified from the device topology map.

[0023] In one embodiment, the method further comprises:

[0024] Obtain wiring specification design documents;

[0025] The device configuration information of each device contained in the connection specification design file is identified through a text processing model, and a device connection rule model is generated based on the device configuration information.

[0026] In a second aspect, the present application provides a device connection apparatus, the apparatus comprising:

[0027] A first acquisition module is used to acquire a device topology map and device list information corresponding to the device topology map;

[0028] A first determining module is configured to determine, based on the device topology map, at least one piece of device connection information included in the topology map; the device connection information at least includes a source device and a peer device;

[0029] A second determining module is configured to determine a target connection rule based on a pre-built device connection rule model, the device connection information, and the device list information;

[0030] The first generating module is configured to generate a port connection table corresponding to the device connection information based on the target connection rule; the port connection table at least includes the port connection information between the source device and the opposite device.

[0031] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.

[0032] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any one of the methods in the first aspect when executed by a processor.

[0033] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any one of the methods in the first aspect.

[0034] The above-mentioned device connection method, apparatus, computer device, computer-readable storage medium, and computer program product can obtain a device topology map and device list information corresponding to the device topology map; determine at least one device connection information contained in the topology map based on the device topology map; the device connection information at least includes a source device and a peer device; determine a target connection rule based on a pre-constructed device connection rule model, the device connection information, and the device list information; generate a port connection table corresponding to the device connection information based on the target connection rule; the port connection table at least includes port connection information between the source device and the peer device. Using this solution, a device connection rule model can be pre-constructed, and the applicable target connection rule can be matched based on the device connection information in the topology map. Then, based on the target connection rule, a port connection table corresponding to the device connection information can be automatically generated, eliminating the need for manual generation of port connection information and improving device connection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0036] FIG1 is a schematic diagram of a flow chart of a device connection method according to an embodiment;

[0037] Figure 2 A schematic diagram of switch-switch connection rules in one embodiment;

[0038] Figure 3 A schematic diagram of a switch-server connection rule in one embodiment;

[0039] Figure 4 1. A schematic flow chart of a device connection method in one embodiment;

[0040] Figure 5 A schematic flow chart of an example of a device connection method in one embodiment;

[0041] Figure 6 A structural block diagram of a device connection apparatus in one embodiment;

[0042] FIG7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0044] The embodiments of this application provide a device connection method. This embodiment uses the method applied to a terminal as an example for illustration. It is understood that the method can also be applied to a server, or to a system including a terminal and a server, and implemented through interaction between the terminal and the server. It is understood that the method can be applied to any terminal with data processing capabilities, and the embodiments of this application are not limiting.

[0045] With the development of internet technology, cloud computing networks have continued to grow rapidly, and the scale of data centers has also increased. The number of physical devices that need to be managed, such as switches and other network devices, and servers, has also increased. These physical devices often have numerous connections, and only when each connection is properly connected can the entire network function properly. A cloud computing network, in particular, transforms a resource pool into a virtual resource, then connects user devices at all locations to these virtual resources. Physical devices in a data center primarily include network equipment and servers. Network equipment refers to the hardware components used for connectivity and network communication, including but not limited to switches, routers, firewalls, bridges, hubs, gateways, and VPN (Virtual Private Network) servers. A switch is a type of network hardware device used for forwarding electrical signals, providing an electrical signal path between any two network nodes connected to the switch. The primary function of a server is to provide various services to other devices (such as personal computers, smartphones, and ATMs) within a network environment. Physical device connections refer to the use of twisted-pair cables or optical fibers to connect physical devices within a network, enabling resource sharing and information exchange between devices.

[0046] In an embodiment of the present application, a device connection rule model can be constructed based on a traditional connection specification file, and the applicable target connection rules can be matched according to the device connection information in the topology diagram. Then, based on the target connection rules, a port connection table corresponding to the device connection information can be automatically generated. There is no need to manually produce port connection information, thereby improving the efficiency of device connection.

[0047] The following will describe in detail the device connection method provided by this application in conjunction with specific implementation methods. As shown in Figure 1, the method includes the following steps:

[0048] Step 102: Obtain a device topology diagram and device list information corresponding to the device topology diagram.

[0049] In an embodiment of the present application, the terminal can obtain a device topology diagram that needs to be connected to the device, and the device list information corresponding to the device topology diagram. Specifically, the terminal can obtain a network planning and design file, which contains a device topology diagram and device list information. Among them, the nodes in the device topology diagram represent physical devices, the connecting lines represent the connection relationship between physical devices, and the device topology diagram also contains connection configuration information between physical devices. The connection configuration information can include connection parameters between two physical devices, which will be described in detail later. The device list information can include parameter information of the physical device, such as the number of boards, board types, available port ranges, etc.

[0050] Step 104: Determine, based on the device topology map, at least one piece of device connection information included in the topology map.

[0051] The device connection information at least includes a source device and a peer device.

[0052] In an embodiment of the present application, the terminal can separate the connections between physical devices in the device topology diagram to obtain at least one device connection information contained in the topology diagram. Each device connection information contains relevant information about a device pair. The device pair includes a source device and a peer device.

[0053] Step 106 : Determine the target connection rule based on the pre-built device connection rule model, device connection information, and device list information.

[0054] In an embodiment of the present application, the terminal may store a pre-built device connection rule model. The device connection rule model may include multiple device connection rules, each of which is used to indicate the port connection requirements of a device pair. For each device connection information, the terminal may determine the target connection rule based on the pre-built device connection rule model, the device connection information, and the device list information. The target connection rule is the connection rule that matches the device connection information. For connections between different types of physical devices, the applicable connection rules are also different. Specifically, the types of connection rules include switch-switch connection rules and switch-server connection rules. Figure 2 A schematic diagram of the switch-switch connection rules provided in an embodiment of the present application, which may include the device role, manufacturer model, board type, starting port, ending port, cross-frame / cross-device priority, number of board groups, usage order, port type of the source device and the peer device, respectively, and may also include the virtualization method of the link (i.e., virtualization type). Figure 3 Schematic diagram of the switch-server connection rules provided for an embodiment of the present application. This may include the source device's device role, manufacturer model, board type, starting port, ending port, cross-frame / cross-device priority, board group number, usage order, and port type; the peer device's device role, manufacturer model, local / cross-network card priority, and bond number. The terminal can determine the type of connection rule that matches the source device and peer device based on the device connection information, and then determine the target connection rule from the connection rules of that type contained in the device connection rule model.

[0055] In one example, a device connection rule may include multiple fields, specifically information about the source device and information about the peer device. The source device's information may include at least one or more of the following: device role, board type, start port, end port, cross-frame / cross-device priority, number of board groups, order of use, and port type. In addition to the aforementioned fields, the peer device's information may also include a connection virtualization method. Table 1 shows an example of a connection rule provided in an embodiment of the present application.

[0056]

[0057] Step 108: Generate a port connection table corresponding to the device connection information based on the target connection rule.

[0058] The port connection table at least includes the port connection information between the source device and the peer device.

[0059] In an embodiment of the present application, the terminal can determine the port usage mode of the source device and the peer device in the device connection information based on the target connection rule, determine the port connection status of the source device and the peer device based on the port usage mode, and then generate a port connection table. The port connection information corresponding to multiple device pairs can be stored in a single port connection table or in different port connection information, which is not limited in the embodiment of the present application.

[0060] In this solution, a device connection rule model can be built based on the traditional connection specification file, and the applicable target connection rules can be matched according to the device connection information in the topology diagram. Then, based on the target connection rules, a port connection table corresponding to the device connection information is automatically generated. This eliminates the need for manual production of port connection information, thereby improving the efficiency of device connection.

[0061] Optionally, the device list information includes parameter information of each device in the device topology diagram; the device connection information also includes connection configuration information. The connection configuration information may include at least one of the connection virtualization method and the connection rate. Figure 4 As shown, in the pre-built device connection rule model, a target connection rule that matches the device connection information and the device list information is determined, including:

[0062] Step 402: For each device connection information, obtain the parameter information of the source device and the parameter information of the peer device contained in the device connection information from the device list information.

[0063] In the embodiment of the present application, for each device connection information, the terminal can obtain the parameter information of the source device and the parameter information of the peer device contained in the device connection information from the device list information. The parameter information may include the manufacturer model, the number of boards, the board type, the available port range, etc.

[0064] In an example, the source device is a core switch, and the peer device is a VIP customer access switch. The obtained parameter information of the core switch is: the card configuration is two 48-port 10GE cards and two 18-port 100GE cards, and the available ports are fully configured; the parameter information of the VIP customer access switch is: the VIP customer access switch is a box switch, ports 1-48 are configured as 10GE optical ports, and ports 49-54 are 40GE optical ports.

[0065] Step 404: Determine a target connection rule that matches the parameter information of the source device, the parameter information of the peer device, and the connection configuration information in the pre-stored device connection rule model.

[0066] In an embodiment of the present application, the terminal can query the target connection rule that matches the parameter information of the source device, the parameter information of the opposite device, and the connection configuration information in the device connection rule model. Specifically, a connection rule containing the parameter information of the source device, the parameter information of the opposite device, and the connection configuration information can be determined as the target connection rule. In an example, the target connection rule hit by the device can be determined based on the above-determined source device role, manufacturer model, board type, and opposite device role, manufacturer model, board type, and the virtualization method of the connection at both ends. Table 2 shows an example of a target connection rule provided in an embodiment of the present application.

[0067]

[0068] Optionally, the device connection rule model can also be obtained by training a machine learning model using sample data. The terminal can input the parameter information of the source device, the parameter information of the peer device, and the connection configuration information into the pre-trained device connection rule model to obtain the target connection rule.

[0069] In this solution, applicable target connection rules can be matched based on multi-dimensional information such as parameter information of the source device, parameter information of the peer device, and connection configuration information, which can improve the accuracy and efficiency of determining connection rules, thereby improving the efficiency and accuracy of device connection.

[0070] Optionally, based on the target connection rules, a port connection table corresponding to the device connection information is generated, including: based on the target connection rules, port access processing is performed on the source device and the opposite device, and a port connection table is generated based on the access ports of the source device and the opposite device.

[0071] In an embodiment of the present application, the terminal can determine the available ports of the source device and the available ports of the opposite device based on the target connection rules, and then perform port access processing on the available ports of the source device and the available ports of the opposite device based on the port usage order in the target connection rules, and generate a port connection table based on the accessed ports of the source device and the opposite device. In one example, the source and the opposite end are accessed, the first port accessed by the source end is connected to the first port accessed by the opposite end, the second port accessed by the source end is connected to the second port accessed by the opposite end, and so on, to generate a port connection table. For example, based on the target connection rules in Table 2, the port connection table of some of the large customer access switches connected to the core switches is as follows:

[0072]

[0073] Optionally, the method also includes: if the target connection rule is not determined in the pre-stored device connection rule model, outputting a prompt message, the prompt message being used to prompt the configuration of the port connection information between the source device and the opposite device; in response to the port configuration instruction, obtaining the port connection information between the source device and the opposite device, and generating a port connection table.

[0074] In an embodiment of the present application, if a terminal does not determine a target connection rule in a pre-built device connection rule model or a pre-stored device connection rule model, a display component may display a prompt message prompting a user to configure port connection information between a source device and a peer device, and the prompt message may include parameter information for the source device, parameter information for the peer device, and connection configuration information. Based on the prompt message, the user may configure the port connection information at the terminal. In response to the port configuration instructions input by the user, the terminal obtains the port connection information between the source device and the peer device and generates a port connection table.

[0075] Through this solution, when the target connection rule is not determined, the user can be prompted to configure port continuity information, and the user can be provided with device parameter information and connection configuration information, etc., providing a basis for the user to configure port connection information, effectively improving port configuration efficiency.

[0076] Optionally, based on the device topology map, determine at least one device connection information contained in the topology map, including: parsing the device topology map in a preset order to obtain the device pair connected to each device line contained in the device topology map; determine the source device and the opposite device in the device pair, and identify the connection configuration information between the source device and the opposite device from the device topology map.

[0077] In an embodiment of the present application, the terminal can parse the device topology diagram in a preset order. For example, the terminal can traverse the device topology diagram in order from top to bottom, determine each device connection included in the device topology diagram, and determine the devices to which the devices are continuously connected to obtain a device pair, and then determine the device roles of the two devices in the device pair, that is, the source device and the opposite device, and identify the connection configuration information between the source device and the opposite device from the device topology diagram. For example, based on the topology diagram in the specification design document, the connection between different device roles is split, and each connection is split into: source device role, opposite device role and other information. At the same time, the connection rate and connection virtualization method between the two devices are obtained. For example, the core switch is connected to the large customer access switch, connected to 40GE multimode optical fiber, and the down relationship.

[0078] This solution intelligently analyzes the device topology to identify the source and peer devices, as well as the connection configuration information, to determine the connection rules to use. By establishing a device connection rule model, the device topology for any project can automatically analyze the appropriate connection rules and generate a port connection table. This adapts to different scenarios and network topologies, improving device connection efficiency.

[0079] Optionally, the method further includes: obtaining a connection specification design file; identifying device configuration information of each device contained in the connection specification design file through a text processing model, and generating a device connection rule model based on the device configuration information.

[0080] In an embodiment of the present application, a terminal can obtain a connection specification design file, identify the device configuration information of each device contained in the connection specification design file through a text processing model, and generate a device connection rule model based on the device configuration information. The text processing model can be an artificial intelligence model with text parsing and understanding capabilities, and can be trained using sample data.

[0081] Specifically, parsing the connection specification design document using a text processing model can yield at least one or more of the following: 1. The devices involved in the connection specification design document, and for these devices, the source and peer device roles, and vendor models. Different device roles and vendor models have different connection specifications, so it's necessary to first determine the source and peer device roles and vendor models for the rule to enable more accurate abstract design of the connection rule. 2. The device card types (for network devices) and bond ports (for servers). For network devices, the card type to which the rule applies is specified, such as 48-port 10GE or 18-port 100GE, to more accurately define the port range. For servers, the bond ports to which the rule applies are specified. 3. The starting and ending ports. For both the source and peer devices, the starting and ending ports to which the rule applies are specified, meaning that ports within the range on the local end are connected to ports within the range on the peer end. 4. Port usage rules (including cross-board / cross-device priority, number of board groups, order of use, etc.). In the above content, the connection port range of the source and peer ends has been clarified. So, in what order should the ports in this range be used? Based on this, the port usage rules need to be further clarified. Usually, they are stipulated from the following three dimensions: (1) Cross-board / cross-device priority. In actual situations, there are usually multiple boards in one device; two devices are stacked / M-lag used; multiple devices are grouped, etc. In the rules, it is necessary to clarify whether the cross-board port of the device is given priority when the port is used, or whether the cross-device port is given priority; (2) Number of board groups: used to stipulate the number of boards to be used at the same time when the port is used, for example: using the ports in this range of 2 boards at the same time, or using the ports in this range of 4 boards at the same time; (3) Order of use: divided into positive order and reverse order, used to stipulate the order of use of the above port range. 5. Port type: Among them, the switch port type is divided into normal, MGT, Console, and the server port type is divided into normal, IPMI, etc. 6. Virtualization mode: Among them, virtualization mode is divided into device virtualization and link virtualization. Each mode is divided into two types: detection line and data line. Therefore, this mode is divided into the following five cases: stacking detection, stacking data line, M-lag detection line, M-lag data line, and none.

[0082] The terminal uses a text processing model to abstract relevant data from the connection specification file and the connection specification design file according to the above data dimensions, obtains device configuration information, and constructs connection rules based on the abstracted device configuration information, and then constructs a device connection rule model based on each continuous rule.

[0083] In this solution, a text processing model is used to extract the content of complex connection specification files into several connection rules, thereby constructing a device connection rule model. This eliminates the need for technical personnel to read and understand complex specification files, saving labor costs and device connection efficiency.

[0084] like Figure 5 As shown, the embodiment of the present application provides an example of a device connection method, including the following steps:

[0085] Step 501: Obtain a wiring specification design file.

[0086] Step 502 : Identify the device configuration information of each device contained in the connection specification design file through a text processing model, and generate a device connection rule model based on the device configuration information.

[0087] The device connection rule model includes switch-switch connection rules and switch-server connection rules.

[0088] Step 503: Acquire the device topology map and the device list information corresponding to the device topology map.

[0089] Step 504 , parsing the device topology map in a preset order, obtaining the device pairs connected to each device line included in the device topology map, and determining the device connection information of the device pairs.

[0090] The device connection information at least includes the source device, the peer device, and connection configuration information.

[0091] Step 505: Acquire parameter information of the source device and parameter information of the peer device from the device list information.

[0092] Step 506: Determine a target connection rule that matches the parameter information of the source device, the parameter information of the peer device, and the connection configuration information in the pre-stored device connection rule model.

[0093] Step 507: Based on the target connection rule, perform port access processing on the source device and the peer device, and generate a port connection table based on the accessed ports of the source device and the peer device.

[0094] The port connection table at least includes the port connection information between the source device and the peer device.

[0095] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0096] Based on the same inventive concept, embodiments of the present application also provide a device connection apparatus for implementing the aforementioned device connection method. The solution provided by this apparatus is similar to the solution described in the aforementioned method. Therefore, the specific limitations in one or more embodiments of the device connection apparatus provided below can be found in the aforementioned limitations on the device connection method and will not be further elaborated here.

[0097] In an exemplary embodiment, Figure 6 As shown, a device connection apparatus is provided, comprising: a first acquisition module 610, a first determination module 620 and a first generation module 630, wherein:

[0098] A first acquisition module 610 is configured to acquire a device topology map and device list information corresponding to the device topology map;

[0099] A first determining module 620 is configured to determine, based on the device topology map, at least one device connection information included in the topology map; the device connection information includes at least a source device and a peer device;

[0100] A second determination module is used to determine a target connection rule based on a pre-built device connection rule model, device connection information, and device list information;

[0101] The first generating module 630 is configured to generate a port connection table corresponding to the device connection information based on the target connection rule; the port connection table at least includes the port connection information between the source device and the peer device.

[0102] In one embodiment, the device list information includes parameter information of each device in the device topology diagram; the device connection information also includes connection configuration information;

[0103] The second determination module is specifically configured to:

[0104] For each device connection information, obtain the parameter information of the source device and the parameter information of the peer device contained in the device connection information from the device list information;

[0105] In a pre-stored device connection rule model, a target connection rule that matches the parameter information of the source device, the parameter information of the opposite device, and the connection configuration information is determined.

[0106] In one embodiment, the first generating module 630 is specifically configured to:

[0107] Based on the target connection rule, the source device and the opposite device are processed for port access, and a port connection table is generated based on the access ports of the source device and the opposite device.

[0108] In one embodiment, the apparatus further comprises:

[0109] An output module, configured to output prompt information if a target connection rule is not determined in a pre-stored device connection rule model, the prompt information being used to prompt configuration of port connection information between a source device and a peer device;

[0110] The second generating module is configured to obtain the port connection information between the source device and the opposite device in response to the port configuration instruction, and to generate a port connection table.

[0111] In one embodiment, the first determining module 620 is specifically configured to:

[0112] Parse the device topology diagram in a preset order to obtain the device pairs connected to each device line included in the device topology diagram;

[0113] A source device and a peer device in a device pair are determined, and connection configuration information between the source device and the peer device is identified from the device topology diagram.

[0114] In one embodiment, the apparatus further comprises:

[0115] The second acquisition module is used to obtain the connection specification design file;

[0116] The third generation module is used to identify the device configuration information of each device contained in the connection specification design file through a text processing model, and generate a device connection rule model based on the device configuration information.

[0117] Each module in the aforementioned device connection apparatus may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0118] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure may be shown in Figure 7. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and computer program stored in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via wired or wireless communication, and the wireless communication may be achieved via Wi-Fi, a mobile cellular network, near-field communication (NFC), or other technologies. When executed by the processor, the computer program implements a device connection method. The display unit of the computer device is used to produce a visually visible image and may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.

[0119] Those skilled in the art will understand that the structure shown in FIG7 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0120] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned device connection method are implemented.

[0121] In one embodiment, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the above-mentioned device connection method are implemented.

[0122] It should be noted that the user information (including but not limited to user device identification, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0123] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0124] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0125] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A device connection method, characterized in that: The method comprises: Obtaining a device topology map and device list information corresponding to the device topology map; According to the device topology map, determining at least one device connection information contained in the topology map; the device connection information at least includes a source device and a peer device; Determine a target connection rule based on a pre-built device connection rule model, the device connection information and the device list information; Based on the target connection rule, a port connection table corresponding to the device connection information is generated; the port connection table at least includes the port connection information between the source device and the opposite device.

2. The method according to claim 1, characterized in that The device list information includes parameter information of each device in the device topology diagram; the device connection information also includes connection configuration information; The determining of the target connection rule based on the pre-built device connection rule model, the device connection information and the device list information includes: For each device connection information, obtain parameter information of the source device and parameter information of the opposite device contained in the device connection information from the device list information; In a pre-stored device connection rule model, a target connection rule matching the parameter information of the source device, the parameter information of the opposite device and the connection configuration information is determined.

3. The method according to claim 1, characterized in that The generating, based on the target connection rule, a port connection table corresponding to the device connection information comprises: Based on the target connection rule, port access processing is performed on the source device and the opposite device, and a port connection table is generated based on the accessed ports of the source device and the opposite device.

4. The method according to claim 2, characterized in that: The method further comprises: If the target connection rule is not determined in the pre-stored device connection rule model, outputting prompt information, the prompt information being used to prompt configuration of port connection information between the source device and the opposite device; In response to the port configuration instruction, the port connection information between the source device and the opposite device is obtained, and a port connection table is generated.

5. The method according to claim 1 or 2, characterized in that: The step of determining, according to the device topology map, at least one device connection information included in the topology map comprises: Parsing the device topology map in a preset order to obtain a device pair connected to each device line included in the device topology map; A source device and a counterpart device in a device pair are determined, and connection configuration information between the source device and the counterpart device is identified from the device topology map.

6. The method according to claim 1, characterized in that The method further comprises: Obtain wiring specification design documents; The device configuration information of each device contained in the connection specification design file is identified through a text processing model, and a device connection rule model is generated based on the device configuration information.

7. A device connection device, characterized in that: The device comprises: A first acquisition module is used to acquire a device topology map and device list information corresponding to the device topology map; A first determination module is used to determine at least one device connection information included in the device topology map according to the device topology map; the device connection information at least includes a source device and a peer device; A second determination module is used to determine a target connection rule based on a pre-built device connection rule model, the device connection information and the device list information; The first generating module is used to generate a port connection table corresponding to the device connection information based on the target connection rule; the port connection table at least includes the port connection information between the source device and the opposite device.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and device for determining network topology and computer storage medium

    CN112751714A

  • Graph theory-based power grid topology modeling method

    CN113051694A

  • Method and device for configuring network

    CN115277428A

  • Network path detection method and device, equipment and storage medium

    CN116248479A

  • Wiring method and device, terminal equipment and computer readable storage medium

    CN117077613A