Database construction method and system based on electronic components

By constructing component association maps and performing pin function semantic analysis, the problem of insufficient expression of complex association relationships in existing databases when processing component data is solved, and efficient and accurate component query and replacement are achieved.

CN119621700BActive Publication Date: 2025-06-20SHENZHEN CHUANGXIN ONLINE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411509197.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-06-20
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

When processing component data, existing electronic component databases lack effective expression and utilization of complex correlation relationships, resulting in inaccurate query results and difficult to meet the needs of complex application scenarios.

Method used

Component information is collected through the electronic component trading platform, component correlation map is constructed, multi-dimensional attribute extraction and similarity calculation are performed, and cluster analysis is performed to achieve effective classification of components. At the same time, through pin function semantic analysis and compatibility matrix construction, the accuracy and physical compatibility of query results are ensured.

Benefits of technology

It realizes refined matching and query of components, improves the accuracy and success rate of component replacement, and enhances the query efficiency and scalability of the database.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621700B_ABST
    Figure CN119621700B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of electronic component data processing, and particularly relates to a method and system for constructing a database based on electronic components. The method includes the following steps: collecting component information through an electronic component trading platform to obtain an original component data set; constructing a component relationship mapping based on the original component data set to obtain a component association graph; extracting multi-dimensional attributes from the component association graph to obtain component attribute vectors; calculating component similarity and performing clustering analysis based on the component attribute vectors to obtain component clustering clusters; and extracting pin information based on the component clustering clusters to obtain a clustering cluster pin data set. The present invention realizes multi-dimensional condition screening, sorting, and result interpretation, provides accurate, reliable, and easy-to-understand component replacement recommendation solutions for users, helps users quickly find suitable components, and improves the efficiency of electronic design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic component data processing, and particularly to a method and system for constructing a database based on electronic components. Background Art

[0002] In the field of electronic components, traditional database construction methods mainly rely on relational databases, storing and managing component information in the form of two-dimensional tables. This method has certain advantages in processing structured data, but when faced with the highly correlated characteristics of electronic component data, it often shows some deficiencies:

[0003] 1. Insufficient expression of association relationships: Many databases only focus on the basic parameter information of components, lacking effective expression and utilization of complex association relationships such as equivalent substitution, pin mapping, and package forms, resulting in inaccurate query results and difficulty in meeting the requirements of complex application scenarios.

[0004] 2. Lack of semantic information: Some databases only store the text information of components, lacking extraction and analysis of semantic information such as pin functions and application scenarios, making it difficult to perform accurate matching and intelligent recommendation.

[0005] 3. Insufficient compatibility analysis: Some databases lack analysis of component package and pin compatibility, resulting in physical conflicts or functional mismatches in the recommended alternative components, increasing design risks. Summary of the Invention

[0006] Based on this, it is necessary to provide a method and system for constructing a database based on electronic components to solve at least one of the above technical problems.

[0007] To achieve the above object, a method for constructing a database based on electronic components includes the following steps:

[0008] Step S1: Collect component information through an electronic component trading platform to obtain an original component data set; construct a component relationship mapping based on the original component data set to obtain a component association graph; extract multi-dimensional attributes from the component association graph to obtain component attribute vectors; calculate component similarity and perform clustering analysis based on the component attribute vectors to obtain component clustering clusters;

[0009] Step S2: Extract pin information based on the component clustering clusters to obtain a clustered pin data set; perform pin function semantic analysis on the clustered pin data set to obtain a semantic clustered pin data set; construct a pin compatibility matrix based on the semantic clustered pin data set to obtain a pin compatibility matrix; perform package compatibility analysis based on the component clustering clusters and the pin compatibility matrix to obtain a package compatibility table;

[0010] Step S3: constructing an electronic component database according to the component clusters, the pin compatibility matrix, and the package compatibility table to obtain an electronic component database;

[0011] Step S4: obtaining the target component information input by the user through the electronic component database; performing an equivalent replacement recommendation query based on the target component information to obtain a replacement recommendation list to implement the electronic component data query operation.

[0012] The present invention constructs a component association graph containing rich information and semantic associations through automated data collection, relationship analysis and attribute extraction, and uses graph algorithms and cluster analysis to effectively classify components in the database, laying a solid foundation for subsequent component query and recommendation. Through deep semantic analysis of pin functions, a pin compatibility matrix and a package compatibility table are constructed, and refined matching of component pins and packages is achieved, overcoming the limitations of traditional methods that only rely on text matching, and improving the accuracy and success rate of component replacement. According to user query requirements, the database is optimized in a targeted manner, such as creating indexes, adjusting parameters, and performing data sharding, thereby improving the query efficiency, concurrent processing capability and scalability of the database, and providing users with efficient and stable query services. Comprehensively utilizing information such as component association graphs, similarity matrices, and compatibility matrices, multi-dimensional condition screening, sorting, and result interpretation are achieved, providing users with accurate, reliable, and easy-to-understand component replacement recommendation solutions, helping users quickly find suitable components, and improving electronic design efficiency. Therefore, the present invention provides a database construction method based on electronic components, which effectively solves the problem of strong data association. Use graph databases to build component association graphs, intuitively express complex relationships such as equivalent substitution, upstream and downstream between components, and provide a basis for accurate query and intelligent recommendation. Through natural language processing and knowledge graph technology, semantic analysis of component pin functions is performed to build semantic clustering cluster pin data sets and pin compatibility matrices to achieve more accurate component matching. Consider the packaging form of components, build a package compatibility table through package information matching and compatibility rule base to ensure that the recommended alternative components are physically compatible. In the query stage, combined with information such as component association graphs, similarity matrices, and compatibility matrices, users are supported to perform multi-dimensional condition screening and sorting, and recommend the most appropriate alternatives.

[0013] Preferably, step S1 comprises the following steps:

[0014] Step S11: collecting component information through the electronic component trading platform to obtain an original component data set; performing component potential relationship analysis on the original component data set, and classifying the relationships to obtain a component relationship set;

[0015] Step S12: Evaluate the relationship weights of the component relationship set to obtain a weighted component relationship set;

[0016] Step S13: Import the weighted component relationship set into a preset graph database for graph visualization processing to obtain an initial component association graph;

[0017] Step S14: Obtain application requirement data; optimize and improve the initial component association graph according to the application requirement data to obtain a component association graph;

[0018] Step S15: Extract multi-dimensional attributes of the component association graph to obtain component attribute vectors;

[0019] Step S16: Calculate the similarity of components and perform clustering analysis according to the component attribute vectors to obtain component clustering clusters.

[0020] In the present invention, by obtaining and parsing component information from component supplier websites and analyzing the potential relationships between components, a component relationship set is constructed, providing a data basis for subsequent construction of a component association graph, avoiding the cumbersome work of manually collecting and organizing data, and improving the efficiency and coverage of data acquisition. By assigning different weights to different types of relationships, for example, the weight of the "equivalent substitution relationship" is higher than that of the "functional relationship", the association degree between components can be more accurately described, making the constructed component association graph more in line with the actual situation and improving the reliability and reference value of the graph. Importing the weighted component relationship set into a graph database and using the visualization tool of the graph database for display can intuitively present the complex relationships between components, facilitating users to understand and analyze the relevance between components and providing a visual reference for subsequent component query and recommendation. By introducing actual application requirement data, such as circuit board design files, bill of materials, etc., to optimize and improve the component association graph, the graph can be made closer to the actual application scenario, improving the practicality and pertinence of the graph. For example, it can identify common component combinations and substitution schemes in actual applications. Using graph algorithms to extract multi-dimensional attribute information of components, such as degree centrality, betweenness centrality, PageRank value, etc., can more comprehensively describe the status and role of components in the graph, overcoming the limitations of traditional methods that only rely on the attributes of components themselves and providing richer feature information for subsequent component similarity calculation and clustering analysis. According to the component attribute vectors, using the cosine similarity algorithm to calculate the similarity between components and using the K-Means clustering algorithm to divide components with high similarity into the same clustering cluster can effectively classify the components in the database, facilitating users to quickly find components with similar functions and mutually replaceable components, improving the efficiency and accuracy of component query and recommendation.

[0021] Preferably, step S15 includes the following steps:

[0022] Step S151: Perform attribute information expansion processing on the component association graph to obtain an expanded component association graph;

[0023] Step S152: Perform attribute standardization processing on the expanded component association graph to obtain a standardized component attribute set;

[0024] Step S153: Construct an attribute vector for the standardized component attribute set to obtain a preliminary component attribute vector;

[0025] Step S154: Perform attribute vector dimensionality reduction on the preliminary component attribute vector to obtain a component attribute vector.

[0026] In the present invention, by scraping the detailed information of each node in the component association graph from the component supplier website and adding this information as node attributes to the graph, the information dimension of the components is enriched, providing a more comprehensive data basis for subsequent multi-dimensional attribute extraction and analysis. For example, the similarity between components can be calculated more accurately. Since there are significant differences in the data types and value ranges of component attributes, for example, the unit of working voltage is volts and the unit of package size is millimeters, without standardization processing, some attributes will occupy too much weight in the similarity calculation, affecting the accuracy of the results. By using different standardization methods for different types of attributes, such as Min-Max normalization and one-hot encoding, the influence of the dimension and value range between different attributes can be eliminated, making the contributions of different attributes balanced in the similarity calculation and improving the accuracy of the similarity calculation. Concatenating the standardized attribute values of each component into a vector to construct a preliminary component attribute vector provides a unified data representation form for subsequent similarity calculation and clustering analysis, facilitating the algorithm to process and analyze the association relationships between different attributes. Since the preliminary component attribute vector has problems such as too high dimensionality and information redundancy, for example, there is high correlation between some attributes, resulting in information redundancy. Through dimensionality reduction methods such as principal component analysis, the dimension of the attribute vector can be reduced, redundant information can be removed, the efficiency of subsequent similarity calculation and clustering analysis can be improved, and at the same time, the most important feature information in the dataset can be retained to avoid information loss.

[0027] Preferably, step S16 includes the following steps:

[0028] Step S161: Calculate a similarity matrix for the component attribute vectors to obtain a component similarity matrix;

[0029] Step S162: Construct a clustering model based on the component similarity matrix to obtain a clustering model;

[0030] Step S163: Perform clustering analysis on the component similarity matrix using a clustering model to obtain initial component clustering clusters;

[0031] Step S164: Evaluate the initial component clustering clusters to obtain component clustering clusters.

[0032] In the present invention, by calculating the similarity between component attribute vectors and constructing a component similarity matrix, the similarity degree between any two components can be quantitatively described, providing a data basis for subsequent clustering analysis. For example, components with high similarity can be divided into the same clustering cluster according to the similarity matrix. According to the component similarity matrix, a suitable clustering algorithm is selected, such as the K-Means clustering algorithm, and initial parameters are set, such as the number of clustering clusters K value, to construct a clustering model, providing algorithm support for subsequent clustering analysis. For example, the K-Means clustering algorithm can divide components into different clustering clusters according to the similarity between components. Using the constructed clustering model to perform clustering analysis on the component similarity matrix, the components in the database can be divided into different clusters, and the components in each cluster have high similarity, facilitating users to quickly find components with similar functions and interchangeability, improving the efficiency and accuracy of component query and recommendation. Since the performance of the clustering algorithm is affected by parameter settings, for example, the clustering effect of the K-Means algorithm is closely related to the selection of the initial clustering center and the setting of the K value, it is necessary to evaluate the initial clustering clusters, such as using metrics like the silhouette coefficient to evaluate the quality of the clustering results. According to the evaluation results, the parameter settings of the clustering model can be adjusted, such as trying different K values or using different clustering algorithms, to obtain better clustering results and improve the accuracy and stability of clustering analysis.

[0033] Preferably, step S2 includes the following steps:

[0034] Step S21: Extract pin information from the extended component association graph according to the component clustering clusters to obtain a clustering cluster pin data set;

[0035] Step S22: Perform pin function semantic analysis on the clustering cluster pin data set to obtain a semantic clustering cluster pin data set;

[0036] Step S23: Identify the intra-cluster pin mapping relationship in the semantic clustering cluster pin data set to obtain an intra-cluster pin mapping table;

[0037] Step S24: Construct a pin compatibility matrix according to the intra-cluster pin mapping table to obtain an initial pin compatibility matrix;

[0038] Step S25: Optimize and calibrate the initial pin compatibility matrix to obtain a pin compatibility matrix;

[0039] Step S26: Perform package compatibility analysis based on the component clustering clusters, the extended component association graph, and the pin compatibility matrix to obtain a package compatibility table.

[0040] In the present invention, by extracting pin information from the extended component association graph according to the component clustering clusters, a clustering cluster pin data set is constructed, which provides a data basis for subsequent pin function semantic analysis and compatibility analysis, and limits the analysis scope within each clustering cluster, improving the efficiency and pertinence of the analysis. Using natural language processing technology and the electronic component knowledge graph, semantic analysis is performed on the pin function descriptions in the clustering cluster pin data set, and the natural language description is converted into a semantic vector, which can more accurately understand and compare the pin functions between different components, overcoming the limitation of the traditional method that only relies on text matching, and improving the accuracy and intelligence of the pin function analysis. By calculating the similarity between the semantic pin functions, potential pin mapping relationships between different components within the clustering cluster are identified, and an intra-cluster pin mapping table is constructed, which provides data support for subsequent construction of the pin compatibility matrix, and can automatically identify pins with the same function between different components, providing a reference for component replacement. According to the intra-cluster pin mapping table, an initial pin compatibility matrix is constructed, which can intuitively display the pin compatibility relationship between different components within the clustering cluster, providing basic data for subsequent package compatibility analysis. For example, it can be determined according to this matrix whether two components can be replaced pin by pin. Since the initial pin compatibility matrix only considers semantic similarity and has errors, by collecting and analyzing actual circuit design data, the initial pin compatibility matrix is corrected and optimized, which can improve the accuracy and reliability of the matrix and make it more in line with the actual application situation. Combining the component clustering clusters, the extended component association graph, and the pin compatibility matrix, perform package compatibility analysis on the packages of different components within the clustering cluster, and construct a package compatibility table, which can help users quickly find components with compatible pins and packages, avoiding the problem of only considering pin compatibility and ignoring package compatibility, and improving the success rate of component replacement.

[0041] Preferably, step S22 includes the following steps:

[0042] Step S221: Construct an electronic component knowledge graph based on the original component data set to obtain an electronic component knowledge graph;

[0043] Step S222: Perform pin function entity connection on the electronic component knowledge graph and the clustering cluster pin data set to obtain a pin data set after entity connection;

[0044] Step S223: Use the electronic component knowledge graph to perform pin function semantic extension on the pin data set after entity connection to obtain a pin data set after semantic extension;

[0045] Step S224: Vectorize the pin function semantics of the semantically extended pin dataset to obtain a pin function semantic vector dataset;

[0046] Step S225: Calculate the semantic similarity between different pin functions using the pin function semantic vector dataset to obtain pin function semantic similarity data; perform semantic weighted fusion on the pin function semantic similarity data and the clustered pin dataset to obtain a semantically clustered pin dataset.

[0047] Through constructing a knowledge graph of electronic components, the present invention can store and manage domain knowledge such as components, pin functions, and package information in a structured form, providing rich background knowledge and semantic association information for subsequent pin function semantic analysis, and improving the accuracy and depth of semantic analysis. Connecting the pin function descriptions in the clustered pin dataset with the entities in the knowledge graph of electronic components can convert unstructured text descriptions into structured entity links. For example, linking "input voltage" to the "input voltage" entity in the knowledge graph provides a basis for subsequent semantic extension and semantic vectorization. Using the knowledge graph of electronic components to perform semantic extension on the pin dataset after entity connection can supplement the missing information in the pin function description. For example, for the "input voltage" entity, related concepts such as "voltage" and "power supply" can be extended, making the semantics of the pin function more complete and rich, and improving the accuracy of subsequent semantic similarity calculation. Converting the semantically extended pin function description into a semantic vector can represent text information in a numerical form that can be understood and calculated by a computer, providing a data basis for subsequent semantic similarity calculation. For example, a word embedding model can be used to map each word to a vector, and all word vectors can be concatenated to represent the entire pin function description. Calculating the semantic similarity between different pin functions using the pin function semantic vector and performing semantic weighted fusion with the original clustered pin dataset can more accurately describe the similarity degree of pin functions between different components, overcome the limitations of traditional methods that only rely on text matching, improve the accuracy and intelligence of pin function analysis, and finally obtain a semantically clustered pin dataset.

[0048] Preferably, step S26 includes the following steps:

[0049] Step S261: Extract the intra-cluster package information from the extended component association graph according to the component clusters to obtain intra-cluster package information;

[0050] Step S262: Match the intra-cluster package information with the pin compatibility matrix to obtain a clustered package information table;

[0051] Step S263: Obtain the package physical compatibility data; define physical compatibility rules based on the package physical compatibility data to obtain a package compatibility rule library;

[0052] Step S264: Perform package compatibility evaluation on the clustering cluster package information table according to the package compatibility rule library to obtain a package compatibility table.

[0053] In the present invention, according to the component clustering clusters, the package information of all components within the cluster is extracted from the extended component association graph, providing a data basis for subsequent package compatibility analysis. And the analysis scope is limited within each clustering cluster, improving the efficiency and pertinence of the analysis, and avoiding the huge computational amount of pairwise comparison of all components in the database. Combining with the pin compatibility matrix, matching the package information within the cluster can screen out component pairs with pin compatibility and extract their corresponding package information to construct a clustering cluster package information table, providing candidate component pairs for subsequent package compatibility evaluation and avoiding redundant calculations for package compatibility evaluation of all components. By collecting and organizing package physical compatibility data and defining physical compatibility rules based on these data to construct a package compatibility rule library, the knowledge of package compatibility evaluation can be expressed in the form of rules, improving the automation degree and interpretability of package compatibility evaluation. Using the package compatibility rule library to perform package compatibility evaluation on the candidate component pairs in the clustering cluster package information table can automatically judge whether the packages of different components are physically compatible. For example, it can be judged according to the rule library whether the packages of two components can share the PCB package pads, and finally obtain a package compatibility table, providing more comprehensive reference information for component replacement, avoiding the problem of only considering pin compatibility and ignoring package compatibility, and improving the success rate of component replacement.

[0054] Preferably, step S3 includes the following steps:

[0055] Step S31: Perform query load analysis according to the component clustering clusters, the pin compatibility matrix, and the package compatibility table to obtain query load characteristics;

[0056] Step S32: Perform index design and creation according to the query load characteristics to obtain an index-optimized database;

[0057] Step S33: Perform database parameter tuning on the index-optimized database according to the query load characteristics to obtain a parameter-tuned database;

[0058] Step S34: Perform data sharding and table partitioning on the parameter-tuned database to obtain an electronic component database.

[0059] By analyzing historical query logs, user behavior data, and typical application scenarios, the present invention extracts database query load characteristics, such as commonly used query keywords, query condition combinations, query result sorting methods, etc. of users, which can understand the actual needs and usage habits of users when querying components, and provide a basis for subsequent index design, parameter tuning, and data sharding, avoiding blind optimization. According to the query load characteristics, database indexes are designed and created. For example, a unique index is created for exact queries based on model numbers, and a composite index is created for range queries based on parameters, etc., which can improve the efficiency of database queries, shorten query response times, and enhance the user experience. Especially for an electronic component database with a large amount of data, reasonable index design can significantly improve query speed. According to the query load characteristics, database parameters are tuned. For example, the cache size is adjusted, query statements are optimized, the number of concurrent connections is adjusted, etc., which can further enhance database performance. For example, hot query data can be cached in memory to reduce disk I / O operations and improve query efficiency; or according to the execution plan of query statements, indexes are adjusted or query statements are rewritten to optimize query performance. For scenarios with a large amount of data and high query load, data sharding and table partitioning are performed on the database. For example, data is dispersed and stored in multiple database instances or a large table is split into multiple sub-tables, which can improve the scalability and performance of the database. For example, different types of component data can be stored in different database instances, or different data ranges of the same table can be stored in different sub-tables, thereby reducing the load pressure on a single database instance or data table and improving query efficiency and concurrent processing capabilities.

[0060] Preferably, step S4 includes the following steps:

[0061] Step S41: Input the user query through the electronic component database, and generate the data of the components to be searched, obtaining the generated data of the components to be searched; perform structured processing on the generated data of the components to be searched to obtain the target component information;

[0062] Step S42: Locate the component nodes in the component association graph according to the target component information to obtain the component node data;

[0063] Step S43: Summarize the component information according to the component node data to obtain the candidate component set;

[0064] Step S44: Perform multi-dimensional condition screening on the candidate component set according to the target component information to obtain the screened candidate components; perform multi-dimensional sorting on the screened candidate components according to the component similarity matrix, pin compatibility matrix, and package compatibility table to obtain the sorted candidate component set;

[0065] Step S45: Generate an initial alternative recommendation list according to the sorted candidate component set to obtain the initial alternative recommendation list;

[0066] Step S46: Enhance the result interpretability of the initial alternative recommendation list to obtain the alternative recommendation list.

[0067] The present invention obtains the user query input through the user interface and converts it into structured target component information. For example, it converts the function requirements described in natural language into parameter conditions that the database can understand, which is convenient for the system to perform subsequent query and recommendation operations and improve the user experience. By using the component association graph, relevant component nodes can be quickly located according to the target component information, which can narrow the query scope, improve the query efficiency, and use the association relationships contained in the graph, such as "same function", "pin correspondence", etc., to find potential alternative components. Extract the information associated with the located component nodes from the electronic component database and summarize it into the candidate component set, providing a data basis for subsequent condition screening and sorting to ensure the comprehensiveness and accuracy of the recommendation results. Perform multi-dimensional condition screening on the candidate component set according to the target component information. For example, screen according to parameters such as voltage, current, and package, which can exclude components that do not meet the requirements and narrow the recommendation scope. Sort according to the similarity matrix, compatibility matrix, and package compatibility table, which can rank the components that best meet the user's needs at the front, improving the accuracy and relevance of the recommendation results. Generate an initial alternative recommendation list according to the sorted candidate component set, and display the candidate components ranked at the top as the recommendation results to the user, which can quickly provide the user with multiple alternative solutions to meet the user's need to quickly find suitable components. Enhance the result interpretability of the initial alternative recommendation list. For example, display the similarity score, compatibility score, recommendation reason, etc., which can help the user understand the basis of the recommendation results, increase the user's trust in the recommendation results, and facilitate the user's selection according to their own needs.

[0068] Preferably, the present invention also provides a database construction system based on electronic components for executing the above-mentioned database construction method based on electronic components. The database construction system based on electronic components includes:

[0069] A component association analysis module for collecting component information through an electronic component trading platform to obtain an original component data set; constructing a component relationship mapping according to the original component data set to obtain a component association graph; extracting multi-dimensional attributes from the component association graph to obtain component attribute vectors; calculating component similarity and performing clustering analysis according to the component attribute vectors to obtain component clustering clusters;

[0070] The component compatibility analysis module is used to extract pin information according to the component clustering clusters to obtain a clustered pin data set; perform pin function semantic analysis on the clustered pin data set to obtain a semantic clustered pin data set; construct a pin compatibility matrix according to the semantic clustered pin data set to obtain a pin compatibility matrix; perform package compatibility analysis according to the component clustering clusters and the pin compatibility matrix to obtain a package compatibility table;

[0071] The database construction module is used to construct an electronic component database according to the component clustering clusters, the pin compatibility matrix, and the package compatibility table to obtain an electronic component database;

[0072] The component query module is used to obtain the target component information input by the user through the electronic component database; perform an equivalent substitution recommendation query according to the target component information to obtain a substitution recommendation list, so as to implement the electronic component data query operation.

[0073] Through automated data collection, relationship analysis, and attribute extraction, the present invention constructs a component association graph containing rich information and semantic associations, and uses graph algorithms and clustering analysis to effectively classify the components in the database, laying a solid foundation for subsequent component queries and recommendations. Through in-depth semantic analysis of pin functions, a pin compatibility matrix and a package compatibility table are constructed, realizing fine-grained matching of component pins and packages, overcoming the limitations of traditional methods that rely only on text matching, and improving the accuracy and success rate of component replacement. According to the user's query requirements, the database is optimized specifically, such as creating indexes, adjusting parameters, and performing data sharding, etc., improving the query efficiency, concurrent processing ability, and scalability of the database, and providing users with efficient and stable query services. By comprehensively using information such as component association graphs, similarity matrices, and compatibility matrices, multi-dimensional condition filtering, sorting, and result interpretation are realized, providing users with accurate, reliable, and easy-to-understand component substitution recommendation schemes, helping users quickly find suitable components, and improving the efficiency of electronic design. Therefore, the present invention provides a method for constructing a database based on electronic components, effectively solving the problem of strong data correlation. Using a graph database to construct a component association graph, intuitively expressing complex relationships such as equivalent substitution and upstream and downstream between components, providing a basis for accurate query and intelligent recommendation. Through natural language processing and knowledge graph technology, semantic analysis is performed on component pin functions, constructing a semantic clustered pin data set and a pin compatibility matrix to achieve more accurate component matching. Considering the package form of components, a package compatibility table is constructed through package information matching and a compatibility rule library to ensure the physical compatibility of the recommended alternative components. In the query stage, combining information such as component association graphs, similarity matrices, and compatibility matrices, supports users to perform multi-dimensional condition filtering and sorting, and recommends the most suitable alternative solution. Brief Description of the Drawings

[0074] Figure 1 It is a schematic flow chart of the steps of a method for constructing a database based on electronic components;

[0075] Figure 2 is Figure 1 a detailed implementation step flow chart of step S1 in

[0076] Figure 3 is Figure 1 a detailed implementation step flow chart of step S2 in

[0077] The realization of the object, functional features and advantages of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiments

[0078] The technical method of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative work belong to the scope of protection of the present invention.

[0079] In addition, the accompanying drawings are only schematic diagrams of the present invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor methods and / or microcontroller methods.

[0080] It should be understood that although the terms "first", "second", etc. may be used here to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, the first unit can be called the second unit, and similarly the second unit can be called the first unit. The term "and / or" used here includes any and all combinations of one or more of the listed associated items.

[0081] To achieve the above object, please refer to Figures 1 to 3 , a method for constructing a database based on electronic components, includes the following steps:

[0082] Step S1: Collect component information through an electronic component trading platform to obtain an original component dataset; construct a component relationship mapping based on the original component dataset to obtain a component association graph; extract multi-dimensional attributes from the component association graph to obtain component attribute vectors; calculate component similarity and perform clustering analysis based on the component attribute vectors to obtain component clustering clusters;

[0083] Step S2: Extract pin information based on the component clustering clusters to obtain a clustered pin dataset; perform pin function semantic analysis on the clustered pin dataset to obtain a semantic clustered pin dataset; construct a pin compatibility matrix based on the semantic clustered pin dataset to obtain a pin compatibility matrix; perform package compatibility analysis based on the component clustering clusters and the pin compatibility matrix to obtain a package compatibility table;

[0084] Step S3: Construct an electronic component database based on the component clustering clusters, the pin compatibility matrix, and the package compatibility table to obtain an electronic component database;

[0085] Step S4: Obtain the target component information input by the user through the electronic component database; perform an equivalent substitution recommendation query based on the target component information to obtain a substitution recommendation list to implement an electronic component data query operation.

[0086] In the embodiment of the present invention, referring to Figure 1 as described, it is a schematic diagram of the step flow of the database construction method based on electronic components of the present invention. In this example, the database construction method based on electronic components includes the following steps:

[0087] Step S1: Collect component information through an electronic component trading platform to obtain an original component dataset; construct a component relationship mapping based on the original component dataset to obtain a component association graph; extract multi-dimensional attributes from the component association graph to obtain component attribute vectors; calculate component similarity and perform clustering analysis based on the component attribute vectors to obtain component clustering clusters;

[0088] In the embodiment of the present invention, first, component information is obtained through an electronic component trading platform, an original component dataset is constructed, and data cleaning is performed. Then, natural language processing technology is used to analyze component description texts, extract key information, and construct a weighted component relationship set based on preset rules and relationship weights. Next, the weighted relationship set is imported into the Neo4j graph database for visualization processing to obtain an initial component association graph. Finally, combined with actual application requirement data, the initial graph is optimized and improved, and multi-dimensional attribute information is extracted using graph algorithms to construct component attribute vectors. Finally, through the cosine similarity and K-Means clustering algorithms, component clustering clusters are obtained.

[0089] Step S2: Extract pin information according to the component clustering clusters to obtain a clustered pin data set; perform pin function semantic analysis on the clustered pin data set to obtain a semantic clustered pin data set; construct a pin compatibility matrix according to the semantic clustered pin data set; perform package compatibility analysis according to the component clustering clusters and the pin compatibility matrix to obtain a package compatibility table.

[0090] In the embodiment of the present invention, according to the component clustering clusters, the pin information of each component is extracted from the expanded component association graph to construct a clustered pin data set. Then, SpaCy is used for word segmentation and named entity recognition, and combined with the pre-constructed knowledge graph of electronic components for pin function semantic analysis, converting the pin function description into a semantic vector to obtain a semantic clustered pin data set. Next, calculate the similarity between the semantic pin functions, identify the pin mapping relationships within the cluster, construct an initial pin compatibility matrix, and correct and optimize it in combination with the actual circuit design data. Finally, according to the component clustering clusters and the pin compatibility matrix, analyze the compatibility between different component packages within the cluster to construct a package compatibility table.

[0091] Step S3: Construct an electronic component database according to the component clustering clusters, the pin compatibility matrix, and the package compatibility table to obtain an electronic component database.

[0092] In the embodiment of the present invention, first, analyze the historical query logs, user behavior data, and typical application scenarios to determine the query types that need to be optimized in the database, such as exact queries based on models, range queries based on parameters, and compatibility queries based on packages. Then, according to the query load characteristics, create indexes for different query types in the database, such as unique indexes, composite indexes, etc., to construct an index-optimized database. Next, according to the query load characteristics, adjust the database parameters, such as cache size, query statements, concurrent connection numbers, etc., and evaluate and fine-tune them through performance testing tools to obtain a parameter-optimized database. Finally, for scenarios with large data volume and high query load, perform data sharding and table partitioning to finally obtain an electronic component database.

[0093] Step S4: Obtain the target component information input by the user query through the electronic component database; perform an equivalent substitution recommendation query according to the target component information to obtain a substitution recommendation list to implement the electronic component data query operation.

[0094] In the embodiments of the present invention, the user inputs the information of the component to be searched through the interface, and the system parses it into structured target component information. Then, the system locates relevant nodes in the component association graph according to the target component information, extracts relevant component information from the database, and aggregates it into the candidate component set. Next, the system performs multi-dimensional conditional screening on the candidate component set according to the target component information, and sorts it according to the similarity matrix, compatibility matrix, and package compatibility table to obtain the sorted candidate component set. Then, the system generates an initial alternative recommendation list and uses the candidate components ranked at the top as the recommendation results. Finally, the system performs interpretive enhancement on the recommendation results, such as displaying similarity scores, compatibility ratings, reasons for recommendation, etc., and finally obtains the alternative recommendation list and presents it to the user.

[0095] Preferably, step S1 includes the following steps:

[0096] Step S11: Collect component information through the electronic component trading platform to obtain the original component data set; perform potential relationship analysis on the original component data set and conduct relationship classification to obtain the component relationship set;

[0097] Step S12: Evaluate the relationship weights of the component relationship set to obtain the weighted component relationship set;

[0098] Step S13: Import the weighted component relationship set into a preset graph database for graph visualization processing to obtain the initial component association graph;

[0099] Step S14: Obtain the application requirement data; optimize and improve the initial component association graph according to the application requirement data to obtain the component association graph;

[0100] Step S15: Extract multi-dimensional attributes of the component association graph to obtain the component attribute vector;

[0101] Step S16: Calculate the component similarity and perform clustering analysis according to the component attribute vector to obtain the component clustering clusters.

[0102] As an example of the present invention, refer to Figure 2 As shown, in this example, step S1 includes:

[0103] Step S11: Collect component information through the electronic component trading platform to obtain the original component data set; perform potential relationship analysis on the original component data set and conduct relationship classification to obtain the component relationship set;

[0104] In the embodiments of the present invention, first, the electronic component trading platform obtains component information, including model, manufacturer, parameters, and description, and constructs an original component data set. Then, data cleaning is performed on the original data set to remove problems such as duplicate data, missing values, and format errors. Natural language processing technology (NLP) is used to tokenize, perform part-of-speech tagging, and named entity recognition on the component description text to extract key information, such as package type, operating temperature, function category, etc. According to the extracted keywords and preset relationship rules (for example, components with the same package form a "package relationship", and components with the same function category form a "function relationship"), potential relationship analysis is performed on the components, and the analysis results are classified to construct a component relationship set.

[0105] Step S12: Perform relationship weight evaluation on the component relationship set to obtain a weighted component relationship set;

[0106] In the embodiments of the present invention, according to the predefined relationship weight rules, relationship weight evaluation is performed on the component relationship set obtained in step S11. For example, the weight of the "equivalent substitution relationship" is set to 0.8, the weight of the "function relationship" is set to 0.5, and the weight of the "package relationship" is set to 0.3. Finally, a weighted component relationship set is obtained.

[0107] Step S13: Import the weighted component relationship set into a preset graph database for graph visualization processing to obtain an initial component association graph;

[0108] In the embodiments of the present invention, using the Python driver py2neo provided by the Neo4j graph database, the weighted component relationship set obtained in step S12 is imported into the graph database. Components are used as nodes, relationships are used as edges, and weights are used as attributes of the edges. Using the visualization tool Neo4j Browser provided by the Neo4j graph database, graph visualization processing is performed on the imported data to intuitively display the relationships between components, and an initial component association graph is obtained.

[0109] Step S14: Obtain application requirement data; optimize and improve the initial component association graph according to the application requirement data to obtain a component association graph;

[0110] In the embodiments of the present invention, circuit design requirement data in actual application scenarios is collected, such as circuit board design files, bill of materials (BOM), etc. These data are analyzed to extract potential association relationships between components, such as which components on the circuit board are usually used together, which components can be substituted for each other, etc. According to the extracted association relationships, the initial component association graph obtained in step S13 is optimized and improved, such as adding new nodes and edges, adjusting the weights of the edges, etc., and finally a component association graph that better meets the actual application requirements is obtained.

[0111] Step S15: Extract multi-dimensional attributes from the component association graph to obtain component attribute vectors;

[0112] In the embodiment of the present invention, based on the component association graph obtained in step S14, graph algorithms are used to extract multi-dimensional attribute information of components. For example:

[0113] Degree centrality: Calculate the number of connections of each component node in the graph, indicating the importance of the component.

[0114] Betweenness centrality: Calculate the number of times each component node appears on the shortest path between other component nodes, indicating the influence of the component on the connection of other components.

[0115] PageRank value: Use the PageRank algorithm to calculate the influence of each component node, indicating the importance of the component in the entire graph.

[0116] Integrate the above calculation results and the component's own attributes (such as package type, operating temperature, function category, etc.) to construct component attribute vectors.

[0117] Step S16: Calculate the similarity of components and perform clustering analysis according to the component attribute vectors to obtain component clustering clusters;

[0118] In the embodiment of the present invention, the cosine similarity algorithm is used to calculate the similarity between the component attribute vectors obtained in step S15 to construct a component similarity matrix. The K-Means clustering algorithm is selected, and clustering analysis is performed according to the component similarity matrix. Components with high similarity are divided into the same clustering cluster to obtain the initial component clustering clusters. The silhouette coefficient is used to evaluate the quality of the initial clustering clusters, and the parameters of the K-Means algorithm (such as the number of clustering clusters) are adjusted according to the evaluation results to finally obtain the optimal component clustering clusters.

[0119] Preferably, step S15 includes the following steps:

[0120] Step S151: Perform attribute information expansion processing on the component association graph to obtain an expanded component association graph;

[0121] Step S152: Perform attribute standardization processing on the expanded component association graph to obtain a standardized component attribute set;

[0122] Step S153: Construct attribute vectors for the standardized component attribute set to obtain preliminary component attribute vectors;

[0123] Step S154: Perform dimensionality reduction on the preliminary component attribute vectors to obtain component attribute vectors.

[0124] In the embodiments of the present invention, the web data scraping library Beautiful Soup of Python is used to scrape the detailed information of each node (i.e., component) in the component association graph from component supplier websites (such as Digikey, Mouser, etc.), for example: operating voltage, current, package size, accuracy, temperature range, etc. The scraped information is supplemented into the component association graph as the attributes of the component nodes, forming an extended component association graph. For example, for the node "LM7805", its operating voltage (5V), current (1A), package size (TO-220), accuracy (±4%), etc. can be scraped and added.

[0125] For different types of attributes in the extended component association graph, different standardization methods are adopted for processing:

[0126] Numeric attributes: such as operating voltage, current, package size, etc., use the Min-Max normalization method to scale the attribute values to the range of [0, 1]. For example, normalize the operating voltage of 5V of "LM7805" to (5 - V_min) / (V_max - V_min), where V_max and V_min represent the maximum and minimum values of the operating voltages of all components respectively.

[0127] Categorical attributes: such as package type, function category, etc., use one-hot encoding to convert them into multi-dimensional binary vectors. For example, convert the package type "TO-220" to [0, 1, 0, 0], where each dimension represents a package type.

[0128] After the standardization process, a standardized component attribute set is obtained.

[0129] The standardized attribute values of each component obtained in step S152 are concatenated into a vector to obtain a preliminary component attribute vector. For example, assume that the standardized attribute values of the component "LM7805" are: operating voltage 0.75, current 0.2, package type [0, 1, 0, 0], accuracy 0.6, then its preliminary component attribute vector is [0.75, 0.2, 0, 1, 0, 0, 0.6].

[0130] Due to problems such as too high dimensionality and information redundancy in the preliminary component attribute vector, the principal component analysis (PCA) method is used to reduce the dimension of the preliminary component attribute vector. By setting the number of principal components, the most important feature information in the original dataset is retained, and the high-dimensional vector is mapped to a low-dimensional space to obtain the final component attribute vector. For example, the 7-dimensional preliminary component attribute vector obtained in step S153 is reduced to 3 dimensions to obtain the final component attribute vector [0.5, 0.3, 0.2].

[0131] Preferably, step S16 includes the following steps:

[0132] Step S161: Calculate the similarity matrix of component attribute vectors to obtain the component similarity matrix;

[0133] Step S162: Construct a clustering model based on the component similarity matrix to obtain the clustering model;

[0134] Step S163: Use the clustering model to perform clustering analysis on the component similarity matrix to obtain the initial component clustering clusters;

[0135] Step S164: Evaluate the initial component clustering clusters to obtain the component clustering clusters.

[0136] In the embodiments of the present invention, the NumPy library in Python is utilized. Based on the component attribute vectors obtained in step S15, the cosine similarity algorithm is adopted to calculate the similarity between every two components. The calculation results are stored in an N×N matrix, where N represents the number of components. Each element in the matrix represents the similarity between the corresponding two components, and the value range is [0, 1]. The larger the value, the higher the similarity. This matrix is the component similarity matrix. The K-Means clustering algorithm is selected as the clustering model, and this algorithm is implemented using the Scikit-learn library in Python. According to the number of components and the clustering requirements, the initial number K of clustering clusters is preset. For example, setting K = 10 means dividing the components into 10 clusters. The component similarity matrix obtained in step S161 is used as the input data, and clustering analysis is performed using the K-Means clustering model constructed in step S162. The K-Means algorithm will iteratively calculate the distance from each component to each clustering center, and divide the components into the clusters to which the nearest clustering center belongs until the clustering result is stable. Finally, the initial component clustering clusters are obtained, and each component will be assigned to a specific cluster. The Silhouette Coefficient is used as the evaluation index to evaluate the quality of the initial component clustering clusters obtained in step S163. The value range of the Silhouette Coefficient is [-1, 1]. The larger the value, the better the clustering effect. According to the evaluation result of the Silhouette Coefficient, it is judged whether the current value of K is appropriate. If not, the parameter K value of the K-Means algorithm is adjusted. For example, try K = 8 or K = 12, repeat steps S162 and S163 for clustering analysis, and recalculate the Silhouette Coefficient. Finally, the value of K with the highest Silhouette Coefficient and the corresponding clustering result are selected as the final component clustering clusters.

[0137] Preferably, step S2 includes the following steps:

[0138] Step S21: Extract pin information from the extended component association graph according to the component clustering clusters to obtain a clustering cluster pin data set;

[0139] Step S22: Perform pin function semantic analysis on the clustering cluster pin data set to obtain a semantic clustering cluster pin data set;

[0140] Step S23: Identify the intra-cluster pin mapping relationship for the semantic clustering cluster pin data set to obtain an intra-cluster pin mapping table;

[0141] Step S24: Construct a pin compatibility matrix according to the intra-cluster pin mapping table to obtain an initial pin compatibility matrix;

[0142] Step S25: Optimize and calibrate the initial pin compatibility matrix to obtain a pin compatibility matrix;

[0143] Step S26: Perform package compatibility analysis based on the component clustering clusters, the extended component association graph, and the pin compatibility matrix to obtain a package compatibility table.

[0144] As an example of the present invention, refer to Figure 3 As shown, in this example, step S2 includes:

[0145] Step S21: Extract pin information from the extended component association graph according to the component clustering clusters to obtain a clustering cluster pin data set;

[0146] In the embodiment of the present invention, each component clustering cluster obtained in step S16 is traversed. For each component in the cluster, its pin information, including pin name, pin number, pin function description, etc., is extracted from the extended component association graph obtained in step S151. The extracted pin information is associated with the belonging component and clustering cluster to construct a clustering cluster pin data set. For example, for the component "LM7805" in the "voltage regulator" clustering cluster, its pin information is extracted: {"component": "LM7805", "clustering cluster": "voltage regulator", "pin": [{"name": "Input", "number": "1", "function": "input voltage"}, {"name": "Output", "number": "2", "function": "output voltage"}, {"name": "Ground", "number": "3", "function": "grounding"}]}

[0147] Step S22: Perform pin function semantic analysis on the clustering cluster pin data set to obtain a semantic clustering cluster pin data set;

[0148] In the embodiment of the present invention, natural language processing tools (such as SpaCy) are used to perform operations such as word segmentation, part-of-speech tagging, and named entity recognition on the pin function descriptions in the clustering cluster pin data set obtained in step S21 to extract key function words. For example, for the description "input voltage", keywords such as "input" and "voltage" can be extracted. Then, a knowledge graph in the field of electronic components is constructed, which contains entities such as components, pin functions, and circuit terms and the relationships between them. Using knowledge graph embedding technology (such as TransE), the pin function description is represented as a semantic vector. Finally, the original pin function description is replaced with the corresponding semantic vector to obtain a semantic clustering cluster pin data set.

[0149] Step S23: Identify the in-cluster pin mapping relationship for the semantic clustering cluster pin data set to obtain an in-cluster pin mapping table;

[0150] In the embodiments of the present invention, for each clustering cluster, analyze the pin function semantic vectors of each component in the semantic clustering cluster pin dataset, and calculate the semantic similarity between pairwise pins. Set a semantic similarity threshold, for example, 0.8, identify the pin pairs with semantic similarity higher than the threshold as potential pin mapping relationships, and record the corresponding component information. Organize all the identified pin mapping relationships into an intra-cluster pin mapping table, for example: {"clustering cluster": "voltage regulator", "mapping relationship": [{"component 1": "LM7805", "pin 1": "1", "component 2": "AMS1117-5.0", "pin 2": "1"}, {"component 1": "LM7805", "pin 1": "2", "component 2": "AMS1117-5.0", "pin 2": "3"},... ]}.

[0151] Step S24: Construct a pin compatibility matrix based on the intra-cluster pin mapping table to obtain an initial pin compatibility matrix;

[0152] In the embodiments of the present invention, based on the intra-cluster pin mapping table obtained in step S23, construct an initial pin compatibility matrix. The rows and columns of this matrix respectively represent the pins of all components in the clustering cluster, and the value of the matrix element represents the compatibility between the corresponding two pins. If there is a mapping relationship between two pins, their compatibility value is 1, otherwise it is 0.

[0153] Step S25: Optimize and calibrate the initial pin compatibility matrix to obtain a pin compatibility matrix;

[0154] In the embodiments of the present invention, since the initial pin compatibility matrix obtained in step S24 only considers semantic similarity and there are errors. To improve the accuracy of the matrix, it is necessary to optimize and calibrate the compatibility matrix. Collect actual circuit design data, such as circuit schematic diagrams, PCB layout diagrams, etc., and extract the actual pin connection relationships between components. According to the actual connection relationships, correct the initial pin compatibility matrix, for example, modify the element with an original compatibility of 0 to 1, or modify the element with an original compatibility of 1 to 0.

[0155] Step S26: Perform package compatibility analysis based on the component clustering cluster, the extended component association graph, and the pin compatibility matrix to obtain a package compatibility table;

[0156] In the embodiments of the present invention, according to the component clustering clusters, the package information of all components within each clustering cluster is extracted from the extended component association graph, including package name, number of pins, pin pitch, etc. Combining with the pin compatibility matrix obtained in step S25, the compatibility between different component packages within the clustering cluster is analyzed. For example, if the package names of two components are the same and the compatibility value of the corresponding pins in the pin compatibility matrix is 1, it is considered that the packages of these two components are compatible. All the analysis results are sorted into a package compatibility table.

[0157] Preferably, step S22 includes the following steps:

[0158] Step S221: Construct an electronic component knowledge graph based on the original component data set to obtain the electronic component knowledge graph;

[0159] Step S222: Perform pin function entity connection on the electronic component knowledge graph and the clustering cluster pin data set to obtain the pin data set after entity connection;

[0160] Step S223: Use the electronic component knowledge graph to perform pin function semantic extension on the pin data set after entity connection to obtain the pin data set after semantic extension;

[0161] Step S224: Perform pin function semantic vectorization on the pin data set after semantic extension to obtain the pin function semantic vector data set;

[0162] Step S225: Use the pin function semantic vector data set to calculate the semantic similarity between different pin functions to obtain the pin function semantic similarity data; perform semantic weighted fusion on the pin function semantic similarity data and the clustering cluster pin data set to obtain the semantic clustering cluster pin data set.

[0163] In the embodiments of the present invention, key information such as components, pin functions, package information, and technical parameters is extracted from the original component data set and used as entities in the electronic component knowledge graph. By analyzing component data sheets, technical manuals, and relevant literature, categories of relationships between entities are defined, such as "same function", "pin correspondence", "package compatibility", etc. The Neo4j graph database is used to construct the electronic component knowledge graph, and the extracted entity and relationship information is stored in the graph database. For example, a "same function" relationship is established between the component "LM7805" and the pin function "voltage regulation", and a "package type" relationship is established with the package "TO-220". The clustered pin data set obtained in step S21 is traversed, and each pin function description is matched with the entities in the electronic component knowledge graph. For example, the string similarity algorithm is used to calculate the similarity between the pin function description and the pin function entity in the knowledge graph, and the entity with the highest similarity is selected as the matching result. The successfully matched pin function description is replaced with the corresponding entity link. For example, "input voltage" is replaced with a link pointing to the "input voltage" entity in the knowledge graph, resulting in a pin data set after entity connection. Using the pin data set after entity connection obtained in step S222, semantic expansion is performed in the electronic component knowledge graph. For example, for each pin function entity, its neighbor nodes in the knowledge graph are extracted, including directly connected nodes and indirectly connected nodes, and the information of these nodes is used as the semantic expansion information of the pin function. For example, for the "input voltage" entity, its neighbor nodes "voltage", "power supply", etc. can be extracted as semantic expansion. The word embedding model (such as Word2Vec) is used to convert the pin function description after semantic expansion in step S223 into a semantic vector. First, the pin function description after semantic expansion is regarded as a word sequence. For example, "input voltage voltage power supply" is regarded as a sequence containing three words. Then, using the pre-trained word embedding model, each word is mapped to a vector of a fixed dimension, and all word vectors are concatenated to obtain the semantic vector of the pin function. Using the pin function semantic vector obtained in step S224, the semantic similarity between different pin functions is calculated. For example, the cosine similarity is used to calculate the cosine value of the angle between two pin function semantic vectors as their semantic similarity. The calculated semantic similarity is fused with the clustered pin data set in step S21. For example, the semantic similarity can be used as a weight to perform weighted averaging on the original pin function description to obtain a semantically clustered pin data set.

[0164] Preferably, step S26 includes the following steps:

[0165] Step S261: Extract the in-cluster package information from the extended component association graph according to the component cluster to obtain the in-cluster package information;

[0166] Step S262: Perform encapsulation information matching on the in-cluster encapsulation information and the pin compatibility matrix to obtain a clustering cluster encapsulation information table;

[0167] Step S263: Obtain encapsulation physical compatibility data; define physical compatibility rules based on the encapsulation physical compatibility data to obtain an encapsulation compatibility rule library;

[0168] Step S264: Perform encapsulation compatibility evaluation on the clustering cluster encapsulation information table according to the encapsulation compatibility rule library to obtain an encapsulation compatibility table.

[0169] In the embodiments of the present invention, for each component clustering cluster, the package information of all components within the cluster is extracted from the extended component association graph obtained in step S151. The package information includes package name, number of pins, pin pitch, package size, 3D model, etc. For example, for the "voltage regulator" clustering cluster, the package information of "LM7805" therein is extracted: {"Component": "LM7805", "Package Name": "TO-220", "Number of Pins": 3, "Pin Pitch": 2.54 mm, "Package Size": (Length) 9.8 mm x (Width) 6.9 mm x (Height) 4.5 mm, "3D Model":...}. All the extracted package information is sorted out as the in-cluster package information. Based on the pin compatibility matrix obtained in step S25, the pin pairs with a compatibility value of 1 are filtered out. For each compatible pin pair, the package information of the components to which they belong is matched. For example, if pin 1 of "LM7805" is compatible with pin 1 of "AMS1117-5.0", the package information of these two components, such as "TO-220" and "SOT-223", is extracted. All the matched package information pairs are sorted out as the clustering cluster package information table, for example: {"Clustering Cluster": "Voltage Regulator", "Package Information Pairs": [{"Component 1": "LM7805", "Package 1": "TO-220", "Component 2": "AMS1117-5.0", "Package 2": "SOT-223"},...]}. The package physical compatibility data is obtained from the component database, package library, and relevant standards and specifications. This data contains the physical compatibility relationships between different packages. For example, which packages can share PCB package pads and which packages have compatible sizes and pitches. According to the obtained package physical compatibility data, a series of physical compatibility rules are defined, and tools such as a rule engine or decision tree are used to construct a package compatibility rule library. For example, the rule is defined that if two packages have the same number of pins, the same pin pitch, and compatible package sizes, then these two packages are considered physically compatible. Using the package compatibility rule library constructed in step S263, the clustering cluster package information table obtained in step S262 is evaluated for package compatibility. For each package information pair, according to information such as package name, number of pins, pin pitch, and package size, the corresponding physical compatibility rule is matched to determine whether these two packages are physically compatible. For example, according to the rule library, the "TO-220" and "SOT-223" packages are judged to be incompatible. All the evaluation results are sorted out as the package compatibility table, for example: {"Clustering Cluster": "Voltage Regulator", "Package Compatibility": [{"Component 1": "LM7805", "Package 1": "TO-220", "Component 2": "AMS1117-5.0", "Package 2": "SOT-223", "Compatibility": 0},...]}, where the compatibility value of 1 indicates compatibility and 0 indicates incompatibility.

[0170] Preferably, step S3 includes the following steps:

[0171] Step S31: Perform query load analysis based on the component clustering clusters, pin compatibility matrix, and package compatibility table to obtain query load characteristics;

[0172] Step S32: Design and create an index based on the query load characteristics to obtain an index-optimized database;

[0173] Step S33: Tune the database parameters of the index-optimized database according to the query load characteristics to obtain a parameter-tuned database;

[0174] Step S34: Perform data sharding and table partitioning on the parameter-tuned database to obtain an electronic component database.

[0175] In the embodiment of the present invention, the historical query logs, user behavior data, and typical application scenarios are analyzed to extract the database query load characteristics. For example, statistically analyze the commonly used query keywords, query condition combinations, query result sorting methods, etc. of users. According to the analysis results, determine the query types that need to be optimized key points in the database, such as:

[0176] Exact query based on component model: The user enters an exact component model for query, such as "LM7805".

[0177] Range query based on function parameters: The user enters the range of function parameters for query, such as a voltage regulator with a voltage range of 3.0V to 5.0V.

[0178] Compatibility query based on package information: The user enters the package information of the target component and queries the components that are compatible with its package.

[0179] According to the query load characteristics obtained in step S31, design and create a database index to improve the query efficiency. For example:

[0180] For the exact query based on the component model, create a unique index on the "component model" field.

[0181] For the range query based on function parameters, create a composite index on the commonly used function parameter fields (such as voltage, current, package type, etc.).

[0182] For the compatibility query based on package information, create a composite index on the fields such as package name, number of pins, and pin pitch.

[0183] Use a database management tool (such as MySQL Workbench) to create the above indexes and import data such as component clustering clusters, pin compatibility matrices, and package compatibility tables into the database.

[0184] Based on the query load characteristics obtained in step S31, optimize the database parameters of the index optimization database obtained in step S32 to further improve the database performance. For example:

[0185] Adjust the cache size: According to the size of the query hot data, adjust the database cache size, such as the `innodb_buffer_pool_size` parameter, store the hot data in memory, and reduce disk I / O operations.

[0186] Optimize the query statements: Analyze the slow query log, identify the query statements with low execution efficiency, and optimize them, such as using appropriate indexes, adjusting the order of query conditions, etc.

[0187] Adjust the concurrent connection number: According to the estimated number of concurrent users, adjust the maximum connection number of the database, such as the `max_connections` parameter, to ensure that the system can handle the expected concurrent requests.

[0188] Use a performance testing tool (such as MySQL Benchmark) to simulate different query loads, evaluate the database performance after parameter adjustment, and perform fine-tuning of the parameters according to the evaluation results to finally obtain the parameter-optimized database.

[0189] For scenarios with large amounts of data and high query loads, perform data sharding and table partitioning on the parameter-optimized database obtained in step S33 to further improve the scalability and performance of the database. For example:

[0190] Data sharding: Horizontally partition the component data into different database instances according to the functional categories or application fields of the components. For example, store the component data of the "power management" category in one shard and the component data of the "signal processing" category in another shard.

[0191] Table partitioning: Split the table with a large amount of data into multiple sub-tables. For example, split the "component" table into 26 sub-tables according to the first letter, and each sub-table stores the component data starting with the corresponding letter.

[0192] Data sharding and table partitioning can be implemented using a database middleware (such as MyCat) or a distributed database solution (such as TiDB). Finally, obtain the electronic component database.

[0193] Preferably, step S4 includes the following steps:

[0194] Step S41: Perform user query input through the electronic component database, generate the component data to be searched, and obtain the generated component data to be searched; perform structured processing on the component data to be searched to obtain the target component information;

[0195] Step S42: Locate the component nodes in the component association graph according to the target component information to obtain component node data;

[0196] Step S43: Summarize the component information based on the component node data to obtain a candidate component set;

[0197] Step S44: Perform multi-dimensional condition screening on the candidate component set according to the target component information to obtain the screened candidate components; perform multi-dimensional sorting on the screened candidate components according to the component similarity matrix, pin compatibility matrix, and package compatibility table to obtain a sorted candidate component set;

[0198] Step S45: Generate an initial alternative recommendation list based on the sorted candidate component set;

[0199] Step S46: Enhance the result interpretability of the initial alternative recommendation list to obtain an alternative recommendation list.

[0200] In an embodiment of the present invention, through a user interface (such as a web form or an application programming interface), a user inputs information of a component to be searched, such as component model, function description, key parameters, etc. The system automatically generates data of the component to be searched according to the user input. For example, the user inputs "Need an LDO voltage regulator with 5V voltage and 1A current, and the package is SOT-223". The system parses this requirement into structured target component information, such as: {"function": "LDO voltage regulator", "voltage": "5V", "current": "1A", "package": "SOT-223"}. According to the target component information obtained in step S41, component node positioning is performed in the component association graph constructed in step S14. For example, the system locates the node set with the function of "LDO voltage regulator" by using the graph database query language according to the "function" field in the target component information. According to the component node data located in step S42, relevant component information is extracted from the electronic component database, such as component model, manufacturer, parameters, package, etc. All the extracted component information is summarized into a candidate component set. According to the target component information obtained in step S41, multi-dimensional condition screening is performed on the candidate component set obtained in step S43. For example, according to the "voltage" and "current" fields in the target component information, components with a voltage of 5V and a current greater than or equal to 1A are screened out. Then, multi-dimensional sorting is performed on the screened candidate components according to the component similarity matrix, pin compatibility matrix, and package compatibility table. For example, components with high similarity to the target component, good pin compatibility, and package compatibility are ranked in the front to obtain a sorted candidate component set. According to the sorted candidate component set obtained in step S44, an initial alternative recommendation list is generated. For example, the top 10 candidate components are used as the recommendation results, and their key information is displayed, such as component model, manufacturer, main parameters, package, etc. To enhance the interpretability of the results, interpretive enhancement is performed on the initial alternative recommendation list obtained in step S45. For example, for each recommended component, indicators such as its similarity score, pin compatibility score, and package compatibility score with the target component are displayed, as well as the recommendation reasons. For example, it is explained that "Recommended component A because its similarity to the target component is as high as 95%, and the pins and package are completely compatible". Finally, an alternative recommendation list is obtained and displayed to the user.

[0201] Preferably, the present invention also provides a database construction system based on electronic components for performing the above-mentioned database construction method based on electronic components. The database construction system based on electronic components includes:

[0202] The component association analysis module is used to collect component information through an electronic component trading platform to obtain an original component data set; construct a component relationship mapping based on the original component data set to obtain a component association graph; extract multi-dimensional attributes from the component association graph to obtain component attribute vectors; calculate component similarity and perform clustering analysis based on the component attribute vectors to obtain component clustering clusters;

[0203] The component compatibility analysis module is used to extract pin information based on the component clustering clusters to obtain a clustering cluster pin data set; perform pin function semantic analysis on the clustering cluster pin data set to obtain a semantic clustering cluster pin data set; construct a pin compatibility matrix based on the semantic clustering cluster pin data set to obtain a pin compatibility matrix; perform package compatibility analysis based on the component clustering clusters and the pin compatibility matrix to obtain a package compatibility table;

[0204] The database construction module is used to construct an electronic component database based on the component clustering clusters, the pin compatibility matrix, and the package compatibility table to obtain an electronic component database;

[0205] The component query module is used to obtain the target component information input by the user through the electronic component database; perform an equivalent substitution recommendation query based on the target component information to obtain a substitution recommendation list to implement the electronic component data query operation.

[0206] Therefore, from any perspective, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, it is intended to encompass all changes falling within the meaning and scope of the equivalent elements of the application documents within the present invention.

[0207] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features invented herein.

Claims

1. A method for constructing a database based on electronic components, characterized in that: The following steps are involved: Step S1: Collect component information through the electronic component trading platform to obtain an original component data set; construct component relationship mapping based on the original component data set to obtain a component association map; extract multi-dimensional attributes from the component association map to obtain a component attribute vector; perform component similarity calculation and cluster analysis based on the component attribute vector to obtain a component cluster; Step S2: extract pin information according to component clustering clusters to obtain a clustering cluster pin data set; perform pin function semantic analysis on the clustering cluster pin data set to obtain a semantic clustering cluster pin data set; construct a pin compatibility matrix according to the semantic clustering cluster pin data set to obtain a pin compatibility matrix; perform package compatibility analysis according to the component clustering clusters and the pin compatibility matrix to obtain a package compatibility table; Step S3: constructing an electronic component database according to the component clusters, the pin compatibility matrix, and the package compatibility table to obtain an electronic component database; Step S4: obtaining the target component information input by the user through the electronic component database; performing an equivalent replacement recommendation query based on the target component information to obtain a replacement recommendation list to implement the electronic component data query operation.

2. The method for constructing a database based on electronic components according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: collecting component information through the electronic component trading platform to obtain an original component data set; performing component potential relationship analysis on the original component data set, and classifying the relationships to obtain a component relationship set; Step S12: Evaluate the relationship weights of the component relationship set to obtain a weighted component relationship set; Step S13: importing the weighted component relationship set into a preset graph database, performing graph visualization processing, and obtaining an initial component association graph; Step S14: Acquire application requirement data; optimize and improve the initial component association map according to the application requirement data to obtain a component association map; Step S15: extracting multi-dimensional attributes from the component association graph to obtain a component attribute vector; Step S16: performing component similarity calculation and cluster analysis based on component attribute vectors to obtain component clusters.

3. The method for constructing a database based on electronic components according to claim 2, characterized in that: Step S15 includes the following steps: Step S151: performing attribute information expansion processing on the component association map to obtain an expanded component association map; Step S152: performing attribute standardization processing on the extended component association map to obtain a standardized component attribute set; Step S153: constructing an attribute vector for the standardized component attribute set to obtain a preliminary component attribute vector; Step S154: performing attribute vector dimension reduction on the preliminary component attribute vector to obtain a component attribute vector.

4. The method for constructing a database based on electronic components according to claim 2, characterized in that: Step S16 includes the following steps: Step S161: performing similarity matrix calculation on component attribute vectors to obtain a component similarity matrix; Step S162: constructing a clustering model according to the component similarity matrix to obtain a clustering model; Step S163: performing cluster analysis on the component similarity matrix using a clustering model to obtain initial component clusters; Step S164: performing cluster evaluation on the initial component clusters to obtain component clusters.

5. The method for constructing a database based on electronic components according to claim 3, characterized in that: Step S2 includes the following steps: Step S21: extracting pin information from the extended component association map according to the component clusters to obtain a cluster pin data set; Step S22: performing pin function semantic analysis on the clustered pin data set to obtain a semantic clustered pin data set; Step S23: identifying the intra-cluster pin mapping relationship of the semantic clustering cluster pin data set to obtain an intra-cluster pin mapping table; Step S24: constructing a pin compatibility matrix according to the intra-cluster pin mapping table to obtain an initial pin compatibility matrix; Step S25: performing compatibility matrix optimization and calibration on the initial pin compatibility matrix to obtain a pin compatibility matrix; Step S26: performing package compatibility analysis based on component clusters, the extended component association map, and the pin compatibility matrix to obtain a package compatibility table.

6. The method for constructing a database based on electronic components according to claim 5, characterized in that: Step S22 includes the following steps: Step S221: constructing an electronic component knowledge graph based on the original component data set to obtain an electronic component knowledge graph; Step S222: Perform pin function entity connection on the electronic component knowledge graph and the clustered pin data set to obtain a physically connected pin data set; Step S223: using the electronic component knowledge graph to perform pin function semantic expansion on the pin dataset after physical connection, to obtain a pin dataset after semantic expansion; Step S224: performing pin function semantic vectorization on the semantically expanded pin data set to obtain a pin function semantic vector data set; Step S225: Calculate the semantic similarity between different pin functions using the pin function semantic vector data set to obtain pin function semantic similarity data; perform semantic weighted fusion on the pin function semantic similarity data and the cluster pin data set to obtain a semantic cluster pin data set.

7. The method for constructing a database based on electronic components according to claim 5, characterized in that: Step S26 includes the following steps: Step S261: extracting the intra-cluster packaging information from the extended component association graph according to the component clustering clusters to obtain the intra-cluster packaging information; Step S262: performing packaging information matching on the packaging information in the cluster and the pin compatibility matrix to obtain a cluster packaging information table; Step S263: Acquire package physical compatibility data; define physical compatibility rules according to the package physical compatibility data to obtain a package compatibility rule library; Step S264: performing a packaging compatibility evaluation on the cluster packaging information table according to the packaging compatibility rule base to obtain a packaging compatibility table.

8. The method for constructing a database based on electronic components according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: performing query load analysis according to component clusters, pin compatibility matrix, and package compatibility table to obtain query load characteristics; Step S32: design and create an index according to the query load characteristics to obtain an index optimization database; Step S33: performing database parameter tuning on the index optimization database according to the query load characteristics to obtain a parameter tuning database; Step S34: performing data slicing and table division processing on the parameter tuning database to obtain an electronic component database.

9. The method for constructing a database based on electronic components according to claim 1, characterized in that: Step S4 includes the following steps: Step S41: inputting a user query through the electronic component database, generating component data to be searched, and obtaining component data to be searched; performing structured processing on the component data to be searched, and obtaining target component information; Step S42: locating component nodes on the component association map according to the target component information to obtain component node data; Step S43: Summarize component information according to component node data to obtain a candidate component set; Step S44: performing multi-dimensional condition screening on the candidate component set according to the target component information to obtain screened candidate components; performing multi-dimensional sorting on the screened candidate components according to the component similarity matrix, the pin compatibility matrix, and the package compatibility table to obtain a sorted candidate component set; Step S45: generating a replacement recommendation list according to the sorted candidate component set to obtain an initial replacement recommendation list; Step S46: Enhance the interpretability of the initial alternative recommendation list to obtain an alternative recommendation list.

10. A database construction system based on electronic components, characterized in that: Used to execute the electronic component-based database construction method according to claim 1, the electronic component-based database construction system comprises: The component association analysis module is used to collect component information through the electronic component trading platform to obtain the original component data set; construct component relationship mapping based on the original component data set to obtain the component association map; extract multi-dimensional attributes from the component association map to obtain the component attribute vector; perform component similarity calculation and cluster analysis based on the component attribute vector to obtain the component clustering cluster; The component compatibility analysis module is used to extract pin information based on component clustering clusters to obtain a clustering cluster pin data set; perform pin function semantic analysis on the clustering cluster pin data set to obtain a semantic clustering cluster pin data set; construct a pin compatibility matrix based on the semantic clustering cluster pin data set to obtain a pin compatibility matrix; perform package compatibility analysis based on the component clustering clusters and the pin compatibility matrix to obtain a package compatibility table; A database construction module is used to construct an electronic component database according to the component clustering clusters, the pin compatibility matrix and the package compatibility table to obtain an electronic component database; The component query module is used to obtain the target component information input by the user through the electronic component database; perform equivalent replacement recommendation query based on the target component information to obtain a replacement recommendation list to realize the electronic component data query operation.

Citation Information

Patent Citations

  • Electronic component knowledge reasoning and knowledge graph construction method and system and medium

    CN115080759A

  • Electronic component evaluation method and device, computer equipment and storage medium

    CN115936312A