Low-cost interlocking lower computer communication connection distribution method, electronic equipment and readable storage medium

By optimizing the communication connection allocation method and combining the actual performance of the communication board, the problem of hardware resources waste of interlocking signal equipment is solved, and the effect of reducing hardware costs and failure rates is achieved.

CN120301927APending Publication Date: 2025-07-11CASCO SIGNAL LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510417566.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The hardware configuration resources of existing interlocking signal equipment in coal mines, ports, steel plants and other locations are seriously wasted, and a scientific communication connection allocation method is needed to reduce the number of communication boards and reduce hardware costs and failure rates.

Method used

By combining the actual configuration performance of communication boards, we try to optimize the communication connection configuration with different communication boards, ensure that a single external device is not centrally configured on a single communication board or a single network port, and adopt a scientific and optimal communication connection allocation method.

Benefits of technology

On the basis of ensuring that the performance of communication boards meets on-site requirements, reduce the number of communication boards used, reduce hardware costs and failure rates, and improve communication reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120301927A_ABST
    Figure CN120301927A_ABST
Patent Text Reader

Abstract

The invention discloses a low-cost interlocking lower computer communication connection distribution method, electronic equipment and a readable storage medium. The method comprises the steps that S1, the maximum connection number M of a single communication board card and the maximum connection number N of a single network port are initialized; s2, initializing the number of single-system communication board cards to be 1; s3, initializing a communication node information structural body and a communication board card structural body; s4, obtaining a target communication connection; s5, finding a configurable communication board card and a configurable network port as a target communication board card node and a target network port node; s6, traversing other unconfigured target communication connections, and processing the unconfigured target communication connections by adopting the S5 in sequence; s7, checking whether the board card connection numbers of all the communication board cards are smaller than or equal to M and whether the network port connection numbers of the network ports are smaller than or equal to N, and if not, adding 1 to the number of the single-system communication board cards and repeating the steps S3-S6; and S8, outputting a connection distribution result. The method can reduce hardware cost and failure rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of rail transit, and particularly relates to a low-cost communication connection allocation method, an electronic device, and a readable storage medium for an interlocking slave computer. Background Art

[0002] Currently, interlocking signal devices are widely used in places such as coal mines, ports, and steel mills. The interlocking slave computer is an important part of the interlocking signal device, and it needs to communicate with various external devices. The interlocking slave computer usually adopts a 2-by-2 redundant architecture, which includes A / B dual systems. Each system includes multiple communication boards, and each communication board includes multiple network ports. The interlocking slave computer communicates with various external devices through the TCP / UDP protocol. Before communication, the interlocking slave computer needs to configure the communication connections on the network ports of the communication boards. In actual applications, there are many types of railway field devices. According to the number of communication connections of a single device, the field devices can be divided into 8-channel connection devices, 4-channel connection devices, and 2-channel connection devices. For devices of each communication connection type, the interlocking slave computer needs to configure 8, 4, and 2 communication connections for them respectively.

[0003] When the interlocking signal device works in places such as coal mines, ports, and steel mills, due to the relatively simple working environment, the existing hardware performance of the interlocking slave computer far exceeds the on-site requirements. If the hardware configuration is still carried out according to the national railway station standard, it is easy to cause resource waste. Therefore, a scientific communication connection allocation method is needed to make full use of the device hardware resources and reduce the number of communication boards required while meeting the on-site functional and safety requirements. That is, how to set the communication connections of external devices on as few communication boards as possible while meeting the on-site requirements is a technical problem that needs to be solved urgently.

[0004] It can be understood that the above statements only provide background art related to the present invention and do not necessarily constitute prior art. Summary of the Invention

[0005] Based on the foregoing technical problems, the purpose of the present invention is to provide a low-cost communication connection allocation method, an electronic device, and a readable storage medium for an interlocking slave computer. This method combines the actual configuration performance of the communication boards, and by continuously trying different communication connection allocation methods with different numbers of communication boards, a scientific and optimal communication connection allocation method is obtained to minimize the number of communication boards used while ensuring that the performance of the communication boards meets the on-site requirements, reducing the hardware cost and failure rate.

[0006] To achieve the above purpose, the present invention is realized through the following technical solutions:

[0007] A low-cost communication connection allocation method for an interlocking slave computer includes:

[0008] S1. Initialize the maximum number of connections M for a single communication board card and the maximum number of connections N for a single network interface according to the offline configuration input file;

[0009] S2. Initialize the number of single - system communication board cards to 1;

[0010] S3. Initialize the communication node information structure, set the multi - communication connection node linked list and communication nodes, and according to the number of single - system board cards, initialize the communication board card structures of Series A and Series B, and set the board card Series A / B, the linked list node of the communication board card, and the linked list node of the network interface;

[0011] S4. Obtain an unconfigured target communication connection of an external device from the communication node information structure;

[0012] S5. Find the communication board card and network interface that can be configured for the unconfigured target communication connection from the communication board card structure, use them as the target communication board card node and target network interface node of the current target communication connection, and update the corresponding status information in the communication node information structure and the communication board card structure;

[0013] S6. Traverse other unconfigured target communication connections in the communication node information structure, and process the unconfigured target communication connections respectively in sequence using S5;

[0014] S7. Check whether the number of board card connections in all communication board card linked list nodes of Series A and Series B is less than or equal to M, and whether the number of network interface connections of the associated network interfaces is less than or equal to N. If not, increment the number of single - system communication board cards by 1, and then repeat S3 - S6 until the check meets the conditions;

[0015] S8. Output the number of single - system board cards, the communication board card structure, and the communication node information structure.

[0016] Optionally, S5 includes:

[0017] S51. Find the communication board card that can be configured for the unconfigured target communication connection from the communication board card structure, and use it as the target communication board card node of the current target communication connection;

[0018] S52. Find the network interface that can be configured on the target communication board card node, and use it as the target network interface node of the current target communication connection;

[0019] S53. Write the numbers of the target communication board card node and the target network interface node into the communication node where the target communication connection belongs in the communication node information structure;

[0020] S54. Configure the number of the external device to which the target communication connection belongs and the number of the channel on the network port linked list node to which the target network port node belongs in the communication board structure, and update the status of the communication board linked list node in the communication board structure.

[0021] Optionally, S51 includes:

[0022] Find the communication board structure corresponding to the target communication connection, traverse the communication board linked list nodes in the order from beginning to end, count the total number of configuration times of the number of the external device to which the target communication connection belongs in the network port linked list nodes associated with the communication board linked list nodes, find the first communication board node whose total number of configuration times is less than the maximum communication connection number threshold, and if the target communication connection can still be configured on this communication board node, use this communication board node as the target communication board node of the current target communication connection; wherein, the maximum communication connection number threshold is the maximum number of communication connections allowed to be configured by a single external device on a single communication board.

[0023] Optionally, before S51, calculate the maximum communication connection number threshold based on the number of communication boards in a single system.

[0024] Optionally, calculating the maximum communication connection number threshold includes:

[0025] If the number of communication boards in a single system is less than 2, set the maximum communication connection number threshold to 4; if the number of communication boards in a single system is greater than or equal to 2, set the maximum communication connection number threshold to 2.

[0026] Optionally, S52 includes:

[0027] Traverse the network port linked list nodes associated with the communication board linked list nodes of the target communication board node, count the number of configuration times of the number of the external device to which the target communication connection belongs in the network port linked list nodes, find the first network port linked list node with a configuration times of 0, and use this network port linked list node as the target network port node.

[0028] Optionally, the communication node includes a node number, an array of communication board numbers, and an array of communication network port numbers; S53 includes:

[0029] Write the board number of the target communication board node into the array of communication board numbers of the communication node to which the target communication connection belongs in the communication node information structure.

[0030] Write the network port number of the target network port node into the array of communication network port numbers of the communication node to which the target communication connection belongs in the communication node information structure.

[0031] Optionally, the communication board card linked list node includes: a board card number, the number of board card connections, and a network interface linked list head pointer; the network interface linked list node includes: a network interface number, the number of network interface connections, an array of connection belonging node numbers, and an array of connection sequence numbers;

[0032] The S54 includes:

[0033] Write the number of the external device to which the target communication connection belongs into the array of connection belonging node numbers of the network interface linked list node to which the target network interface node belongs in the communication board card structure, and then increment by 1 the number of board card connections in the associated communication board card linked list node;

[0034] Write the sequence number of the target communication connection into the array of connection sequence numbers of the network interface linked list node to which the target network interface node belongs in the communication board card structure, and then increment by 1 the number of network interface connections of the network interface linked list node.

[0035] Optionally, in the S54, after the number of network interface connections of the network interface linked list node is incremented by 1, sort the modified network interface linked list nodes according to the rule of increasing number of network interface connections from less to more;

[0036] In the S54, after the number of board card connections of the communication board card linked list node is incremented by 1, sort the modified communication board card linked list nodes according to the rule of increasing number of board card connections from less to more.

[0037] Optionally, the external device is an 8-channel connection device, a 4-channel connection device, or a 2-channel connection device; the multi-communication connection node linked list of the communication node information structure includes an 8-communication connection node linked list, a 4-communication connection node linked list, and a 2-communication connection node linked list.

[0038] Optionally, the communication board card structure includes an A-series communication board card structure and a B-series communication board card structure; when configuring each communication connection of the external device, evenly distribute each communication connection of the external device to the A-series communication board card structure and the B-series communication board card structure.

[0039] Optionally, in the S4, traverse the 8-communication connection node linked list, and use the first unconfigured A-series communication connection as the target communication connection;

[0040] The S6 includes:

[0041] S61. Traverse the remaining A-series communication connections in the 8-communication connection node linked list, and sequentially use each unconfigured A-series communication connection as the target communication connection and process it using S5;

[0042] S62. Traverse the A-series communication connections in the 4-communication connection node linked list, and sequentially use each unconfigured A-series communication connection as the target communication connection and process it using S5;

[0043] S63. Traverse the communication connections of system A in the communication connection node list of 2, take the unconfigured communication connections of system A as target communication connections, and process them using S5;

[0044] S64. Traverse the communication connections of system B in the communication connection node list of 8, and successively take each unconfigured communication connection of system B as a target communication connection and process it using S5;

[0045] S65. Traverse the communication connections of system B in the communication connection node list of 4, and successively take each unconfigured communication connection of system B as a target communication connection and process it using S5;

[0046] S66. Traverse the communication connections of system B in the communication connection node list of 2, take the unconfigured communication connections of system B as target communication connections, and process them using S5.

[0047] Optionally, an electronic device, the electronic device includes: a memory, a processor, wherein, a computer program is stored on the memory, and when the computer program is executed by the processor, the steps of the foregoing low-cost interlock slave machine communication connection allocation method are implemented.

[0048] Optionally, a readable storage medium, a computer program is stored on the readable storage medium, and when the computer program is executed by a processor, the steps of the foregoing low-cost interlock slave machine communication connection allocation method are implemented.

[0049] The present invention has the following advantages compared with the prior art:

[0050] In the low-cost interlock slave machine communication connection allocation method of the present invention, in combination with the actual factory configuration performance of the communication board, by continuously trying different communication connection allocation methods with different numbers of communication boards, a scientific and optimal communication connection allocation method is obtained, so as to minimize the number of communication boards used on the basis of ensuring that the performance of the communication board can meet the on-site requirements, and reduce the hardware cost and failure rate.

[0051] Furthermore, the low-cost interlock slave machine communication connection allocation method of the present invention can ensure that the communication connection nodes of a single external device are not concentratedly configured on a single communication board or a single network port, so as to avoid the communication disconnection caused by the failure of a single communication board or a single network port. The method of the present invention can further ensure the reliability of the communication connection between the external devices of the communication board. Description of the Drawings

[0052] To more clearly illustrate the technical solution of the present invention, the following will briefly introduce the drawings required for the description. Obviously, the drawings in the following description are an embodiment of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings:

[0053] Figure 1 Schematic diagram of the connection between an interlock slave computer and external devices of the present invention;

[0054] Figure 2 Low-cost interlock slave computer communication connection allocation method of the present invention;

[0055] Figure 3 Schematic diagram of an information structure body of a communication node of the present invention;

[0056] Figure 4 Schematic diagram of a communication board structure body of the present invention;

[0057] Figure 5 Schematic diagram of finding a target communication board node with the number of configuration times less than the maximum communication connection number threshold of the present invention;

[0058] Figure 6 Schematic diagram of calculating the maximum communication connection number threshold of the present invention;

[0059] Figure 7 Schematic diagram of finding a target network interface node with the node number of an unconfigured target communication connection of the present invention;

[0060] Figure 8 Schematic diagram of sorting network interface list nodes of the present invention;

[0061] Figure 9 Schematic diagram of sorting communication board list nodes of the present invention;

[0062] Figure 10 Schematic diagram of checking the legality of communication board list nodes and network interface list nodes of the present invention. Detailed implementation manners

[0063] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the scope of protection of the present invention.

[0064] It should be noted that in this text, the terms "include", "comprise", "have" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or terminal device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising..." or "including..." does not exclude the existence of additional elements in the process, method, article or terminal device comprising the said element.

[0065] It should be noted that the attached drawings are in a very simplified form and use non-precise ratios, solely for the purpose of conveniently and clearly assisting in explaining the objectives of the embodiments of the present invention.

[0066] As Figure 1 shown, it is a schematic diagram of the connection between an interlock slave computer and external devices (which can be simply referred to as peripheral devices or nodes). It can be seen from the figure that the hardware structure of the interlock slave computer includes System A, System B and a generator tripping device, where System A and System B are backup to each other. System A includes an arithmetic board of System A and a communication board card of System A, and System B includes an arithmetic board of System B and a communication board card of System B. Among them, the number of communication board cards of System A and System B can be adjusted according to the requirements of on-site projects.

[0067] In practical applications, the interlock slave computer can communicate with multiple different types of external devices. These external devices need to establish 8, 4 or 2 communication connections with the interlock slave computer. The connections of a single external device, i.e., a node, are numbered in sequence (the connection serial numbers corresponding to the 8-communication connection type are 1 to 8, the connection serial numbers corresponding to the 4-communication connection type are 1 to 4, and the connection serial numbers corresponding to the 2-communication connection type are 1 to 2). Each communication connection needs to be configured with 1 associated network port.

[0068] In order to reduce the failure rate of equipment and the hardware cost of equipment on the premise of meeting the on-site function and safety requirements. The present invention proposes a method for allocating communication connections of a low-cost interlock slave computer. This method is a scientific method for allocating communication connections, which can make full use of the hardware resources of the equipment, optimize resource allocation, reduce the number of communication board cards to be used, and reduce the hardware failure rate and equipment cost of the equipment while meeting the on-site function and safety requirements.

[0069] As Figure 2 shown, it is a method for allocating communication connections of a low-cost interlock slave computer according to the present invention. This method includes: S1. Initialize the maximum number of connections M of a single communication board card and the maximum number of connections N of a single network port according to the offline configuration input file.

[0070] In practical applications, the maximum number of connections M of a single communication board and the maximum number of connections N of a single network port are usually related to the factory performance configuration of the communication board, and the present invention does not limit their specific values. For example, in one embodiment, M is 200 and N is 50.

[0071] S2. Initialize the number of single-system communication boards to 1.

[0072] S3. Initialize the communication node information structure according to the offline configuration input file (see Figure 3 ), set up multiple communication connection node lists and communication nodes, the communication node information structure corresponds to the external device. According to the number of single-system boards, initialize the A-series and B-series communication board structures (see Figure 4 ), set the board A / B system, the communication board link table node and the network port link table node, and the communication board structure corresponds to the A / B communication board of the interlocking lower computer.

[0073] Among them, the multi-communication connection node linked list and communication node of the communication node information structure include 8 communication connection node linked lists and their node numbers, i.e., communication nodes, 4 communication connection node linked lists and their node numbers, and 2 communication connection node linked lists and their node numbers. On the other hand, the communication board structure includes an A series communication board structure and a B series communication board structure, and the A series communication board structure and the B series communication board structure correspond to the A series communication board and the B series communication board of the interlocking lower computer, respectively, and both include communication board linked list nodes and network port linked list nodes. The communication board linked list node includes: board number, board connection number, and network port linked list head pointer; the network port linked list node includes: network port number, network port connection number, connection node number array, and connection sequence number array.

[0074] S4. Obtain an unconfigured target communication connection of an external device from the communication node information structure.

[0075] In actual application, the unconfigured target communication connection is sought in the order of 8 communication connection node linked list, 4 communication connection node linked list, and 2 communication connection node linked list. For example, in one embodiment, the 8 communication connection node linked list is first traversed, and the first unconfigured A series communication connection with sequence number 1 is taken as the target communication connection.

[0076] S5. Find the communication board and network port that can be configured for the unconfigured target communication connection from the communication board structure, use them as the target communication board node and target network port node of the current target communication connection, and update the corresponding status information in the communication node information structure and the communication board structure.

[0077] Specifically, S5 comprises:

[0078] S51. Find the communication board card that can be configured for the unconfigured target communication connection in the communication board card structure, and use it as the target communication board card node for the current target communication connection.

[0079] In practical applications, S51 includes: finding the communication board card structure corresponding to the target communication connection system, traversing the communication board card linked list nodes in the order from start to end, counting the configuration times of the external device number (i.e., the node number) to which the target communication connection belongs in the network port linked list nodes associated with the communication board card linked list nodes, finding the first communication board card node with the configuration times less than the maximum communication connection number threshold. If the target communication connection can still be configured on this communication board card node, then use this communication board card node as the target communication board card node for the current target communication connection (S51 can be implemented in the way of Figure 5 , and of course, other existing methods can also be used to implement S51). That is, the target communication board card node needs to meet two conditions: 1) The number of times the external device to which the target communication connection belongs is configured on this communication board card is less than the maximum communication connection number threshold (it can be equal to the maximum communication connection number threshold after configuring this target communication connection); 2) The number of communication connections configured on this communication board card is the least and the current load is the lightest.

[0080] Among them, the maximum communication connection number threshold is the maximum number of communication connections allowed to be configured by a single external device, that is, a single node, on a single communication board card. The maximum communication connection number threshold can also be called Link Max. Optionally, before S51, calculate the maximum communication connection number threshold based on the number of single-system communication board cards. For example, as Figure 6 shown, calculating the maximum communication connection number threshold includes: obtaining the number of single-system communication board cards; judging whether the number of single-system communication board cards is less than 2. If it is less than 2, set the maximum communication connection number threshold to 4; if the number of single-system communication board cards is greater than or equal to 2, set the maximum communication connection number threshold to 2. Based on the above method, it can be ensured that the number of communication connections in each communication board card is as consistent as possible. On the one hand, it can avoid the excessive workload of a single communication board card and affect the stability of the communication board card; on the other hand, it can avoid affecting too many external devices when a single communication board card fails.

[0081] S52. Find the network port that can be configured on the target communication board card node, and use it as the target network port node for the current target communication connection.

[0082] Specifically, S52 includes: traversing the network port linked list nodes associated with the communication board card linked list nodes of the target communication board card node, counting the configuration times of the external device number to which the target communication connection belongs in the network port linked list nodes, finding the first network port linked list node with the configuration times of 0, and using this network port linked list node as the target network port node (it can be implemented in the way of Figure 7Implement S52 in the above manner. Of course, other existing methods can also be used to implement S52). Based on the above method, it can be ensured that the number of communication connections configured on the network interface of the communication board is as consistent as possible. On the one hand, it can avoid excessive workload on a single network interface, affecting the stability of the communication board; on the other hand, it can avoid affecting too many external devices in the event of a single network interface failure.

[0083] S53. Write the numbers of the target communication board node and the target network interface node into the communication nodes to which the target communication connection belongs in the communication node information structure.

[0084] Such as Figure 3 shown, in an embodiment, the communication node includes a node number, an array of communication board numbers, and an array of communication network interface numbers. Specifically, S53 includes: writing the board number of the target communication board node found in S51 into the array of communication board numbers of the communication node to which the target communication connection belongs in the communication node information structure to update the status of the communication board (a new external device channel has been connected). Writing the network interface number of the target network interface node found in S52 into the array of communication network interface numbers of the communication node to which the target communication connection belongs in the communication node information structure to update the status of the network interface (a new external device channel has been connected).

[0085] S54. Configure the numbers of the external device and the channel to which the target communication connection belongs on the network interface linked list node to which the target network interface node belongs in the communication board structure, and update the status of the communication board linked list node in the communication board structure.

[0086] Specifically, S54 includes: writing the number of the external device to which the target communication connection belongs into the array of connection-owned node numbers of the network interface linked list node to which the target network interface node belongs in the communication board structure, and then incrementing the number of board connections in the associated communication board linked list node by 1. Writing the sequence number of the target communication connection into the array of connection sequence numbers of the network interface linked list node to which the target network interface node belongs in the communication board structure, and then incrementing the number of network interface connections of the network interface linked list node by 1. Based on the above method, the numbers of the external device and its channel to which the target communication connection belongs are configured on the target network interface node.

[0087] Among them, in S54, after the number of network interface connections of the network interface linked list node is incremented by 1, the modified network interface linked list nodes are sorted according to the rule of increasing the number of network interface connections from less to more (please refer to the method in Figure 8 ), Figure 8When copying node data, only copy the network interface number, the number of network interface connections, the array of node numbers to which the connections belong, and the array of connection sequence numbers. Of course, other existing methods can also be used to implement this step). In S54, after the number of board connections of the communication board list node is incremented by 1, the modified communication board list nodes are sorted according to the rule of increasing the number of board connections from less to more (please refer to Figure 9 the method in Figure 9 When copying node data, only copy the number of board connections, the board number, and the head pointer of the network interface list. Of course, other existing methods can also be used to implement this step).

[0088] S6. Traverse other unconfigured target communication connections in the communication node information structure, and process the unconfigured target communication connections respectively using S5 in sequence until all target communication connections of external devices have been configured.

[0089] Exemplarily, in an embodiment, in S4, traverse the 8 communication connection node list preferentially, and use the first unconfigured A-series communication connection with the serial number 1 as the target communication connection. After being processed by S5, the A-series communication connection with the serial number 1 has been configured. In S6, check whether there are other unconfigured communication connections. If so, use the unconfigured communication connections as target communication connections in sequence and process them using S5 to configure all unconfigured communication connections. Specifically, S6 includes:

[0090] S61. Traverse the remaining A-series communication connections in the 8 communication connection node list, that is, the A-series communication connections with serial numbers 2 to 4, and use each unconfigured A-series communication connection as the target communication connection and process it using S5 in sequence;

[0091] S62. Traverse the A-series communication connections with serial numbers 1 to 2 in the 4 communication connection node list, and use each unconfigured A-series communication connection as the target communication connection and process it using S5 in sequence;

[0092] S63. Traverse the A-series communication connection with the serial number 1 in the 2 communication connection node list, and use the unconfigured A-series communication connection as the target communication connection and process it using S5;

[0093] S64. Traverse the B-series communication connections with serial numbers 5 to 8 in the 8 communication connection node list, and use each unconfigured B-series communication connection as the target communication connection and process it using S5 in sequence;

[0094] S65. Traverse the B-series communication connections with serial numbers 3 to 4 in the 4 communication connection node list, and use each unconfigured B-series communication connection as the target communication connection and process it using S5 in sequence;

[0095] S66. Traverse the B - series communication connections with serial number 2 in the linked list of communication connection nodes, regard the unconfigured B - series communication connections as target communication connections, and process them using S5.

[0096] S7. Check whether the number of board connections in all communication board node lists of A - series and B - series is less than or equal to M, and whether the number of connections in the associated network port node list (i.e., the node link number) is less than or equal to N. If not, that is, there is at least one communication board with the number of board connections greater than M, and / or there is at least one network port with the number of network port connections greater than N, then increment the number of single - series communication boards by 1, and repeat S3 - S6 until the check meets the conditions, that is, the output result meets the above conditions (S7 can be implemented in the way of Figure 10 , and of course, other existing methods can also be used to implement S7).

[0097] S8. Output the number of single - series boards, the communication board structure (including A - series and B - series), and the communication node information structure, that is, output the final connection allocation result. Among them, the communication board structure contains the communication connection information of each network port of each communication board of the interlocking slave computer; the communication node information structure contains the communication connection information of multiple external devices with each communication board and network port of the interlocking slave computer.

[0098] As can be seen from the above, in the low - cost interlocking slave computer communication connection allocation method of the present invention, combined with the actual factory - configured performance of the communication board, by continuously trying different communication connection allocation methods with different numbers of communication boards, a scientific and optimal communication connection allocation method is obtained. On the basis of ensuring that the performance of the communication board can meet the on - site requirements, the number of communication boards used is reduced as much as possible, and the hardware cost is reduced. Since the number of communication boards used is reduced, the failure rate of the interlocking slave computer is greatly reduced.

[0099] Furthermore, the low - cost interlocking slave computer communication connection allocation method of the present invention can ensure that the communication connection nodes of a single external device are not concentratedly configured on a single communication board or a single network port, so as to avoid the disconnection of communication when a single communication board or a single network port fails. The method of the present invention can further ensure the reliability of the external device communication connection of the communication board.

[0100] In practical applications, the low - cost interlocking slave computer communication connection allocation method of the present invention can be used in environments with relatively simple working conditions and fewer interlocking external devices, such as coal mines, ports, steel mills, etc. The present invention can not only ensure the reliability of communication connections, but also reduce the hardware cost. For example, in an application scenario, the low - cost interlocking slave computer communication connection allocation method of the present invention can complete relevant functions with less hardware while meeting the on - site functional requirements and safety requirements, which not only reduces the hardware cost but also reduces the failure rate of the system.

[0101] As can be seen from the above, in the low-cost interlocking lower computer communication connection allocation method of the present invention, in order to reduce the hardware cost while ensuring the communication stability between the interlocking lower computer and the external device, the allocation of communication connections needs to meet the following principles: 1) The number of communication connections configured on all communication boards of the A series is equal to the number of communication connections configured on all communication boards of the B series; 2) For a single-series communication board, the difference in the number of communication connections configured on each communication board cannot be too large to avoid the communication node configuration of the communication board being too concentrated; 3) For each network port on a single communication board, the difference in the number of communication connections configured on the network port cannot be too large to avoid the communication node configuration of the communication board being too concentrated; 4) When the number of communication boards of a single series is When it is equal to 1, a single external device can only be configured with 4 communication connections on a single communication board at most; when the number of communication boards in a single system is greater than or equal to 2, a single external device can only be configured with 2 communication connections on a single communication board at most; 5) For a single external device, the communication connections of the external device need to be evenly distributed to the A / B systems; 6) For a single external device, no more than 2 communication connections of the external device can be configured on the same network port; 7) The number of communication connections configured on a single communication board cannot exceed the value M, and the number of communication connections configured on a single network port cannot exceed the value N (when the system resource utilization rate of the communication board does not exceed 15%, the maximum number of connections that the communication board can support is M, and N = M / number of network ports on a single board).

[0102] Based on the same inventive concept, the present invention also provides an electronic device, comprising: a memory, a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the aforementioned low-cost interlocking lower-computer communication connection allocation method are implemented.

[0103] Based on the same inventive concept, the present invention also provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the aforementioned low-cost interlocking lower-computer communication connection allocation method are implemented.

[0104] In summary, in a low-cost interlocking lower computer communication connection allocation method of the present invention, combined with the actual factory configuration performance of the communication board, a scientific and optimal communication connection allocation method is obtained by continuously trying communication connection allocation methods with different numbers of communication boards. On the basis of ensuring that the performance of the communication board can meet on-site needs, the number of communication boards used can be reduced as much as possible, and the hardware cost and failure rate can be reduced.

[0105] Furthermore, for the low-cost communication connection allocation method of the interlocking slave computer of the present invention, the communication connections between the interlocking slave computer and different external devices are set on as few communication boards as possible, and the communication connections configured on each communication board and network port are made as balanced as possible, which can ensure the reliability of the communication connections between the interlocking slave computer and external devices.

[0106] Although the specific embodiments of the present invention have been described above, those skilled in the art should understand that these are only examples, and the protection scope of the present invention is defined by the appended claims. Without departing from the principle and essence of the present invention, those skilled in the art can make various changes or modifications to these embodiments, but these changes and modifications all fall within the protection scope of the present invention.

Claims

1. A low-cost communication connection allocation method for the interlock slave computer, characterized in that Include: S1. Initialize the maximum connection number M of a single communication board card and the maximum connection number N of a single network interface according to the offline configuration input file; S2. Initialize the number of single-line communication board cards to 1; S3. Initialize the communication node information structure, set the multi-communication connection node linked list and communication nodes, and initialize the communication board card structures of Series A and Series B according to the number of single-line board cards, and set the board card Series A / B, the communication board card linked list node, and the network interface linked list node; S4. Obtain an unconfigured target communication connection of an external device from the communication node information structure; S5. Find the communication board card and network interface that can be configured for the unconfigured target communication connection from the communication board card structure, and use them as the target communication board card node and target network interface node of the current target communication connection, and update the corresponding status information in the communication node information structure and the communication board card structure; S6. Traverse other unconfigured target communication connections in the communication node information structure, and process the unconfigured target communication connections respectively in sequence using S5; S7. Check whether the number of board card connections in all communication board card linked list nodes of Series A and Series B is less than or equal to M, and whether the number of network interface connections of the associated network interfaces is less than or equal to N. If not, increment the number of single-line communication board cards by 1, and then repeat S3 to S6 until the check meets the conditions; S8. Output the number of single-line board cards, the communication board card structure, and the communication node information structure.

2. The low-cost interlocking slave communication connection allocation method according to claim 1, characterized in that, The said S5 includes: S51. Find the communication board card that can be configured for the unconfigured target communication connection from the communication board card structure, and use it as the target communication board card node of the current target communication connection; S52. Find the network interface that can be configured on the target communication board card node, and use it as the target network interface node of the current target communication connection; S53. Write the numbers of the target communication board card node and the target network interface node into the communication node to which the target communication connection belongs in the communication node information structure respectively; S54. Configure the number of the external device and the number of the channel to which the target communication connection belongs on the network interface linked list node to which the target network interface node belongs in the communication board card structure, and update the status of the communication board card linked list node in the communication board card structure.

3. The low-cost interlock slave communication connection allocation method according to claim 2, characterized in that The said S51 includes: Find the communication board card structure corresponding to the system of the target communication connection, traverse the communication board card linked list nodes in the principle of from head to tail, count the total number of configuration times of the external device number to which the target communication connection belongs in the network interface linked list nodes associated with the communication board card linked list nodes, find the first communication board card node with the total number of configuration times less than the maximum communication connection number threshold, and if the target communication connection can still be configured on this communication board card node, use this communication board card node as the target communication board card node of the current target communication connection; wherein, the maximum communication connection number threshold is the maximum number of communication connections allowed to be configured by a single external device on a single communication board card.

4. The low-cost interlocking lower computer communication connection allocation method according to claim 2 or 3, characterized in that Before the said S51, calculate the maximum communication connection number threshold based on the number of single-line communication board cards.

5. The low-cost interlocking slave communication connection allocation method according to claim 4, characterized in that Calculating the maximum communication connection number threshold includes: If the number of single - line communication board cards is less than 2, set the maximum communication connection number threshold to 4; if the number of single - line communication board cards is greater than or equal to 2, set the maximum communication connection number threshold to 2.

6. The low-cost interlock slave communication connection allocation method according to claim 2, characterized in that, The S52 includes: Traverse the network port linked - list nodes associated with the communication board - card linked - list nodes of the target communication board - card node, count the configuration times of the external device numbers to which the target communication connection belongs in the network port linked - list nodes, find the first network port linked - list node with a configuration time of 0, and use this network port linked - list node as the target network port node.

7. The low-cost interlock slave communication connection allocation method according to claim 2, wherein The communication node includes a node number, an array of communication board - card numbers, and an array of communication network - port numbers; the S53 includes: Write the board - card number of the target communication board - card node into the array of communication board - card numbers of the communication node to which the target communication connection belongs in the communication node information structure. Write the network - port number of the target network port node into the array of communication network - port numbers of the communication node to which the target communication connection belongs in the communication node information structure.

8. The low - cost interlocking lower - level machine communication connection allocation method according to claim 2, wherein The communication board - card linked - list node includes: a board - card number, a board - card connection number, and a pointer to the head of the network port linked - list; the network port linked - list node includes: a network - port number, a network - port connection number, an array of connection - belonging node numbers, and an array of connection sequence numbers. The S54 includes: Write the number of the external device to which the target communication connection belongs into the array of connection - belonging node numbers of the network port linked - list node to which the target network port node belongs in the communication board - card structure, and then increment the board - card connection number in the associated communication board - card linked - list node by 1. Write the sequence number of the target communication connection into the array of connection sequence numbers of the network port linked - list node to which the target network port node belongs in the communication board - card structure, and then increment the network - port connection number of the network port linked - list node by 1.

9. The low - cost interlocking lower - level machine communication connection allocation method according to claim 8, wherein In the S54, after the network - port connection number of the network port linked - list node is incremented by 1, sort the modified network port linked - list nodes according to the rule of increasing network - port connection number from less to more. In the S54, after the board - card connection number of the communication board - card linked - list node is incremented by 1, sort the modified communication board - card linked - list nodes according to the rule of increasing board - card connection number from less to more.

10. The low - cost interlocking lower - level machine communication connection allocation method according to claim 1, wherein The external device is an 8 - channel connection device, a 4 - channel connection device, or a 2 - channel connection device; the multi - communication - connection node linked - list of the communication node information structure includes an 8 - communication - connection node linked - list, a 4 - communication - connection node linked - list, and a 2 - communication - connection node linked - list.

11. The low - cost interlocking lower - level machine communication connection allocation method according to claim 10, wherein The communication board - card structure includes an A - series communication board - card structure and a B - series communication board - card structure; when configuring each communication connection of the external device, evenly distribute each communication connection of the external device to the A - series communication board - card structure and the B - series communication board - card structure.

12. The low - cost interlocking lower - level machine communication connection allocation method according to claim 11, wherein In S4, traverse the linked list of 8 communication connection nodes, and use the first unconfigured communication connection of series A as the target communication connection; S6 includes: S61. Traverse the remaining communication connections of series A in the linked list of 8 communication connection nodes, and sequentially use each unconfigured communication connection of series A as the target communication connection and process it using S5; S62. Traverse the communication connections of series A in the linked list of 4 communication connection nodes, and sequentially use each unconfigured communication connection of series A as the target communication connection and process it using S5; S63. Traverse the communication connections of series A in the linked list of 2 communication connection nodes, use the unconfigured communication connection of series A as the target communication connection and process it using S5; S64. Traverse the communication connections of series B in the linked list of 8 communication connection nodes, and sequentially use each unconfigured communication connection of series B as the target communication connection and process it using S5; S65. Traverse the communication connections of series B in the linked list of 4 communication connection nodes, and sequentially use each unconfigured communication connection of series B as the target communication connection and process it using S5; S66. Traverse the communication connections of series B in the linked list of 2 communication connection nodes, use the unconfigured communication connection of series B as the target communication connection and process it using S5.

13. An electronic device, characterized in that, The electronic device includes: a memory and a processor. Among them, a computer program is stored on the memory, and when the computer program is executed by the processor, the steps of the low-cost interlocking lower computer communication connection allocation method according to any one of claims 1 to 12 are implemented.

14. A readable storage medium, characterized in that, A computer program is stored on the readable storage medium, and when the computer program is executed by the processor, the steps of the low-cost interlocking lower computer communication connection allocation method according to any one of claims 1 to 12 are implemented.