A part number generation method, device, equipment and medium

By standardizing the component attribute information and performing bidirectional rule tree matching and verification, accurate drawing numbers are generated, solving the problem of inconsistent drawing numbers caused by different data sources and achieving accuracy and reliability in component drawing number generation.

CN123115498APending Publication Date: 2026-11-17SHANGHAI GUOJING MASCH EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611296949.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-25
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing methods for generating part numbers are difficult to unify attribute information from different data sources, resulting in low accuracy of the generated part numbers. Furthermore, it is difficult to verify whether the information represented by the generated part number is consistent with the input attribute information, and the accuracy of the correspondence between parts and part numbers cannot be guaranteed.

Method used

By acquiring and standardizing the target component's attribute information to be coded, a material identifier is generated and material deduplication is performed. Candidate drawing numbers are generated using preset coding rules, and attribute information is matched level by level through a bidirectional rule tree to verify path consistency, attribute consistency, and drawing number uniqueness, ensuring the accuracy of the generated drawing numbers.

Benefits of technology

It improves the accuracy and reliability of drawing number generation, reduces the probability of multiple numbers for one item and multiple items for one number, and enhances the reliability of the correspondence between parts and drawing numbers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115498A_ABST
    Figure CN123115498A_ABST
Patent Text Reader

Abstract

The application relates to a part number generation method, device, equipment and medium, which comprises the following steps: generating material identification of a target part according to target attribute information; performing material duplication checking in historical material data according to the material identification; encoding the target attribute information according to a preset encoding rule to obtain a candidate part number and encoding path information; determining a field mapping relationship between an encoding field in the candidate part number and an analysis attribute according to an analysis rule associated with the preset encoding rule; analyzing the candidate part number according to the field mapping relationship to obtain analysis attribute information and analysis path information; when path consistency checking, attribute consistency checking and part number uniqueness checking are all passed, an association relationship between the candidate part number and the material identification is established, and the candidate part number is determined as the part number of the target part.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, device and medium for generating part number. Background Technology

[0002] In product design, production, and maintenance, drawing numbers are typically used to identify components and establish a correspondence between components and their attribute information, design documents, and production data. However, as product structures become more complex and the number of components increases, manually querying historical data and creating drawing numbers becomes insufficient for component management needs. Therefore, technologies that automatically generate drawing numbers based on component attribute information have emerged.

[0003] Existing methods for generating part drawing numbers typically acquire attribute information such as the part's category, specifications, and parameters, convert this attribute information into corresponding coded fields according to preset coding rules, and combine multiple coded fields to form a drawing number. During the drawing number generation process, historical material data or historical drawing number data can also be queried to determine whether a part or drawing number is duplicated.

[0004] However, component attribute information from different data sources may differ in name, format, or value retrieval method, leading to the same attribute information matching different coding fields, or different attribute information matching the same coding field. Existing methods typically focus on generating drawing numbers based on input attribute information, making it difficult to verify whether the information represented by the generated drawing number matches the input attribute information, and also making it difficult to guarantee the accuracy of the correspondence between components and drawing numbers. Therefore, existing component drawing number generation methods still need improvement. Summary of the Invention

[0005] To address the issue of low accuracy in generating part numbers in existing technologies, this application provides a method, apparatus, device, and medium for generating part numbers.

[0006] The above-mentioned objective of this application is achieved through the following technical solution:

[0007] A method for generating part number, the method comprising:

[0008] Obtain the attribute information to be encoded for the target component, and perform normalization processing on the attribute information to be encoded to obtain the target attribute information;

[0009] A material identifier for the target component is generated based on the target attribute information, and material deduplication is performed in historical material data based on the material identifier.

[0010] If no historical material data matching the material identifier is found, the target attribute information is encoded according to a preset encoding rule to obtain candidate drawing number and encoding path information;

[0011] Based on the parsing rules associated with the preset encoding rules, the field mapping relationship between the encoded fields and parsing attributes in the candidate drawing number is determined, and the candidate drawing number is parsed according to the field mapping relationship to obtain parsing attribute information and parsing path information;

[0012] The path consistency of the encoded path information and the parsed path information is checked, the attribute consistency of the target attribute information and the parsed attribute information is checked, and the uniqueness of the candidate map number is checked based on historical map number data.

[0013] When the path consistency check, the attribute consistency check, and the drawing number uniqueness check all pass, the association between the candidate drawing number and the material identifier is established, and the candidate drawing number is determined as the drawing number of the target component.

[0014] By adopting the above technical solutions, it is possible to unify the attribute names, formats and values ​​of parts from different sources, identify duplicate materials in advance using material identification, and form a two-way verification through coding and reverse parsing. Combined with path consistency, attribute consistency and drawing number uniqueness verification, the probability of one item having multiple numbers and one number having multiple items is reduced, and the accuracy of drawing number generation and the reliability of the correspondence between drawing numbers and parts are improved.

[0015] Preferably, the step of normalizing the attribute information to be encoded to obtain the target attribute information includes:

[0016] The component category of the target component is determined from the attribute information to be encoded;

[0017] Determine the attribute mapping relationship and attribute value conversion rules based on the component categories;

[0018] The attribute names in the attribute information to be encoded are converted using the attribute mapping relationship, and the attribute values ​​in the attribute information to be encoded are converted using the attribute value conversion rule to obtain the target attribute information.

[0019] By adopting the above technical solution, it is possible to match the corresponding attribute mapping relationship and attribute value conversion rules according to the component category, unify the attribute names, units, precision and character expressions in different data sources, reduce the interference of name differences and value format differences on subsequent material deduplication and drawing number encoding, and improve the standardization and consistency of target attribute information.

[0020] Preferably, the step of generating a material identifier for the target component based on the target attribute information, and performing material deduplication in historical material data based on the material identifier, includes:

[0021] Based on preset identity attribute rules, category attributes and distinguishing attributes are determined from the target attribute information;

[0022] The category attributes are encoded to obtain a category identifier segment, and the distinguishing attributes are encoded according to a preset attribute order to obtain a feature identifier segment;

[0023] The material identifier is obtained by combining the category identifier segment and the feature identifier segment;

[0024] Filter out candidate historical material identifiers whose category identifier segment is the same as the category identifier segment from the historical material data;

[0025] Historical feature identifier segments are extracted from the candidate historical material identifiers, the feature identifier segments are matched with the historical feature identifier segments, and the matching results are used to determine whether historical material data matching the material identifier is found.

[0026] By adopting the above technical solution, material identifiers that represent the identity of parts can be generated using category attributes and distinguishing attributes. First, the scope of duplicate checking of historical material data is narrowed down based on the category identifier segment, and then attribute-level matching is performed through the feature identifier segment. This reduces the need for item-by-item comparison of all data, improves the efficiency and accuracy of material duplicate checking, and reduces the probability of the same parts being assigned duplicate drawing numbers.

[0027] Preferably, the step of encoding the target attribute information according to a preset encoding rule to obtain the candidate image number and encoding path information includes:

[0028] A bidirectional rule tree shared by the preset encoding rules and the parsing rules is determined. The bidirectional rule tree consists of multiple rule nodes with hierarchical relationships. Each rule node records a node identifier, an attribute name and an attribute matching relationship between the attribute matching conditions, and an encoding relationship between the attribute matching conditions and the encoding field.

[0029] Based on the attribute matching relationship recorded by the first-level rule node, the target attribute value corresponding to the attribute name is extracted from the target attribute information, and the target attribute value is matched with the attribute matching condition to determine the first-level positive matching rule node;

[0030] The subordinate rule nodes of the first-level positive matching rule node are determined according to the hierarchical relationship in the bidirectional rule tree. According to the attribute matching relationship recorded by the subordinate rule node, the target attribute value corresponding to the attribute name is extracted from the target attribute information, and the target attribute value is matched with the attribute matching condition to determine the subordinate positive matching rule node, until the determined positive matching rule node has no subordinate rule node.

[0031] Arrange the node identifiers of the forward matching rule nodes at each level in hierarchical order to obtain the forward node sequence, and determine the forward node sequence as the encoded path information;

[0032] The coding fields are determined based on the coding relationships recorded in the positive matching rule nodes at each level, and the coding fields are combined according to the hierarchical order to obtain the figure number prefix;

[0033] The order field is determined based on the historical map number data that matches the map number prefix. The candidate map number is obtained by combining the map number prefix and the order field.

[0034] By adopting the above technical solution, component attributes can be matched level by level according to a bidirectional rule tree, and the coding path formed by rule nodes at each level can be recorded simultaneously, making the determination process of coding fields traceable. By generating drawing number prefixes by combining coding fields hierarchically and determining the sequence field by combining historical drawing numbers, the standardization and accuracy of candidate drawing number generation are improved, and the probability of incorrect coding branch selection and drawing number duplication is reduced.

[0035] Preferably, the step of determining the field mapping relationship between the encoded fields and parsing attributes in the candidate image number according to the parsing rules associated with the preset encoding rules, and parsing the candidate image number according to the field mapping relationship to obtain parsing attribute information and parsing path information includes:

[0036] The field mapping relationship between the encoded fields and parsed attribute values ​​of each rule node is determined according to the parsing rules.

[0037] The sequence field is separated from the candidate image number to obtain the character sequence to be parsed;

[0038] The first character of the character sequence to be parsed is matched with the encoding field indicated by the encoding relationship of the first-level rule node to determine the first-level reverse matching rule node, and the encoding field of the first-level reverse matching rule node is removed from the character sequence to be parsed.

[0039] Based on the hierarchical relationship in the bidirectional rule tree, the lower-level rule nodes of the first-level reverse matching rule node are determined. The first character of the character sequence to be parsed is matched with the encoding field indicated by the encoding relationship of the lower-level rule node to determine the lower-level reverse matching rule node. The encoding field of the lower-level reverse matching rule node is removed from the character sequence to be parsed until the character sequence to be parsed is empty.

[0040] Arrange the node identifiers of the reverse matching rule nodes at each level in hierarchical order to obtain the reverse node sequence, and determine the reverse node sequence as the parsing path information;

[0041] Based on the field mapping relationship, the parsed attribute values ​​corresponding to the encoded fields of the reverse matching rule nodes at each level are determined. Based on the attribute matching relationship of the reverse matching rule nodes at each level, the attribute names are determined. The attribute names and the parsed attribute values ​​are combined to obtain the parsed attribute information.

[0042] By adopting the above technical solution, the coded fields in the candidate drawing number can be split level by level according to the bidirectional rule tree, and the attribute name and parsed attribute value can be restored according to the field mapping relationship. At the same time, the rule nodes passed through the reverse matching are recorded to form parsing path information, so that the attribute content and rule path carried by the candidate drawing number can be reversed and restored, providing an accurate data foundation for subsequent path consistency verification and attribute consistency verification.

[0043] Preferably, the step of performing path consistency verification on the encoded path information and the parsed path information, performing attribute consistency verification on the target attribute information and the parsed attribute information, and performing map number uniqueness verification on the candidate map number based on historical map number data includes:

[0044] The path consistency check is determined to be passed when the sequence lengths of the forward node sequence and the reverse node sequence are the same and the node identifiers at each sequence position are the same.

[0045] The attribute name is determined based on the attribute matching relationship of the reverse matching rule nodes at each level, and the target attribute value and the parsed attribute value are extracted from the target attribute information and the parsed attribute information respectively based on the attribute name;

[0046] Match the target attribute values ​​with the same attribute name with the parsed attribute values. When all the target attribute values ​​match all the parsed attribute values, the attribute consistency check is considered to have passed.

[0047] When both the path consistency check and the attribute consistency check pass, candidate historical map numbers with the same map number prefix are selected from the historical map number data;

[0048] The historical sequence field is extracted from the candidate historical drawing number, and the sequence field is matched with the historical sequence field. If there is no historical sequence field that is the same as the sequence field, the uniqueness verification of the drawing number is determined to be successful.

[0049] By adopting the above technical solution, candidate map numbers can be verified from three levels: rule path, attribute content, and historical map number. The node deviation and attribute deviation between forward encoding and reverse parsing can be identified. Candidate historical map numbers can be filtered by map number prefix, reducing the scope of full map number comparison, improving the efficiency of map number uniqueness verification, and reducing the probability of erroneous map numbers and duplicate map numbers entering the binding process.

[0050] Preferably, when the path consistency check, the attribute consistency check, and the drawing number uniqueness check all pass, establishing the association between the candidate drawing number and the material identifier, and determining the candidate drawing number as the drawing number of the target component, includes:

[0051] The historical binding data is queried using the candidate drawing number and the material identifier as query conditions to obtain the drawing number binding query results and the material binding query results.

[0052] When the drawing number binding query result indicates that there is no binding record for the candidate drawing number and the material binding query result indicates that there is no binding record for the material identifier, a first mapping relationship from the candidate drawing number to the material identifier and a second mapping relationship from the material identifier to the candidate drawing number are established.

[0053] Atomic writes are performed on the first mapping relationship and the second mapping relationship, and the candidate image number is set to a valid state;

[0054] The candidate drawing number that is in the effective state is determined as the drawing number of the target component.

[0055] By adopting the above technical solution, a two-way mapping can be established even when neither the drawing number nor the material is bound. Atomic writing ensures that the two mappings take effect simultaneously, avoiding one-way binding, duplicate binding, or incorrect correspondence caused by concurrent operations. Only candidate drawing numbers that have completed two-way binding are set to a valid state, improving the completeness, accuracy, and reliability of the correspondence between parts and drawing numbers.

[0056] The second objective of this invention is achieved through the following technical solution:

[0057] A component drawing number generation device, the component drawing number generation device comprising:

[0058] The attribute normalization module is used to obtain the attribute information to be encoded of the target component, and to normalize the attribute information to be encoded to obtain the target attribute information.

[0059] The material deduplication module is used to generate a material identifier for the target component based on the target attribute information, and to perform material deduplication in historical material data based on the material identifier.

[0060] The drawing number encoding module is used to encode the target attribute information according to a preset encoding rule when no historical material data matching the material identifier is found, so as to obtain candidate drawing numbers and encoding path information.

[0061] The drawing number parsing module is used to determine the field mapping relationship between the encoded fields and parsing attributes in the candidate drawing number according to the parsing rules associated with the preset encoding rules, and to parse the candidate drawing number according to the field mapping relationship to obtain parsing attribute information and parsing path information;

[0062] The map number verification module is used to verify the consistency between the encoded path information and the parsed path information, to verify the consistency between the target attribute information and the parsed attribute information, and to verify the uniqueness of the candidate map number based on historical map number data.

[0063] The drawing number association module is used to establish an association between the candidate drawing number and the material identifier when the path consistency check, the attribute consistency check, and the drawing number uniqueness check all pass, and to determine the candidate drawing number as the drawing number of the target component.

[0064] By adopting the above technical solutions, each functional module can sequentially complete attribute standardization, material deduplication, drawing number encoding, reverse parsing, multiple verification, and drawing number association, realizing modular collaboration in the part drawing number generation process, reducing drawing number errors caused by differences in attribute expression, duplicate materials, and coding deviations, reducing the probability of multiple numbers for one item and multiple items for one number, and improving the accuracy of drawing number generation and the reliability of drawing number management.

[0065] The above-mentioned objective three of this application is achieved through the following technical solution:

[0066] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method for generating part number drawing numbers.

[0067] The fourth objective of this application is achieved through the following technical solution:

[0068] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method for generating part number drawing numbers.

[0069] In summary, this application includes at least one of the following beneficial technical effects:

[0070] 1. It can unify the attribute names, formats and values ​​of parts from different sources, identify duplicate materials in advance using material identification, and form a two-way verification through coding and reverse parsing. Combined with path consistency, attribute consistency and drawing number uniqueness verification, it reduces the probability of one item having multiple numbers and one number having multiple items, improves the accuracy of drawing number generation and the reliability of the correspondence between drawing numbers and parts. Attached Figure Description

[0071] Figure 1 This is a flowchart of a method for generating part number in one embodiment of this application.

[0072] Figure 2 This is a schematic diagram of a component drawing number generation device according to an embodiment of this application. Detailed Implementation

[0073] The present application will be further described in detail below with reference to the accompanying drawings.

[0074] In one embodiment, such as Figure 1 As shown, this application discloses a method for generating component drawing numbers, which specifically includes the following steps:

[0075] S10: Obtain the attribute information to be encoded for the target component, perform normalization processing on the attribute information to be encoded, and obtain the target attribute information.

[0076] In this embodiment, the target component refers to the component to be assigned a drawing number, the attribute information to be encoded refers to the data set consisting of multiple original attribute items of the target component, the normalization process refers to the conversion of the original attribute names and original attribute values ​​according to the component category, and the target attribute information refers to the standard attribute item set formed after the normalization process.

[0077] Specifically, the attribute information to be encoded is split into multiple raw attribute items, each consisting of a raw attribute name and a raw attribute value. Category attribute items are identified from these raw attribute items, and the component category is determined based on the raw attribute values ​​of the category attribute items. The attribute mapping relationship and attribute value conversion rules matching the component category are then retrieved.

[0078] For each original attribute item, the original attribute name is converted into a standard attribute name using attribute mapping relationships, and the corresponding conversion rule is determined from the attribute value conversion rules based on the standard attribute name. For numeric original attribute values, the numerical part and the unit part are separated, and the numerical part is converted to the standard unit and numerical precision specified by the conversion rules to obtain the standard attribute value. For character original attribute values, character format conversion, space deletion, and synonym mapping are performed sequentially according to the conversion rules to obtain the standard attribute value.

[0079] The standard attribute names and their corresponding values ​​are arranged in a preset attribute order to form multiple standard attribute items, and these multiple standard attribute items are combined to form the target attribute information.

[0080] S20: Generate the material identifier of the target component based on the target attribute information, and perform material deduplication in the historical material data based on the material identifier.

[0081] In this embodiment, material identification refers to structured identification data generated based on component attributes, historical material data refers to stored component attribute information and material identification, and material deduplication refers to matching the generated material identification with historical material identification in the historical material data.

[0082] Specifically, preset identity attribute rules are determined based on the component categories in the target attribute information. The preset identity attribute rules record category attributes, distinguishing attributes, preset attribute order, and attribute coding relationships.

[0083] Based on the category attributes, extract category attribute values ​​from the target attribute information and encode these values ​​using attribute coding relationships to obtain category identifier segments. Then, sequentially extract the distinguishing attribute values ​​from the target attribute information according to a preset attribute order and encode each distinguishing attribute value using attribute coding relationships to obtain feature identifier segments. Finally, combine these feature identifier segments in order of category identifier segments first, followed by feature identifier segments, to obtain the material identifier.

[0084] Historical material identifiers are extracted from historical material data, and candidate historical material identifiers are selected whose category identifier segment matches that of the material identifier. Historical feature identifier segments are extracted from the candidate historical material identifiers, and then matched segment by segment between the feature identifier segments of the material identifier and the historical feature identifier segments according to a preset attribute order. If all matching results are the same, historical material data matching the material identifier is determined to have been found; if at least one matching result is different, historical material data matching the material identifier is determined not to have been found.

[0085] S30: When no historical material data matching the material identifier is found, the target attribute information is encoded according to the preset coding rules to obtain the candidate drawing number and coding path information.

[0086] In this embodiment, the preset encoding rule refers to the conversion rule between attribute information and encoding field, the candidate drawing number refers to the drawing number generated according to the preset encoding rule and which has not yet passed the verification, and the encoding path information refers to the node sequence formed by the rule nodes matched sequentially during the encoding process.

[0087] Specifically, a bidirectional rule tree is determined based on the component categories in the target attribute information. The bidirectional rule tree consists of multiple rule nodes with hierarchical relationships, and each rule node records the node identifier, attribute matching relationship, and encoding relationship.

[0088] Starting from the first rule node of the bidirectional rule tree, the attribute name and attribute matching condition are determined according to the attribute matching relationship. The target attribute value corresponding to the attribute name is extracted from the target attribute information, and the target attribute value is matched with the attribute matching condition to determine the forward matching rule node.

[0089] Based on the hierarchical relationship of the bidirectional rule tree, the child rule nodes of the positive matching rule nodes are determined. The process of determining attribute names, extracting target attribute values, and matching attribute matching conditions is repeated for each child rule node until the determined positive matching rule node has no child rule nodes. The node identifiers of each level of positive matching rule node are arranged in hierarchical order to obtain the encoded path information.

[0090] The coding fields are determined based on the coding relationships recorded in the positive matching rule nodes at each level. These coding fields are then combined in hierarchical order to obtain the map number prefix. Historical map numbers matching the prefix are selected from the historical map number data. The historical sequence field is extracted from each historical map number, converted into a sequential value, and the maximum sequential value is added to a preset increment to obtain the target sequential value. The target sequential value is then formatted according to a preset field length to obtain the sequence field. Finally, the map number prefix and sequence field are combined to obtain the candidate map number.

[0091] Furthermore, when historical material data matching the material identifier is found, the historical drawing number associated with the material identifier is obtained from the matching historical material data, and the historical drawing number is determined as the drawing number of the target component.

[0092] S40: Based on the parsing rules associated with the preset encoding rules, determine the field mapping relationship between the encoding fields and parsing attributes in the candidate drawing number, and parse the candidate drawing number according to the field mapping relationship to obtain parsing attribute information and parsing path information.

[0093] In this embodiment, parsing rules refer to the conversion rules between encoded fields and parsed attributes, parsed attributes refer to the attribute name and attribute value determined by the encoded fields, field mapping relationship refers to the correspondence between encoded fields and parsed attributes, parsed attribute information refers to the attribute set formed by multiple parsed attributes obtained through parsing, and parsing path information refers to the node sequence formed by the rule nodes matched sequentially during the parsing process.

[0094] Specifically, based on the parsing rules, the parsing attributes corresponding to the encoded fields of each rule node in the bidirectional rule tree are determined, forming a field mapping relationship. The sequence field is separated from the end of the candidate image number to obtain the character sequence to be parsed.

[0095] Starting from the first-level rule node of the bidirectional rule tree, the encoded field of each first-level rule node is compared bit by bit with the first character of the character sequence to be parsed to obtain the matching length of each first-level rule node. First-level rule nodes whose matching length equals the encoded field length are selected. If multiple first-level rule nodes satisfy the selection criteria, the first-level rule node with the largest encoded field length is determined as the first-level reverse matching rule node, and its encoded field is removed from the beginning of the character sequence to be parsed.

[0096] Based on the hierarchical relationship of the bidirectional rule tree, the lower-level rule nodes of the first-level reverse matching rule node are determined. The encoding field of each lower-level rule node is compared bit by bit with the first character of the character sequence to be parsed to determine the lower-level reverse matching rule node. The encoding field of the lower-level reverse matching rule node is removed from the first character of the character sequence to be parsed until the character sequence to be parsed is empty.

[0097] The node identifiers of each level of reverse matching rule node are arranged in hierarchical order to obtain the parsing path information. The parsing attributes corresponding to the encoded fields of each level of reverse matching rule node are determined according to the field mapping relationship, and the parsing attributes are arranged in hierarchical order to obtain the parsing attribute information.

[0098] S50: Perform path consistency verification between encoded path information and parsed path information, perform attribute consistency verification between target attribute information and parsed attribute information, and perform map number uniqueness verification on candidate map numbers based on historical map number data.

[0099] In this embodiment, path consistency verification refers to comparing the node sequence matched during the encoding process with the node sequence matched during the parsing process; attribute consistency verification refers to comparing the attribute information before encoding with the attribute information obtained from parsing; historical map number data refers to the data set formed by the allocated map numbers; and map number uniqueness verification refers to matching the candidate map number with the historical map number in the historical map number data.

[0100] Specifically, the number of node identifiers in the encoded path information and the parsed path information are counted separately. When the number of node identifiers in the two paths is the same, the node identifiers in the encoded path information and the parsed path information are compared bit by bit in hierarchical order. When the node identifiers at all levels are the same, the path consistency check is determined to be passed. When the number of node identifiers is different or the node identifiers at at least one level are different, the path consistency check is determined to be failed.

[0101] When the path consistency check passes, the attribute names and values ​​are extracted sequentially from the parsed attribute information according to the hierarchical order in the parsed path information. Then, the target attribute values ​​are extracted from the target attribute information based on the attribute names. Parsed attribute values ​​with the same attribute names are compared item by item with the target attribute values. If all parsed attribute values ​​match all target attribute values, the attribute consistency check passes. If at least one parsed attribute value differs from the target attribute value, the attribute consistency check fails.

[0102] If both path consistency and attribute consistency checks pass, the map number prefix and sequence field are separated from the candidate map numbers, and candidate historical map numbers with the same prefix are selected from the historical map number data. The historical sequence field is extracted from the candidate historical map numbers, and the sequence field is matched one by one with the historical sequence fields. If no historical sequence field with the same sequence field exists, the map number uniqueness check is considered passed; otherwise, the map number uniqueness check is considered failed.

[0103] S60: When the path consistency check, attribute consistency check, and drawing number uniqueness check all pass, establish the association between the candidate drawing number and the material identifier, and determine the candidate drawing number as the drawing number of the target component.

[0104] In this embodiment, the association relationship refers to the two-way binding record between the candidate drawing number and the material identifier, and the drawing number refers to the candidate drawing number that has been written into the target component record and is in a valid state.

[0105] Specifically, historical binding data is queried using candidate drawing numbers and material identifiers as query conditions to obtain drawing number binding query results and material binding query results, respectively. When the drawing number binding query result indicates that there is no binding record for the candidate drawing number, and the material binding query result indicates that there is no binding record for the material identifier, a first mapping relationship from the candidate drawing number to the material identifier is established, and a second mapping relationship from the material identifier to the candidate drawing number is established.

[0106] An atomic update instruction is constructed based on the first and second mapping relationships. When executing the atomic update instruction, the binding status of the candidate drawing number and material identifier is queried again. If both the candidate drawing number and material identifier are in an unbound state, the first and second mapping relationships are written in the same atomic update operation, and the candidate drawing number is set to a valid state. If either the candidate drawing number or the material identifier is in a bound state, the atomic update instruction is terminated.

[0107] After the atomic update instruction is executed, the candidate drawing number that is in a valid state is written into the drawing number field of the target component record, and the candidate drawing number in the drawing number field is determined as the drawing number of the target component.

[0108] In one embodiment, the normalization process is performed on the attribute information to be encoded to obtain the target attribute information, including:

[0109] S101: Determine the component category of the target component from the attribute information to be encoded.

[0110] In this embodiment, the component category refers to the category code divided according to the component attributes.

[0111] Specifically, a preset category determination table is obtained. The preset category determination table records multiple category records. Each category record consists of a category code, a set of necessary attribute names, a set of attribute value conditions, and a category priority.

[0112] Extract the original attribute names and original attribute values ​​from the attribute information to be encoded. For each category record, match the original attribute names with the necessary attribute names in the necessary attribute name set, count the number of successfully matched necessary attribute names to obtain the first match count, and match the original attribute values ​​corresponding to the successfully matched necessary attribute names with the attribute value conditions in the attribute value condition set, count the number of original attribute values ​​that satisfy the attribute value conditions to obtain the second match count.

[0113] The records of each category are arranged in descending order of the first match count. When multiple categories have the same first match count, they are arranged in descending order of the second match count. When multiple categories have the same first and second match counts, they are arranged in descending order of category priority.

[0114] The category record that appears first is identified as the target category record, and the category code in the target category record is identified as the component category of the target component.

[0115] S102: Determine the attribute mapping relationship and attribute value conversion rules based on the component category.

[0116] In this embodiment, the attribute mapping relationship refers to the correspondence between the original attribute name and the standard attribute name, and the attribute value conversion rule refers to the processing rule for converting the original attribute value into the standard attribute value.

[0117] Specifically, using component category as the search criterion, the system retrieves category configuration records that match the component category from a preset rule base. Each category configuration record consists of the original attribute name, standard attribute name, attribute value type, conversion operation, conversion parameters, and operation sequence number.

[0118] Extract the original attribute name and standard attribute name from each category of configuration record. Combine the original attribute name and standard attribute name of the same category of configuration record into attribute name pairs, and establish attribute mapping relationships based on each attribute name pair.

[0119] Configuration records for each category are grouped according to standard attribute names, and conversion operations within the same group are arranged by operation sequence number. A conversion operation sequence is generated based on the arranged conversion operations and their corresponding conversion parameters. This sequence is then associated with the corresponding attribute value type and standard attribute name to obtain the attribute value conversion rules.

[0120] S103: Use the attribute mapping relationship to transform the attribute names in the attribute information to be encoded, and use the attribute value transformation rules to transform the attribute values ​​in the attribute information to be encoded, so as to obtain the target attribute information.

[0121] Specifically, the attribute information to be encoded is split into multiple raw attribute items, and the raw attribute name and raw attribute value are extracted from each raw attribute item. The raw attribute names are matched with attribute name pairs in the attribute mapping relationship, and the standard attribute name in the matched attribute name pair is determined as the standard attribute name corresponding to the raw attribute name.

[0122] The corresponding attribute value conversion rule is determined based on the attribute value type of the standard attribute name and the original attribute value, and the conversion operations in the attribute value conversion rule are executed sequentially according to the operation sequence number.

[0123] When the original attribute value is numeric, the numeric and unit parts are separated from the original attribute value. Based on the conversion parameters, unit conversion, numeric offset, and precision processing are performed on the numeric part sequentially to obtain the standard attribute value. When the original attribute value is character, character format conversion, specified character deletion, and mapped character replacement are performed on the original attribute value sequentially based on the conversion parameters to obtain the standard attribute value.

[0124] Standard attribute items are formed by combining standard attribute names and their corresponding standard attribute values. The standard attribute items are then arranged according to the order of the attribute name pairs in the attribute mapping relationship to obtain the target attribute information.

[0125] In one embodiment, the process involves generating a material identifier for the target component based on the target attribute information, and then performing a material deduplication check in historical material data based on the material identifier, including:

[0126] S201: Determine the category attribute and distinguishing attribute from the target attribute information according to the preset identity attribute rules.

[0127] In this embodiment, the preset identity attribute rule refers to the rule used to determine the attribute type and the attribute selection order, the category attribute refers to the attribute that represents the category of the component, and the distinguishing attribute refers to the attribute that represents the difference between components under the same component category.

[0128] Specifically, the component categories are extracted from the target attribute information, and the corresponding preset identity attribute rules are obtained based on the component categories. The preset identity attribute rules consist of multiple identity attribute records, each of which has a standard attribute name, attribute type, attribute selection conditions, and identity order.

[0129] Arrange the identity attribute records in identity order, and read the identity attribute records sequentially according to the arrangement result. Based on the standard attribute names in the read identity attribute records, search for standard attribute items with the same standard attribute names in the target attribute information, and match the standard attribute values ​​of the found standard attribute items with the attribute selection criteria.

[0130] When the standard attribute value meets the attribute selection conditions, the attribute type of the standard attribute item is determined according to the attribute type. When the attribute type is a category type, the standard attribute item is determined as a category attribute; when the attribute type is a distinguishing type, the standard attribute item is determined as a distinguishing attribute.

[0131] S202: Encode the category attributes to obtain the category identifier segment, and encode the distinguishing attributes according to the preset attribute order to obtain the feature identifier segment.

[0132] In this embodiment, the category identifier segment refers to the identifier field formed by encoding the category attribute, the preset attribute order refers to the arrangement order in which multiple distinguishing attributes participate in the encoding, and the feature identifier segment refers to the identifier field formed by encoding multiple distinguishing attributes.

[0133] Specifically, standard attribute names and standard attribute values ​​are extracted from the category attributes, and a preset identity code table is queried based on the standard attribute names and standard attribute values. The obtained category code is then determined as the category identifier segment.

[0134] The order of identities corresponding to each distinguishing attribute in the preset identity attribute rules is determined as the preset attribute order, and each distinguishing attribute is read sequentially according to the preset attribute order.

[0135] For each distinguishing attribute, extract the standard attribute name and standard attribute value of the distinguishing attribute, obtain the attribute code from the preset identity code table based on the standard attribute name, and obtain the attribute value code from the preset identity code table based on the standard attribute value.

[0136] The number of characters in the attribute value encoding is counted to obtain the encoding length value. The encoding length value is then formatted according to a preset length to obtain the length encoding. The attribute encoding, length encoding, and attribute value encoding are combined in the order of attribute encoding to obtain the distinguishable attribute encoding unit.

[0137] The feature identifier segment is obtained by combining the differentiating attribute encoding units according to the preset attribute order.

[0138] S203: Combine the category identifier segment and the feature identifier segment to obtain the material identifier.

[0139] Specifically, the number of characters in the category identifier segment and the feature identifier segment are counted separately to obtain the category segment length value and the feature segment length value. The category segment length value is then formatted according to a preset length to obtain the category segment length code, and the feature segment length value is then formatted according to a preset length to obtain the feature segment length code.

[0140] The combined identifier is obtained by concatenating the category segment length code, category identifier segment, feature segment length code, and feature identifier segment in that order.

[0141] The target identifier length is determined based on the category segment length code and the feature segment length code, and the number of characters in the combined identifier is counted to obtain the actual identifier length. When the actual identifier length is the same as the target identifier length, the combined identifier is identified as the material identifier.

[0142] S204: Filter out candidate historical material identifiers from historical material data that have the same category identifier segment as the historical material identifier segment.

[0143] In this embodiment, candidate historical material identifiers refer to the data set formed by historical material identifiers with the same category identifier segment.

[0144] Specifically, historical material identifiers are extracted sequentially from historical material data, and a preset length of characters is read from the beginning of each historical material identifier to obtain a historical category segment length code. The historical category segment length code is converted into a historical category segment length value, and the same number of characters as the historical category segment length value are read from the historical category segment length code to obtain the historical category identifier segment.

[0145] Count the number of characters in the category identifier segment to obtain the category segment character count. Compare the historical category segment length value with the category segment character count. When the historical category segment length value and the category segment character count are the same, perform a character-by-character matching between the historical category identifier segment and the category identifier segment.

[0146] When all characters in the historical category identifier field are the same as those in the category identifier field, the corresponding historical material identifier is added to the candidate historical material identifier field.

[0147] S205: Extract historical feature identifier segments from candidate historical material identifiers, match the feature identifier segments with historical feature identifier segments, and determine whether historical material data matching the material identifier is found based on the matching results.

[0148] In this embodiment, the historical feature identifier segment refers to the identifier field in the historical material identifier that records the result of the distinguishing attribute coding, and the matching result refers to the comparison result between the feature identifier segment and the historical feature identifier segment.

[0149] Specifically, for each candidate historical material identifier, the end position of the historical category identifier segment is determined based on the historical category segment length code and the historical category segment length value. A preset length of characters is read from the end position to obtain the historical feature segment length code, which is then converted into a historical feature segment length value. The same number of characters as the historical feature segment length value are read from the historical feature segment length code to obtain the historical feature identifier segment.

[0150] Starting from the beginning of the feature identifier segment, characters of a preset attribute encoding length are read sequentially as attribute encoding, characters of a preset length are read as length encoding, and attribute value encoding is read according to the encoding length value represented by the length encoding to obtain the distinguishable attribute encoding unit, until the feature identifier segment is read.

[0151] The historical feature identifier segment is read using the same reading method to obtain multiple historical distinguishing attribute encoding units. The attribute codes and attribute value codes in the distinguishing attribute encoding units and historical distinguishing attribute encoding units in the same arrangement position are compared sequentially.

[0152] When the number of distinguishing attribute coding units is the same as the number of historical distinguishing attribute coding units, and the attribute codes and attribute value codes of each arrangement position are the same, the matching result is determined to be a successful match, and it is determined that historical material data matching the material identifier has been found. When the number is different or the attribute codes or attribute value codes of at least one arrangement position are different, the matching result is determined to be a failed match.

[0153] In one embodiment, the target attribute information is encoded according to a preset encoding rule to obtain candidate image number and encoding path information, including:

[0154] S301: Determine a bidirectional rule tree shared by the preset encoding rules and parsing rules. The bidirectional rule tree consists of multiple rule nodes with hierarchical relationships. Each rule node records the node identifier, the attribute name and the attribute matching condition, and the encoding relationship between the attribute matching condition and the encoding field.

[0155] In this embodiment, a rule node refers to a tree structure node that records attribute matching relationships and encoding relationships. A node identifier refers to an identifier character used to distinguish different rule nodes. An attribute matching condition refers to a character condition, numerical condition, or numerical range corresponding to an attribute value. An attribute matching relationship refers to the correspondence between an attribute name and an attribute matching condition. An encoding relationship refers to the correspondence between an attribute matching condition and an encoding field.

[0156] Specifically, the system reads the attribute name, attribute matching condition, and encoding field from the preset encoding rules, and the encoding field, attribute matching condition, and attribute name from the parsing rules. It then compares the attribute name, attribute matching condition, and encoding field from the preset encoding rules with those from the parsing rules, filtering out rules where all three are identical.

[0157] According to the attribute arrangement order specified by the preset encoding rules, the filtered rule content is sorted hierarchically. Rule content with the same arrangement position and the same attribute name is divided into the same level, and rule content with different attribute matching conditions is set as different rule nodes.

[0158] Based on the hierarchical sequence number, attribute name sequence number, and attribute matching condition sequence number corresponding to each rule node, character combinations are performed to generate the node identifier for each rule node. The attribute name and attribute matching condition are written into the corresponding rule node to establish the attribute matching relationship, and the attribute matching condition and encoding field are written into the corresponding rule node to establish the encoding relationship.

[0159] Following the attribute arrangement order between adjacent levels, rule nodes in the previous level are connected to rule nodes in the next level that conform to the preset encoding rules, and the attribute matching relationships and encoding relationships recorded by each rule node are compared for completeness. When each rule node records a node identifier, attribute matching relationship, and encoding relationship, multiple rule nodes with hierarchical relationships are determined as a bidirectional rule tree.

[0160] S302: Based on the attribute matching relationship recorded in the primary rule node, extract the target attribute value corresponding to the attribute name from the target attribute information, and match the target attribute value with the attribute matching condition to determine the primary positive matching rule node.

[0161] In this embodiment, the first-level rule node refers to a rule node in the bidirectional rule tree that is not connected to the previous level rule node, and the first-level positive matching rule node refers to the first-level rule node that successfully matches the attribute matching condition with the target attribute value.

[0162] Specifically, the attribute matching relationships recorded in each first-level rule node are read, and the attribute names and attribute matching conditions are extracted from each attribute matching relationship. The extracted attribute names are compared item by item with the standard attribute names in the target attribute information, and the standard attribute values ​​are read from the standard attribute items with the same standard attribute names. The read standard attribute values ​​are then determined as the target attribute values ​​of the corresponding first-level rule node.

[0163] When the attribute matching condition is a character condition, the target attribute value is compared with the character condition character by character according to the character arrangement position. The number of the same character arrangement position is counted. When the number of arrangement positions is the same as the number of characters in the character condition, and the number of characters in the target attribute value is the same as the number of characters in the character condition, it is determined that the target attribute value and the attribute matching condition are successfully matched.

[0164] When the attribute matching condition is a numerical condition, the target attribute value is converted to the same numerical precision as the numerical condition, and the converted target attribute value is compared with the numerical condition. When the numerical comparison results are the same, it is determined that the target attribute value and the attribute matching condition are successfully matched.

[0165] When the attribute matching condition is a numerical range, the target attribute value is compared with the starting and ending values ​​of the numerical range. If the target attribute value is not lower than the starting value and not higher than the ending value, the target attribute value is determined to be a successful match with the attribute matching condition.

[0166] The system filters first-level rule nodes that successfully match the attribute matching conditions with the corresponding target attribute values. When only one first-level rule node is selected, it is designated as the first-level positive matching rule node. When multiple first-level rule nodes are selected, they are sorted according to the order of the attribute matching conditions in the preset encoding rules, and the first first-level rule node is designated as the first-level positive matching rule node.

[0167] S303: Determine the subordinate rule nodes of the first-level positive matching rule node based on the hierarchical relationship in the bidirectional rule tree. Based on the attribute matching relationship recorded in the subordinate rule node, extract the target attribute value corresponding to the attribute name from the target attribute information, and match the target attribute value with the attribute matching condition to determine the subordinate positive matching rule node, until the determined positive matching rule node has no subordinate rule node.

[0168] In this embodiment, a lower-level positive matching rule node refers to a lower-level rule node that is connected to the previous level positive matching rule node and whose attribute matching condition successfully matches the target attribute value.

[0169] Specifically, the hierarchical number and node identifier of the first-level positive matching rule node in the bidirectional rule tree are read, the next level is determined according to the hierarchical number, and the rule nodes in the next level that are connected with the node identifier are filtered out. The filtered rule nodes are determined as the subordinate rule nodes of the first-level positive matching rule node.

[0170] Read the attribute matching relationships recorded in each subordinate rule node, and extract the attribute names and attribute matching conditions from the attribute matching relationships. Compare the attribute names with the standard attribute names in the target attribute information item by item, read the standard attribute values ​​from the standard attribute items with the same standard attribute names, and determine the read standard attribute values ​​as the target attribute values ​​of the corresponding subordinate rule nodes.

[0171] When the attribute matching condition is a character condition, the target attribute value is compared with the character condition character by character according to the character arrangement position. The number of the same character arrangement position is counted. When the number of arrangement positions, the number of characters in the target attribute value and the number of characters in the character condition are the same, it is determined that the target attribute value and the attribute matching condition are successfully matched.

[0172] When the attribute matching condition is a numerical condition, the target attribute value is converted to the same numerical precision as the numerical condition, and the converted target attribute value is compared with the numerical condition. When the numerical comparison results are the same, it is determined that the target attribute value and the attribute matching condition are successfully matched.

[0173] When the attribute matching condition is a numerical range, the target attribute value is compared with the starting and ending values ​​of the numerical range. If the target attribute value is not lower than the starting value and not higher than the ending value, the target attribute value is determined to be a successful match with the attribute matching condition.

[0174] Filter the subordinate rule nodes that successfully match the attribute matching conditions with the corresponding target attribute values. When there is only one subordinate rule node, it is designated as the subordinate positive matching rule node. When there are multiple subordinate rule nodes, they are sorted according to the order of the attribute matching conditions in the preset encoding rules, and the subordinate rule node at the top is designated as the subordinate positive matching rule node.

[0175] Based on the hierarchical relationship in the bidirectional rule tree, continue to determine the next level rule node connected to the lower-level positive matching rule node, and repeat the process of attribute name extraction, target attribute value extraction, attribute matching condition matching, and determination of lower-level positive matching rule nodes until the determined positive matching rule node has no lower-level rule nodes.

[0176] S304: Arrange the node identifiers of the forward matching rule node records at each level in hierarchical order to obtain the forward node sequence, and determine the forward node sequence as the encoded path information.

[0177] In this embodiment, the hierarchical order refers to the arrangement order of each level of positive matching rule nodes in the bidirectional rule tree from the first level to the last level, and the positive node sequence refers to the ordered character set formed by arranging the node identifiers of each level of positive matching rule nodes in hierarchical order.

[0178] Specifically, the hierarchical sequence number and node identifier corresponding to each level of positive matching rule node are read, and the number of positive matching rule nodes corresponding to each hierarchical sequence number is counted. When a hierarchical sequence number corresponds to a positive matching rule node, the hierarchical sequence number is associated with the corresponding node identifier.

[0179] The node identifiers are sorted in ascending order of their hierarchical numbers. The hierarchical difference between the hierarchical numbers corresponding to adjacent positions is calculated sequentially, and the hierarchical difference is compared with the preset hierarchical interval. When all hierarchical differences are the same as the preset hierarchical interval, the connection relationship of the positive matching rule nodes corresponding to adjacent positions is compared according to the hierarchical relationship in the bidirectional rule tree.

[0180] When the forward matching rule nodes corresponding to adjacent arrangement positions are all connected, the node identifiers recorded by each forward matching rule node are read in sequence according to the sorting result, and the node identifiers are written into the forward node sequence according to the reading order.

[0181] The number of node identifiers written into the forward node sequence is counted, and the number of node identifiers is compared with the number of nodes in the forward matching rules. When the number of node identifiers is the same as the number of nodes in the forward matching rules, the forward node sequence is determined as the encoded path information.

[0182] S305: Determine the encoding fields based on the encoding relationships of the nodes of the positive matching rules at each level, and combine the encoding fields in hierarchical order to obtain the figure number prefix.

[0183] In this embodiment, the encoding field refers to the drawing number character segment corresponding to the attribute matching condition, and the drawing number prefix refers to the drawing number character sequence formed by combining the encoding fields in hierarchical order.

[0184] Specifically, the forward matching rule nodes at each level are read sequentially according to hierarchical order, and the attribute matching conditions and corresponding encoded fields are extracted from the encoded relationships recorded in each level of the forward matching rule nodes. The extracted attribute matching conditions are compared item by item with the attribute matching conditions that were successfully matched in the corresponding forward matching rule nodes during the matching process, and encoded relationships with the same attribute matching conditions are filtered out.

[0185] Count the number of filtered results corresponding to each level of positive matching rule node. When a positive matching rule node corresponds to one filtered result, read the encoding field from the filtered result and associate the read encoding field with the level sequence number of the corresponding positive matching rule node.

[0186] Arrange the encoded fields in hierarchical order, count the number of characters in each encoded field, and sum the character counts of each encoded field to obtain the total number of characters in the field. Concatenate the encoded fields in order according to the arrangement to obtain the prefix character sequence.

[0187] Count the number of characters in the prefix character sequence and compare it with the total number of characters in the field. When the number of characters in the prefix character sequence is the same as the total number of characters in the field, extract the corresponding character segments from the prefix character sequence according to the number of characters in each encoded field, and compare the extracted character segments with the corresponding encoded fields character by character.

[0188] When each character segment is identical to its corresponding encoding field, the prefix character sequence is determined as the drawing number prefix.

[0189] S306: Determine the sequence field based on the historical map number data that matches the map number prefix, and combine the map number prefix and the sequence field to obtain the candidate map number.

[0190] In this embodiment, the sequence field refers to the numerical character field that is determined according to the order in which the drawing numbers are generated and set after the drawing number prefix.

[0191] Specifically, the number of characters in the map number prefix is ​​counted, and historical map numbers are read sequentially from the historical map number data. Based on the number of characters in the map number prefix, a historical character segment with the same number of characters is extracted from the beginning of each historical map number, and the historical character segment is compared character by character with the map number prefix.

[0192] When all characters in a historical character field are identical to those in the drawing number prefix, the corresponding historical drawing number is identified as the one matching the prefix. The historical character field is then deleted from each historical drawing number, and the characters retained after deletion are read and used as the historical sequence field.

[0193] Count the number of characters in each historical sequence field, compare the number of characters in each historical sequence field with the preset field length, and filter the historical sequence fields with the same number of characters as the preset field length. Convert the filtered historical sequence fields into ordinal numbers and arrange them in descending order of ordinal number value.

[0194] When the filtered historical sequence field is not empty, the first sequential value is read, and the read sequential value is added to the preset increment to obtain the sequential value to be converted. When the filtered historical sequence field is empty, the preset initial sequential value is determined as the sequential value to be converted.

[0195] The system counts the number of digits in the sequence number to be converted and compares this number with the preset field length. If the number of digits is less than the preset field length, the system adds a preset number of characters equal to the difference in digits to the beginning of the sequence number. If the number of digits equals the preset field length, the system retains the character format of the sequence number, thus obtaining the sequence field.

[0196] Following the arrangement of the drawing number prefix first and the sequence field last, the drawing number prefix and the sequence field are concatenated. The number of characters in the concatenated form is counted and compared with the sum of the number of characters in the drawing number prefix and the preset field length. When the comparison results are the same, the concatenated form is determined as the candidate drawing number.

[0197] In one embodiment, the field mapping relationship between the encoded fields and parsing attributes in the candidate drawing number is determined according to the parsing rules associated with the preset encoding rules, and the candidate drawing number is parsed according to the field mapping relationship to obtain parsing attribute information and parsing path information, including:

[0198] S401: Determine the field mapping relationship between the encoded fields and parsed attribute values ​​of each rule node according to the parsing rules.

[0199] In this embodiment, the parsed attribute value refers to the standard attribute value obtained by converting the encoded field according to the parsing rules.

[0200] Specifically, each rule node is read sequentially according to the hierarchical order in the bidirectional rule tree, and the node identifier and encoding relationship are extracted from each rule node. The corresponding attribute matching conditions and encoding fields are determined based on the encoding relationship, and the node identifier is compared item by item with the node identifier of the parsed rule record.

[0201] Read the encoded fields and parsed attribute values ​​from parsing rules with the same node identifier, and count the number of characters in the encoded fields of the rule nodes and the parsing rules respectively. When the number of characters in the two encoded fields is the same, compare the two encoded fields character by character according to their arrangement position, and count the number of positions where the characters are the same.

[0202] When the number of identical character positions is the same as the number of characters in the two encoded fields, the parsed attribute value in the parsing rule is matched with the attribute matching condition in the corresponding rule node. When the attribute matching condition is a character condition, the parsed attribute value is compared character by character with the character condition. When the attribute matching condition is a numeric condition, the parsed attribute value is converted to the same numeric precision as the numeric condition and then compared numerically. When the attribute matching condition is a numeric range, the parsed attribute value is compared numerically with the start and end values ​​of the numeric range.

[0203] When the parsed attribute value meets the corresponding attribute matching condition, the encoded field in the rule node is associated with the parsed attribute value in the parsing rule to establish a field mapping relationship for the corresponding rule node.

[0204] Count the number of field mapping relationships corresponding to each rule node. When a rule node corresponds to one field mapping relationship, and all rule nodes have corresponding field mapping relationships, arrange the field mapping relationships in hierarchical order.

[0205] S402: Separate the sequence field from the candidate drawing number to obtain the character sequence to be parsed.

[0206] In this embodiment, the character sequence to be parsed refers to the character sequence retained after separating the sequence field from the candidate drawing number.

[0207] Specifically, the number of characters in the candidate drawing number and the sequence field are counted separately. The number of characters in the candidate drawing number is subtracted from the number of characters in the sequence field to obtain the character separation position.

[0208] According to the character arrangement order in the candidate drawing number, read from the beginning of the candidate drawing number to the character separation position to obtain the first part of the characters, and continue reading from the character separation position to the end of the candidate drawing number to obtain the second part of the characters.

[0209] The second part of the characters is compared character by character with the sequence field, and the number of positions where the characters are the same is counted. When the number of characters in the second part of the characters is the same as the number of characters in the sequence field, and the number of positions where the characters are the same is the same as the number of characters in the sequence field, the second part of the characters is determined to be the sequence field separated from the candidate drawing number.

[0210] The sum of the character counts in the first and second parts of the character set is counted, and then compared with the character count of the candidate image number. If the comparison results are the same, the first part of the character set is determined as the character sequence to be parsed.

[0211] S403: Match the first character of the character sequence to be parsed with the encoding field indicated by the encoding relationship of the first rule node to determine the first reverse matching rule node, and remove the encoding field of the first reverse matching rule node from the character sequence to be parsed.

[0212] In this embodiment, the first-level reverse matching rule node refers to the first-level rule node in which the encoded field successfully matches the first character of the character sequence to be parsed.

[0213] Specifically, the encoding relationships recorded in each primary rule node are read, and the encoding fields are extracted from each encoding relationship. The number of characters in each encoding field is counted, and the same number of characters in the first character of the character sequence to be parsed are read sequentially from the beginning of each encoding field according to the number of characters in each encoding field.

[0214] For each first-level rule node, the read first character is compared with the corresponding encoded field character by character according to their position, and the number of positions where characters are the same is counted. When the number of characters in the first character is the same as the number of characters in the corresponding encoded field, and the number of positions where characters are the same is also the same as the number of characters in the corresponding encoded field, the first character is considered to be a successful match with the corresponding encoded field.

[0215] The first-level rule node that successfully matches the encoded field with the first character is selected. When only one first-level rule node is selected, it is designated as the first-level reverse matching rule node. When multiple first-level rule nodes are selected, they are sorted in descending order of the number of characters in the encoded field, and the first first-level rule node is designated as the first-level reverse matching rule node.

[0216] The system counts the number of characters in the encoded field corresponding to the first-level reverse matching rule node, and reads the same number of characters from the beginning of the character sequence to be parsed according to the count. The read characters are then compared character by character with the encoded field. If all characters are identical, the read character is deleted from the beginning of the character sequence to be parsed, retaining the characters after the deleted position.

[0217] Count the number of characters in the sequence of characters to be parsed before and after deletion, and calculate the difference in the number of characters before and after deletion. When the difference in the number of characters is the same as the number of characters in the encoded field corresponding to the first-level reverse matching rule node, the removal of the encoded field is completed.

[0218] S404: Determine the lower-level rule nodes of the first-level reverse matching rule node according to the hierarchical relationship in the bidirectional rule tree, match the first character of the character sequence to be parsed with the encoding field indicated by the encoding relationship of the lower-level rule node, determine the lower-level reverse matching rule node, and remove the encoding field of the lower-level reverse matching rule node from the character sequence to be parsed until the character sequence to be parsed is empty.

[0219] In this embodiment, a lower-level reverse matching rule node refers to a lower-level rule node that is connected to the previous-level reverse matching rule node and whose encoded field successfully matches the first character of the character sequence to be parsed.

[0220] Specifically, the hierarchical number and node identifier corresponding to the first-level reverse matching rule node are read, the next level is determined according to the hierarchical number, and the rule nodes that are connected to the node identifier in the next level are filtered out. The filtered rule nodes are determined as the subordinate rule nodes of the first-level reverse matching rule node.

[0221] Read the encoding relationships recorded in each lower-level rule node, and extract the encoding fields from each encoding relationship. Count the number of characters in each encoding field, and read the same number of leading characters from the beginning of the character sequence to be parsed, according to the number of characters in each encoding field.

[0222] For each lower-level rule node, the first character read is compared character by character with the corresponding encoded field, and the number of positions where characters are identical is counted. When the number of characters in the first character is the same as the number of characters in the corresponding encoded field, and the number of positions where characters are identical is also the same as the number of characters in the corresponding encoded field, the first character is considered to have matched the corresponding encoded field successfully.

[0223] Filter the subordinate rule nodes that successfully match the encoded field with the first character. When there is only one subordinate rule node, it is designated as the subordinate reverse matching rule node. When there are multiple subordinate rule nodes, they are sorted in descending order of the number of characters in the encoded field, and the subordinate rule node at the top of the list is designated as the subordinate reverse matching rule node.

[0224] The system counts the number of characters in the encoded field corresponding to the lower-level reverse matching rule node, and reads the same number of characters from the beginning of the character sequence to be parsed according to the count. The read characters are then compared character by character with the encoded field. If all characters are identical, the read character is deleted from the beginning of the character sequence to be parsed, retaining the characters after the deleted position.

[0225] Count the number of characters in the character sequence to be parsed before and after deletion, and calculate the difference in the number of characters before and after deletion. When the difference in the number of characters is the same as the number of characters in the encoded field of the lower-level reverse matching rule node, continue to determine the next level rule node connected to the lower-level reverse matching rule node according to the hierarchical relationship in the bidirectional rule tree, and repeat the process of encoding field extraction, header character reading, encoding field matching, determination of lower-level reverse matching rule node and removal of encoding field until the number of characters in the character sequence to be parsed is zero.

[0226] S405: Arrange the node identifiers of the reverse matching rule node records at each level in hierarchical order to obtain the reverse node sequence, and determine the reverse node sequence as the parsing path information.

[0227] In this embodiment, the reverse node sequence refers to the ordered character set formed by arranging the node identifiers of the reverse matching rule nodes at each level in hierarchical order.

[0228] Specifically, the hierarchical sequence number and node identifier corresponding to each level of reverse matching rule node are read, and the number of reverse matching rule nodes corresponding to each hierarchical sequence number is counted. When a hierarchical sequence number corresponds to a reverse matching rule node, the hierarchical sequence number is associated with the corresponding node identifier.

[0229] The node identifiers are sorted in ascending order of their hierarchical numbers. The hierarchical difference between the hierarchical numbers corresponding to adjacent positions is calculated sequentially, and the hierarchical difference is compared with the preset hierarchical interval. When all hierarchical differences are the same as the preset hierarchical interval, the connection relationship of the reverse matching rule nodes corresponding to adjacent positions is compared according to the hierarchical relationship in the bidirectional rule tree.

[0230] When the reverse matching rule nodes corresponding to adjacent arrangement positions are all connected, the node identifiers recorded by each reverse matching rule node are read in sequence according to the sorting result, and the node identifiers are written into the reverse node sequence according to the reading order.

[0231] The number of node identifiers written into the reverse node sequence is counted, and the number of node identifiers is compared with the number of nodes in the reverse matching rules. When the number of node identifiers is the same as the number of nodes in the reverse matching rules, the reverse node sequence is determined as the parsing path information.

[0232] S406: Determine the parsed attribute values ​​corresponding to the encoded fields of the reverse matching rule nodes at each level according to the field mapping relationship, determine the attribute names according to the attribute matching relationships of the reverse matching rule nodes at each level, and combine the attribute names and parsed attribute values ​​to obtain the parsed attribute information.

[0233] Specifically, the reverse matching rule nodes at each level are read sequentially according to hierarchical order, and the encoded fields are extracted from the encoding relationship of each reverse matching rule node. The extracted encoded fields are compared item by item with the encoded fields in the field mapping relationship, and the number of characters in the two encoded fields is counted respectively.

[0234] When the number of characters in two encoded fields is the same, the two encoded fields are compared character by character according to their arrangement position, and the number of identical character arrangement positions is counted. When the number of identical character arrangement positions is the same as the number of characters in the two encoded fields, the parsed attribute value is read from the corresponding field mapping relationship, and the read parsed attribute value is determined as the parsed attribute value of the corresponding reverse matching rule node.

[0235] The system reads the attribute names and matching conditions from the attribute matching relationships recorded in the reverse matching rule nodes at each level, and matches the read attribute matching conditions with the parsed attribute values ​​in the corresponding field mapping relationships. When the attribute matching condition is a character condition, the parsed attribute value is compared character by character with the character condition. When the attribute matching condition is a numeric condition, the parsed attribute value is converted to the same numeric precision as the numeric condition and then compared numerically. When the attribute matching condition is a numeric range, the parsed attribute value is compared numerically with the start and end values ​​of the numeric range.

[0236] When the parsed attribute value meets the corresponding attribute matching condition, the attribute name and parsed attribute value corresponding to the same reverse matching rule node are combined to obtain the parsed attribute of the corresponding reverse matching rule node.

[0237] Arrange the parsed attributes in hierarchical order and count the number of parsed attributes. Compare the number of parsed attributes with the number of reverse matching rule nodes. When the number of parsed attributes is the same as the number of reverse matching rule nodes, combine the arranged parsed attributes into parsed attribute information.

[0238] In one embodiment, path consistency verification is performed between the encoded path information and the parsed path information; attribute consistency verification is performed between the target attribute information and the parsed attribute information; and map number uniqueness verification is performed on the candidate map number based on historical map number data, including:

[0239] S501: Compare the node identifiers at the same sequence position in the forward node sequence and the reverse node sequence in turn. If the sequence lengths of the forward node sequence and the reverse node sequence are the same and the node identifiers at each sequence position are the same, the path consistency check is considered to have passed.

[0240] In this embodiment, sequence position refers to the arrangement position of node identifiers in the forward or reverse node sequence, and sequence length refers to the number of node identifiers contained in the forward or reverse node sequence.

[0241] Specifically, according to the order of the node identifiers, consecutive sequence positions are set for each node identifier in the forward node sequence and the reverse node sequence, and the number of node identifiers contained in the forward node sequence and the number of node identifiers contained in the reverse node sequence are counted to obtain the sequence length of the forward node sequence and the sequence length of the reverse node sequence.

[0242] The sequence lengths of the forward node sequence and the reverse node sequence are numerically compared. When the two sequence lengths are the same, the node identifiers at the same sequence position are read from the forward node sequence and the reverse node sequence respectively, according to the order of sequence position.

[0243] Count the number of characters in the identifiers of two nodes at the same sequence position. When the number of characters in two node identifiers is the same, compare the two node identifiers character by character according to their position and count the number of positions where the characters are the same. When the number of positions where the characters are the same is the same as the number of characters in the two node identifiers, the node identifiers at the corresponding sequence positions are determined to be the same.

[0244] The system counts the number of sequence positions with identical node identifiers and compares these counts with the sequence lengths of both the forward and reverse node sequences. If the forward and reverse node sequences have the same sequence length, and the number of sequence positions matches both sequence lengths, the path consistency check is considered successful.

[0245] S502: Determine the attribute name based on the attribute matching relationship of the reverse matching rule nodes at each level, and extract the target attribute value and the parsed attribute value from the target attribute information and the parsed attribute information respectively based on the attribute name.

[0246] Specifically, the reverse matching rule nodes at each level are read sequentially according to hierarchical order, and the attribute names are extracted from the attribute matching relationships recorded in each reverse matching rule node. The number of characters in each attribute name is counted, and the attribute names are arranged in hierarchical order.

[0247] For each attribute name, the standard attribute names of each standard attribute item are read sequentially from the target attribute information. The attribute name is compared with each standard attribute name by the number of characters. If the number of characters is the same, a character-by-character comparison is performed according to the character's position. Standard attribute names where every character is identical to the attribute name are selected, and the standard attribute value is read from the corresponding standard attribute item. This read standard attribute value is determined as the target attribute value for the corresponding attribute name.

[0248] For the same attribute name, read the attribute names of each parsed attribute sequentially from the parsed attribute information. Count the number of characters in each attribute name, and if the number of characters is the same, compare them character by character according to their position in the sequence. Filter out parsed attributes where all characters are identical, and read the parsed attribute values ​​from the filtered attributes. Determine the parsed attribute value of the read parsed attribute value as the parsed attribute value for the corresponding attribute name.

[0249] The attribute names determined from the same reverse matching rule node, the target attribute values ​​extracted from the target attribute information, and the parsed attribute values ​​extracted from the parsed attribute information are associated.

[0250] The number of attribute names extracted for both target and parsed attribute values ​​is counted, and this number is compared with the number of reverse matching rule nodes. When the number of attribute names is the same as the number of reverse matching rule nodes, the extraction of each target and parsed attribute value is complete.

[0251] S503: Match the target attribute values ​​with the same attribute name with the parsed attribute values. If all target attribute values ​​match all parsed attribute values, the attribute consistency check is considered passed.

[0252] In this embodiment, the meanings of attribute name, target attribute value, parsed attribute value, and attribute consistency check are the same as in the previous embodiments.

[0253] Specifically, the system reads each attribute name, along with the associated target attribute value and parsed attribute value, in hierarchical order, and counts the number of target attribute values ​​and parsed attribute values ​​corresponding to each attribute name. When the same attribute name corresponds to one target attribute value and one parsed attribute value, the corresponding target attribute value and parsed attribute value are combined to form a matching pair.

[0254] Count the number of characters in the target attribute value and the parsed attribute value for each matching combination. When the number of characters in the target attribute value and the parsed attribute value are the same, compare the target attribute value and the parsed attribute value character by character according to their position, and count the number of positions where the characters are the same.

[0255] When the number of identical character positions is the same as the number of characters in the target attribute value and the number of characters in the parsed attribute value, the target attribute value and the parsed attribute value of the corresponding attribute name are determined to match.

[0256] Count the number of attribute names that match the target attribute value with the parsed attribute value, and count the total number of attribute names involved in the matching. Compare the number of attribute names that match the target attribute value with the parsed attribute value with the total number of attribute names. When the two numbers are the same, it is determined that each target attribute value matches each parsed attribute value, and the attribute consistency check is considered passed.

[0257] S504: When both path consistency check and attribute consistency check pass, select candidate historical map numbers from the historical map number data whose map number prefix is ​​the same as the map number prefix.

[0258] In this embodiment, candidate historical map numbers refer to historical map numbers selected from historical map number data whose map number prefixes are the same as the map number prefixes.

[0259] Specifically, read the verification results corresponding to path consistency verification and attribute consistency verification. When both the path consistency verification result and the attribute consistency verification result are passed, count the number of characters in the figure number prefix.

[0260] Read historical map numbers sequentially from the historical map number data and count the number of characters for each historical map number. Compare the number of characters for each historical map number with the number of characters in the map number prefix, and filter historical map numbers whose number of characters is not less than the number of characters in the map number prefix.

[0261] Based on the number of characters in the map number prefix, read the same number of historical character segments from the beginning of each selected historical map number. Count the number of characters in the historical character segments and the map number prefix separately. When the two number of characters are the same, compare the historical character segments and the map number prefix character by character according to their order.

[0262] Count the number of positions in which characters in the historical character segment and the drawing number prefix are identical. When the number of such positions is the same as the number of characters in both the historical character segment and the drawing number prefix, the corresponding historical drawing number is identified as a candidate historical drawing number.

[0263] S505: Extract the historical sequence field from the candidate historical drawing number, match the sequence field with the historical sequence field, and determine that the uniqueness verification of the drawing number has passed if there is no historical sequence field that is the same as the sequence field.

[0264] In this embodiment, the historical sequence field refers to the numerical character field located after the drawing number prefix in the candidate historical drawing number.

[0265] Specifically, the number of characters in the map number prefix is ​​counted, and each candidate historical map number is read sequentially. For each candidate historical map number, the number of characters in the candidate historical map number is counted, and the number of characters in the candidate historical map number is subtracted from the number of characters in the map number prefix to obtain the corresponding number of remaining characters.

[0266] Based on the number of characters in the prefix of the map number, read the same number of characters from the beginning of the candidate historical map number, and continue reading the same number of characters from the end position. The characters to be read next are determined as the historical sequence field of the corresponding candidate historical map number.

[0267] Count the number of characters in the sequential field and each historical sequential field. For each historical sequential field, compare the number of characters in the sequential field with the number of characters in the historical sequential field. When the two counts are the same, compare the sequential field and the historical sequential field character by character according to their position, and count the number of positions where the characters are the same.

[0268] When the number of identical character positions is the same as the number of characters in the sequence field and the number of characters in the corresponding historical sequence field, the corresponding historical sequence field is determined to be the same as the sequence field.

[0269] Count the number of historical sequential fields that are identical to the sequential field. When the number of historical sequential fields that are identical to the sequential field is zero, it is determined that there are no historical sequential fields that are identical to the sequential field, and the uniqueness verification of the drawing number is confirmed to have passed.

[0270] In one embodiment, when path consistency verification, attribute consistency verification, and drawing number uniqueness verification all pass, an association relationship is established between candidate drawing numbers and material identifiers, and the candidate drawing number is determined as the drawing number of the target component, including:

[0271] S601: Query the historical binding data using candidate drawing number and material identifier as query conditions respectively, and obtain the drawing number binding query results and the material binding query results.

[0272] In this embodiment, historical binding data refers to the set of binding records for which an association has been established between candidate drawing numbers and material identifiers. Drawing number binding query results refer to the query results indicating whether there is a corresponding binding record for a candidate drawing number in the historical binding data. Material binding query results refer to the query results indicating whether there is a corresponding binding record for a material identifier in the historical binding data.

[0273] Specifically, each binding record is read sequentially from the historical binding data, and the candidate drawing number and material identifier are extracted from each binding record.

[0274] Using candidate drawing numbers as the query criteria, the number of characters in each candidate drawing number and each bound record is counted. When two candidate drawing numbers have the same number of characters, each character in the two candidate drawing numbers is compared according to its position, and the number of positions where characters are the same is counted. When the number of positions where characters are the same is the same as the number of characters in both candidate drawing numbers, the corresponding bound record is determined as the bound record corresponding to the candidate drawing number.

[0275] Count the number of bound records corresponding to candidate drawing numbers. When the number of bound records is zero, generate a drawing number binding query result indicating that there is no bound record corresponding to the candidate drawing number. When the number of bound records is not zero, generate a drawing number binding query result indicating that there is a bound record corresponding to the candidate drawing number.

[0276] Using the material identifier as the query condition, count the number of characters in the material identifier and each bound record. When two material identifiers have the same number of characters, compare each character character by character according to its position and count the number of identical character positions. When the number of identical character positions is the same as the number of characters in both material identifiers, the corresponding bound record is determined as the bound record corresponding to the material identifier.

[0277] Count the number of bound records corresponding to a material identifier. When the number of bound records is zero, generate a material binding query result indicating that there is no bound record corresponding to the material identifier. When the number of bound records is not zero, generate a material binding query result indicating that there is a bound record corresponding to the material identifier.

[0278] S602: When the drawing number binding query result indicates that there is no binding record for the candidate drawing number and the material binding query result indicates that there is no binding record for the material identifier, establish a first mapping relationship from the candidate drawing number to the material identifier and a second mapping relationship from the material identifier to the candidate drawing number.

[0279] In this embodiment, the first mapping relationship refers to the correspondence where the candidate drawing number is the search content and the material identifier is the return content, and the second mapping relationship refers to the correspondence where the material identifier is the search content and the candidate drawing number is the return content.

[0280] Specifically, the drawing number binding query results and the material binding query results are read separately, and the drawing number binding query results are compared with the query results indicating that there is no corresponding binding record for the candidate drawing number, and the material binding query results are compared with the query results indicating that there is no corresponding binding record for the material identifier.

[0281] When the drawing number binding query result indicates that there is no binding record for the candidate drawing number, and the material binding query result indicates that there is no binding record for the material identifier, the candidate drawing number and the material identifier are read respectively.

[0282] Set the candidate drawing number as the search content, set the material identifier as the return content corresponding to the candidate drawing number, and associate the candidate drawing number with the material identifier to establish the first mapping relationship from the candidate drawing number to the material identifier.

[0283] Set the material identifier as the search content, set the candidate drawing number as the return content corresponding to the material identifier, and associate the material identifier with the candidate drawing number to establish a second mapping relationship from the material identifier to the candidate drawing number.

[0284] Using the candidate drawing number as the search content, the material identifier is read from the first mapping relationship, and using the read material identifier as the search content, the candidate drawing number is read from the second mapping relationship. The read material identifier is compared character by character with the material identifier, and the read candidate drawing number is compared character by character with the candidate drawing number. When all characters in the two character-by-character comparisons are the same, the establishment of the first mapping relationship and the second mapping relationship is completed.

[0285] S603: Perform atomic writing on the first and second mapping relationships, and set the candidate map number to the valid state.

[0286] In this embodiment, atomic writing refers to writing the first mapping relationship, the second mapping relationship, and the state of the candidate drawing number as the same write operation simultaneously. The valid state refers to the state of the candidate drawing number after the first mapping relationship and the second mapping relationship have been written.

[0287] Specifically, the first mapping relationship, the second mapping relationship, and the valid states corresponding to the candidate map number are arranged in the order of writing, and the three written contents are combined into the same write operation.

[0288] Before performing the write operation, the historical binding data is queried again using the candidate drawing number and material identifier as query conditions. If there is no binding record corresponding to the candidate drawing number and no binding record corresponding to the material identifier, the write position corresponding to the candidate drawing number and material identifier is locked.

[0289] In the locked write location, a first mapping relationship from the candidate drawing number to the material identifier is written, and a second mapping relationship from the material identifier to the candidate drawing number is written. When both the first and second mapping relationships are written, the status corresponding to the candidate drawing number is written as valid.

[0290] Read the first mapping relationship, the second mapping relationship, and the status corresponding to the candidate image number after they are written respectively. Compare the read first mapping relationship with the first mapping relationship, compare the read second mapping relationship with the second mapping relationship, and compare the read status with the valid status.

[0291] If all three comparisons are the same, submit the write operation and unlock the write position. If any one comparison is different, cancel the write operation and unlock the write position.

[0292] S604: Select the candidate drawing number that is in a valid state as the drawing number of the target part.

[0293] Specifically, the status corresponding to the candidate image number is read, and the read status is compared with the valid status. When the read status is the same as the valid status, the candidate image number is read, and the number of characters in the candidate image number is counted.

[0294] Write the valid candidate drawing number to the drawing number position corresponding to the target component, and read the written character from the drawing number position. Count the number of written characters and compare it with the number of characters in the candidate drawing numbers.

[0295] When the number of two characters is the same, the characters written are compared with the candidate image number character by character according to their arrangement position, and the number of the same arrangement positions is counted.

[0296] When the number of identical character positions is the same as the number of characters in the candidate drawing number and the number of characters written, the candidate drawing number written is determined as the drawing number of the target component.

[0297] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0298] In one embodiment, a component drawing number generation device is provided, which corresponds one-to-one with the component drawing number generation method described in the above embodiments. For example... Figure 2 As shown, the component drawing number generation device includes an attribute standardization module, a material deduplication module, a drawing number encoding module, a drawing number parsing module, a drawing number verification module, and a drawing number association module.

[0299] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0300] Obtain the attribute information to be encoded for the target component, perform normalization processing on the attribute information to be encoded, and obtain the target attribute information.

[0301] Based on the target attribute information, a material identifier for the target component is generated, and the material is deduplicated in historical material data based on the material identifier.

[0302] If no historical material data matching the material identifier is found, the target attribute information is encoded according to preset coding rules to obtain candidate drawing numbers and coding path information.

[0303] Based on the parsing rules associated with the preset encoding rules, the field mapping relationship between the encoded fields and parsed attributes in the candidate drawing number is determined, and the candidate drawing number is parsed according to the field mapping relationship to obtain the parsed attribute information and parsing path information.

[0304] The encoding path information and the parsed path information are checked for path consistency; the target attribute information and the parsed attribute information are checked for attribute consistency; and the candidate map numbers are checked for uniqueness based on historical map number data.

[0305] When the path consistency check, attribute consistency check, and drawing number uniqueness check all pass, the association between the candidate drawing number and the material identifier is established, and the candidate drawing number is determined as the drawing number of the target component.

[0306] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0307] Obtain the attribute information to be encoded for the target component, perform normalization processing on the attribute information to be encoded, and obtain the target attribute information.

[0308] Based on the target attribute information, a material identifier for the target component is generated, and the material is deduplicated in historical material data based on the material identifier.

[0309] If no historical material data matching the material identifier is found, the target attribute information is encoded according to preset coding rules to obtain candidate drawing numbers and coding path information.

[0310] Based on the parsing rules associated with the preset encoding rules, the field mapping relationship between the encoded fields and parsed attributes in the candidate drawing number is determined, and the candidate drawing number is parsed according to the field mapping relationship to obtain the parsed attribute information and parsing path information.

[0311] The encoding path information and the parsed path information are checked for path consistency; the target attribute information and the parsed attribute information are checked for attribute consistency; and the candidate map numbers are checked for uniqueness based on historical map number data.

[0312] When the path consistency check, attribute consistency check, and drawing number uniqueness check all pass, the association between the candidate drawing number and the material identifier is established, and the candidate drawing number is determined as the drawing number of the target component.

[0313] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0314] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method of generating a parts figure number, characterized by, The method for generating component drawing numbers includes: Obtain the attribute information to be encoded for the target component, and perform normalization processing on the attribute information to be encoded to obtain the target attribute information; A material identifier for the target component is generated based on the target attribute information, and material deduplication is performed in historical material data based on the material identifier. If no historical material data matching the material identifier is found, the target attribute information is encoded according to a preset encoding rule to obtain candidate drawing number and encoding path information; Based on the parsing rules associated with the preset encoding rules, the field mapping relationship between the encoded fields and parsing attributes in the candidate drawing number is determined, and the candidate drawing number is parsed according to the field mapping relationship to obtain parsing attribute information and parsing path information; The path consistency of the encoded path information and the parsed path information is checked, the attribute consistency of the target attribute information and the parsed attribute information is checked, and the uniqueness of the candidate map number is checked based on historical map number data. When the path consistency check, the attribute consistency check, and the drawing number uniqueness check all pass, the association between the candidate drawing number and the material identifier is established, and the candidate drawing number is determined as the drawing number of the target component.

2. The method of claim 1, wherein The normalization process of the attribute information to be encoded to obtain the target attribute information includes: The component category of the target component is determined from the attribute information to be encoded; Determine the attribute mapping relationship and attribute value conversion rules based on the component categories; The attribute names in the attribute information to be encoded are converted using the attribute mapping relationship, and the attribute values ​​in the attribute information to be encoded are converted using the attribute value conversion rule to obtain the target attribute information.

3. The method of claim 1, wherein The step of generating a material identifier for the target component based on the target attribute information, and performing material deduplication in historical material data based on the material identifier, includes: Based on preset identity attribute rules, category attributes and distinguishing attributes are determined from the target attribute information; The category attributes are encoded to obtain a category identifier segment, and the distinguishing attributes are encoded according to a preset attribute order to obtain a feature identifier segment; The material identifier is obtained by combining the category identifier segment and the feature identifier segment; Filter out candidate historical material identifiers whose category identifier segment is the same as the category identifier segment from the historical material data; Historical feature identifier segments are extracted from the candidate historical material identifiers, the feature identifier segments are matched with the historical feature identifier segments, and the matching results are used to determine whether historical material data matching the material identifier is found.

4. The method of claim 1, wherein The step of encoding the target attribute information according to a preset encoding rule to obtain candidate image number and encoding path information includes: A bidirectional rule tree shared by the preset encoding rules and the parsing rules is determined. The bidirectional rule tree consists of multiple rule nodes with hierarchical relationships. Each rule node records a node identifier, an attribute name and an attribute matching relationship between the attribute matching conditions, and an encoding relationship between the attribute matching conditions and the encoding field. Based on the attribute matching relationship recorded by the first-level rule node, the target attribute value corresponding to the attribute name is extracted from the target attribute information, and the target attribute value is matched with the attribute matching condition to determine the first-level positive matching rule node; The subordinate rule nodes of the first-level positive matching rule node are determined according to the hierarchical relationship in the bidirectional rule tree. According to the attribute matching relationship recorded by the subordinate rule node, the target attribute value corresponding to the attribute name is extracted from the target attribute information, and the target attribute value is matched with the attribute matching condition to determine the subordinate positive matching rule node, until the determined positive matching rule node has no subordinate rule node. Arrange the node identifiers of the forward matching rule nodes at each level in hierarchical order to obtain the forward node sequence, and determine the forward node sequence as the encoded path information; The coding fields are determined based on the coding relationships recorded in the positive matching rule nodes at each level, and the coding fields are combined according to the hierarchical order to obtain the figure number prefix; The order field is determined based on the historical map number data that matches the map number prefix. The candidate map number is obtained by combining the map number prefix and the order field.

5. The method of claim 4, wherein The step involves determining the field mapping relationship between the encoded fields and parsing attributes in the candidate image number based on the parsing rules associated with the preset encoding rules, and parsing the candidate image number according to the field mapping relationship to obtain parsing attribute information and parsing path information, including: The field mapping relationship between the encoded fields and parsed attribute values ​​of each rule node is determined according to the parsing rules; The sequence field is separated from the candidate image number to obtain the character sequence to be parsed; The first character of the character sequence to be parsed is matched with the encoding field indicated by the encoding relationship of the first-level rule node to determine the first-level reverse matching rule node, and the encoding field of the first-level reverse matching rule node is removed from the character sequence to be parsed. Based on the hierarchical relationship in the bidirectional rule tree, the lower-level rule nodes of the first-level reverse matching rule node are determined. The first character of the character sequence to be parsed is matched with the encoding field indicated by the encoding relationship of the lower-level rule node to determine the lower-level reverse matching rule node. The encoding field of the lower-level reverse matching rule node is removed from the character sequence to be parsed until the character sequence to be parsed is empty. Arrange the node identifiers of the reverse matching rule nodes at each level in hierarchical order to obtain the reverse node sequence, and determine the reverse node sequence as the parsing path information; Based on the field mapping relationship, the parsed attribute values ​​corresponding to the encoded fields of the reverse matching rule nodes at each level are determined. Based on the attribute matching relationship of the reverse matching rule nodes at each level, the attribute names are determined. The attribute names and the parsed attribute values ​​are combined to obtain the parsed attribute information.

6. The method of claim 5, wherein The steps of performing path consistency verification on the encoded path information and the parsed path information, performing attribute consistency verification on the target attribute information and the parsed attribute information, and performing map number uniqueness verification on the candidate map number based on historical map number data include: The node identifiers at the same sequence position in the forward node sequence and the reverse node sequence are compared sequentially. When the sequence lengths of the forward node sequence and the reverse node sequence are the same and the node identifiers at each sequence position are the same, the path consistency check is determined to be successful. The attribute name is determined based on the attribute matching relationship of the reverse matching rule nodes at each level, and the target attribute value and the parsed attribute value are extracted from the target attribute information and the parsed attribute information respectively based on the attribute name; Match the target attribute values ​​with the same attribute name with the parsed attribute values. When all the target attribute values ​​match all the parsed attribute values, the attribute consistency check is considered to have passed. When both the path consistency check and the attribute consistency check pass, candidate historical map numbers with the same map number prefix are selected from the historical map number data; The historical sequence field is extracted from the candidate historical drawing number, and the sequence field is matched with the historical sequence field. If there is no historical sequence field that is the same as the sequence field, the uniqueness verification of the drawing number is determined to be successful.

7. The method of claim 1, wherein When the path consistency check, the attribute consistency check, and the drawing number uniqueness check all pass, the association between the candidate drawing number and the material identifier is established, and the candidate drawing number is determined as the drawing number of the target component, including: The historical binding data is queried using the candidate drawing number and the material identifier as query conditions to obtain the drawing number binding query results and the material binding query results. When the drawing number binding query result indicates that there is no binding record for the candidate drawing number and the material binding query result indicates that there is no binding record for the material identifier, a first mapping relationship from the candidate drawing number to the material identifier and a second mapping relationship from the material identifier to the candidate drawing number are established. performing the first mapping relationship and the second mapping relationship atom write, and set the candidate figure number to an effective state; The candidate drawing number that is in the effective state is determined as the drawing number of the target component.

8. A parts figure number generating apparatus characterized by comprising: The component drawing number generation device includes: The attribute normalization module is used to obtain the attribute information to be encoded of the target component, and to normalize the attribute information to be encoded to obtain the target attribute information. The material deduplication module is used to generate a material identifier for the target component based on the target attribute information, and to perform material deduplication in historical material data based on the material identifier. The drawing number encoding module is used to encode the target attribute information according to a preset encoding rule when no historical material data matching the material identifier is found, so as to obtain candidate drawing numbers and encoding path information. The drawing number parsing module is used to determine the field mapping relationship between the encoded fields and parsing attributes in the candidate drawing number according to the parsing rules associated with the preset encoding rules, and to parse the candidate drawing number according to the field mapping relationship to obtain parsing attribute information and parsing path information; The map number verification module is used to verify the consistency between the encoded path information and the parsed path information, to verify the consistency between the target attribute information and the parsed attribute information, and to verify the uniqueness of the candidate map number based on historical map number data. The drawing number association module is used to establish an association between the candidate drawing number and the material identifier when the path consistency check, the attribute consistency check, and the drawing number uniqueness check all pass, and to determine the candidate drawing number as the drawing number of the target component.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the component drawing number generation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising: When the computer program is executed by the processor, it implements the steps of the component drawing number generation method as described in any one of claims 1 to 7.