An assembly recognition method, apparatus, device, and medium
Patent Information
- Application Number
- CN202610788600.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-02
- Publication Date
- 2026-09-25
AI Technical Summary
[0005]本申请实施例的目的在于提出一种组件识别方法、装置、计算机设备及存储介质,以解决现有组件命名不规范致识别准确率低及维护成本高的问题
[0010]与现有技术相比,本申请实施例主要有以下有益效果:通过获取各组件的原始名称并进行多级标准化清洗,能够有效去除命名中的版本后缀及特殊符号等噪音信息,提升识别的基础数据质量。将标准化名称拆分为多个语义片段,使得非规范命名可被分解为独立语义单元,为精准匹配提供细粒度支撑。基于各语义片段与组件库确定综合评分并与阈值比较,实现了多维度量化评估与初步筛选,避免单一名称匹配的局限。通过语义片段与目标组件类型下各标准名称进行细粒度匹配,得到细粒匹配度,在字符级与语义级双重维度实现高精度对齐。最终基于细粒匹配度确定标准名称,在命名不规范及规范频繁迭代场景下,仍能保持较高的组件识别准确率与低维护成本。
Smart Images

Figure CN122816627A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data technology and is applied to online processing business scenarios such as finance, insurance, and healthcare. In particular, it relates to a component identification method, device, equipment, and medium. Background Technology
[0002] With the rapid development of human-computer interaction technology, user interface design has become a crucial part of the software product development process. In the automated delivery chain from design drafts to front-end code, accurately mapping each component in the design draft to a pre-defined standard component library is the core technical challenge for automating design rendering.
[0003] In existing technologies, the identification and mapping of components in design drafts mainly relies on precise matching of component names or manual annotation. However, in actual UI design collaboration scenarios, designers' naming of components is often highly random and subjective, frequently resulting in non-standardized names such as "btn" and "button-copy 3," and even including noisy information such as version suffixes and special symbols, making it difficult for name-based precise matching solutions to work effectively. For example, in business scenarios such as insurance and healthcare, design drafts often contain non-standardized names that mix business terms and version information, such as "claims-entry," "registration button-v2," and "policy details_final version," further exacerbating the failure of precise matching solutions.
[0004] Meanwhile, existing methods lack the ability to clean up redundant information in naming and perform semantic understanding, failing to extract effective semantic features from non-standard naming, thus affecting the accuracy of component recognition. Furthermore, with frequent iterations and updates to UI design guidelines, solutions based on fixed rules or static mapping tables are extremely costly to maintain and difficult to keep pace with the latest guidelines, causing the tool's recognition capabilities to lag significantly behind actual needs. The non-standard naming of existing components leads to low recognition accuracy and high maintenance costs. Summary of the Invention
[0005] The purpose of this application is to provide a component identification method, apparatus, computer device, and storage medium to solve the problems of low identification accuracy and high maintenance costs caused by non-standard component naming in existing systems.
[0006] Firstly, a component identification method is provided, which adopts the following technical solution: Obtain the original names of each component in the target design draft; perform multi-level standardization cleaning on the original names to obtain standardized names, and break down the standardized names into multiple semantic fragments; based on each semantic fragment and a preset component library, determine the comprehensive score of each standard component type corresponding to each component; compare the comprehensive scores of all standard component types with preset score thresholds, and determine the target component type corresponding to each component from the standard component types whose comprehensive scores are greater than or equal to the score thresholds; perform fine-grained matching between each semantic fragment and the standard component names under the target component type to obtain the fine-grained matching degree; based on the fine-grained matching degree, determine the standard name of each component from the standard component names.
[0007] Secondly, a component identification device is provided, which adopts the following technical solution: The acquisition module is used to obtain the original names of each component in the target design draft; The cleaning module is used to perform multi-level standardization cleaning on the original name to obtain a standardized name, and then split the standardized name into multiple semantic fragments; The first determination module is used to determine the comprehensive score of each standard component type corresponding to each component based on each semantic fragment and the preset component library; The comparison module is used to compare the overall score of all standard component types with a preset score threshold, and determine the target component type corresponding to each component from the standard component types whose overall score is greater than or equal to the score threshold; The matching module is used to perform fine-grained matching between each semantic fragment and the name of each standard component under the target component type to obtain the fine-grained matching degree. The second determination module is used to determine the standard name of each component from the standard component names based on the fine-grained matching degree.
[0008] Thirdly, a computer device is provided, which adopts the following technical solution: Obtain the original names of each component in the target design draft; perform multi-level standardization cleaning on the original names to obtain standardized names, and break down the standardized names into multiple semantic fragments; based on each semantic fragment and a preset component library, determine the comprehensive score of each standard component type corresponding to each component; compare the comprehensive scores of all standard component types with preset score thresholds, and determine the target component type corresponding to each component from the standard component types whose comprehensive scores are greater than or equal to the score thresholds; perform fine-grained matching between each semantic fragment and the standard component names under the target component type to obtain the fine-grained matching degree; based on the fine-grained matching degree, determine the standard name of each component from the standard component names.
[0009] Fourthly, a computer-readable storage medium is provided, which adopts the following technical solution: Obtain the original names of each component in the target design draft; perform multi-level standardization cleaning on the original names to obtain standardized names, and break down the standardized names into multiple semantic fragments; based on each semantic fragment and a preset component library, determine the comprehensive score of each standard component type corresponding to each component; compare the comprehensive scores of all standard component types with preset score thresholds, and determine the target component type corresponding to each component from the standard component types whose comprehensive scores are greater than or equal to the score thresholds; perform fine-grained matching between each semantic fragment and the standard component names under the target component type to obtain the fine-grained matching degree; based on the fine-grained matching degree, determine the standard name of each component from the standard component names.
[0010] Compared with existing technologies, the embodiments of this application have the following main advantages: By obtaining the original names of each component and performing multi-level standardization cleaning, noise information such as version suffixes and special symbols in the names can be effectively removed, improving the quality of the basic data for recognition. Standardized names are split into multiple semantic fragments, allowing non-standard names to be decomposed into independent semantic units, providing fine-grained support for accurate matching. A comprehensive score is determined based on each semantic fragment and the component library and compared with a threshold, achieving multi-dimensional quantitative evaluation and preliminary screening, avoiding the limitations of single-name matching. Fine-grained matching is performed between semantic fragments and standard names under the target component type to obtain a fine-grained matching degree, achieving high-precision alignment at both the character and semantic levels. Finally, standard names are determined based on the fine-grained matching degree, maintaining high component recognition accuracy and low maintenance costs even in scenarios with non-standard naming and frequent standardization iterations. Attached Figure Description
[0011] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is an exemplary system architecture diagram to which this application can be applied; Figure 2 A flowchart of an embodiment of the component identification method according to this application; Figure 3 This is a schematic diagram of a component identification device according to an embodiment of the present application; Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation
[0013] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0014] like Figure 1 As shown, system architecture 100 may include terminal device 101, network 102, and server 103. Terminal device 101 may be a laptop 1011, tablet 1012, or mobile phone 1013. Network 102 is used as a medium to provide a communication link between terminal device 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables.
[0015] Users can use terminal device 101 to interact with server 103 via network 102 to receive or send messages, etc. Various communication client applications can be installed on terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0016] Terminal device 101 can be various electronic devices with a display screen and support web browsing. In addition to laptops 1011, tablets 1012, or mobile phones 1013, terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, and a desktop computer, etc.
[0017] Server 103 can be a server that provides various services, such as a backend server that provides support for the pages displayed on terminal device 101.
[0018] It should be noted that the component identification method provided in this application embodiment is generally executed by a server / terminal device, and correspondingly, the component identification device is generally set in the server / terminal device.
[0019] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0020] Continue to refer to Figure 2 The diagram illustrates a flowchart of an embodiment of the component identification method according to this application. The component identification method includes the following steps: Step S201: Obtain the original names of each component in the target design draft.
[0021] In this embodiment, the target design draft refers to the UI design file to be identified and standardized. The target design draft contains multiple components, each of which carries the original naming information given by the designer during the design process.
[0022] In this embodiment, each component refers to all UI element units contained in the target design draft, including but not limited to buttons, input boxes, cards, navigation bars, pop-ups, tabs and other interactive controls and container components. Each component has a unique node identifier and corresponding original name in the design draft.
[0023] In this embodiment, the original name refers to the initial naming string that the designer manually assigns to each component in the UI design tool or that is automatically generated by the tool. The original name usually does not follow a unified naming convention and has a high degree of randomness and subjectivity. For example, it may contain forms such as "btn", "button-copy3", "claims-entry_v2", etc., which may contain abbreviations, version suffixes, special symbols, business terms and non-semantic characters and other noise information.
[0024] Step S202: Perform multi-level standardization cleaning on the original name to obtain a standardized name, and then split the standardized name into multiple semantic fragments.
[0025] In this embodiment, multi-level standardization cleaning refers to a step-by-step processing flow that sequentially performs multiple stages on the original name. Each stage targets and removes or standardizes a specific type of noise information. Multi-level standardization cleaning may include a semantic expansion stage, a version suffix cleaning stage, a special symbol cleaning stage, and a format normalization stage. These stages can be executed sequentially in a preset order, with the output of the previous stage serving as the input for the next stage, thereby gradually transforming the non-standard original name into a semantically clear and format-consistent standardized name.
[0026] In this embodiment, the standardized name refers to the final name obtained after all stages of multi-level standardization cleaning. The standardized name has removed all version suffixes, special symbols and non-semantic noise, and has completed standardization operations such as abbreviation restoration and format unification. It can accurately reflect the core semantics of the component and provide high-quality basic data for subsequent semantic fragment splitting and fine-grained matching.
[0027] In this embodiment, multiple semantic fragments refer to splitting a standardized name into several independent semantic units according to a preset semantic segmentation rule. Each semantic fragment carries a part of the core semantic information in the standardized name. For example, "claims entry" can be split into two semantic fragments: "claims" and "entry". Multiple semantic fragments can describe the component from different semantic dimensions, providing fine-grained support for subsequent multi-dimensional matching with various standard component types in the component library.
[0028] Step S203: Based on each semantic fragment and the preset component library, determine the comprehensive score of each standard component type corresponding to each component.
[0029] In this embodiment, the component library refers to a pre-built and maintained collection of standardized components, which stores metadata information such as the type of each standard component and its corresponding standard component name, function description, and applicable scenarios, serving as a benchmark reference library for component identification and mapping.
[0030] In this embodiment, each standard component type refers to a predefined, standardized component category in the component library, such as button type, input box type, card type, navigation bar type, pop-up type, etc. Each type is associated with one or more standard component names.
[0031] In this embodiment, the comprehensive score refers to the quantitative evaluation result of the matching degree between a certain component and each standard component type. It is calculated by weighting the semantic matching degree and the weight value, and is used to measure the probability that the component belongs to a certain standard component type.
[0032] Step S204: Compare the comprehensive score of all standard component types with a preset score threshold, and determine the target component type corresponding to each component from the standard component types whose comprehensive score is greater than or equal to the score threshold.
[0033] In this embodiment, the score threshold refers to a pre-set lower limit of the value used to filter valid matching results. When the comprehensive score is greater than or equal to the threshold, the corresponding standard component type is included in the candidate range, thereby filtering out low-confidence matching results.
[0034] In this embodiment, the target component type refers to the standard component type with the highest comprehensive score selected from all standard component types with a comprehensive score greater than or equal to the score threshold. This is the component category to which the current component to be identified is most likely to belong.
[0035] Step S205: Perform fine-grained matching between each semantic fragment and the name of each standard component under the target component type to obtain the fine-grained matching degree.
[0036] In this embodiment, each standard component name refers to the predefined normalized name under each standard component type in the component library. As the final candidate name for component identification, it is the set of target names that the component to be identified needs to be mapped.
[0037] In this embodiment, fine-grained matching refers to a matching method that compares semantic fragments with standard component names at both the character and semantic levels. Compared to overall name matching, it can locate local correspondences within the name.
[0038] In this embodiment, fine-grained matching degree refers to the comprehensive matching degree between each semantic segment and the standard component name after dual similarity calculation and weighted fusion at the character level and semantic level. It is used to measure the degree of conformity between the component to be identified and each candidate standard name.
[0039] Step S206: Based on the fine-grained matching degree, determine the standard name of each component from the standard component names.
[0040] In this embodiment, the standard name refers to the final name determined by selecting the one with the highest fine-grained matching degree from all standard component names after fine-grained matching, which serves as the normalized mapping result of the component to be identified in the standard component library.
[0041] This application's embodiments effectively remove noise information such as version suffixes and special symbols from the names by obtaining the original names of each component and performing multi-level standardization cleaning, thereby improving the quality of the basic data for recognition. Standardized names are broken down into multiple semantic fragments, allowing non-standard names to be decomposed into independent semantic units, providing fine-grained support for accurate matching. A comprehensive score is determined based on each semantic fragment and the component library and compared with a threshold, achieving multi-dimensional quantitative evaluation and preliminary screening, avoiding the limitations of single-name matching. Fine-grained matching is performed between semantic fragments and standard names under the target component type to obtain a fine-grained matching degree, achieving high-precision alignment at both the character and semantic levels. Finally, standard names are determined based on the fine-grained matching degree, maintaining high component recognition accuracy and low maintenance costs even in scenarios with non-standard naming and frequent standardization iterations.
[0042] In some optional implementations of this embodiment, step 202, which involves performing multi-level standardization cleaning on the original name to obtain a standardized name, specifically includes the following steps: Based on a pre-defined semantic extension dictionary, the original name is semantically extended to obtain an extended name; based on pre-defined version suffix rules, the extended name is cleaned of version suffixes to obtain a version-processed name; based on a pre-defined set of special symbols, the version-processed name is cleaned of special symbols to obtain a symbol-processed name; based on pre-defined format specifications, the symbol-processed name is normalized to obtain a standardized name.
[0043] The semantic extended dictionary refers to a pre-built and maintained semantic mapping knowledge base that stores equivalent mappings between common abbreviations and their full semantic meanings in the UI design field, synonym mappings for business terms, multilingual terminology comparisons, and mappings between industry slang and standard terms.
[0044] Semantic expansion refers to the process of automatically identifying and replacing non-standard expressions such as abbreviations, acronyms, and multilingual terms in the original name with their corresponding complete semantic expressions or standard terms, based on the pre-defined mapping relationships in the semantic expansion dictionary and taking the original name as input. Semantic expansion can transform non-standard expressions into standard semantic forms that can be directly processed by subsequent processes without changing the core semantics of the original name.
[0045] The extended name refers to the intermediate name obtained after semantic expansion. Compared with the original name, the abbreviations in the extended name have been restored to their complete semantic expression.
[0046] Among them, the version suffix rules refer to a predefined set of rules used to identify and locate version-related suffixes in names. These rules are stored in the form of regular expressions, suffix enumeration lists, or pattern matching templates, covering common version identification forms in UI design naming.
[0047] Version suffix cleaning refers to the process of taking the extended name as input, matching layer by layer from the end of the extended name according to the version suffix rules, locating the substring that matches the version suffix rules, and then completely removing it.
[0048] The version processing name refers to the intermediate name obtained after cleaning the version suffix. Compared with the extended name, all version suffix information in the version processing name has been removed, but there may still be unprocessed noise information such as connectors, separators, and special characters.
[0049] Among them, the special symbol set refers to a predefined set of non-semantic special characters that need to be removed from the component name. It is stored in the form of character encoding range or enumeration list and covers various non-semantic characters commonly used in UI design naming.
[0050] Among them, special character cleaning refers to the process of taking the version processing name as input, traversing each character in the version processing name, and identifying and deleting the characters that match the special character set one by one.
[0051] The symbol processing name refers to the intermediate name obtained after cleaning up special symbols. Compared with the version processing name, all special symbols in the symbol processing name have been removed, and the name consists only of valid semantic characters.
[0052] The format specification refers to a predefined set of rules for standardizing the writing format of names, including but not limited to: rules for converting full-width characters to half-width characters, rules for converting uppercase letters to lowercase letters, rules for converting lowercase letters to uppercase letters, rules for removing leading and trailing spaces, rules for merging multiple consecutive spaces into a single space, and rules for removing extra whitespace characters at the beginning, end, and between words.
[0053] Format normalization refers to taking the symbol processing name as input and performing character-level format uniform conversion operations on the symbol processing name according to the format specifications, including full-width to half-width conversion, uniform uppercase and lowercase conversion, and normalization of spaces. Format normalization is the final stage of multi-level standardization cleaning.
[0054] In one example, after obtaining the original names of each component in the target design draft, the system first loads a pre-defined semantic extension dictionary. This dictionary pre-constructs multi-level semantic mapping relationships, including an abbreviation restoration layer, a business terminology mapping layer, and a multilingual comparison layer. After segmenting the original names, the system sequentially searches and matches each word at each level. If a word matches a mapping entry in the semantic extension dictionary, it is replaced with the corresponding complete semantic expression; otherwise, the original word is retained, resulting in the extended name. Next, the system loads pre-defined version suffix rules, stored as a list of regular expressions, sorted from longest to shortest. The system performs a layer-by-layer matching of the extended name from right to left, prioritizing the longest suffix rule. Once a suffix substring matching the rule is located, it is completely truncated. If multiple version suffixes exist, they are removed sequentially, resulting in the version-processed name. Finally, the system loads a pre-defined special symbol set, defined in the form of Unicode encoding ranges and enumerated characters. The system iterates through the version name character by character, checking if each character matches the special symbol set. If it does, it deletes the character; otherwise, it keeps it. After the iteration is complete, the remaining characters are reassembled in their original order to obtain the symbol name. Finally, the system loads a preset format specification and performs operations on the symbol name, including converting full-width characters to half-width characters, converting them to lowercase, removing leading and trailing spaces, and merging consecutive spaces into a single space. After completing all format normalization processing, the system outputs the final standardized name.
[0055] This application's embodiments semantically expand the original names based on a semantic expansion dictionary, automatically restoring various abbreviations, acronyms, and business jargon to complete semantic expressions, and supporting equivalent mapping in multilingual environments, improving the tool's versatility and adaptability. Version suffix cleaning is performed on the expanded names based on version suffix rules, automatically identifying and removing version noise information such as version numbers and copy markers, preventing interference with subsequent matching processes. Special symbol cleaning is performed on the version-processed names based on a special symbol set, accurately removing non-semantic characters such as connectors and separators, further purifying the name data. Format normalization is performed on the symbol-processed names based on format specifications, unifying differences in full-width and half-width characters, uppercase and lowercase letters, and spaces, ensuring consistent output name format and providing high-quality standardized input for subsequent fine-grained semantic segmentation and matching.
[0056] In some optional implementations, step 203, based on each semantic fragment and a pre-defined component library, determines the comprehensive score for each standard component type corresponding to each component, specifically including the following steps: Based on the frequency of occurrence and contextual relevance of each semantic segment in the preset component library, the weight value of each semantic segment is determined; each semantic segment is semantically matched with each standard component type in the component library to obtain the semantic matching degree between each semantic segment and each standard component type; the semantic matching degree and the corresponding weight value are weighted and calculated to obtain the comprehensive score of each standard component type.
[0057] Among them, context relevance refers to the metric that measures the degree of correlation between a semantic fragment and various standard component types in a specific business scenario or combined context, reflecting the distinguishing ability and directionality of the semantic fragment in actual use.
[0058] The weight value refers to a numerical weight coefficient calculated based on the frequency of occurrence of each semantic segment in the component library and its contextual relevance. It is used to reflect the differences in importance of different semantic segments in the final matching decision.
[0059] Semantic matching refers to comparing the semantic fragments with the names, descriptions, keywords, and other information of each standard component type in the component library at the semantic level, rather than simple character-level precise matching.
[0060] Among them, semantic matching degree refers to the quantitative output result of the semantic matching process, which represents the degree of semantic consistency between a certain semantic fragment and a certain standard component type.
[0061] The weighted calculation refers to multiplying the semantic matching degree with the corresponding weight value according to a preset formula and summing them. The weight value is used as a coefficient to differentiate and amplify or reduce the semantic matching degree, thereby obtaining a comprehensive score.
[0062] In one example, after acquiring each semantic fragment, the system iterates through a pre-defined component library, counting the frequency of each semantic fragment in the names, attribute descriptions, and tag information of all standard component types. Simultaneously, it calculates the context relevance score by combining the co-occurrence relationship of the semantic fragment with other semantic fragments in the same component name. The frequency and context relevance score are then normalized and merged according to a pre-defined ratio to determine the weight value of each semantic fragment. Subsequently, the system iterates through and compares each semantic fragment with the names, attributes, and tags of each standard component type in the component library. If a semantic fragment completely matches the alias of a standard component type, the semantic matching degree between the semantic fragment and the standard component type is set to the highest score according to the pre-defined exact matching rule. If a semantic fragment partially matches the attributes of a standard component type, the corresponding intermediate score is assigned as the semantic matching degree according to the weighted judgment rule based on the degree of attribute matching. If a semantic fragment does not appear in a standard component type, the semantic matching degree between the semantic fragment and the standard component type is set to the lowest score according to the irrelevance judgment rule. Finally, for each standard component type, the system performs a weighted calculation of the semantic matching degree of each semantic fragment under that type and its corresponding weight value. That is, after multiplying each set of semantic matching degrees by the corresponding weight value, the results are summed to obtain the comprehensive score of that standard component type.
[0063] This application's embodiments determine weight values based on the frequency of each semantic segment's occurrence in the component library and its contextual relevance. This quantifies the differences in the discriminative power of different semantic segments, allowing high-frequency core semantics to play a greater role in matching decisions and improving the rationality of the scoring. Semantic segments are compared with the names, attributes, and tags of each standard component type, and semantic matching degrees are determined based on three scenarios: complete alias match, partial attribute match, and absence. This achieves multi-level semantic alignment from precise to fuzzy, overcoming the limitations of single-character matching. A comprehensive score is obtained by weighting the semantic matching degree with the corresponding weight value. This differentiated weighting mechanism integrates both semantic similarity and segment importance information, enabling precise selection of the most likely target component type from numerous candidate types.
[0064] In some optional implementations, the step "determine the weight value of each semantic fragment based on its frequency of occurrence and contextual relevance in a preset component library" specifically includes the following steps: The system counts the number of times each semantic segment appears in all standard component names and component description texts in the preset component library; calculates the frequency of each semantic segment based on the number of occurrences; calculates the context relevance score between each semantic segment and each standard component type in the component library based on preset context association rules; performs a weighted fusion of the frequency of occurrence and the context relevance score to obtain the initial weight value of each semantic segment; and normalizes the initial weight values of all semantic segments to obtain the weight value of each semantic segment.
[0065] Among them, context association rules refer to a predefined set of logical rules used to measure the reasonableness of a semantic fragment appearing in a specific component type context.
[0066] Among them, the context relevance score refers to the numerical value obtained by quantifying and scoring the degree of association between a certain semantic fragment and a certain standard component type in actual use scenarios based on context association rules. The higher the score, the greater the likelihood that the semantic fragment will appear in the naming context of the component type.
[0067] Weighted fusion refers to the process of multiplying the frequency of occurrence and the context relevance score by their respective weights according to a preset ratio coefficient and then summing them. Weighted fusion achieves the organic integration of multi-dimensional information by assigning different contribution ratios to the two dimensions.
[0068] The initial weight value refers to the original weight value of each semantic segment obtained after weighted fusion. The initial weight value has not been normalized and its range may fluctuate greatly due to the frequency of occurrence and contextual relevance of each semantic segment.
[0069] In one example, the system first traverses a pre-defined component library, extracting all standard component names and descriptions to construct a unified search text set. Then, the system performs a full-text search on each semantic fragment within this search text set, counting the total number of times each semantic fragment is matched in all standard component names and descriptions. This count is then divided by the total number of terms in the search text set to calculate the frequency of each semantic fragment. Next, the system loads pre-defined context association rules, which can be stored as a "semantic fragment-component type" association matrix. Each element in the matrix represents a pre-defined association strength between a semantic fragment and a standard component type. For each semantic fragment, the system traverses all standard component types in the component library and calculates the context relevance score between the semantic fragment and each standard component type based on the corresponding association strength value in the association matrix. Finally, the system weights and fuses the frequency of each semantic fragment with its corresponding context relevance score according to a pre-defined weighting ratio, i.e., multiplying both by their respective weighting coefficients and then summing them to obtain the initial weight value for each semantic fragment. Finally, the system uses a normalization method to map the initial weight values of all semantic segments to the range of zero to one, so that the sum of all weight values is one, thereby obtaining the final weight value of each semantic segment.
[0070] This application's embodiments quantify the generality of each semantic segment by statistically analyzing its occurrence frequency in the component library, allowing high-frequency semantic segments to play a greater role in subsequent matching. Calculating a context relevance score based on context association rules measures the reasonableness of matching segments with component types from a semantic association dimension, overcoming the shortcomings of relying solely on frequency statistics. Weighted fusion of occurrence frequency and context relevance score yields initial weight values, achieving multi-dimensional organic integration of statistical and association features and improving the comprehensiveness of weight evaluation. Normalization of all initial weight values eliminates the influence of differences in dimensions, ensuring that the weight values of each semantic segment are comparable on the same scale.
[0071] In some optional implementations, the step "semantically matching each semantic fragment with each standard component type in the component library to obtain the semantic matching degree between each semantic fragment and each standard component type" specifically includes the following steps: Each semantic fragment is compared with the name, attributes, and tags of each standard component type in the component library. If a semantic fragment completely matches an alias of a standard component type, the semantic matching degree between each semantic fragment and each standard component type is determined according to the preset exact matching rule. If a semantic fragment partially matches an attribute of a standard component type, the semantic matching degree between each semantic fragment and each standard component type is determined according to the weighted judgment rule. If a semantic fragment does not appear in a standard component type, the semantic matching degree between each semantic fragment and each standard component type is determined according to the irrelevance judgment rule.
[0072] Among them, the precise matching rule refers to the preset rule that should be assigned the highest semantic matching degree when a semantic fragment is completely consistent with the alias of a certain standard component type. Usually, the semantic matching degree is set to a fixed high score close to the full score, indicating that there is a definite strong correspondence between the semantic fragment and the standard component type.
[0073] The weighted judgment rule refers to a pre-defined rule used to score semantic fragments based on factors such as the degree of matching, field type, and matching position when the semantic fragments partially match the attributes of a certain standard component type. Different degrees of matching correspond to different intermediate scores, so that the semantic matching degree can reflect the confidence difference of partial matching.
[0074] The irrelevance judgment rule refers to the preset rule that should be assigned the minimum semantic matching degree when a semantic fragment does not appear in the name, attribute and tag of a certain standard component type. The semantic matching degree is usually set to a fixed low score close to zero, indicating that there is no effective association between the semantic fragment and the standard component type.
[0075] In one example, after acquiring each semantic fragment, the system first loads the names, attribute fields, and tag sets of all standard component types in the component library to construct a multi-dimensional comparison target set. Then, the system compares each semantic fragment sequentially with the alias set of each standard component type. If a semantic fragment is completely identical to an alias at the character level, an exact match rule is triggered, and the semantic match degree between the semantic fragment and the standard component type is directly assigned the preset highest score. If an exact match is not triggered, the system further compares the semantic fragment with each attribute field of each standard component type, counting the number and proportion of fields that are identical or nearly identical to the semantic fragment. Based on a weighted judgment rule, corresponding intermediate scores are assigned as semantic match degrees according to the number of identical fields and their importance. If a semantic fragment neither completely matches any alias nor partially matches any attribute field, an irrelevant judgment rule is triggered, and the semantic match degree between the semantic fragment and the standard component type is assigned the preset lowest score. This process is executed for each combination of all semantic fragments and all standard component types, ultimately outputting the complete semantic match degree.
[0076] This application's embodiments construct a multi-dimensional semantic alignment channel by traversing and comparing each semantic fragment with the names, attributes, and tags of each standard component type, overcoming the limitations of single name comparison. If a semantic fragment completely matches an alias, the semantic matching degree is determined according to the precise matching rule, which assigns the highest confidence to highly deterministic semantic correspondences, ensuring the reliability of the core matching results. If a semantic fragment partially matches an attribute, the semantic matching degree is determined according to the weighted judgment rule, and a tiered scoring mechanism distinguishes different degrees of partial matching, enabling the semantic matching degree to finely reflect the confidence gradient of fuzzy matching. If a semantic fragment does not appear, the semantic matching degree is determined according to the irrelevance judgment rule, which assigns the lowest score to unrelated cases, effectively suppressing the interference of irrelevant component types and improving the discriminative ability of the comprehensive score.
[0077] In some optional implementations, after comparing the overall score of all standard component types with a preset score threshold in step S204, the specific steps include: If the overall score of all standard component types is less than the score threshold, then the hierarchical full path information of each component in the target design draft is extracted to construct the hierarchical semantic chain of each component; based on the hierarchical semantic chain, the semantic information of the parent component of each component is obtained; the semantic information of the parent component is analyzed with the semantic fragments of each component to obtain multiple context association scores; each context association score is fused with the overall score of each component to obtain a fused score; based on the fused score, the target component type corresponding to each component is determined from each standard component type.
[0078] Among them, the hierarchical full path information refers to the path information of all parent nodes that the component to be identified passes through in the interface hierarchy tree of the target design draft from the root node to the component node, such as "page - form container - information group - button", which reflects the nesting position of the component in the interface structure.
[0079] Among them, the hierarchical semantic chain refers to the ordered semantic sequence formed by concatenating the semantic information of each level of nodes in the hierarchical full path information in hierarchical order. This sequence fully describes the context of the component in the interface structure.
[0080] The semantic information of the parent component refers to the semantic content carried by the next-level node in the hierarchical semantic chain that is immediately above the component to be identified, including the name, type, and functional description of the parent component, which is used to provide structural context clues for the component to be identified.
[0081] Among them, contextual association analysis refers to the process of jointly comparing the semantic information of the parent component with the semantic fragments of the component to be identified, and analyzing the degree of logical association between the two in terms of function, business, form and other dimensions.
[0082] Among them, multiple context association scores refer to the association quantification scores calculated by context association analysis for each pair of "parent component semantics - semantic fragments". Each score reflects the strength of the parent component semantics' interpretation or constraint on the semantic fragment.
[0083] Among them, the fusion score refers to the final score obtained by merging each context-related score with the original comprehensive score of the component according to a preset strategy. It is used to make compensatory decisions based on context information when the comprehensive score is insufficient.
[0084] In one example, when the system detects that the overall score for all standard component types is less than a preset score threshold, the system initiates a compensation recognition process based on hierarchical context. First, the system extracts the full hierarchical path information of the component to be identified from the interface hierarchy tree structure of the target design draft. Specifically, the system traverses upwards from the component node, level by level, up to the root node, recording the node identifier, node type, and node name of each level node in sequence to form complete hierarchical path information. Then, the system concatenates and encodes the semantic information of each level node in the path in order from root to leaf, constructing the hierarchical semantic chain of the component. Next, the system locates the next-level node immediately preceding the component to be identified in the hierarchical semantic chain and extracts its name, type, and functional description as the semantic information of the parent component. The system performs contextual association analysis between the semantic information of the parent component and each semantic fragment of the component to be identified, specifically using an attention mechanism to calculate the weighted attention level of the parent component's semantics to each semantic fragment, outputting a contextual association score for each pairing. Subsequently, the system merges each context association score with the component's original comprehensive score using a preset linear weighting formula. The merged score equals the comprehensive score multiplied by a preset base weighting coefficient plus the context association score multiplied by a preset compensation weighting coefficient. Finally, based on all merged scores, the system selects the type corresponding to the highest merged score from all standard component types, determining it as the target component type.
[0085] This application's embodiments extract hierarchical full-path information and construct a hierarchical semantic chain if all comprehensive scores are less than a score threshold. This proactively introduces hierarchical contextual information from the interface structure as supplementary basis when the semantics of the component itself are insufficient to support the matching decision. Obtaining the semantic information of the parent component based on the hierarchical semantic chain allows for accurate location of the most directly structurally related superior semantics of the component to be identified, providing highly relevant contextual anchors for subsequent analysis. Contextual association analysis of the parent component's semantics with each semantic fragment yields multiple contextual association scores, enabling a structural interpretation of each semantic fragment, compensating for the shortcomings of single semantic matching. The contextual association scores and comprehensive scores are fused to obtain a fused score. A compensatory weighting mechanism injects structural contextual information into the original score, effectively improving the recognition success rate in low-confidence scenarios. The target component type is determined based on the fused score, enabling reliable component classification even in cases of highly non-standard naming, leveraging hierarchical contextual relationships.
[0086] In some optional implementations, step S205 involves performing fine-grained matching between each semantic fragment and the name of each standard component under the target component type to obtain the fine-grained matching degree. This specifically includes the following steps: For each semantic fragment, the corresponding name text fragment is extracted from the standard component names under the target component type. Character-level and semantic-level similarity calculations are performed between each semantic fragment and its corresponding name text fragment to obtain the character matching degree and semantic matching degree between each semantic fragment and its corresponding name text fragment. Based on preset character and semantic weights, the character matching degree and its corresponding semantic matching degree for each semantic fragment are weighted and fused to obtain the sub-fine-grained matching degree between each semantic fragment and its corresponding name text fragment. The sub-fine-grained matching degrees between each semantic fragment and its corresponding name fragment are aggregated to obtain the fine-grained matching degree between each semantic fragment and the standard component names under the target component type.
[0087] Among them, the name text fragment refers to the local text substring extracted from the names of each standard component under the target component type, which corresponds to the semantic fragment in terms of position or semantics, and serves as the direct comparison object for that semantic fragment.
[0088] Character-level similarity calculation refers to the process of comparing two texts at the character level. Algorithms such as edit distance and longest common subsequence can be used to measure the similarity between the two texts in terms of their literal form.
[0089] Semantic similarity calculation refers to the process of comparing the meanings of two texts at the semantic level. Methods such as word vector cosine similarity and semantic embedding models can be used to measure the degree of similarity between the two texts in terms of their deeper meanings.
[0090] Among them, character matching degree refers to the quantitative output result of character-level similarity calculation, which represents the degree of matching between two text segments in terms of character form.
[0091] Among them, semantic matching degree refers to the quantitative output result of semantic similarity calculation, which represents the degree of matching between two texts in deep semantics.
[0092] Among them, character weight refers to a preset coefficient used to adjust the contribution ratio of character matching degree to the final fine-grained matching degree, reflecting the importance of character-level precise matching.
[0093] Among them, semantic weight refers to a preset coefficient used to adjust the contribution ratio of semantic matching degree to the final sub-fine-grained matching degree, reflecting the importance of semantic-level fuzzy matching.
[0094] Among them, the sub-fine-grained matching degree refers to the local matching degree obtained by weighted fusion of character matching degree and semantic matching degree between a single semantic fragment and its corresponding name text fragment, and is the basic unit that constitutes the final fine-grained matching degree.
[0095] In one example, after determining the target component type, the system first extracts the corresponding name text fragments semantically or positionally from all standard component names under the target component type, based on preset fragment location rules. Specifically, the system splits the standard component names according to preset delimiters and performs preliminary semantic association between each sub-fragment and the current semantic fragment, selecting the sub-fragment with the highest association as the name text fragment. Subsequently, the system calculates character-level similarity between each semantic fragment and its corresponding name text fragment, using an edit distance algorithm to compare the differences between the two texts character by character, normalizing the edit distance to a character matching degree within the range of 0 to 1. Simultaneously, the system extracts the semantic feature vectors of the two pre-trained semantic embedding models using the same pair of text inputs, and calculates the cosine similarity between the vectors as the semantic matching degree. Next, the system loads preset character weights and semantic weights, multiplies the character matching degree of each semantic fragment by the character weight, multiplies the semantic matching degree by the semantic weight, and then sums them to obtain the sub-fine-grained matching degree between the semantic fragment and the corresponding name text fragment. Finally, the system uses a weighted summation aggregation method to accumulate the sub-fine-grained matching degree corresponding to each semantic segment, and then normalizes it by dividing by the total number of semantic segments to obtain the fine-grained matching degree between each semantic segment and the standard component name under the target component type.
[0096] This application's embodiments achieve precise alignment from the overall name to local fragments by extracting corresponding name text fragments from the standard component name for each semantic segment, refining the matching granularity to the internal structure of the name. Character-level and semantic-level similarity calculations are performed separately, balancing literal accuracy with deep meaning consistency, overcoming the limitations of single-dimensional matching. A weighted fusion based on character weights and semantic weights yields a sub-fine-grained matching degree, allowing flexible adjustment of the contribution ratio of the two matching dimensions to adapt to matching preferences in different naming scenarios. The sub-fine-grained matching degrees are aggregated to obtain a fine-grained matching degree. Multi-segment collaborative evaluation achieves a global and refined measurement of the standard component name, effectively improving the accuracy of the final standard name determination.
[0097] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0098] Further reference Figure 3As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of a component identification device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0099] like Figure 3 As shown, the component identification device 400 of this embodiment includes: an acquisition module 401, a cleaning module 402, a determination module 403, a comparison module 404, a matching module 405, and a determination module 406. Wherein: Module 401 is used to obtain the original names of each component in the target design draft; The cleaning module 402 is used to perform multi-level standardization cleaning on the original name to obtain a standardized name, and then split the standardized name into multiple semantic fragments. The first determining module 403 is used to determine the comprehensive score of each standard component type corresponding to each component based on each semantic fragment and the preset component library; The comparison module 404 is used to compare the comprehensive score of all standard component types with a preset score threshold, and determine the target component type corresponding to each component from the standard component types whose comprehensive score is greater than or equal to the score threshold; Matching module 405 is used to perform fine-grained matching between each semantic fragment and the name of each standard component under the target component type to obtain the fine-grained matching degree; The second determining module 406 is used to determine the standard name of each component from the standard component names based on the fine-grained matching degree.
[0100] This application's embodiments effectively remove noise information such as version suffixes and special symbols from the names by obtaining the original names of each component and performing multi-level standardization cleaning, thereby improving the quality of the basic data for recognition. Standardized names are broken down into multiple semantic fragments, allowing non-standard names to be decomposed into independent semantic units, providing fine-grained support for accurate matching. A comprehensive score is determined based on each semantic fragment and the component library and compared with a threshold, achieving multi-dimensional quantitative evaluation and preliminary screening, avoiding the limitations of single-name matching. Fine-grained matching is performed between semantic fragments and standard names under the target component type to obtain a fine-grained matching degree, achieving high-precision alignment at both the character and semantic levels. Finally, standard names are determined based on the fine-grained matching degree, maintaining high component recognition accuracy and low maintenance costs even in scenarios with non-standard naming and frequent standardization iterations.
[0101] In one embodiment, the cleaning module 402 includes: The extension submodule is used to semantically extend the original name based on a preset semantic extension dictionary to obtain the extended name; The first cleaning submodule is used to clean the version suffix of the expanded name based on the preset version suffix rules to obtain the version processed name; The second cleaning submodule is used to clean the special symbols in the version processing name based on a preset special symbol set, so as to obtain the symbol processing name. The normalization submodule is used to normalize the format of symbol processing names based on preset format specifications, so as to obtain standardized names.
[0102] In one embodiment, the first determining module 403 includes: The determination submodule is used to determine the weight value of each semantic segment based on the frequency of occurrence of each semantic segment in the preset component library and its contextual relevance. The matching submodule is used to perform semantic matching between each semantic fragment and each standard component type in the component library to obtain the semantic matching degree between each semantic fragment and each standard component type. The weighted submodule is used to calculate the semantic matching degree and the corresponding weight value respectively to obtain the comprehensive score of each standard component type.
[0103] In one embodiment, the determining submodule is further configured to count the number of times each semantic segment appears in all standard component names and component description texts in a preset component library; calculate the occurrence frequency of each semantic segment based on the occurrence frequency; calculate the context relevance score between each semantic segment and each standard component type in the component library based on preset context association rules; perform weighted fusion of occurrence frequency and context relevance score to obtain the initial weight value of each semantic segment; and normalize the initial weight values of all semantic segments to obtain the weight value of each semantic segment.
[0104] In one embodiment, the matching submodule is further configured to iterate and compare each semantic fragment with the name, attribute, and tag of each standard component type in the component library; if a semantic fragment completely matches an alias of a standard component type, the semantic matching degree between each semantic fragment and each standard component type is determined according to a preset precise matching rule; if a semantic fragment partially matches an attribute of a standard component type, the semantic matching degree between each semantic fragment and each standard component type is determined according to a weighted judgment rule; if a semantic fragment does not appear in a standard component type, the semantic matching degree between each semantic fragment and each standard component type is determined according to an irrelevant judgment rule.
[0105] In one embodiment, the matching module 405 includes: The extraction submodule is used to extract the name text fragment corresponding to each semantic fragment from the standard component names under the target component type for each semantic fragment. The similarity calculation submodule is used to perform character-level similarity calculation and semantic-level similarity calculation between each semantic segment and its corresponding name text segment, respectively, to obtain the character matching degree and semantic matching degree between each semantic segment and its corresponding name text segment; The fusion submodule is used to perform weighted fusion of the character matching degree and the corresponding semantic matching degree of each semantic segment based on preset character weights and semantic weights, so as to obtain the sub-fine-grained matching degree between each semantic segment and the corresponding name text segment; The aggregation submodule is used to aggregate the fine-grained matching degree between each semantic fragment and its corresponding name fragment, so as to obtain the fine-grained matching degree between each semantic fragment and the standard component name under the target component type.
[0106] In one embodiment, the component identification device 400 further includes: The extraction module is used to extract the hierarchical full path information of each component in the target design draft and construct the hierarchical semantic chain of each component if the comprehensive score of all standard component types is less than the score threshold. The information acquisition module is used to acquire the semantic information of the parent components of each component based on the hierarchical semantic chain. The analysis module is used to perform contextual association analysis between the semantic information of the parent component and the semantic fragments of each component to obtain multiple contextual association scores; The fusion module is used to merge each context-related score with the comprehensive score corresponding to each component to obtain a fusion score; The third determination module is used to determine the target component type corresponding to each component from the various standard component types based on the fusion score.
[0107] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0108] Computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected via a system bus. It should be noted that only computer device 6 with memory 61, processor 62, and network interface 63 is shown in the figure; however, it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described herein is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0109] Computer devices can include desktop computers, laptops, handheld computers, and cloud servers. These devices allow for human-computer interaction with users through keyboards, mice, remote controls, touchpads, or voice-activated devices.
[0110] The memory 61 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as the hard disk or memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 6. Of course, the memory 61 may also include both the internal storage unit and the external storage device of the computer device 6. In this embodiment, the memory 61 is typically used to store the operating system and various application software installed on the computer device 6, such as computer-readable instructions for component identification methods. In addition, the memory 61 may also be used to temporarily store various types of data that have been output or will be output.
[0111] In some embodiments, processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. Processor 62 is typically used to control the overall operation of computer device 6. In this embodiment, processor 62 is used to execute computer-readable instructions stored in memory 61 or to process data, such as computer-readable instructions for executing a component identification method.
[0112] The network interface 63 may include a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the computer device 6 and other electronic devices.
[0113] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the component identification method described above.
[0114] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of the various embodiments of this application.
[0115] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
[0116] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.
Claims
1. A component identification method, characterized in that, Includes the following steps: Obtain the original names of each component in the target design draft; The original name is subjected to multi-level standardization cleaning to obtain a standardized name, and the standardized name is then split into multiple semantic fragments; Based on each semantic fragment and a pre-defined component library, a comprehensive score is determined for each standard component type corresponding to each component. The overall score of all standard component types is compared with a preset score threshold, and the target component type corresponding to each component is determined from the standard component types whose overall score is greater than or equal to the score threshold. The semantic fragments are matched with the names of standard components under the target component type in a fine-grained manner to obtain the fine-grained matching degree. Based on the fine-grained matching degree, the standard name of each component is determined from the standard component names.
2. The method according to claim 1, characterized in that, The step of performing multi-level standardization cleaning on the original name to obtain a standardized name specifically includes: Based on a pre-defined semantic extension dictionary, the original name is semantically extended to obtain the extended name; Based on preset version suffix rules, the extended name is cleaned of version suffixes to obtain the version processed name; Based on a preset set of special symbols, the version processing name is cleaned of special symbols to obtain a symbol processing name; Based on the preset format specifications, the symbol processing name is normalized to obtain a standardized name.
3. The method according to claim 1, characterized in that, The step of determining the comprehensive score of each standard component type corresponding to each component based on each semantic fragment and a preset component library specifically includes: The weight value of each semantic segment is determined based on its frequency of occurrence in the preset component library and its contextual relevance. The semantic fragments are semantically matched with the standard component types in the component library to obtain the semantic matching degree between the semantic fragments and the standard component types; The semantic matching degree and the corresponding weight value are weighted and calculated respectively to obtain the comprehensive score of each standard component type.
4. The method according to claim 3, characterized in that, The step of determining the weight value of each semantic segment based on its frequency of occurrence and contextual relevance in a preset component library specifically includes: Count the number of times each semantic fragment appears in the names and descriptions of all standard components in the preset component library; The frequency of occurrence of each semantic segment is calculated based on the number of occurrences. Based on preset context association rules, the context relevance score between each semantic fragment and each standard component type in the component library is calculated; The occurrence frequency and the context relevance score are weighted and fused to obtain the initial weight value of each semantic segment; The initial weight values of all semantic segments are normalized to obtain the weight values of each semantic segment.
5. The method according to claim 3, characterized in that, The step of semantically matching each semantic fragment with each standard component type in the component library to obtain the semantic matching degree between each semantic fragment and each standard component type specifically includes: Each semantic fragment is compared with the name, attributes, and tags of each standard component type in the component library. If the semantic fragment completely matches the alias of a certain standard component type, then the semantic matching degree between each semantic fragment and each standard component type is determined according to the preset precise matching rules; If the semantic fragment matches an attribute of a certain standard component type, the semantic matching degree between each semantic fragment and each standard component type is determined according to the weighted judgment rule. If the semantic fragment does not appear in a certain standard component type, the semantic matching degree between each semantic fragment and each standard component type is determined according to the irrelevance judgment rule.
6. The method according to claim 1, characterized in that, Following the step of comparing the overall score of all standard component types with a preset score threshold, the method further includes: If the overall score of all standard component types is less than the score threshold, then the hierarchical full path information of each component in the target design draft is extracted, and the hierarchical semantic chain of each component is constructed. Based on the hierarchical semantic chain, the semantic information of the parent component of each component is obtained; The semantic information of the parent component is analyzed in relation to the semantic fragments of each component to obtain multiple context association scores. Each context association score is then fused with the comprehensive score corresponding to each component to obtain a fused score. Based on the fusion score, the target component type corresponding to each component is determined from the standard component types.
7. The method according to claim 1, characterized in that, The step of performing fine-grained matching between each semantic fragment and each standard component name under the target component type to obtain a fine-grained matching degree specifically includes: For each semantic fragment, extract the name text fragment corresponding to each semantic fragment from the standard component names under the target component type; Each semantic segment is compared with its corresponding name text segment using character-level similarity calculation and semantic-level similarity calculation, respectively, to obtain the character matching degree and semantic matching degree between each semantic segment and its corresponding name text segment; Based on preset character weights and semantic weights, the character matching degree and the corresponding semantic matching degree of each semantic segment are weighted and fused to obtain the sub-fine-grained matching degree between each semantic segment and the corresponding name text segment; The fine-grained matching degree between each semantic fragment and its corresponding name fragment is aggregated to obtain the fine-grained matching degree between each semantic fragment and each standard component name under the target component type.
8. A component identification device, characterized in that, include: The acquisition module is used to obtain the original names of each component in the target design draft; The cleaning module is used to perform multi-level standardization cleaning on the original name to obtain a standardized name, and to split the standardized name into multiple semantic fragments; The first determining module is used to determine the comprehensive score of each standard component type corresponding to each component based on each semantic fragment and a preset component library; The comparison module is used to compare the comprehensive score of all standard component types with a preset score threshold, and determine the target component type corresponding to each component from the standard component types whose comprehensive score is greater than or equal to the score threshold; The matching module is used to perform fine-grained matching between each semantic fragment and each standard component name under the target component type to obtain the fine-grained matching degree; The second determining module is used to determine the standard name of each component from the standard component names based on the fine-grained matching degree.
9. A computer device, characterized in that, The device includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the component identification method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions that, when executed by a processor, implement the steps of the component identification method as described in any one of claims 1 to 7.