Port display method and device based on image recognition and medium
Through the port display method based on image recognition, a physical simulation diagram of a similar port is generated, which solves the problem of poor intuitiveness and complexity of the traditional data list display method, improves the work efficiency and accuracy of network administrators, and supports remote management.
Patent Information
- Application Number
- CN202410990991.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-10-15
AI Technical Summary
Traditional network management software or SDN controllers display switch port information through data lists, resulting in a large amount of information and poor intuitiveness. It is difficult to quickly and accurately understand the port status, which increases the workload of network administrators. Especially in large or complex networks, it is easy to cause Misoperations and delays.
The port display method based on image recognition is used to obtain the display requirement information of the port device, determine the target port model diagram, and combine the port data components to obtain real-time port status data, generate a port-like physical simulation diagram, and intuitively display the port status.
It improves the intuitiveness of information, enables network administrators to quickly and accurately understand port status, reduces misoperations, improves management efficiency and accuracy, and supports remote access and monitoring, enhancing the convenience of network management.
Smart Images

Figure CN118779503A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of switch technology, and in particular to a port display method, device and medium based on image recognition. Background Art
[0002] For traditional network management software or traditional SDN (software defined network) controllers, when processing switch device ports, they usually display them in the form of data lists. Although this method can list the information of all ports in detail, it also leads to a lot of data and redundancy. Users often need to spend a lot of time reading and understanding text data when viewing specific port information. This display form is not only poor in intuitiveness, but also far from the physical form and port layout of the actual switch, making it difficult for users to quickly and accurately grasp the overall network status and the specific situation of a single port.
[0003] In actual applications, network administrators or operation and maintenance personnel need to frequently check and monitor the status of switch ports in order to find and solve problems in a timely manner. However, the traditional data list display method undoubtedly increases their workload and reduces work efficiency. Especially when dealing with large networks or complex network topologies, this unintuitive display method is more likely to cause misoperation and delays. Therefore, traditional network management software or SDN controllers display switch port information in data lists. The data is numerous, and viewing the port information requires reading text, which is very different from the appearance of the actual switch, resulting in poor display effects. Summary of the invention
[0004] One or more embodiments of the present specification provide a port display method, device and medium based on image recognition, which are used to solve the following technical problems: traditional network management software or SDN controller displays switch port information in a data list, which has a lot of data. To view the port information, you need to read text, and it is very different from the appearance of the actual switch, resulting in poor display effect.
[0005] One or more embodiments of this specification adopt the following technical solutions:
[0006] One or more embodiments of the present specification provide a port display method based on image recognition, the method comprising: obtaining port display requirement information corresponding to a target port device, wherein the port display requirement information comprises manufacturer information and model information of the required port device; determining a corresponding target port model diagram in a pre-constructed port model library according to the port display requirement information, wherein the port model library comprises a plurality of port model diagrams generated in advance based on port image recognition and a model diagram identifier corresponding to each of the port model diagrams; obtaining a plurality of port data of a target port device through a port data component and the port display requirement information to determine real-time port status data of the target port device; and filling the port status in the target port model diagram with the real-time port status data through a port model component to generate a class port physical simulation diagram of the target port device to perform port display of the target port device.
[0007] Furthermore, by displaying the demand information through the port, before determining the corresponding target port model diagram in the pre-constructed port model library, the method also includes: collecting device port image data of multiple port devices, wherein the multiple port devices correspond to multiple device manufacturers and multiple port types; performing resolution analysis on the device port image data of each of the port devices to determine whether the device port image data is in an available state; when the device port image data is in an available state, performing image recognition on the device port image data corresponding to each of the port devices to obtain multiple port feature information in the device port image, wherein the port feature information includes port sequence information, port type information and port position information of each port; based on the multiple port feature information, constructing a device port model diagram corresponding to the device port image, and setting the model diagram identifier of the device port model diagram according to the demand port device manufacturer information and demand port device model information corresponding to each of the device port images.
[0008] Further, image recognition is performed on the device port image data corresponding to each of the port devices to obtain multiple port feature information in the device port image, specifically including: preprocessing the device port image data to determine the model original image data corresponding to the device port image data; feature extraction is performed on the model original image data to determine the outer rectangular box features of the model original image, so as to construct a model background image based on the outer rectangular box features, and to construct a two-dimensional coordinate system; edge recognition is performed on multiple ports in the model original image through edge detection technology, and processing is performed to determine a first model port distribution map containing multiple rectangular ports; port position coordinates of each port are generated according to the position of the first model port distribution map in the two-dimensional coordinate system; area calculation is performed on each port in the first model port distribution map to determine the port area value of each port, so as to classify the multiple ports based on the port area value and determine the port type of each port; a mapping table is constructed according to the preset port order, the port type and the port position coordinates of each port to obtain multiple port feature information in the device port image.
[0009] Furthermore, based on the multiple port feature information, a device port model diagram corresponding to the device port image is constructed, specifically including: constructing a port distribution diagram including multiple port edge images according to the port order, the port type and the port position coordinates of each port, wherein the interior of each port edge image in the port distribution diagram is in a to-be-filled state; fusing the port distribution diagram including the multiple port edge images and the model background diagram to construct a device port model diagram corresponding to the device port image.
[0010] Furthermore, multiple port data of the target port device are obtained through the port data component and the port display requirement information to determine the real-time port status data of the target port device, specifically including: through the port data component, according to the required port device manufacturer information in the port display requirement information, the device manufacturer information is extracted by enumeration matching to determine the manufacturer device model library corresponding to the current port device manufacturer that matches the required port device manufacturer information; based on the required port device model information, matching is performed in the manufacturer device model library to determine the target port device of the corresponding model to obtain multiple port data corresponding to each port of the target port device, wherein the port data includes port index data, port name data, port type data, port management status data and port operation status data; based on the multiple port data corresponding to each port of the target port device, the real-time port status data of the target port device is determined.
[0011] Furthermore, based on the multiple port data corresponding to each port of the target port device, real-time port status data of the target port device is determined, specifically including: screening among multiple ports according to the port type data corresponding to each port of the target port device to determine multiple physical ports among the multiple ports; acquiring port management status data and port operation status data corresponding to each of the physical ports; and determining real-time port status data of each of the physical ports based on the port management status data and port operation status data corresponding to each of the physical ports.
[0012] Furthermore, the real-time port status data is used to fill in the port status in the target port model diagram through a port model component to generate a class port physical simulation diagram of the target port device, specifically including: calling the port model component, and annotating the status of the real-time port status data corresponding to each port at a designated position corresponding to each physical port in the target port model diagram through the port model component to fill in the port status and generate a class port physical simulation diagram of the target port device.
[0013] Furthermore, the method further comprises: when there is no target port model diagram corresponding to the target port device in the port model library, generating a universal port model diagram in a top-bottom layout according to pre-set universal port image elements.
[0014] One or more embodiments of this specification provide a port display device based on image recognition, including:
[0015] at least one processor; and,
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above method.
[0018] One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the above method.
[0019] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects: through the above technical solution, by generating a port-like physical simulation diagram, the user can directly see the simulated physical diagram of the target port device, rather than just an abstract data list, which greatly enhances the intuitiveness of the information; the intuitive display of real-time port status data on the simulation diagram enables network administrators or operation and maintenance personnel to quickly and accurately understand the port status, thereby making decisions quickly and improving management efficiency; the intuitive port simulation diagram reduces misoperation caused by misunderstanding or data confusion, and improves the accuracy of network management; the method can generate corresponding simulation diagrams according to different port display requirement information (such as different manufacturers and models), and has high flexibility and adaptability; compared with the traditional data list display method, the port-like physical simulation diagram provides a richer and more intuitive user experience, allowing users to monitor and manage network ports more easily; on the simulation diagram, the status of the port (such as normal, faulty, offline, etc.) can be clearly represented, which helps to quickly locate and troubleshoot network faults; the port-like physical simulation diagram can be remotely accessed and viewed through the network, supports remote management and monitoring, and improves the convenience of network management. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:
[0021] Figure 1 A flowchart of a port display method based on image recognition provided in an embodiment of this specification;
[0022] Figure 2 A schematic diagram of a process of constructing a model background image provided in one embodiment of this specification;
[0023] Figure 3 A schematic diagram of the structure of a port display device based on image recognition provided in an embodiment of this specification. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0025] The embodiment of this specification provides a port display method based on image recognition. It should be noted that the execution subject in the embodiment of this specification can be a server or any device with data processing capabilities. Figure 1 A flow chart of a port display method based on image recognition provided in an embodiment of this specification is shown as follows: Figure 1 As shown, it mainly includes the following steps:
[0026] Step S101, obtaining port display requirement information corresponding to the target port device.
[0027] In one embodiment of the present specification, the accessed switch device is identified by the SDN controller, and when the switch device is accessed, the port display requirement information corresponding to the switch device is obtained. The port display requirement information includes the required port device manufacturer information and the required port device model information, and the target port device here is the switch device. It should be noted that the present specification embodiment takes a box switch as an example for explanation, and the box switch is a switch with a fixed switch frame and ports.
[0028] In one embodiment of the present specification, the port display system includes a port data component and a port model component. The port data component mainly completes the switch device information and port information obtained through the protocol. The port model component mainly completes image recognition and obtains a reliable physical port parameter model for real-time call by the port data component.
[0029] Step S102: According to the port display requirement information, a corresponding target port model diagram is determined in a pre-built port model library.
[0030] The port model library includes a plurality of port model diagrams generated in advance based on port image recognition and a model diagram identifier corresponding to each of the port model diagrams.
[0031] By displaying the demand information through the port, before determining the corresponding target port model diagram in the pre-built port model library, the method also includes: collecting device port image data of multiple port devices, wherein the multiple port devices correspond to multiple device manufacturers and multiple port types; performing resolution analysis on the device port image data of each of the port devices to determine whether the device port image data is in an available state; when the device port image data is in an available state, performing image recognition on the device port image data corresponding to each of the port devices to obtain multiple port feature information in the device port image, wherein the port feature information includes port sequence information, port type information and port location information of each port; based on the multiple port feature information, constructing a device port model diagram corresponding to the device port image, and setting the model diagram identifier of the device port model diagram according to the demand port device manufacturer information and demand port device model information corresponding to each of the device port images.
[0032] In one embodiment of the present specification, device port image data of multiple port devices of different types and from different manufacturers are collected in advance, and resolution analysis is performed on the device port image data of each port device. According to the resolution of the device port image data, the available state of the device port image data is determined. Generally, when the resolution meets the resolution of 3000*2000 or 2000*3000, the device port image data is determined to be in an available state. It should be noted that the device port image data is a physical port image containing all physical ports. This physical port image is used as the input of the port model component. The purpose of the resolution requirement is to ensure that the port can be clearly displayed in the image.
[0033] When the device port image data is in an available state, that is, the device port image data can clearly display all the physical ports of the device, the device port image data is preprocessed to remove non-physical ports, numbers, indicator lights and other elements, and filtering is performed to obtain a model original image containing only physical ports. Image recognition is performed on the model original image corresponding to each device port image data, and port feature extraction is performed to obtain multiple port feature information in the device port image, and the port feature information includes port sequence information, port type information and port location information of each port. Based on the multiple port feature information, a device port model image corresponding to the device port image is constructed, and the model image identifier of the device port model image is set according to the required port device manufacturer information and required port device model information corresponding to each device port image.
[0034] Image recognition is performed on the device port image data corresponding to each of the port devices to obtain multiple port feature information in the device port image, specifically including: preprocessing the device port image data to determine the model original image data corresponding to the device port image data; feature extraction is performed on the model original image data to determine the outer rectangular box features of the model original image, so as to construct a model background image and a two-dimensional coordinate system based on the outer rectangular box features; edge recognition is performed on multiple ports in the model original image through edge detection technology, and processing is performed to determine a first model port distribution map containing multiple rectangular ports; port position coordinates of each port are generated according to the position of the first model port distribution map in the two-dimensional coordinate system; area calculation is performed on each port in the first model port distribution map to determine the port area value of each port, so as to classify multiple ports based on the port area value and determine the port type of each port; a mapping table is constructed according to the preset port order, port type and port position coordinates of each port to obtain multiple port feature information in the device port image.
[0035] Based on the multiple port feature information, a device port model diagram corresponding to the device port image is constructed, specifically including: constructing a port distribution diagram including multiple port edge images according to the port order, the port type and the port position coordinates of each port, wherein the interior of each port edge image in the port distribution diagram is in a to-be-filled state; and fusing the port distribution diagram including the multiple port edge images with the model background diagram to construct a device port model diagram corresponding to the device port image.
[0036] In one embodiment of this specification, Figure 2 A schematic diagram of a process of constructing a model background image provided in one embodiment of this specification is shown in FIG. Figure 2 As shown, extract the outer rectangular box from the original model image, and then construct a two-dimensional coordinate system with the lower left corner of the box as the coordinate origin. The combination of the two-dimensional coordinate system and the original model image is recorded as M1. Construct a search map in the inner direction within the rectangular box, and set the step size to the minimum pixel path. After moving once, obtain the polygon composed of the search map and the outer rectangular box. Extract the RGB color of the pixel points in this polygon, remove the values with too large variance values and calculate the average value. Take the average as the result, and construct this color and the outer rectangle into the background image L1.
[0037] Perform grayscale transformation on M1, then perform edge detection, and use image gradient and threshold to process the image. Selecting different gradients and thresholds will produce different results. Continuously optimize the gradient and threshold to obtain the optimal edge image of multiple ports, which can be marked as M2 here. The edge images of the 60 ports in the M2 image, process each port into a regular rectangle, and record it as M3. Mark each port with the position of the port edge image in the coordinate system. For example, the first port is recorded as The Nth port is recorded as The 60th is recorded as Here, the subscript is used to indicate the nth port, the superscript 1 indicates the left side, and the superscript 2 indicates the right side. That is, Indicates the coordinates of the upper left corner of the first port. Indicates the coordinates of the lower right corner of the first port, from which the coordinates of the lower left corner can be calculated The upper right corner is In this way, the port position coordinates of each port are generated. The coordinates here can be set according to requirements. This is just one example.
[0038] M3 is segmented and the port edge image in M3 is extracted to obtain multiple port images, that is, the first model port distribution map containing multiple port images. Assuming there are 60 ports, there are 60 port images, which are marked in order from the 1st to the 60th as P1, P2...P60. The order here is the upper left corner as the first and the lower right corner as the last, and each row increases from left to right. The area of each port in the first model port distribution map is calculated to determine the port area value of each port. The port area value is used as a characteristic value to classify multiple ports and determine the port type of each port. Assume that three types of port maps are obtained, which are recorded as I1, I2, and I3. According to the preset port order, port type and port position coordinates of each port, a mapping table is constructed to obtain the feature information of multiple ports in the device port image. For example: it indicates the coordinate position of the first port. The port type is I1.
[0039] The mapping table obtained in the above steps is displayed on the model background image L1 to obtain the model image R, and the model image is marked with two attributes, namely the manufacturer attribute and the model attribute. It should be noted that the model image R consists of two parts, one is the L1 model background image, which is used to display the switch border; the other part is the port position and edge grayscale image, which is used to display the port feature information of multiple ports. It should be noted that there is no color inside the port here. The color can be filled according to the status of the port later. The inside of the port can be filled with black (rgb (0,0,0)) or green (rgb (0,255,0)). Black corresponds to the port being in the down state, and green corresponds to the port being in the up state. The port status is obtained by the port status component.
[0040] In one embodiment of the present specification, based on the required port device manufacturer information and the required port device model information in the port display requirement information, in a pre-constructed port model library, according to the model diagram identifier corresponding to each port model diagram, the corresponding target port model diagram is determined, and the port model library includes multiple port model diagrams generated in advance based on port image recognition and the model diagram identifier corresponding to each of the port model diagrams.
[0041] Through the above technical solution, through the pre-built port model library, precise matching can be performed for specific port equipment manufacturers and models, thereby improving the accuracy of matching. Each port model diagram corresponds to a clear model diagram identification, which helps to reduce errors and confusion in the identification process; when the requirements are clear, the matching model diagram can be quickly found in the port model library without complex image processing and feature extraction, thereby saving time, and the port model library can be continuously updated and expanded to adapt to new port devices and models; the port model library stores port images and corresponding identification information in a structured manner, which is easy to manage and maintain; this method is not only applicable to a single type of port equipment, but can also be extended to multiple different types of port equipment and models. By adjusting the model library and identification system, it can easily adapt to the needs of different fields and scenarios.
[0042] Step S103: acquiring multiple port data of the target port device through the port data component and the port display requirement information to determine the real-time port status data of the target port device.
[0043] Through the port data component and the port display demand information, multiple port data of the target port device are obtained to determine the real-time port status data of the target port device, specifically including: through the port data component, according to the demand port device manufacturer information in the port display demand information, the device manufacturer information is extracted by enumeration matching to determine the manufacturer device model library corresponding to the current port device manufacturer that matches the demand port device manufacturer information; based on the demand port device model information, matching is performed in the manufacturer device model library to determine the target port device of the corresponding model to obtain multiple port data corresponding to each port of the target port device, wherein the port data includes port index data, port name data, port type data, port management status data and port operation status data; based on the multiple port data corresponding to each port of the target port device, the real-time port status data of the target port device is determined.
[0044] According to the multiple port data corresponding to each port of the target port device, the real-time port status data of the target port device is determined, specifically including: according to the port type data corresponding to each port of the target port device, screening is performed among the multiple ports to determine multiple physical ports among the multiple ports; obtaining the port management status data and the port operation status data corresponding to each of the physical ports; according to the port management status data and the port operation status data corresponding to each of the physical ports, determining the real-time port status data of each of the physical ports.
[0045] In one embodiment of the present specification, multiple port data of the target port device are obtained through the port data component to determine the real-time port status data of the target port device. The port data component of the embodiment of the present specification uses the snmp protocol to obtain device information and port information. The switch manufacturer information is obtained through sysDescrOid, the switch type is obtained through physicalClassOid, and the switch port information is obtained through ifTableOid. Only five data, ifIndex (port index), IfName (port name), ifType (port type), ifAdminStatus (port management status) and ifOperStatus (port operation status) are taken. The information extracted from sysDescrOid contains the manufacturer name, and enumeration matching is required. The enumeration contains the names of various manufacturers already in the market (such as Inspur, Cisco, etc.), and the matched manufacturer name is the switch of the manufacturer. From the data obtained from physicalClassOid, the device type can be obtained by directly matching the version. To obtain all ifTableOid information, only the data of the five fields ifIndex, IfName, ifType, ifAdminStatus and ifOperStatus are needed. Filter out the data of ifType=ethernetCsmacd(6). ifType=ethernetCsmacd(6) indicates that the port type is a physical port. Arrange in ascending order of ifIndex. The values of IfIndex are 1 to 60 or 60 arithmetic progressions arranged from small to large, corresponding to the 1st to 60th ports. The status of each port is determined by ifAdminStatus&ifOperStatus. Only when ifAdminStatus&ifOperStatus are both 1, the port is in the up state, otherwise it is in the down state.
[0046] Step S104, using the port model component, the real-time port status data is used to fill the port status in the target port model diagram, and a port-like physical simulation diagram of the target port device is generated to display the port of the target port device.
[0047] The real-time port status data is used to fill the port status in the target port model diagram through the port model component to generate a class port physical simulation diagram of the target port device, specifically including: calling the port model component, and using the port model component to mark the status of the real-time port status data corresponding to each port at a designated position corresponding to each physical port in the target port model diagram to fill the port status and generate a class port physical simulation diagram of the target port device.
[0048] After obtaining the switch manufacturer information and device model signal information, call the port model component, match the port model diagram R of the corresponding switch, and fill the port into the port according to the corresponding port status in the above steps. The black port corresponds to the down state, and the green port corresponds to the up state. At this point, the port model component generates a simulation diagram of the real port based on the port data of the port data component. When the port data changes, the ifAdminStatus and ifOperStatus of the port change, causing the port to change from up to down, or from down to up. At this time, the port data component resends the port data to the port model component, and after matching the model diagram R, the port model component re-fills the model diagram R with the port, and generates a physical simulation diagram of the port corresponding to the new port data. It should be noted that this manual is aimed at switches with fixed switch frames and ports, commonly known as box switches. Switches that will occur to ports in the frame.
[0049] When the target port model diagram corresponding to the target port device does not exist in the port model library, a general port model diagram is generated in the form of a top-bottom layout according to pre-set general port image elements.
[0050] In one embodiment of the present specification, the above scheme requires that the switch port diagrams of different models from different manufacturers be input into the port model component, and the corresponding model diagrams can be obtained after image processing and learning. When a certain model of switch is not learned in the port model component, a universal port model diagram is built in. According to the top-bottom layout, universal port icon elements are used for display. The universal port icon elements here can be port icons pre-specified according to needs, or they can be analyzed through big data statistics of port images of multiple switch manufacturers, and the most port icons in the port image can be set as the universal port images corresponding to each switch manufacturer.
[0051] Through the above technical solution, by generating a port-like physical simulation diagram, the user can directly see the simulated physical diagram of the target port device, rather than just an abstract data list, which greatly enhances the intuitiveness of the information; the intuitive display of real-time port status data on the simulation diagram enables network administrators or operation and maintenance personnel to quickly and accurately understand the port status, so as to make decisions quickly and improve management efficiency; the intuitive port simulation diagram reduces misoperation caused by misunderstanding or data confusion, and improves the accuracy of network management; the method can generate corresponding simulation diagrams according to different port display requirement information (such as different manufacturers and models), and has high flexibility and adaptability; compared with the traditional data list display method, the port-like physical simulation diagram provides a richer and more intuitive user experience, allowing users to monitor and manage network ports more easily; on the simulation diagram, the status of the port (such as normal, faulty, offline, etc.) can be clearly represented, which helps to quickly locate and troubleshoot network faults; the port-like physical simulation diagram can be remotely accessed and viewed through the network, supports remote management and monitoring, and improves the convenience of network management.
[0052] The embodiment of this specification also provides a port display device based on image recognition, such as Figure 3 As shown, the device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above method.
[0053] The embodiments of the present specification also provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the above method.
[0054] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0055] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0056] The devices and media provided in the embodiments of this specification correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0057] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0058] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0059] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0060] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0061] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0062] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0063] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0064] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0065] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.
Claims
1. A port display method based on image recognition, It is characterized in that The method comprises: Acquire port display requirement information corresponding to the target port device, wherein the port display requirement information includes the required port device manufacturer information and the required port device model information; According to the port display requirement information, a corresponding target port model diagram is determined in a pre-built port model library, wherein the port model library includes a plurality of port model diagrams generated in advance based on port image recognition and a model diagram identifier corresponding to each of the port model diagrams; Acquire multiple port data of a target port device through a port data component and the port display requirement information to determine real-time port status data of the target port device; The real-time port status data is used to fill the port status in the target port model diagram through the port model component, and a class port physical simulation diagram of the target port device is generated to display the port of the target port device.
2. According to the method for displaying a port based on image recognition according to claim 1, It is characterized in that By displaying the demand information of the port, before determining the corresponding target port model diagram in the pre-built port model library, the method further includes: Collecting device port image data of a plurality of port devices, wherein the plurality of port devices correspond to a plurality of device manufacturers and a plurality of port types; Performing resolution analysis on the device port image data of each of the port devices to determine whether the device port image data is in a usable state; When the device port image data is in an available state, image recognition is performed on the device port image data corresponding to each of the port devices to obtain a plurality of port feature information in the device port image, wherein the port feature information includes port sequence information, port type information and port location information of each port; Based on the multiple port feature information, a device port model diagram corresponding to the device port image is constructed, and a model diagram identifier of the device port model diagram is set according to the required port device manufacturer information and required port device model information corresponding to each device port image.
3. A port display method based on image recognition according to claim 2, It is characterized in that Performing image recognition on the device port image data corresponding to each of the port devices to obtain multiple port feature information in the device port image, specifically including: Preprocessing the device port image data to determine the model original image data corresponding to the device port image data; Performing feature extraction on the model original image data to determine the outer rectangular box features of the model original image, so as to construct a model background image based on the outer rectangular box features and a two-dimensional coordinate system; Using edge detection technology, edge recognition is performed on multiple ports in the original model image, and processing is performed to determine a first model port distribution image including multiple rectangular ports; Generate port position coordinates of each port according to the position of the first model port distribution diagram in the two-dimensional coordinate system; Calculating the area of each port in the first model port distribution diagram to determine a port area value of each port, and classifying the plurality of ports based on the port area values to determine a port type of each port; A mapping table is constructed according to the preset port sequence, the port type and the port position coordinates of each port to obtain a plurality of port feature information in the device port image.
4. A port display method based on image recognition according to claim 3, It is characterized in that Based on the plurality of port feature information, constructing a device port model diagram corresponding to the device port image specifically includes: According to the port sequence, the port type and the port position coordinates of each port, a port distribution map including a plurality of port edge images is constructed, wherein the interior of each port edge image in the port distribution map is in a to-be-filled state; The port distribution map including the plurality of port edge images and the model background map are fused to construct a device port model map corresponding to the device port image.
5. The port display method based on image recognition according to claim 1, It is characterized in that Acquiring multiple port data of a target port device through a port data component and the port display requirement information to determine real-time port status data of the target port device, specifically including: Through the port data component, according to the required port device manufacturer information in the port display requirement information, the device manufacturer information is extracted by enumeration matching to determine the manufacturer device model library corresponding to the current port device manufacturer that matches the required port device manufacturer information; Based on the required port device model information, matching is performed in the manufacturer device model library to determine the target port device of the corresponding model, so as to obtain a plurality of port data corresponding to each port of the target port device, wherein the port data includes port index data, port name data, port type data, port management status data and port operation status data; According to the plurality of port data corresponding to each port of the target port device, real-time port status data of the target port device is determined.
6. A port display method based on image recognition according to claim 5, It is characterized in that Determining the real-time port status data of the target port device according to the plurality of port data corresponding to each port of the target port device specifically includes: Screening multiple ports according to the port type data corresponding to each port of the target port device to determine multiple physical ports among the multiple ports; Acquire port management status data and port operation status data corresponding to each of the physical ports; According to the port management status data and the port operation status data corresponding to each of the physical ports, the real-time port status data of each of the physical ports is determined.
7. A port display method based on image recognition according to claim 1, It is characterized in that By using the port model component, the real-time port status data is filled in the port status in the target port model diagram to generate a class port physical simulation diagram of the target port device, specifically including: Call the port model component, and through the port model component, mark the real-time port status data corresponding to each port at the specified position corresponding to each port in the target port model diagram to fill in the port status and generate a class port physical simulation diagram of the target port device.
8. The port display method based on image recognition according to claim 1, It is characterized in that The method further comprises: When the target port model diagram corresponding to the target port device does not exist in the port model library, a general port model diagram is generated in the form of a top-bottom layout according to pre-set general port image elements.
9. A port display device based on image recognition, It is characterized in that The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 8.
10. A non-volatile computer storage medium storing computer executable instructions, It is characterized in that The computer executable instructions are configured to execute the method according to any one of claims 1 to 8.
