CN114896192B - Interface matching method, device, computer equipment and storage medium - Google Patents
Interface matching method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN114896192B CN114896192B CN202210646073.2A CN202210646073A CN114896192B CN 114896192 B CN114896192 B CN 114896192B CN 202210646073 A CN202210646073 A CN 202210646073A CN 114896192 B CN114896192 B CN 114896192B
- Authority
- CN
- China
- Prior art keywords
- interface
- determining
- path tree
- connecting component
- dial switch
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4004—Coupling between buses
- G06F13/4022—Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0042—Universal serial bus [USB]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Computer Hardware Design (AREA)
- Small-Scale Networks (AREA)
Abstract
The present disclosure relates to a matching method, apparatus, computer device, storage medium and computer program product of an interface. The method comprises the following steps: acquiring a path tree where a first interface is located, wherein the path tree is used for describing the connection relation of the interfaces; determining a second interface with the same level as the first interface from the path tree; determining a first connection component corresponding to the first interface and a second connection component corresponding to the second interface; and under the condition that the first connecting component and the second connecting component belong to the same connecting device, determining that the first interface is matched with the first connecting component. By adopting the method, the matching flow of the connecting assembly and the interface can be simplified, and the efficiency of interface matching is improved.
Description
Technical Field
The present disclosure relates to the field of interface identification technologies, and in particular, to a method and apparatus for matching interfaces, a computer device, and a storage medium.
Background
In order to avoid renaming when multiple interface devices are identified in the desktop system, the system automatically increments the naming. When the connection component in the device is matched with the interface in the desktop system, the matching is usually performed directly according to the interface name through a configuration file.
However, under the conditions of restarting the computer, switching on and off the connecting device, plugging and unplugging the interface component, the naming of the interface by the system may be changed, and the configuration file needs to be modified and matched again at the moment, so that the operation is complex and the efficiency is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, and a storage medium for matching interfaces that simplify the flow of matching interface components to interfaces.
In a first aspect, an embodiment of the present disclosure provides a method for matching interfaces. The method comprises the following steps:
acquiring a path tree where a first interface is located, wherein the path tree is used for describing the connection relation of the interfaces;
determining a second interface with the same level as the first interface from the path tree;
determining a first connection component corresponding to the first interface and a second connection component corresponding to the second interface;
and under the condition that the first connecting component and the second connecting component belong to the same connecting device, determining that the first interface is matched with the first connecting component.
In one embodiment, the connection device is provided with a dial switch, and when the first connection component and the second connection component belong to the same connection device, determining that the first interface is matched with the first connection component includes:
acquiring a first dial switch value of a connecting device corresponding to the first connecting component and a second dial switch value of a connecting device corresponding to the second connecting component;
and under the condition that the first dial switch value is the same as the second dial switch value, determining that the first interface is matched with the first connecting component.
In one embodiment, the obtaining the path tree where the first interface is located includes:
acquiring an interface address path of a first interface;
and determining a path tree where the first interface is located according to the association relation between the interfaces in the interface address path.
In one embodiment, the determining, from the path tree, the second interface at the same level as the first interface includes:
acquiring a previous interface of the first interface in the path tree;
and determining a second interface connected with the previous-stage interface, wherein the first interface and the second interface belong to the same stage in the path tree.
In one embodiment, the connection assembly is electrically connected to an interface of the interface device, and the interface device includes a plurality of stages of interface devices, which are electrically connected in sequence.
In one embodiment, one connection device corresponds to one interface device.
In a second aspect, an embodiment of the disclosure further provides a matching device of an interface. The device comprises:
the acquisition module is used for acquiring a path tree where the first interface is located, wherein the path tree is used for describing the connection relation of the interfaces;
a first determining module, configured to determine, from the path tree, a second interface at the same level as the first interface;
the second determining module is used for determining a first connecting component corresponding to the first interface and a second connecting component corresponding to the second interface;
and the third determining module is used for determining that the first interface is matched with the first connecting assembly under the condition that the first connecting assembly and the second connecting assembly belong to the same connecting device.
In one embodiment, the connection device is provided with a dial switch, and the third determining module includes:
the acquisition module is used for acquiring a first dial switch value of the connecting device corresponding to the first connecting component and a second dial switch value of the connecting device corresponding to the second connecting component;
and the determining module is used for determining that the first interface is matched with the first connecting component under the condition that the first dial switch value is the same as the second dial switch value.
In one embodiment, the acquiring module includes:
the acquisition sub-module is used for acquiring an interface address path of the first interface;
and the determining module is used for determining a path tree where the first interface is located according to the association relation between the interfaces in the interface address path.
In one embodiment, the first determining module includes:
the acquisition module is used for acquiring a previous interface of the first interface in the path tree;
and the determining module is used for determining a second interface connected with the previous-stage interface, wherein the first interface and the second interface belong to the same stage in the path tree.
In one embodiment, the connection assembly is electrically connected to an interface of the interface device, and the interface device includes a plurality of stages of interface devices, which are electrically connected in sequence.
In one embodiment, one connection device corresponds to one interface device.
In a third aspect, embodiments of the present disclosure also provide a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method of any of the embodiments of the present disclosure when the computer program is executed.
In a fourth aspect, embodiments of the present disclosure also provide a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the method of any of the embodiments of the present disclosure.
In a fifth aspect, embodiments of the present disclosure also provide a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of the method according to any of the embodiments of the present disclosure.
According to the embodiment of the disclosure, firstly, a path tree where a first interface is located is determined according to the first interface, wherein the path tree comprises connection relations among the interfaces; determining a second interface which is at the same level as the first interface from the path tree according to the connection relation between the interfaces; then, respectively determining a first connecting component and a second connecting component which are connected with the first interface and the second interface, and judging whether the first connecting component and the second connecting component belong to the same connecting device; under the condition that the first connecting component and the second connecting component belong to the same connecting device, the first interface and the first connecting component are determined to be matched, the matching is completed without determining the interface name, under the conditions of restarting a computer and the like, whether the matching is correct or not can be directly determined according to the acquired path tree and other interfaces at the same level in the path tree, reconfiguration is not required, the operation is simple, and the efficiency of interface matching is improved.
Drawings
FIG. 1 is a flow diagram of a method of matching interfaces in one embodiment;
FIG. 2 is a schematic diagram of a connection assembly and an interface according to an embodiment;
FIG. 3 is a schematic diagram of a dial switch according to one embodiment;
FIG. 4 is a schematic diagram of a path tree structure in one embodiment;
FIG. 5 is a schematic diagram of a path tree structure in one embodiment;
FIG. 6 is a schematic diagram of a connection assembly and an interface according to an embodiment;
FIG. 7 is a flow diagram of a method of matching interfaces in one embodiment;
FIG. 8 is a block diagram of the matching means of the interface in one embodiment;
fig. 9 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the disclosed embodiments and are not intended to limit the disclosed embodiments.
In one embodiment, as shown in fig. 1, there is provided a matching method of interfaces, the method including:
step S110, a path tree where a first interface is located is obtained, wherein the path tree is used for describing the connection relation of the interfaces;
in the embodiment of the disclosure, when performing interface matching, determining a path tree where a first interface is located according to a connection relationship of interfaces corresponding to the first interface, where the path tree is used for describing the connection relationship between the interfaces, and each node in the path tree corresponds to one interface or an interface device corresponding to the interface. In one example, the connection device is typically connected to an interface in an interface device, which may include, but is not limited to, a USB interface device, a USB HUB interface device, etc., the address of the interface corresponds to the corresponding address of the interface in the system. In one example, an interface device typically corresponds to multiple interfaces. In one example, as shown in fig. 2, the PORTs of the connection assembly on the fixture of the connection device are connected with the interfaces in the interface device, one interface device is connected with two fixtures, one fixture includes two interface devices corresponding to two PORTs, the address of each interface can be represented by the address of the interface device, and each node in the address path tree corresponds to the interface address in the connection relationship, for example, the address path of the PORT1 is usb_hub1/usb_hub2/usb_port 1/PORT 1.
Step S120, determining a second interface with the same level as the first interface from the path tree;
in the embodiment of the disclosure, after a path tree where a first interface is located is obtained, a second interface at the same level as the first interface is determined from the path tree according to a connection relationship between the interfaces, wherein the first interface and the second interface are connected with the same node on the path tree. Typically, the first interface and the second interface are provided on the same interface device. In one example, multiple interfaces may be included on one interface device.
Step S130, determining a first connection component corresponding to the first interface and a second connection component corresponding to the second interface;
in the embodiment of the disclosure, after the first interface and the second interface are acquired, determining a connection assembly corresponding to the first interface and the second interface, where the first interface is electrically connected with the first connection assembly, and the second interface is electrically connected with the second connection assembly.
Step S140, determining that the first interface is matched with the first connection component when the first connection component and the second connection component belong to the same connection device.
In the embodiment of the disclosure, after the first connection component corresponding to the first interface and the second connection component corresponding to the second interface are determined, whether the first connection component and the second connection component are arranged on the same connection device is judged, and if the first connection component and the second connection component are arranged on the same connection device, the fact that the first interface and the first connection component are matched correctly at the moment is indicated, and the matching is completed. Wherein a connection device typically includes a plurality of connection assemblies thereon.
According to the embodiment of the disclosure, firstly, a path tree where a first interface is located is determined according to the first interface, wherein the path tree comprises connection relations among the interfaces; determining a second interface which is at the same level as the first interface from the path tree according to the connection relation between the interfaces; then, respectively determining a first connecting component and a second connecting component which are connected with the first interface and the second interface, and judging whether the first connecting component and the second connecting component belong to the same connecting device; under the condition that the first connecting component and the second connecting component belong to the same connecting device, the first interface and the first connecting component are determined to be matched, the matching is completed without determining the interface name, under the conditions of restarting a computer and the like, whether the matching is correct or not can be directly determined according to the acquired path tree and other interfaces at the same level in the path tree, reconfiguration is not required, the operation is simple, and the efficiency of interface matching is improved.
In one embodiment, the connection device is provided with a dial switch, and when the first connection component and the second connection component belong to the same connection device, determining that the first interface is matched with the first connection component includes:
acquiring a first dial switch value of a connecting device corresponding to the first connecting component and a second dial switch value of a connecting device corresponding to the second connecting component;
and under the condition that the first dial switch value is the same as the second dial switch value, determining that the first interface is matched with the first connecting component.
In the embodiment of the disclosure, a dial switch is disposed on a connection device, and fig. 3 shows a schematic diagram of an 8-bit dial switch, and as shown in fig. 3, each bit of the dial switch has two states of 0 and 1, and binary combination can be performed through the change of the state of each bit. After the first connecting component and the second connecting component are obtained, the number of the dial switch of the connecting device corresponding to the first connecting component and the number of the dial switch of the connecting device corresponding to the second connecting component are obtained, and when the obtained number of the dial switch is the same, the first connecting component and the second connecting component can be considered to be arranged on the same connecting device, then the first interface is matched with the first connecting component, and the matching is completed. Wherein, through the adjustment to the upper number of dial switch, the dial switch on the different connecting device sets up to different binary combinations. In one example, through the conversion from the logical placement position to the physical placement position corresponding to the number of the dial switch, for example, the number of the dial switch is 1, and the physical placement position sequence of the corresponding connection device is 1, so that the correspondence between the logical sequence and the physical sequence can be realized during the communication control. In one example, as shown in fig. 3, the first bit is a switch bit, and the last 7-bit dial switch realizes address discrimination of 1-127, and 0 is not used, so that the condition of missing dialing is avoided.
According to the embodiment of the disclosure, the connection devices are distinguished through the dial switch, and when the connection assembly is judged, whether the connection assemblies are located in the same connection device can be directly judged according to the dial switch, so that the matching of interfaces is further realized, simplicity and convenience are realized, and the efficiency and the accuracy of the interface matching are improved; and the corresponding mapping of the logic sequence and the physical sequence of the connecting device is realized, and confusion caused by different sequence definitions is avoided.
In one embodiment, the obtaining the path tree where the first interface is located includes:
acquiring an interface address path of a first interface;
and determining a path tree where the first interface is located according to the association relation between the interfaces in the interface address path.
In the embodiment of the disclosure, when a path tree where a first interface is located is acquired, first, an interface address path of the first interface is acquired, a plurality of address nodes exist in the address path, and an association relationship exists between the nodes. And determining a path tree where the first interface is located according to the acquired address path and the association relation between nodes in the path. As shown in fig. 4, according to the association relationship between nodes in the address, the root, branch and leaf in the path tree are determined, and finally the path tree corresponding to the address path is obtained. In one example, the address path of the interface 1 is usb_hub1/usb_hub2/usb_port1/COM, and the path tree of the interface 1 is determined according to the association relationship between address nodes as shown in fig. 5.
According to the embodiment of the disclosure, the path tree where the interface is located is determined through the association relation between the address nodes in the address path corresponding to the interface, so that the subsequent second interface can be determined according to the path tree without repeated matching, the operation is simplified, and the efficiency of interface matching is improved.
In one embodiment, the determining, from the path tree, the second interface at the same level as the first interface includes:
acquiring a previous interface of the first interface in the path tree;
and determining a second interface connected with the previous-stage interface, wherein the first interface and the second interface belong to the same stage in the path tree.
In the embodiment of the disclosure, when the second interface is acquired, a previous interface of the first interface in the path tree is acquired first. In general, there are multiple nodes in the address path of the interface, and there is a hierarchical association relationship between the nodes, where the node address corresponding to the previous level interface of the first interface corresponds to the physical address, that is, the address of the interface device to which the first interface belongs. And determining a second interface connected with the previous-stage interface according to the determined node address of the previous-stage interface. In one example, the second interface is another interface of an interface device to which the first interface belongs.
According to the embodiment of the disclosure, the corresponding second interface is determined through the node address of the upper node in the path tree of the first interface, so that other interfaces corresponding to the first interface in the interface device can be determined, connection components corresponding to the other interfaces are further obtained, and subsequent matching verification is performed.
In one embodiment, the connection assembly is electrically connected to an interface in the interface device, the interface device comprising a plurality of stages of interface devices, the plurality of stages of interface devices being electrically connected in sequence.
In the embodiment of the disclosure, the connection component is electrically connected with the interfaces on the interface devices, each interface device is correspondingly provided with a plurality of interfaces, and the interface devices are connected layer by layer in a cascading manner to form a multi-stage interface device. The number of the interface devices and the number of the cascade layers after connection can be flexibly configured according to actual application scenes. In one example, as shown in FIG. 2, the interface devices USB HUB1, USB HUB2, USB HUB 3, USB HUB 4, USB HUB 5 are electrically connected to form a multi-stage interface device.
According to the embodiment of the disclosure, through the electrical connection of the interface devices, a plurality of layers of interface devices are formed, after the interface devices are connected with the connecting components, a layer-by-layer progressive relationship is formed, when the connecting components are required to be added or modified, the connecting components can be directly added, the interface devices are not required to be modified to be configured repeatedly, the operation of interface matching is simplified, and the efficiency of interface matching is improved.
In one embodiment, one connection means corresponds to one interface means.
In the embodiment of the disclosure, one connecting device corresponds to one interface device, that is, the interface on one interface device is only connected with the connecting component on one connecting device. Wherein one connection means may comprise a plurality of connection assemblies and one interface means may comprise a plurality of interface means. In one example, as shown in fig. 6, one interface device is connected with one connecting device (such as a jig), and four USB HUB are electrically connected with the jigs 1-4 respectively, so that in the process of plugging and unplugging equipment and matching interfaces, only the port of the connecting component needs to be directly confirmed to be electrically connected with the same interface equipment, thereby simplifying the operation.
In the embodiment of the disclosure, the connecting device is arranged to correspond to the interface device, and when the interface is matched with and connected with the connecting component, whether the connecting component is matched with the interface can be judged directly by confirming whether the connecting component is positioned in the same connecting device, so that the operation flow is simplified, and the efficiency of interface matching is improved.
Fig. 7 is a schematic diagram of a matching method of an interface according to an exemplary embodiment, and referring to fig. 7, in this embodiment, the interface may be a serial port; and carrying out enumeration pairing on all serial ports in the system, and firstly acquiring a single serial port complete path. Determining a serial port path tree according to the acquired path; analyzing the serial port path tree, and matching the USB HUB serial port which is at the same leaf node with the current serial port; the method comprises the steps of obtaining the dial switch values of a current serial port and a fixture matched with the serial port, and converting corresponding logic addresses according to binary numbers, wherein 10000001 represents an address 1; after the matching is completed, the control operation flow of the serial port can be set, and after the setting is completed, the matching verification of other serial ports is continued until the last serial port is matched. By the embodiment of the disclosure, the matching efficiency is improved, the serial port matching operation is simplified, and the risk caused by configuration errors is avoided; control confusion caused by serial port configuration errors is avoided; when the jig and the serial port are replaced, repeated configuration is not needed; the physical sequence is automatically recognized and converted into the logical sequence without additional configuration; the number of the jig and the serial ports can be dynamically expanded without repeated configuration.
It should be understood that, although the steps in the flowcharts in the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in the figures may include steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the disclosure also provides a matching device for the interfaces for realizing the matching method of the interfaces. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiment of the matching device for one or more interfaces provided below may be referred to the limitation of the matching method for the interfaces hereinabove, and will not be described herein.
In one embodiment, as shown in fig. 8, there is provided a matching apparatus 800 of an interface, including:
the acquisition module is used for acquiring a path tree where the first interface is located, wherein the path tree is used for describing the connection relation of the interfaces;
a first determining module, configured to determine, from the path tree, a second interface at the same level as the first interface;
the second determining module is used for determining a first connecting component corresponding to the first interface and a second connecting component corresponding to the second interface;
and the third determining module is used for determining that the first interface is matched with the first connecting assembly under the condition that the first connecting assembly and the second connecting assembly belong to the same connecting device.
In one embodiment, the connection device is provided with a dial switch, and the third determining module includes:
the acquisition module is used for acquiring a first dial switch value of the connecting device corresponding to the first connecting component and a second dial switch value of the connecting device corresponding to the second connecting component;
and the determining module is used for determining that the first interface is matched with the first connecting component under the condition that the first dial switch value is the same as the second dial switch value.
In one embodiment, the acquisition module includes:
the acquisition sub-module is used for acquiring an interface address path of the first interface;
and the determining module is used for determining a path tree where the first interface is located according to the association relation between the interfaces in the interface address path.
In one embodiment, the first determining module includes:
the acquisition module is used for acquiring a previous interface of the first interface in the path tree;
and the determining module is used for determining a second interface connected with the previous-stage interface, wherein the first interface and the second interface belong to the same stage in the path tree.
In one embodiment, the connection assembly is electrically connected to an interface in the interface device, the interface device comprising a plurality of stages of interface devices, the plurality of stages of interface devices being electrically connected in sequence.
In one embodiment, one connection means corresponds to one interface means.
The modules in the matching device of the interface can be implemented in whole or in part by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 9. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store data when the interfaces match. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of matching interfaces.
It will be appreciated by those skilled in the art that the structure shown in fig. 9 is merely a block diagram of a portion of the structure associated with an embodiment of the present disclosure and is not limiting of the computer device to which an embodiment of the present disclosure may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) according to the embodiments of the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided by the present disclosure may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided by the present disclosure may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided in the present disclosure may be general-purpose processors, central processing units, graphic processors, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like, without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few implementations of the disclosed embodiments, which are described in more detail and are not to be construed as limiting the scope of the disclosed embodiments. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made to the disclosed embodiments without departing from the spirit of the disclosed embodiments. Accordingly, the scope of the disclosed embodiments should be determined from the following claims.
Claims (9)
1. A method for matching interfaces, the method comprising:
acquiring a path tree where a first interface is located, wherein the path tree is used for describing the connection relation of the interfaces;
determining a second interface with the same level as the first interface from the path tree;
determining a first connection component corresponding to the first interface and a second connection component corresponding to the second interface;
determining that the first interface is matched with the first connecting component under the condition that the first connecting component and the second connecting component belong to the same connecting device;
wherein, be provided with dial switch on the connecting device, first coupling assembling with under the second coupling assembling belongs to the same connecting device's the condition, confirm first interface with first coupling assembling phase-match includes: acquiring a first dial switch value of a connecting device corresponding to the first connecting component and a second dial switch value of a connecting device corresponding to the second connecting component; and under the condition that the first dial switch value is the same as the second dial switch value, determining that the first interface is matched with the first connecting component.
2. The method of claim 1, wherein the obtaining the path tree where the first interface is located includes:
acquiring an interface address path of a first interface;
and determining a path tree where the first interface is located according to the association relation between the interfaces in the interface address path.
3. The method of claim 1, wherein said determining a second interface of the same level as the first interface from the path tree comprises:
acquiring a previous interface of the first interface in the path tree;
and determining a second interface connected with the previous-stage interface, wherein the first interface and the second interface belong to the same stage in the path tree.
4. The method of claim 1, wherein the connection assembly is electrically connected to an interface in an interface device, the interface device comprising a plurality of stages of interface devices, the plurality of stages of interface devices being electrically connected in sequence.
5. The method of claim 1, wherein one connection means corresponds to one interface means.
6. A device for matching interfaces, the device comprising:
the acquisition module is used for acquiring a path tree where the first interface is located, wherein the path tree is used for describing the connection relation of the interfaces;
a first determining module, configured to determine, from the path tree, a second interface at the same level as the first interface;
the second determining module is used for determining a first connecting component corresponding to the first interface and a second connecting component corresponding to the second interface;
a third determining module, configured to determine that the first interface is matched with the first connecting component when the first connecting component and the second connecting component belong to the same connecting device;
wherein, be provided with dial switch on the connecting device, the third confirms the module, include: the acquisition sub-module is used for acquiring a first dial switch value of the connecting device corresponding to the first connecting component and a second dial switch value of the connecting device corresponding to the second connecting component; and the determining module is used for determining that the first interface is matched with the first connecting component under the condition that the first dial switch value is the same as the second dial switch value.
7. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the matching method of the interface of any of claims 1 to 5 when the computer program is executed.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the matching method of an interface as claimed in any one of claims 1 to 5.
9. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the matching method of an interface as claimed in any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210646073.2A CN114896192B (en) | 2022-06-09 | 2022-06-09 | Interface matching method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210646073.2A CN114896192B (en) | 2022-06-09 | 2022-06-09 | Interface matching method, device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114896192A CN114896192A (en) | 2022-08-12 |
CN114896192B true CN114896192B (en) | 2024-04-09 |
Family
ID=82728912
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210646073.2A Active CN114896192B (en) | 2022-06-09 | 2022-06-09 | Interface matching method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114896192B (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1892704A (en) * | 2005-06-22 | 2007-01-10 | 西门子共同研究公司 | System and method for path based tree matching |
CN101494583A (en) * | 2008-01-24 | 2009-07-29 | 华为技术有限公司 | Route bridging method, network bridge equipment and bridging network |
KR20090085950A (en) * | 2008-02-05 | 2009-08-10 | 정정규 | USB extension system using power line communication |
CN101667201A (en) * | 2009-09-18 | 2010-03-10 | 浙江大学 | Integration method of Deep Web query interface based on tree merging |
US8090805B1 (en) * | 2004-02-17 | 2012-01-03 | Cisco Technology, Inc. | System and method for performing cascaded lookups to forward packets |
CN102646040A (en) * | 2012-04-19 | 2012-08-22 | 贾志东 | Software generating method and device based on functional piece and functional piece tree |
CN108089956A (en) * | 2017-12-07 | 2018-05-29 | 畅捷通信息技术股份有限公司 | Verify the method and system of the returned data of interface |
CN110719200A (en) * | 2019-10-12 | 2020-01-21 | 北京百度网讯科技有限公司 | Information identification method and device |
CN111030867A (en) * | 2019-12-18 | 2020-04-17 | 国网山西省电力公司电力科学研究院 | DIP switch-based communication acquisition device and communication protocol-free configuration method |
CN113411203A (en) * | 2021-05-14 | 2021-09-17 | 深圳市广和通无线股份有限公司 | Terminal configuration method and device, computer equipment and storage medium |
CN113672389A (en) * | 2021-08-20 | 2021-11-19 | 济南浪潮数据技术有限公司 | Server compatibility method, system, equipment and computer readable storage medium |
CN114238181A (en) * | 2021-09-18 | 2022-03-25 | 苏州浪潮智能科技有限公司 | Method for processing and acquiring physical link information of multipath equipment path |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6904477B2 (en) * | 2001-04-13 | 2005-06-07 | Sun Microsystems, Inc. | Virtual host controller interface with multipath input/output |
US7167471B2 (en) * | 2001-08-28 | 2007-01-23 | International Business Machines Corporation | Network processor with single interface supporting tree search engine and CAM |
US7283472B2 (en) * | 2002-08-30 | 2007-10-16 | Redback Networks Inc. | Priority-based efficient fair queuing for quality of service classification for packet processing |
US9124524B2 (en) * | 2011-06-29 | 2015-09-01 | Broadcom Corporation | System and method for priority based flow control between nodes |
RU2622629C2 (en) * | 2015-03-31 | 2017-06-16 | Закрытое акционерное общество "Лаборатория Касперского" | Method of searching for the road by tree |
CN107959642B (en) * | 2016-10-17 | 2020-08-07 | 华为技术有限公司 | Method, device and system for measuring network path |
US11973699B2 (en) * | 2020-03-13 | 2024-04-30 | Dell Products L.P. | Systems and methods for auto-detection and auto-configuration of uplinks and server interfaces for storage solutions |
US11502957B2 (en) * | 2020-05-14 | 2022-11-15 | Mellanox Technologies, Ltd. | Avoiding markers for longest prefix match based on binary search tree algorithm |
-
2022
- 2022-06-09 CN CN202210646073.2A patent/CN114896192B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8090805B1 (en) * | 2004-02-17 | 2012-01-03 | Cisco Technology, Inc. | System and method for performing cascaded lookups to forward packets |
CN1892704A (en) * | 2005-06-22 | 2007-01-10 | 西门子共同研究公司 | System and method for path based tree matching |
CN101494583A (en) * | 2008-01-24 | 2009-07-29 | 华为技术有限公司 | Route bridging method, network bridge equipment and bridging network |
KR20090085950A (en) * | 2008-02-05 | 2009-08-10 | 정정규 | USB extension system using power line communication |
CN101667201A (en) * | 2009-09-18 | 2010-03-10 | 浙江大学 | Integration method of Deep Web query interface based on tree merging |
CN102646040A (en) * | 2012-04-19 | 2012-08-22 | 贾志东 | Software generating method and device based on functional piece and functional piece tree |
CN108089956A (en) * | 2017-12-07 | 2018-05-29 | 畅捷通信息技术股份有限公司 | Verify the method and system of the returned data of interface |
CN110719200A (en) * | 2019-10-12 | 2020-01-21 | 北京百度网讯科技有限公司 | Information identification method and device |
CN111030867A (en) * | 2019-12-18 | 2020-04-17 | 国网山西省电力公司电力科学研究院 | DIP switch-based communication acquisition device and communication protocol-free configuration method |
CN113411203A (en) * | 2021-05-14 | 2021-09-17 | 深圳市广和通无线股份有限公司 | Terminal configuration method and device, computer equipment and storage medium |
CN113672389A (en) * | 2021-08-20 | 2021-11-19 | 济南浪潮数据技术有限公司 | Server compatibility method, system, equipment and computer readable storage medium |
CN114238181A (en) * | 2021-09-18 | 2022-03-25 | 苏州浪潮智能科技有限公司 | Method for processing and acquiring physical link information of multipath equipment path |
Non-Patent Citations (1)
Title |
---|
基于匹配的最小化路径表达式的优化方法;魏东平;张静;刘树涛;;计算机工程与设计;20080516(第09期);正文 * |
Also Published As
Publication number | Publication date |
---|---|
CN114896192A (en) | 2022-08-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109714188B (en) | Configuration data management method, device and storage medium based on Zookeeper | |
JP2018133087A (en) | Processing data in memory cells of memory | |
CN111767144A (en) | Transaction routing determination method, device, equipment and system for transaction data | |
CN113792008A (en) | Method and device for acquiring network topology structure, electronic equipment and storage medium | |
CN114896192B (en) | Interface matching method, device, computer equipment and storage medium | |
CN115987888A (en) | Routing address storage method, device, network equipment and storage medium | |
CN112417019A (en) | Data format optimization method based on business processing system and business server | |
CN113010477B (en) | Method and device for retrieving metadata of persistent memory file system and storage structure | |
CN107766519B (en) | Method for visually configuring data structure | |
CN107368596A (en) | A kind of method and device of Bloom filter query set element | |
CN113518501B (en) | Intelligent lighting system equipment replacement method, system, device and storage medium | |
CN116244272A (en) | Data migration method, system, equipment and medium | |
CN115865834B (en) | Connection relationship identification method, device, switch, storage medium and program product | |
WO2008054790A2 (en) | Systems and methods for optimized serialization | |
CN115453341B (en) | Method and device for identifying DC switch type | |
US12032708B2 (en) | Remote access method, electronic device, and storage medium | |
CN111008195A (en) | Database free space management method, system, terminal and storage medium | |
CN116647468A (en) | Registration center configuration method, registration center configuration device, computer equipment and storage medium | |
CN115774802A (en) | A terminal information matching method and system based on a set array | |
CN119520216A (en) | Operation and maintenance method, apparatus, computer device, readable storage medium and program product | |
CN116737245A (en) | Initialization step execution method, device, computer equipment and storage medium | |
CN116414771A (en) | Data migration method, device, electronic equipment and storage medium | |
CN117997846A (en) | Traffic screening method, apparatus, computer device, storage medium and program product | |
CN117130727A (en) | Disk type switching method and device of virtual machine and computer equipment | |
CN117349131A (en) | System error information display method and device and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |