A visual inspection false alarm suppression method, system, device and storage medium based on multi-source artificial feedback and spatial constraint memory
Patent Information
- Application Number
- CN202611055587.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-10-16
AI Technical Summary
[0005]本发明旨在解决现有技术中至少存在的下列技术问题:把来自误报事件、人工文字和实时画面框选的不同反馈统一转换为可执行的结构化记忆;在已有记忆更新、新建记忆和需要人工补充之间作出可审计选择,防止记忆重复或边界过宽;使记忆在不训练和不发布新模型的情况下立即参与后续视觉推理;同时利用摄像头、规则、类别和空间位置限制误报抑制范围,避免一条局部误报记忆压制其他位置的真实风险
[0017] Compared with the prior art, the present invention has at least the following beneficial effects.
Smart Images

Figure CN122929366A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision, artificial intelligence memory management, and video inspection alarm control, and particularly to a method, system, device, and storage medium for converting false alarm handling, artificial text, and real-time image selection into structured memory with scope and spatial constraints, and for suppressing false alarms in the subsequent reasoning and event generation stages without retraining the visual model. Background Technology
[0002] Existing visual inspection systems often reduce false alarms by adjusting detection thresholds, accumulating false alarm samples, and periodically retraining the model. This approach requires sample labeling, training resources, and model release cycles, and cannot immediately apply the false alarm boundaries confirmed by on-site personnel to the next round of inspections.
[0003] The installation angles of different cameras, fixed objects, reflections, ground markings, and legal work equipment create significant differences in the scene. The same rule that might be a false alarm area or object in one camera position could be a real risk in another. Simply storing a natural language description without specifying the camera, rule, and spatial extent can easily broaden the suppression scope and lead to missed alarms.
[0004] Manual input is sometimes too brief, such as simply writing "normal," "not a problem," or "don't report this." Directly saving such text fails to clarify the applicable scenarios, suppression boundaries, and exception conditions; blindly creating new memories can also lead to repetitive or even conflicting memory items. Summary of the Invention
[0005] This invention aims to solve at least the following technical problems existing in the prior art: unifying different feedback from false alarm events, human text, and real-time image selection into executable structured memory; making auditable choices between updating existing memory, creating new memory, and requiring manual supplementation to prevent memory duplication or excessively wide boundaries; enabling memory to immediately participate in subsequent visual reasoning without training or releasing new models; and simultaneously using cameras, rules, categories, and spatial location to limit the range of false alarm suppression, avoiding the risk of a local false alarm memory suppressing the true location in other places.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution.
[0007] Receive at least one type of human feedback: false alarm feedback for generated visual events, independent human text feedback, or area feedback by selecting an area on a real-time video frame and entering a description.
[0008] Extract camera identifiers, rule codes, visual categories, normalized bounding boxes, human causes, original visible evidence, and scope of influence from feedback and related events to construct the memory input to be optimized.
[0009] Retrieve candidate memories within the same scope, and the language model invokes existing memory queries, regulatory standard queries, and scenario rule queries as needed; the language model outputs existing memory identifiers, no target, or questions that need to be supplemented.
[0010] When a clear objective exists, the corresponding memory is updated and the revision history is retained; when no suitable objective exists, a new memory is created; when the boundaries, scope, or rule attribution is insufficient or conflicting, a draft awaiting response is generated, and after receiving a human response, it is analyzed again until it is submitted or abandoned manually.
[0011] Before subsequent visual inspection begins, global memory and the memory of the current camera are loaded according to the current camera. Text memory is used as the judgment boundary, and box selection memory is used as the priority inspection area. The visual language model is allowed to query relevant memory for the currently visible candidate. No memory may generate an event independently when there is a lack of currently visible evidence.
[0012] After the rule engine outputs candidate events, it queries the false alarm suppression memory of the same camera or the global system, and checks the matching relationship between the rule code, visual category and candidate box space in turn; the candidate is suppressed only when all conditions are met, and the result is written into the memory hit record.
[0013] According to another aspect of the present invention, a visual inspection false alarm suppression system is also provided, characterized in that it comprises: a feedback receiving module for receiving at least one of false alarm feedback, manual text feedback, and regional feedback; a feedback standardization module for forming a memory input to be optimized that includes at least a portion of the scope, camera identifier, rule code, visual category, and normalized spatial frame; a memory candidate retrieval module for providing a limited number of candidate memories according to memory type and scope; a memory optimization module for outputting update targets, new instructions, or manual supplement instructions, and maintaining revision history; a manual supplement module for creating a draft of the memory to be responded to and re-executing memory optimization after obtaining a manual response; an inference-period memory service module for loading global memory and camera memory according to the current camera; and a deterministic spatial suppression module for suppressing candidate events and recording memory hits according to the scope, rule code, visual category, and spatial matching relationship after the rule engine forms candidate events.
[0014] According to another aspect of the present invention, an electronic device is also provided, comprising a processor and a memory, wherein the memory stores a computer program, characterized in that the computer program, when executed by the processor, implements the method according to any one of claims 1 to 7.
[0015] According to another aspect of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the method described in any one of claims 1 to 7.
[0016] According to another aspect of the present invention, a computer program product is also provided, comprising a computer program, characterized in that the computer program, when executed by one or more processors, implements the method described in any one of claims 1 to 7.
[0017] Compared with the prior art, the present invention has at least the following beneficial effects.
[0018] Human feedback can take effect immediately in the next round of inspections without retraining the model.
[0019] By using four types of constraints—camera, rules, categories, and bounding boxes—to define suppression boundaries, the risk of global missed detections is reduced.
[0020] By selecting candidate memories, backtracking on similarity, and revising history, we reduce repetitive memories and preserve traceable changes.
[0021] By actively asking questions to process ambiguous feedback, memory can clearly express the conditions that should be reported, the conditions that should not be reported, and the exceptions. Attached Figure Description
[0022] The accompanying drawings, which form part of this application, are used to further understand the invention. The embodiments shown in the drawings and their descriptions are used to explain the invention and do not constitute an undue limitation on the scope of protection of the invention.
[0023] Figure 1 This is a schematic diagram of the structure of the multi-source feedback spatial constraint memory system of the present invention.
[0024] Figure 2 This is the overall flowchart of the visual inspection false alarm suppression method of the present invention.
[0025] Figure 3 A schematic diagram of the data composition for structured spatially constrained memory.
[0026] Figure 4 A decision-making flowchart for updating existing memories, creating new memories, and generating drafts to be responded to.
[0027] Figure 5 A flowchart for structured memory to participate in subsequent visual reasoning and event generation.
[0028] Figure 6 This is a schematic diagram illustrating spatial matching suppression and audit logging. Detailed Implementation
[0029] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. The embodiments are used to illustrate the technical concept of the present invention and are not intended to limit the scope of protection of the present invention; where there is no conflict, the various embodiments and their technical features can be combined with each other.
[0030] Unless otherwise expressly stated, the terms "including" and "comprising" in this specification indicate open inclusion; "multiple" means two or more; "and / or" means any one or any combination of the listed items; "first" and "second" are used only to distinguish the same or similar technical features and do not limit the number or the order of execution. Example 1: Feedback Standardization
[0031] False alarm feedback retrieves camera identifiers, rule codes, model categories, detection boxes, original evidence, and human error from existing events; independent text feedback allows the operator to specify the global or camera coverage area; real-time bounding box feedback divides pixel coordinates by image width and height to obtain a normalized spatial bounding box and saves the bounding box description. All three types of feedback are converted into a unified input to be optimized.
[0032] Let the screen size be W x H, and the manually selected coordinates be (x1, y1, x2, y2). Then the normalized bounding box bn = (x1 / W, y1 / H, x2 / W, y2 / H), and each coordinate is truncated to a closed interval between 0 and 1. If the right boundary is not greater than the left boundary or the lower boundary is not greater than the upper boundary, the bounding box is considered invalid and re-entry is required. During inference, bn can be converted to (round(q*x1 / W), round(q*y1 / H), round(q*x2 / W), round(q*y2 / H)) according to the current model coordinate scale q, thereby avoiding memory binding to a specific image resolution.
[0033] When the cause of a false alarm is too short or only contains generic terms such as "normal" or "not a problem", it is marked as insufficient boundary; if the manual explanation already includes the conditions, scope of application and exceptions for not reporting, it is allowed to directly enter the memory optimization. Example 2: Candidate Memory and Tool-Assisted Optimization
[0034] Candidate memories are preferentially obtained from those of the same type and scope. The language model obtains the identifier, title, judgment prompt, source text, rules, tags, and keywords of the candidate memory, and can query existing AI memories, official food safety standards, scene false alarm boundaries, and model-side rules.
[0035] The language model outputs needs_input, questions, update_memory_id, title, prompt_hint, labels, rule_codes, keywords, and category. update_memory_id can only reference provided candidate identifiers. If the model is unavailable or no candidates are selected, the system performs local fallback using rule intersection, label intersection, keyword similarity, and bigram similarity.
[0036] In a local fallback implementation, the candidate score S = 80J² + min(14Nk,42) + 22Ir + 18Il + 16Io, where J² is the Jaccard similarity between the binary character sets of the old and new texts, Nk is the number of shared keywords, Ir indicates that there is an intersection of rule encodings, Il indicates that there is an intersection of visual categories, and Io indicates that there is continuous text overlap of no less than a preset length. Existing memories are updated only when there is a valid similarity signal between the old and new texts and S reaches the update threshold; otherwise, new memories are created. The coefficients and thresholds can be calibrated based on the mismerging rate and the repeated memory rate. Example 3: Memory to be Retrieved
[0037] When supplementation is needed, the system does not immediately write it into the official memory. Instead, it creates a draft to be responded to, saving the question, original text, source event, scope, and potential targets. After a human response, the original text is merged with all responses, and optimization is performed again. If key boundaries are still missing, questions can be asked again; once clarified, the draft is submitted to the official memory, and its status is updated to "submitted."
[0038] When a formal memory is deleted, the target reference in the draft is set to null without deleting the response history, thus avoiding the database foreign key from preventing deletion, while retaining audit information. Example 4: Application during the inference period
[0039] Each round of visual inspection loads global text memory and current camera text memory, as well as the problem points selected by the current camera. The text memory is added to the prompt context as structured JSON; the selected problem points are converted to a coordinate system from 0 to 1000. The prompt explicitly states that the memory can only provide judgment boundaries and inspection priorities, and cannot replace visible evidence in the current frame.
[0040] When a visual model discovers visible candidates with uncertain boundaries, it can invoke a memory query tool by carrying the camera, rules, categories, evidence, and spatial bounding boxes. The tool returns a finite number of memories and their effects, sorted by camera coverage and candidate relevance. Example 5: Deterministic Spatial Suppression
[0041] The visual model results are first processed by a rule engine to generate candidate events. The system then queries the enabled false positive suppression memory, checks the scope, rules, and categories, normalizes the candidate bounding boxes and memory boxes, and calculates the intersection-over-union ratio and center distance. Only candidates with matching positions are suppressed, while similar candidates at other positions continue to generate events.
[0042] For normalized candidate bounding box bc and memory bounding box bm, the spatial intersection-union ratio (IoU) is calculated as area(intersection of bc and bm) / area(union of bc and bm), and the center distance D is the Euclidean distance between the center points of the two boxes. In an example configuration, a positional match is determined when the IoU is not less than 0.18 or D is not greater than 0.09; this value can be adjusted according to the camera viewpoint and box stability. The deterministic suppression conditions also require that the memory be enabled, the scope of action be global or consistent across cameras, and that the rule encodings be consistent or compatible, and that the visual categories be consistent or compatible.
[0043] Each suppression increases the memory hit count and creates a hit record, recording the camera, rule, category, candidate box, reason, and time. This allows for the evaluation of a memory's long-term validity and supports subsequent deactivation, revision, or deletion. Alternative implementation methods
[0044] The video source can be a webcam, a video recorder channel, a mobile terminal, or a local video file; the visual model can be deployed locally, at an edge node, or in the cloud; and each threshold can be configured according to the camera, region, rule, or scene.
[0045] Without altering the technical concept of this invention, functionally equivalent detectors, trackers, vector retrieval methods, language models, rule executors, databases, or message transmission methods can be used to replace the specific components in the embodiments.
[0046] The modules referred to in this invention can be implemented by software instructions, dedicated hardware, programmable logic devices, or a combination of software and hardware; the modules can be deployed centrally or distributed through a communication network.
[0047] Equivalent substitutions, parameter adjustments, and sequence changes made by those skilled in the art within the spirit and principles of this invention should all fall within the protection scope of this invention.
Claims
1. A method for suppressing false alarms in visual inspection based on multi-source human feedback and spatial constraint memory, characterized in that, include: The system receives human feedback related to visual inspection, which includes at least one of the following: false alarm feedback for visual inspection events, independent human text feedback, and region feedback formed by selecting areas on real-time video frames. Based on the human feedback and the associated visual inspection events or video frames, it extracts at least a portion of camera identifiers, rule codes, visual categories, human descriptions, and normalized spatial bounding boxes to form a memory input to be optimized. It retrieves candidate memories that match the scope of the memory input to be optimized and provides the memory input to be optimized and candidate memories to a language model, allowing the language model to call at least one of existing memory query tools and regulatory rule query tools to output update targets, new instructions, or human supplementary instructions. When outputting update targets, it updates the corresponding candidate memories and saves the revision history; when outputting new instructions, it creates structured memories; when outputting human supplementary instructions, it generates a draft memory to be responded to containing at least one question, and after obtaining human responses, it re-determines the update targets, new instructions, or human supplementary instructions. In subsequent visual inspections, it loads global scope memories and memories matching the current camera, using the loaded memories as the judgment boundaries, priority inspection areas, or candidate query results of the visual model. After candidate events are generated by the visual model and rule engine, the camera identifier, rule encoding, visual category and candidate spatial box of the candidate events are deterministically matched with the enabled false alarm suppression memory. When the matching conditions are met, the candidate events are suppressed and the hit information of the corresponding memory is recorded.
2. The method according to claim 1, characterized in that, The memory input to be optimized for the false alarm feedback also includes the original visible evidence of the source event, the original detection box, the risk category, and the reason for the false alarm; the memory input to be optimized for the region feedback includes the current video frame size, the box selection coordinates, and the box selection description, and converts the box selection coordinates into a normalized spatial box that is independent of the image size.
3. The method according to claim 1, characterized in that, The language model can only select an update target from the provided candidate memories. When the language model does not select an update target, it calculates a candidate score based on the intersection of the rule set, the intersection of the visual category set, the intersection of keywords, and the text similarity of the old and new memories. The existing memory is updated only when the candidate score reaches the threshold; otherwise, a new memory is created.
4. The method according to claim 1, characterized in that, The manual supplementary instruction is generated when there is a lack of applicable cameras, rule affiliation, reporting boundaries, non-reporting boundaries or exception conditions in the manual feedback, or when there is a conflict with the candidate memory; the draft memory to be responded to saves the original input, question, manual reply, target memory identifier and optimization process information.
5. The method according to claim 1, characterized in that, The structured memory includes at least a portion of the following: memory type, scope of application, camera identifier, rule encoding, visual category, normalized spatial frame, judgment prompts for the visual model, human error, activation status, source, revision history, number of hits, and most recent hit time.
6. The method according to claim 1, characterized in that, In subsequent visual inspections, the structured memory formed by regional feedback is converted into priority check boxes in the current visual model coordinate system, and the structured memory formed by human text feedback is converted into judgment boundary prompts; the visual model can only retain candidates when there is visible evidence that satisfies the activity rules in the current video frame, and the structured memory itself does not constitute the basis for event generation.
7. The method according to claim 1, characterized in that, The deterministic matching includes: filtering false alarm suppression memories with a global scope or the same camera as the candidate event, the same or compatible rule encoding, and the same or compatible visual category; calculating the intersection-union ratio and / or center distance between the candidate spatial boxes and the memory spatial boxes; suppressing candidate events only when the intersection-union ratio reaches a threshold or the center distance is lower than a threshold, and saving the memory identifier, candidate box, suppression reason, and time.
8. A visual inspection false alarm suppression system, characterized in that, include: The feedback receiving module is used to receive at least one of false alarm feedback, human text feedback, and regional feedback. The feedback standardization module is used to generate a memory input to be optimized, which includes the scope of action, camera identification, rule encoding, visual category, and at least a portion of the normalized spatial bounding box. The memory candidate retrieval module provides a limited number of candidate memories based on memory type and scope; the memory optimization module outputs update targets, new instructions, or manual supplementation instructions, and maintains the revision history; the manual supplementation module creates draft memories to be responded to and re-executes memory optimization after receiving a manual response; and the inference period memory service module loads global memories and camera memories based on the current camera. And a deterministic spatial suppression module, which is used to suppress candidate events and record memory hits according to the scope of application, rule encoding, visual category and spatial matching relationship after the rule engine generates candidate events.
9. An electronic device comprising a processor and a memory, wherein the memory stores a computer program, characterized in that, When the computer program is executed by the processor, it implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by one or more processors, it implements the method according to any one of claims 1 to 7.