Image recognition optimization method based on knowledge graph

By generating graph scores and optimizing the knowledge graph storage strategy using fuzzy rules, the storage burden and efficiency problems of image recognition systems are solved, enabling efficient dynamic adjustment and stable operation of the system.

CN118262128BActive Publication Date: 2024-11-22HUNAN SHANGRONG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410435667.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-11
Publication Date
2024-11-22
Estimated Expiration
2044-04-11

AI Technical Summary

Technical Problem

Existing image recognition systems suffer from increased storage burden and reduced recognition efficiency after embedding multiple types of knowledge graphs, making it impossible to effectively optimize the storage burden and improve the recognition efficiency of image recognition systems.

Method used

The graph score is generated by obtaining the matching rate and data growth rate of the knowledge graph. Weight ratios are assigned according to the pecking order graph method. Based on fuzzy rules, it is determined whether to make dynamic optimization and adjustment. Less frequently used graphs are uploaded to cloud storage, and the local database is traversed first to improve recognition efficiency.

Benefits of technology

While ensuring system applicability and coverage, it reduces storage burden and improves image recognition efficiency, avoids over-optimization, and ensures stable system operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118262128B_ABST
    Figure CN118262128B_ABST
Patent Text Reader

Abstract

The present invention discloses an image recognition optimization method based on a knowledge graph, which relates to the field of image recognition optimization technology. After the weighted average calculation of the weight ratios of all knowledge graphs is performed, the overall scoring index of the image recognition system is obtained. After the overall scoring index of the image recognition system and the frequency of use of the image recognition system in practical applications are obtained, it is determined based on fuzzy rules whether it is necessary to dynamically optimize and adjust the knowledge graph in the image recognition system. When it is determined that the knowledge graph in the image recognition system needs to be dynamically optimized and adjusted, the optimization system uploads the knowledge graph in the adjustment set to a cloud database for storage. The optimization method can automatically determine when it is necessary to automatically dynamically optimize and adjust multiple types of knowledge graphs in the image recognition system, effectively reducing the storage burden of the system and improving the image recognition efficiency of the system while ensuring the applicability and usage coverage of the image recognition system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition optimization technology, and in particular to an image recognition optimization method based on a knowledge graph. Background Art

[0002] An image recognition system is a system that uses computer vision and machine learning techniques to improve the accuracy and efficiency of image recognition. With the development of deep learning and neural network technology, image recognition has been widely used in various fields such as security monitoring, medical imaging, autonomous driving, industrial production, etc.

[0003] The prior art has the following deficiencies:

[0004] In order to increase the applicability and coverage of image recognition systems, the existing technology usually embeds multiple categories of knowledge graphs in image recognition systems for multi-domain image recognition. However, since the amount of data contained in different categories of knowledge graphs is large (including the image information of the identified object in the category and other related information), on the one hand, the storage burden of the image recognition system is increased, and on the other hand, each time the image recognition system recognizes, it will traverse the embedded multiple categories of knowledge graphs one by one, which not only increases the operating burden of the image recognition system, but also reduces the image recognition efficiency of the image recognition system.

[0005] Based on this, the present invention provides an image recognition optimization method based on knowledge graph, which can automatically determine when it is necessary to automatically and dynamically optimize and adjust the multiple categories of knowledge graphs in the image recognition system, while ensuring the applicability and usage coverage of the image recognition system, effectively reducing the system's storage burden and improving the system's image recognition efficiency. Summary of the invention

[0006] The purpose of the present invention is to provide an image recognition optimization method based on knowledge graph to address the deficiencies in the background technology.

[0007] In order to achieve the above object, the present invention provides the following technical solution: an image recognition optimization method based on knowledge graph, the optimization method comprising the following steps:

[0008] The optimization system obtains the types of knowledge graphs embedded in the image recognition system through query tools, and generates an initial graph list after initially numbering all knowledge graphs;

[0009] Regularly obtain the matching rate and data growth rate of all knowledge graphs in the initial graph list, and generate a graph score for each knowledge graph based on the matching rate and data growth rate. According to the priority graph method, a weight ratio is assigned to each knowledge graph based on the graph score. The weight ratios of all knowledge graphs are weighted averaged to obtain the overall score index of the image recognition system.

[0010] After obtaining the overall score index of the image recognition system and the frequency of use of the image recognition system in actual applications, it is determined based on fuzzy rules whether the knowledge graph in the image recognition system needs to be dynamically optimized and adjusted;

[0011] When it is determined that the knowledge graph in the image recognition system needs to be dynamically optimized and adjusted, the optimization system will classify the knowledge graphs in the initial graph list into a retention set or an adjustment set based on the graph scores, upload the knowledge graphs in the adjustment set to the cloud database for storage, and then delete them from the local database;

[0012] When the image recognition system recognizes an image, it first traverses the knowledge graph in the local database. If there is no knowledge graph matching the recognized image in the local database, it traverses the knowledge graph in the cloud database. If there is a knowledge graph matching the recognized image in the cloud database after the traversal, the knowledge graph is downloaded from the cloud database to the local database for storage.

[0013] In a preferred embodiment, the optimization system periodically obtains the matching rate and data volume growth rate of all knowledge graphs in the initial graph list, including the following steps:

[0014] The optimization system obtains the matching rate and data growth rate of all knowledge graphs in the initial graph list at regular intervals;

[0015] The logic for obtaining the matching rate is as follows: obtain the number of images matching the knowledge graph within the interval time period, and then obtain the matching rate by dividing the number of images matching the knowledge graph by the interval time period.

[0016] The logic for obtaining the data growth rate is as follows: obtain the data growth of the knowledge graph within the interval time period. The data growth amount is obtained by subtracting the data amount at the initial moment from the data amount at the final moment within the interval time period. The data growth rate is obtained by dividing the data growth amount by the interval length.

[0017] In a preferred embodiment, generating a graph score for each knowledge graph based on the matching rate and the data volume growth rate includes the following steps:

[0018] The matching rate and the data volume growth rate are normalized, and the value range of the matching rate and the data volume growth rate is mapped to [0, 1] to obtain the normalized value of the matching rate and the normalized value of the data volume growth rate;

[0019] The graph score is obtained by subtracting the normalized value of the data volume growth rate from the normalized value of the matching rate.

[0020] In a preferred embodiment, a weight ratio is assigned to each knowledge graph according to the graph score according to the priority graph method, including the following steps:

[0021] After obtaining the graph scores of all knowledge graphs, sort all knowledge graphs from large to small according to the graph scores;

[0022] Generate TTL indicators for each knowledge graph according to the priority graph method;

[0023] Add up the TTL indicators of all knowledge graphs to get the total value of TTL indicators;

[0024] Obtain the weight ratio of the knowledge graph by dividing the TTL index of the knowledge graph by the total value of the TTL index;

[0025] After obtaining the weight ratios of all knowledge graphs, the weight ratios of all knowledge graphs are weighted averaged to obtain the overall score index of the image recognition system.

[0026] In a preferred embodiment, the optimization system determines whether it is necessary to dynamically optimize and adjust the knowledge graph in the image recognition system based on fuzzy rules, including the following steps:

[0027] The optimization system obtains the overall scoring index of the image recognition system and the frequency of use of the image recognition system in practical applications;

[0028] The overall rating index and usage frequency are defined as input variables and divided into different fuzzy sets respectively;

[0029] Define the judgment result as the output variable and divide it into fuzzy sets;

[0030] Formulate fuzzy rules to describe the impact of different overall scoring indexes and usage frequencies on the output of judgment results;

[0031] The overall scoring index and usage frequency obtained regularly are defined as input into fuzzy rules, fuzzy reasoning is performed according to the fuzzy rules, and the corresponding judgment results are output.

[0032] In a preferred embodiment, the optimization system classifies the knowledge graphs in the initial graph list into a retention set or an adjustment set according to the graph scores, including the following steps:

[0033] After obtaining the graph scores of all knowledge graphs in the initial graph list, compare the graph scores with the set partition threshold, which is used to judge the quality of the knowledge graph;

[0034] If the graph score is greater than or equal to the set partition threshold, the knowledge graph is judged to be excellent and the knowledge graph is included in the retention set, that is, the knowledge graph is not adjusted;

[0035] If the graph score is less than the set division threshold, the knowledge graph is judged to be poor and the knowledge graph is included in the adjustment set, which means that the knowledge graph needs to be adjusted.

[0036] In a preferred embodiment, uploading the knowledge graph in the adjustment set to a cloud database for storage, and deleting the knowledge graph uploaded to the cloud database for storage from the local database, includes the following steps:

[0037] Connect to the cloud database and perform data upload operations. For each knowledge graph queried from the local database and belonging to the adjustment set, transfer the data content and related metadata of the knowledge graph to the table in the cloud database. Confirm that the knowledge graph has been uploaded to the cloud database by querying the cloud database. After confirming that all knowledge graphs have been uploaded to the cloud database, delete all knowledge graphs uploaded to the cloud database from the local database.

[0038] In a preferred embodiment, when the image recognition system recognizes an image, if there is no knowledge graph matching the recognized image in the local database, the knowledge graph in the cloud database is traversed, including the following steps:

[0039] Use query statements to obtain the knowledge graph related to the recognized image from the local database, check the query results, and determine whether there is a knowledge graph matching the recognized image in the local database. If there is no matching knowledge graph in the local database, the image recognition system connects to the cloud database, performs a query operation in the cloud database, obtains the knowledge graph related to the recognized image, checks the cloud database query results, and determines whether there is a knowledge graph matching the recognized image. If there is no knowledge graph matching the recognized image in the cloud database after traversal, a warning signal is sent to the administrator.

[0040] In the above technical solution, the technical effects and advantages provided by the present invention are:

[0041] 1. The present invention periodically obtains the matching rate and data volume growth rate of all knowledge graphs in the initial graph list, generates a graph score for each knowledge graph based on the matching rate and data volume growth rate, assigns a weight ratio to each knowledge graph according to the graph score according to the priority graph method, and obtains the overall score index of the image recognition system after weighted average calculation of the weight ratios of all knowledge graphs. After the optimization system obtains the overall score index of the image recognition system and the frequency of use of the image recognition system in actual applications, it determines whether it is necessary to dynamically optimize and adjust the knowledge graph in the image recognition system based on fuzzy rules. When it is determined that the knowledge graph in the image recognition system needs to be dynamically optimized and adjusted, the optimization system classifies the knowledge graph in the initial graph list into a retention set or an adjustment set based on the graph score, uploads the knowledge graph in the adjustment set to the cloud database for storage, and deletes the knowledge graph uploaded to the cloud database for storage from the local database. The optimization method can automatically determine when it is necessary to automatically and dynamically optimize and adjust multiple types of knowledge graphs in the image recognition system, while ensuring the applicability and usage coverage of the image recognition system, effectively reducing the storage burden of the system and improving the image recognition efficiency of the system;

[0042] 2. The overall scoring index in the present invention is obtained by comprehensively considering the weight ratio of each knowledge graph. The larger the overall scoring index is, the better the overall operating condition of the surface image recognition system is, and the less dynamic optimization adjustment is needed. By adopting a comprehensive analysis method based on the weight ratio of the knowledge graph, the optimization system can more fully understand the operating condition of the image recognition system, making the optimization of the image recognition system more accurate, avoiding over-optimization and ensuring the stable operation of the image recognition system. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0044] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] Example 1: Please refer to Figure 1 As shown, the image recognition optimization method based on the knowledge graph described in this embodiment includes the following steps:

[0047] The optimization system obtains the types of knowledge graphs embedded in the image recognition system through the query tool, and generates an initial graph list after initially numbering all knowledge graphs. The optimization system regularly obtains the matching rate and data growth rate of all knowledge graphs in the initial graph list, and generates a graph score for each knowledge graph based on the matching rate and data growth rate. A weight ratio is assigned to each knowledge graph according to the graph score according to the priority graph method, and the overall score index of the image recognition system is obtained after the weighted average calculation of the weight ratios of all knowledge graphs. After the optimization system obtains the overall score index of the image recognition system and the frequency of use of the image recognition system in actual applications, it determines whether it is necessary to dynamically optimize and adjust the knowledge graph in the image recognition system based on fuzzy rules. When it is determined that the knowledge graph in the image recognition system needs to be dynamically optimized and adjusted, the optimization system will classify the knowledge graph in the initial graph list into the protected ones according to the graph score. Maintain a collection or adjust a collection, keep the knowledge graph in the collection stored in the local database without adjustment, upload the knowledge graph in the adjusted collection to the cloud database for storage, delete the knowledge graph uploaded to the cloud database from the local database, and when the image recognition system recognizes an image, it will first traverse the knowledge graph in the local database. If there is no knowledge graph matching the recognized image in the local database, the knowledge graph in the cloud database will be traversed. If there is a knowledge graph matching the recognized image in the cloud database after the traversal, the knowledge graph will be downloaded from the cloud database to the local database for storage. If there is no knowledge graph matching the recognized image in the cloud database after the traversal, a warning signal will be sent to the administrator, indicating that there is no knowledge graph matching the recognized image in the image recognition system, and the administrator needs to update the new knowledge graph to the image recognition system, which can improve the adaptability and recognition coverage of the image recognition system.

[0048] In this application, the optimization system includes the following modules: query module, data collection module, scoring module, calculation module, judgment module, set partitioning module, adjustment module, traversal module, download module, and warning module;

[0049] Query module: obtains the types of knowledge graphs embedded in the image recognition system through query tools, and generates an initial graph list after initial numbering of all knowledge graphs. The initial graph list is sent to the data acquisition module and the calculation module;

[0050] Data collection module: Regularly calculate the usage frequency of the image recognition system in actual applications, and obtain the matching rate and data growth rate of all knowledge graphs in the initial graph list. The matching rate and data growth rate are sent to the scoring module, and the usage frequency is sent to the judgment module;

[0051] Scoring module: Generates a graph score for each knowledge graph based on the matching rate and data growth rate, and sends the graph score to the calculation module;

[0052] Calculation module: assign a weight ratio to each knowledge graph according to the graph score according to the priority graph method, calculate the weight ratio of all knowledge graphs by weighted average, and obtain the overall score index of the image recognition system. The overall score index is sent to the judgment module;

[0053] Judgment module: After obtaining the overall score index of the image recognition system and the frequency of use of the image recognition system in actual applications, it is determined based on fuzzy rules whether it is necessary to dynamically optimize and adjust the knowledge graph in the image recognition system, and the judgment result is sent to the set partitioning module;

[0054] Set division module: When it is determined that the knowledge graph in the image recognition system needs to be dynamically optimized and adjusted, the optimization system divides the knowledge graphs in the initial graph list into a retention set or an adjustment set according to the graph scores. The knowledge graphs in the retention set are stored in the local database without adjustment, and the set division results are sent to the adjustment module;

[0055] Adjustment module: upload the knowledge graph in the adjustment set to the cloud database for storage, delete the knowledge graph uploaded to the cloud database from the local database, and send the adjustment result to the traversal module;

[0056] Traversal module: When the image recognition system recognizes an image, it first traverses the knowledge graph in the local database. If there is no knowledge graph matching the recognized image in the local database, it traverses the knowledge graph in the cloud database and sends the traversal results to the download module and the warning module.

[0057] Download module: If there is a knowledge graph matching the recognized image in the cloud database after traversal, the knowledge graph is downloaded from the cloud database to the local database for storage;

[0058] Warning module: If there is no knowledge graph matching the recognized image in the cloud database after traversal, a warning signal will be sent to the administrator. This indicates that there is no knowledge graph matching the recognized image in the image recognition system. The administrator needs to update the new knowledge graph to the image recognition system, which can improve the adaptability and recognition coverage of the image recognition system.

[0059] This application obtains the matching rate and data growth rate of all knowledge graphs in the initial graph list regularly, and generates a graph score for each knowledge graph based on the matching rate and data growth rate, assigns a weight ratio to each knowledge graph according to the graph score according to the priority graph method, and obtains the overall score index of the image recognition system after weighted average calculation of the weight ratio of all knowledge graphs. After the optimization system obtains the overall score index of the image recognition system and the frequency of use of the image recognition system in actual applications, it determines whether it is necessary to dynamically optimize and adjust the knowledge graph in the image recognition system based on fuzzy rules. When it is determined that the knowledge graph in the image recognition system needs to be dynamically optimized and adjusted, the optimization system divides the knowledge graph in the initial graph list into a retention set or an adjustment set according to the graph score, uploads the knowledge graph in the adjustment set to the cloud database for storage, and deletes the knowledge graph uploaded to the cloud database for storage from the local database. This optimization method can automatically determine when it is necessary to automatically and dynamically optimize and adjust multiple types of knowledge graphs in the image recognition system, while ensuring the applicability and coverage of the image recognition system, effectively reducing the storage burden of the system and improving the image recognition efficiency of the system.

[0060] Embodiment 2: The optimization system obtains the types of knowledge graphs embedded in the image recognition system through a query tool, and generates an initial graph list after initially numbering all knowledge graphs, including the following steps:

[0061] Connect to the image recognition system: Use the query tool to connect to the image recognition system and obtain relevant information about the knowledge graph embedded in the system.

[0062] Querying embedded knowledge graphs: Use query tools to obtain information about the types of knowledge graphs that exist in the system. This involves querying the metadata or configuration information of the system.

[0063] Obtain knowledge graph type information: Extract the type information of the embedded knowledge graph from the query results, including the name, description, version number, etc. of the knowledge graph, for subsequent processing.

[0064] Initial numbering for knowledge graphs: Number the acquired knowledge graph types one by one to generate an initial graph list. The numbering can be in any form, such as numbers, letters, symbols, etc., to ensure uniqueness and identifiability.

[0065] Generate an initial graph list: Organize the numbered knowledge graph category information into an initial graph list, including the number, name, description and other information of each knowledge graph.

[0066] The optimization system periodically obtains the matching rate and data growth rate of all knowledge graphs in the initial graph list, including the following steps:

[0067] The optimization system obtains the matching rate and data growth rate of all knowledge graphs in the initial graph list at regular intervals;

[0068] The logic for obtaining the matching rate is as follows: obtain the number of knowledge graph matching pictures within the interval time period, and then obtain the matching rate by dividing the number of knowledge graph matching pictures by the interval time. For example, if the optimization system obtains 26 knowledge graph matching pictures every 48 hours, the matching rate is equal to 0.54%;

[0069] The logic for obtaining the data growth rate is as follows: obtain the data growth of the knowledge graph within the interval time period. The data growth amount is obtained by subtracting the data amount at the initial moment from the data amount at the final moment within the interval time period. The data growth rate is obtained by dividing the data growth amount by the interval length. For example, the optimization system obtains 20M of knowledge graph data growth every 48 hours, and the data growth rate is equal to 0.42%.

[0070] Generate a graph score for each knowledge graph based on the matching rate and data growth rate, including the following steps:

[0071] Since in practical applications, both the matching rate and the data volume growth rate may be greater than 1, in order to generate a graph score from the matching rate and the data volume growth rate, in this application, the matching rate and the data volume growth rate are normalized, and the value range of the matching rate and the data volume growth rate is mapped to between [0, 1] to obtain the normalized value of the matching rate and the normalized value of the data volume growth rate;

[0072] It is known to those skilled in the art that the larger the normalized value of the knowledge graph's matching rate is, the more times the knowledge graph is used in the application process of the image recognition system; the larger the normalized value of the knowledge graph's data volume growth rate is, the faster the memory of the knowledge graph grows during the operation of the image recognition system (there may be redundant data and other useless data);

[0073] Therefore, the graph score is obtained by subtracting the normalized value of the data growth rate from the normalized value of the matching rate. The larger the graph score, the more important the knowledge graph is to the image recognition system, and the slower the growth of useless data.

[0074] In this application, a general normalization calculation formula is used to normalize the matching rate and the data volume growth rate. The general normalization calculation formula is: In the formula, normalized is the normalized value of the data, Value is the original data, max(Value) is the maximum value of the original data, and min(Value) is the minimum value of the original data;

[0075] It should be noted that the normalization formula given in this embodiment is a general formula and does not involve the matching rate and data growth rate of this application. The process of normalizing the matching rate and data growth rate is consistent with the general formula and will not be repeated here.

[0076] According to the priority graph method, a weight ratio is assigned to each knowledge graph according to the graph score, and the weight ratio of all knowledge graphs is calculated by weighted average to obtain the overall score index of the image recognition system, including the following steps:

[0077] The larger the graph score, the more important the knowledge graph is to the image recognition system, and the slower the growth of useless data. Therefore, after obtaining the graph scores of all knowledge graphs, all knowledge graphs are sorted from large to small according to the graph scores, and then the TTL index is generated for each knowledge graph according to the priority graph method, and the TTL index of all knowledge graphs is added to obtain the total value of the TTL index. Finally, the weight ratio of the knowledge graph is obtained by dividing the TTL index of the knowledge graph by the total value of the TTL index. The weight ratio of all knowledge graphs is obtained according to the above steps, and the weight ratio of all knowledge graphs is calculated by weighted average to obtain the overall score index of the image recognition system.

[0078] The overall scoring index is obtained by combining the weight ratio of each knowledge graph. The larger the overall scoring index, the better the overall operation of the surface image recognition system, and the less dynamic optimization adjustment is needed. The weight ratio comprehensive analysis method based on the knowledge graph is adopted, so that the optimization system can more fully understand the operation status of the image recognition system, making the optimization of the image recognition system more accurate, avoiding over-optimization, and ensuring the stable operation of the image recognition system.

[0079] In the present application, the optimization system determines whether it is necessary to dynamically optimize and adjust the knowledge graph in the image recognition system. Those skilled in the art will know that, under normal circumstances, the lower the matching rate of the knowledge graph in the image recognition system and the faster the growth rate of the data volume (that is, the smaller the overall scoring index), the more dynamic optimization and adjustment of the knowledge graph in the image recognition system is needed.

[0080] In order to better illustrate the above solution, the following examples are given in this embodiment:

[0081] Assume that the knowledge graph embedded in the image recognition system is four different types of vehicle models. Each type of vehicle model includes the vehicle appearance and vehicle-related information (such as engine technology, attached intelligent driving functions, etc.). The four different types of vehicle models are initially numbered as Model A, Model B, Model C, and Model D. In actual applications, the image recognition system may also be animals, food, or digital products, etc., which will not be introduced one by one here;

[0082] After obtaining the graph scores of Model A knowledge graph, Model B knowledge graph, Model C knowledge graph, and Model D knowledge graph, sort Model A knowledge graph, Model B knowledge graph, Model C knowledge graph, and Model D knowledge graph from large to small according to the graph scores, and generate TTL indicators after corresponding to the sorting marks in the priority graph method, as shown in Table 1:

[0083]

[0084]

[0085] Table 1

[0086] In Table 1, the knowledge graphs of model A, model B, model C, and model D are sorted from large to small according to the graph scores, and correspond to ONE, TWO, THREE, and FOUR in the priority graph. For example, the result after sorting from large to small according to the graph scores is: {B, C, A, D}, then B corresponds to ONE, C corresponds to TWO, A corresponds to THREE, D corresponds to FOUR, and so on;

[0087] After obtaining the TTL indicators of the knowledge graphs of model A, model B, model C, and model D, the weight ratio of each knowledge graph is calculated, as shown in Table 2:

[0088] TTL indicator Weight ratio 3.5 0.438 2.5 0.313 1.5 0.186 0.5 0.063

[0089] Table 2

[0090] In Table 2, the TTL indicators of all knowledge graphs are added together to get the total TTL indicator value, and then the TTL indicators of model A knowledge graph, model B knowledge graph, model C knowledge graph, and model D knowledge graph are divided by the total TTL indicator value to get the weight ratio of each knowledge graph.

[0091] After the optimization system obtains the overall score index of the image recognition system and the frequency of use of the image recognition system in actual applications, it determines whether it is necessary to dynamically optimize and adjust the knowledge graph in the image recognition system based on fuzzy rules, including the following steps:

[0092] The usage frequency of the image recognition system in actual applications is obtained by dividing the number of times the image recognition system is used in actual applications by the interval time;

[0093] After the optimization system obtains the overall scoring index of the image recognition system and the usage frequency of the image recognition system in practical applications, the overall scoring index and usage frequency are defined as input variables and divided into different fuzzy sets respectively. The judgment result is defined as an output variable and divided into fuzzy sets. Fuzzy rules are formulated to describe the impact of different overall scoring indexes and usage frequencies on the output of judgment results. The overall scoring index and usage frequency obtained regularly are defined as input fuzzy rules. Fuzzy reasoning is performed according to the fuzzy rules to output the corresponding judgment results.

[0094] To better illustrate the above solution, we take the following example:

[0095] The overall scoring index is marked as Z, and the divided fuzzy sets can be: "Excellent", "Secondary", "Difference";

[0096] The usage frequency is marked as S, and the divided fuzzy sets can be: "Many", "Commonly", "Less";

[0097] The judgment result is marked as P_result, and the divided fuzzy sets can be: "Optimization", "Notoptimized";

[0098] The fuzzy rules can be defined as follows:

[0099] Rule 1: IF(Z is Excellent)AND(S is Less)THEN(P_result is Notoptimized);

[0100] Rule2: IF(Z is Difference)AND(S is Commonly)THEN(P_result isOptimization);

[0101] Rule3: IF(Z is Secondary)AND(S is Many)THEN(P_result is Optimization); ......;

[0103] In the present application, the larger the overall scoring index is, the better the overall operation of the surface image recognition system is, and the less dynamic optimization adjustment is needed. Therefore, the obtained overall scoring index is compared with the preset first index threshold and the second index threshold, and the first index threshold is less than the second index threshold. If the overall scoring index is greater than or equal to the second index threshold, the overall scoring index is "Excellent", if the overall scoring index is less than the second index threshold, and the overall scoring index is greater than or equal to the first index threshold, the overall scoring index is "Secondary", if the overall scoring index is less than the first index threshold, the overall scoring index is "Difference";

[0104] The usage frequency indicates the number of times the image recognition system is used within the interval time period. If the image recognition system is used less frequently within the interval time period, there is less need for optimization, thus reducing the optimization cost. Therefore, a usage frequency below 60% is “Less”, a usage frequency between 60% and 80% is “Commonly”, and a usage frequency above 80% is “Many”.

[0105] It should be noted that the division of fuzzy sets can be adjusted according to actual conditions. For example, although this embodiment takes three fuzzy sets as examples, the overall scoring index, usage frequency, and judgment results can actually be divided into more than three sets to facilitate better dynamic optimization and adjustment of the image recognition system.

[0106] Embodiment 3: When it is determined that the knowledge graph in the image recognition system needs to be dynamically optimized and adjusted, the optimization system classifies the knowledge graph in the initial graph list into a retention set or an adjustment set according to the graph score, including the following steps:

[0107] From the calculation logic of the graph score in Example 2, it can be seen that the larger the graph score, the more important and concise the knowledge graph is in the image recognition system;

[0108] Therefore, after obtaining the graph scores of all knowledge graphs in the initial graph list, the graph scores are compared with the set partition threshold, and the set partition threshold is used to judge the quality of the knowledge graph; if the graph score is greater than or equal to the set partition threshold, the knowledge graph is judged to be excellent, and the knowledge graph is classified into the retention set, that is, the knowledge graph is not adjusted; if the graph score is less than the set partition threshold, the knowledge graph is judged to be poor, and the knowledge graph is classified into the adjustment set, that is, the knowledge graph needs to be adjusted.

[0109] Keep the knowledge graph in the set stored in the local database without adjustment, upload the knowledge graph in the adjusted set to the cloud database for storage, and delete the knowledge graph uploaded to the cloud database from the local database, including the following steps:

[0110] Connect to cloud database: Connect to cloud database to upload data.

[0111] Upload the knowledge graph to the cloud database: For each knowledge graph queried from the local database that belongs to the adjustment set, transfer the data content of the knowledge graph and related metadata (such as name, description, etc.) to the corresponding table in the cloud database.

[0112] Confirm upload success: Confirm that each knowledge graph has been successfully uploaded to the cloud database and that data integrity is guaranteed. This can be confirmed by querying the cloud database.

[0113] Delete the uploaded knowledge graph from the local database: After confirming that all knowledge graphs have been successfully uploaded to the cloud database.

[0114] Confirm deletion: Confirm that the uploaded knowledge graph has been successfully deleted from the local database by querying the local database.

[0115] End the operation: Confirm that all steps have been completed and the consistency and integrity of the data are guaranteed, and end this operation.

[0116] The knowledge graph uploaded to the cloud database does not occupy the local storage of the image recognition system, thereby effectively reducing the storage burden of the image recognition system. Moreover, in the process of image recognition matching the knowledge graph, since the number of knowledge graphs in the image recognition system is reduced, the matching efficiency can be effectively improved, thereby improving the image recognition efficiency of the image recognition system. The image recognition system can also access the knowledge graph in the cloud database, but the access speed of the knowledge graph in the cloud database is linked to the current network speed.

[0117] When the image recognition system recognizes an image, it first traverses the knowledge graph in the local database. If there is no knowledge graph matching the recognized image in the local database, it traverses the knowledge graph in the cloud database, including the following steps:

[0118] Query the knowledge graph in the local database: Use a query statement to obtain the knowledge graph related to the recognized image from the local database. This can be queried based on specific attributes, identifiers, or other relevant information of the image to ensure that the knowledge graph that matches the recognized image is obtained.

[0119] Check whether there is a matching knowledge graph: Check the query results to determine whether there is a knowledge graph matching the recognized image in the local database. If there is a matching knowledge graph, continue with the subsequent operation; if not, go to the next step.

[0120] Connect to the cloud database: If there is no matching knowledge graph in the local database, use the corresponding tools or codes to connect to the cloud database to ensure that data query operations can be performed.

[0121] Query the knowledge graph in the cloud database: Perform a query operation in the cloud database to obtain the knowledge graph related to the recognized image. Similar to the local database, you can also query based on specific attributes, identifiers, or other related information of the image.

[0122] Check whether there is a matching knowledge graph: Check the cloud database query results to determine whether there is a knowledge graph that matches the recognized image. If there is a matching knowledge graph, continue with the subsequent operations; if there is still no matching knowledge graph, it means that the knowledge graph related to the recognized image cannot be found.

[0123] Process the matching knowledge graph: If a matching knowledge graph is found, perform corresponding processing according to specific needs and business logic, such as obtaining the information of the knowledge graph and applying it to image recognition tasks.

[0124] End the operation: Confirm that all steps have been completed, and make corresponding records or other operations according to business needs to end this operation.

[0125] If there is a knowledge graph matching the recognized image in the cloud database after traversal, the knowledge graph is downloaded from the cloud database to the local database for storage, including the following steps:

[0126] Query the knowledge graph in the cloud database: Perform a query operation in the cloud database to obtain the knowledge graph that matches the recognized image. This can be queried based on specific attributes, identifiers, or other relevant information of the image.

[0127] Check whether there is a matching knowledge graph: Check the query results to confirm whether there is a knowledge graph that matches the recognized image. If there is a matching knowledge graph, continue with the subsequent operations; if not, it means that no matching knowledge graph can be found and the operation ends.

[0128] Download matching knowledge graphs: For matching knowledge graphs, use the download function to download them from the cloud database to local storage. This may involve downloading the data content of the knowledge graph and related metadata (such as name, description, etc.) to the corresponding table or collection in the local database.

[0129] Confirm that the download is successful: Confirm that the downloaded knowledge graph has been successfully saved to the local database and that the data integrity is guaranteed. This can be confirmed by querying the local database.

[0130] Update the local database: After confirming that the download is successful, update the knowledge graph information in the local database to ensure that the newly added knowledge graph can be normally recognized and applied by the system.

[0131] End the operation: Confirm that all steps have been completed, and make corresponding records or other operations according to business needs to end this operation.

[0132] If there is no knowledge graph matching the recognized image in the cloud database after traversal, a warning signal is sent to the administrator, indicating that there is no knowledge graph matching the recognized image in the image recognition system. The administrator needs to update the new knowledge graph to the image recognition system, which can improve the adaptability and recognition coverage of the image recognition system.

[0133] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0134] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0135] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0136] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0137] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An image recognition optimization method based on knowledge graph, characterized in that: The optimization method comprises the following steps: The optimization system obtains the types of knowledge graphs embedded in the image recognition system through query tools, and generates an initial graph list after initially numbering all knowledge graphs; Regularly obtain the matching rate and data growth rate of all knowledge graphs in the initial graph list, and generate a graph score for each knowledge graph based on the matching rate and data growth rate. According to the priority graph method, a weight ratio is assigned to each knowledge graph based on the graph score. The weight ratios of all knowledge graphs are weighted averaged to obtain the overall score index of the image recognition system. After obtaining the overall score index of the image recognition system and the frequency of use of the image recognition system in actual applications, it is determined based on fuzzy rules whether the knowledge graph in the image recognition system needs to be dynamically optimized and adjusted; When it is determined that the knowledge graph in the image recognition system needs to be dynamically optimized and adjusted, the optimization system will classify the knowledge graphs in the initial graph list into a retention set or an adjustment set based on the graph scores, upload the knowledge graphs in the adjustment set to the cloud database for storage, and then delete them from the local database; When the image recognition system recognizes an image, it first traverses the knowledge graph in the local database. If there is no knowledge graph matching the recognized image in the local database, it traverses the knowledge graph in the cloud database. If there is a knowledge graph matching the recognized image in the cloud database after the traversal, it downloads the knowledge graph from the cloud database to the local database for storage. The optimization system periodically obtains the matching rate and data growth rate of all knowledge graphs in the initial graph list, including the following steps: The optimization system obtains the matching rate and data growth rate of all knowledge graphs in the initial graph list at regular intervals; The logic for obtaining the matching rate is as follows: obtain the number of images matching the knowledge graph within the interval time period, and then obtain the matching rate by dividing the number of images matching the knowledge graph by the interval time period. The logic for obtaining the data growth rate is as follows: obtain the data growth of the knowledge graph within the interval time period. The data growth amount is obtained by subtracting the data amount at the initial moment from the data amount at the final moment within the interval time period. The data growth rate is obtained by dividing the data growth amount by the interval time length. Generate a graph score for each knowledge graph based on the matching rate and data growth rate, including the following steps: The matching rate and the data volume growth rate are normalized, and the value range of the matching rate and the data volume growth rate is mapped to [0, 1] to obtain the normalized value of the matching rate and the normalized value of the data volume growth rate; The graph score is obtained by subtracting the normalized value of the data volume growth rate from the normalized value of the matching rate.

2. The image recognition optimization method based on knowledge graph according to claim 1, characterized in that: According to the priority graph method, a weight ratio is assigned to each knowledge graph based on the graph score, including the following steps: After obtaining the graph scores of all knowledge graphs, sort all knowledge graphs from large to small according to the graph scores; Generate TTL indicators for each knowledge graph according to the priority graph method; Add up the TTL indicators of all knowledge graphs to get the total value of TTL indicators; Obtain the weight ratio of the knowledge graph by dividing the TTL index of the knowledge graph by the total value of the TTL index; After obtaining the weight ratios of all knowledge graphs, the weight ratios of all knowledge graphs are weighted averaged to obtain the overall score index of the image recognition system.

3. The image recognition optimization method based on knowledge graph according to claim 2 is characterized in that: The optimization system determines whether it is necessary to dynamically optimize and adjust the knowledge graph in the image recognition system based on fuzzy rules, including the following steps: The optimization system obtains the overall scoring index of the image recognition system and the frequency of use of the image recognition system in practical applications; The overall rating index and usage frequency are defined as input variables and divided into different fuzzy sets respectively; Define the judgment result as the output variable and divide it into fuzzy sets; Formulate fuzzy rules to describe the impact of different overall scoring indexes and usage frequencies on the output of judgment results; The overall scoring index and usage frequency obtained regularly are defined as input into fuzzy rules, fuzzy reasoning is performed according to the fuzzy rules, and the corresponding judgment results are output.

4. The image recognition optimization method based on knowledge graph according to claim 3 is characterized in that: The optimization system classifies the knowledge graphs in the initial graph list into a retention set or an adjustment set according to the graph scores, including the following steps: After obtaining the graph scores of all knowledge graphs in the initial graph list, compare the graph scores with the set partition threshold, which is used to judge the quality of the knowledge graph; If the graph score is greater than or equal to the set partition threshold, the knowledge graph is judged to be excellent and the knowledge graph is included in the retention set, that is, the knowledge graph is not adjusted; If the graph score is less than the set division threshold, the knowledge graph is judged to be poor and the knowledge graph is included in the adjustment set, which means that the knowledge graph needs to be adjusted.

5. The image recognition optimization method based on knowledge graph according to claim 4 is characterized in that: The knowledge graph in the adjustment set is uploaded to the cloud database for storage, and the knowledge graph uploaded to the cloud database for storage is deleted from the local database, including the following steps: Connect to the cloud database and perform data upload operations. For each knowledge graph queried from the local database and belonging to the adjustment set, transfer the data content and related metadata of the knowledge graph to the table in the cloud database. Confirm that the knowledge graph has been uploaded to the cloud database by querying the cloud database. After confirming that all knowledge graphs have been uploaded to the cloud database, delete all knowledge graphs uploaded to the cloud database from the local database.

6. The image recognition optimization method based on knowledge graph according to claim 5 is characterized in that: When the image recognition system recognizes an image, if there is no knowledge graph matching the recognized image in the local database, it traverses the knowledge graph in the cloud database, including the following steps: Use query statements to obtain the knowledge graph related to the recognized image from the local database, check the query results, and determine whether there is a knowledge graph matching the recognized image in the local database. If there is no matching knowledge graph in the local database, the image recognition system connects to the cloud database, performs a query operation in the cloud database, obtains the knowledge graph related to the recognized image, checks the cloud database query results, and determines whether there is a knowledge graph matching the recognized image. If there is no knowledge graph matching the recognized image in the cloud database after traversal, a warning signal is sent to the administrator.