Method and system for enhancing robustness of visual intelligent detection based on state machine

By introducing a state machine into the object detection technology, expressing business logic and constraining the model prediction scope, the problem of poor robustness in the prior art is solved, and the accuracy and reliability of detection are significantly improved.

CN117173431BActive Publication Date: 2024-11-19TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310927491.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-26
Publication Date
2024-11-19
Estimated Expiration
2043-07-26

AI Technical Summary

Technical Problem

The existing target detection technology is poorly robust in actual applications, which can easily lead to misjudgment. The existing robustness enhancement method is based on data assumptions, and has limited scope of application, making it difficult to fully integrate with actual business information.

Method used

Adopt a robust enhancement method of visual intelligence detection based on state machine, by establishing a development interface, defining business state and state transition logic, building a state machine inference process and business logic analysis process, using state machine to express business logic, and constrain the machine learning model's Predict the range to reduce the impact of misjudgment.

Benefits of technology

It significantly enhances the robustness of the model, reduces misjudgment, can adjust the detection results according to actual business needs, and improves the accuracy and reliability of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117173431B_ABST
    Figure CN117173431B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for enhancing the robustness of visual intelligent detection based on a state machine, including: establishing a development interface, the development interface including a business state definition class and a business state conversion logic class; the development interface input parameters including the current state and the latest detection result, and feeding back the updated state through the development interface; constructing a business logic source file through the development interface, writing the business logic source file and the visual detection model configuration file, and constructing a state machine reasoning process and a business logic analysis process through a state initiator; performing visual detection tasks through the state machine reasoning process and the business logic analysis process and monitoring received messages, and finding new detection results to trigger a state transfer processing program and update the state. The present invention solves the problem that the existing target detection has poor robustness and is prone to misjudgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of target detection, and in particular to a method and system for enhancing the robustness of visual intelligent detection based on a state machine. Background Art

[0002] Object detection is a very important technology in deep learning. Since the introduction of R-CNN in 2014, object detection technology based on deep learning has developed rapidly and has been widely used in various scenarios such as transportation, medical treatment, national defense, construction, and security. Object detection technology is divided into two types in terms of implementation methods: one is a single stage and the other is a two-stage combination. The core idea of ​​the two-stage combination is to first predict the target box (proposal) in the first stage, regress the approximate position, size and probability of the foreground target of the target box through the neural network, and then regress the accurate position, size and specific category of the target box through another neural network in the second stage. The core of the single-stage implementation solution is to directly regress the size, position and category of the target in the input image through the neural network.

[0003] In practical applications, target detection is a basic supporting function. In order to meet the special needs of application scenarios, it is often used in combination with business rules. For example, when monitoring the operation of an excavator, the bucket, truck, etc. can be located and identified through the target detection model. Furthermore, by analyzing the state of the bucket and the position of the bucket and the excavator, it can be inferred whether the excavator is loading or unloading materials, thereby realizing supervision functions such as workload counting and abnormal work paths. However, there is uncertainty in the actual deployment of deep learning models, and misjudgment of target detection may lead to incorrect estimation of the entire business state recognition.

[0004] Existing robustness enhancement methods are usually based on some data assumptions, and improve robustness by adding samples that do not exist in the original training set. In practical applications, data varies widely and it is difficult to determine reasonable data assumptions in advance. The scope of application of existing technologies is relatively limited and cannot be fully combined with the business information of actual applications. Summary of the invention

[0005] The present invention provides a state machine-based visual intelligent detection robustness enhancement method and system, which are used to solve the problem that the existing target detection robustness is poor and easily leads to misjudgment.

[0006] The present invention provides a method for enhancing the robustness of visual intelligent detection based on a state machine, comprising:

[0007] Establishing a development interface, the development interface includes a business state definition class and a business state conversion logic class;

[0008] The development interface input parameters include the current status and the latest test results, and the updated status is fed back through the development interface;

[0009] The business logic source file is formed through the development interface, the business logic source file and the visual detection model configuration file are written, and the state machine reasoning process and the business logic analysis process are constructed through the state starter;

[0010] Through the state machine reasoning process and business logic analysis process, visual inspection tasks are performed and received messages are monitored. New inspection results are found to trigger the state transfer handler and update the status.

[0011] According to a state machine-based visual intelligent detection robustness enhancement method provided by the present invention, the development interface is established, and the development interface includes a business state definition class and a business state conversion logic class, specifically including:

[0012] The business state definition class is used to define the business state, reflecting several states in the state machine;

[0013] The business state transition logic class is used to define the processing process of the state transition event, and to determine the detection result of the visual model according to the possible transition events of the current state.

[0014] According to a state machine-based visual intelligent detection robustness enhancement method provided by the present invention, the development interface input parameters include the current state and the latest detection result, and the updated state is fed back through the development interface, specifically including:

[0015] Defining the processing process of the state transition event in the interface of the business state transition logic;

[0016] Based on the processing of the defined state transition event, parameters are input in the development interface, including the current state and the latest detection results, and the updated state is fed back.

[0017] According to a state machine-based visual intelligent detection robustness enhancement method provided by the present invention, a business logic source file is formed through the development interface, the business logic source file and the visual detection model configuration file are written, and a state machine reasoning process and a business logic analysis process are constructed through a state starter, which specifically includes:

[0018] In the construction phase, the construction of business logic source files is implemented through Java language;

[0019] The visual detection model is defined through the configuration file by calling the Python language;

[0020] Complete the writing of business logic source files and model configuration files, and build two processes, the state machine reasoning process and the business logic analysis process, through the preset state launcher.

[0021] According to a state machine-based visual intelligent detection robustness enhancement method provided by the present invention, the state machine reasoning process and the business logic analysis process are used to perform visual detection tasks and monitor received messages, and new detection results are found to trigger a state transfer processing program and update the state, including:

[0022] During the application running phase, the state machine reasoning process obtains real-time image information from the camera device and calls the model specified by the developer to complete the visual detection task;

[0023] After the detection is completed, the inference result information is pushed to the remote data service running in the background.

[0024] According to a state machine-based visual intelligent detection robustness enhancement method provided by the present invention, the state machine reasoning process and the business logic analysis process are used to perform visual detection tasks and monitor received messages, and new detection results are found to trigger a state transfer processing program and update the state, and the method also includes:

[0025] The business logic analysis process monitors the messages received by the remote data service and triggers the state transfer processing program when new detection results are found;

[0026] The state transfer handler generates a new state and updates the new state to the remote data service.

[0027] The present invention also provides a method for enhancing the robustness of visual intelligent detection based on a state machine, comprising:

[0028] An interface establishment module, used to establish a development interface, wherein the development interface includes a business state definition class and a business state conversion logic class;

[0029] A status feedback module, which is used for the input parameters of the development interface including the current status and the latest detection results, and feeds back the updated status through the development interface;

[0030] A construction module, used to construct a business logic source file through the development interface, write the business logic source file and the visual detection model configuration file, and build a state machine reasoning process and a business logic analysis process through a state starter;

[0031] The running module is used to perform visual inspection tasks through the state machine reasoning process and the business logic analysis process and monitor the received messages, and trigger the state transfer processing program and update the state when a new inspection result is found. The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the method for enhancing the robustness of visual intelligent detection based on the state machine as described above is implemented.

[0032] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for enhancing the robustness of visual intelligent detection based on a state machine as described in any one of the above is implemented.

[0033] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned state machine-based visual intelligent detection robustness enhancement methods.

[0034] The present invention provides a method and system for enhancing the robustness of visual intelligent detection based on a state machine. By mining the state changes of the business process from actual needs, a state machine of business logic is formed to constrain the prediction range of the machine learning model and reduce the impact of model misjudgment. The present invention is specifically aimed at the field of visual detection, changing the traditional application paradigm that completely relies on model output, using a state machine to express business logic, and in each state, constraining the detection results of the visual model according to possible state transition events. Some interference items are excluded in each prediction result, which can significantly enhance the robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0036] Figure 1 This is one of the flow charts of a method for enhancing robustness of visual intelligent detection based on a state machine provided by the present invention;

[0037] Figure 2 This is the second flow chart of a method for enhancing the robustness of visual intelligent detection based on a state machine provided by the present invention;

[0038] Figure 3 This is the third flow chart of a method for enhancing robustness of visual intelligent detection based on a state machine provided by the present invention;

[0039] Figure 4 This is a fourth flow chart of a method for enhancing robustness of visual intelligent detection based on a state machine provided by the present invention;

[0040] Figure 5 This is the fifth flow chart of a method for enhancing robustness of visual intelligent detection based on a state machine provided by the present invention;

[0041] Figure 6This is the sixth flow chart of a method for enhancing the robustness of visual intelligent detection based on a state machine provided by the present invention;

[0042] Figure 7 It is a module connection diagram of a state machine-based visual intelligent detection robustness enhancement system provided by the present invention;

[0043] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention.

[0044] Reference numerals:

[0045] 110: interface establishment module; 120: state feedback module; 130: construction module; 140: operation module;

[0046] 810: processor; 820: communication interface; 830: memory; 840: communication bus. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings 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.

[0048] In the present invention, a state machine is a directed graph consisting of a set of nodes and a set of corresponding transition functions. The state machine "runs" by responding to a series of events. Each event is within the control scope of a transition function belonging to the "current" node, where the scope of the function is a subset of the nodes. The function returns the "next" (perhaps the same) node.

[0049] Visual Intelligent Detection Model: A machine learning target detection model based on visual data.

[0050] Robustness: In open scenarios, machine learning object detection models are prone to misjudgment. In this invention, robustness specifically refers to the ability to tolerate misjudgments.

[0051] The state machine is divided into four concepts, including:

[0052] State. A state machine must contain at least two states. For example, in the example of the light bulb above, there are two states: the light bulb is on and the light bulb is off.

[0053] Event. An event is a trigger or command to perform an action. For a light bulb, "turning on the switch" is an event.

[0054] Action. The action is executed after the event occurs. For example, if the event is "turn on the switch", the action is "turn on the light". When programming, an Action generally corresponds to a function.

[0055] Transition, change. It means changing from one state to another. For example, "turning on the light" is a transition.

[0056] Combine the following Figure 1-Figure 6 A method for enhancing robustness of visual intelligent detection based on a state machine of the present invention is described, comprising:

[0057] S100, establishing a development interface, wherein the development interface includes a business state definition class and a business state conversion logic class;

[0058] S200, the development interface input parameters include the current state and the latest test results, and the updated state is fed back through the development interface;

[0059] S300, constructing a business logic source file through the development interface, compiling the business logic source file and the visual detection model configuration file, and constructing a state machine reasoning process and a business logic analysis process through a state initiator;

[0060] S400, perform visual inspection tasks and monitor received messages through the state machine reasoning process and business logic analysis process, and trigger the state transfer processing program and update the state when new inspection results are found.

[0061] In the present invention, the state changes of the business process are mined from actual needs to form a state machine of business logic, so as to constrain the prediction range of the machine learning model and reduce the impact of model misjudgment. The present invention is specifically aimed at the field of visual detection, changing the traditional application paradigm that completely relies on model output, using a state machine to express business logic, and in each state, constraining the detection results of the visual model according to possible state transition events. In this way, each prediction result excludes some interference items, which can significantly enhance the robustness of the model.

[0062] Establish a development interface, which includes a business state definition class and a business state conversion logic class, specifically including:

[0063] S101, the business state definition class is used to define the business state, reflecting several states in the state machine;

[0064] S102: The business state transition logic class is used to define the processing process of the state transition event, and to determine the detection result of the visual model according to the possible transition events of the current state.

[0065] The present invention defines a set of development interfaces, including two main classes: a business state definition class (CustomState) and a business state conversion logic class (StateTransformer). The CustomState business state definition class is used to define the business state, that is, a number of states in the state machine. The StateTransformer business state conversion logic class is used to define the processing process of the state transition event, that is, to judge the detection result of the visual model according to the possible transition events of the current state. By defining the business state definition class and the business state conversion logic class, the model construction can be assisted.

[0066] The development interface input parameters include the current status and the latest test results. The updated status is fed back through the development interface, including:

[0067] S201, defining a processing procedure of a state transition event in an interface of the business state transition logic;

[0068] S202: Input parameters in the development interface based on the processing process of the defined state transition event, including the current state and the latest detection result, and feedback the updated state.

[0069] In the present invention, the current state and the latest detection result are used as input parameters, and the updated state is fed back based on the interface.

[0070] The business logic source file is formed through the development interface, the business logic source file and the visual detection model configuration file are written, and the state machine reasoning process and the business logic analysis process are constructed through the state starter, which specifically includes:

[0071] S301, in the construction phase, the construction of the business logic source file is realized by using the Java language;

[0072] S302, implementing the visual detection model through the configuration file definition by calling the Python language;

[0073] S303: Complete the writing of business logic source files and model configuration files, and build two processes, the state machine reasoning process and the business logic analysis process, through a preset state initiator.

[0074] The visual inspection task is performed through the state machine reasoning process and the business logic analysis process, and the received messages are monitored. When a new inspection result is found, the state transfer processing program is triggered and the state is updated, including:

[0075] S401, during the application running stage, the state machine reasoning process obtains real-time image information from the camera device and calls the model specified by the developer to complete the visual detection task;

[0076] S402: After the detection is completed, the inference result information is pushed to the remote data service running in the background.

[0077] In the present invention, during the application running stage, the state machine reasoning process obtains real-time image information from the camera device and calls the model specified by the developer to complete the visual detection task; after each detection is completed, the reasoning result information is pushed to the remote data service Redis Server running in the background.

[0078] Perform visual inspection tasks and listen to received messages through the state machine reasoning process and business logic analysis process. When new inspection results are found, the state transfer handler is triggered and the state is updated. It also includes:

[0079] S501, the business logic analysis process monitors the messages received by the remote data service, and triggers the state transfer processing program when a new detection result is found;

[0080] S502: The state transfer processing program generates a new state and updates the new state to the remote data service.

[0081] In the present invention, the business logic analysis process monitors the messages received by the Redis Server, and triggers the state transfer processing program once a new detection result is found; the state transfer processing program generates a new state and updates the new state to the Redis Server.

[0082] When using the inference results of the visual detection model, we restrict it according to the latest state of the state machine to reduce the impact of misjudgment. For example, a business process involves 10 categories of detection models. According to the traditional way of using the model, the model may misjudge the image information as any of the other 9 categories, which has poor robustness. However, based on the restrictions of the state machine, only about 3 categories are possible in each state, and the expected optional categories are only 1 / 3 of the traditional method, which can avoid a considerable proportion of misjudgment.

[0083] In addition, the present invention uses the Linux system environment as the operating environment. In practical applications, it can also support other system operating environments such as Android and Windows, and it is necessary to change the state machine reasoning process to a version based on a specific system library. The Redis Server can also be replaced by other memory storage services. At the same time, the state reasoning process and business logic process are not limited to being implemented in Java or Python programming languages.

[0084] By providing a state machine-based visual intelligent detection robustness enhancement method, the state changes of the business process are mined from actual needs to form a state machine of business logic, thereby constraining the prediction range of the machine learning model and reducing the impact of model misjudgment. The present invention is specifically aimed at the field of visual detection, changing the traditional application paradigm that completely relies on model output, using a state machine to express business logic, and in each state, constraining the detection results of the visual model according to possible state transition events. Some interference items are excluded in each prediction result, which can significantly enhance the robustness of the model.

[0085] refer to Figure 7 The present invention also discloses a method for enhancing the robustness of visual intelligent detection based on a state machine, comprising:

[0086] An interface establishment module 110, used to establish a development interface, wherein the development interface includes a business state definition class and a business state conversion logic class;

[0087] A state feedback module 120, which is used for the development interface input parameters including the current state and the latest detection result, and feeds back the updated state through the development interface;

[0088] A construction module 130 is used to construct a business logic source file through the development interface, write the business logic source file and the visual detection model configuration file, and build a state machine reasoning process and a business logic analysis process through a state initiator;

[0089] The operation module 140 is used to perform visual inspection tasks and monitor received messages through the state machine reasoning process and the business logic analysis process, and trigger the state transfer processing program and update the state when new inspection results are found.

[0090] Among them, in the interface establishment module, the business state definition class is used to define the business state, reflecting several states in the state machine;

[0091] The business state transition logic class is used to define the processing process of the state transition event, and to determine the detection result of the visual model according to the possible transition events of the current state.

[0092] A state feedback module, which defines the processing process of the state transition event in the interface of the business state transition logic;

[0093] Based on the processing of the defined state transition event, parameters are input in the development interface, including the current state and the latest detection results, and the updated state is fed back.

[0094] Construction module: In the construction phase, the construction of business logic source files is realized through Java language;

[0095] The visual detection model is defined through the configuration file by calling the Python language;

[0096] Complete the writing of business logic source files and model configuration files, and build two processes, the state machine reasoning process and the business logic analysis process, through the preset state launcher.

[0097] Running module: During the application running phase, the state machine reasoning process obtains real-time image information from the camera device and calls the model specified by the developer to complete the visual detection task;

[0098] After the detection is completed, the inference result information is pushed to the remote data service running in the background.

[0099] The business logic analysis process monitors the messages received by the remote data service and triggers the state transfer processing program when new detection results are found;

[0100] The state transfer handler generates a new state and updates the new state to the remote data service.

[0101] Through the state machine-based visual intelligent detection robustness enhancement system provided, the state changes of the business process are mined from actual needs to form a state machine of business logic, thereby constraining the prediction range of the machine learning model and reducing the impact of model misjudgment. The present invention is specifically aimed at the field of visual detection, changing the traditional application paradigm that completely relies on model output, using a state machine to express business logic, and in each state, constraining the detection results of the visual model according to possible state transition events. Some interference items are excluded in each prediction result, which can significantly enhance the robustness of the model.

[0102] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute a state machine-based visual intelligent detection robustness enhancement method, the method comprising: establishing a development interface, the development interface comprising a business state definition class and a business state conversion logic class;

[0103] The development interface input parameters include the current status and the latest test results, and the updated status is fed back through the development interface;

[0104] The business logic source file is formed through the development interface, the business logic source file and the visual detection model configuration file are written, and the state machine reasoning process and the business logic analysis process are constructed through the state starter;

[0105] Through the state machine reasoning process and business logic analysis process, visual inspection tasks are performed and received messages are monitored. New inspection results are found to trigger the state transfer handler and update the status.

[0106] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0107] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute a state machine-based visual intelligent detection robustness enhancement method provided by the above methods, the method comprising: establishing a development interface, the development interface including a business state definition class and a business state conversion logic class;

[0108] The development interface input parameters include the current status and the latest test results, and the updated status is fed back through the development interface;

[0109] The business logic source file is formed through the development interface, the business logic source file and the visual detection model configuration file are written, and the state machine reasoning process and the business logic analysis process are constructed through the state starter;

[0110] Through the state machine reasoning process and business logic analysis process, visual inspection tasks are performed and received messages are monitored. New inspection results are found to trigger the state transfer handler and update the status.

[0111] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform a state machine-based visual intelligent detection robustness enhancement method provided by the above methods, the method comprising: establishing a development interface, the development interface comprising a business state definition class and a business state conversion logic class;

[0112] The development interface input parameters include the current status and the latest test results, and the updated status is fed back through the development interface;

[0113] The business logic source file is formed through the development interface, the business logic source file and the visual detection model configuration file are written, and the state machine reasoning process and the business logic analysis process are constructed through the state starter;

[0114] Through the state machine reasoning process and business logic analysis process, visual inspection tasks are performed and received messages are monitored. New inspection results are found to trigger the state transfer handler and update the status.

[0115] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0116] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for enhancing the robustness of visual intelligent detection based on a state machine, characterized in that: include: Establishing a development interface, the development interface includes a business state definition class and a business state conversion logic class; The development interface input parameters include the current status and the latest test results, and the updated status is fed back through the development interface; The business logic source file is formed through the development interface, the business logic source file and the visual detection model configuration file are written, and the state machine reasoning process and the business logic analysis process are constructed through the state starter; Perform visual inspection tasks and listen to received messages through the state machine reasoning process and business logic analysis process, and trigger the state transfer handler and update the state when new inspection results are found; The development interface includes a business state definition class and a business state conversion logic class, specifically including: The business state definition class is used to define the business state, reflecting several states in the state machine; The business state transition logic class is used to define the processing process of the state transition event, and constrain the detection result of the visual model according to the possible transition events of the current state; The business logic source file is formed through the development interface, the business logic source file and the visual detection model configuration file are written, and the state machine reasoning process and the business logic analysis process are constructed through the state starter, which specifically includes: In the construction phase, the construction of business logic source files is implemented through Java language; The visual detection model is defined through the configuration file by calling the Python language; Complete the writing of business logic source files and model configuration files, and build two processes, the state machine reasoning process and the business logic analysis process, through the preset state launcher; Through the state machine reasoning process and business logic analysis process, visual inspection tasks are performed and received messages are listened to. New inspection results are found to trigger the state transfer handler and update the state, including: During the application running phase, the state machine reasoning process obtains real-time image information from the camera device and calls the model specified by the developer to complete the visual detection task; After the detection is completed, the inference result information is pushed to the remote data service running in the background; The business logic analysis process monitors the messages received by the remote data service and triggers the state transfer processing program when new detection results are found; The state transfer handler generates a new state and updates the new state to the remote data service.

2. According to the state machine-based visual intelligent detection robustness enhancement method of claim 1, it is characterized in that: The development interface input parameters include the current status and the latest test results, and the updated status is fed back through the development interface, specifically including: Defining the processing process of the state transition event in the interface of the business state transition logic class; The processing process of the defined state transition event inputs parameters in the development interface, including the current state and the latest detection results, and feedbacks the updated state.

3. A state machine-based visual intelligent detection robustness enhancement system, characterized in that: include: An interface establishment module, used to establish a development interface, wherein the development interface includes a business state definition class and a business state conversion logic class; A status feedback module, which is used for the input parameters of the development interface including the current status and the latest detection results, and feeds back the updated status through the development interface; A construction module, used to construct a business logic source file through the development interface, write the business logic source file and the visual detection model configuration file, and build a state machine reasoning process and a business logic analysis process through a state starter; The running module is used to perform visual inspection tasks and listen to received messages through the state machine reasoning process and business logic analysis process, and trigger the state transfer handler and update the state when new inspection results are found; The development interface includes a business state definition class and a business state conversion logic class, specifically including: The business state definition class is used to define the business state, reflecting several states in the state machine; The business state transition logic class is used to define the processing process of the state transition event, and constrain the detection result of the visual model according to the possible transition events of the current state; The business logic source file is formed through the development interface, the business logic source file and the visual detection model configuration file are written, and the state machine reasoning process and the business logic analysis process are constructed through the state starter, which specifically includes: In the construction phase, the construction of business logic source files is implemented through Java language; The visual detection model is defined through the configuration file by calling the Python language; Complete the writing of business logic source files and model configuration files, and build two processes, the state machine reasoning process and the business logic analysis process, through the preset state launcher; Through the state machine reasoning process and business logic analysis process, visual inspection tasks are performed and received messages are listened to. New inspection results are found to trigger the state transfer handler and update the state, including: During the application running phase, the state machine reasoning process obtains real-time image information from the camera device and calls the model specified by the developer to complete the visual detection task; After the detection is completed, the inference result information is pushed to the remote data service running in the background; The business logic analysis process monitors the messages received by the remote data service and triggers the state transfer processing program when new detection results are found; The state transfer handler generates a new state and updates the new state to the remote data service.

4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the state machine-based visual intelligent detection robustness enhancement method as described in any one of claims 1 to 2 is implemented.

5. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the state machine-based visual intelligent detection robustness enhancement method as described in any one of claims 1 to 2 is implemented.

6. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the state machine-based visual intelligent detection robustness enhancement method as described in any one of claims 1 to 2 is implemented.