A method for determining cable connection relationships
By establishing a rule table for cable connection relationships and using a multi-level filtering method, the cable connection relationships can be automatically determined using computer equipment, solving the problems of low efficiency and low accuracy of manual determination, and achieving efficient and accurate determination of cable connection relationships.
Patent Information
- Application Number
- CN202511416485.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-09-30
AI Technical Summary
In existing technologies, manually determining cable connection relationships is inefficient and inaccurate.
By establishing a rule table to characterize cable connection relationships, computer equipment is used to automatically determine cable connection relationships, including obtaining candidate connection relationships and determining the final connection relationship through multi-level filtering, thus avoiding the influence of human factors.
This improves the efficiency and accuracy of determining cable connection relationships, ensuring that the selected connection relationships are compatible with the components in the production order and avoiding the influence of human factors.
Smart Images

Figure CN120893704B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer technology, and in particular to a cable connection relationship determination method. BACKGROUND
[0002] For the cables in the order, in the related cable connection scheme determination, the human finds and interprets the model specifications of the cables to be connected, the interface types and positions of the corresponding hardware marked in the production process file, so as to determine the connection relationship of the cables. However, due to human factors, the efficiency and accuracy of determining the connection relationship of the cables are low.
[0003] Therefore, how to improve the efficiency and accuracy of determining the connection relationship of the cables is a technical problem that needs to be solved by the person skilled in the art. SUMMARY
[0004] The present application provides a cable connection relationship determination method to at least solve the problem of low efficiency and accuracy of determining the connection relationship of the cables in the related art.
[0005] The present application provides a cable connection relationship determination method, comprising: applied to a computer device, the method comprises:
[0006] Obtaining the components to be connected by the cable in the production order and the identification of the target cable whose connection relationship is to be determined;
[0007] According to the identification of the target cable, the candidate connection relationship corresponding to the target cable is obtained from the rule table for representing the cable connection relationship, and the component information of both ends of the cable in the candidate connection relationship is obtained;
[0008] Selecting a target connection relationship from the candidate connection relationship, wherein the component information of both ends of the cable satisfies a preset requirement; wherein the preset requirement is determined based on the type of the components to be connected by the cable;
[0009] Determining the final connection relationship of the target cable based on the target connection relationship.
[0010] The beneficial effects of the present application are that in the cable connection relationship determination method, a rule table for representing cable connection relationship is established in advance, the candidate connection relationship of the cable is obtained from the rule table for representing cable connection relationship, that is, the connection relationship of the cable is preliminarily determined; then, the target connection relationship in which the component information at both ends of the cable meets the preset requirements is screened out from the candidate connection relationship, and finally, the final connection relationship of the target cable is determined based on the target connection relationship, that is, through multi-stage screening, the determination of the cable connection relationship is realized; in addition, the preset requirements met by the component information at both ends of the cable in the candidate connection relationship are determined based on the component types to be connected by the cable in the production order, so that the target connection relationship selected can adapt to the components in the production order, that is, the effectiveness of the determined cable connection mode is ensured; again, compared with the previous manual search of the production process file to determine the connection relationship of the cable, in the method provided by the present application, the computer device determines the connection relationship of the cable based on the rule table for representing cable connection relationship, which avoids the influence of human factors and improves the efficiency and accuracy of determining the connection relationship of the cable.
[0011] The present application also provides an electronic device, comprising: a memory for storing a computer program; a processor for executing the computer program to realize the steps of any of the above cable connection relationship determination methods.
[0012] The present application also provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to realize the steps of any of the above cable connection relationship determination methods. BRIEF DESCRIPTION OF DRAWINGS
[0013] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0014] Figure 1 A schematic diagram of a computer device provided for the embodiments of the present application;
[0015] Figure 2 A flowchart of a cable connection relationship determination method provided for the embodiments of the present application;
[0016] Figure 3 A schematic diagram of a server production order cable component progressive layered processing method provided for the embodiments of the present application. DETAILED DESCRIPTION
[0017] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be clearly and completely described in order to make the technical solutions in the embodiments of the present application apparent to those skilled in the art. Obviously, the described embodiments are only a part rather than all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the present application.
[0018] It should be noted that, in the description of the present application, the terms "comprising", "containing" or any other variants thereof are intended to cover the non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0019] In order for those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. When determining the cable connection relationship, the model specification of the cable to be connected, the interface type and position of the corresponding hardware are manually searched and interpreted from the production process file, so as to determine the connection relationship of the cable. The influence of human factors leads to low efficiency and low accuracy in determining the connection relationship of the cable.
[0020] Therefore, in the embodiments of the present application, the determination of the cable connection relationship is realized by the computer device. It is worth noting that the computer device cannot directly recognize the information of the model specification of the cable to be connected, the interface type and position of the corresponding hardware marked in the production process file. Therefore, when determining the cable connection relationship, the computer device does not directly use the production process file used when manually determining the cable connection relationship, but is realized based on the rule table stored in it for representing the cable connection relationship.
[0021] Figure 1 A schematic diagram of a computer device provided in the embodiments of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the computer device 1 includes a production order and a rule table for representing the cable connection relationship. Table 1 is a production order table provided in the embodiments of the present application, as shown in Table 1, the production order includes material identification and the quantity of the material; wherein the material identification includes cable material identification and other material identification (i.e. component, for server production order, the component can be hard disk backplane, redundant array of independent disks card and expansion card, etc.).
[0022] Table 1 Production order table
[0023] .
[0024] Table 2 is a rule table provided by the embodiment of the present application for characterizing the cable connection relationship, and the table entries include cable material identification, component information at both ends of the cable, configuration description information and priority order. In Table 2, the two ends of the cable are represented as A and B, and the A component information includes: A board material identification, A board position (applicable to multiple installation positions) and A board interface position (A-Location); the B component information includes: B board material identification, B board position (applicable to multiple installation positions) and B board interface position (B-Location).
[0025] Table 2 is a rule table provided by the embodiment of the present application for characterizing the cable connection relationship, and the table entries include cable material identification, component information at both ends of the cable, configuration description information and priority order. In Table 2, the two ends of the cable are represented as A and B, and the A component information includes: A board material identification, A board position (applicable to multiple installation positions) and A board interface position (A-Location); the B component information includes: B board material identification, B board position (applicable to multiple installation positions) and B board interface position (B-Location).
[0026] .
[0027] In order to improve the time of establishing the rule table, in the implementation, the establishment of the rule table includes:
[0028] Collecting historical cable rule configuration data to construct a historical rule library of the rule syntax verifier, wherein each historical rule contains cable material identification, component information at both ends of the cable, configuration description information and priority order;
[0029] Arranging the rule data in the historical rule library into Few-shot learning samples according to a preset format, and inputting the Few-shot learning samples into the fine-tuned exclusive large model for model training and optimization;
[0030] In the rule configuration process, the trained and optimized exclusive large model is called to generate an initial cable rule configuration scheme with the aid of sample data in the historical rule library;
[0031] The initial configuration scheme is checked for compliance by the rule syntax verifier, and the parameter settings of the checked scheme are adjusted according to the priority order to shorten the rule configuration time.
[0032] In the embodiment, the rule syntax verifier is established by fine-tuning the industry exclusive large model, and the historical rule library is used as Few-shot learning samples. Compared with the manual maintenance of the rule table, the time of rule configuration is shortened, that is, the efficiency of obtaining the rule table is improved.
[0033] It is worth noting that in the method for determining the cable connection relationship provided by the present application, the connection relationship of the cable is finally determined after the installation positions of the components have been calculated according to the production order. In the embodiment of the method for determining the cable connection relationship, the first circuit board is a hard disk backplane, the second circuit board is a redundant array of independent disks card, and the second circuit board is an expansion card.
[0034] Figure 2A flowchart of a method for determining a cable connection relationship according to an embodiment of the present application is shown in FIG. 1, which includes the following steps. Figure 2
[0035] S10: Obtain components to be connected by a cable in a production order and an identifier of a target cable for which a connection relationship is to be determined.
[0036] S11: Obtain a candidate connection relationship corresponding to the target cable and component information at both ends of the cable in the candidate connection relationship from a rule table for representing a cable connection relationship according to the identifier of the target cable.
[0037] S12: Select a target connection relationship from the candidate connection relationship, in which the component information at both ends of the cable satisfies a preset requirement; the preset requirement is determined based on the type of the components to be connected by the cable.
[0038] S13: Determine a final connection relationship of the target cable based on the target connection relationship.
[0039] The specific content of the production order is not limited and is determined according to actual conditions. After obtaining the production order, the components to be connected by the cable in the production order are obtained. For example, the components to be connected by the cable are a hard disk backboard and a redundant array of independent disks card; and the hard disk backboard and an expansion card. The identifier of the target cable can include a material code, a material name, etc., of the target cable, which is not limited.
[0040] After obtaining the identifier of the target cable from the production order, the identifier is compared with the cable material identifier in the rule table, so that the connection relationship corresponding to the target cable is obtained. Since multiple connection relationships can be found, in order to determine the final connection relationship of the cable, the connection relationship determined after the identifier is compared with the cable material identifier in the rule table in the embodiment of the present application is referred to as a candidate connection relationship.
[0041] After obtaining the candidate connection relationship of the target cable, the component information at both ends of the cable in each candidate connection relationship is further obtained from the rule table, that is, whether the components at both ends of the cable exist, the installation position of the components, and the component interface position, etc. information can be obtained.
[0042] In order to further determine the final connection relationship from the candidate connection relationship, in the embodiment of the present application, a target connection relationship in which the component information at both ends of the cable satisfies a preset requirement is selected from the candidate connection relationship, and then the final connection relationship of the target cable is determined based on the target connection relationship.
[0043] Due to different hardware configurations in the server, different hardware configurations, that is, corresponding to different cable plug positions, a single cable material has multiple plug positions, so the cable is plugged according to the corresponding hardware configuration. That is, in order to ensure that the selected target connection relationship can adapt to the components in the production order, the preset requirement when selecting the target connection relationship from the candidate connection relationship in the embodiment of the application is determined based on the component type to be connected by the cable in the production order.
[0044] In the cable connection relationship determination method provided by the embodiment, a rule table for representing the cable connection relationship is established in advance, the candidate connection relationship of the cable is obtained from the rule table for representing the cable connection relationship, that is, the connection relationship of the cable is preliminarily determined; then, the target connection relationship in which the component information at both ends of the cable meets the preset requirement is selected from the candidate connection relationship, and finally the final connection relationship of the target cable is determined based on the target connection relationship, that is, through multiple levels of screening, the determination of the cable connection relationship is realized; in addition, the preset requirement met by the component information at both ends of the cable in the candidate connection relationship is determined based on the component type to be connected by the cable in the production order, which ensures that the selected target connection relationship can adapt to the components in the production order, that is, the effectiveness of the determined cable connection mode is ensured; again, compared with the previous manual search of the production process file to determine the connection relationship of the cable, in the method provided by the application, the computer device determines the connection relationship of the cable based on the rule table for representing the cable connection relationship, which avoids the influence of human factors and improves the efficiency and accuracy of determining the connection relationship of the cable.
[0045] In the determined candidate connection relationship, there may be a situation that the components at both ends of the cable are missing in some candidate connection relationships, therefore, in order to ensure that the cable can be effectively connected, in some embodiments, before selecting the target connection relationship in which the component information at both ends of the cable meets the preset requirement from the candidate connection relationship, the method further includes:
[0046] According to the component information at both ends of the cable in the candidate connection relationship, it is judged whether the components at both ends of the cable in the candidate connection relationship exist;
[0047] If yes, the step of selecting the target connection relationship in which the component information at both ends of the cable meets the preset requirement from the candidate connection relationship is entered;
[0048] If no, the candidate connection relationship in which the components at both ends of the cable are missing is eliminated from the candidate connection relationship, and the step of selecting the target connection relationship in which the component information at both ends of the cable meets the preset requirement from the candidate connection relationship is entered.
[0049] That is, after determining the candidate connection relationship, the existence of the cable-connected double-end material in the candidate connection relationship is verified. In the embodiment of the present application, the process is referred to as a basic matching process (first-level matching). In order for those skilled in the art to better understand the process of basic matching, the following will be described again in combination with the embodiment. The process of basic matching includes:
[0050] I. Input data: 1. cable material list (cableMatList, i.e. production order); 2. connection rule data set (connectionDataSet, i.e. rule table); in practice, there may also be some customized connection rules (customConnectionDataSet) in the rule table.
[0051] II. The core processing logic of the basic matching process is as follows: 1. match the connection rule through the PN number; 2. verify the physical connection feasibility; 3. position accurate matching.
[0052] In the method, based on cable material identification (i.e. material PN) matching, it is checked whether there is a preset connection mode, and the existence of the cable-connected double-end material is verified, and the candidate connection relationship set of each cable material is output, that is, the candidate connection relationship of the target cable is determined.
[0053] In order to determine the final connection relationship of the target cable, in some embodiments, the types of components to be connected by the cable are a first circuit board and a second circuit board; the target connection relationship selected from the candidate connection relationship, in which the component information at both ends of the cable satisfies a preset requirement, includes:
[0054] The target connection relationship selected from the candidate connection relationship, in which the component information at both ends of the cable satisfies a first preset requirement; wherein the first preset requirement is that the component information at one end of the cable in the candidate connection relationship is information for representing the first circuit board, and the component information at the other end of the cable is information for representing the second circuit board.
[0055] The method provided in this embodiment is referred to as second circuit board matching. When the order is matched with a RAID card, in order to ensure that the cable function is connected to a reasonable position, a higher filtering priority is set. The rule containing a specific keyword combination is preferentially matched. That is, the second circuit board matching is referred to as second-level matching. Taking a server production order as an example, the process is also referred to as a matching process of a redundant array of independent disks (RAID) card. The information for representing the hard disk backplane is denoted as "RHDBP", and the information for representing the RAID card is denoted as "RDM".
[0056] The RAID card matching specifically includes the following processes:
[0057] 1. Traverse all candidate connection records (originConnectDataList);
[0058] 2. Check if each record meets the following conditions simultaneously:
[0059] A board site (SiteA) starts with "RHDBP";
[0060] B board site (SiteB) starts with "RDM";
[0061] 3. The record that meets the conditions is marked as selected (setSelect(true));
[0062] 4. Record the RDM site (bSiteB) appearing in the record to a specific set (alreadySelectDataList_siteBIsRDM);
[0063] 5. Perform subsequent filtering operations:
[0064] Filter according to TypeLocationB: remove all records with the same B end site but not selected;
[0065] Filter according to TypeLocationA: remove all records with the same A end site but not selected.
[0066] In this method, based on the priority matching rule containing a specific keyword combination, the cable is allocated to the connection between the second circuit board and the first circuit board, ensuring the connection priority of the key RAID card. After the second level matching, the valid connection relationship can be marked, and the candidate connection relationship can be removed.
[0067] Different hardware configurations within the server, i.e., corresponding to different cable plug-in positions, a single cable material has multiple plug-in positions, so the corresponding hardware configuration needs to be plugged in according to the cable, i.e., it is necessary to identify the matching corresponding configuration to correctly distinguish the plug-in position. In the above embodiment, the cable is preferentially allocated to the connection between the first circuit board and the second circuit board. In practice, the server also has a special connection scenario of the first circuit board and the third circuit board.
[0068] In order to solve the complex topology recognition configuration of the cable, in some embodiments, the type of the component to be connected by the cable is a first circuit board and a third circuit board; the target connection relationship selected from the candidate connection relationship includes:
[0069] selecting, from the candidate connection relations, a target connection relation in which component information of both ends of the cable meets a second preset requirement; the second preset requirement is that, in the candidate connection relation, positions of the same end component of the cable in the same group of candidate connection relations are the same, and the component position information of both ends of the cable is all prefixed with a peripheral component interconnect express interface; wherein the same group of candidate connection relations is determined based on the configuration description information in the rule table;
[0070] determining a final connection relation of the target cable based on the target connection relation includes:
[0071] selecting, from the target connection relation, a group corresponding to a minimum value of a common position, and taking the group corresponding to the minimum value of the common position as a selected group;
[0072] determining a final connection relation of the target cable based on the target connection relation in the selected group.
[0073] In implementation, determining the same group includes:
[0074] creating a list for storing combination rules;
[0075] obtaining a maximum peripheral component interconnect express interface quantity supported by the first circuit board;
[0076] obtaining a first peripheral component interconnect express interface rule compatible with the first circuit board model and having a bandwidth greater than or equal to a minimum bandwidth of the first circuit board;
[0077] sorting the first peripheral component interconnect express interface rules in a bandwidth order, and selecting a preset number of the first peripheral component interconnect express interface rules according to a sorting result to obtain a second peripheral component interconnect express interface rule list compatible with the first circuit board;
[0078] traversing the second peripheral component interconnect express interface rules in the second peripheral component interconnect express interface rule list;
[0079] generating a new combination rule according to at least the position and number information related to the first circuit board and the peripheral component interconnect express interface, and recording the new combination rule in the list for storing combination rules;
[0080] before determining the target connection relation of the target cable based on the candidate connection relation in the selected group, further including:
[0081] grouping the new combination rules according to the position of the first circuit board to obtain multiple groups of new rules;
[0082] detecting whether the number of rules in at least one group of new rules exceeds a preset rule number;
[0083] If yes, the rules in the group are sorted by bandwidth from high to low, and those rules exceeding the maximum number of rules in each group are marked as invalid rules to ensure that the number of rules does not conflict;
[0084] If no, the slot numbers corresponding to the rules in the group are extracted and sorted, the longest continuous slot sequence is found, and the rules not in the longest continuous slot sequence are marked as invalid rules to ensure slot continuity;
[0085] The number of rules corresponding to each third circuit board in the group is counted, and the third circuit board with the largest number of rules is obtained;
[0086] Rules not belonging to the third circuit board with the largest number of rules are marked as invalid to ensure that there is no conflict between the third circuit boards.
[0087] The process of matching the cable between the first circuit board and the third circuit board in this embodiment is called combined matching (i.e., third-level matching) process.
[0088] Combined matching includes the following processes:
[0089] 1. Filter out the records containing both “RHDBP” and “riser card” from the connection rules;
[0090] 2. Group by rule version, and then group by group tag;
[0091] 3. Within the same group tag, check whether the BSiteA (or BSiteB) of all rules are the same and start with “PCIE”. If yes, record this common BSiteA (or BSiteB) value;
[0092] 4. Select the group with the smallest common BSite value as the selected group (sort by string, take the minimum value);
[0093] 5. Mark all rules in the selected group as selected (setSelect(true));
[0094] 6. Filter the unselected rules according to typeLocation (TypeLocationA or TypeLocationB) (remove conflicting rules).
[0095] The above LocationA or B type data, i.e., the information in the rule table.
[0096] In implementation, combined matching is specifically implemented through the following logic:
[0097] 1. Rule Separation and Preprocessing: Separate RHDBP rules (A end is the hard drive backplane); identify the RHDBP prefix; parse the backplane model and set the default bandwidth. Separate PCIE rules (B end is the expansion card); ensure compatibility with different naming conventions and extract the PCIE generation.
[0098] 2. Dynamic combination generation: Obtain the maximum number of PCIe rules supported by this backplane; filter compatible PCIe rules; limit the number of connections to the maximum; generate combination rules; set combination attributes and connection order priority.
[0099] 3. Conflict detection and resolution: Grouping by backplane position; rule quantity conflict detection; slot continuity detection; Riser consistency detection.
[0100] To resolve rule number conflicts: sort by bandwidth in descending order; mark overflow rules as invalid.
[0101] Solving the slot continuity problem: Find the longest continuous subsequence; mark the non-continuous rules.
[0102] To resolve Riser conflicts: count the number of rules for each Riser; select the Riser with the most rules; and mark the rules of other Risers.
[0103] 4. Continuity detection algorithm: Find the longest continuous sequence and process the last group.
[0104] The combination matching method provided in this embodiment handles the special connection scenario between the first and third circuit boards. It achieves accurate cable matching through dynamic combination generation and conflict detection, resolving the issue of complex cable topology identification and matching. Furthermore, the steps in this stage reduce the combination complexity of subsequent processing stages; and the output marks valid groups, removing conflicting connections within the same group.
[0105] For connection methods not selected in the second level, further, target connection relationships that meet preset requirements for the component information at both ends of the cable are selected from the candidate connection relationships, including:
[0106] Select a target connection relationship from the candidate connection relationships where the component information at both ends of the cable meets the third preset requirement; wherein, the third preset requirement is: in the candidate connection relationship, the component information at one end of the cable is information used to characterize the second circuit board, or the component information at the other end of the cable is information used to characterize the second circuit board.
[0107] Determining the final connection relationship of the target cable based on the target connection relationship includes:
[0108] Extract the location number of the second circuit board from the target connection relationship, and obtain the target connection relationship corresponding to the minimum location number of the second circuit board;
[0109] The final connection relationship of the target cable is determined based on the target connection relationship corresponding to the minimum position number of the second circuit board.
[0110] In this embodiment, for connection relationships not selected at the second level, records containing the second circuit board are filtered out. This process is called the second circuit board keyword matching process. Taking server production orders as an example, this process is also called the independent disk redundant array card keyword matching process, i.e., the fourth level matching.
[0111] Keyword matching for standalone disk redundant RAID cards includes the following process:
[0112] Check if the recorded SiteA or SiteB contains "RDM". "RDM" represents the identifier of the independent disk redundant RAID card.
[0113] Sort by position number in ascending order and select the record with the smallest position number.
[0114] Conflict handling: After selecting a record, remove other records in the same position.
[0115] Example:
[0116] Input records: [RDM1, RDM2];
[0117] Output: RDM1 is selected.
[0118] Candidate connection records: A collection of connection records that have not been assigned after the above filtering (List) <connectiondata>);
[0119] Allocated location set: records RDM locations that have been occupied by previous stages (Set <string>occupiedRdmSites).
[0120] In implementation, the processing logic of the RAID card keyword matching includes:
[0121] Step 1: Screening records containing RDM: screening records containing "RDM" prefix from either end (A or B) from candidate records;
[0122] Step 2: Sorting by position number: extracting RDM position number (e.g. RDM2 -> number 2); sorting in ascending order of number (processing small number positions first);
[0123] Step 3: Sequential allocation: traversing the sorted records, for each record: a. Determine its RDM position (may be A end or B end); b. Check if the position is occupied: if not occupied, mark the record as selected, and add the position to the occupied set; if occupied, skip the record;
[0124] Step 4: Conflict resolution: after allocation is complete, remove all records in the candidate set containing occupied RDM positions (whether selected or not).
[0125] At the end of the RAID card keyword matching process, a log can be output, recording the allocated RAID card positions and corresponding records. Through the RAID card keyword matching provided in this embodiment, records containing RAID cards are selected from the remaining records that have not been selected in the second stage.
[0126] To ensure that all remaining PCIE positions are allocated reasonably, in some embodiments, determining the final connection relationship of the target cable based on the target connection relationship in the selected group includes:
[0127] Extracting the component position information of both ends of the cable from the target connection relationship in the selected group as the position information starting with Peripheral Component Interconnect Express, and storing it in a set in descending order to obtain a Peripheral Component Interconnect Express position pool;
[0128] Traversing the positions in the Peripheral Component Interconnect Express position pool in ascending order;
[0129] In the case of detecting that the Peripheral Component Interconnect Express position is not allocated, in the target connection relationship in the selected group, searching for a target connection relationship containing an unallocated Peripheral Component Interconnect Express position and not selected, and marking the state of the found target connection relationship as a selected state;
[0130] Determining the final connection relationship of the target cable based on the target connection relationship in the selected state.
[0131] The method provided in this embodiment is referred to as a PCIE slot matching process, i.e., a fifth level matching. Specifically, the PCIE slot matching process includes the following steps:
[0132] Step 1: Extract all PCIE positions from the candidate records to construct a PCIE position pool;
[0133] Step 2: Traverse the position pool in order, find the first connection record containing the position for each unassigned PCIE position, and mark the connection as selected, assign it to the corresponding cable material, and record that the PCIE position has been occupied, while removing it from the position pool to avoid repeated processing.
[0134] In the PCIE slot matching method provided in this embodiment, it is ensured that all remaining PCIE positions are reasonably assigned.
[0135] After the above multi-level matching, there may still be unassigned cable materials in the production order. In order to select an optimal second circuit board connection point for the unassigned cable materials, in some embodiments, the method for determining the cable connection relationship further includes:
[0136] From the target connection relationships that meet the third preset requirement, obtain the remaining target connection relationships except for the target connection relationship corresponding to the smallest position number of the second circuit board;
[0137] Group the connection points with connection positions of the second circuit board type in the remaining target connection relationships according to the positions of the connection points;
[0138] Score the connection points in each position group, and select the connection points with scores greater than a preset value as selected connection points;
[0139] Mark the selected connection points as selected, and mark the position state corresponding to the selected connection points as occupied.
[0140] The process of selecting an optimal second circuit board connection point for the unassigned cable materials provided in this embodiment is referred to as a second circuit board position secondary allocation process, also referred to as a sixth level matching. Taking a server production order as an example, the process is also referred to as a redundant array of independent disks card position secondary allocation process. The input of the process is: the data updated in the last stage.
[0141] The processing process of the redundant array of independent disks card position secondary allocation process includes the following steps:
[0142] Filter out unselected RDM connection points: traverse all connection data to find all unselected (select attribute is false) and connection position is RDM type connection points;
[0143] Location Grouping: Groups unselected RDM connection points according to their location (Location A or Location B). Here, TypeLocationA or TypeLocationB is used to specify the location type;
[0144] Location scoring and selection: The connections within each location group are scored, and the connection with the highest score is selected as a candidate. Scoring may be based on various factors, such as location priority and historical usage frequency (a scoring model can be designed according to actual needs, using priorities from a preset rule table);
[0145] Mark selected: Mark the selected connection points as selected (select=true);
[0146] Update position occupancy status: Mark the position corresponding to the selected connection point as occupied to avoid repeated selection in the future;
[0147] Error handling: If a cable component does not have an available connection point, log the error message.
[0148] The implementation of the secondary allocation process for the location of a redundant independent disk array card includes the following steps:
[0149] Single-point RDM optimization (corresponding to level 5); filter out all unselected connection points with RDM locations and group them by location type; process each group; select a scoring strategy based on location type; score each connection point; find the connection point with the highest score; update the location occupancy status; remove processed connection points from the original list (or mark them as selected so that subsequent processing will skip them); check if any cable materials have not been assigned to connection points.
[0150] The method provided in this embodiment enables the selection of an optimal second circuit board connection point for unassigned cable materials.
[0151] In the above matching process, after each level of matching is completed, the target material in the order may have a unique connection method, meaning that subsequent levels of matching are unnecessary. To avoid invalid matching operations, in some embodiments, after selecting target connection relationships from candidate connection relationships where the component information at both ends of the cable meets preset requirements, and before determining the final connection relationship of the target cable based on the target connection relationships, the following steps are also included:
[0152] Construct a mapping table to represent the frequency of port usage, and traverse the list of connection relationships;
[0153] Obtain the port corresponding to the component location information at both ends of the cable in the connection relationship, and obtain the number of times the port is used;
[0154] From the port usage frequency mapping table, the ports with a usage frequency of 1 are screened out, and the target connection relationship corresponding to the port usage frequency of 1 is taken as the final connection relationship of the target cable.
[0155] When the port usage frequency is greater than 1, the corresponding target connection relationship is obtained, and the step of determining the final connection relationship of the target cable based on the target connection relationship is entered.
[0156] The port usage frequency-based matching of the present embodiment is referred to as a unique port / interface matching process, i.e., the seventh-level matching. It is worth noting that the unique port / interface matching process provided by the present application can be performed after each level of matching is completed. The unique port / interface matching includes the following processes:
[0157] Input: connection data set after previous level processing (unselected connections), port usage statistics. The processing process includes the following:
[0158] 1. Port usage analysis: construct a port usage frequency matrix; 2. Identify "unique ports" that are used only once; 3. Preferentially select connections containing unique ports and not occupied, and assign after conflict detection; 4. Use recursive detection mechanism: recalculate port usage, repeat steps 2 and 3.
[0159] In the method provided by the present embodiment, the position occurrence frequency is counted, and unique positions (occurring once) are screened out to assign unique position connections. Through this step, the deterministic connection requirement is solved, and the data amount for subsequent processing is reduced.
[0160] After screening at each level, each cable material may have multiple target connection records. In order to further determine the final connection relationship of the process cable, in some embodiments, after determining the final connection relationship of the target cable based on the target connection relationship, the following is further included:
[0161] In the case where it is detected that the target cable has unassigned candidate connection relationships, the unassigned candidate connection relationships are grouped according to the version number of the rule table and the configuration description in the rule table;
[0162] The unassigned candidate connection relationships are sorted according to the priority number in the rule table;
[0163] The connection relationships in each group are traversed in order, and the connection relationships are assigned to the target cable, and the number of assigned target cables and the total number of connection relationships are updated;
[0164] In the assignment process, if it is detected that the number of assigned target cables is equal to the total number of connection relationships, the assignment of connection relationships to the target cable is stopped;
[0165] After the distribution is completed, the distribution of the target cable is acquired, and if it is detected that the distributed quantity is less than the first preset quantity or greater than the second preset quantity, prompt information for representing a distribution error of the target cable is output.
[0166] The method provided in the embodiment is referred to as a process of determining a final connection mode according to priority ranking, and is also referred to as an eighth-level matching process. The priority ranking is the last step of the entire cable screening process, and is used for ranking and selecting multiple candidate connection records of the same cable material.
[0167] Input: 1. A list of candidate connection records: after the first seven layers of screening, each cable material may have multiple candidate connection records (ConnectionData objects). 2. Cable material information; 3. Priority rules: priority sequence numbers (PrioritySN) and group marks (GroupMark) from the process rules.
[0168] The process can be implemented by modules, such as a grouping module, a sorting module, a distribution module, and a verification module. The grouping module is used for multi-level grouping according to rule versions and group marks; the sorting module is used for sorting in ascending order according to priority sequence numbers (PrioritySN) within each group mark; the distribution module is used for distributing connection records according to the sorted order, and updating the distribution state of the cable material; and the verification module is used for checking whether each cable material is distributed with a correct number of connections.
[0169] The data processing mode includes the following processes: using stream processing (Stream) to group and sort the connection records; using a mapping (Map) structure to maintain the grouping relationship; and using a custom comparator (Comparator) to sort the connection records within a group.
[0170] The interaction logic is as follows: 1. The remaining connection records are grouped in two levels according to rule versions (ruleRevString) and group marks (groupMark). 2. The connection records within each group are sorted in ascending order according to priority sequence numbers (prioritySN) (a smaller numerical value has a higher priority). 3. The connection records within each group are traversed in order, and connection records are distributed to each cable material, while updating the number of materials that have been distributed (X) and the number of materials that need to be distributed (Y). X is the number of materials in the order, and Y is the total number of connection schemes. 4. During the distribution process, if a cable material has been fully distributed (X=Y), no further distribution is performed. 5. After the distribution is completed, the distribution of each cable material is checked, and if there is an under-distribution or over-distribution, error information is recorded.
[0171] Technical implementation principle:
[0172] 1. Multi-level grouping: Two-level grouping is implemented by using the groupingBy collector of Java Stream. Multi-level grouping is performed using Collectors.groupingBy of Java Stream API, forming a nested Map structure.
[0173] 2. In-group sorting: Using Collections.sort or Stream.sorted() with custom Comparator. The list of connection records under each group marker is sorted in ascending order according to the priority sequence number (PrioritySN).
[0174] 3. Allocation strategy: Sequentially traversing the sorted connection records, and trying to allocate each to the corresponding cable material.
[0175] The specific steps are as follows:
[0176] Step 1: Grouping. Grouping by rule version first, and then grouping by group marker;
[0177] Step 2: In-group sorting. For example, sorting according to priority sequence number (ascending order);
[0178] Step 3: Allocation. Initialize a map to record the number of each cable material that has been allocated; traverse the connection records in the grouping order; if the cable material still needs to be allocated, add the connection record to the connection list of the cable material, update the allocated number and mark the connection as selected;
[0179] Step 4: Verification. Traverse the cable material list, compare the allocated number of each material with the required number, if they are not equal, record the error information, and finally output an exception if there is an error.
[0180] Interaction logic explanation: The grouping and sorting stages process data independently and do not involve allocation; the allocation stage allocates in the order of grouping and sorting to ensure that high priority is allocated first; only cable materials that have not met the quantity are allocated during allocation; finally, verification ensures that each cable material is satisfied.
[0181] In the method provided in this embodiment, each instance (according to the quantity) of each cable material is allocated a connection record; that is, the final selected connection relationship of the cable is determined; if a connection record cannot be allocated for a cable material, an error message is generated and output, so that the user can intuitively understand the determination result of the cable connection relationship in the order.
[0182] In order to make the method provided by the present application applicable to various production orders, Figure 3 A schematic diagram of a server production order cable component progressive hierarchical processing method provided by an embodiment of the present application is provided, which comprises:
[0183] Level 1: basic matching; Level 2: Redundant Array of Independent Disks card matching; Level 3: combination matching; Level 4: unique port / interface matching; Level 5: Redundant Array of Independent Disks card keyword matching; Level 6: Peripheral Component Interconnect Express interface slot matching; Level 7: Redundant Array of Independent Disks card position secondary matching; Level 8: priority sorting.
[0184] Specifically, the first level solves the verification of cable double-end board card materials through a PN number matching series of steps, achieves preliminary checking of rules, and performs matching checking of basic data. The second level preliminarily identifies special Redundant Array of Independent Disks card wiring rules through A and B board card position screening and filtering processing, guarantees the wiring priority of components, and marks and identifies effective rules. The third level performs combination matching, realizes accurate cable matching through dynamic combination generation and conflict detection, and solves the identification and matching of complex cable topologies. The fourth level realizes connection position allocation through frequency, port identification, and conflict detection steps, and reduces subsequent processing amount. The fifth level identifies keywords in the cable matrix table and completes the recording of Redundant Array of Independent Disks card related cable positions. The sixth level ensures that the remaining PCIE position cables are reasonably allocated through the construction of a PCIE position pool and a sequential allocation algorithm. The seventh level realizes the optimal selection of a single cable through position grouping and position priority. The eighth level forms a nested Map structure through Java Stream API Collectors.groupingBy multi-level grouping, in-group sorting, and stream processing of connection records to realize the sorting of multiple candidate connection records of the same cable material and confirm the installation sequence.
[0185] The complex matching problem of the cable is decomposed into multiple continuous screening layers, each layer solves a specific problem, reduces the decision complexity, decouples the rules and the code, can be flexibly adjusted in special scenarios, and is suitable for cable solving of various product types. Through the processing of each level in the foregoing, it can realize the processing and operation of ten thousand materials, solve the problems of long loading time and low attribute reading efficiency when loading a large amount of product upstream and downstream data. Overall, it solves various allocation processing of the cable and realizes installation position matching.
[0186] Those skilled in the art can clearly understand from the description of the above embodiments that the method according to the above embodiments can be realized by means of software and necessary general hardware platforms, of course, it can also be realized by hardware, but in many cases the former is a better implementation.
[0187] The embodiment of the present application also provides a cable connection relationship determining device, comprising: a first obtaining module, used for obtaining the identification of a component to be connected by a cable and a target cable whose connection relationship is to be determined in a production order; a second obtaining module, used for obtaining the candidate connection relationship corresponding to the target cable and the component information at both ends of the cable in the candidate connection relationship from a rule table used for representing the cable connection relationship according to the identification of the target cable; a selecting module, used for selecting the target connection relationship whose component information at both ends of the cable meets preset requirements from the candidate connection relationship; wherein the preset requirements are determined based on the type of the component to be connected by the cable; and a determining module, used for determining the final connection relationship of the target cable based on the target connection relationship.
[0188] The features of the embodiment of the cable connection relationship determining device can be referred to the related description of the embodiment of the cable connection relationship determining method, which will not be repeated here.
[0189] The embodiment of the present application also provides an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned cable connection relationship determining method embodiments.
[0190] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the above-mentioned cable connection relationship determining method embodiments when running.
[0191] In an exemplary embodiment, the above-mentioned computer readable storage medium can include but is not limited to: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0192] The embodiment of the present application also provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned cable connection relationship determining method embodiments.
[0193] The embodiment of the present application also provides another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned cable connection relationship determining method embodiments.
[0194] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0195] The method for determining cable connection relationships provided by this invention has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only intended to help understand the method and core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of this invention.< / string> < / connectiondata>
Claims
1. A method of determining a cable connection relationship, characterized by, The method is applied to a computer device and comprises the following steps: Obtaining the identification of a component to be connected by a cable and a target cable to be determined for a connection relationship in a production order; Obtaining a candidate connection relationship corresponding to the target cable and obtaining component information at both ends of the cable in the candidate connection relationship from a rule table used to represent a cable connection relationship according to the identification of the target cable; Selecting a target connection relationship in which the component information at both ends of the cable meets a preset requirement from the candidate connection relationship; the preset requirement is determined based on the type of the component to be connected by the cable; Determining a final connection relationship of the target cable based on the target connection relationship; The type of the component to be connected by the cable is a first circuit board and a third circuit board; the step of selecting a target connection relationship in which the component information at both ends of the cable meets a preset requirement from the candidate connection relationship comprises the following steps: Selecting a target connection relationship in which the component information at both ends of the cable meets a second preset requirement from the candidate connection relationship; the second preset requirement is that, in the candidate connection relationship, the positions of the components at the same end of the cable in the same group are the same, and the component position information at both ends of the cable is all in the form of a peripheral component interconnect express interface; wherein the candidate connection relationship in the same group is determined based on configuration description information in the rule table; The step of determining a final connection relationship of the target cable based on the target connection relationship comprises the following steps: Obtaining a group corresponding to the minimum value of a common position from the target connection relationship, and taking the group corresponding to the minimum value of the common position as a selected group; Determining a final connection relationship of the target cable based on the target connection relationship in the selected group; The step of determining the same group comprises the following steps: Creating a list for storing combination rules; Obtaining the maximum number of peripheral component interconnect express interfaces supported by the first circuit board; Obtaining a first peripheral component interconnect express interface rule that is compatible with the first circuit board model and has a bandwidth greater than or equal to the minimum bandwidth of the first circuit board; Sorting the first peripheral component interconnect express interface rules in order of bandwidth, and selecting a preset number of the first peripheral component interconnect express interface rules according to the sorting result to obtain a compatible second peripheral component interconnect express interface rule list; Iterating through the second peripheral component interconnect express interface rules in the second peripheral component interconnect express interface rule list; Generating a new combination rule according to at least the position and number information related to the first circuit board and the peripheral component interconnect express interface, and recording the new combination rule in the list for storing combination rules; Before determining a target connection relationship of the target cable based on the candidate connection relationship in the selected group, the method further comprises the following steps: Grouping the new rules according to the position of the first circuit board to obtain multiple groups of new rules; Detecting whether the number of rules in at least one group of new rules exceeds a preset number of rules; If yes, sorting the rules in each group in order of bandwidth from high to low, and marking those rules that exceed the maximum number of rules in each group as invalid rules to ensure that there is no conflict in the number of rules; If not, the slot number corresponding to the rule in the group is extracted and sorted, the longest continuous slot sequence is found, the rules not in the longest continuous slot sequence are marked as invalid rules to ensure slot continuity; The number of rules corresponding to each third circuit board in the group is counted, and the third circuit board with the most rules is obtained; Rules not belonging to the third circuit board with the most rules are marked as invalid to ensure that there is no conflict in the third circuit board.
2. The method of claim 1, wherein Before selecting the component information at both ends of the cable in the candidate connection relationship to meet the target connection relationship that meets the preset requirement, it further includes: According to the component information at both ends of the cable in the candidate connection relationship, it is judged whether the components at both ends of the cable in the candidate connection relationship exist; If yes, go to the step of selecting the component information at both ends of the cable in the candidate connection relationship to meet the target connection relationship that meets the preset requirement; If not, the candidate connection relationship in which the components at both ends of the cable are missing is eliminated from the candidate connection relationship, and the step of selecting the component information at both ends of the cable in the candidate connection relationship to meet the target connection relationship that meets the preset requirement is entered.
3. The method of claim 2, wherein The type of the component to be connected by the cable is a first circuit board and a second circuit board; Selecting the component information at both ends of the cable in the candidate connection relationship to meet the target connection relationship that meets the preset requirement includes: Selecting the component information at both ends of the cable in the candidate connection relationship to meet the first preset requirement; wherein the first preset requirement is that in the candidate connection relationship, the component information at one end of the cable is information for representing the first circuit board, and the component information at the other end of the cable is information for representing the second circuit board.
4. The method of claim 3, wherein Selecting the component information at both ends of the cable in the candidate connection relationship to meet the target connection relationship that meets the preset requirement includes: Selecting the component information at both ends of the cable in the candidate connection relationship to meet the third preset requirement; wherein the third preset requirement is that in the candidate connection relationship, the component information at one end of the cable is information for representing the second circuit board, or the component information at the other end of the cable is information for representing the second circuit board; The final connection relationship of the target cable based on the target connection relationship includes: Extracting the position number of the second circuit board from the target connection relationship, and obtaining the target connection relationship corresponding to the minimum position number of the second circuit board; Determining the final connection relationship of the target cable based on the target connection relationship corresponding to the minimum position number of the second circuit board.
5. The method of claim 1, wherein The final connection relationship of the target cable based on the target connection relationship in the selected group includes: From the target connection relationship in the selected group, the component position information at both ends of the cable is extracted as the position information starting with the peripheral component interconnect express interface, and stored in a set in descending order to obtain a peripheral component interconnect express interface position pool; Traverse the positions in the peripheral component interconnect express interface position pool in ascending order; In a case where it is detected that the peripheral component interconnect express interface position is not assigned, in the target connection relationship in the selected group, a target connection relationship containing the unassigned peripheral component interconnect express interface position and not selected is searched, and the state of the searched target connection relationship is marked as a selected state; The final connection relationship of the target cable is determined based on the target connection relationship in the selected state.
6. The method of claim 4, wherein The method further comprises: From the target connection relationships satisfying the third preset requirement, a target connection relationship corresponding to the smallest position number of the second circuit board is obtained, and the remaining target connection relationships are obtained; The connection points of the second circuit board type in the remaining target connection relationships are grouped according to the positions of the connection points; The connection points in each position group are scored, and a connection point with a score greater than a preset value is selected as a selected connection point; The selected connection point is marked as selected, and the position state corresponding to the selected connection point is marked as occupied.
7. The method of claim 3 to 6, wherein After selecting the target connection relationship in which the component information at both ends of the cable satisfies the preset requirement from the candidate connection relationship, and before determining the final connection relationship of the target cable based on the target connection relationship, the method further comprises: A mapping table for representing port usage frequency is constructed, and a connection relationship list is traversed; The ports corresponding to the component position information at both ends of the cable in the connection relationship are obtained, and the usage times of the ports are obtained; From the port usage frequency mapping table, a port with a usage time of 1 is filtered out, and a target connection relationship corresponding to the port with a usage time of 1 is taken as the final connection relationship of the target cable; When the usage time of a port is greater than 1, the corresponding target connection relationship is obtained, and the step of determining the final connection relationship of the target cable based on the target connection relationship is entered.
8. The method of claim 1 to 6, wherein After determining the final connection relationship of the target cable based on the target connection relationship, the method further comprises: In a case where it is detected that the target cable has unassigned candidate connection relationships, the unassigned candidate connection relationships are grouped according to the version number of the rule table and the configuration description in the rule table; The unassigned candidate connection relationships are sorted according to the priority order in the rule table; The connection relationships in each group are traversed in order, and the target cable is assigned a connection relationship, and the number of assigned target cables and the total number of connection relationships are updated; During the assignment process, if it is detected that the number of assigned target cables is equal to the total number of connection relationships, the assignment of the target cable is stopped; After the assignment is completed, the assignment situation of the target cable is obtained, and if it is detected that the number of assignments is less than a first preset number or greater than a second preset number, prompt information representing that the target cable assignment is incorrect is output.
Citation Information
Patent Citations
Method and device for generating connection component installation configuration information, and storage medium
CN118377543A