Machine vision task execution method and device, electronic equipment and medium
By combining the graphical interface and SDK interface to generate a machine vision solution, the problems of excessive resource usage and cumbersome logic in existing technologies are solved, and flexible and efficient machine vision task execution is achieved.
Patent Information
- Application Number
- CN202510614157.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-09-12
AI Technical Summary
In existing machine vision technology, users need to manually build complex execution logic through a graphical interface, which results in excessive resource consumption, cumbersomeness, and difficulty in exhaustive enumeration.
Generate machine vision solutions by combining graphical interfaces and SDK interfaces, build and execute machine vision tasks interactively or independently, and reduce the need for exhaustive pre-set processing logic.
It simplifies the process of building machine vision solutions, reduces resource usage, and improves the flexibility of dynamic adjustment of complex logic.
Smart Images

Figure CN120631482A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine vision technology, and in particular to a method, device, electronic device, and medium for executing machine vision tasks. Background Art
[0002] Machine vision technology can simulate human vision through computers, extracting information from objective data, processing it, and understanding it. It can be used for inspection, measurement, and control in actual production processes, such as defect detection and dimensional measurement.
[0003] Typically, multiple preset processing operations are required for the data to be processed. For example, the data to be processed is first subjected to image binarization, followed by a circle search, and then an ellipse search. In current related technologies, users need to manually build the execution logic between preset processing operations through a graphical interface. For more complex execution logic, for example, scenarios where a variety of preset processing operations are selected in several arrangements, users are required to exhaustively enumerate all possibilities and then use branches to implement them. However, in most cases, exhaustive enumeration is difficult, and even if it can be done, it will result in a very cumbersome machine vision solution and excessive resource consumption. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device, and medium for executing machine vision tasks to simplify the process of building a machine vision solution and reduce the resources occupied by the machine vision solution. The specific technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for executing a machine vision task, the method comprising:
[0006] Obtaining a machine vision solution, wherein the machine vision solution is generated based on a graphical interface and an SDK interface;
[0007] Based on the machine vision solution, a machine vision task is performed.
[0008] Optionally, the step of obtaining a machine vision solution includes:
[0009] Construct a first solution based on the graphical interface, construct a second solution based on the SDK interface, and use the first solution and the second solution as machine vision solutions; or
[0010] Build a machine vision solution through at least one interaction between the graphical interface and the SDK interface.
[0011] Optionally, the step of performing a machine vision task based on the machine vision solution includes:
[0012] In the absence of interaction between the graphical interface and the SDK interface, executing the first solution and the second solution according to the execution logic corresponding to the machine vision solution to perform the machine vision task; or
[0013] In the case where there is interaction between the graphical interface and the SDK interface mode, the machine vision solution is executed according to the execution logic corresponding to the machine vision solution to perform the machine vision task.
[0014] Optionally, the step of building a machine vision solution through at least one interaction between a graphical interface and an SDK interface includes:
[0015] In response to an execution logic determination operation issued by a user on a graphical interface for an interface component, determining the execution logic between preset processing operations corresponding to the interface component based on the execution logic reflected by the interface component, wherein each interface component indicates a visual tool entity, and each visual tool entity is used to execute a preset processing operation;
[0016] Constructing interface solution data according to the execution logic, wherein the interface solution data is used to reflect the execution logic between the visual tool entities;
[0017] Through at least one interaction between the graphical interface and the SDK interface, the interface solution data and the calling code are integrated to obtain a machine vision solution, wherein the calling code is used to represent the execution logic of the visual tool entity corresponding to other preset processing operations other than the interface solution data in the visual processing solution required to perform the machine vision task, and the execution logic represented by the calling code is constructed based on the SDK interface.
[0018] Optionally, the execution logic determination operation includes at least a component selection operation and a sequence determination operation;
[0019] Before the step of determining, based on the execution logic reflected by the interface component, the execution logic between the preset processing operations corresponding to the interface component, the method further includes:
[0020] In response to a component selection operation issued by a user for an interface component option included in a toolbar in a graphical interface, displaying an interface component indicated by the interface component option at a stop position of the component selection operation, wherein the visual tool entity indicated by the interface component is created based on the graphical interface and / or the visual tool entity indicated by the interface component is created based on an SDK interface;
[0021] In response to a sequence determination operation issued by the user, an interface component with execution logic is displayed, wherein the sequence determination operation is used to determine the execution logic between the interface components, and the sequence determination operation is issued for the interface components in the graphical interface, or the sequence determination operation is issued based on the SDK interface.
[0022] Optionally, the graphical interface includes at least a configuration control corresponding to the interface component;
[0023] The method further comprises:
[0024] Acquiring configuration data corresponding to the adjusted visual tool entity, wherein the configuration data is data used by a preset processing operation performed by the visual tool entity, and the configuration data is acquired based on a configuration control in the graphical interface and / or the configuration data is acquired based on an SDK interface;
[0025] Based on the configuration control in the graphical interface or the SDK interface, configuring the adjusted configuration data to the visual tool entity;
[0026] Based on the adjusted configuration data, the configuration data displayed by the configuration control corresponding to the visual tool entity is updated, so that the user can determine whether the adjusted configuration data meets the requirements of the preset processing operation.
[0027] Optionally, the step of obtaining configuration data corresponding to the adjusted visual tool entity includes:
[0028] Acquiring configuration data corresponding to the visual tool entity adjusted by the user based on the configuration control; and / or,
[0029] The configuration data included in the code of the visual tool entity adjusted by the user through the SDK interface is obtained.
[0030] Optionally, the method further includes:
[0031] In response to an add operation issued by the user, displaying the interface component indicated by the add operation, wherein the add operation is issued on the graphical interface for the interface component, or the add operation is issued based on an SDK interface;
[0032] and / or,
[0033] In response to a deletion operation issued by the user, the interface component indicated by the deletion operation is deleted from the graphical interface, wherein the deletion operation is issued on the interface component in the graphical interface, or the deletion operation is issued based on an SDK interface.
[0034] Optionally, the execution logic includes an execution order between preset processing operations corresponding to the interface components;
[0035] The step of determining the execution logic between the preset processing operations corresponding to the interface components based on the execution logic reflected by the interface components includes:
[0036] Based on the execution logic between the interface components, generating a topology map corresponding to the interface components;
[0037] According to the topology diagram, the execution order of the preset processing operations corresponding to the interface components is determined.
[0038] Optionally, the method further includes:
[0039] Creating a visual tool entity corresponding to the interface component indicated by the drag operation, and establishing a binding relationship between the interface component and the created visual tool entity; or,
[0040] A binding relationship between the interface component and an existing visual tool entity is established.
[0041] Optionally, the method for establishing the binding relationship includes:
[0042] Constructing universal virtual objects of visual tool entities;
[0043] Within the universal virtual object, an identifier of a visual tool entity corresponding to an interface component is bound, wherein the interface of the universal virtual object is used to call the visual tool entity to which the identifier belongs; and / or,
[0044] Binding the visual tool entity to the universal virtual object.
[0045] Optionally, the method for creating the visual tool entity includes:
[0046] According to the pre-established correspondence between the visual tool name and the plug-in library file, the target plug-in library file corresponding to the visual tool entity to be created is searched;
[0047] The target plug-in library file is loaded to call a preset creation interface, create the vision tool entity, and determine the identifier of the vision tool entity.
[0048] Optionally, the step of calling a preset creation interface to create the visual tool entity includes:
[0049] In response to a visual solution building instruction issued by the user on the graphical interface, calling a pre-set creation interface to create the visual tool entity; and / or,
[0050] The visual tool entity is created by calling a preset creation interface through the SDK interface.
[0051] Optionally, before the step of integrating the interface solution data with the calling code to obtain a machine vision solution, the method further includes:
[0052] Encapsulate each vision tool into a class, wherein the interface of the class matches the sub-function of the vision tool, and the interface of the class is used to call the vision tool entity corresponding to the vision tool;
[0053] The class is instantiated into a class object, and a binding relationship is established between the class object and the identifier of the visual tool entity, wherein the calling code is written according to the execution logic based on the class corresponding to the target visual tool entity and the class interface corresponding to other preset processing operations included in the visual processing solution required for the data to be processed.
[0054] Optionally, the step of executing the machine vision solution according to the execution logic corresponding to the machine vision solution to perform the machine vision task includes:
[0055] Determine the identifier of the vision tool entity to be called according to the interface solution data and the calling code, wherein each vision tool entity is used to perform a preset processing operation;
[0056] Based on the execution logic, the tool driver layer calls the visual tool entity corresponding to the determined identifier from the entity set, performs preset processing operations on the data to be processed, and obtains a processing result, wherein the entity set corresponding to the tool driver layer is composed of the visual tool entities.
[0057] Optionally, the tool driver layer, based on the execution logic, calls the visual tool entity corresponding to the determined identifier from the entity set, performs a preset processing operation on the data to be processed, and obtains a processing result, including:
[0058] The tool driver layer determines the identifier corresponding to the first visual tool entity based on the execution logic;
[0059] Calling the visual tool entity corresponding to the identifier, performing a preset processing operation on the data to be processed, and obtaining output data;
[0060] According to the execution logic, the identifier corresponding to the visual tool entity created based on the graphical interface and the identifier corresponding to the visual tool entity created based on the SDK interface are determined, and the visual tool entity corresponding to the determined identifier is called to perform preset processing operations on the output data to obtain a processing result.
[0061] Optionally, the entity set includes a first subset and a second subset, the first subset consists of visual tool entities created based on the graphical interface, and the second subset consists of visual tool entities created based on the SDK interface;
[0062] The method further comprises:
[0063] In response to the modification instruction, determining a target vision tool entity for executing the preset processing operation according to the preset processing operation indicated by the modification instruction and execution logic;
[0064] Transferring the target visual tool entity from an original subset to a target subset, wherein, when the target visual tool entity is created based on an SDK interface, the original subset is the second subset and the target subset is the first subset; and when the target visual tool entity is created based on a graphical interface, the original subset is the first subset and the target subset is the second subset;
[0065] According to the execution logic between the target visual tool entity and the interface solution data, the modified interface solution data is generated for the tool driver layer to call.
[0066] In a second aspect, an embodiment of the present application provides a device for executing a machine vision task, the device comprising:
[0067] A solution acquisition module is used to acquire a machine vision solution, wherein the machine vision solution is generated based on a graphical interface and an SDK interface;
[0068] The task execution module is used to execute the machine vision task based on the machine vision solution.
[0069] Optionally, the solution acquisition module includes:
[0070] The first solution construction submodule is used to construct the first solution according to the graphical interface, construct the second solution according to the SDK interface, and use the first solution and the second solution as machine vision solutions; or
[0071] The second solution construction submodule is used to build a machine vision solution through at least one interaction between the graphical interface and the SDK interface.
[0072] Optionally, the task execution module includes:
[0073] a first task execution submodule, configured to execute the first solution and the second solution according to the execution logic corresponding to the machine vision solution to perform the machine vision task when there is no interaction between the graphical interface and the SDK interface; or
[0074] The second task execution submodule is used to execute the machine vision solution according to the execution logic corresponding to the machine vision solution to perform the machine vision task when there is interaction between the graphical interface and the SDK interface.
[0075] Optionally, the second solution constructs a submodule including:
[0076] a logic determination unit, configured to respond to an execution logic determination operation issued by a user on a graphical interface for an interface component and, based on the execution logic reflected by the interface component, determine the execution logic between preset processing operations corresponding to the interface component, wherein each interface component indicates a visual tool entity, and each visual tool entity is used to execute a preset processing operation;
[0077] A data construction unit, configured to construct interface solution data according to the execution logic, wherein the interface solution data is used to reflect the execution logic between the visual tool entities;
[0078] A solution generation unit is used to integrate the interface solution data with the calling code through at least one interaction between the graphical interface and the SDK interface to obtain a machine vision solution, wherein the calling code is used to represent the execution logic of the visual tool entity corresponding to other preset processing operations other than the interface solution data in the visual processing solution required to perform the machine vision task, and the execution logic represented by the calling code is constructed based on the SDK interface.
[0079] Optionally, the execution logic determination operation includes at least a component selection operation and a sequence determination operation;
[0080] The device further comprises:
[0081] A first component display module is configured to, in response to a component selection operation issued by a user for an interface component option included in a toolbar in a graphical interface, display an interface component indicated by the interface component option at a stop position of the component selection operation, wherein the visual tool entity indicated by the interface component is created based on the graphical interface and / or the visual tool entity indicated by the interface component is created based on an SDK interface;
[0082] The second component display module is used to display an interface component with execution logic in response to a sequence determination operation issued by the user, wherein the sequence determination operation is used to determine the execution logic between the interface components, and the sequence determination operation is issued for the interface component in the graphical interface, or the sequence determination operation is issued based on the SDK interface.
[0083] Optionally, the graphical interface includes at least a configuration control corresponding to the interface component;
[0084] The device further comprises:
[0085] a data acquisition module, configured to acquire configuration data corresponding to the adjusted visual tool entity, wherein the configuration data is data used by a preset processing operation performed by the visual tool entity, and the configuration data is acquired based on a configuration control in the graphical interface and / or the configuration data is acquired based on an SDK interface;
[0086] A data configuration module, configured to configure the adjusted configuration data to the visual tool entity based on the configuration control in the graphical interface or the SDK interface;
[0087] The data updating module is used to update the configuration data displayed by the configuration control corresponding to the visual tool entity based on the adjusted configuration data, so that the user can determine whether the adjusted configuration data meets the requirements of the preset processing operation.
[0088] Optionally, the data acquisition module includes:
[0089] A first data acquisition submodule is configured to acquire configuration data corresponding to the visual tool entity adjusted by the user based on the configuration control; and / or,
[0090] The second data acquisition submodule is configured to acquire configuration data included in the code of the visual tool entity adjusted by the user through the SDK interface.
[0091] Optionally, the device further includes:
[0092] a component adding module, configured to, in response to an adding operation issued by the user, display the interface component indicated by the adding operation, wherein the adding operation is issued on the graphical interface for the interface component, or the adding operation is issued based on the SDK interface; and / or,
[0093] The component deletion module deletes the interface component indicated by the deletion operation from the graphical interface in response to the deletion operation issued by the user, wherein the deletion operation is issued for the interface component in the graphical interface, or the deletion operation is issued based on the SDK interface.
[0094] Optionally, the execution logic includes an execution order between preset processing operations corresponding to the interface components;
[0095] The logic determination unit includes:
[0096] A topology map generating subunit, configured to generate a topology map corresponding to the interface components based on the execution logic between the interface components;
[0097] The sequence determination subunit is used to determine the execution sequence between the preset processing operations corresponding to the interface components according to the topology diagram.
[0098] Optionally, the device further includes:
[0099] A first binding module is used to create a visual tool entity corresponding to the interface component indicated by the drag operation, and establish a binding relationship between the interface component and the created visual tool entity; or,
[0100] The second binding module is used to establish a binding relationship between the interface component and an existing visual tool entity.
[0101] Optionally, the device further includes:
[0102] Object construction module, used to construct universal virtual objects of visual tool entities;
[0103] a first identification binding module, configured to bind the identification of the visual tool entity corresponding to the interface component within the universal virtual object, wherein the interface of the universal virtual object is configured to call the visual tool entity to which the identification belongs; and / or
[0104] The second identification binding module is used to bind the visual tool entity with the universal virtual object.
[0105] Optionally, the device further includes:
[0106] A library file search module is used to search for a target plug-in library file corresponding to a visual tool entity to be created based on a pre-established correspondence between a visual tool name and a plug-in library file;
[0107] The entity creation module is used to load the target plug-in library file to call a preset creation interface to create the vision tool entity and determine the identifier of the vision tool entity.
[0108] Optionally, the entity creation module includes:
[0109] A first entity creation submodule is configured to call a preset creation interface to create the visual tool entity in response to a visual solution construction instruction issued by the user on the graphical interface; and / or
[0110] The second entity creation submodule is used to call a preset creation interface through the SDK interface to create the visual tool entity.
[0111] Optionally, the device further includes:
[0112] An encapsulation module, configured to encapsulate each vision tool into a class, wherein the interface of the class matches the sub-function of the vision tool, and the interface of the class is used to call the vision tool entity corresponding to the vision tool;
[0113] A binding relationship establishment module is used to instantiate the class into a class object and establish a binding relationship between the class object and the identifier of the visual tool entity, wherein the calling code is written according to the execution logic based on the class corresponding to the target visual tool entity and the interface of the class corresponding to other preset processing operations included in the visual processing solution required for the data to be processed.
[0114] Optionally, the second task execution submodule includes:
[0115] an identification determination unit, configured to determine an identification of a visual tool entity to be called according to the interface solution data and the calling code, wherein each visual tool entity is configured to perform a preset processing operation;
[0116] A result determination unit is used for the tool driving layer to call the visual tool entity corresponding to the determined identifier from the entity set based on the execution logic, perform preset processing operations on the processed data, and obtain a processing result, wherein the entity set corresponding to the tool driving layer is composed of the visual tool entities.
[0117] Optionally, the result determination submodule includes:
[0118] An identification determination unit, configured for the tool driver layer to determine an identification corresponding to the first visual tool entity based on the execution logic;
[0119] A data output unit, configured to call the visual tool entity corresponding to the identifier, perform a preset processing operation on the data to be processed, and obtain output data;
[0120] A result determination unit is used to determine the identifier corresponding to the visual tool entity created based on the graphical interface and the identifier corresponding to the visual tool entity created based on the SDK interface according to the execution logic, and call the visual tool entity corresponding to the determined identifier to perform preset processing operations on the output data to obtain a processing result.
[0121] Optionally, the entity set includes a first subset and a second subset, the first subset consists of visual tool entities created based on the graphical interface, and the second subset consists of visual tool entities created based on the SDK interface;
[0122] The device further comprises:
[0123] an entity determination module, configured to, in response to a modification instruction, determine a target visual tool entity for executing the preset processing operation according to the preset processing operation indicated by the modification instruction and an execution logic;
[0124] an entity transfer module, configured to transfer the target visual tool entity from an original subset to a target subset, wherein, when the target visual tool entity is created based on an SDK interface, the original subset is the second subset and the target subset is the first subset; and when the target visual tool entity is created based on a graphical interface, the original subset is the first subset and the target subset is the second subset;
[0125] The data modification module is used to generate modified interface solution data according to the execution logic between the target visual tool entity and the interface solution data, so as to be called by the tool driver layer.
[0126] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0127] Memory for storing computer programs;
[0128] The processor is configured to implement any of the methods described in the first aspect above when executing a program stored in the memory.
[0129] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements any of the methods described in the first aspect above.
[0130] Beneficial effects of the embodiments of the present application:
[0131] In the solution provided in the embodiment of the present application, the electronic device can obtain a machine vision solution, wherein the machine vision solution is generated based on a graphical interface and an SDK interface; and based on the machine vision solution, a machine vision task is executed. In the above solution, the method based on the graphical interface is difficult to support the dynamic adjustment of complex execution logic. For the method based on the SDK interface, the user needs to manually write the calling code, which requires a large amount of work. In the embodiment of the present application, the above two methods are combined together to generate a machine vision solution based on a graphical interface and an SDK interface. Since the calling code can be written through the SDK interface without exhaustively enumerating the execution logic between the preset processing operations, the construction process of the machine vision solution can be simplified and the resources occupied by the machine vision solution can be reduced. Of course, the implementation of any product or method of the present application does not necessarily require all the advantages described above to be achieved at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0132] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0133] Figure 1 A flowchart of a method for executing a machine vision task provided in an embodiment of the present application;
[0134] Figure 2 Based on Figure 1 A flow chart of a method for constructing a machine vision solution according to the embodiment shown;
[0135] Figure 3 Based on Figure 1 A schematic diagram of a graphical interface of the illustrated embodiment;
[0136] Figure 4 Based on Figure 1 A flow chart of the display method of the interface components of the illustrated embodiment;
[0137] Figure 5 Based on Figure 1 A flow chart of updating configuration controls according to the illustrated embodiment;
[0138] Figure 6(a) is based on Figure 1 A first schematic diagram of the configuration controls of the illustrated embodiment;
[0139] Figure 6(b) is based on Figure 1 A second schematic diagram of the configuration controls of the illustrated embodiment;
[0140] Figure 6(c) is based on Figure 1 A third schematic diagram of the configuration controls of the illustrated embodiment;
[0141] Figure 7 for Figure 2 A specific flow chart of step S201 in the embodiment shown;
[0142] Figure 8 Based on Figure 1 A flow chart of establishing a binding relationship according to the embodiment shown;
[0143] Figure 9 Based on Figure 1 A flow chart of creating a visual tool entity according to the embodiment shown;
[0144] Figure 10 Based on Figure 1 A flow chart of binding identification of the illustrated embodiment;
[0145] Figure 11 Based on Figure 1 A schematic structural diagram of a machine vision solution of the illustrated embodiment;
[0146] Figure 12 Based on Figure 1 A flow chart of executing a machine vision solution according to the embodiment shown;
[0147] Figure 13 for Figure 12 A specific flow chart of step S1202 in the embodiment shown;
[0148] Figure 14 Based on Figure 1 A flow chart of modifying interface solution data in the illustrated embodiment;
[0149] Figure 15 Based on Figure 1 A flow chart of the method for constructing the machine vision solution of the illustrated embodiment;
[0150] Figure 16 Based on Figure 1 A flow chart of the execution method of the machine vision solution of the illustrated embodiment;
[0151] Figure 17 A schematic diagram of the structure of a device for executing machine vision tasks provided in an embodiment of the present application;
[0152] Figure 18 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0153] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of this application.
[0154] To simplify the process of building a machine vision solution and reduce the resources occupied by the machine vision solution, the present invention provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for executing a machine vision task. The following first introduces a method for executing a machine vision task provided by the present invention.
[0155] The method for executing a machine vision task provided in the embodiments of the present application can be applied to any electronic device that needs to execute a machine vision task, for example, an image processor, a processing device, etc., without specific limitation herein. For the sake of clarity, it will be referred to as an electronic device in the following text.
[0156] like Figure 1 As shown, a method for executing a machine vision task, the method comprising:
[0157] S101, obtaining a machine vision solution;
[0158] Among them, the machine vision solution is generated based on the graphical interface and SDK interface.
[0159] S102: Execute a machine vision task based on the machine vision solution.
[0160] It can be seen that in the embodiment of the present application, the electronic device can obtain a machine vision solution, wherein the machine vision solution is generated based on a graphical interface and an SDK interface; and based on the machine vision solution, a machine vision task is executed. In the above-mentioned solution, the method based on the graphical interface is difficult to support the dynamic adjustment of complex execution logic. For the method based on the SDK interface, the user needs to manually write the calling code, which requires a large amount of work. In the embodiment of the present application, the above two methods are combined together to generate a machine vision solution based on a graphical interface and an SDK interface. Since the calling code can be written through the SDK interface without exhaustively enumerating the execution logic between the preset processing operations, the construction process of the machine vision solution can be simplified and the resources occupied by the machine vision solution can be reduced.
[0161] When a machine vision task needs to be performed, the electronic device can obtain a machine vision solution, i.e., execute step S101. The machine vision solution can be generated based on a graphical user interface (GUI) or an SDK interface. Specifically, during the process of generating the machine vision solution, the GUI and the SDK interface may or may not interact, as described in detail in subsequent embodiments.
[0162] After obtaining the machine vision solution, the electronic device may perform the machine vision task based on the machine vision solution, that is, execute step S102 .
[0163] It can be seen that the graphical interface-based approach is difficult to support the dynamic adjustment of complex execution logic. For the SDK interface-based approach, users need to manually write the calling code, which requires a large amount of work. In the embodiment of the present application, the above two approaches are combined together to generate a machine vision solution based on the graphical interface and the SDK interface. Since the SDK interface approach allows you to write the calling code without exhaustively enumerating the execution logic between the preset processing operations, it can simplify the process of building the machine vision solution and reduce the resources occupied by the machine vision solution.
[0164] As an implementation of an embodiment of the present application, the step of obtaining a machine vision solution may include:
[0165] Construct a first solution based on the graphical interface, construct a second solution based on the SDK interface, and use the first solution and the second solution as machine vision solutions; or
[0166] Build a machine vision solution through at least one interaction between the graphical interface and the SDK interface.
[0167] In the first implementation, the first solution can be constructed using a graphical interface, and the second solution can be constructed using an SDK interface. That is, during the construction of the first and second solutions, there is no interaction between the graphical interface and the SDK interface. The first and second solutions can then be used as machine vision solutions.
[0168] For example, a first solution can be built based on a graphical interface in one client, and a second solution can be built based on an SDK interface in another client. The first solution and the second solution in the two clients can then be used as machine vision solutions.
[0169] In the second implementation, a machine vision solution can be constructed through at least one interaction between a graphical interface and an SDK interface. Specifically, it can be divided into the following two cases:
[0170] In the first case, there is an interaction between the graphical interface and the SDK interface. In this case, when building a machine vision solution, you can first use one method and then the other, that is, first use the graphical interface and then the SDK interface, or first use the SDK interface and then the graphical interface.
[0171] In the second case, there are multiple interactions between the graphical interface and the SDK interface. In this case, you can build a machine vision solution by interweaving the two methods. For example, when building a machine vision solution, you can first use the graphical interface, then the SDK interface, and then the graphical interface again. Another example is that you can first use the SDK interface, then the graphical interface, then the SDK interface, and then the graphical interface again.
[0172] As can be seen, in the embodiments of the present application, a first solution can be constructed using the graphical interface, a second solution can be constructed using the SDK interface, and the first and second solutions can be used as machine vision solutions; or, a machine vision solution can be constructed through at least one interaction between the graphical interface and the SDK interface. In this way, machine vision solutions can be constructed in multiple ways, with high flexibility.
[0173] As an implementation of an embodiment of the present application, the steps of performing a machine vision task based on the machine vision solution may include:
[0174] In the absence of interaction between the graphical interface and the SDK interface, executing the first solution and the second solution according to the execution logic corresponding to the machine vision solution to perform the machine vision task; or
[0175] In the case where there is interaction between the graphical interface and the SDK interface mode, the machine vision solution is executed according to the execution logic corresponding to the machine vision solution to perform the machine vision task.
[0176] In the first embodiment, during the construction of a machine vision solution, if there is no interaction between the graphical interface and the SDK interface, when executing a machine vision task, the first solution and the second solution can be executed according to the execution logic corresponding to the machine vision solution to perform the machine vision task. In this case, although the graphical interface and the SDK interface are independent of each other during the construction process, when executing the machine vision task, the first solution and the second solution can be nested and interspersed, and data can be transferred between the first solution and the second solution.
[0177] In the second embodiment, in the process of building a machine vision solution, when there is interaction between the graphical interface and the SDK interface method, when executing a machine vision task, the machine vision solution can be executed according to the execution logic corresponding to the machine vision solution to perform the machine vision task.
[0178] It can be seen that in the embodiments of the present application, when there is no interaction between the graphical interface and the SDK interface, the first and second solutions can be executed according to the execution logic corresponding to the machine vision solution to perform the machine vision task; or when there is interaction between the graphical interface and the SDK interface, the machine vision solution can be executed according to the execution logic corresponding to the machine vision solution to perform the machine vision task. In this way, the machine vision task can be performed by executing the machine vision solution.
[0179] As an implementation method of the present application, Figure 2 As shown, the steps of building a machine vision solution through at least one interaction between the graphical interface and the SDK interface may include:
[0180] S201, in response to an execution logic determination operation issued by a user on a graphical interface for an interface component, determining the execution logic between preset processing operations corresponding to the interface component based on the execution logic reflected by the interface component;
[0181] Among them, each interface component indicates a visual tool entity, each visual tool entity is used to perform preset processing operations, the visual tool entity is created based on the graphical interface, and / or, the visual tool entity is created based on the SDK (Software Development Kit) interface.
[0182] In a machine vision solution, a visual tool entity can be called to perform a preset processing operation on the data to be processed. The data to be processed can specifically be images, point clouds, depth, etc., and the device that performs the preset processing operation can be a visual processing card, smart camera, etc. Each visual tool entity can be used to perform a preset processing operation. The visual tool entity can be created based on a graphical interface and / or, the visual tool entity can be created based on an SDK interface. Specifically:
[0183] In a first embodiment, a visual tool entity can be created based on a graphical interface. The graphical interface is a visual operation interface. When building a machine vision solution, a user can issue an execution logic determination operation against an interface component in the graphical interface to build a visual processing solution. Each interface component can indicate a visual tool entity. For example, if the interface component is a rectangular box with "Image Binarization" displayed inside, then the interface component indicates a visual tool entity for performing image binarization.
[0184] In a second embodiment, the visual tool entity can be created based on the SDK interface. In this case, a calling code for calling the visual tool entity can be written without using a graphical interface.
[0185] In a third embodiment, the visual tool entity can be created based on a graphical interface and an SDK interface, that is, the above two embodiments are adopted at the same time, and these two embodiments will not be described in detail here.
[0186] In step S201, in response to an execution logic determination operation issued by a user on a graphical interface for an interface component, the electronic device may determine the execution logic between preset processing operations corresponding to the interface component based on the execution logic reflected by the interface component.
[0187] In one embodiment, in response to the execution logic determination operation, the electronic device can display an interface component with the execution logic in a graphical interface. For example, a schematic diagram of the graphical interface can be as follows: Figure 3 As shown, the data to be processed is connected to multiple interface components, indicating that according to the execution logic, the preset processing operations corresponding to the multiple interface components are executed on the data to be processed. Figure 3 In the , the interface components correspond to the following preset processing operations: connected region analysis, image binarization, circle search, judgment, ellipse search, and line search.
[0188] Because the interface components described above have execution logic, and each interface component corresponds to a preset processing operation, the electronic device can determine the execution logic between the preset processing operations corresponding to the interface components based on the execution logic reflected by the interface components. The preset processing operations can specifically be visual processing operations or other data processing operations.
[0189] Continue as Figure 3 As shown, according to the execution logic between the interface components, the execution logic between the preset processing operations can be determined as follows: first, the connected area analysis and image binarization are performed on the data to be processed, and then a circle search is performed on the data to be processed. Next, a judgment is made, and based on the judgment result, an ellipse search or a straight line search is performed on the data to be processed.
[0190] The execution logic may be created based on either a graphical interface or an SDK interface, and may specifically include at least one of the execution order between preset processing operations, data transfer relationships, and configured data.
[0191] S202, constructing interface solution data according to the execution logic;
[0192] After obtaining the execution logic between the preset processing operations, the electronic device can construct interface solution data according to the execution logic, that is, execute step S202. The interface solution data can reflect the execution logic between the visual tool entities used to perform the preset processing operations, that is, the calling logic between the various visual tool entities during visual data processing. Specifically, the interface solution data has a certain format specification and can be saved as a file.
[0193] When building a machine vision solution, the above-mentioned graphical interface-based method and SDK interface-based method can be executed separately or in combination. Through coordinated execution, a new machine vision solution can be formed to solve the shortcomings of the current related technologies. In the case of coordinated execution, the graphical interface-based method and the SDK interface-based method can use each other's functions, and data can also be exchanged. There are two specific coordination methods: In the first coordination method, the visual tool entity created based on the graphical interface and the visual tool entity created based on the SDK interface method can be executed separately or interpolated, and their respective data can be exchanged. In this method, the interface solution data does not change. In the second coordination method, the SDK interface can be used to modify the interface solution data, for example, to add a module to the interface solution data, adjust the execution logic between interface components, and so on.
[0194] S203 , integrating the interface solution data with the calling code through at least one interaction between the graphical interface and the SDK interface to obtain a machine vision solution.
[0195] In step S203, the electronic device may integrate the interface solution data with the call code through at least one interaction between the graphical interface and the SDK interface to obtain a machine vision solution. The call code may be used to represent the execution logic of the visual tool entity corresponding to other preset processing operations in addition to the interface solution data in the visual processing solution required to perform the machine vision task. The execution logic represented by the call code may be constructed based on the SDK interface.
[0196] For example, the calling code can be used to implement judgment logic, loop logic, etc., and can also be used to call the visual tool entity corresponding to a preset processing operation, thereby adding, reducing or modifying the preset processing operation based on the interface solution data.
[0197] For example, the execution logic reflected by the interface solution data is: first call the visual tool entity corresponding to the binarization, then call the visual tool entity corresponding to the circle search. Assuming that, based on the above interface solution data, a line search is also required, the calling code for calling the visual tool entity corresponding to the line search can be obtained. Next, the calling code can be integrated with the interface solution data to obtain the machine vision solution. The execution logic reflected by the machine vision solution is: first call the visual tool entity corresponding to the binarization, then call the visual tool entity corresponding to the circle search, and then call the visual tool entity corresponding to the line search.
[0198] It can be seen that in the embodiment of the present application, in the above scheme, for the method of creating visual tool entities based on the graphical interface, the user can issue an execution logic determination operation to the interface component, thereby building the execution logic between the visual tool entities. The construction process of the execution logic is relatively simple, but it is difficult to support the dynamic adjustment of complex execution logic. For example, if a graphical interface is used to select several arrangement scenarios from a variety of visual tool entities used for preprocessing, it is necessary to exhaustively enumerate all possible branches and then reconstruct them, which is time-consuming and difficult to exhaustively enumerate in most cases. Even if it can be exhaustively enumerated, it will cause the solution to be very cumbersome, occupy too many resources, and be very difficult to maintain and modify later. For the method of creating visual tool entities based on the SDK interface, the user needs to manually write the calling code, which requires a large amount of work. In the embodiment of the present application, the above two methods are combined together, and the execution logic between the visual tool entities and each preset processing operation can be created based on the graphical interface and the SDK interface. Since the SDK interface method allows writing calling code without exhaustively enumerating the execution logic between the preset processing operations, the construction process of the machine vision solution can be simplified and the resources occupied by the machine vision solution can be reduced.
[0199] As an implementation of an embodiment of the present application, the above-mentioned execution logic determination operation may at least include a component selection operation and a sequence determination operation. In this case, Figure 4 As shown, before the step of determining the execution logic between the preset processing operations corresponding to the interface components based on the execution logic reflected by the interface components, the method may further include:
[0200] S401, in response to a component selection operation issued by a user for an interface component option included in a toolbar in a graphical interface, displaying the interface component indicated by the interface component option at a stop position of the component selection operation; in response to an order determination operation issued by the user, executing step S402;
[0201] In the process of creating a visual tool entity based on a graphical interface, the user can issue a component selection operation for the interface component options included in the toolbar in the graphical interface. Specifically, the user can issue a component selection operation by dragging and dropping, connect multiple interface components in series, in parallel, etc., and can also issue a component selection operation by clicking the mouse, which is all reasonable. Among them, each interface component option indicates the interface component corresponding to the preset processing operation. The visual tool entity indicated by the above interface component can be created based on the graphical interface, and / or, the visual tool entity indicated by the above interface component can be created based on the SDK interface.
[0202] In response to the above-mentioned component selection operation, the electronic device may display the interface component indicated by the interface component option at the stop position of the component selection operation. For example, assuming that the toolbar in the graphical interface includes an interface component option corresponding to image binarization, the user drags the interface component option to the center of the interface, then the electronic device may display the interface component corresponding to image binarization in the center of the interface.
[0203] S402: Displaying an interface component with execution logic.
[0204] The above-mentioned order determination operation can be issued for interface components in the graphical interface or based on the SDK interface. When the order determination operation is issued for the interface components, the order determination operation can specifically be a connection operation, that is, connecting the interface components, or a sorting operation, that is, arranging the interface components. When the user issues the order determination operation, the electronic device can display the interface component with the execution logic.
[0205] In the case where the sequence operation is determined to be a connection operation, since the user connects from one interface component to another interface component when issuing the connection operation, that is, the connection operation has a direction, therefore, in response to the connection operation issued by the user on the displayed interface component, the electronic device can determine the direction of the connection operation.
[0206] For example, assuming that the graphical interface includes binarization and circle search corresponding interface components, the connection operation issued by the user is: from the interface component corresponding to the binarization to the interface component corresponding to the circle search, then the electronic device can determine the direction of the connection operation as from the interface component corresponding to the binarization to the interface component corresponding to the circle search.
[0207] After determining the direction of the connection operation, the electronic device may display the connection lines between the interface components indicated by the connection operation according to the determined direction to reflect the execution logic between the interface components.
[0208] Continuing with the previous example, the electronic device can display a connection line between the interface component corresponding to the binary value and the interface component corresponding to the circle search, where the arrow direction of the connection line is from the interface component corresponding to the binary value to the interface component corresponding to the circle search.
[0209] In addition, users can also issue various interface operations such as subscription, copy, paste, etc. in the graphical interface according to actual needs, and no specific restrictions are made here.
[0210] It can be seen that in an embodiment of the present application, in response to a component selection operation issued by a user for an interface component option included in a toolbar in a graphical interface, the electronic device can display the interface component indicated by the interface component option at the stop position of the component selection operation, wherein the visual tool entity indicated by the interface component is created based on the graphical interface, and / or, the visual tool entity indicated by the interface component is created based on the SDK interface; in response to a sequence determination operation issued by the user, the electronic device can display an interface component with execution logic, wherein the sequence determination operation is used to determine the execution logic between interface components, and the sequence determination operation is issued for the interface component in the graphical interface, or, the sequence determination operation is issued based on the SDK interface. In this way, the user can intuitively determine the execution logic between interface components through the graphical interface.
[0211] As an implementation method of the embodiment of the present application, the above-mentioned graphical interface may include at least configuration controls corresponding to the interface components. In this case, Figure 5 As shown, the above method may further include:
[0212] S501, obtaining configuration data corresponding to the adjusted visual tool entity;
[0213] To facilitate users in viewing the parameters corresponding to visual tool entities in a graphical interface, the various properties and functions of visual tool entities can be visualized as corresponding configuration controls and displayed in the graphical interface. Configuration controls can include rendering controls, modeling controls, and so on. Furthermore, electronic devices can abstract similar functions of various visual tool entities into common controls based on their business needs.
[0214] For example, the schematic diagram of the configuration control can be shown in Figure 6(a) and Figure 6(b). Figure 6(a) and Figure 6(b) are both configuration controls corresponding to image binarization. The top of the configuration control displays multiple interface options: basic parameters, operating parameters, and result display. The bottom of the configuration control also displays multiple buttons: continuous execution, execution, and confirmation.
[0215] When the basic parameters are selected, the interface shown in Figure 6(a) will be displayed. Figure 6(a) specifically includes: image input and parameter setting areas corresponding to the region of interest. In the parameter setting area corresponding to the image input, you can set the input source. The current input source is "0 Image Source 1. Image". In the parameter setting area corresponding to the region of interest, you can set whether to output a mask, whether the region of interest type is a graphic type or an image type, and set the mask image. The current parameter settings are mask output, image type, and mask image 2 Connected Region Analysis 1. Connected Region Image Data.
[0216] When you select the operating parameters, the interface shown in Figure 6(b) will be displayed. Figure 6(b) specifically includes the operating parameter settings area. In this area, you can set the color for processing outside the ROI, the binarization type, the low threshold, and the high threshold. The current parameter settings are: the color for processing outside the ROI is black, the binarization type is hard threshold binarization, and the low and high thresholds are 100 and 255, respectively.
[0217] When parameters corresponding to the visual tool entity are adjusted, the electronic device can obtain configuration data corresponding to the adjusted visual tool entity. The configuration data can be data used for a preset processing operation performed by the visual tool entity, specifically inputs, outputs, parameters, models, etc. For example, the parameters can be a low threshold, a high threshold, etc. used for image binarization.
[0218] The above configuration data can be obtained based on the configuration control in the graphical interface, can also be obtained based on the SDK interface, or can also be obtained based on the configuration control in the graphical interface and the SDK interface, which is all reasonable.
[0219] S502, configuring the adjusted configuration data to the visual tool entity based on the configuration control in the graphical interface or the SDK interface;
[0220] After obtaining the adjusted configuration data, the adjusted configuration data can be configured to the visual tool entity based on the configuration control in the graphical interface or based on the SDK interface.
[0221] S503 , based on the adjusted configuration data, updating the configuration data displayed by the configuration control corresponding to the visual tool entity, so that the user can determine whether the adjusted configuration data meets the requirements of the preset processing operation.
[0222] After obtaining the configuration data corresponding to the adjusted visual tool entity, in order to facilitate the user to determine whether the adjusted configuration data meets the requirements of the preset processing operation, the electronic device can update the configuration data displayed by the configuration control corresponding to the visual tool entity.
[0223] For example, assuming that the low threshold used for image binarization is adjusted from 100 to 120, the configuration control shown in Figure 6(b) will become Figure 6(c), where the low threshold is 120 and the rest are the same as Figure 6(b).
[0224] It can be seen that in the embodiment of the present application, the electronic device can obtain the configuration data corresponding to the adjusted visual tool entity, wherein the configuration data is data used by the preset processing operation performed by the visual tool entity, and the configuration data is obtained based on the configuration control in the graphical interface and / or the configuration data is obtained based on the SDK interface; based on the configuration control in the graphical interface or the SDK interface, the adjusted configuration data is configured to the visual tool entity; based on the adjusted configuration data, the configuration data displayed by the configuration control corresponding to the visual tool entity is updated to allow the user to determine whether the adjusted configuration data meets the requirements of the preset processing operation. In this way, the user can easily determine the adjustment of the configuration data.
[0225] As an implementation of an embodiment of the present application, the step of obtaining the configuration data corresponding to the adjusted visual tool entity may include:
[0226] Acquire configuration data corresponding to the visual tool entity adjusted by the user based on the configuration control; and / or acquire configuration data included in the code of the visual tool entity adjusted by the user through the SDK interface.
[0227] In a first embodiment, the electronic device can obtain configuration data corresponding to a visual tool entity that is adjusted by a user based on a configuration control. When the user wishes to adjust the configuration data corresponding to the visual tool entity, the user can adjust the configuration data corresponding to the visual tool entity based on the configuration control. In this case, the electronic device can adjust the data included in the code of the background visual tool entity according to the adjusted configuration data, thereby achieving bidirectional synchronization between the background code and the foreground display.
[0228] In a second embodiment, the electronic device can obtain the configuration data included in the code of the visual tool entity that the user adjusts through the SDK interface. When the user wants to adjust the configuration data corresponding to the visual tool entity, he or she can also call the properties and interfaces of the encapsulated class object to modify the data included in the code of the visual tool entity through the SDK interface.
[0229] In the third embodiment, the electronic device can obtain the parameters corresponding to the visual tool entity adjusted by the user based on the configuration control and the parameters included in the code of the visual tool entity adjusted by the user, that is, execute the above two embodiments, which will not be described in detail here.
[0230] In the above-mentioned first and third embodiments, there is a foreground. After obtaining the adjusted configuration data, the configuration data displayed on the foreground can be refreshed, that is, the configuration data displayed by the configuration control corresponding to the visual tool entity is updated according to the adjusted configuration data, thereby realizing two-way synchronization between the background code and the foreground display.
[0231] In the above three implementations, the configuration controls and encapsulation classes need to parse and follow the standard format when reading and writing parameters.
[0232] It can be seen that in the embodiments of the present application, the electronic device can obtain the configuration data corresponding to the visual tool entity adjusted by the user based on the configuration control; and / or obtain the configuration data included in the code of the visual tool entity adjusted by the user through the SDK interface. When the user wants to adjust the configuration data corresponding to the visual tool entity, the adjustment can be made based on the configuration control, or the properties and interfaces of the encapsulated class object can be called to modify the data included in the code of the visual tool entity through the SDK interface, or the above two methods can be used simultaneously. In this way, the user has a high degree of freedom when adjusting the configuration data corresponding to the visual tool entity.
[0233] As an implementation of the embodiment of the present application, the above method may further include:
[0234] In response to an add operation issued by the user, the interface component indicated by the add operation is displayed; and / or, in response to a delete operation issued by the user, the interface component indicated by the delete operation is deleted from the graphical interface.
[0235] In a first embodiment, in response to an adding operation initiated by a user, the electronic device may display an interface component indicated by the adding operation.
[0236] When a user wants to add an interface component to a graphical interface, they can issue an add operation. The add operation can be issued for an interface component in the graphical interface or based on an SDK interface. For example, the add operation can specifically trigger an add button in the graphical interface. In response to the add operation, the electronic device can display the interface component indicated by the add operation. For example, after the user triggers the add button, the electronic device can display the newly added interface component at a preset position in the graphical interface.
[0237] In a second embodiment, in response to a deletion operation initiated by the user, the electronic device may delete the interface component indicated by the deletion operation from the graphical interface.
[0238] When a user wants to delete an interface component in the graphical interface, they can issue a delete operation. This delete operation can be issued for the interface component in the graphical interface or based on an SDK interface. For example, the delete operation can trigger a delete button displayed near the interface component, or drag the interface component to a pre-set deletion area. In response to the delete operation, the electronic device can delete the interface component indicated by the delete operation from the graphical interface.
[0239] In the third implementation, the user may issue an add operation and a delete operation, and accordingly, the electronic device may execute the above two implementations, which will not be described in detail here.
[0240] It can be seen that in the embodiment of the present application, in response to an add operation issued by a user, the electronic device can display the interface component indicated by the add operation, wherein the add operation is issued for the interface component in the graphical interface, or the add operation is issued based on the SDK interface; and / or, in response to a delete operation issued by the user, the electronic device can delete the interface component indicated by the delete operation from the graphical interface, wherein the delete operation is issued for the interface component in the graphical interface, or the delete operation is issued based on the SDK interface. In this way, the user can add and delete interface components in the graphical interface according to the visual processing solution required for the data to be processed, and flexibly edit the interface components.
[0241] As an implementation method of the embodiment of the present application, the above execution logic may include the execution order between the preset processing operations corresponding to the interface components. In this case, Figure 7 As shown, the above step of determining the execution logic between the preset processing operations corresponding to the interface component based on the execution logic reflected by the interface component may include:
[0242] S701, generating a topology map corresponding to the interface components based on the execution logic between the interface components;
[0243] Since the topology diagram can represent the connection logic between each element, when it is necessary to determine the execution logic between the preset processing operations corresponding to the interface components, the electronic device can generate a topology diagram corresponding to the interface components based on the execution logic between the interface components.
[0244] S702: Determine, according to the topology diagram, the execution order of the preset processing operations corresponding to the interface components.
[0245] Because each interface component corresponds to a preset processing operation, and the topology map can reflect the connection logic between the interface components, the electronic device can determine the execution order of the preset processing operations corresponding to the interface components based on the topology map. For example, the execution order can be serial, parallel, branching, looping, etc.
[0246] As can be seen, in the embodiments of the present application, the electronic device can generate a topology map corresponding to the interface components based on the execution logic between the interface components; and determine the execution order of the preset processing operations corresponding to the interface components based on the topology map. In this way, the execution order of the preset processing operations can be determined quickly and accurately.
[0247] As an implementation of the embodiment of the present application, the above method also includes one of the following two implementations:
[0248] Create a visual tool entity corresponding to the interface component indicated by the drag operation, and establish a binding relationship between the interface component and the created visual tool entity; or establish a binding relationship between the interface component and an existing visual tool entity.
[0249] In a first embodiment, in response to a drag operation, the electronic device may create a visual tool entity corresponding to the interface component indicated by the drag operation, and establish a binding relationship between the interface component and the created visual tool entity, so that the visual tool entity can be called when a machine vision solution is subsequently executed. Specifically, when establishing the binding relationship, the electronic device may establish a binding relationship between the interface component and the unique identifier corresponding to the created visual tool entity.
[0250] In a second embodiment, the electronic device may establish a binding relationship between the interface component and an existing visual tool entity. In other words, the interface component is bound to the existing visual tool entity. The existing visual tool entity may be created based on a graphical interface or an SDK interface, which is not specifically limited here.
[0251] In one case, when editing or reusing interface design data, the graphical interface has not yet been created. Loading the interface design data or using the SDK interface will first create the visual tool entity in the background. Then, after the graphical interface is created, the electronic device can bind the interface components to the pre-created visual tool entity.
[0252] It can be seen that in the embodiment of the present application, the electronic device can create a visual tool entity corresponding to the interface component indicated by the drag operation, and establish a binding relationship between the interface component and the created visual tool entity; or, the electronic device can establish a binding relationship between the interface component and an existing visual tool entity. In this way, the electronic device can create a visual tool entity and bind the interface component to the created visual tool entity, or it can bind the interface component to an existing visual tool entity. In this way, a binding relationship can be established between the interface component displayed on the front end and the visual tool entity in the background, so that the data of the visual tool entity can be configured through the interface component.
[0253] As an implementation method of the present application, Figure 8 As shown, the above binding relationship may be established in the following ways:
[0254] S801, constructing a universal virtual object of a visual tool entity;
[0255] The machine vision solution construction method can also include a tool driver layer, which is responsible for data exchange between various components and the scheduling and execution of each visual tool entity. Directly calling the tool driver layer interface when operating a visual tool entity would result in cumbersome coding. Therefore, electronic devices can construct universal virtual objects of visual tool entities. These universal virtual objects include universal data management and execution control functions.
[0256] S802 , binding an identifier of a visual tool entity corresponding to an interface component within the universal virtual object; and / or binding the visual tool entity to the universal virtual object.
[0257] In the first embodiment, the electronic device can bind the identifier of the visual tool entity corresponding to the interface component inside the universal virtual object. The interface of the universal virtual object is used to call the visual tool entity to which the above identifier belongs. When the subsequent data management, execution control and other interfaces are called, the above identifier and data can be passed to the functional interface of the tool driver layer. In the second embodiment, the electronic device can bind the visual tool entity with the universal virtual object. Specifically, the identifier of the visual tool entity can be bound inside the universal virtual object. In the third embodiment, the electronic device can adopt the above two embodiments to establish a binding relationship between the interface component and the visual tool entity, and these two embodiments will not be repeated here. In addition, the universal virtual object can also be bound to the interface component, which is all reasonable. Specifically, the identifier of the interface component can be bound inside the universal virtual object.
[0258] After binding the interface components to the visual tool entity, each configuration control can be triggered in the foreground, and then assemble data that conforms to the standard format in the background response and configure it to the visual tool entity.
[0259] As can be seen, in the embodiments of the present application, the electronic device can construct a universal virtual object for a visual tool entity; within the universal virtual object, bind the identifier of the visual tool entity corresponding to the interface component, wherein the interface of the universal virtual object is used to call the visual tool entity to which the identifier belongs; and / or bind the visual tool entity to the universal virtual object. In this way, establishing a binding relationship based on the universal virtual object can simplify the operations required for binding.
[0260] As an implementation method of the present application, Figure 9 As shown, the creation method of the above-mentioned visual tool entity may include:
[0261] S901, searching for a target plug-in library file corresponding to a vision tool entity to be created according to a pre-established correspondence between a vision tool name and a plug-in library file;
[0262] Visual tools can develop their own entity classes based on their business needs, inheriting from an interface base class. This development approach may include, but is not limited to, a plug-in approach. In this case, each visual tool can pre-generate a corresponding plug-in library file, indexed by the visual tool entity name, and implement a plug-in management interface. When a visual tool entity needs to be created, the electronic device can search for the target plug-in library file corresponding to the desired visual tool entity based on the pre-established correspondence between the visual tool name and the plug-in library file.
[0263] S902 : Load the target plug-in library file to call a preset creation interface, create the vision tool entity, and determine the identifier of the vision tool entity.
[0264] Next, the electronic device can load the target plug-in library file to call a pre-defined creation interface, create a visual tool entity, and determine the identity of the visual tool entity. In addition, when the visual tool entity is subsequently deleted, the pre-defined plug-in destruction interface name can be used to call the destruction interface implemented by the plug-in library.
[0265] After creating a visual tool entity, further configuration and execution are required before business operations can be processed. Different visual tool entities handle different business operations, but they also share or share similarities. Therefore, abstracting common interfaces is useful. These common interfaces can include interfaces for acquiring data, setting data, executing, saving data, and loading data. Furthermore, customized interfaces can be defined, allowing each tool to implement them differently based on its specific business needs.
[0266] As can be seen, in the embodiment of the present application, the electronic device can search for the target plug-in library file corresponding to the visual tool entity to be created based on the pre-established correspondence between the visual tool name and the plug-in library file; load the target plug-in library file to call the pre-set creation interface, create the visual tool entity, and determine the identifier of the visual tool entity. In this way, the visual tool entity can be quickly created through a plug-in method for subsequent call when executing the machine vision solution.
[0267] As an implementation of an embodiment of the present application, the step of calling a preset creation interface to create the visual tool entity may include:
[0268] In response to a visual solution building instruction issued by the user in the graphical interface, a pre-set creation interface is called to create the visual tool entity; and / or, a pre-set creation interface is called through an SDK interface to create the visual tool entity.
[0269] In a first embodiment, in response to a visual solution building instruction issued by a user in a graphical interface, the tool driver layer may call a preset creation interface to create a visual tool entity, that is, create a visual tool entity based on the graphical interface.
[0270] In the second embodiment, the tool driver layer may call a preset creation interface through the SDK interface to create a visual tool entity, that is, create a visual tool entity based on the SDK interface.
[0271] For example, an example of the SDK interface may be: IMVSBlobFindModuTool blobFindModuTool=m_sol.CreateDynamicModule <imvsblobfindmodutool>();
[0272] In a third implementation, the tool driver layer may create a visual tool entity based on a graphical interface and a visual tool entity based on an SDK interface, that is, adopt the above two implementations.
[0273] As can be seen, in the embodiments of the present application, in response to a visual solution construction instruction issued by a user in a graphical interface, the tool driver layer can call a pre-defined creation interface to create a visual tool entity; and / or, the tool driver layer can call a pre-defined creation interface through an SDK interface to create a visual tool entity. In this way, the tool driver layer can create a visual tool entity through the above three implementation methods for subsequent call when executing a machine vision solution.
[0274] As an implementation method of the present application, Figure 10 As shown, before the step of integrating the interface solution data with the calling code to obtain the machine vision solution, the method may further include:
[0275] S1001, encapsulate each visual tool into a class;
[0276] To implement interface-based operations on visual tool entities, the SDK interface encodes the required attributes and functions as properties and interfaces of the encapsulated class, encapsulating each visual tool as a class. The class interface matches the sub-functions of the visual tool entity; that is, the interface within the class corresponds to the attributes and functions of the underlying visual tool entity. The class interface is used to call the visual tool entity corresponding to that visual tool. If similar functions exist between encapsulated classes, these functions can be abstracted into a common base class to simplify the encapsulation code.
[0277] S1002: Instantiate the class into a class object, and establish a binding relationship between the class object and the identifier of the visual tool entity.
[0278] After obtaining the class through encapsulation, the electronic device can instantiate the class into a class object and establish a binding relationship between the class object and the identifier of the visual tool entity. Specifically, the unique identifier corresponding to the visual tool entity can be bound within the class object. When calling the class object's interface, the interface can assemble or parse data in a standard format and pass the bound identifier and data to the functional interface of the tool driver layer to implement operations on the visual tool entity.
[0279] In this case, the calling code can be written according to the execution logic based on the class and interface of the target vision tool entity corresponding to the other preset processing operations included in the vision processing solution required for the data to be processed. This way, the interface of the class object can be called when the machine vision solution is subsequently executed.
[0280] As can be seen, in the embodiments of the present application, the electronic device can encapsulate each visual tool as a class, wherein the class interface matches the sub-function of the visual tool and is used to call the visual tool entity corresponding to the visual tool; the class is instantiated into a class object, and a binding relationship is established between the class object and the identifier of the visual tool entity. The calling code is based on the class corresponding to the target visual tool entity corresponding to other preset processing operations included in the visual processing solution required for the data to be processed, as well as the class interface, and is written according to the execution logic. This makes it easier to call the class object interface when the machine vision solution is subsequently executed.
[0281] The following describes the system structure. By layering the visual tool entity, graphical interface, and SDK interface, a machine vision solution can be constructed. A machine vision solution consists of four parts: the visual tool entity, graphical interface, SDK interface, and tool driver layer.
[0282] The visual tool entity is used to perform specific preset processing operations. Its functions may include obtaining input, executing according to configuration, setting output, and so on. The visual tool can be encapsulated as an interface component, and the interface component can be displayed in a graphical interface. The interface component can be used to operate the visual tool entity, specifically for adding and deleting visual tool entities, input subscriptions, reading and writing parameters, output display, and so on. The function of the SDK interface is similar to that of the graphical interface. The difference is that the visual tool is encapsulated as a class, the class is instantiated as a class object, and the visual tool entity is operated through the interface of the class object. The tool driver layer can be responsible for the data interaction between the above parts and the scheduling and execution of the visual tool entity.
[0283] Figure 11 This is a schematic diagram of a machine vision solution. The graphical interface can display interface components 1-3. Vision tools can be encapsulated as classes, which are then instantiated to create class objects 1-3. The corresponding vision tool entities can be called through the SDK interface code. The entity set corresponding to the tool driver layer can include vision tool entities 1-3. The graphical interface and SDK interface code can pass identifiers and data to the tool driver layer, which can then call the corresponding vision tool entities.
[0284] In addition, the tool driver layer can be placed above the interface components and class objects, or the class objects can be omitted and the interface components can be directly bound to the visual tool entities.
[0285] In the case where the machine vision solution includes a tool driver layer, such as Figure 12 As shown, the above-mentioned step of executing the machine vision solution according to the execution logic corresponding to the machine vision solution to perform the machine vision task may include:
[0286] S1201, determining the identifier of the visual tool entity to be called according to the interface solution data and the calling code;
[0287] When it is necessary to call a visual tool entity to perform a preset processing operation, the electronic device can determine the identifier of the visual tool entity to be called according to the interface solution data and the calling code.
[0288] S1202: The tool driving layer calls the visual tool entity corresponding to the determined identifier from the entity set based on the execution logic, performs a preset processing operation on the data to be processed, and obtains a processing result.
[0289] After determining the identifier of the visual tool entity to be called, the tool driver layer can call the visual tool entity corresponding to the determined identifier from the entity set based on the execution logic, perform a preset processing operation on the data to be processed, and obtain a processing result. The entity set corresponding to the tool driver layer can be composed of visual tool entities.
[0290] When a user operates a component using a graphical user interface (GUI) or SDK, the electronic device can identify the visual tool entity corresponding to the interface component and call the interface to perform the operation. Each visual tool entity is isolated from the others. Furthermore, the tool driver layer can lock and protect common resources to ensure thread safety during operations such as creating and destroying configurations. Subsequently, if the visual tool entity is destroyed, it can be removed from the entity collection.
[0291] As can be seen, in the embodiments of the present application, the electronic device can determine the identifier of the visual tool entity to be called based on the interface solution data and the calling code. Based on the execution logic, the tool driver layer calls the visual tool entity corresponding to the determined identifier from the entity set, performs the preset processing operation on the data to be processed, and obtains the processing result. In this way, when it is necessary to execute the machine vision solution, the visual tool entity can be quickly and accurately called by the identifier to implement the preset processing operation on the data to be processed.
[0292] As an implementation method of the present application, Figure 13 As shown, the tool driver layer, based on the execution logic, calls the visual tool entity corresponding to the determined identifier from the entity set, performs a preset processing operation on the data to be processed, and obtains the processing result, which may include:
[0293] S1301, the tool driver layer determines the identifier corresponding to the first visual tool entity based on the execution logic;
[0294] When executing a machine vision solution, the tool driver layer can sequentially call multiple vision tool entities according to the execution logic to perform multiple preset processing operations on the data to be processed. First, the tool driver layer can determine the identifier corresponding to the first vision tool entity based on the execution logic.
[0295] S1302, calling the visual tool entity corresponding to the identifier, performing a preset processing operation on the data to be processed, and obtaining output data;
[0296] Next, the tool driver layer may call the visual tool entity corresponding to the determined identifier, perform a preset processing operation on the data to be processed, and obtain output data.
[0297] S1303, according to the execution logic, determine the identifier corresponding to the visual tool entity created based on the graphical interface and the identifier corresponding to the visual tool entity created based on the SDK interface, and call the visual tool entity corresponding to the determined identifier to perform preset processing operations on the output data to obtain a processing result.
[0298] The tool driver layer can determine the identifiers corresponding to the visual tool entities created based on the graphical interface and the SDK interface according to the execution logic, and call the visual tool entities corresponding to the determined identifiers to perform preset processing operations on the output data one by one. In this way, according to the pre-set subscription relationship between output and input, the visual tool entity can be called to perform the preset processing operation on the input data. This process is repeated to obtain the processing results.
[0299] The above-mentioned visual tool entities can be created based on the graphical interface and based on the SDK interface. In this way, the tool driver layer can call the visual tool entities created by the above two methods according to the execution logic and perform preset processing operations on the data to be processed.
[0300] For example, an SDK interface code example for setting the visual tool entity input data can be:
[0301] blobFindModuTool.ModuParams.InputImage=nOutImgResult;
[0302] An example of an SDK interface code for obtaining the output data of a visual tool entity can be:
[0303] BlobFindResult nResult=blobFindModuTool ModuResult;
[0304] blobNum = nResult.BlobNum;
[0305] An example of an SDK interface code for executing a visual tool entity may be:
[0306] BlobFindModuTool.Run();
[0307] In one embodiment, for a graphical interface-based approach, the input data of each visual tool entity can be provided through a subscription relationship, where the subscribed data source is mainly the output data of the previous visual tool entity. When the visual tool entity obtains input data, the tool driver layer can provide a shallow copy of the output data as input data based on the input name and the subscription relationship between the input interface and the output interface. After the visual tool entity is executed, it can set its own output data into the tool driver layer, and all input data and output data are temporarily stored in the tool driver layer using unique identifiers and their respective names. In this way, the output data of each visual tool entity can be retained to avoid problems with the output data of a certain visual tool entity.
[0308] In another implementation, based on the SDK interface, the input data of each visual tool entity can be set by user code. Users can write data to the tool driver layer by calling the Set Input interface of the tool encapsulation class. This way, when the visual tool entity executes, it can find the data based on the input name and shallowly copy it. After execution, the output data can be set to the tool driver layer, or the interface can be used to determine the subscription relationship between the input interface and the output interface, and then rely on the tool driver layer for implementation.
[0309] The upper and lower layers must adhere to specific data exchange specifications. During data exchange, both parties must parse and assemble data. Therefore, a specific data exchange specification can be agreed upon. This specification can include XML (Extensible Markup Language), JSON (JavaScript Object Notation), and other custom formats. The appropriate data exchange specification can be selected based on different business needs.
[0310] It can be seen that in the embodiment of the present application, the tool driver layer determines the identifier corresponding to the first visual tool entity based on the execution logic; calls the visual tool entity corresponding to the identifier to perform a preset processing operation on the data to be processed to obtain output data; according to the execution logic, determines the identifier corresponding to the visual tool entity created based on the graphical interface and the identifier corresponding to the visual tool entity created based on the SDK interface, and calls the visual tool entity corresponding to the determined identifier to perform a preset processing operation on the output data to obtain a processing result. In this way, the tool driver layer can call the visual tool entity created based on the graphical interface and the visual tool entity created based on the SDK interface according to the execution logic to perform the preset processing operation on the data to be processed.
[0311] As an implementation of an embodiment of the present application, the above-mentioned entity set may include a first subset and a second subset. The first subset may be composed of visual tool entities created based on a graphical interface, and the second subset may be composed of visual tool entities created based on an SDK interface.
[0312] The graphical interface and SDK interface can use their own collection spaces, namely the first subset and the second subset respectively. In each subset, it can be further divided into multiple subsets according to business needs, and the subsets can be nested. In this way, when the visual tool entity needs to be created or destroyed, the tool subclass object can be triggered to be created or destroyed. Among them, each visual tool entity has a unique identifier. When the user operates the visual tool entity, the electronic device can determine the base class pointer of the corresponding visual tool entity through the identifier. Next, the general interface can be called to execute the function of the tool subclass based on the polymorphic characteristics to implement the operation, or the personalized interface can be directly called to implement the operation.
[0313] In this case, if Figure 14 As shown, the above method may further include:
[0314] S1401, in response to a modification instruction, determining a target vision tool entity for executing the preset processing operation according to the preset processing operation indicated by the modification instruction and execution logic;
[0315] When the execution logic of the interface solution data needs to be modified, the user can issue a modification instruction. The electronic device can then determine the target visual tool entity for executing the preset processing operation based on the preset processing operation and execution logic indicated by the modification instruction.
[0316] S1402, transferring the target visual tool entity from the original subset to the target subset;
[0317] The electronic device can transfer a target visual tool entity from an original subset to a target subset. If the target visual tool entity is created using an SDK interface, the original subset is the second subset and the target subset is the first subset. If the target visual tool entity is created using a graphical interface, the original subset is the first subset and the target subset is the second subset. This allows for bidirectional movement of visual tool entities.
[0318] S1403 , generating modified interface solution data according to the execution logic between the target visual tool entity and the interface solution data, for the tool driver layer to call.
[0319] The electronic device can obtain the modified interface solution data through operations such as connection and subscription according to the execution logic between the target visual tool entity and the interface solution data, so as to be called by the tool driver layer.
[0320] In the case of creating a visual tool entity using only a graphical interface, since the interface solution data is generated based on the execution logic, data transfer relationship and configured data between preset processing operations, if the visual solution data needs to be modified, the execution logic between the interface components needs to be reset. If multiple visual solution data need to be modified at the same time, the connection relationship between the interface components corresponding to each visual solution data needs to be modified one by one, which consumes a lot of manpower and is prone to errors. However, by adopting the method of the embodiment of the present application, it is only necessary to integrate the target call code on the basis of the original visual solution data to realize batch modification of the interface solution data.
[0321] It can be seen that in the embodiment of the present application, in response to a modification instruction, the electronic device can determine the target visual tool entity for executing the preset processing operation according to the preset processing operation and execution logic indicated by the modification instruction; transfer the target visual tool entity from the original subset to the target subset, wherein, when the target visual tool entity is created based on the SDK interface, the original subset is the second subset and the target subset is the first subset; when the target visual tool entity is created based on the graphical interface, the original subset is the first subset and the target subset is the second subset; according to the execution logic between the target visual tool entity and the interface solution data, the modified interface solution data is generated for the tool driver layer to call. In this way, the visual solution data can be modified quickly.
[0322] As an implementation method of the embodiment of the present application, a flowchart of a method for constructing a machine vision solution can be as follows: Figure 15 As shown, the following steps may be specifically included:
[0323] S1501, dragging interface components;
[0324] After the process is started, a graphical interface can be used, and the user can perform drag and drop operations on the interface components in the graphical interface.
[0325] S1502, interface configuration tool;
[0326] Users can adjust the parameters of the visual tool entity through the interface configuration tool, that is, the configuration controls in the graphical interface.
[0327] S1503, tool connection subscription;
[0328] Users can issue connection operations on interface components to build execution logic between preset processing operations.
[0329] S1504, construction completed; if yes, execute step S1505; if not, return to step S1501;
[0330] The electronic device can determine whether the construction is completed, specifically, whether a construction completion trigger operation issued by the user is received.
[0331] S1505, storing interface solution data;
[0332] After the construction is completed, the electronic device can store the interface solution data according to the execution logic.
[0333] S1506, loading interface solution data;
[0334] Next, the electronic device may load the stored interface scheme data.
[0335] S1507, determine the operation to be performed; if it is for program integration, execute step S1508; if it is for standalone use, execute step S1509;
[0336] The electronic device may determine the subsequent operation to be performed.
[0337] S1508, program integration code;
[0338] The electronic device can use the code calling interface to load the interface solution data and execute the interface solution data.
[0339] S1509, program operation;
[0340] Next, the electronic device may execute the interface solution data to perform a preset processing operation on the data to be processed, and end the process.
[0341] S1510, instantiating a tool object;
[0342] Users can also use the SDK interface method to first instantiate the encapsulation class.
[0343] S1511, interface configuration tool;
[0344] The electronic device can configure the visual tool entity through the interface of the encapsulated class object.
[0345] S1512, input and output execution logic;
[0346] The electronic device can obtain the calling code written by the user, and the calling code can reflect the execution logic of data processing between the input interface and the output interface of each visual tool entity.
[0347] S1513, construction completed; if yes, execute step S1514; if not, return to step S1510;
[0348] The electronics can determine whether the build is complete.
[0349] S1514, storing the calling code;
[0350] The electronic device may store the calling code.
[0351] S1515, integrated compiled code;
[0352] The electronic device can perform integrated compilation on the calling code to obtain the integrated compiled calling code.
[0353] S1516, program operation;
[0354] Next, the electronic device may execute the integrated compiled calling code to perform a preset processing operation on the data to be processed, and end the process.
[0355] As an implementation method of the embodiment of the present application, a flowchart of the execution method of the machine vision solution can be as follows: Figure 16 As shown, the following steps may be specifically included:
[0356] S1601, create visual tool entity;
[0357] After starting the process, when using the graphical interface, you can create a visual tool entity based on the graphical interface.
[0358] S1602, obtaining and setting visual tool entity data;
[0359] Next, the electronic device can set the parameters of the visual tool entity.
[0360] S1603, physical connection subscription;
[0361] Users can issue execution logic determination operations to interface components in the graphical interface, thereby building execution logic between visual tool entities.
[0362] S1604, Execution Entity;
[0363] After the execution logic build is completed, the electronic device can execute the vision tool entity.
[0364] S1605, obtaining input data;
[0365] When a vision tool entity performs a preset processing operation, it can obtain its own input data.
[0366] S1606, executing business logic;
[0367] The electronic device can call the visual tool entity according to the constructed execution logic and perform preset processing operations on the data to be processed.
[0368] S1607, set output data;
[0369] After completing the processing of the data to be processed, the electronic device can set its own output data.
[0370] S1608, whether it is used twice; if yes, go to step S1609; if not, go to step S1610;
[0371] The electronics can determine whether the constructed machine vision solution is to be used a second time.
[0372] S1609, save entity data;
[0373] If it is to be used a second time, the electronic device may save the data of the set visual tool entity and then destroy the visual tool entity.
[0374] S1610, destruction of tool entities;
[0375] If there is no secondary use, the electronic device can directly destroy the visual tool entity and end the process.
[0376] S1611, create visual tool entity;
[0377] When using the SDK interface, a visual tool entity can be created based on the SDK interface.
[0378] S1612, obtaining and setting visual tool entity data;
[0379] Next, the electronic device can set the parameters of the visual tool entity.
[0380] S1613, set entity input;
[0381] The electronic device can set the input data of each visual tool entity by calling the code.
[0382] S1614, Executing Entity;
[0383] After the execution logic build is completed, the electronic device can execute the vision tool entity.
[0384] S1615, obtaining input data;
[0385] When a vision tool entity performs a preset processing operation, it can obtain its own input data.
[0386] S1616, execute business logic;
[0387] The electronic device can call the visual tool entity according to the constructed execution logic and perform preset processing operations on the data to be processed.
[0388] S1617, set output data;
[0389] After completing the processing of the data to be processed, the electronic device can set its own output data.
[0390] S1618, whether it is used twice; if yes, go to step S1619; if not, go to step S1620;
[0391] The electronics can determine whether the constructed machine vision solution is to be used a second time.
[0392] S1619, save entity data;
[0393] If it is to be used a second time, the electronic device may save the data of the set visual tool entity and then destroy the visual tool entity.
[0394] S1620, destruction of tool entities;
[0395] If there is no secondary use, the electronic device can directly destroy the visual tool entity and end the process.
[0396] In the technical solution of this application, the operations involved in obtaining, storing, using, processing, transmitting, providing and disclosing user personal information are all carried out with the user's authorization.
[0397] Corresponding to the above-mentioned method for executing a machine vision task, an embodiment of the present application further provides a device for executing a machine vision task. The following describes an embodiment of the present application providing a device for executing a machine vision task.
[0398] like Figure 17 As shown, a device for executing a machine vision task, the device comprising:
[0399] Solution acquisition module 1701, used to acquire a machine vision solution, wherein the machine vision solution is generated based on a graphical interface and an SDK interface;
[0400] The task execution module 1702 is configured to execute a machine vision task based on the machine vision solution.
[0401] It can be seen that in the embodiment of the present application, the electronic device can obtain a machine vision solution, wherein the machine vision solution is generated based on a graphical interface and an SDK interface; and based on the machine vision solution, a machine vision task is executed. In the above-mentioned solution, the method based on the graphical interface is difficult to support the dynamic adjustment of complex execution logic. For the method based on the SDK interface, the user needs to manually write the calling code, which requires a large amount of work. In the embodiment of the present application, the above two methods are combined together to generate a machine vision solution based on a graphical interface and an SDK interface. Since the calling code can be written through the SDK interface without exhaustively enumerating the execution logic between the preset processing operations, the construction process of the machine vision solution can be simplified and the resources occupied by the machine vision solution can be reduced.
[0402] As an implementation of an embodiment of the present application, the solution acquisition module 1701 may include:
[0403] The first solution construction submodule is used to construct the first solution according to the graphical interface, construct the second solution according to the SDK interface, and use the first solution and the second solution as machine vision solutions; or
[0404] The second solution construction submodule is used to build a machine vision solution through at least one interaction between the graphical interface and the SDK interface.
[0405] As an implementation of an embodiment of the present application, the task execution module 1702 may include:
[0406] a first task execution submodule, configured to execute the first solution and the second solution according to the execution logic corresponding to the machine vision solution to perform the machine vision task when there is no interaction between the graphical interface and the SDK interface; or
[0407] The second task execution submodule is used to execute the machine vision solution according to the execution logic corresponding to the machine vision solution to perform the machine vision task when there is interaction between the graphical interface and the SDK interface.
[0408] As an implementation of an embodiment of the present application, the second solution construction submodule may include:
[0409] a logic determination unit, configured to respond to an execution logic determination operation issued by a user on a graphical interface for an interface component and, based on the execution logic reflected by the interface component, determine the execution logic between preset processing operations corresponding to the interface component, wherein each interface component indicates a visual tool entity, and each visual tool entity is used to execute a preset processing operation;
[0410] A data construction unit, configured to construct interface solution data according to the execution logic, wherein the interface solution data is used to reflect the execution logic between the visual tool entities;
[0411] A solution generation unit is used to integrate the interface solution data with the calling code through at least one interaction between the graphical interface and the SDK interface to obtain a machine vision solution, wherein the calling code is used to represent the execution logic of the visual tool entity corresponding to other preset processing operations other than the interface solution data in the visual processing solution required to perform the machine vision task, and the execution logic represented by the calling code is constructed based on the SDK interface.
[0412] As an implementation of an embodiment of the present application, the execution logic determination operation may include at least a component selection operation and an order determination operation. In this case, the apparatus may further include:
[0413] A first component display module is configured to, in response to a component selection operation issued by a user for an interface component option included in a toolbar in a graphical interface, display an interface component indicated by the interface component option at a stop position of the component selection operation, wherein the visual tool entity indicated by the interface component is created based on the graphical interface and / or the visual tool entity indicated by the interface component is created based on an SDK interface;
[0414] The second component display module is used to display an interface component with execution logic in response to a sequence determination operation issued by the user, wherein the sequence determination operation is used to determine the execution logic between the interface components, and the sequence determination operation is issued for the interface component in the graphical interface, or the sequence determination operation is issued based on the SDK interface.
[0415] As an implementation manner of an embodiment of the present application, the above-mentioned graphical interface may include at least a configuration control corresponding to the interface component. In this case, the above-mentioned apparatus may further include:
[0416] a data acquisition module, configured to acquire configuration data corresponding to the adjusted visual tool entity, wherein the configuration data is data used by a preset processing operation performed by the visual tool entity, and the configuration data is acquired based on a configuration control in the graphical interface and / or the configuration data is acquired based on an SDK interface;
[0417] A data configuration module, configured to configure the adjusted configuration data to the visual tool entity based on the configuration control in the graphical interface or the SDK interface;
[0418] The data updating module is used to update the configuration data displayed by the configuration control corresponding to the visual tool entity based on the adjusted configuration data, so that the user can determine whether the adjusted configuration data meets the requirements of the preset processing operation.
[0419] As an implementation of the embodiment of the present application, the data acquisition module may include:
[0420] A first data acquisition submodule is configured to acquire configuration data corresponding to the visual tool entity adjusted by the user based on the configuration control; and / or,
[0421] The second data acquisition submodule is configured to acquire configuration data included in the code of the visual tool entity adjusted by the user through the SDK interface.
[0422] As an implementation of the embodiment of the present application, the above-mentioned device may further include:
[0423] a component adding module, configured to, in response to an adding operation issued by the user, display the interface component indicated by the adding operation, wherein the adding operation is issued on the graphical interface for the interface component, or the adding operation is issued based on the SDK interface; and / or,
[0424] The component deletion module deletes the interface component indicated by the deletion operation from the graphical interface in response to the deletion operation issued by the user, wherein the deletion operation is issued for the interface component in the graphical interface, or the deletion operation is issued based on the SDK interface.
[0425] As an implementation of an embodiment of the present application, the execution logic includes the execution order between the preset processing operations corresponding to the interface components. In this case, the logic determination unit may include:
[0426] A topology map generating subunit, configured to generate a topology map corresponding to the interface components based on the execution logic between the interface components;
[0427] The sequence determination subunit is used to determine the execution sequence between the preset processing operations corresponding to the interface components according to the topology diagram.
[0428] As an implementation of the embodiment of the present application, the above-mentioned device may further include:
[0429] A first binding module is used to create a visual tool entity corresponding to the interface component indicated by the drag operation, and establish a binding relationship between the interface component and the created visual tool entity; or,
[0430] The second binding module is used to establish a binding relationship between the interface component and an existing visual tool entity.
[0431] As an implementation of the embodiment of the present application, the above-mentioned device may further include:
[0432] Object construction module, used to construct universal virtual objects of visual tool entities;
[0433] a first identification binding module, configured to bind the identification of the visual tool entity corresponding to the interface component within the universal virtual object, wherein the interface of the universal virtual object is configured to call the visual tool entity to which the identification belongs; and / or
[0434] The second identification binding module is used to bind the visual tool entity with the universal virtual object.
[0435] As an implementation of the embodiment of the present application, the above-mentioned device may further include:
[0436] A library file search module is used to search for a target plug-in library file corresponding to a visual tool entity to be created based on a pre-established correspondence between a visual tool name and a plug-in library file;
[0437] The entity creation module is used to load the target plug-in library file to call a preset creation interface to create the vision tool entity and determine the identifier of the vision tool entity.
[0438] As an implementation of an embodiment of the present application, the entity creation module may include:
[0439] A first entity creation submodule is configured to call a preset creation interface to create the visual tool entity in response to a visual solution construction instruction issued by the user on the graphical interface; and / or
[0440] The second entity creation submodule is used to call a preset creation interface through the SDK interface to create the visual tool entity.
[0441] As an implementation of the embodiment of the present application, the above-mentioned device may further include:
[0442] An encapsulation module, configured to encapsulate each vision tool into a class, wherein the interface of the class matches the sub-function of the vision tool, and the interface of the class is used to call the vision tool entity corresponding to the vision tool;
[0443] A binding relationship establishment module is used to instantiate the class into a class object and establish a binding relationship between the class object and the identifier of the visual tool entity, wherein the calling code is written according to the execution logic based on the class corresponding to the target visual tool entity and the interface of the class corresponding to other preset processing operations included in the visual processing solution required for the data to be processed.
[0444] As an implementation of an embodiment of the present application, the second task execution submodule may include:
[0445] an identification determination unit, configured to determine an identification of a visual tool entity to be called according to the interface solution data and the calling code, wherein each visual tool entity is configured to perform a preset processing operation;
[0446] A result determination unit is used for the tool driving layer to call the visual tool entity corresponding to the determined identifier from the entity set based on the execution logic, perform preset processing operations on the processed data, and obtain a processing result, wherein the entity set corresponding to the tool driving layer is composed of the visual tool entities.
[0447] As an implementation of an embodiment of the present application, the above-mentioned result determination submodule may include:
[0448] An identification determination unit, configured for the tool driver layer to determine an identification corresponding to the first visual tool entity based on the execution logic;
[0449] A data output unit, configured to call the visual tool entity corresponding to the identifier, perform a preset processing operation on the data to be processed, and obtain output data;
[0450] A result determination unit is used to determine the identifier corresponding to the visual tool entity created based on the graphical interface and the identifier corresponding to the visual tool entity created based on the SDK interface according to the execution logic, and call the visual tool entity corresponding to the determined identifier to perform preset processing operations on the output data to obtain a processing result.
[0451] As an implementation of an embodiment of the present application, the above-mentioned entity set may include a first subset and a second subset. The first subset may be composed of visual tool entities created based on a graphical interface, and the second subset may be composed of visual tool entities created based on an SDK interface. In this case, the above-mentioned apparatus may further include:
[0452] an entity determination module, configured to, in response to a modification instruction, determine a target visual tool entity for executing the preset processing operation according to the preset processing operation indicated by the modification instruction and an execution logic;
[0453] an entity transfer module, configured to transfer the target visual tool entity from an original subset to a target subset, wherein, when the target visual tool entity is created based on an SDK interface, the original subset is the second subset and the target subset is the first subset; and when the target visual tool entity is created based on a graphical interface, the original subset is the first subset and the target subset is the second subset;
[0454] The data modification module is used to generate modified interface solution data according to the execution logic between the target visual tool entity and the interface solution data, so as to be called by the tool driver layer.
[0455] The present application also provides an electronic device, such as Figure 18 Shown, including:
[0456] Memory 1801, used for storing computer programs;
[0457] The processor 1802 is configured to implement the method for executing the machine vision task described in any of the above embodiments when executing the program stored in the memory 1801 .
[0458] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor 1802, the communication interface, and the memory 1801 communicate with each other via the communication bus.
[0459] It can be seen that in the embodiment of the present application, the electronic device can obtain a machine vision solution, wherein the machine vision solution is generated based on a graphical interface and an SDK interface; and based on the machine vision solution, a machine vision task is executed. In the above-mentioned solution, the method based on the graphical interface is difficult to support the dynamic adjustment of complex execution logic. For the method based on the SDK interface, the user needs to manually write the calling code, which requires a large amount of work. In the embodiment of the present application, the above two methods are combined together to generate a machine vision solution based on a graphical interface and an SDK interface. Since the calling code can be written through the SDK interface without exhaustively enumerating the execution logic between the preset processing operations, the construction process of the machine vision solution can be simplified and the resources occupied by the machine vision solution can be reduced.
[0460] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0461] The communication interface is used for communication between the above electronic device and other devices.
[0462] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0463] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0464] In another embodiment provided by the present application, a computer-readable storage medium is also provided, which stores a computer program. When the computer program is executed by a processor, the steps of the execution method of any of the above-mentioned machine vision tasks are implemented.
[0465] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any method for executing a machine vision task in the above embodiments.
[0466] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state drive (SSD).
[0467] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprise," "include," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0468] Each embodiment in this specification is described in a related manner. Similar portions between embodiments can be referenced to each other. Each embodiment focuses on the differences between other embodiments. In particular, the device, electronic device, computer-readable storage medium, and computer program product embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For related portions, reference can be made to the descriptions of the method embodiments.
[0469] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.< / imvsblobfindmodutool>
Claims
1. A method for executing a machine vision task, characterized in that: The method comprises: Obtaining a machine vision solution, wherein the machine vision solution is generated based on a graphical interface and an SDK interface; Based on the machine vision solution, a machine vision task is performed.
2. The method according to claim 1, characterized in that The step of obtaining a machine vision solution includes: Construct a first solution based on the graphical interface, construct a second solution based on the SDK interface, and use the first solution and the second solution as machine vision solutions; or Build a machine vision solution through at least one interaction between the graphical interface and the SDK interface.
3. The method according to claim 2, characterized in that The step of performing a machine vision task based on the machine vision solution includes: In the absence of interaction between the graphical interface and the SDK interface, executing the first solution and the second solution according to the execution logic corresponding to the machine vision solution to perform the machine vision task; or In the case where there is interaction between the graphical interface and the SDK interface mode, the machine vision solution is executed according to the execution logic corresponding to the machine vision solution to perform the machine vision task.
4. The method according to claim 2 or 3, characterized in that The step of building a machine vision solution through at least one interaction between the graphical interface and the SDK interface includes: In response to an execution logic determination operation issued by a user on a graphical interface for an interface component, determining the execution logic between preset processing operations corresponding to the interface component based on the execution logic reflected by the interface component, wherein each interface component indicates a visual tool entity, and each visual tool entity is used to execute a preset processing operation; Constructing interface solution data according to the execution logic, wherein the interface solution data is used to reflect the execution logic between the visual tool entities; Through at least one interaction between the graphical interface and the SDK interface, the interface solution data and the calling code are integrated to obtain a machine vision solution, wherein the calling code is used to represent the execution logic of the visual tool entity corresponding to other preset processing operations other than the interface solution data in the visual processing solution required to perform the machine vision task, and the execution logic represented by the calling code is constructed based on the SDK interface.
5. The method according to claim 4, characterized in that The execution logic determination operation includes at least a component selection operation and a sequence determination operation; Before the step of determining, based on the execution logic reflected by the interface component, the execution logic between the preset processing operations corresponding to the interface component, the method further includes: In response to a component selection operation issued by a user for an interface component option included in a toolbar in a graphical interface, displaying an interface component indicated by the interface component option at a stop position of the component selection operation, wherein the visual tool entity indicated by the interface component is created based on the graphical interface and / or the visual tool entity indicated by the interface component is created based on an SDK interface; In response to a sequence determination operation issued by the user, an interface component with execution logic is displayed, wherein the sequence determination operation is used to determine the execution logic between the interface components, and the sequence determination operation is issued for the interface components in the graphical interface, or the sequence determination operation is issued based on the SDK interface.
6. The method according to claim 5, characterized in that The graphical interface at least includes configuration controls corresponding to the interface components; The method further comprises: Acquiring configuration data corresponding to the adjusted visual tool entity, wherein the configuration data is data used by a preset processing operation performed by the visual tool entity, and the configuration data is acquired based on a configuration control in the graphical interface and / or the configuration data is acquired based on an SDK interface; Based on the configuration control in the graphical interface or the SDK interface, configuring the adjusted configuration data to the visual tool entity; Based on the adjusted configuration data, the configuration data displayed by the configuration control corresponding to the visual tool entity is updated, so that the user can determine whether the adjusted configuration data meets the requirements of the preset processing operation.
7. The method according to claim 6, characterized in that The step of obtaining the configuration data corresponding to the adjusted visual tool entity includes: Acquiring configuration data corresponding to the visual tool entity adjusted by the user based on the configuration control; and / or, The configuration data included in the code of the visual tool entity adjusted by the user through the SDK interface is obtained.
8. The method according to claim 4, characterized in that The method further comprises: In response to an add operation issued by the user, displaying the interface component indicated by the add operation, wherein the add operation is issued on the graphical interface for the interface component, or the add operation is issued based on an SDK interface; and / or, In response to a deletion operation issued by the user, the interface component indicated by the deletion operation is deleted from the graphical interface, wherein the deletion operation is issued on the interface component in the graphical interface, or the deletion operation is issued based on an SDK interface.
9. The method according to claim 4, characterized in that The execution logic includes the execution order between the preset processing operations corresponding to the interface components; The step of determining the execution logic between the preset processing operations corresponding to the interface components based on the execution logic reflected by the interface components includes: Based on the execution logic between the interface components, generating a topology map corresponding to the interface components; According to the topology diagram, the execution order of the preset processing operations corresponding to the interface components is determined.
10. The method according to claim 5, characterized in that The method further comprises: Creating a visual tool entity corresponding to the interface component indicated by the drag operation, and establishing a binding relationship between the interface component and the created visual tool entity; or, A binding relationship between the interface component and an existing visual tool entity is established.
11. The method according to claim 10, characterized in that The method for establishing the binding relationship includes: Constructing universal virtual objects of visual tool entities; Within the universal virtual object, an identifier of a visual tool entity corresponding to an interface component is bound, wherein the interface of the universal virtual object is used to call the visual tool entity to which the identifier belongs; and / or, Binding the visual tool entity to the universal virtual object.
12. The method according to claim 11, characterized in that The method for creating the visual tool entity includes: According to the pre-established correspondence between the visual tool name and the plug-in library file, the target plug-in library file corresponding to the visual tool entity to be created is searched; The target plug-in library file is loaded to call a preset creation interface, create the vision tool entity, and determine the identifier of the vision tool entity.
13. The method according to claim 12, characterized in that The step of calling a preset creation interface to create the visual tool entity includes: In response to a visual solution building instruction issued by the user on the graphical interface, calling a pre-set creation interface to create the visual tool entity; and / or, The visual tool entity is created by calling a preset creation interface through the SDK interface.
14. The method according to claim 4, characterized in that Before the step of integrating the interface solution data with the calling code to obtain a machine vision solution, the method further includes: Encapsulate each vision tool into a class, wherein the interface of the class matches the sub-function of the vision tool, and the interface of the class is used to call the vision tool entity corresponding to the vision tool; The class is instantiated into a class object, and a binding relationship is established between the class object and the identifier of the visual tool entity, wherein the calling code is written according to the execution logic based on the class corresponding to the target visual tool entity and the class interface corresponding to other preset processing operations included in the visual processing solution required for the data to be processed.
15. The method according to claim 3, characterized in that The step of executing the machine vision solution according to the execution logic corresponding to the machine vision solution to perform the machine vision task includes: Determine the identifier of the vision tool entity to be called according to the interface solution data and the calling code, wherein each vision tool entity is used to perform a preset processing operation; Based on the execution logic, the tool driver layer calls the visual tool entity corresponding to the determined identifier from the entity set, performs preset processing operations on the data to be processed, and obtains a processing result, wherein the entity set corresponding to the tool driver layer is composed of the visual tool entities.
16. The method according to claim 15, characterized in that The tool driver layer, based on the execution logic, calls the visual tool entity corresponding to the determined identifier from the entity set, performs a preset processing operation on the data to be processed, and obtains a processing result, including the following steps: The tool driver layer determines the identifier corresponding to the first visual tool entity based on the execution logic; Calling the visual tool entity corresponding to the identifier, performing a preset processing operation on the data to be processed, and obtaining output data; According to the execution logic, the identifier corresponding to the visual tool entity created based on the graphical interface and the identifier corresponding to the visual tool entity created based on the SDK interface are determined, and the visual tool entity corresponding to the determined identifier is called to perform preset processing operations on the output data to obtain a processing result.
17. The method according to claim 15, characterized in that The entity set includes a first subset and a second subset, the first subset consists of vision tool entities created based on the graphical interface, and the second subset consists of vision tool entities created based on the SDK interface; The method further comprises: In response to the modification instruction, determining a target vision tool entity for executing the preset processing operation according to the preset processing operation indicated by the modification instruction and execution logic; Transferring the target visual tool entity from an original subset to a target subset, wherein, when the target visual tool entity is created based on an SDK interface, the original subset is the second subset and the target subset is the first subset; and when the target visual tool entity is created based on a graphical interface, the original subset is the first subset and the target subset is the second subset; According to the execution logic between the target visual tool entity and the interface solution data, the modified interface solution data is generated for the tool driver layer to call.
18. A device for executing machine vision tasks, characterized in that: The device comprises: A solution acquisition module is used to acquire a machine vision solution, wherein the machine vision solution is generated based on a graphical interface and an SDK interface; The task execution module is used to execute the machine vision task based on the machine vision solution.
19. The device according to claim 18, characterized in that The solution acquisition module includes: The first solution construction submodule is used to construct the first solution according to the graphical interface, construct the second solution according to the SDK interface, and use the first solution and the second solution as machine vision solutions; or The second solution construction submodule is used to construct a machine vision solution through at least one interaction between the graphical interface and the SDK interface; and / or, The task execution module includes: A first task execution submodule is configured to execute the first solution and the second solution according to the execution logic corresponding to the machine vision solution to perform the machine vision task when there is no interaction between the graphical interface and the SDK interface; or A second task execution submodule is configured to execute the machine vision solution according to the execution logic corresponding to the machine vision solution to perform the machine vision task when there is interaction between the graphical interface and the SDK interface; and / or The second solution constructs a submodule, including: a logic determination unit, configured to respond to an execution logic determination operation issued by a user on a graphical interface for an interface component and, based on the execution logic reflected by the interface component, determine the execution logic between preset processing operations corresponding to the interface component, wherein each interface component indicates a visual tool entity, and each visual tool entity is used to execute a preset processing operation; A data construction unit, configured to construct interface solution data according to the execution logic, wherein the interface solution data is used to reflect the execution logic between the visual tool entities; A solution generation unit is configured to integrate the interface solution data with a calling code through at least one interaction between a graphical interface and an SDK interface to obtain a machine vision solution, wherein the calling code is used to represent the execution logic of a visual tool entity corresponding to other preset processing operations other than the interface solution data in a visual processing solution required to perform a machine vision task, and the execution logic represented by the calling code is constructed based on the SDK interface; and / or, The execution logic determination operation includes at least a component selection operation and a sequence determination operation; The device further comprises: A first component display module is configured to, in response to a component selection operation issued by a user for an interface component option included in a toolbar in a graphical interface, display an interface component indicated by the interface component option at a stop position of the component selection operation, wherein the visual tool entity indicated by the interface component is created based on the graphical interface and / or the visual tool entity indicated by the interface component is created based on an SDK interface; a second component display module, configured to display interface components having execution logic in response to a sequence determination operation issued by the user, wherein the sequence determination operation is used to determine the execution logic between the interface components, the sequence determination operation is issued for the interface components in the graphical interface, or the sequence determination operation is issued based on an SDK interface; and / or, The graphical interface at least includes configuration controls corresponding to the interface components; The device further comprises: a data acquisition module, configured to acquire configuration data corresponding to the adjusted visual tool entity, wherein the configuration data is data used by a preset processing operation performed by the visual tool entity, and the configuration data is acquired based on a configuration control in the graphical interface and / or the configuration data is acquired based on an SDK interface; A data configuration module, configured to configure the adjusted configuration data to the visual tool entity based on the configuration control in the graphical interface or the SDK interface; a data updating module, configured to update the configuration data displayed by the configuration control corresponding to the visual tool entity based on the adjusted configuration data, so that the user can determine whether the adjusted configuration data meets the requirements of the preset processing operation; and / or, The data acquisition module includes: A first data acquisition submodule is configured to acquire configuration data corresponding to the visual tool entity adjusted by the user based on the configuration control; and / or, A second data acquisition submodule is configured to acquire configuration data included in the code of the visual tool entity adjusted by the user through the SDK interface; and / or, The device further comprises: a component adding module, configured to, in response to an adding operation issued by the user, display the interface component indicated by the adding operation, wherein the adding operation is issued on the graphical interface for the interface component, or the adding operation is issued based on the SDK interface; and / or, a component deletion module, in response to a deletion operation issued by the user, deleting from the graphical interface the interface component indicated by the deletion operation, wherein the deletion operation is issued on the graphical interface for the interface component, or the deletion operation is issued based on the SDK interface; and / or, The execution logic includes the execution order between the preset processing operations corresponding to the interface components; The logic determination unit includes: A topology map generating subunit, configured to generate a topology map corresponding to the interface components based on the execution logic between the interface components; a sequence determination subunit, configured to determine, based on the topology diagram, the execution order of the preset processing operations corresponding to the interface components; and / or, The device further comprises: A first binding module is used to create a visual tool entity corresponding to the interface component indicated by the drag operation, and establish a binding relationship between the interface component and the created visual tool entity; or, a second binding module, configured to establish a binding relationship between the interface component and an existing visual tool entity; and / or, The device further comprises: Object construction module, used to construct universal virtual objects of visual tool entities; a first identification binding module, configured to bind the identification of the visual tool entity corresponding to the interface component within the universal virtual object, wherein the interface of the universal virtual object is configured to call the visual tool entity to which the identification belongs; and / or A second identification binding module is configured to bind the visual tool entity to the universal virtual object; and / or, The device further comprises: A library file search module is used to search for a target plug-in library file corresponding to a visual tool entity to be created based on a pre-established correspondence between a visual tool name and a plug-in library file; An entity creation module, configured to load the target plug-in library file, call a preset creation interface, create the vision tool entity, and determine an identifier of the vision tool entity; and / or, The entity creation module includes: A first entity creation submodule is configured to call a preset creation interface to create the visual tool entity in response to a visual solution construction instruction issued by the user on the graphical interface; and / or The second entity creation submodule is used to call a preset creation interface through the SDK interface to create the visual tool entity; and / or, The device further comprises: An encapsulation module, configured to encapsulate each vision tool into a class, wherein the interface of the class matches the sub-function of the vision tool, and the interface of the class is used to call the vision tool entity corresponding to the vision tool; a binding relationship establishment module, configured to instantiate the class into a class object and establish a binding relationship between the class object and the identifier of the visual tool entity, wherein the calling code is written in accordance with the execution logic based on the class corresponding to the target visual tool entity corresponding to other preset processing operations included in the visual processing solution required for the data to be processed and the interface of the class; and / or, The second task execution submodule includes: an identification determination unit, configured to determine an identification of a visual tool entity to be called according to the interface solution data and the calling code, wherein each visual tool entity is configured to perform a preset processing operation; A result determination unit is configured to, based on the execution logic, call the visual tool entity corresponding to the determined identifier from the entity set at the tool driver layer, perform a preset processing operation on the data to be processed, and obtain a processing result, wherein the entity set corresponding to the tool driver layer is composed of the visual tool entities; and / or The result determination submodule includes: An identification determination unit, configured for the tool driver layer to determine an identification corresponding to the first visual tool entity based on the execution logic; A data output unit, configured to call the visual tool entity corresponding to the identifier, perform a preset processing operation on the data to be processed, and obtain output data; a result determination unit, configured to determine, in accordance with the execution logic, an identifier corresponding to a visual tool entity created based on the graphical interface and an identifier corresponding to a visual tool entity created based on the SDK interface, and call the visual tool entity corresponding to the determined identifier to perform a preset processing operation on the output data to obtain a processing result; and / or, The entity set includes a first subset and a second subset, the first subset consists of vision tool entities created based on the graphical interface, and the second subset consists of vision tool entities created based on the SDK interface; The device further comprises: an entity determination module, configured to, in response to a modification instruction, determine a target visual tool entity for executing the preset processing operation according to the preset processing operation indicated by the modification instruction and an execution logic; an entity transfer module, configured to transfer the target visual tool entity from an original subset to a target subset, wherein, when the target visual tool entity is created based on an SDK interface, the original subset is the second subset and the target subset is the first subset; and when the target visual tool entity is created based on a graphical interface, the original subset is the first subset and the target subset is the second subset; The data modification module is used to generate modified interface solution data according to the execution logic between the target visual tool entity and the interface solution data, so as to be called by the tool driver layer.
20. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 17 when executing a program stored in a memory.
21. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 17 is implemented.