Intelligent quality inspection method and system for chain stores based on AI technology
Patent Information
- Application Number
- CN202611179417.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]本发明的目的是提供一种基于AI技术的连锁门店智能质检方法及系统,旨在解决现有固定规则图像识别方案需要针对每个检查项单独开发算法或训练模型,SOP更新后模型迭代周期长,且难以修正误判、持续优化质检准确率,难以适配连锁门店动态运营需求的技术问题
[0007]本发明实施例的有益效果为:实现了从标准导入到质检执行再到自我进化的完整链路,使连锁门店的质检过程摆脱了对专用硬件和固定算法的依赖,质检规则可随SOP变更快速更新,且质检准确率能够在持续运行中自主提升。
Smart Images

Figure CN122988839A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of store quality inspection technology, and in particular to an intelligent quality inspection method and system for chain stores based on AI technology. Background Technology
[0002] In the standardized management of chain stores, brands typically develop Standard Operating Procedures (SOPs) to unify the execution standards across all stores. Traditional store quality inspection mainly relies on manual inspections or image recognition solutions with fixed rules. Manual inspections are inefficient and costly; while existing image recognition-based quality inspection solutions require pre-writing fixed recognition algorithms or training dedicated models for each inspection item. Once the brand's SOP standards are updated, samples must be recollected and models retrained, resulting in long update cycles and difficulty in adapting to rapidly changing operational needs. Furthermore, these systems generally lack effective feedback loops, making it difficult to correct AI misjudgments and optimize rules, leading to stagnant quality inspection accuracy and hindering the management efficiency of chain brands.
[0003] Therefore, there is an urgent need for an intelligent quality inspection method that can automatically convert SOP standards described in natural language into executable structured visual inspection rules and achieve rule evolution based on actual quality inspection feedback. Summary of the Invention
[0004] The purpose of this invention is to provide an intelligent quality inspection method and system for chain stores based on AI technology. It aims to solve the technical problems of existing fixed-rule image recognition solutions, which require the development of separate algorithms or training models for each inspection item, have long model iteration cycles after SOP updates, and are difficult to correct misjudgments, continuously optimize quality inspection accuracy, and adapt to the dynamic operation needs of chain stores.
[0005] In a first aspect, embodiments of the present invention provide an intelligent quality inspection method for chain stores based on AI technology, comprising: Obtain the SOP document of the brand's standard operating procedure, extract the description of the inspection items corresponding to each quality inspection category from the SOP document, and decompose the description of the inspection items into multiple visual inspection atomic conditions; Each visual detection atomic condition belonging to the same quality inspection category is sequentially mapped to an executable detection operation defined by visual primitives, and a structured judgment rule bound to the quality inspection category is generated based on the logical relationship between each visual detection atomic condition. Receive on-site photos uploaded by stores and their corresponding quality inspection category identifiers, and retrieve the corresponding structured image judgment rules based on the quality inspection category identifiers; Perform visual primitive detection operations mapped by each visual detection atom condition in the structured image judgment rule on the on-site photos to obtain the confidence level of each visual detection atom condition. Then, synthesize the comprehensive confidence level layer by layer along the logical relationship and output the quality inspection judgment result based on the comprehensive confidence level. When the quality inspection result is unqualified, a rectification notice is sent to the store, and re-inspection photos taken after rectification are received. These re-inspection photos are used as new on-site photos to repeat the quality inspection until the result is qualified or the termination conditions are met; or When the quality inspection result is unqualified, the system receives objections and appeals from stores regarding the quality inspection result, uses the manual review conclusion as feedback, adjusts the judgment threshold of the corresponding visual inspection atomic conditions, and / or uses review cases to incrementally fine-tune the multimodal visual language model to achieve closed-loop self-optimization of the quality inspection rules.
[0006] Secondly, embodiments of the present invention provide an intelligent quality inspection system for chain stores based on AI technology, comprising: The document processing unit is used to obtain the SOP document of the brand's standard operating procedure, extract the description of the inspection items corresponding to each quality inspection category from the SOP document, and decompose the description of the inspection items into multiple visual inspection atomic conditions. The rule generation unit maps each visual detection atomic condition belonging to the same quality inspection category to an executable detection operation defined by visual primitives in sequence, and generates a structured judgment rule bound to the quality inspection category based on the logical relationship between each visual detection atomic condition. The receiving and processing unit receives on-site photos uploaded by the store and their corresponding quality inspection category identifiers, and retrieves the corresponding structured image judgment rules based on the quality inspection category identifiers. The quality inspection and judgment unit performs visual primitive detection operations on the on-site photos according to the visual primitives mapped by each visual detection atomic condition in the structured image judgment rules, obtains the confidence level of each visual detection atomic condition, and then synthesizes the comprehensive confidence level layer by layer along the logical relationship, and outputs the quality inspection and judgment result based on the comprehensive confidence level. The rectification unit, when the quality inspection result is unqualified, sends a rectification notice to the store and receives re-inspection photos taken after rectification. These re-inspection photos are then used as new on-site photos to repeat the quality inspection process until the result is qualified or the termination conditions are met; or The feedback unit receives objections to the quality inspection results when the quality inspection judgment is unqualified. It takes the manual review conclusion as feedback, adjusts the judgment threshold of the corresponding visual inspection atomic conditions, and / or uses the review cases to incrementally fine-tune the multimodal visual language model to achieve closed-loop self-optimization of the quality inspection rules.
[0007] The beneficial effects of this invention are as follows: it realizes a complete link from standard import to quality inspection execution and then to self-evolution, so that the quality inspection process of chain stores is freed from dependence on dedicated hardware and fixed algorithms, the quality inspection rules can be quickly updated with SOP changes, and the quality inspection accuracy can be improved autonomously during continuous operation. Attached Figure Description
[0008] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a flowchart illustrating the AI-based intelligent quality inspection method for chain stores provided in an embodiment of the present invention.
[0010] Figure 2 A schematic block diagram of an AI-based intelligent quality inspection system for chain stores provided in an embodiment of the present invention. Detailed Implementation
[0011] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0012] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0013] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0014] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0015] Please see Figure 1 , Figure 1 A flowchart illustrating the AI-based intelligent quality inspection method for chain stores provided in an embodiment of the present invention; like Figure 1 As shown, the method includes steps S10 to S60.
[0016] S10. Obtain the SOP document of the brand's standard operating procedure, extract the description of the inspection items corresponding to each quality inspection category from the SOP document, and decompose the description of the inspection items into multiple visual inspection atomic conditions. In step S10, the standard operating procedure (SOP) document written in natural language is first obtained. The document structure is parsed by the large language model to extract the description of the inspection items corresponding to each quality inspection category (such as "breakfast cold drink cabinet"). Then, each inspection item description is broken down into several visual inspection atomic conditions, such as "there are four colors: pink, orange, blue and gray" and "the sealing edge is serrated".
[0017] S20. Map each visual detection atomic condition belonging to the same quality inspection category to an executable detection operation defined by the visual primitives in sequence, and generate a structured judgment rule bound to the quality inspection category based on the logical relationship between each visual detection atomic condition. In step S20, a preset visual concept dictionary is introduced, and all visual detection atomic conditions belonging to the same quality inspection category are mapped to executable detection operations defined by visual primitives such as Exiss and ColorDist. Based on the conjunction, disjunction, or non-logical relationships between conditions, they are combined into a structured graph rule organized in a tree structure. This rule is uniquely bound to the quality inspection category.
[0018] Furthermore, the visual concept dictionary defines a variety of visual primitives, including at least one of the following: the Exists primitive for detecting the existence of a specified object, the ColorDist primitive for determining whether a specified region contains all given colors, the Count primitive for calculating the number of objects and determining whether they fall within a set interval, the Spatial primitive for detecting spatial relationships between objects, and the Texture primitive for recognizing the texture attributes of a region. Each primitive corresponds to a specific image analysis operation and has a clear parameter interface. Based on this, during the generation of structured image judgment rules, the decomposed visual detection atomic conditions find the corresponding visual primitives through semantic matching, extract parameters, and instantiate them to form executable detection operations that can be directly executed by the multimodal visual language model.
[0019] Furthermore, structured judgment rules corresponding to each quality inspection category are generated, including the following steps S201-S204: S201. Use a large language model to parse the SOP document and extract the name of each quality inspection category and the corresponding inspection item description text; S202. For each inspection item description text, decompose it into multiple visual detection atomic conditions described in natural language using a large language model, and transform the descriptions with specific visual features in the inspection item description text into standardized parameter values. S203. Based on the visual concept dictionary, find the visual primitives that match the semantics of each visual detection atomic condition, and instantiate the visual detection atomic conditions into an executable detection operation consisting of the visual primitives and their standardized parameters. S204. Use the prompting engineering to specify the logical operators between all executable detection operations belonging to the same quality inspection category, and generate the corresponding structured judgment rules. The structured judgment rules record the visual primitives, parameters and expected outputs corresponding to each visual detection atomic condition in a tree structure.
[0020] The process of steps S201-S204 is mainly completed by the large language model and is divided into four stages: document parsing, condition decomposition, dictionary mapping and rule combination.
[0021] During the document parsing phase, the full text of the SOP document uploaded by the brand is input into the large language model. The model's language understanding capabilities are then used to extract the names of each quality inspection category and the corresponding descriptions of the inspection items. Taking the quality inspection scenario of a hotel breakfast area as an example, the large language model can identify quality inspection categories such as "breakfast beverage cooler," "breakfast hot food counter," and "breakfast fruit area," and extract inspection item descriptions for each category, such as "The beverage cooler must neatly arrange beverage packaging in four colors: pink, orange, blue, and gray, and the sealing edges of the packaging should be serrated."
[0022] During the condition decomposition phase, the large language model, based on language understanding and common-sense reasoning, breaks down each check item description text into multiple semantically independent visual detection atomic conditions expressed in natural language for each item. Simultaneously, the model utilizes pre-defined standardized resources such as color value libraries, object noun libraries, and numerical range libraries to transform ambiguous descriptions with specific visual features in the check item description text into standardized parameter values. For example, "pink, orange, blue, gray" is mapped to standard color code values, "beverage packaging" is mapped to standard object nouns, and "jagged" is identified as a texture feature description.
[0023] In the dictionary mapping stage, based on the semantic descriptions of each visual primitive predefined in the visual concept dictionary, the visual detection atomic condition in natural language form is semantically similar to the visual primitive. The visual primitive type that best expresses the detection intent of the atomic condition is selected, and the corresponding parameter values are extracted from the standardized parameters. The visual detection atomic condition is then instantiated into a complete executable detection operation.
[0024] In the rule combination phase, prompting engineering techniques are employed. A prompt template containing a small number of examples is input into the large language model, guiding the model to specify logical operators based on the logical relationships between each executable detection operation (e.g., simultaneous satisfaction, satisfaction of one, disallowed occurrence, etc.), generating structured judgment rules organized in a tree structure. In this tree structure, leaf nodes record the visual primitive type, detection parameters, and expected output corresponding to each visual detection atomic condition; intermediate nodes record logical operators; and the root node corresponds to the final judgment logic for the entire quality inspection category.
[0025] Through the above four-stage process, the unstructured natural language SOP document is automatically converted into structured graph judgment rules that can be directly executed by the machine. The entire process takes only minutes. When some check items in the SOP document change, the above process can be repeated to quickly generate updated rules without manual coding or retraining of the model.
[0026] S30. Receive on-site photos uploaded by stores and their corresponding quality inspection category identifiers, and retrieve the corresponding structured image judgment rules based on the quality inspection category identifiers; S40. Perform visual primitive detection operations on the visual primitives mapped by each visual detection atomic condition in the corresponding structured image judgment rules on the on-site photos, obtain the confidence level of each visual detection atomic condition, and then synthesize the comprehensive confidence level layer by layer along the logical relationship. Output the quality inspection judgment result based on the comprehensive confidence level; and proceed to steps S50 and S60. In steps S30-S40, during routine quality inspections, stores upload on-site photos via the client, along with the corresponding quality inspection category label. Based on the label, the corresponding structured image judgment rules are retrieved, and a multimodal visual language model is invoked. The model then performs inspections on the on-site photos according to the visual primitives mapped to each visual detection atomic condition in the rules, outputting the confidence score of each visual detection atomic condition. Then, the confidence score is recursively synthesized from bottom to top along the logic tree to obtain a comprehensive confidence score reflecting the overall compliance level of the photo. Based on this comprehensive confidence score value, a result of "qualified," "unqualified," or "cannot be determined" is output.
[0027] In a specific embodiment of step S40, the visual primitive detection operation mapped by each visual detection atom condition in the corresponding structured image judgment rule is performed on the on-site photograph to obtain the confidence level of each visual detection atom condition. Specifically, this includes the following steps S401-S403: S401. For each visual detection atom condition, generate a corresponding detection prompt text according to the type and parameters of the visual primitive it maps to. The detection prompt text is used to describe the content that the visual primitive requires to be detected in the form of a natural language question. S402. Combine the on-site photos and detection prompt text into a multimodal input, and input it into a multimodal visual language model for inference; S403. Obtain the predicted probability of each visual detection atom condition being met from the output of the multimodal visual language model, and use it as the confidence level for each visual detection atom condition.
[0028] In step S401, all leaf nodes in the structured image discrimination rule tree are read, and the visual detection atomic conditions corresponding to each leaf node are traversed to obtain the visual primitive type and its detection parameters associated with that node. For each visual detection atomic condition, a corresponding detection prompt text is automatically generated based on the type and specific parameters of its visual primitive, according to a preset template. The detection prompt text can be in the form of a natural language question to describe the content that the visual primitive requires to be detected, so as to match the input format of the multimodal visual language model. For example, for a visual detection atomic condition corresponding to the ColorDist primitive, whose parameters are a color list [pink, orange, blue, gray] and a detection region "refrigerated display case shelf", the generated detection prompt text can be "Please determine whether there are objects of four colors, pink, orange, blue and gray, in the refrigerator shelf area of the image at the same time?" The purpose of this detection prompt text is to restore the structured detection parameters to a semantic question that the model can understand, thereby guiding the model to focus its attention on specific visual features for analysis.
[0029] In steps S402-S403, the detection prompt text and the on-site photos uploaded by the store are combined into a multimodal input data package. The multimodal input data package contains both image and text data, conforming to the standard input format requirements of a multimodal visual language model. This multimodal input is fed into the multimodal visual language model for inference. The model extracts features from the on-site photos using its internal visual encoder, and simultaneously parses the semantics of the detection prompt text using a text encoder. A cross-modal attention mechanism aligns and interacts the text semantics with the image features, ultimately outputting a prediction of whether the visual detection atomic condition is true. Since the multimodal visual language model typically provides confidence scores for each question in the form of a probability distribution, the predicted probability value representing the "true" category is extracted from the model output and directly used as the confidence score of the visual detection atomic condition.
[0030] Based on this, steps S401-S403 repeat the above process for the visual detection atomic conditions of all leaf nodes in the structured graph judgment rule, obtaining the confidence values of each visual detection atomic condition under the rule. Each confidence value is a continuous value within the interval (0,1), and the closer the value is to 1, the more likely the visual detection atomic condition is to be true. By restoring the structured visual primitive detection parameters to natural language detection prompt text and using the cross-modal reasoning capability of the multimodal visual language model for analysis, the dependence on specific object detection models is effectively reduced. The model can complete the judgment of various types of visual detection atomic conditions based on general visual language understanding capabilities, improving the versatility and flexibility of the system.
[0031] In the specific algorithm scheme of steps S401-S403, the confidence level technique for visual detection of atomic conditions is as follows: p i =σ( g i (photo, prompt) i ) ); Where, p i Represents the confidence level of the i-th visual detection atom condition, photo is a scene photo, prompt i For the detection prompt text corresponding to the i-th visual detection atom condition, g i The feature discrimination function of the multimodal visual language model for the visual detection atomic condition is to output a real score. σ(·) is the sigmoid function, which maps the real score to the (0,1) interval as the confidence level.
[0032] This specific algorithm utilizes the comprehensive capabilities of multimodal visual language models in image understanding and text reasoning, unifying complex visual judgment tasks into a quantifiable probability output, thus laying the foundation for quantitative processing of the entire quality inspection reasoning chain.
[0033] In a specific embodiment of step S40, based on the confidence level of each visual detection atom condition, a comprehensive confidence level is synthesized layer by layer along the logical relationship, and the quality inspection judgment result is output according to the comprehensive confidence level. Specifically, it includes the following steps S404-S407: S404. Parse the logical tree structure of the structured graph judgment rules, starting from the leaf node and traversing each logical node in a bottom-up order. S405. For any logical node, read its logical relation type; if it is a conjunction relation, calculate the conjunction confidence based on the confidence of all child nodes under that node; if it is a disjunction relation, calculate the disjunction confidence; if it is a logical negation relation, calculate the negation confidence. S406. Use the calculated confidence score of the node as the confidence score of the child node of the next higher level node, and recursively execute until the root node to obtain the overall comprehensive confidence score of the structured graph judgment rule. S407. Based on the preset confidence level interval and the mapping table of judgment results, the overall comprehensive confidence level is converted into the corresponding quality inspection judgment result. The quality inspection judgment result includes at least three types: qualified, unqualified, or cannot be judged.
[0034] In steps S404-S407, after obtaining the confidence levels of all visual detection atomic conditions in the structured graph judgment rules in steps S401-S403, it is necessary to synthesize the comprehensive confidence levels and output the final quality inspection judgment result. Specifically, the structured graph judgment rules are regarded as a logic tree: leaf nodes are the confidence levels of each visual detection atomic condition, and intermediate nodes are conjunction, disjunction, or negation logical operators. A bottom-up recursive calculation strategy is adopted. Starting from the leaves, the comprehensive confidence level of each intermediate node is calculated based on its logical type and the confidence levels of its child nodes, and this value is passed up to the next level until the root node, to obtain the overall comprehensive confidence level reflecting the entire rule. For example, for a conjunction node, the confidence levels of all child nodes are synthesized by weighted geometric mean; for a disjunction node, the probability that at least one child node satisfies the condition is calculated; and negation nodes are directly negated. This recursive synthesis method simulates the comprehensive judgment psychology of human quality inspectors when considering multiple conditions simultaneously: among multiple conditions that must be met simultaneously, the uncertainty of any one of them will lower the overall confidence level; while conditions with multiple choices allow individual uncertainties to be compensated for by the high confidence of other conditions. Finally, based on a pre-set mapping table between confidence intervals and judgment results, the overall comprehensive confidence level is converted into a quality inspection judgment result of "qualified," "unqualified," or "cannot be determined." In this way, the output not only provides a qualitative conclusion but also inherently reflects the credibility of the judgment, providing a decision-making basis for subsequent manual intervention or automated processing.
[0035] In the specific algorithm scheme of steps S401-S403, the confidence level C is conjunct. AND Disjunction confidence level C OR Unconfidence level C NOT Calculate using the following formula: C AND = ( ∏{i=1}^{n} c i ^{w i} )^{1 / ∑{i=1}^{n} w i}; C OR = 1 - ∏_{i=1}^{n} (1 - c i ); C NOT = 1 - c1; Where, p i w represents the confidence level of the i-th child node. i The weighting coefficient is a preset value corresponding to the importance of the child node, where n is the number of child nodes and c1 represents the confidence level of the only child node that is not a computation node. The importance weighting coefficient is automatically determined by the large language model when generating structured graph rules based on the priority of the corresponding check item in the SOP document.
[0036] In this specific algorithm, for a conjunction node with n child nodes, its conjunction confidence C AND The weighted geometric mean formula is used, with weighting coefficients w. i When generating structured graph judgment rules from a large language model, the rules are automatically assigned based on the priority of the condition in the SOP document (e.g., words like "must" or "strictly prohibited"). Conditions with higher importance are assigned greater weight. The characteristic of this weighted geometric average is that any child node's confidence approaching 0 will cause a sharp decrease in the overall confidence, thus strictly reflecting the "one-vote veto" characteristic of conjunctive relations. Simultaneously, the weight parameters differentiate the impact of different conditions. For disjunctive nodes, their disjunctive confidence C... OR Then, the probability union formula is used, treating the confidence of each child node as the probability of an independent event. Subtracting the probability that none of the events occur from 1 yields the probability that at least one child node satisfies the condition. This conforms to the semantics of disjunction and can tolerate low confidence levels for individual conditions. The non-confidence C of non-operational nodes... NOT It is directly calculated as the complement of the confidence score of the unique child node.
[0037] S50. When the quality inspection result is unqualified, a rectification notice is sent to the store, and the re-inspection photos taken after the rectification is completed are received. The re-inspection photos are used as new on-site photos to repeat the quality inspection judgment until the judgment is qualified or the termination conditions are met. S60. When the quality inspection result is unqualified, accept the objection appeal initiated by the store regarding the quality inspection result, take the manual review conclusion as feedback, adjust the judgment threshold of the corresponding visual inspection atomic conditions, and / or use the review case to make incremental fine-tuning of the multimodal visual language model to achieve closed-loop self-optimization of the quality inspection rules.
[0038] In steps S50-S60, if the result is deemed unqualified, a rectification notice is automatically sent to the store. The re-inspection photos after rectification are received and used as new photos for re-judgment, forming a rectification closed loop. Alternatively, if the store disagrees with the judgment result and files an appeal, the confidence decomposition and interpretable data of this judgment are submitted for manual review. The judgment threshold of the corresponding visual detection atomic conditions is adjusted according to the review conclusion, or the multimodal visual language model is incrementally fine-tuned using accumulated misjudgment cases to achieve autonomous evolution of the rules.
[0039] Based on this, the above steps S10-S60 realize a complete link from standard import to quality inspection execution and then to self-evolution, so that the quality inspection process of chain stores is freed from dependence on dedicated hardware and fixed algorithms, the quality inspection rules can be quickly updated with SOP changes, and the quality inspection accuracy can be improved autonomously in continuous operation.
[0040] In a specific embodiment of step S60, each visual detection atom condition has a preset corresponding judgment threshold; adjusting the judgment threshold of the corresponding visual detection atom condition specifically includes the following steps S601-S602: S601. For visual detection atomic conditions that are confirmed to have been misjudged in the objection appeal, obtain the true label of whether the visual detection atomic condition is actually valid as given by manual review. S602. Based on the difference between the confidence level of the real label and the visual detection atomic condition in this quality inspection, the judgment threshold of the visual detection atomic condition is corrected according to the preset adjustment strategy. The direction of correction is as follows: when the real label is valid and the confidence level is lower than the current judgment threshold, the judgment threshold is lowered; otherwise, the judgment threshold is raised.
[0041] In this embodiment, to accumulate experience from manual objections and automatically optimize rules, a judgment threshold is preset for each visual detection atomic condition. This judgment threshold can be regarded as the confidence level dividing point that distinguishes whether the condition is true or false. The initial value can be set by validation set statistics or manual experience. When a quality inspection is disputed by a store and confirmed by manual review to have a misjudgment (i.e., the manual conclusion does not match the model conclusion), the true label (true or false) of the visual detection atomic condition involved in the misjudgment is obtained and compared with the confidence level of the condition output in this instance. If the true label is true but the confidence level is lower than the current judgment threshold, it means that the threshold is too high, causing the condition that should be true to be missed. In this case, the threshold is lowered according to the preset adjustment strategy. Conversely, if the true label is false but the confidence level is higher than the judgment threshold, it means that the threshold is too low, causing a misjudgment. In this case, the judgment threshold is raised. This judgment threshold adjustment is similar to online incremental learning. It does not require retraining the overall model; it only requires fine-tuning the judgment boundary of individual conditions that trigger misjudgments. Based on this, each time an objection or appeal is processed, professional human judgment is incorporated, and the judgment thresholds for each visual inspection atomic condition are gradually calibrated to be close to human standards. After long-term operation, the misjudgment rate of quality inspection has continued to decline, realizing the closed-loop adaptive evolution of quality inspection rules.
[0042] In a further implementation plan, to address the potential boundary uncertainties after synthesizing the overall confidence level, this implementation introduces a dual-threshold decision mechanism. Two parameters, an upper confidence threshold and a lower confidence threshold, are pre-set, dividing the (0,1) confidence level interval into three regions. When the overall confidence level is higher than the upper threshold, it indicates that the model has high confidence in the quality inspection result; in this case, the qualified or unqualified conclusion is directly adopted without manual intervention. When the overall confidence level is lower than the lower threshold, it indicates that the model cannot definitively determine the result, and forcibly outputting it could easily lead to errors. In this case, the automatic conclusion is abandoned, "Unable to determine" is output, and all data of this quality inspection record (photos, rules, confidence levels of each atomic condition, etc.) are automatically added to the manual review queue for human review. When the overall confidence level is between the upper and lower thresholds, the decision result is still output according to the model's tendency, but a low-confidence flag is added to the result to indicate that the credibility of the conclusion is limited and should be combined with other information for comprehensive judgment. The technical advantage of this strategy is that it uses confidence level as a self-evaluation signal for the model, automatically processes high-confidence cases, and promptly diverts low-confidence cases to manual processing, achieving a balance between automation efficiency and judgment accuracy, and effectively reducing the risk of misjudgment across the entire domain.
[0043] This invention also provides an AI-based intelligent quality inspection system for chain stores, which is used to execute any of the aforementioned AI-based intelligent quality inspection methods for chain stores. Specifically, please refer to... Figure 2 , Figure 2 This is a schematic block diagram of an AI-based intelligent quality inspection system for chain stores provided in an embodiment of the present invention.
[0044] like Figure 2 As shown, the AI-based intelligent quality inspection system 200 for chain stores includes: a document processing unit 210, a rule generation unit 220, a receiving and processing unit 230, a quality inspection judgment unit 240, a rectification unit 250, and a feedback unit 260.
[0045] Document processing unit 210 is used to obtain the SOP document of the brand standard operating procedure, extract the description of the inspection items corresponding to each quality inspection category from the SOP document, and decompose the description of the inspection items into multiple visual inspection atomic conditions. The rule generation unit 220 maps each visual detection atomic condition belonging to the same quality inspection category to an executable detection operation defined by the visual primitives in sequence, and generates a structured judgment rule bound to the quality inspection category based on the logical relationship between each visual detection atomic condition. The receiving and processing unit 230 receives on-site photos uploaded by the store and their corresponding quality inspection category identifiers, and retrieves the corresponding structured image judgment rules based on the quality inspection category identifiers. The quality inspection judgment unit 240 performs visual primitive detection operations mapped by each visual detection atomic condition in the corresponding structured image judgment rules on the on-site photos, obtains the confidence level of each visual detection atomic condition, and then synthesizes the comprehensive confidence level layer by layer along the logical relationship, and outputs the quality inspection judgment result based on the comprehensive confidence level. Rectification Unit 250: When the quality inspection result is unqualified, a rectification notice is sent to the store, and re-inspection photos taken after rectification are received. These re-inspection photos are used as new on-site photos to repeat the quality inspection process until the result is qualified or the termination conditions are met; or Feedback unit 260, when the quality inspection judgment result is unqualified, receives the objection appeal initiated by the store regarding the quality inspection judgment result, takes the manual review conclusion as feedback, adjusts the judgment threshold of the corresponding visual inspection atomic conditions, and / or uses the review case to incrementally fine-tune the multimodal visual language model, so as to realize the closed-loop self-optimization of the quality inspection rules.
[0046] The system realizes a complete link from standard import to quality inspection execution and then to self-evolution, freeing the quality inspection process of chain stores from dependence on dedicated hardware and fixed algorithms. The quality inspection rules can be quickly updated with changes in SOPs, and the quality inspection accuracy can improve autonomously during continuous operation.
[0047] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, systems, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0048] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A smart quality inspection method for chain stores based on AI technology, characterized in that, include: Obtain the SOP document of the brand's standard operating procedure, extract the description of the inspection items corresponding to each quality inspection category from the SOP document, and decompose the description of the inspection items into multiple visual inspection atomic conditions; Each visual detection atomic condition belonging to the same quality inspection category is sequentially mapped to an executable detection operation defined by visual primitives, and a structured judgment rule bound to the quality inspection category is generated based on the logical relationship between each visual detection atomic condition. Receive on-site photos uploaded by stores and their corresponding quality inspection category identifiers, and retrieve the corresponding structured image judgment rules based on the quality inspection category identifiers; Perform visual primitive detection operations mapped by each visual detection atomic condition in the structured image judgment rule on the on-site photos to obtain the confidence level of each visual detection atomic condition. Then, synthesize the comprehensive confidence level layer by layer along the logical relationship and output the quality inspection judgment result based on the comprehensive confidence level. When the quality inspection result is unqualified, a rectification notice is sent to the store, and the re-inspection photos taken after the rectification is completed are received. The re-inspection photos are used as new on-site photos to repeat the quality inspection until the result is qualified or the termination conditions are met. or When the quality inspection result is unqualified, the system receives objections and appeals from stores regarding the quality inspection result, uses the manual review conclusion as feedback, adjusts the judgment threshold of the corresponding visual inspection atomic conditions, and / or uses review cases to incrementally fine-tune the multimodal visual language model to achieve closed-loop self-optimization of the quality inspection rules.
2. The intelligent quality inspection method for chain stores based on AI technology according to claim 1, characterized in that, The visual primitives in the visual concept dictionary include at least one of the following: the Exists primitive for detecting the existence of a specified object, the ColorDist primitive for determining whether a specified region contains all given colors, the Count primitive for calculating the number of objects and determining whether they fall within a set interval, the Spatial primitive for detecting the spatial relationship between objects, and the Texture primitive for recognizing the texture attributes of a region.
3. The intelligent quality inspection method for chain stores based on AI technology according to claim 1, characterized in that, The specific steps for generating structured judgment rules for each quality inspection category include: The SOP document is parsed using a large language model to extract the name of each quality inspection category and the corresponding inspection item description text. For each inspection item description text, the large language model is used to decompose it into multiple visual detection atomic conditions described in natural language, and the descriptions with specific visual features in the inspection item description text are transformed into standardized parameter values. Based on the visual concept dictionary, find the visual primitive that matches the semantics of each visual detection atomic condition, and instantiate the visual detection atomic condition into an executable detection operation consisting of the visual primitive and its standardized parameters. The logical operators between all executable detection operations belonging to the same quality inspection category are specified by the prompting engineering to generate corresponding structured judgment rules. The structured judgment rules record the visual primitives, parameters and expected outputs corresponding to each visual detection atomic condition in a tree structure.
4. The intelligent quality inspection method for chain stores based on AI technology according to claim 1, characterized in that, Perform visual primitive detection operations on the visual primitives mapped to each visual detection atom condition in the corresponding structured image discrimination rules on the aforementioned scene photographs to obtain the confidence level of each visual detection atom condition, including: For each visual detection atom condition, a corresponding detection prompt text is generated based on the type and parameters of the visual primitive it maps to. The detection prompt text is used to describe the content that the visual primitive requires to be detected in the form of a natural language question. The on-site photos and the detection prompt text are combined into a multimodal input, which is then input into the multimodal visual language model for inference. The predicted probability of each visual detection atom condition being true, output by the multimodal visual language model, is obtained as the confidence level for each visual detection atom condition.
5. The intelligent quality inspection method for chain stores based on AI technology according to claim 4, characterized in that, The confidence level technique for visual detection of atomic conditions is as follows: p i =σ( g i ( photo, prompt i ) ); Where, p i Represents the confidence level of the i-th visual detection atom condition, photo is the on-site photograph, prompt i For the detection prompt text corresponding to the i-th visual detection atom condition, g i The feature discrimination function of the multimodal visual language model for the visual detection atomic condition outputs a real score, where σ(·) is the sigmoid function, and the real score is mapped to the (0,1) interval as the confidence level.
6. The intelligent quality inspection method for chain stores based on AI technology according to claim 1, characterized in that, Based on the confidence level of each visual detection atom condition, a comprehensive confidence level is synthesized layer by layer along the aforementioned logical relationship. The quality inspection judgment result is then output based on the comprehensive confidence level, including: The logical tree structure of the structured graph judgment rules is parsed, starting from the leaf nodes and traversing each logical node in a bottom-up order; For any logical node, read its logical relation type; if it is a conjunction relation, calculate the conjunction confidence based on the confidence of all child nodes under that node; if it is a disjunction relation, calculate the disjunction confidence; if it is a logical NOT relation, calculate the NOT confidence. The calculated confidence score of the node is used as the confidence score of the child node of the next higher level node. This process is repeated recursively until the root node is reached, thus obtaining the overall comprehensive confidence score of the structured graph judgment rule. Based on the preset confidence level range and the mapping table of judgment results, the overall comprehensive confidence level is converted into the corresponding quality inspection judgment result, which includes at least three types: qualified, unqualified, or cannot be judged.
7. The intelligent quality inspection method for chain stores based on AI technology according to claim 6, characterized in that, The conjunction confidence level C AND Disjunction confidence level C OR Unconfidence level C NOT Calculate using the following formula: C AND = ( ∏{i=1}^{n} c i ^{w i } )^{1 / ∑{i=1}^{n} w i }; C OR = 1 - ∏_{i=1}^{n} (1 - c i ); C NOT = 1 - c1; Where, p i w represents the confidence level of the i-th child node. i The importance weight coefficient is a preset value corresponding to the child node, where n is the number of child nodes and c1 represents the confidence level of the only child node that is not a computation node. The importance weight coefficient is automatically determined by the large language model when generating the structured graph judgment rules based on the priority of the corresponding check item in the SOP document.
8. The intelligent quality inspection method for chain stores based on AI technology according to claim 6 further includes: Preset upper confidence threshold and lower confidence threshold; When the overall confidence level is higher than the upper confidence threshold, the quality inspection judgment result is output directly; When the overall confidence level is lower than the lower confidence threshold, the system outputs "cannot be determined" as the quality inspection result and automatically includes the current quality inspection record in the manual review queue. When the overall confidence level is between the high confidence threshold and the low confidence threshold, the quality inspection judgment result is still output, but a low confidence level label is added.
9. The intelligent quality inspection method for chain stores based on AI technology according to claim 1, wherein each visual detection atom condition is preset with a corresponding judgment threshold; The adjustment of the judgment threshold for the corresponding visual detection atom conditions specifically includes: For visual detection atomic conditions that were confirmed to be misjudged in the objection appeal, obtain the true label of whether the visual detection atomic condition actually holds true, given by manual review. Based on the difference between the confidence level of the real label and the visual detection atomic condition in this quality inspection, the judgment threshold of the visual detection atomic condition is corrected according to a preset adjustment strategy. The direction of the correction is as follows: when the real label is valid and the confidence level is lower than the current judgment threshold, the judgment threshold is lowered; otherwise, the judgment threshold is raised.
10. An intelligent quality inspection system for chain stores based on AI technology, characterized in that, include: The document processing unit is used to obtain the SOP document of the brand's standard operating procedure, extract the description of the inspection items corresponding to each quality inspection category from the SOP document, and decompose the description of the inspection items into multiple visual inspection atomic conditions. The rule generation unit maps each visual detection atomic condition belonging to the same quality inspection category to an executable detection operation defined by visual primitives in sequence, and generates a structured judgment rule bound to the quality inspection category based on the logical relationship between each visual detection atomic condition. The receiving and processing unit receives on-site photos uploaded by the store and their corresponding quality inspection category identifiers, and retrieves the corresponding structured image judgment rules based on the quality inspection category identifiers. The quality inspection and judgment unit performs visual primitive detection operations on the on-site photos according to the visual primitives mapped by each visual detection atomic condition in the structured image judgment rules, obtains the confidence level of each visual detection atomic condition, and then synthesizes the comprehensive confidence level layer by layer along the logical relationship, and outputs the quality inspection and judgment result based on the comprehensive confidence level. When the quality inspection result is unqualified, the rectification unit sends a rectification notice to the store and receives the re-inspection photos taken after the rectification is completed. The re-inspection photos are used as new on-site photos to repeat the quality inspection judgment until the judgment is qualified or the termination conditions are met. or The feedback unit receives objections to the quality inspection results when the quality inspection judgment is unqualified. It takes the manual review conclusion as feedback, adjusts the judgment threshold of the corresponding visual inspection atomic conditions, and / or uses the review cases to incrementally fine-tune the multimodal visual language model to achieve closed-loop self-optimization of the quality inspection rules.