Method, device and system for determining connection relation and storage medium

文档序号:153076 发布日期:2021-10-26 浏览:34次 中文

阅读说明:本技术 连接关系确定的方法、装置、系统及存储介质 (Method, device and system for determining connection relation and storage medium ) 是由 桑建 魏远伦 杨鑫 于 2020-04-26 设计创作,主要内容包括:本发明公开了连接关系确定的方法、装置、系统及存储介质。该方法包括:获取目标板卡的板卡标识;根据板卡标识和预先构建的板卡类型与硬件组件之间的映射关系库,确定目标硬件组件;板卡类型与硬件组件之间的映射关系包括板卡标识与板卡类型之间的对应关系;根据板卡标识和预先构建的板卡与参数配置之间的映射关系库,确定目标板卡与目标参数之间的配置关系;根据目标硬件组件和预先构建的硬件组件映射关系库,确定目标硬件组件之间的映射关系;根据目标硬件组件、目标板卡与目标参数之间的配置关系和目标硬件组件之间的映射关系,确定目标板卡中硬件组件之间的连接关系,能够提高板卡中的硬件组件的可扩展性和可维护性。(The invention discloses a method, a device, a system and a storage medium for determining a connection relation. The method comprises the following steps: acquiring a board card identifier of a target board card; determining a target hardware component according to the board card identification and a pre-established mapping relation library between the board card type and the hardware component; the mapping relation between the board card type and the hardware component comprises a corresponding relation between a board card identification and the board card type; determining a configuration relation between a target board card and a target parameter according to a board card identification and a pre-constructed mapping relation library between the board card and the parameter configuration; determining a mapping relation between target hardware components according to the target hardware components and a pre-constructed hardware component mapping relation library; according to the target hardware component, the configuration relation between the target board card and the target parameter and the mapping relation between the target hardware components, the connection relation between the hardware components in the target board card is determined, and the expandability and maintainability of the hardware components in the board card can be improved.)

1. A method for connection relationship determination, the method comprising:

acquiring a board card identifier of a target board card;

determining a target hardware component according to the board card identification and a pre-constructed mapping relation library between the board card type and the hardware component; the mapping relation between the board card type and the hardware component comprises a corresponding relation between the board card identification and the board card type;

determining a configuration relation between the target board card and a target parameter according to the board card identification and a pre-constructed mapping relation library between the board card and the parameter configuration;

determining a mapping relation between the target hardware components according to the target hardware components and a pre-constructed hardware component mapping relation library;

and determining the connection relation among the hardware components in the target board card according to the target hardware component, the configuration relation among the target board card and the target parameter and the mapping relation among the target hardware components.

2. The method of claim 1, further comprising:

determining a target interface which has a connection relation with the target board card according to the board card identification and a pre-constructed mapping relation library of the board card and an external interface;

the target interface is an interface for communication between the target board card and target equipment.

3. The method of claim 1, further comprising:

reading hardware interface type information in a hardware interface type collection library, hardware component type information in a hardware component type library and board card type information in a board card type library, and constructing a mapping relation library between the board card type and the hardware component.

4. The method of claim 1, further comprising:

reading hardware interface type information in a hardware interface type collection library, board card parameter information in a board card parameter configuration library and board card type information in a board card type library, and constructing a mapping relation library between the board cards and parameter configuration.

5. The method of claim 1, further comprising:

reading the component type information in the hardware component type library and the board type information in the board type library, and constructing the hardware component mapping relation library.

6. The method of claim 2, further comprising:

and reading an external interface set library, and constructing a mapping relation library of the board card and the external interface.

7. The method according to any one of claims 1-6, further comprising:

receiving calling information sent by first equipment, wherein the calling information comprises the board card identification;

and determining the connection relation between the hardware components in the target board card according to the board card identification so that the first device can communicate with the second device according to the connection relation between the hardware components in the target board card.

8. An apparatus for connection relationship determination, the apparatus comprising:

the acquisition module is used for acquiring the board card identification of the target board card;

the first determining module is used for determining a target hardware component according to the board card identification and a mapping relation library between a pre-constructed board card type and the hardware component; the mapping relation between the board card type and the hardware component comprises a corresponding relation between the board card identification and the board card type;

the second determining module is used for determining the configuration relation between the target board card and the target parameter according to the board card identification and a pre-constructed mapping relation library between the board card and the parameter configuration;

a third determining module, configured to determine a mapping relationship between the target hardware components according to the target hardware components and a pre-constructed hardware component mapping relationship library;

and the fourth determining module is used for determining the connection relation among the hardware components in the target board card according to the target hardware component, the configuration relation among the target board card and the target parameter and the mapping relation among the target hardware components.

9. An electronic device, characterized in that the device comprises: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the method of any of claims 1-7.

10. A computer storage medium having computer program instructions stored thereon which, when executed by a processor, implement the method of any one of claims 1-7.

Technical Field

The invention belongs to the technical field of hardware equipment abstraction management, and particularly relates to a method, a device, a system and a storage medium for determining a connection relation.

Background

The connection relationship between hardware components in a board in a communication device is very important in implementing various functions of the communication device.

At present, connection relations among hardware components in boards are all solidified in drivers of the boards, and if a plurality of boards exist in communication equipment, each board needs to deploy the connection relations among the hardware components in the respective drivers, so that the expandability and maintainability of the connection relations among the hardware components are low.

Disclosure of Invention

Embodiments of the present invention provide a method, an apparatus, a system, and a storage medium for determining a connection relationship, which can improve expandability and maintainability of a hardware component in a board card.

In a first aspect, a method for determining a connection relationship is provided, where the method includes:

acquiring a board card identifier of a target board card;

determining a target hardware component according to the board card identification and a pre-established mapping relation library between the board card type and the hardware component; the mapping relation between the board card type and the hardware component comprises a corresponding relation between a board card identification and the board card type;

determining a configuration relation between a target board card and a target parameter according to a board card identification and a pre-constructed mapping relation library between the board card and the parameter configuration;

determining a mapping relation between target hardware components according to the target hardware components and a pre-constructed hardware component mapping relation library;

and determining the connection relation among the hardware components in the target board card according to the target hardware component, the configuration relation among the target board card and the target parameter and the mapping relation among the target hardware components.

In one possible implementation, the method further includes:

determining a target interface which has a connection relation with a target board card according to the board card identification and a pre-constructed mapping relation library of the board card and the external interface;

the target interface is an interface for communication between the target board card and the target equipment.

In one possible implementation, the method further includes:

reading the hardware interface type information in the hardware interface type collection library, the hardware component type information in the hardware component type library and the board card type information in the board card type library, and constructing a mapping relation library between the board card type and the hardware component.

In one possible implementation, the method further includes:

and reading the hardware interface type information in the hardware interface type collection library, the board card parameter information in the board card parameter configuration library and the board card type information in the board card type library, and constructing a mapping relation library between the board cards and the parameter configuration.

In one possible implementation, the method further includes:

and reading the component type information in the hardware component type library and the board type information in the board type library, and constructing a hardware component mapping relation library.

In one possible implementation, the method further includes:

and reading the external interface set library, and constructing a mapping relation library of the board card and the external interface.

In one possible implementation, the method further includes:

receiving calling information sent by first equipment, wherein the calling information comprises a board card identifier;

and determining the connection relation between the hardware components in the target board according to the board identification, so that the first equipment communicates with the second equipment according to the connection relation between the hardware components in the target board.

In a second aspect, an apparatus for connection relation determination is provided, the apparatus comprising:

the acquisition module is used for acquiring the board card identification of the target board card;

the first determination module is used for determining a target hardware component according to the board card identification and a mapping relation library between the board card type and the hardware component which is constructed in advance; the mapping relation between the board card type and the hardware component comprises a corresponding relation between a board card identification and the board card type;

the second determining module is used for determining the configuration relation between the target board card and the target parameter according to the board card identification and a pre-constructed mapping relation library between the board card and the parameter configuration;

the third determining module is used for determining the mapping relation between the target hardware components according to the target hardware components and a pre-constructed hardware component mapping relation library;

and the fourth determining module is used for determining the connection relation among the hardware components in the target board card according to the target hardware component, the configuration relation among the target board card and the target parameter and the mapping relation among the target hardware components.

In a third aspect, an electronic device is provided, the device comprising: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, performs the method as in the first aspect or any possible implementation of the first aspect.

In a fourth aspect, there is provided a computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement a method as in the first aspect or any possible implementation of the first aspect.

Based on the provided method, device, system and storage medium for determining the connection relationship, the board card identification of the target board card is obtained; determining a target hardware component according to the board card identification and a pre-established mapping relation library between the board card type and the hardware component; the mapping relation between the board card type and the hardware component comprises a corresponding relation between a board card identification and the board card type; determining a configuration relation between a target board card and a target parameter according to a board card identification and a pre-constructed mapping relation library between the board card and the parameter configuration; determining a mapping relation between target hardware components according to the target hardware components and a pre-constructed hardware component mapping relation library; according to the target hardware component, the configuration relation between the target board card and the target parameter and the mapping relation between the target hardware components, the connection relation between the hardware components in the target board card is determined, and the expandability and maintainability of the hardware components in the board card can be improved.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

Fig. 1 is a schematic flowchart of a method for determining a connection relationship according to an embodiment of the present invention;

fig. 2 is a schematic flowchart of another method for determining a connection relationship according to an embodiment of the present invention;

fig. 3 is a schematic flowchart of another method for determining a connection relationship according to an embodiment of the present invention;

fig. 4 is a flowchart illustrating a method for determining a connection relation according to another embodiment of the present invention;

fig. 5 is a schematic structural diagram of an apparatus for determining a connection relationship according to an embodiment of the present invention;

fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

Detailed Description

Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.

It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

There are many types of communication devices, such as a programmable telephone exchange, a router, an exchange, a wireless base station, etc.

Communication equipment typically includes one or more subracks, each subrack having one or more board card modules. The management software module for a communication device is often referred to as a device management subsystem, which is an important subsystem of the overall communication device software.

The device management subsystem can establish a software mapping of the hardware resources and provide the software mapping to interface to other software modules. The other software module can utilize the interface to acquire the resource information of the communication equipment and utilize the resource information to complete the interoperation function with the hardware.

The software mapping module can complete software mapping of the connection relationship between the hardware components. The connection relationship of the hardware components on the board card of the communication device can be various. Many times, the board card is not changed, and only different connection modes between hardware components are changed, so that the board card can become a different board card. This mapping may be used by hardware drivers and other software modules to accomplish the various communication functions.

For example, when a system needs to configure a hardware component interconnection interface, another interconnected hardware component needs to be obtained from the software mapping module, and corresponding configuration is completed, so as to ensure normal communication between the hardware components.

For the board hardware, another important task of software mapping is to map all external connection interfaces, including interfaces inside the system and interfaces outside the system, and to map the user name and user index of the interface with the hardware index.

In the related art, software mapping modules of hardware resources in an equipment management subsystem on communication equipment are all distributed in different hardware component driving modules, and the software mapping of the hardware resources is realized only for one hardware board card or a series of hardware board cards with small hardware difference. Therefore, the connection relation between the hardware components is basically not realized in an explicit independent mode and is basically solidified in the code of the board card hardware. There is a code correspondence for each connection. The mapping of the hardware external connection interface to the board card is generally distributed in the hardware driver related to the interface. The connection relationships among the hardware components are all solidified in the operation program of the board card, so that the expandability and maintainability of the hardware components are poor, and meanwhile, the portability and the adaptability of the hardware components are poor.

Therefore, the embodiment of the invention provides a method, a device, equipment and a storage medium for determining a connection relationship, which can improve the expandability and maintainability of hardware components in a board card.

For convenience of understanding the embodiment of the present invention, a method for determining a connection relationship according to the embodiment of the present invention is first described in detail.

Fig. 1 is a schematic flowchart of a method for determining a connection relationship according to an embodiment of the present invention.

As shown in fig. 1, a method for determining a connection relationship provided in an embodiment of the present invention may include:

s101: and acquiring the board card identification of the target board card.

The identification of the board card can be the identification corresponding to the type of the board card, and the functions realized by the board cards of different types are different. The functions realized by the board cards need to be completed by matching hardware components. Therefore, the board cards of different models are correspondingly provided with different board card identifications.

S102: and determining a target hardware component according to the board card identification and a pre-constructed mapping relation library between the board card type and the hardware component.

The mapping relation library between the board card type and the hardware component is constructed in advance.

Specifically, the hardware interface type information in the hardware interface type collection library, the hardware component type information in the hardware component type library, and the board type information in the board type library are read, and a mapping relation library between the board type and the hardware component is constructed.

The board type information includes a board type and a board identifier, and the built mapping relation library between the board type and the hardware component includes not only the mapping relation between the board type and the hardware component, but also the corresponding relation between the board type and the board identifier. The board type may be represented using digital coding.

The hardware interface type information may include information such as a type index number of the hardware component, an identification of the hardware component, and the like.

The target hardware component refers to a hardware component required by the board card to realize a certain function. Wherein the target hardware component has at least one.

S103: and determining the configuration relation between the target board card and the target parameter according to the board card identification and a pre-constructed mapping relation library between the board card and the parameter configuration.

The type of the board card can be determined through the board card identification. The parameter configuration of the board cards of different models is also different. And determining a target parameter corresponding to the target board card, namely the configuration relation between the target board card and the target parameter according to a pre-constructed mapping relation library between the quota board card and the parameter configuration. And determining a target parameter corresponding to the target board card from a mapping relation library between the board card and the parameter configuration through the board card identification, namely, a configuration relation exists between the target board card and the target parameter.

The mapping relation library between the board card and the parameter configuration is constructed in advance, and specifically comprises the following steps:

and reading the hardware interface type information in the hardware interface type collection library, the board card parameter information in the board card parameter configuration library and the board card type information in the board card type library, and constructing a mapping relation library between the board cards and the parameter configuration.

The board type information may include information such as a board type index number and a board name. The board parameter information may include information such as a board type index number and a configuration parameter of the board.

S104: and determining the mapping relation between the target hardware components according to the target hardware components and a pre-constructed hardware component mapping relation library.

The hardware component mapping relation library comprises connection relations among the hardware components.

The hardware component mapping relation library is originally constructed and specifically includes:

and reading the component type information in the hardware component type library and the board type information in the board type library, and constructing a hardware component mapping relation library.

The component type information may include a connection relation serial number between the hardware components, for example, a number "0" may be used to indicate that there is no connection relation between the hardware components, and a number "1" may indicate that there is a connection relation between the hardware components. The component type information may further include whether the hardware component on the board card needs to be connected with an external interface, a serial number of the external interface connected with the hardware component, a type index number of the hardware component connected with the external interface, an identifier of the hardware component, a type index number of the external interface connected with the hardware component, and an identifier of the interface. When the hardware component does not need to be connected with an external interface, the serial number of the external interface connected with the board card, the type index number of the hardware component connected with the external interface, the identifier of the hardware component, the type index number of the external interface connected with the hardware component, the identifier of the interface and other information can be all set to be null.

S105: and determining the connection relation among the hardware components in the target board card according to the target hardware component, the configuration relation among the target board card and the target parameter and the mapping relation among the target hardware components.

According to the target hardware component, the configuration relation between the target board card and the target parameters and the mapping relation between the target hardware components, the configuration parameters of the target hardware component and the target board card corresponding to the target board card can be determined, and meanwhile, the connection relation between the target hardware components in the target board card can be obtained when the target board card achieves a certain function by combining the mapping relation between the target hardware components.

After determining the connection relationship between the target hardware components on the target board card, a target interface capable of being connected with the board card needs to be determined, wherein the target interface is an interface for communication between the target board card and the target device.

Specifically, a target interface having a connection relationship with the target board card is determined according to the board card identifier and a pre-constructed mapping relationship library of the board card and the external interface.

When the first device needs to communicate with the second device, the first board card needs to realize the communication between the first device and the second device and the function to be realized by the first board card.

And receiving calling information sent by the first equipment. The calling information comprises a board card identifier. And determining a target board card to be called by the target equipment according to the board card identification. And determining the connection relation between the hardware components in the target board card required by the first device based on the board card identification. And determining a target board card in the first equipment according to the connection relation between the hardware components. The target board card can enable the first device to achieve certain functions.

According to the method for determining the connection relation, the board card identification of the target board card is obtained; determining a target hardware component according to the board card identification and a pre-established mapping relation library between the board card type and the hardware component; the mapping relation between the board card type and the hardware component comprises a corresponding relation between a board card identification and the board card type; determining a configuration relation between a target board card and a target parameter according to a board card identification and a pre-constructed mapping relation library between the board card and the parameter configuration; determining a mapping relation between target hardware components according to the target hardware components and a pre-constructed hardware component mapping relation library; according to the target hardware component, the configuration relation between the target board card and the target parameter and the mapping relation between the target hardware components, the connection relation between the hardware components in the target board card is determined, and the expandability and maintainability of the hardware components in the board card can be improved.

As an example, as shown in fig. 2, a method for determining a connection relationship according to an embodiment of the present invention may include:

s201: reading a hardware interface type tuple set library, reading a hardware component type tuple set library, reading a hardware board card type hardware component library, and reading a hardware board card type special pre-configuration parameter library. And establishing a corresponding software mapping structure.

S202: reading a hardware board card type external interface tuple set library, creating an internal software mapping structure, and mapping the external interface of the board card type.

S203: and reading a hardware component connection relation set library of the hardware board card type, and establishing a software mapping structure of the hardware component connection relation.

S204: reading a hardware identifier of a hardware board card of the board card, inquiring a hardware component software mapping structure of the hardware board card type, obtaining a hardware component mapping structure of the board card, and setting the hardware component mapping structure as a hardware component mapping structure of the current hardware board card;

s205: inquiring the special pre-configuration parameter mapping structure of the hardware board card type to obtain the special pre-configuration parameter mapping structure of the board card, and setting the special pre-configuration parameter mapping structure as the hardware component mapping structure of the current hardware board card

S206: inquiring the external interface configuration mapping structure of the hardware board card type to obtain the external interface mapping structure of the board card, and setting the external interface configuration mapping structure as the external interface configuration mapping structure of the current hardware board card

S207: and inquiring the hardware board type hardware component connection relation mapping structure to obtain the hardware component connection relation of the board, and setting the hardware component connection relation mapping structure as the current hardware board hardware component connection relation mapping structure.

S208: and according to the calling of other modules, giving various relation parameters between the hardware according to the mapping structure.

For example, in a board, if traffic of a Virtual Local Area Network (VLAN) is to be led to a Network processor for processing, it can be known from a connection relationship that link bindings need to be set at ports 12 and 13 of an ethernet switch chip, and a tag of a VLAN 802.1Q is set. The method for determining the connection relation provided by the embodiment of the invention can be adapted to any hardware connection setting. For example, the hardware can be replaced by the Ethernet switching chip 14, 15 port connecting with the network processor, only the configuration file needs to be changed and the change can be satisfied, and the code does not need to be changed. The expandability and the portability of the hardware component on the board card are improved.

In the present exemplary embodiment, { } is used to represent a set, and [ ] is used to represent an array of variable sizes in the set.

Presetting an external interface set externally connected by a hardware board card by using the following tuple set:

{ hardware Board type index number, hardware Board name, { hardware Board type index number, hardware Board name [, ]

{0 (external interface serial number), interface type index number, interface hardware identifier, interface user name, whether the interface is a system external interface },

{1, interface type index number, interface hardware identifier, interface user name, whether the interface is a system external interface },

]}

a plurality of such tuples form a hardware board aggregation library for external interfaces.

The system external interface means that the external interface is used for connecting other equipment in the network, and if the interface is used for connecting internal components of the system, the external interface is not the system external interface.

The board card hardware component connection relation set is preset by using the tuple set, and one connection can possibly connect a plurality of hardware components.

{ hardware Board type index number, hardware Board name, { hardware Board type index number, hardware Board name [, ]

{0 (connection relation number), whether or not the external interface is connected, external interface number,

[ { hardware component type index number 1, hardware component identification, interface type index number, interface hardware identification },

{ hardware component type index number 2, hardware component identification, interface type index number, interface hardware identification },

]},

{1, whether an external interface is connected, external interface number,

[ { hardware component type index number 1, hardware component identification, interface type index number, interface hardware identification },

{ hardware component type index number 2, hardware component identification, interface type index number, interface hardware identification },

]},

]}

a plurality of tuples form a hardware board card collection library aiming at the hardware connection relation.

As another example, as shown in fig. 3, a method for determining a connection relationship according to an embodiment of the present invention may include:

s301: reading a pre-configured machine frame interconnection interface type tuple set, and establishing a machine frame interconnection interface type library.

S302: reading a pre-configured board card machine frame interconnection interface tuple set, and establishing a board card machine frame interconnection interface library.

S303: reading a pre-configured multi-machine frame equipment interconnection type set, and establishing a multi-machine frame equipment interconnection type library.

S304: and reading the pre-configured machine frame slot position interconnection type set, and establishing a machine frame slot position interconnection type library.

S305: and reading the frame hardware type, finding the corresponding frame type in the frame slot interconnection type library, and setting the frame type as the current frame type. And acquiring the information of the machine frame slot position and the board slot interconnection interface.

S306: and reading the hardware type of each slot position board card of the machine frame, finding the corresponding board card type in a hardware board card type library, and setting the type as the slot position board card type of each slot position. And acquiring interconnection interface information of each board card slot.

S307: and creating hardware component connection relation software mapping of the whole machine frame according to the hardware component connection relation of each slot position board card and the corresponding relation of the board slot interconnection interface.

S308: and reading the multi-frame configuration identification.

S309: and judging whether the equipment is multi-frame equipment. If so, go to step S310, otherwise, go to step S311.

S310: and reading the hardware identifier of the multi-machine frame equipment, searching the multi-machine frame equipment type in the multi-machine frame interconnection type library, setting the multi-machine frame equipment type as the current multi-machine frame equipment type, and acquiring multi-frame equipment interconnection information.

S311: and finishing the establishment of the hardware resource software mapping.

S312: and judging whether the machine frame is a switching frame. If so, go to step S313, otherwise, go to step S314.

S313: reading the frame number of the switch frame, and setting the frame numbers of other frames in the multi-frame equipment according to the interconnection information of the multi-frame equipment.

S314: and receiving the setting of the frame number by the switch frame.

S315: and establishing the hardware component connection relation of the multi-frame equipment according to the interconnection information of the multi-frame equipment and the interconnection interface information to complete the integral hardware resource mapping.

After the multi-chassis hardware mapping relationship is established, other software modules can complete related settings by using the mapping relationship. For example, a switch shelf may match multiple shelf devices for a variety of different shelf numbers. In each case, different types of port binding settings are made. In the past, different multi-frame devices need to be coded, and only one code is needed after the method is applied.

As another example, as shown in fig. 4, a method for determining a connection relationship according to an embodiment of the present invention may include:

s401: reading the pre-configuration library file of the hardware interface type tuple, and creating a hardware interface type mapping structure array.

S402: reading the pre-configuration library file of the hardware component type tuple and creating a hardware component type mapping structure array.

S403: reading a hardware board card type tuple configuration file, reading a hardware board card type pre-configuration information tuple, and creating a hardware board card type mapping structure array.

For a hardware component, it can be abstracted as one entity, formed by a combination of various hardware interfaces. And can configure the preset switching relationship between the ports.

The set of preconfigured interfaces is implemented with a set of tuples to form a hardware component type library,

{ hardware component type number, hardware component name,

{ interface type index number 1, interface type name, interface type hardware identification, number, [ interface hardware identification 0, interface hardware identification 1, … ] },

{ interface type index number 2, interface type name, interface type hardware identification, number, [ interface hardware identification 0, interface hardware identification 1, … ] },

{ Interexchange relationship 1, { endpoint interface type hardware identification 1, endpoint interface hardware identification 1}, { endpoint interface type hardware identification 2, endpoint interface hardware identification 2} },

{ Interexchange relationship 2, { endpoint interface type hardware identification 1, endpoint interface hardware identification 1}, { endpoint interface type hardware identification 2, endpoint interface hardware identification 2} },

…],

{ inside one-in-many-out relationship 1}, { inside one-in-many-out relationship, ingress end point interface type hardware identifier, ingress end point interface hardware identifier }, [ { egress end point interface type hardware identifier 1, egress end point interface hardware identifier 1}, { egress end point interface type hardware identifier 2, egress end point interface hardware identifier 2}, … ] },

{ internal one-in-multiple-out relationship 2}, { input end point interface type hardware identification, input end point interface hardware identification }, [ { output end point interface type hardware identification 1, output end point interface hardware identification 1}, { output end point interface type hardware identification 2, output end point interface hardware identification 2}, … ] },

…],

}

because each hardware pair indicates that the default hardware component type is abstracted into several hardware interface types, each interface type is composed of several interfaces.

The preconfigured hardware component type is realized as a board physical hardware type using the following tuple sets.

{

The serial number of the physical hardware type of the board card,

the identification code of the physical hardware of the board card,

the name of the physical hardware type of the board card,

{ hardware component type number 1, hardware component type name, number, [ hardware component identification 1, hardware component identification 2, … ] },

{ hardware component type number 2, hardware component type name, number, [ hardware component identification 1, hardware component identification 2, … ] },

]

}

indicating that the board physical hardware consists of several hardware component types, several hardware components of each type.

The special pre-configuration in the board hardware is achieved with the following tuple sets.

{

The serial number of the physical hardware type of the board card,

the name of the physical hardware type of the board card,

[

{ hardware component type number 1, hardware component type name, hardware component identification, interface type index number 1, interface type name, interface identification, parameter configuration string },

{ hardware component type number 1, hardware component type name, hardware component identification, interface type index number 1, interface type name, interface identification, parameter configuration string },

]}

the parameter configuration character is in the form of "parameter 1 ═ xxx: parameter 2 ═ xxx", where parameter 1, parameter 2 are contained in the parameter information string that has been included in the interface type tuple.

Fig. 5 is a schematic structural diagram of an apparatus for determining a connection relationship according to an embodiment of the present invention.

As shown in fig. 5, an apparatus for determining a connection relationship according to an embodiment of the present invention may include: the system comprises an acquisition module 501, a first determination module 502, a second determination module 503, a third determination module 504 and a fourth determination module 505.

The obtaining module 501 is configured to obtain a board identifier of a target board.

A first determining module 502, configured to determine a target hardware component according to a board identifier and a mapping relationship library between a board type and a hardware component that is pre-constructed; the mapping relation between the board card type and the hardware component comprises the corresponding relation between the board card identification and the board card type.

The second determining module 503 is configured to determine a configuration relationship between the target board and the target parameter according to the board identifier and a mapping relationship library between the board and the parameter configuration, which is pre-constructed.

A third determining module 504, configured to determine a mapping relationship between the target hardware components according to the target hardware components and a pre-constructed hardware component mapping relationship library.

A fourth determining module 505, configured to determine a connection relationship between hardware components in the target board card according to the target hardware component, a configuration relationship between the target board card and the target parameter, and a mapping relationship between the target hardware components.

Optionally, in some embodiments of the present invention, the fourth determining module 505 is further configured to: determining a target interface which has a connection relation with a target board card according to the board card identification and a pre-constructed mapping relation library of the board card and the external interface; the target interface is an interface for communication between the target board card and the target equipment.

Optionally, in some embodiments of the present invention, the apparatus further comprises a building module;

and the construction module is used for reading the hardware interface type information in the hardware interface type collection library, the hardware component type information in the hardware component type library and the board card type information in the board card type library and constructing a mapping relation library between the board card type and the hardware component.

Optionally, in some embodiments of the present invention, the building module is further configured to read hardware interface type information in the hardware interface type collection library, board parameter information in the board parameter configuration library, and board type information in the board type library, and build a mapping relationship library between the board and the parameter configuration.

Optionally, in some embodiments of the present invention, the building module is further configured to read component type information in the hardware component type library and board type information in the board type library, and build the hardware component mapping relationship library.

Optionally, in some embodiments of the present invention, the building module is further configured to read an external interface set library, and build a mapping relation library between the board card and the external interface.

Optionally, in some embodiments of the present invention, the apparatus further includes:

the receiving module is used for receiving calling information sent by the first equipment, and the calling information comprises a board card identifier;

the fourth determining module 505 is further configured to determine, according to the board identifier, a connection relationship between the hardware components in the target board, so that the first device communicates with the second device according to the connection relationship between the hardware components in the target board.

The device for determining the connection relation provided by the embodiment of the invention is used for acquiring the board card identification of the target board card through the acquisition module;

the first determination module is used for determining a target hardware component according to the board card identification and a mapping relation library between the board card type and the hardware component which is constructed in advance; the mapping relation between the board card type and the hardware component comprises a corresponding relation between a board card identification and the board card type; the second determining module is used for determining the configuration relation between the target board card and the target parameter according to the board card identification and a pre-constructed mapping relation library between the board card and the parameter configuration; the third determining module is used for determining the mapping relation between the target hardware components according to the target hardware components and a pre-constructed hardware component mapping relation library; and the fourth determining module is used for determining the connection relation among the hardware components in the target board card according to the target hardware components, the configuration relation among the target board card and the target parameters and the mapping relation among the target hardware components, so that the expandability and the maintainability of the hardware components in the board card can be improved.

The apparatus for determining a connection relationship provided in the embodiment of the present invention executes each step in the methods shown in fig. 1 to fig. 4, and can achieve the technical effect of improving the expandability and maintainability of the hardware component in the board, and for brevity, details are not described here again.

Fig. 6 is a schematic diagram illustrating a hardware structure of an electronic device according to an embodiment of the present invention.

The electronic device may comprise a processor 601 and a memory 602 in which computer program instructions are stored.

Specifically, the processor 601 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured as one or more Integrated circuits implementing embodiments of the present invention.

Memory 602 may include mass storage for data or instructions. By way of example, and not limitation, memory 602 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 602 may include removable or non-removable (or fixed) media, where appropriate. The memory 602 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 602 is a non-volatile solid-state memory. In a particular embodiment, the memory 602 includes Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory or a combination of two or more of these.

The processor 601 reads and executes the computer program instructions stored in the memory 602 to implement any one of the connection relationship determination methods in the embodiments shown in fig. 1 to 4.

In one example, the electronic device may also include a communication interface 603 and a bus 610. As shown in fig. 6, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 610 to complete communication therebetween.

The communication interface 603 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiments of the present invention.

The bus 610 includes hardware, software, or both to couple the components of the electronic device to one another. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 610 may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.

The electronic device may execute the method for determining a connection relationship in the embodiment of the present invention, so as to implement the method for determining a connection relationship described in conjunction with fig. 1 to 4.

In addition, in combination with the method for determining the connection relationship in the foregoing embodiments, the embodiments of the present invention may be implemented by providing a computer storage medium. The computer storage medium having computer program instructions stored thereon; the computer program instructions, when executed by a processor, implement any of the methods of connection relationship determination described in the above embodiments.

It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.

The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.

It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.

As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种DDR5 SDRAM的高吞吐率、低延迟PHY接口电路装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!