Auto parts knowledge base data storage and query method, system and storage medium
Through the data storage and query method of the auto parts knowledge base, vectorized processing and centroid region segmentation technology are used to solve the problem of low efficiency of enterprise information retrieval, efficient and accurate knowledge acquisition and update, and the risk of decision-making errors is reduced.
Patent Information
- Application Number
- CN202311588782.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-25
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2043-11-25
AI Technical Summary
When conducting industry analysis and knowledge management, enterprises face problems such as low information retrieval efficiency and personal ability dependence, resulting in decision-making errors and difficulty in knowledge updating.
The auto parts knowledge base data storage and query method is used to process the user's input knowledge data through semantic analysis and vectorization, form summary and keywords, store them in the vector database, and obtain relevant knowledge paragraph data through vector distance retrieval, combining predicted answers and Centroid area segmentation improves retrieval accuracy and efficiency.
It simplifies the processing and storage of knowledge data, improves retrieval efficiency and accuracy, has the ability to expand knowledge, and can quickly obtain relevant knowledge in the field, reducing the risk of information lag.
Smart Images

Figure CN118069776B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of auto parts, and in particular to a method, system and storage medium for storing and querying auto parts knowledge base data. Background Art
[0002] The heads of each business department of an enterprise need to conduct regular industry analysis and research on the industry in which the enterprise is located, and formulate subsequent development plans based on the industry situation and the internal business situation of the enterprise. When it is necessary to understand the information of a certain segment, users need to consult a large amount of external and internal information of the enterprise, and then sort out and integrate them. This process is highly dependent on the rigor of the user's own thinking. If the user misses something when looking for information, or the information is not rich enough, it will affect the subsequent analysis results and the quality of the plan. However, since the workload of users manually finding and sorting information is large, they cannot frequently update research and analysis, which will lead to decision-making errors due to information lag.
[0003] Employees in mental labor positions within the company, especially new employees, need to be exposed to and learn a lot of knowledge to meet the functional requirements of their positions. This knowledge includes both internal knowledge of the company and industry knowledge. In addition to systematic learning, employees need to be able to quickly learn and master new knowledge when encountering new requirements at work. However, many internal jobs and learning within the company cannot be completed by simply finding a knowledge point. It is often necessary to acquire and master knowledge completely and quickly around a field theme. When users search and sort out knowledge in a field, due to the wide range and large amount of knowledge involved, the search efficiency is low, and the effect is also very dependent on the user's personal ability. Summary of the invention
[0004] In order to improve the problem that the retrieval efficiency is low and the effect is highly dependent on the personal ability of the user, the present application provides a method, system and storage medium for storing and querying auto parts knowledge base data.
[0005] The present application provides a method for storing and querying auto parts knowledge base data, which adopts the following technical solution:
[0006] A method for storing and querying auto parts knowledge base data, comprising:
[0007] Read the knowledge data input by the user;
[0008] Performing semantic analysis on the knowledge material data and segmenting it into knowledge paragraph data, and extracting summary data and keyword data from the knowledge paragraph data;
[0009] Adding the summary data and the keyword data to the knowledge paragraph data and storing them vector-wise in an auto parts vector database;
[0010] Read the knowledge requirement data input by the user;
[0011] Extracting knowledge subject data from the knowledge demand data;
[0012] Determine knowledge theme vector data through knowledge theme data, and search and determine the nearest solution vector data with the shortest vector distance in the auto parts vector database through the knowledge theme vector data;
[0013] The knowledge paragraph data corresponding to the most recent solution vector data is output to the user.
[0014] By adopting the above technical solution, the knowledge material data input by the user is automatically segmented, summary data and keyword data are extracted and vectorized and stored in the auto parts vector database, which simplifies the processing and storage of knowledge material data and improves the efficiency of data storage; at the same time, by calculating the vector distance and obtaining the nearest solution vector data corresponding to multiple knowledge subject data, the retrieved knowledge is more accurate and comprehensive, and has the ability to expand knowledge search, and can expand the search knowledge set around multiple related topics in a field.
[0015] Optionally, before outputting the knowledge paragraph data corresponding to the most recent solution vector data to the user, the method further includes: presetting screening quantity data, generating predicted answer data for the knowledge demand data based on AIGC, and determining predicted answer vector data by vectorizing the predicted answer data;
[0016] Calculating the vector distance between the nearest solution vector data and the corresponding predicted answer vector data;
[0017] The number of the nearest solution vector data is determined by combining the vector distance from small to large and the screening quantity data, and the knowledge paragraph data corresponding to the remaining nearest solution vector data is output to the user.
[0018] By adopting the above technical solution, the nearest solution vector data is corrected by predicting the answer vector data, which reduces the probability of deviation of the nearest solution vector data obtained by vector distance in the auto parts vector database. The accuracy is improved by mutual correction of the two methods.
[0019] Optionally, searching and determining the nearest solution vector data with the shortest vector distance in the auto parts vector database through the knowledge subject vector data further includes:
[0020] Preset area quantity data;
[0021] Divide the vector points in the auto parts vector database into a number of centroid areas, the number of the centroid areas corresponds to the area number data, the vector points in the centroid areas are arranged adjacently, and the centers of all the vector points in the centroid areas are set as centroid vector data;
[0022] First, the centroid vector data with the smallest vector distance is determined through the knowledge subject vector data and the centroid vector data;
[0023] Then, the vector point with the smallest vector distance is determined through the vector points in the centroid area corresponding to the knowledge subject vector data and the corresponding centroid vector data as the nearest solution vector data.
[0024] By adopting the above technical solution, when calculating the vector distance for the first time, the centroid vector data is used to replace all the vector points in the centroid area to calculate the vector distance between the knowledge subject vector data, which reduces the amount of calculation by geometric multiples and greatly improves the calculation efficiency. Then, after determining the centroid vector data with the smallest vector distance, the vector points in the centroid area corresponding to this centroid vector data are calculated, which improves the accuracy. The calculation method of first broad and then fine greatly improves the calculation efficiency while ensuring accuracy.
[0025] Optionally, when the vector point with the smallest vector distance is determined by using the knowledge subject vector data and the vector points in the centroid area corresponding to the corresponding centroid vector data as the nearest solution vector data, the method further includes:
[0026] Determine feedback distance data through the vector point with the smallest vector distance and the knowledge subject vector data;
[0027] Determining feedback range data by using the knowledge topic vector data and the feedback distance data;
[0028] Retrieve the number of vector points existing within the range of the feedback range data;
[0029] If there is only one vector point within the range of the feedback range data, this vector point is used as the nearest solution vector data; if there are at least two vector points within the range of the feedback range data, the vector distances between all vector points within the range of the feedback range data and the knowledge subject vector data are calculated, and the vector point with the smallest vector distance calculated at this time is used as the nearest solution vector data.
[0030] By adopting the above technical solution and searching the vector points within the feedback range data again, the probability that the centroid vector data of this centroid area is closest to the knowledge topic vector data, but the vector point closest to the knowledge topic vector data is actually in another centroid area is reduced, thereby further improving the calculation scheme and the accuracy of calculating the nearest solution vector.
[0031] Optionally, when first determining the centroid area with the smallest vector distance through the knowledge topic vector data and the centroid vector data, it also includes:
[0032] Preset centroid search threshold data, centroid quantity threshold data, and range reduction threshold data;
[0033] Determine centroid search range data by using the centroid search threshold data and the knowledge subject vector data;
[0034] Comparing the number of the centroid vector data within the range of the centroid search range data with the centroid number threshold data;
[0035] If the number of the centroid vector data within the range of the centroid search range data is less than the centroid number threshold data, the centroid vector data with the smallest vector distance is determined through the centroid vector data within the range of the centroid search range data and the knowledge subject vector data;
[0036] If the number of the centroid vector data within the range of the centroid retrieval range data is greater than the centroid number threshold data, new centroid retrieval threshold data is determined by the range reduction threshold data and the centroid retrieval threshold data, and the step of comparing the number of the centroid vector data within the range of the centroid retrieval range data with the centroid number threshold data is returned.
[0037] By adopting the above technical solution, the data size of the centroid retrieval range data and the centroid vector data is compared to replace the calculation of the vector distance between the centroid vector data and the knowledge subject vector data, which greatly reduces the amount of calculation and further improves the calculation efficiency.
[0038] Optionally, after first determining the centroid region with the smallest vector distance using the knowledge topic vector data and the centroid vector data, the method further includes:
[0039] Determine deviation range data through the vector distance, and determine search range data through the knowledge subject vector data and the deviation range data;
[0040] The vector point with the smallest vector distance between the vector points within the scope of the search scope data and the knowledge subject vector data is determined as the nearest solution vector data.
[0041] By adopting the above technical solution, when determining the centroid vector data closest to the knowledge topic vector data, a range scanning vector point calculation is performed directly with this vector distance as the radius, thereby achieving accurate retrieval of vector points around the knowledge topic vector data. At the same time, it also reduces the probability that although the centroid vector data of this centroid area is closest to the knowledge topic vector data, the vector point closest to the knowledge topic vector data is actually in another centroid area.
[0042] The present application provides an auto parts knowledge base data storage and query system, which adopts the following technical solutions:
[0043] An auto parts knowledge base data storage and query system, comprising:
[0044] Database, used to store data;
[0045] A processor, used to process the data;
[0046] The operating platform is used for allowing the user to input data into the processor, and the processor stores the data into the database after processing, or the processor calls the data in the database after processing and outputs it to the user.
[0047] By adopting the above technical solution, data is stored in a database, data is input through an operating platform, and data is processed by a processor and then stored in a database or output to a user.
[0048] The present application provides a computer-readable storage medium, which adopts the following technical solution:
[0049] A computer-readable storage medium stores a computer program of an auto parts knowledge base data storage and query method that can be loaded and executed by a processor.
[0050] By adopting the above technical solution, the computer program is stored via a storage medium.
[0051] In summary, the present application includes at least one of the following beneficial technical effects:
[0052] 1. Simplify the processing and storage of knowledge data.
[0053] 2. It has the ability to expand knowledge search and can expand the search knowledge set around multiple related topics in a field. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flow chart of a method for storing auto parts knowledge base data in Example 1 of the present application.
[0055] Figure 2It is a flowchart of a method for querying auto parts knowledge base data in Example 1 of the present application.
[0056] Figure 3 It is a flowchart diagram highlighting the steps between step S4 and step S8.
[0057] Figure 4 is a flowchart highlighting step S4.
[0058] Figure 5 is a flowchart highlighting step S6.
[0059] Figure 6 is a flowchart highlighting step S5.
[0060] Figure 7 It is a module schematic diagram of an auto parts knowledge base data storage and query system in Example 1 of the present application.
[0061] Figure 8 It is a flowchart of a method for querying auto parts knowledge base data in Example 2 of the present application.
[0062] Explanation of the accompanying drawings: 1. Database; 2. Processor; 3. Operating platform. DETAILED DESCRIPTION
[0063] The following is combined with Figure 1-8 This application is described in further detail.
[0064] Embodiment 1 of the present application discloses a method for storing and querying auto parts knowledge base data. Figure 1 ,The data storage and query methods of the auto parts knowledge base include ,storage method:
[0065] S1, read the knowledge data input by the user;
[0066] S11, semantically analyzing the knowledge material data and segmenting it into knowledge paragraph data, extracting summary data and keyword data from the knowledge paragraph data;
[0067] S12, adding the summary data and the keyword data to the knowledge paragraph data and vectorizing and storing them in the auto parts vector database.
[0068] For example: For example, the user inputs "Spark plug, commonly known as spark nozzle, its function is to discharge the pulse high voltage electricity sent by the high-voltage wire (spark nozzle wire), break through the air between the two electrodes of the spark plug, generate electric sparks to ignite the mixed gas in the cylinder. The main types are: quasi-type spark plug, protruding body spark plug, electrode type spark plug, seat type spark plug, pole type spark plug, surface spark plug, etc. The spark plug is installed on the side or top of the engine. The early spark plug was connected to the distributor by the cylinder wire. In the past ten years, the engines on cars have basically been changed to directly connect the ignition coil and the spark plug. The working voltage of the spark plug is at least 10000V. The high voltage electricity is generated by the ignition coil from the 12V electricity and then transmitted to the spark plug."
[0069] Semantic analysis divides the data into two sections of knowledge paragraphs with "……. The spark plug is installed in ……" as the boundary, and extracts summary data and keyword data, such as the keywords "basic knowledge of spark plugs" and "purpose of spark plugs", and uses multi-dimensional parameters such as industry type, industry standards, and sub-fields as coordinates to form vector values of vector points, such as (a, b, c, d, e). In this embodiment, for the convenience of example, only five dimensions are taken as the coordinates of the vector value.
[0070] Reference Figure 2 , query method:
[0071] S2, reading the knowledge requirement data input by the user;
[0072] S3, extracting knowledge subject data from knowledge demand data;
[0073] S4, determining knowledge theme vector data through the knowledge theme data, and searching and determining the nearest solution vector data with the closest vector distance in the auto parts vector database through the knowledge theme vector data;
[0074] S8. Output the knowledge paragraph data corresponding to the latest solution vector data to the user.
[0075] For example: the user inputs "How big is the market space for replacing spark plugs for passenger cars in Shandong Province this year?" as the knowledge demand data, extracts knowledge subject data, and obtains relevant knowledge subject data such as "Basic knowledge of spark plugs", "Knowledge of replacing spark plugs for passenger cars", "Related knowledge of passenger cars (fuel vehicles) in Shandong Province", etc., and quantizes these knowledge subject data into knowledge subject vector data, and then retrieves multiple vector points closest to the distance in the auto parts vector database, such as "Replacement cycle of spark plugs for fuel vehicles", "Spark plug replacement operation method", "Spark plug product introduction", "Number of fuel vehicles in Shandong Province", "Number of passenger cars in Shandong Province", etc. The vector points corresponding to the knowledge subjects are retrieved as the nearest solution vector data of each knowledge subject vector data. If the user presets five, the knowledge paragraph data corresponding to the vector points of the five nearest solution vector data from the smallest to the largest vector distance are output to the user, and five vectors are taken for each knowledge subject vector.
[0076] Reference Figure 3 , between step S4 and step S5, further comprising:
[0077] S9, preset screening quantity data, generate predicted answer data for knowledge demand data based on AIGC, and determine predicted answer vector data by vectorizing the predicted answer data;
[0078] S91, calculating the vector distance between the nearest solution vector data and the corresponding predicted answer vector data;
[0079] S92. Determine the number of nearest solution vector data by vector distance from small to large and screening quantity data, and output the knowledge paragraph data corresponding to the remaining nearest solution vector data to the user.
[0080] For example: based on the user input of "How big is the market space for replacing spark plugs for passenger cars in Shandong Province this year?", AIGC automatically generates predicted answer data, such as "There are X stock passenger cars in Shandong Province in X year, the average age of passenger cars is X, the predicted spark plug failure rate is X, and the expected market demand for spark plugs is X...", and then the predicted answer data is segmented in the same way as step S11, and then vectorized to obtain multiple predicted answer vector data, and the predicted answer vector data is compared with the corresponding nearest solution vector data to calculate the vector distance. If the user presets three here, the three nearest solution vector data are taken from the smallest to the largest vector distance.
[0081] Reference Figure 4 , step S4 comprises:
[0082] S41, preset area quantity data;
[0083] S42, dividing the vector points in the auto parts vector database into a number of centroid regions, the number of centroid regions corresponds to the region number data, the vector points in the centroid regions are all arranged adjacently, and the centers of all vector points in the centroid regions are set as centroid vector data;
[0084] S5, first determine the centroid vector data with the smallest vector distance through the knowledge subject vector data and the centroid vector data;
[0085] S6. Then, determine the vector point with the smallest vector distance through the vector points in the centroid area corresponding to the knowledge subject vector data and the corresponding centroid vector data as the nearest solution vector data.
[0086] For example: if the number of area data is 10,000, and if the number of vector points in the auto parts vector database is 1,000,000, then the number of centroid areas is 10,000, and the number of vector points in each centroid area is 1,000,000 / 10,000 = 100. The number of vector points in each centroid area is allowed to have a single-digit deviation when the vector points cannot be completely evenly divided. As the user continues to input knowledge data, the number of vector points increases, and the centroid area will be re-divided. For the convenience of calculation, the number of vector points in the centroid area is set to 3 for subsequent calculations. Suppose there are centroid area A and centroid area B. There are three vector points in centroid area A, namely vector point a (1,1,1,1,1), vector point b (1,1,1,2,1), and vector point c (1,2,2,1,1). The centroid vector data of centroid area A is There are three vector points in the centroid area B, namely, vector point d(3,3,3,3,3), vector point e(3,3,3,4,3), and vector point f(3,4,3,3,3). The centroid vector data of the centroid area B is
[0087] If the knowledge topic vector data is (2,2,2,2,2), the vector distance between the knowledge topic vector data and the centroid vector data of the centroid area A is The vector distance between the knowledge topic vector data and the centroid vector data of centroid area B is Therefore, the vector distance between the centroid vector data of centroid area A and the knowledge subject vector data is the smallest. Then the vector distances of the three vector points in centroid area A and the knowledge subject vector data are calculated one by one. The vector distance between vector point A and the knowledge subject vector data is The vector distance between vector point B and knowledge topic vector data is The vector distance between vector point C knowledge topic vector data is The vector point with the smallest vector distance to the knowledge topic vector data can be obtained. If the number of possible solutions is 2, then vector point B and vector point C are taken as the nearest solution vector data, and the knowledge paragraph data corresponding to vector point B and vector point C are read and output to the user.
[0088] Reference Figure 5 , step S6 further includes:
[0089] S61, determining feedback distance data through the vector point with the smallest vector distance and the knowledge subject vector data;
[0090] S62, determining feedback range data through the knowledge subject vector data and the feedback distance data;
[0091] S63, retrieving the number of vector points existing within the range of the feedback range data;
[0092] S64. If there is only one vector point within the range of the feedback range data, this vector point is used as the nearest solution vector data; if there are at least two vector points within the range of the feedback range data, the vector distances between all vector points within the range of the feedback range data and the knowledge subject vector data are calculated, and the vector point with the smallest vector distance calculated at this time is used as the nearest solution vector data.
[0093] For example: Since the vector distance between vector point B and the knowledge subject vector data is greater than the vector distance between vector point C and the knowledge subject vector data, the vector distance between vector point C and the knowledge subject vector data is used as the feedback distance data, that is, the feedback distance data is The feedback range data is If there is only vector point C (including equal to) within this range, then vector point C is used as the nearest solution vector data;
[0094] If there is a vector point g with coordinates (2,2,2,2,3) in the centroid region B, although the vector distance between the centroid vector data of the centroid region B and the knowledge topic vector data is larger than the vector distance between the centroid vector data of the centroid region A and the knowledge topic vector data, the vector point g calculated in this step is within the range of the feedback range data, then the vector distance between the vector point g and the knowledge topic vector data is calculated as Thus, a vector point g is obtained whose vector distance is smaller than that of the vector point c. At this time, the vector point g is used as the nearest solution vector data.
[0095] Reference Figure 6 , step S5 further includes:
[0096] S51, preset centroid search threshold data, centroid quantity threshold data, and range reduction threshold data;
[0097] S52, determining centroid search range data through centroid search threshold data and knowledge subject vector data;
[0098] S53, comparing the number of centroid vector data within the range of the centroid search range data with the centroid number threshold data;
[0099] S54. If the number of centroid vector data within the range of the centroid retrieval range data is less than the centroid number threshold data, the centroid vector data with the smallest vector distance is determined through the centroid vector data within the range of the centroid retrieval range data and the knowledge subject vector data; if the number of centroid vector data within the range of the centroid retrieval range data is greater than the centroid number threshold data, new centroid retrieval threshold data is determined through the range reduction threshold data and the centroid retrieval threshold data, and the step of comparing the number of centroid vector data within the range of the centroid retrieval range data with the centroid number threshold data is returned.
[0100] For example: If the centroid search threshold data is 5, the centroid quantity threshold data is 3, and the range reduction threshold data is 0.8, if the knowledge topic vector data is (5,5,5,5,5), if the centroid vector data A is (6,6,6,6,6), if the centroid vector data B is (7,7,7,7,7), if the centroid vector data C is (2,2,2,2,2), if the centroid vector data D is (1,1,1,1,1), if Assume that the centroid vector data E is (10,10,10,10,10), and the calculated centroid retrieval range data is (5±5,5±5,5±5,5±5,5±5). At this time, the centroid vector data A, B, C, D, and E fall within the range. The number of centroid vector data falling within the range of the centroid retrieval range data is 5>3. The new centroid retrieval threshold data is 5*0.8 calculated by the range reduction threshold data and the centroid retrieval threshold data. =4, and the centroid retrieval range data is calculated again to be (5±4, 5±4, 5±4, 5±4, 5±4). At this time, the centroid vector data A, B, C, and D fall within the range; the number of centroid vector data falling within the range of the centroid retrieval range data is 4>3, and the new centroid retrieval threshold data is calculated by the range reduction threshold data and the centroid retrieval threshold data to be 4*0.8=3.2. The centroid retrieval range data is calculated again to be (5±3.2, 5±3.2, 5±3.2, 5±3.2, 5±3.2). At this time, the centroid vector data A, B, and C fall within the range; the number of centroid vector data falling within the range of the centroid retrieval range data is 3=3, that is, the number is within the allowable range of the centroid number threshold data, so the vector distances of the centroid vector data A, B, and C with the knowledge topic vector data are calculated respectively, that is, the vector distance between the centroid vector data A and the knowledge topic vector data is The vector distance between the centroid vector data B and the knowledge topic vector data is The vector distance between the centroid vector data C and the knowledge topic vector data is Therefore, the centroid vector data A enters step S61 for calculation as the centroid vector data with the smallest vector distance to the knowledge topic vector data.
[0101] The implementation principle of a method for storing and querying auto parts knowledge base data in embodiment 1 of the present application is as follows: when data needs to be stored, the knowledge material data input by the user is automatically segmented and vectorized and then stored in an auto parts vector database; when the answer required by the user needs to be retrieved, the knowledge requirement data input by the user is first read, and then the knowledge subject data is read. The knowledge subject data extracted here has the same function as the segmentation of the knowledge material data in data storage. The knowledge subject data is then vectorized and entered into the auto parts vector database to retrieve the vector point with the closest vector distance as the nearest solution vector data. The knowledge paragraph data corresponding to the nearest solution vector data corresponding to the multiple knowledge subject vector data are then called and output to the user.
[0102] A data storage and query system for auto parts knowledge base, referring to Figure 7 , including a database 1, a processor 2 and an operating platform 3. The database 1 is used to store vector data, which at least includes vector values of vector points, codebook data, knowledge paragraph data corresponding to the stored codebook, and other data. The processor 2 is used to process the read data. The operating platform 3 includes a storage mode and a retrieval mode. When the operating platform 3 is in the storage mode, the user inputs data to the processor 2 through the operating platform 3, and the processor 2 stores the processed data in the database 1; when the operating platform 3 is in the retrieval mode, the user inputs data to the processor 2 through the operating platform 3, and the processor 2 processes the data and retrieves the corresponding data from the database 1 and outputs it to the operating platform 3 for display.
[0103] Processor 2 may include a central processing unit such as a CPU or MPU or a host system built around a CPU or MPU, including hardware or software. After a computer has a processor 2, people can freely control the computer by programming so that it runs according to people's wishes. Processor 2 can control local quantity transmission, remote quantity transmission, remote communication components, etc. through internal protocols. Internal protocols generally refer to all protocols that achieve mutual communication or links within the same measuring instrument or the same system, including: human-computer interaction protocols, software / hardware (interface) protocols, chip bus (C-Bus) protocols, internal bus (I-Bus) protocols, etc., or part or all of the protocols. With the development of integrated circuit technology, some protocols that belong to the external bus (E-Bus) protocol are also classified as internal protocols after the external bus (E-Bus) is integrated into the chip.
[0104] Computer-readable storage media, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks, and other media that can store program codes.
[0105] Embodiment 2:
[0106] Different from Example 1, Figure 8 , after step S5, further comprising:
[0107] S7, determining deviation range data through the vector distance, and determining search range data through the knowledge subject vector data and the deviation range data;
[0108] S71. Determine the vector point with the smallest vector distance between the vector points within the scope of the retrieval scope data and the knowledge subject vector data as the closest solution vector data.
[0109] For example: if the topic vector data is (2,2,2,2,2), and if the knowledge topic vector data and the closest centroid vector data A are (3,3,3,3,3), then the deviation range data is The search range data is obtained as At this time, the vector distances between all vector points falling within the range of the search range data and the knowledge subject vector data are directly calculated;
[0110] If vector point a(3,3,3,3,4), vector point b(3,3,3,3,6), vector point c(2,2,2,2,3), and vector point a and b are in the centroid region where the centroid vector data A is located, and vector point c is outside the centroid region where the centroid vector data A is located, and vector points a and c fall within the range of the search range data, then even if vector point b falls within the centroid region where the centroid vector data A is located, only the vector distances between vector points a and c and the knowledge topic vector data are calculated, and the vector distance between vector point a and the knowledge topic vector data is calculated as follows: The vector distance between vector point c and knowledge topic vector data is Obviously, the vector distance between vector point c and the knowledge subject vector data is smaller than the vector distance between vector point a and the knowledge subject vector data. Therefore, even if vector point c falls outside the centroid area where the centroid vector data A is located, vector point c will still be used as the nearest solution vector data.
[0111] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A method for storing and querying auto parts knowledge base data, characterized in that: include: Read the knowledge data input by the user; Performing semantic analysis on the knowledge material data and segmenting it into knowledge paragraph data, and extracting summary data and keyword data from the knowledge paragraph data; Adding the summary data and the keyword data to the knowledge paragraph data and storing them vector-wise in an auto parts vector database; Read the knowledge requirement data input by the user; Extracting knowledge subject data from the knowledge demand data; Determine knowledge theme vector data through knowledge theme data, and search and determine the nearest solution vector data with the shortest vector distance in the auto parts vector database through the knowledge theme vector data; Outputting the knowledge paragraph data corresponding to the most recent solution vector data to the user; The method further comprises: searching the auto parts vector database to determine the nearest solution vector data with the shortest vector distance by using the knowledge subject vector data; Preset area quantity data; Divide the vector points in the auto parts vector database into a number of centroid areas, the number of the centroid areas corresponds to the area number data, the vector points in the centroid areas are arranged adjacently, and the centers of all the vector points in the centroid areas are set as centroid vector data; First, the centroid vector data with the smallest vector distance is determined through the knowledge subject vector data and the centroid vector data; Then, the vector point with the smallest vector distance between the knowledge subject vector data and the centroid vector data is determined as the nearest solution vector data through the vector point in the centroid region corresponding to the centroid vector data with the smallest vector distance; When the vector point with the smallest vector distance is determined as the nearest solution vector data through the vector point in the centroid area corresponding to the centroid vector data with the smallest vector distance between the knowledge subject vector data and the centroid vector data, the method further includes: Determine feedback distance data through the vector point with the smallest vector distance and the knowledge subject vector data; Determining feedback range data by using the knowledge topic vector data and the feedback distance data; Retrieve the number of vector points existing within the range of the feedback range data; If there is only one vector point within the range of the feedback range data, this vector point is used as the nearest solution vector data; if there are at least two vector points within the range of the feedback range data, the vector distances between all vector points within the range of the feedback range data and the knowledge subject vector data are calculated, and the vector point with the smallest vector distance calculated at this time is used as the nearest solution vector data.
2. The method for storing and querying auto parts knowledge base data according to claim 1, characterized in that: Before outputting the knowledge paragraph data corresponding to the latest solution vector data to the user, the method further includes: Preset screening quantity data, generate prediction answer data for the knowledge demand data based on AIGC, and determine prediction answer vector data by vectorizing the prediction answer data; Calculating the vector distance between the nearest solution vector data and the corresponding predicted answer vector data; The number of the nearest solution vector data is determined by combining the vector distance from small to large and the screening quantity data, and the knowledge paragraph data corresponding to the remaining nearest solution vector data is output to the user.
3. The method for storing and querying auto parts knowledge base data according to claim 1, characterized in that: When first determining the centroid area with the smallest vector distance through the knowledge subject vector data and the centroid vector data, it also includes: Preset centroid search threshold data, centroid quantity threshold data, and range reduction threshold data; Determine centroid search range data by using the centroid search threshold data and the knowledge subject vector data; Comparing the number of the centroid vector data within the range of the centroid search range data with the centroid number threshold data; If the number of the centroid vector data within the range of the centroid search range data is less than the centroid number threshold data, the centroid vector data with the smallest vector distance is determined through the centroid vector data within the range of the centroid search range data and the knowledge subject vector data; If the number of the centroid vector data within the range of the centroid retrieval range data is greater than the centroid number threshold data, new centroid retrieval threshold data is determined by the range reduction threshold data and the centroid retrieval threshold data, and the step of comparing the number of the centroid vector data within the range of the centroid retrieval range data with the centroid number threshold data is returned.
4. The method for storing and querying auto parts knowledge base data according to claim 1, characterized in that: After first determining the centroid area with the smallest vector distance through the knowledge subject vector data and the centroid vector data, the method further includes: Determine deviation range data through the vector distance, and determine search range data through the knowledge subject vector data and the deviation range data; The vector point with the smallest vector distance between the vector points within the scope of the search scope data and the knowledge subject vector data is determined as the nearest solution vector data.
5. An auto parts knowledge base data storage and query system, used to implement the auto parts knowledge base data storage and query method according to claim 1, characterized in that: include: Database (1), used to store data; A processor (2), configured to process the data; The operating platform (3) is used for allowing a user to input data into the processor (2), and the processor (2) stores the data into the database (1) after processing, or for the processor (2) to call the data in the database (1) and output it to the user after processing.
6. A computer-readable storage medium, characterized in that: The computer program that can be loaded by a processor and execute the auto parts knowledge base data storage and query method according to any one of claims 1 to 4 is stored.
