Database construction method and system based on electronic components
The method addresses the limitations of traditional database methods by constructing association graphs and performing semantic analysis to enhance electronic component database queries and recommendations, improving accuracy and compatibility analysis.
Patent Information
- Application Number
- CN202411509197.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-10-28
AI Technical Summary
Traditional database methods for electronic components lack effective representation and utilization of complex associations, such as equivalent substitution and pin mapping, leading to imprecise queries and increased design risks due to missing semantic information and compatibility analysis.
A method involving data collection from electronic component trading platforms, constructing association graphs, extracting multi-dimensional attributes, performing clustering and compatibility analysis to build a database that supports precise queries and recommendations through graph algorithms and semantic analysis.
Enhances query accuracy and efficiency by providing a robust framework for electronic component substitution and compatibility analysis, reducing design risks and improving user satisfaction.
Smart Images

Figure CN119621700A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic component data processing, and in particular to a database construction method and system based on electronic components. Background Art
[0002] In the field of electronic components, the traditional database construction method is mainly based on relational databases, which store and manage component information in the form of two-dimensional tables. This method has certain advantages in processing structured data, but it often shows some shortcomings when faced with the highly correlated characteristics of electronic component data:
[0003] 1. Insufficient expression of association relationships: Many databases only focus on the basic parameter information of components, and lack the effective expression and utilization of complex association relationships such as equivalent substitution, pin mapping, and packaging form. As a result, the query results are not accurate enough and it is difficult to meet the needs of complex application scenarios.
[0004] 2. Lack of semantic information: Some databases only store text information of components and lack the extraction and analysis of semantic information such as pin functions and application scenarios, making it difficult to perform accurate matching and intelligent recommendations.
[0005] 3. Insufficient compatibility analysis: Some databases lack analysis of component packages 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 building 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 comprises the following steps:
[0008] 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;
[0009] 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;
[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: importing the weighted component relationship set into a preset graph database, performing graph visualization processing, and obtaining an initial component association graph;
[0017] 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;
[0018] Step S15: extracting multi-dimensional attributes from the component association graph to obtain a component attribute vector;
[0019] Step S16: performing component similarity calculation and cluster analysis based on component attribute vectors to obtain component clusters.
[0020] The present invention acquires and parses component information from component supplier websites, analyzes the potential relationships between components, constructs component relationship sets, provides a data basis for the subsequent construction of component association maps, avoids the tedious work of manually collecting and collating data, and improves the efficiency and coverage of data acquisition. By assigning different weights to different types of relationships, for example, the weight of "equivalent substitution relationship" is higher than that of "functional relationship", the degree of association between components can be described more accurately, so that the constructed component association map is more in line with the actual situation, and the reliability and reference value of the map are improved. The weighted component relationship set is imported into a graph database and displayed using the visualization tool of the graph database, which can intuitively present the complex relationship between components, facilitate users to understand and analyze the association between components, and provide a visual reference for subsequent component query and recommendation. By introducing actual application demand data, such as circuit board design files, bill of materials, etc., the component association map is optimized and improved, which can make the map closer to the actual application scenario, improve the practicality and pertinence of the map, for example, it can identify the commonly used component combinations and alternatives in actual applications. By using graph algorithms to extract multi-dimensional attribute information of components, such as degree centrality, betweenness centrality, PageRank value, etc., we can more comprehensively describe the status and role of components in the graph, overcome the limitation of traditional methods that only rely on the attributes of components themselves, and provide richer feature information for subsequent component similarity calculation and cluster analysis. According to the component attribute vector, the cosine similarity algorithm is used to calculate the similarity between components, and the K-Means clustering algorithm is used to divide the components with high similarity into the same cluster. The components in the database can be effectively classified, which is convenient for users to quickly find components with similar functions and can be replaced by each other, and improve the efficiency and accuracy of component query and recommendation.
[0021] Preferably, step S15 comprises the following steps:
[0022] Step S151: performing attribute information expansion processing on the component association map to obtain an expanded component association map;
[0023] Step S152: performing attribute standardization processing on the extended component association map to obtain a standardized component attribute set;
[0024] Step S153: constructing an attribute vector for the standardized component attribute set to obtain a preliminary component attribute vector;
[0025] Step S154: performing attribute vector dimension reduction on the preliminary component attribute vector to obtain a component attribute vector.
[0026] The present invention captures detailed information of each node in the component association map from the component supplier website, and adds this information as node attributes to the map, enriching the information dimension of the components, providing a more comprehensive data basis for subsequent multidimensional attribute extraction and analysis, for example, the similarity between components can be calculated more accurately. Due to the large differences in the data types and value ranges of component attributes, such as the unit of the operating voltage is volts and the unit of the package size is millimeters, if no standardization is performed, some attributes will occupy too much weight in the similarity calculation, affecting the accuracy of the results. By adopting different standardization methods for different types of attributes, such as Min-Max normalization and unique hot encoding, the influence of the dimensions and value ranges between different attributes can be eliminated, so that different attributes contribute to the similarity calculation in a balanced manner, and the accuracy of the similarity calculation is improved. The standardized attribute values of each component are spliced into a vector to construct a preliminary component attribute vector, which provides a unified data representation for subsequent similarity calculation and cluster analysis, and facilitates algorithm processing and analysis of the association relationship between different attributes. Due to the problems of excessive dimension and information redundancy in the preliminary component attribute vector, for example, there is a high correlation between certain 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, and the efficiency of subsequent similarity calculation and cluster analysis can be improved, while retaining the most important feature information in the data set and avoiding information loss.
[0027] Preferably, step S16 comprises the following steps:
[0028] Step S161: performing similarity matrix calculation on component attribute vectors to obtain a component similarity matrix;
[0029] Step S162: constructing a clustering model according to the component similarity matrix to obtain a clustering model;
[0030] Step S163: performing cluster analysis on the component similarity matrix using a clustering model to obtain initial component clusters;
[0031] Step S164: performing cluster evaluation on the initial component clusters to obtain component clusters.
[0032] The present invention constructs a component similarity matrix by calculating the similarity between component attribute vectors, which can quantitatively describe the similarity between any two components and provide a data basis for subsequent cluster analysis. For example, components with high similarity can be divided into the same cluster 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 clusters K value, to construct a clustering model to provide algorithm support for subsequent cluster analysis. For example, the K-Means clustering algorithm can divide components into different cluster clusters according to the similarity between components. Cluster analysis is performed on the component similarity matrix using the constructed clustering model, and components in the database can be divided into different clusters. The components in each cluster have a high similarity, which is convenient for users to quickly find components with similar functions and can be replaced by each other, thereby improving the efficiency and accuracy of component query and recommendation. Since the performance of clustering algorithms is affected by parameter settings, for example, the clustering effect of the K-Means algorithm is closely related to the selection of the initial cluster center and the setting of the K value, it is necessary to evaluate the initial cluster clusters, such as using indicators such as the silhouette coefficient to evaluate the quality of the clustering results. Based on 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 comprises the following steps:
[0034] Step S21: extracting pin information from the extended component association map according to the component clusters to obtain a cluster pin data set;
[0035] Step S22: performing pin function semantic analysis on the clustered pin data set to obtain a semantic clustered pin data set;
[0036] 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;
[0037] Step S24: constructing a pin compatibility matrix according to the intra-cluster pin mapping table to obtain an initial pin compatibility matrix;
[0038] Step S25: performing compatibility matrix optimization and calibration on the initial pin compatibility matrix to obtain a pin compatibility matrix;
[0039] 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.
[0040] The present invention extracts pin information from the expanded component association map according to the component clustering cluster, constructs a clustering cluster pin data set, provides a data basis for subsequent pin function semantic analysis and compatibility analysis, and limits the analysis scope to each clustering cluster, thereby improving the efficiency and pertinence of the analysis. By using natural language processing technology and electronic component knowledge map, the pin function description in the clustering cluster pin data set is semantically analyzed, and the natural language description is converted into a semantic vector, which can more accurately understand and compare the pin functions between different components, overcome the limitation of traditional methods that only rely on text matching, and improve the accuracy and intelligence of pin function analysis. By calculating the similarity between semantic pin functions, the potential pin mapping relationship between different components in the clustering cluster is identified, and a clustering pin mapping table is constructed to provide data support for the subsequent construction of a pin compatibility matrix, which can automatically identify pins with the same function between different components and provide a reference for component replacement. According to the clustering pin mapping table, an initial pin compatibility matrix is constructed, which can intuitively display the compatibility relationship between pins of different components in the clustering cluster, and provide basic data for subsequent package compatibility analysis. For example, the matrix can be used to determine whether two components can be replaced pin to pin. Since the initial pin compatibility matrix only considers semantic similarity and has errors, by collecting and analyzing actual circuit design data, correcting and optimizing the initial pin compatibility matrix, the accuracy and reliability of the matrix can be improved, making it more in line with actual application conditions. Combining component clusters, expanding component association maps, and pin compatibility matrices, compatibility analysis of the packages of different components in the clusters is performed, and a package compatibility table is constructed, which can help users quickly find components that are compatible with both 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: constructing 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 clustered pin data set to obtain a physically connected pin data set;
[0044] 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;
[0045] Step S224: performing pin function semantic vectorization on the semantically expanded pin data set to obtain a pin function semantic vector data set;
[0046] 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.
[0047] The present invention can store and manage knowledge in the fields of components, pin functions, packaging information, etc. in a structured form by constructing an electronic component knowledge graph, providing rich background knowledge and semantic association information for subsequent pin function semantic analysis, and improving the accuracy and depth of semantic analysis. The pin function description in the clustered cluster pin data set is connected with the entity in the electronic component knowledge graph, and the unstructured text description can be converted into a structured entity link, for example, "input voltage" is linked to the "input voltage" entity in the knowledge graph, providing a basis for subsequent semantic expansion and semantic vectorization. The pin data set after entity connection is semantically expanded using the electronic component knowledge graph, which 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 expanded, making the semantics of the pin function more complete and rich, and improving the accuracy of subsequent semantic similarity calculation. The pin function description after semantic expansion is converted into a semantic vector, and the text information can be represented as 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 spliced together to represent the entire pin function description. The semantic similarity between different pin functions is calculated by using the pin function semantic vector, and semantically weighted fusion is performed with the original cluster pin dataset. This can more accurately describe the similarity of pin functions between different components, overcome the limitation of traditional methods that only rely on text matching, improve the accuracy and intelligence of pin function analysis, and finally obtain a semantic cluster pin dataset.
[0048] Preferably, step S26 comprises the following steps:
[0049] 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;
[0050] 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;
[0051] 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;
[0052] 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.
[0053] The present invention extracts the packaging information of all components in the cluster from the expanded component association map according to the component clustering cluster, provides a data basis for the subsequent packaging compatibility analysis, and limits the analysis scope to each cluster, thereby improving the efficiency and pertinence of the analysis and avoiding the huge amount of calculation for pairwise comparison of all components in the database. In combination with the pin compatibility matrix, the packaging information in the cluster is matched, and pin-compatible component pairs can be screened out, and the corresponding packaging information can be extracted to construct a cluster packaging information table, which provides candidate component pairs for the subsequent packaging compatibility evaluation and avoids the redundant calculation of packaging compatibility evaluation for all components. By collecting and organizing the package physical compatibility data, defining the physical compatibility rules based on these data, and constructing the package compatibility rule base, the knowledge of package compatibility evaluation can be expressed in the form of rules, which improves the automation and interpretability of package compatibility evaluation. By utilizing the package compatibility rule base, the package compatibility of candidate component pairs in the cluster package information table is evaluated. This can automatically determine whether the packages of different components are physically compatible. For example, the rule base can be used to determine whether the packages of two components can share PCB package pads. Ultimately, a package compatibility table is obtained, which provides more comprehensive reference information for component replacement, avoids the problem of only considering pin compatibility and ignoring package compatibility, and improves the success rate of component replacement.
[0054] Preferably, step S3 comprises the following steps:
[0055] Step S31: performing query load analysis according to component clusters, pin compatibility matrix, and package compatibility table to obtain query load characteristics;
[0056] Step S32: design and create an index according to the query load characteristics to obtain an index optimization database;
[0057] Step S33: performing database parameter tuning on the index optimization database according to the query load characteristics to obtain a parameter tuning database;
[0058] Step S34: performing data slicing and table division processing on the parameter tuning database to obtain an electronic component database.
[0059] The present invention extracts database query load characteristics by analyzing historical query logs, user behavior data and typical application scenarios, such as user-common query keywords, query condition combinations, query result sorting methods, etc., to 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 to avoid blind optimization. According to the query load characteristics, design and create database indexes, such as creating a unique index for precise queries based on models, creating a joint index for range queries based on parameters, etc., can improve the efficiency of database queries, shorten query response time, and enhance user experience, especially for electronic component databases with huge data volumes, reasonable index design can significantly improve query speed. According to the query load characteristics, database parameters are tuned, such as adjusting cache size, optimizing query statements, adjusting the number of concurrent connections, etc., which can further improve database performance, such as caching query hotspot data in memory, reducing disk I / O operations, and improving query efficiency; or according to the execution plan of the query statement, adjust the index or rewrite the query statement to optimize query performance. For scenarios with large data volumes and high query loads, sharding and sharding the database, such as distributing data across multiple database instances or splitting a large table into multiple sub-tables, 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 comprises the following steps:
[0061] 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;
[0062] Step S42: locating component nodes on the component association map according to the target component information to obtain component node data;
[0063] Step S43: Summarize component information according to component node data to obtain a candidate component set;
[0064] 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;
[0065] Step S45: generating a replacement recommendation list according to the sorted candidate component set to obtain an initial replacement recommendation list;
[0066] Step S46: Enhance the interpretability of the initial alternative recommendation list to obtain an alternative recommendation list.
[0067] The present invention obtains user query input through a user interface and converts it into structured target component information, such as converting the functional requirements described in natural language into parameter conditions that can be understood by the database, so as to facilitate the system to perform subsequent query and recommendation operations and improve user experience. By using the component association map, the relevant component nodes can be quickly located according to the target component information, so as to narrow the query scope and improve the query efficiency, and use the association relationships contained in the map, such as "same function" and "pin correspondence", to find potential replacement components. The information associated with the located component nodes is extracted from the electronic component database and summarized into the candidate component set, providing a data basis for subsequent condition screening and sorting, and ensuring the comprehensiveness and accuracy of the recommendation results. The candidate component set is screened in multiple dimensions according to the target component information, such as screening according to parameters such as voltage, current, and packaging, so that components that do not meet the requirements can be excluded, the recommendation scope can be narrowed, and sorting can be performed according to the similarity matrix, compatibility matrix, and packaging compatibility table, so that the components that best meet the user's needs can be placed in front, and the accuracy and relevance of the recommendation results can be improved. An initial replacement recommendation list is generated based on the sorted candidate component set, and the top candidate components are displayed to the user as the recommendation results, which can quickly provide users with multiple alternatives to meet the user's needs to quickly find suitable components. The initial replacement recommendation list is enhanced to make the results interpretable, such as displaying similarity scores, compatibility scores, and reasons for recommendations, which can help users understand the basis of the recommendation results, increase users' trust in the recommendation results, and facilitate users to make choices based on their own needs.
[0068] Preferably, the present invention further provides a database construction system based on electronic components, which is used to execute the database construction method based on electronic components as described above. The database construction system based on electronic components includes:
[0069] 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;
[0070] 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;
[0071] 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;
[0072] 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.
[0073] 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 A schematic diagram of the steps of a method for building a database based on electronic components;
[0075] Figure 2 for Figure 1 Detailed implementation steps of step S1 in FIG.
[0076] Figure 3 for Figure 1 Detailed implementation steps of step S2 in FIG.
[0077] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0078] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.
[0079] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying 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 implemented in one or more hardware modules or integrated circuits, or implemented 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 herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0081] To achieve this, please refer to Figures 1 to 3 , a method for constructing a database based on electronic components, comprising the following steps:
[0082] 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;
[0083] 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;
[0084] 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;
[0085] 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.
[0086] In the embodiment of the present invention, reference Figure 1 The above is a schematic diagram of the steps of the method for constructing a database based on electronic components of the present invention. In this example, the method for constructing a database based on electronic components includes the following steps:
[0087] 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;
[0088] In an embodiment of the present invention, firstly, component information is obtained through an electronic component trading platform, an original component data set is constructed, and data cleaning is performed. Then, the component description text is analyzed using natural language processing technology to extract key information, and a weighted component relationship set is constructed according to preset rules and relationship weight evaluation. Next, the weighted relationship set is imported into the Neo4j graph database for visualization to obtain an initial graph of component associations. Finally, the initial graph is optimized and improved in combination with actual application demand data, and a graph algorithm is used to extract multidimensional attribute information, construct a component attribute vector, and finally, the component clustering cluster is obtained through cosine similarity and K-Means clustering algorithm.
[0089] 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;
[0090] In an embodiment of the present invention, according to the component clustering cluster, the pin information of each component is extracted from the expanded component association graph to construct a cluster pin data set. Then, SpaCy is used for word segmentation and named entity recognition, and the pin function semantic analysis is performed in combination with the pre-built electronic component knowledge graph, and the pin function description is converted into a semantic vector to obtain a semantic cluster pin data set. Next, the similarity between the semantic pin functions is calculated, the pin mapping relationship within the cluster is identified, the initial pin compatibility matrix is constructed, and the actual circuit design data is combined for correction and optimization. Finally, according to the component clustering cluster and the pin compatibility matrix, the compatibility between different component packages within the cluster is analyzed, and a package compatibility table is constructed.
[0091] 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;
[0092] In an embodiment of the present invention, first, historical query logs, user behavior data, and typical application scenarios are analyzed to determine the query types that the database needs to focus on optimizing, such as precise queries based on models, range queries based on parameters, and compatibility queries based on packages. Then, based on the query load characteristics, indexes for different query types are created in the database, such as unique indexes, joint indexes, etc., to build an index optimization database. Next, based on the query load characteristics, database parameters, such as cache size, query statements, number of concurrent connections, etc., are adjusted, and evaluated and fine-tuned through performance testing tools to obtain a parameter tuning database. Finally, for scenarios with large data volumes and high query loads, data sharding and table sharding are performed to ultimately obtain an electronic component database.
[0093] Step S4: obtaining target component information input by the user through the electronic component database; performing equivalent replacement recommendation query according to the target component information to obtain a replacement recommendation list to implement the electronic component data query operation;
[0094] In an embodiment of the present invention, the user inputs the information of the components to be found through the interface, and the system parses it into structured target component information. Then, the system locates the relevant nodes in the component association map according to the target component information, extracts the associated component information from the database, and summarizes it into a set of candidate components. Next, the system performs multi-dimensional conditional screening on the candidate component set according to the target component information, and sorts them according to the similarity matrix, compatibility matrix and package compatibility table to obtain a sorted set of candidate components. Then, the system generates an initial alternative recommendation list, and uses the top-ranked candidate components as the recommendation results. Finally, the system performs explanatory enhancement on the recommendation results, such as displaying similarity scores, compatibility scores, recommendation reasons, etc., and finally obtains an alternative recommendation list and displays it to the user.
[0095] Preferably, step S1 comprises the following steps:
[0096] 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;
[0097] Step S12: Evaluate the relationship weights of the component relationship set to obtain a weighted component relationship set;
[0098] Step S13: importing the weighted component relationship set into a preset graph database, performing graph visualization processing, and obtaining an initial component association graph;
[0099] 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;
[0100] Step S15: extracting multi-dimensional attributes from the component association graph to obtain a component attribute vector;
[0101] Step S16: performing component similarity calculation and cluster analysis based on component attribute vectors to obtain component clusters.
[0102] As an example of the present invention, refer to Figure 2 As shown, in this example, step S1 includes:
[0103] 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;
[0104] In an embodiment of the present invention, first, the electronic component trading platform obtains component information, including model, manufacturer, parameters, description, and constructs a component original data set. Then, the original data set is cleaned to remove duplicate data, missing values, format errors, and other problems. Natural language processing technology (NLP) is used to perform word segmentation, part-of-speech tagging, and named entity recognition on the component description text to extract key information, such as package type, operating temperature, functional category, etc. Based on the extracted keywords and pre-set relationship rules (for example, components with the same package constitute a "package relationship", and components with the same functional category constitute a "functional relationship"), the components are analyzed for potential relationships, and the analysis results are classified to construct a component relationship set.
[0105] Step S12: Evaluate the relationship weights of the component relationship set to obtain a weighted component relationship set;
[0106] In the embodiment of the present invention, the component relationship set obtained in step S11 is evaluated for relationship weight according to the predefined relationship weight rule. For example, the weight of "equivalent substitution relationship" is set to 0.8, the weight of "functional relationship" is set to 0.5, and the weight of "packaging relationship" is set to 0.3. Finally, the weighted component relationship set is obtained.
[0107] Step S13: importing the weighted component relationship set into a preset graph database, performing graph visualization processing, and obtaining an initial component association graph;
[0108] In the embodiment of the present invention, the weighted component relationship set obtained in step S12 is imported into the graph database using the Python driver py2neo provided by the Neo4j graph database. The components are used as nodes, the relationships are used as edges, and the weights are used as attributes of the edges. The imported data is visualized using the visualization tool Neo4j Browser provided by the Neo4j graph database to intuitively display the relationships between components and obtain an initial graph of component associations.
[0109] 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;
[0110] In an embodiment of the present invention, circuit design requirement data in actual application scenarios are collected, such as circuit board design files, bills of materials (BOM), etc. These data are analyzed to extract potential association relationships between components, such as which components on a circuit board are usually used together, which components can replace each other, etc. Based on 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 edge weights, etc., to finally obtain a component association graph that better meets actual application requirements.
[0111] Step S15: extracting multi-dimensional attributes from the component association graph to obtain a component attribute vector;
[0112] In the embodiment of the present invention, based on the component association graph obtained in step S14, a graph algorithm is used to extract multi-dimensional attribute information of components. For example:
[0113] Degree centrality: Calculates the number of connections of each component node in the graph, indicating the importance of the component.
[0114] Betweenness centrality: Calculates 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: The influence of each component node is calculated using the web page ranking algorithm, indicating the importance of the component in the entire graph.
[0116] The above calculation results and the component's own properties (such as package type, operating temperature, functional category, etc.) are integrated to construct a component property vector.
[0117] Step S16: performing component similarity calculation and cluster analysis based on component attribute vectors to obtain component 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, and a component similarity matrix is constructed. The K-Means clustering algorithm is selected, and cluster analysis is performed according to the component similarity matrix, and components with high similarity are divided into the same cluster to obtain an initial component cluster. The silhouette coefficient is used to evaluate the quality of the initial cluster, and the parameters of the K-Means algorithm (such as the number of clusters) are adjusted according to the evaluation results, and finally the optimal component cluster is obtained.
[0119] Preferably, step S15 comprises the following steps:
[0120] Step S151: performing attribute information expansion processing on the component association map to obtain an expanded component association map;
[0121] Step S152: performing attribute standardization processing on the extended component association map to obtain a standardized component attribute set;
[0122] Step S153: constructing an attribute vector for the standardized component attribute set to obtain a preliminary component attribute vector;
[0123] Step S154: performing attribute vector dimension reduction on the preliminary component attribute vector to obtain a component attribute vector.
[0124] In an embodiment of the present invention, the Python network data capture library Beautiful Soup is used to capture detailed information of each node (i.e., component) in the component association map from the component supplier website (such as Digikey, Mouser, etc.), such as operating voltage, current, package size, accuracy, temperature range, etc. The captured information is added to the component association map as the attribute of the component node to form an extended component association map. For example, for the node "LM7805", its operating voltage (5V), current (1A), package size (TO-220), accuracy (±4%) and other information can be captured and added.
[0125] Different standardized methods are used to process different types of attributes in the extended component association graph:
[0126] Numerical attributes: such as operating voltage, current, package size, etc., use the Min-Max normalization method to scale the attribute value to the interval [0, 1]. For example, the operating voltage of "LM7805" 5V is normalized to (5-V_min) / (V_max-V_min), where V_max and V_min represent the maximum and minimum values of the operating voltage of all components respectively.
[0127] Categorical attributes: such as package type, functional category, etc., are converted into multi-dimensional binary vectors using One-Hot Encoding. For example, the package type "TO-220" is converted into [0, 1, 0, 0], where each dimension represents a package type.
[0128] After standardization, 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, assuming that the attribute values of the component "LM7805" after standardization are: operating voltage 0.75, current 0.2, package type [0, 1, 0, 0], and precision 0.6, then its preliminary component attribute vector is [0.75, 0.2, 0, 1, 0, 0, 0.6].
[0130] Since the preliminary component attribute vector has problems such as high dimensionality and information redundancy, 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 data set 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 comprises the following steps:
[0132] Step S161: performing similarity matrix calculation on component attribute vectors to obtain a component similarity matrix;
[0133] Step S162: constructing a clustering model according to the component similarity matrix to obtain a clustering model;
[0134] Step S163: performing cluster analysis on the component similarity matrix using a clustering model to obtain initial component clusters;
[0135] Step S164: performing cluster evaluation on the initial component clusters to obtain component clusters.
[0136] In an embodiment of the present invention, the NumPy library in Python is used to calculate the similarity between two components based on the component attribute vector obtained in step S15 using the cosine similarity algorithm. The calculation results are stored in an N×N matrix, where N represents the number of components, and each element in the matrix represents the similarity between the corresponding two components, with a value range of [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 the algorithm is implemented using the Scikit-learn library in Python. According to the number of components and clustering requirements, the initial clustering cluster number K value is pre-set, for example, setting K=10 means that the components are divided into 10 clusters. The component similarity matrix obtained in step S161 is used as input data, and cluster analysis is performed using the K-Means clustering model constructed in step S162. The K-Means algorithm iteratively calculates the distance from each component to each cluster center, and divides the components into the cluster to which the nearest cluster center belongs until the clustering result is stable. Finally, the initial component cluster is obtained, and each component will be assigned to a specific cluster. The silhouette coefficient is used as an evaluation indicator to evaluate the quality of the initial component cluster obtained in step S163. The silhouette coefficient value range is [-1, 1], and the larger the value, the better the clustering effect. According to the evaluation result of the silhouette coefficient, determine whether the current K value is appropriate. If it is not appropriate, adjust the parameter K value of the K-Means algorithm, for example, try K=8 or K=12, repeat steps S162 and S163 for clustering analysis, and recalculate the silhouette coefficient. Finally, select the K value with the highest silhouette coefficient and the corresponding clustering result as the final component cluster.
[0137] Preferably, step S2 comprises the following steps:
[0138] Step S21: extracting pin information from the extended component association map according to the component clusters to obtain a cluster pin data set;
[0139] Step S22: performing pin function semantic analysis on the clustered pin data set to obtain a semantic clustered pin data set;
[0140] 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;
[0141] Step S24: constructing a pin compatibility matrix according to the intra-cluster pin mapping table to obtain an initial pin compatibility matrix;
[0142] Step S25: performing compatibility matrix optimization and calibration on the initial pin compatibility matrix to obtain a pin compatibility matrix;
[0143] 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.
[0144] As an example of the present invention, refer to Figure 3 As shown, in this example, step S2 includes:
[0145] Step S21: extracting pin information from the extended component association map according to the component clusters to obtain a cluster pin data set;
[0146] In an embodiment of the present invention, each component cluster obtained in step S16 is traversed, and for each component in the cluster, its pin information is extracted from the extended component association map obtained in step S151, including pin name, pin number, pin function description, etc. The extracted pin information is associated with the component and cluster to which it belongs, and a cluster pin data set is constructed. For example, for the component "LM7805" in the "voltage regulator" cluster, its pin information is extracted: {"component": "LM7805", "cluster": "voltage regulator", "pin": [{"name": "Input", "number": "1", "function": "input voltage"}, {"name": "Output", "number": "2", "function": "output voltage"}, {"name": "Ground", "number": "3", "function": "ground"}]}.
[0147] Step S22: performing pin function semantic analysis on the clustered pin data set to obtain a semantic clustered pin data set;
[0148] In an embodiment of the present invention, a natural language processing tool (such as SpaCy) is used to perform word segmentation, part-of-speech tagging, named entity recognition and other operations on the pin function description in the clustered pin data set obtained in step S21 to extract key function words. For example, for the description of "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, 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 semantically clustered pin data set.
[0149] 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;
[0150] In an embodiment of the present invention, for each cluster, the pin function semantic vectors of each component in the semantic cluster pin data set are analyzed, and the semantic similarity between the two pins is calculated. A semantic similarity threshold is set, such as 0.8, and the pin pairs with semantic similarity higher than the threshold are identified as potential pin mapping relationships, and the corresponding component information is recorded. All identified pin mapping relationships are sorted into a pin mapping table within the cluster, for example: {"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: constructing a pin compatibility matrix according to the intra-cluster pin mapping table to obtain an initial pin compatibility matrix;
[0152] In the embodiment of the present invention, an initial pin compatibility matrix is constructed according to the intra-cluster pin mapping table obtained in step S23. The rows and columns of the matrix represent the pins of all components in the cluster, and the values of the matrix elements represent the compatibility between the corresponding two pins. If there is a mapping relationship between the two pins, the compatibility value is 1, otherwise it is 0.
[0153] Step S25: performing compatibility matrix optimization and calibration on the initial pin compatibility matrix to obtain a pin compatibility matrix;
[0154] In the embodiment of the present invention, since the initial pin compatibility matrix obtained in step S24 only considers semantic similarity, there are errors. In order 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 schematics, PCB layout diagrams, etc., and extract the actual pin connection relationship between components. According to the actual connection relationship, the initial pin compatibility matrix is corrected, for example, the elements whose compatibility is originally 0 are modified to 1, or the elements whose compatibility is originally 1 are modified to 0.
[0155] Step S26: performing package compatibility analysis according to the component clusters, the extended component association map, and the pin compatibility matrix to obtain a package compatibility table;
[0156] In an embodiment of the present invention, according to the component clustering cluster, the package information of all components in each clustering cluster is extracted from the extended component association map, including the package name, the number of pins, the pin spacing, etc. Combined with the pin compatibility matrix obtained in step S25, the compatibility between the packages of different components in 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, then the packages of the two components are considered to be compatible. All analysis results are organized into a package compatibility table.
[0157] Preferably, step S22 includes the following steps:
[0158] Step S221: constructing an electronic component knowledge graph based on the original component data set to obtain an electronic component knowledge graph;
[0159] 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;
[0160] 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;
[0161] Step S224: performing pin function semantic vectorization on the semantically expanded pin data set to obtain a pin function semantic vector data set;
[0162] 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.
[0163] In an embodiment of the present invention, the original component data set is used to extract key information such as components, pin functions, packaging information, technical parameters, etc. as entities of the electronic component knowledge graph. By analyzing the component data sheet, technical manual and related literature, the categories of the relationship between entities are defined, such as "same function", "pin correspondence", "package compatibility", etc. The electronic component knowledge graph is constructed using the Neo4j graph database, and the extracted entity and relationship information are stored in the graph database. For example, a "same function" relationship between the component "LM7805" and the pin function "voltage regulation" and a "package type" relationship with the package "TO-220" are established. The clustered cluster pin data set obtained in step S21 is traversed, and each pin function description is matched with an entity 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, and the pin data set after entity connection is obtained. The pin data set after entity connection obtained in step S222 is used to perform semantic expansion in the knowledge graph of electronic components. 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, the information of its neighbor nodes "voltage", "power supply" and so on can be extracted as semantic expansion. The pin function description after semantic expansion in step S223 is converted into a semantic vector using a word embedding model (such as Word2Vec). 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 spliced together 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 value of the angle between two pin function semantic vectors is calculated using cosine similarity as their semantic similarity. The calculated semantic similarity is merged 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 descriptions to obtain a semantically clustered pin data set.
[0164] Preferably, step S26 comprises the following steps:
[0165] 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;
[0166] 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;
[0167] 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;
[0168] 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.
[0169] In an embodiment of the present invention, for each component cluster, the packaging information of all components in the cluster is extracted from the extended component association map obtained in step S151. The packaging information includes package name, number of pins, pin spacing, package size, three-dimensional model, etc. For example, for the "voltage regulator" cluster, the packaging information of "LM7805" is extracted: {"component": "LM7805", "package name": "TO-220", "number of pins": 3, "pin spacing": 2.54mm, "package size": (length) 9.8mm x (width) 6.9mm x (height) 4.5mm, "three-dimensional model": ...}. All extracted packaging information is sorted into intra-cluster packaging information. Based on the pin compatibility matrix obtained in step S25, pin pairs with a compatibility value of 1 are screened out. For each compatible pin pair, the packaging information of the component to which it belongs is matched. For example, if pin 1 of "LM7805" is compatible with pin 1 of "AMS1117-5.0", then extract the package information of these two components, such as "TO-220" and "SOT-223". Arrange all matching package information pairs into a cluster package information table, for example: {"cluster": "voltage regulator", "package information pair": [{"component 1": "LM7805", "package 1": "TO-220", "component 2": "AMS1117-5.0", "package 2": "SOT-223"}, ...]}. Obtain package physical compatibility data from component databases, package libraries, and related standard specifications. The data contains physical compatibility relationships between different packages, such as which packages can share PCB package pads and which packages have compatible sizes and spacings. Based on the obtained package physical compatibility data, define a series of physical compatibility rules, and use tools such as rule engines or decision trees to build a package compatibility rule library. For example, define a rule: if two packages have the same number of pins, the same pin spacing, and compatible package sizes, then the two packages are considered to be physically compatible. Using the package compatibility rule base constructed in step S263, the package compatibility evaluation is performed on the cluster package information table obtained in step S262. For each package information pair, the corresponding physical compatibility rules are matched according to information such as package name, number of pins, pin spacing, package size, etc., to determine whether the two packages are physically compatible. For example, according to the rule base, it is determined that the "TO-220" and "SOT-223" packages are incompatible. All evaluation results are organized into a package compatibility table, for example: {"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 is 1 for compatible and 0 for incompatible.
[0170] Preferably, step S3 comprises the following steps:
[0171] Step S31: performing query load analysis according to component clusters, pin compatibility matrix, and package compatibility table to obtain query load characteristics;
[0172] Step S32: design and create an index according to the query load characteristics to obtain an index optimization database;
[0173] Step S33: performing database parameter tuning on the index optimization database according to the query load characteristics to obtain a parameter tuning database;
[0174] Step S34: performing data slicing and table division processing on the parameter tuning database to obtain an electronic component database.
[0175] In the embodiment of the present invention, historical query logs, user behavior data and typical application scenarios are analyzed to extract database query load characteristics. For example, statistical analysis is performed on the query keywords, query condition combinations, query result sorting methods, etc. that users often use. Based on the analysis results, the query types that the database needs to focus on optimizing are determined, such as:
[0176] Precise query based on component model: The user enters the precise component model for query, such as "LM7805".
[0177] Range query based on functional parameters: The user enters the range of functional 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, a database index is designed and created to improve query efficiency. For example:
[0180] For precise queries based on the part number, create a unique index on the Part Number field.
[0181] For range queries based on function parameters, a joint index is created on commonly used function parameter fields (such as voltage, current, package type, etc.).
[0182] For compatibility queries based on package information, create joint indexes on fields such as package name, number of pins, and pin spacing.
[0183] Use a database management tool (such as MySQL Workbench) to create the above index, and import data such as component clustering, pin compatibility matrix, and package compatibility table into the database.
[0184] According to the query load characteristics obtained in step S31, the database parameters of the index optimization database obtained in step S32 are tuned to further improve the database performance. For example:
[0185] Adjust cache size: According to the size of query hot data, adjust the database cache size, such as the `innodb_buffer_pool_size` parameter, to store hot data in memory and reduce disk I / O operations.
[0186] Optimize query statements: Analyze slow query logs, identify query statements with low execution efficiency, and optimize them, such as using appropriate indexes and adjusting the order of query conditions.
[0187] Adjust the number of concurrent connections: According to the estimated number of concurrent users, adjust the maximum number of database connections, such as the `max_connections` parameter, to ensure that the system can handle the expected concurrent requests.
[0188] Use performance testing tools (such as MySQL Benchmark) to simulate different query loads, evaluate the database performance after parameter adjustment, and fine-tune the parameters based on the evaluation results to ultimately obtain a parameter-tuned database.
[0189] For scenarios with large data volumes and high query loads, the parameter tuning database obtained in step S33 is subjected to data sharding and table sharding to further improve the scalability and performance of the database. For example:
[0190] Data sharding: Component data is horizontally divided into different database instances based on the functional category or application field of the components. For example, "power management" component data is stored in one shard, and "signal processing" component data is stored in another shard.
[0191] Table splitting: Split a table with large data volume into multiple sub-tables. For example, split the "Components" table into 26 sub-tables according to the first letter. Each sub-table stores the component data starting with the corresponding letter.
[0192] Data sharding and table sharding can be implemented using database middleware (such as MyCat) or distributed database solutions (such as TiDB). Finally, an electronic component database is obtained.
[0193] Preferably, step S4 comprises the following steps:
[0194] 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;
[0195] Step S42: locating component nodes on the component association map according to the target component information to obtain component node data;
[0196] Step S43: Summarize component information according to component node data to obtain a candidate component set;
[0197] 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;
[0198] Step S45: generating a replacement recommendation list according to the sorted candidate component set to obtain an initial replacement recommendation list;
[0199] Step S46: Enhance the 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 program interface), a user inputs information about components to be searched, such as component model, function description, key parameters, etc. The system automatically generates data about components to be searched based on the user input. For example, the user inputs "needs a 5V voltage, 1A current LDO regulator, packaged as SOT-223". The system parses the requirement into structured target component information, such as: {"Function": "LDO regulator", "Voltage": "5V", "Current": "1A", "Package": "SOT-223"}. According to the target component information obtained in step S41, the component nodes are located in the component association graph constructed in step S14. For example, the system uses the graph database query language to locate the node set with the function "LDO regulator" based on the "Function" field in the target component information. According to the component node data located in step S42, the associated component information, such as component model, manufacturer, parameters, package, etc., is extracted from the electronic component database. All extracted component information is aggregated into a candidate component set. According to the target component information obtained in step S41, the candidate component set obtained in step S43 is screened by multi-dimensional conditions. 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. Then, the screened candidate components are sorted in multiple dimensions according to the component similarity matrix, the pin compatibility matrix, and the package compatibility table. For example, components with high similarity to the target components, good pin compatibility, and package compatibility are placed in front to obtain a sorted candidate component set. According to the sorted candidate component set obtained in step S44, an initial replacement recommendation list is generated. For example, the top 10 candidate components are used as recommendation results, and their key information, such as component model, manufacturer, main parameters, package, etc., is displayed. In order to enhance the interpretability of the results, the initial replacement recommendation list obtained in step S45 is enhanced for explanatory purposes. For example, for each recommended component, its similarity score with the target component, pin compatibility score, package compatibility score and other indicators are displayed, as well as the reason for the recommendation. For example, the explanation is “component A is recommended because it is 95% similar to the target component and has full pin and package compatibility”. Finally, a list of alternative recommendations is obtained and displayed to the user.
[0201] Preferably, the present invention further provides a database construction system based on electronic components, which is used to execute the database construction method based on electronic components as described above. The database construction system based on electronic components includes:
[0202] 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;
[0203] 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;
[0204] 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;
[0205] 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.
[0206] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.
[0207] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may 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 the embodiments shown herein, but should conform to the widest 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
Military software defect multi-modal knowledge graph construction method, device and system
CN116860986A
Manipulating parameterized cell devices in a custom layout design
US20110307854A1
Cited By
Network traffic identification method and system for unknown cryptographic protocol
CN120110796A
Data processing method for PCB function test
CN120820838A