CN115766734A - Visual detection method and system based on cloud service - Google Patents

Visual detection method and system based on cloud service Download PDF

Info

Publication number
CN115766734A
CN115766734A CN202211266725.6A CN202211266725A CN115766734A CN 115766734 A CN115766734 A CN 115766734A CN 202211266725 A CN202211266725 A CN 202211266725A CN 115766734 A CN115766734 A CN 115766734A
Authority
CN
China
Prior art keywords
algorithm
service
visual
node
cloud
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211266725.6A
Other languages
Chinese (zh)
Inventor
杨洪福
王成
李锡源
徐春长
盛国军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haier Digital Technology Qingdao Co Ltd
Cosmoplat Industrial Intelligent Research Institute Qingdao Co Ltd
Original Assignee
Haier Digital Technology Qingdao Co Ltd
Cosmoplat Industrial Intelligent Research Institute Qingdao Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Haier Digital Technology Qingdao Co Ltd, Cosmoplat Industrial Intelligent Research Institute Qingdao Co Ltd filed Critical Haier Digital Technology Qingdao Co Ltd
Priority to CN202211266725.6A priority Critical patent/CN115766734A/en
Publication of CN115766734A publication Critical patent/CN115766734A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • General Factory Administration (AREA)

Abstract

The application provides a visual detection method and system based on cloud service. The system comprises: the system comprises a cloud platform management system and a plurality of algorithm service nodes, wherein the cloud platform management system comprises a cloud service management unit and a resource service unit; the resource service unit is used for distributing server resources to the algorithm service node; the cloud service management unit is used for determining a target algorithm node and forwarding a visual detection request to the target algorithm node when receiving the visual detection request sent by the acquisition equipment, wherein the visual detection request comprises an image of a workpiece to be detected and requester information; and the target algorithm service node is used for performing visual algorithm processing on the image of the workpiece to be detected by utilizing the server resource to obtain a visual algorithm processing result, and sending the visual algorithm processing result to the executing mechanism according to the information of the requester. The system saves the hardware configuration requirement and is beneficial to upgrading and transforming the vision algorithm.

Description

Visual detection method and system based on cloud service
Technical Field
The present application relates to cloud computing technologies, and in particular, to a visual inspection method and system based on cloud services.
Background
Machine vision is a branch of the rapid development of artificial intelligence, and is one of the key technologies in the production process. On a machine or a production line, machine vision can detect the quality of products so as to reject unqualified products, or guide a robot to complete assembly work, and is closely related to the whole production process.
The existing production line containing the machine vision system comprises a plurality of acquisition devices and a plurality of industrial personal computers, and each industrial personal computer is connected with at least one acquisition device. The workflow is generally as follows: in the transfer process of a workpiece to be detected on a production line, triggering acquisition equipment to acquire an image after the workpiece to be detected is transmitted to a fixed position; the acquisition equipment transmits the image to an industrial personal computer connected with the acquisition equipment, the industrial personal computer can run a machine vision algorithm, and the industrial personal computer feeds back an operation result to an execution mechanism after operating the image; and the executing mechanism performs corresponding operation on the workpiece to be detected according to the operation result.
In the above work flow, each industrial personal computer is configured according to the maximum resource requirement of the detection content of the device, and it is difficult to efficiently utilize resources. Meanwhile, the algorithm on the industrial personal computer is independently deployed, so that the upgrading and the improvement of the whole algorithm are not facilitated.
Disclosure of Invention
The application provides a visual detection method and system based on cloud service, a visual algorithm is migrated to the cloud service, one-time deployment and multiple-place operation are achieved, uniform and safe updating of the algorithm is facilitated, and meanwhile the configuration requirements of an on-site industrial personal computer are lowered.
In one aspect, the present application provides a visual inspection system based on cloud service, the system comprising: the system comprises a cloud platform management system and a plurality of algorithm service nodes, wherein the cloud platform management system comprises a cloud service management unit and a resource service unit, and the plurality of algorithm service nodes are mounted on the cloud service management unit;
the resource service unit is used for allocating server resources to the algorithm service node;
the cloud service management unit is used for determining a target algorithm node in the multiple algorithm service nodes and forwarding the visual detection request to the target algorithm node when receiving a visual detection request sent by acquisition equipment, wherein the visual detection request comprises an image of a workpiece to be detected and requester information;
and the target algorithm service node is used for carrying out visual algorithm processing on the image of the workpiece to be tested by utilizing server resources to obtain a visual algorithm processing result, and sending the visual algorithm processing result to the executing mechanism corresponding to the acquisition equipment according to the requester information.
In another possible implementation manner, the cloud platform management system further includes: a service monitoring unit;
the service monitoring unit is used for monitoring the current state of each algorithm service node, and the current state is used for indicating whether the algorithm service node is in an available state or not;
the cloud service management unit is specifically configured to determine the target algorithm service node based on the algorithm service node whose current state is an available state.
In another possible implementation manner, the service monitoring unit is specifically configured to: monitoring the current state of each algorithm service node through a heartbeat mechanism;
the service monitoring unit is further configured to: when the algorithm service node is found to be abnormal, abnormal information is obtained and written into a log, and warning information is sent to the cloud service management unit.
In another possible implementation manner, each algorithm service node operates independently in a process isolation manner; each algorithm service node comprises an algorithm interface and an algorithm resource directory;
the algorithm interface is used for accessing a preset visual algorithm and carrying out visual algorithm processing on the image of the workpiece to be detected to obtain a visual algorithm processing result;
the algorithm interface comprises a plug-in facade, an algorithm plug-in context and a plug-in base class;
the algorithm resource directory is used for storing algorithm resources, and the algorithm resources comprise temporary data and processing results.
In another possible implementation manner, the resource service unit is further configured to: providing at least two different types of visual algorithm libraries, wherein the visual algorithm libraries are OpenCV-based dependent libraries;
the target algorithm service node is further configured to: and calling a visual algorithm library corresponding to the visual detection request to perform visual algorithm processing on the workpiece image to be detected to obtain a visual algorithm processing result.
In another possible implementation manner, the cloud service management unit is further configured to control an executable application in the algorithm service node, where the control includes at least one of start, pause, delete, and user permission setting, and the executable application is an application based on visual detection.
In another possible implementation manner, the resource service unit is further configured to: providing a hardware driver;
the algorithm service node is further configured to: and calling the hardware equipment supporting the network card through the hardware driver.
In another aspect, the present application provides a visual inspection method based on cloud services, including:
server resources are distributed to the algorithm service nodes;
when a visual detection request sent by acquisition equipment is received, determining a target algorithm node in the plurality of algorithm service nodes, and forwarding the visual detection request to the target algorithm node, wherein the visual detection request comprises an image of a workpiece to be detected and requester information;
and controlling the target algorithm node to perform visual algorithm processing on the image of the workpiece to be detected by utilizing server resources to obtain a visual algorithm processing result, and sending the visual algorithm processing result to an executing mechanism corresponding to the acquisition equipment according to the requester information.
In a third aspect, the present application provides a visual inspection apparatus based on cloud service, including:
the allocation module is used for allocating server resources to the algorithm service node;
the system comprises a determining module, a judging module and a processing module, wherein the determining module is used for determining a target algorithm node in a plurality of algorithm service nodes when receiving a visual detection request sent by acquisition equipment, and forwarding the visual detection request to the target algorithm node, and the visual detection request comprises a detected workpiece image and requester information;
and the sending module is used for controlling the target algorithm node to perform visual algorithm processing on the workpiece image to be tested by utilizing server resources to obtain a visual algorithm processing result, and sending the visual algorithm processing result to the executing mechanism corresponding to the acquisition equipment according to the requester information.
In a fourth aspect, the present invention provides an electronic device comprising:
at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method for cloud service-based visual inspection as described in any of the second aspects above.
In a fifth aspect, the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the method for visual inspection based on cloud services according to any one of the second aspect is implemented.
The application provides a visual detection method and system based on cloud service, wherein when an acquisition device deployed and controlled on site acquires an image of a workpiece to be detected, the image of the workpiece to be detected and information (acquisition device information) of a requester are sent to the visual detection system. When the visual detection system receives the image of the workpiece to be detected and information of a requester, a target algorithm node is determined in a plurality of algorithm service nodes, and the image of the workpiece to be detected is forwarded to the target algorithm node. The algorithm service node analyzes and processes the image of the workpiece to be detected based on the server resources distributed by the resource service unit to obtain a visual algorithm result, and sends the visual algorithm effect to an executing mechanism corresponding to the acquisition equipment, so that the whole detection process is completed.
In the process, the acquisition equipment transmits the acquired image of the workpiece to be detected to the cloud for processing, rather than performing analysis processing through a local industrial personal computer, so that the resource allocation requirement of the local industrial personal computer is reduced, and the cost is effectively saved; meanwhile, the visual algorithm is migrated to the cloud, so that the unified upgrading and improvement of the algorithm are facilitated.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
FIG. 1 is a prior art diagram of a production line field deployment based on machine vision inspection;
fig. 2 is a line drawing of a device based on a visual inspection system according to an embodiment of the present application;
fig. 3 is a schematic diagram of a framework of a cloud service-based vision inspection system according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a visual inspection method based on cloud services according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a visual inspection apparatus based on cloud services according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
Fig. 1 is a production line deployment and control diagram based on machine vision inspection provided in the prior art, specifically, the positional relationship of each part of the production line site is as shown in fig. 1, and the entire production line based on machine vision inspection includes a conveying device 101 for horizontally conveying a workpiece to be inspected, at least one acquisition device 102 disposed above the conveying device 101, and an industrial personal computer 103 connected with the acquisition device 102 in a wired or wireless manner. The conveying device 101 is a conveying belt and a driving mechanism matched with the conveying belt, the collecting devices 102 are industrial cameras of any type, the collecting devices 102 correspond to the industrial personal computer 103 in a one-to-one mode, and the collecting devices 102 and the industrial personal computer 103 can be connected in a wireless mode such as Bluetooth and a wireless network or can be connected through a wired network. Each industrial personal computer 103 is loaded with a corresponding preset vision algorithm.
Specifically, as shown in fig. 1, n stations are provided on the upper surface of the conveyor 101. The collecting devices 102 are located above the stations, and at least one station corresponds to one collecting device 102, that is, the collecting device 102 can collect images of at least one station. For example, each acquisition device 102 acquires an image of the workpiece located at each station according to a preset rule to obtain an image of the workpiece. In the prior art, the acquisition device 102 transmits the acquired image of the workpiece to be detected to the corresponding industrial personal computer 103 in a wireless network manner, and the industrial personal computer 103 analyzes the image of the workpiece to be detected by a preset visual algorithm to obtain an analysis result.
Optionally, the preset rule may be: when n measured workpieces are placed on n stations for processing, the conveying device 101 drives the measured workpieces to move one station at preset time intervals (the preset time is greater than or equal to the processing time), and after the measured workpieces move one station, namely after the current process is completed, images of the n measured workpieces are collected.
Optionally, the production line shown in fig. 1 further includes an actuator (not shown in the figure), and the industrial personal computer 103 transmits the obtained analysis result to the corresponding actuator in a wired or wireless manner. And after receiving the analysis result, the execution mechanism makes corresponding feedback based on the analysis result. The analysis result can be used for indicating whether the tested workpiece is damaged or not or whether the processing is carried out according to the requirement, and the execution mechanism can be an alarm; and when the analysis result shows that the tested workpiece is damaged or is not processed according to the preset requirement, the alarm gives an alarm indication based on the analysis result so as to prompt a worker to process the tested workpiece. The execution mechanism can also be a sorting robot, and when the analysis result is received and the detected workpiece is shown to be damaged or not processed according to the preset requirement, the sorting robot sorts the detected workpiece to a damaged workpiece storage area for storing the damaged workpiece or a workpiece storage area for storing unfinished processes.
In the process, each industrial personal computer 103 can run a preset visual algorithm, and in order to ensure the timeliness of detection, each industrial personal computer 103 is generally configured according to the maximum resource requirement of the detection content of the equipment, while in actual use, the CPU utilization rate of each industrial personal computer 103 is only about 5% -10%, and even when a complex detection algorithm is run, the instantaneous CPU utilization rate is only about 50% -60%, so that the configuration is performed according to the maximum resource requirement, and the problems of high cost and low utilization rate exist. Meanwhile, when the preset visual algorithms in the industrial personal computers 103 need to be updated, algorithm updating improvement needs to be performed on each industrial personal computer 103, and unified management is not facilitated.
On the basis of the embodiment shown in fig. 1, the visual algorithm is migrated to the cloud platform, and the images of the workpiece to be detected transmitted by the acquisition device are analyzed and processed by the visual detection system deployed on the cloud platform. Specifically, the visual inspection system comprises a cloud platform management system and a plurality of algorithm service nodes, wherein the cloud platform provides a plurality of cloud servers, the algorithm service nodes are any computing nodes on the cloud servers, each algorithm service node corresponds to one visual algorithm, each algorithm service node comprises at least one CPU, each algorithm service node is provided with a module management part for switching the action mode of the algorithm service node, and the module management part switches each algorithm service node or coordinates with other algorithm service nodes according to information transmitted from the cloud service management unit.
The specific processing flow of the vision detection system for the image of the detected workpiece is as follows: the cloud platform management system receives the image of the workpiece to be detected and forwards the image of the workpiece to be detected to the corresponding algorithm service node, and the algorithm service node analyzes and processes the image of the workpiece to be detected based on the corresponding visual algorithm to obtain a processing result and feeds the processing result back to the on-site execution mechanism. In the embodiment, the visual algorithm is transferred to the cloud platform, so that the configuration requirement of the field industrial personal computer is effectively reduced, and the resource waste is effectively reduced.
Illustratively, fig. 2 is a device wiring diagram of a cloud service-based visual inspection system provided in an embodiment of the present application. When equipment wiring is carried out, reference can be made to a wiring diagram shown in fig. 2, the acquisition equipment uses an industrial camera, images of a workpiece to be detected on a production line are acquired through the industrial camera 1 and the industrial camera 2, and the images are transmitted to corresponding calculation nodes through corresponding industrial personal computers after the acquisition is finished. Therefore, the production line site specifically can be wired in the following way: industrial camera 1 is connected with industrial computer 1, industrial camera 2 is connected with industrial computer 2, industrial computer 1 uses switch 1 to connect the central router, industrial computer 2 uses wireless connection central router, behind the measured work piece image transmission to central router, cloud platform management system distributes the measured work piece image to cloud server 1 or the operation of the algorithm service node that cloud server 2 corresponds, the output result returns for corresponding industrial computer, make the industrial computer forward for corresponding actuating mechanism, or direct output result returns for corresponding actuating mechanism.
Fig. 3 is a schematic diagram of a framework of a cloud service-based visual inspection system according to an embodiment of the present application, and the embodiment describes the visual inspection system in the foregoing embodiment in detail. As shown in fig. 3, the cloud platform management system provided in this embodiment includes a service monitoring unit, a resource service unit, and a cloud service management unit. The algorithm service node is mounted to the cloud service management unit.
For the embodiment, the service monitoring unit is configured to monitor the current state of each algorithm service node, and send the current state of each algorithm service node to the cloud service management unit. Specifically, the service monitoring unit monitors the current state of each algorithm service node through a heartbeat mechanism, wherein the current state of the algorithm service node is used for indicating whether the algorithm service node is in an available state or not.
Optionally, when monitoring that any algorithm service node is abnormal, the service monitoring unit acquires abnormal information, writes the abnormal information into a log, and sends alarm information to the cloud service management unit.
For the present embodiment, the resource service unit is configured to allocate server resources to the algorithm service node. The server resources comprise algorithm node exclusive resources and shared resources, the exclusive resources can designate resources which can be exclusively shared by a specific developer in the validity period when the resources are allocated, and the shared resources designate the resources which can be commonly used by the developer in the validity period when the resources are allocated.
In particular, the resource servicing unit provides a common dependency environment, i.e., at least two different types of visual algorithm libraries are provided to be invoked by the algorithm servicing node. Optionally, the visual algorithm library can be large versions of two different visual algorithm libraries, namely OpenCV 4 and OpenCV 3, the algorithm service node calls the corresponding algorithm library according to the needs of the algorithm service node, a specific OpenCV dependent library does not need to be maintained in each algorithm service node, and the packaging size of each algorithm is effectively reduced.
The resource service unit also provides the context of the resource directory of the whole system, such as obtaining the real root directory of the system, the IP address of the system host, the hardware information of the system host, such as the MAC address, and the like, and the list of the current available algorithms.
Optionally, the resource service unit is further configured to provide a hardware driver, so that the algorithm service node invokes a hardware device supporting the network card through the hardware driver. Such as a PLC, circuit board, camera, etc. If the connection acquisition equipment is set, the image analysis result of the workpiece to be detected is transmitted, and the analysis result is returned to other display equipment or an execution mechanism.
Optionally, the resource service unit is further configured to view the resource usage information and publish the resource. Specifically, the resource service unit sends a platform use condition query request to the service monitoring unit, receives a total use condition result submitted by the service monitoring unit, records the use information of the system to the server resource through the service monitoring unit, and automatically performs statistics. And after obtaining the result of the use condition, the resource service unit allocates or releases the server resource according to the result of the use condition. Optionally, when a plurality of algorithm service nodes all need to be loaded, a high-performance queue is adopted to improve the use efficiency of resources.
For this embodiment, the cloud service management unit may mount a plurality of algorithm service nodes, and after the algorithm service nodes are mounted to the cloud service management unit, the algorithm service of the algorithm service nodes may be initialized in an operation interface of the cloud service management unit, and three operations of starting to run, ending to run, and running again may be performed. The resource service unit and the cloud service management unit jointly realize the synchronization of algorithm resource catalog storage of the algorithm service node and the cloud service management unit.
Specifically, the user permission, starting, pausing, restarting and deleting of the algorithm Service node on the cloud platform are all managed by the cloud Service management unit, and an executable application program which runs in the Windows session of the algorithm Service node for a long time can be created through the Windows Service technology. These services can be automatically started at computer startup, can be paused and restarted and do not display any user interface. The service is very suitable for being used on a server, can be stably used for a long time without influencing other users working on the same computer, and can be operated in a safety context different from a specific user account of a login user or a default computer account.
The cloud service management unit is also responsible for request distribution of the whole platform, carries out unified monitoring management on different algorithm service nodes deployed on the cloud platform, obtains the available state of each algorithm service node through the service monitoring unit, distributes each request and parameters corresponding to the request to specific algorithm service nodes according to different unique service representations of requesting users, and distributes the result to a requesting party after the algorithm service nodes calculate the result.
Specifically, the cloud service management unit receives a visual detection request sent by the acquisition device and forwards the visual detection request to the target algorithm node. The target algorithm node is determined by the cloud service management unit according to the current state of each algorithm service node, and the current state of each algorithm service node is acquired by the service monitoring unit.
Optionally, if only one algorithm service node whose current state is the available state exists, the algorithm service node is directly determined to be the target algorithm node. If two or more algorithm service nodes with the current states being available states exist, determining a target service node based on the priority of the algorithm service node with the current state being the available state, and optionally determining the algorithm service node with the highest priority as the target algorithm node. The method for determining the priority of the algorithm service node of which the current state is the available state may be as follows: and determining the processing time for analyzing the image of the tested workpiece historically by each algorithm service node to obtain the historical average processing time of each algorithm service node, wherein the shorter the historical average processing time is, the higher the priority of the algorithm service node is.
For this embodiment, the preset visual algorithm accessed by each algorithm service node has an algorithm interface provided by the cloud platform management system, and is specifically divided into three parts: the first part of PluginInterface plug-in interface door surface comprises algorithm initialization, algorithm execution and algorithm termination, and the second part of Context algorithm plug-in Context has the capability of accessing files in the current algorithm plug-in directory, such as obtaining the current plug-in directory and obtaining a file path according to a file name. And acquiring the file and reading the file into a byte array, wherein the method can only read the file under the current plug-in directory. The method can only read the files under the current plug-in directory. And acquiring the file and reading the file as a text line array, wherein the method can only read the file under the current plug-in directory. And the third part of BasePlugin plug-in base class comprises a generic parameter, a generic image and a generic return value.
In this embodiment, each algorithm service node includes an algorithm resource directory, which is used to store preset visual algorithm related resources of the algorithm service node, such as temporary data and result data of some calculation processes, and each algorithm service node is separately managed and cannot call resources across service nodes.
Optionally, each algorithm Service node is separated by Windows Service in a process isolation manner, and one algorithm Service node reports an error or stops running without affecting other algorithm Service nodes.
In the visual detection system based on the cloud service provided by this embodiment, an original visual algorithm is migrated to each algorithm service node in the cloud, server resources are allocated to each algorithm service node through coordination and cooperation of each unit of the cloud platform management system, and the available state of each algorithm service node is monitored in real time, so that when a visual detection request sent by a collection device is received, a target algorithm node can be determined according to the available state of each algorithm service node, the visual detection request is forwarded to the target algorithm node, and the target algorithm node analyzes a detected workpiece image contained in the visual detection request according to a corresponding visual algorithm of the target algorithm node to obtain an analysis result, and sends the analysis result to an execution mechanism corresponding to the collection device.
The visual detection system based on the cloud service provided by the embodiment completes the visual detection of the detected workpiece, and greatly improves the detection efficiency. Meanwhile, the visual algorithm is transferred to the cloud server, the configuration requirement of an industrial personal computer deployed on the site is effectively reduced, and the unified management of the visual algorithm is facilitated.
Fig. 4 is a schematic flowchart of a visual inspection method based on cloud services according to an embodiment of the present disclosure. Some embodiments of the present application are described in detail below with reference to fig. 4. The features of the embodiments and examples described below may be combined with each other without conflict between the embodiments.
As shown in fig. 4, the method provided by the present embodiment includes step S401, step S402, and step S403, wherein,
step S401, server resources are distributed to the algorithm service nodes.
Specifically, server resources are allocated to the respective algorithm service nodes by the resource service unit. And the algorithm service node calls and runs the corresponding visual algorithm based on the server resource.
Step S402, when receiving a visual detection request sent by the acquisition equipment, determining a target algorithm node in a plurality of algorithm service nodes, and forwarding the visual detection request to the target algorithm node.
The cloud service management unit judges whether the acquisition equipment is registered equipment or not when receiving the request equipment information, and determines a target algorithm node according to the request algorithm type and the current state of each algorithm service node if the acquisition equipment is registered equipment.
Specifically, the current state of each algorithm service node is used to indicate whether the algorithm service node is available, and the current state of each algorithm service node is obtained by a service monitoring unit that monitors each algorithm service node in real time.
Optionally, the cloud service management unit determines that the current state is an available state, and the algorithm service node with the highest priority is the target algorithm node. And the algorithm service node with the shortest historical average processing time is the highest priority among the algorithm service nodes. The historical average processing time is the average processing time used by each algorithm service node for historically analyzing the image of the workpiece to be tested.
And S403, performing visual algorithm processing on the image of the workpiece to be detected by the control target algorithm node by using algorithm service resources to obtain a visual algorithm processing result, and sending the visual algorithm processing result to an executing mechanism corresponding to the acquisition equipment according to the information of the requester.
Specifically, the target algorithm node performs visual algorithm processing on the image of the workpiece to be detected based on the corresponding visual algorithm to obtain a processing result, and then sends the processing result to an executing mechanism corresponding to the acquisition device according to the request device information. The execution mechanism performs corresponding actions according to the processing result, and for example, specific actions are listed in the foregoing embodiment, which are not described herein again.
According to the method provided by the embodiment, when the acquisition equipment acquires the image of the workpiece to be detected, the image of the workpiece to be detected and the information of the requester are sent to the cloud service management unit, the cloud service management unit firstly determines whether the acquisition equipment is the registration equipment or not based on the information of the requester, if so, the type of the request algorithm is judged, the image of the workpiece to be detected is forwarded to the target algorithm node according to the type of the request algorithm and the current state of each algorithm service node, the processing result obtained by analyzing the image of the workpiece to be detected by the target algorithm node based on the preset visual algorithm is received, and the processing result is forwarded to the corresponding execution mechanism, so that a complete detection process based on machine vision is completed.
In the process, the visual algorithm is transferred to the cloud server, so that the algorithm service node deployed on the cloud server analyzes and processes the image of the workpiece to be detected acquired by the acquisition equipment, the resource configuration requirement of the industrial personal computer deployed on the site is effectively saved, and the accuracy of visual algorithm analysis and the unified upgrade management of the visual algorithm are enhanced.
In addition, when the target algorithm node is determined, the priority of each algorithm service node is determined firstly, the image of the workpiece to be detected is distributed based on the priority of each algorithm service node, the image of the object to be detected is forwarded to the algorithm service node with good performance, and therefore the accuracy and the detection efficiency of the detection result are improved.
The following embodiments describe a visual inspection apparatus based on cloud services from the perspective of a virtual module or a virtual unit, and the following embodiments are described in detail in the following embodiments.
The embodiment of the present application provides a visual inspection apparatus based on cloud service, as shown in fig. 5, the apparatus includes an allocation module 51, a determination module 52, and a sending module 53, wherein,
an allocation module 51, configured to allocate server resources to the algorithm service node;
the determining module 52 is configured to, when receiving a visual inspection request sent by an acquisition device, determine a target algorithm node among a plurality of algorithm service nodes, and forward the visual inspection request to the target algorithm node, where the visual inspection request includes an image of a workpiece to be inspected and information of a requester;
and the sending module 53 is configured to control the target algorithm node to perform the visual algorithm processing on the image of the workpiece to be tested by using the server resource to obtain a visual algorithm processing result, and send the visual algorithm processing result to the corresponding executing mechanism of the acquisition device according to the information of the requester.
The visual detection device based on the cloud service provided by the embodiment of the application is suitable for the method embodiment and is not repeated herein.
In an embodiment of the present application, an electronic device is provided, as shown in fig. 6, where the electronic device shown in fig. 6 includes: a processor 61 and a memory 62. Wherein the processor 61 is coupled to the memory 62, such as via a bus 63. Optionally, the electronic device may also include a transceiver 64. It should be noted that the transceiver 64 is not limited to one in practical application, and the structure of the electronic device is not limited to the embodiment of the present application.
The Processor 61 may be a Central Processing Unit (CPU) 61, a general purpose Processor 61, a data Signal Processor 61 (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 61 may also be a combination that performs a computational function, such as comprising one or more of a combination of microprocessors 61, a combination of a DSP and microprocessors 61, and the like.
Bus 63 may include a path that transfers information between the aforementioned components. The bus 63 may be a Peripheral Component Interconnect (PCI) bus 63, an Extended Industry Standard Architecture (EISA) bus 63, or the like. The bus 63 may be divided into an address bus 63, a data bus 63, a control bus 63, etc. For ease of illustration, only one thick line is shown in FIG. 6, but does not indicate only one bus 63 or one type of bus 63.
The Memory 62 may be a Read Only Memory 62 (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory 62 (RAM) or other type of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read Only Memory 62 (EEPROM), a Compact Disc Read Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic Disc storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these.
The memory 62 is used for storing application program codes for executing the scheme of the application, and is controlled by the processor 61 to execute. The processor 61 is configured to execute application program code stored in the memory 62 to implement the aspects shown in the foregoing method embodiments.
Among them, electronic devices include but are not limited to: mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal Digital Assistants (PDAs), tablet computers (PADs), portable Multimedia Players (PMPs), in-vehicle terminals (e.g., car navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. But also a server, etc. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
The present application provides a computer-readable storage medium, on which a computer program is stored, which, when running on a computer, enables the computer to execute the corresponding content in the foregoing method embodiments.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A visual inspection system based on cloud services, comprising: the system comprises a cloud platform management system and a plurality of algorithm service nodes, wherein the cloud platform management system comprises a cloud service management unit and a resource service unit, and the plurality of algorithm service nodes are mounted on the cloud service management unit;
the resource service unit is used for allocating server resources to the algorithm service node;
the cloud service management unit is used for determining a target algorithm node in the multiple algorithm service nodes and forwarding the visual detection request to the target algorithm node when receiving a visual detection request sent by acquisition equipment, wherein the visual detection request comprises an image of a workpiece to be detected and requester information;
and the target algorithm service node is used for performing visual algorithm processing on the image of the workpiece to be detected by utilizing server resources to obtain a visual algorithm processing result, and sending the visual algorithm processing result to the executing mechanism corresponding to the acquisition equipment according to the requester information.
2. The system of claim 1, wherein the cloud platform management system further comprises: a service monitoring unit;
the service monitoring unit is used for monitoring the current state of each algorithm service node, and the current state is used for indicating whether the algorithm service node is in an available state or not;
the cloud service management unit is specifically configured to determine the target algorithm service node based on the algorithm service node whose current state is an available state.
3. The system of claim 2, wherein the service monitoring unit is specifically configured to: monitoring the current state of each algorithm service node through a heartbeat mechanism;
the service monitoring unit is further configured to: when the algorithm service node is found to be abnormal, abnormal information is obtained and written into a log, and warning information is sent to the cloud service management unit.
4. The system of claim 1, wherein each algorithmic service node operates independently by means of process isolation; each algorithm service node comprises an algorithm interface and an algorithm resource directory;
the algorithm interface is used for accessing a preset visual algorithm and carrying out visual algorithm processing on the image of the workpiece to be detected to obtain a visual algorithm processing result;
the algorithm interface comprises a plug-in facade, an algorithm plug-in context and a plug-in base class;
the algorithm resource catalog is used for storing algorithm resources, and the algorithm resources comprise temporary data and processing results.
5. The system of claim 1, wherein the resource service unit is further configured to: providing at least two visual algorithm libraries of different types, wherein the visual algorithm libraries are OpenCV-based dependency libraries;
the target algorithm service node is further configured to: and calling a visual algorithm library corresponding to the visual detection request to perform visual algorithm processing on the workpiece image to be detected to obtain a visual algorithm processing result.
6. The system of claim 1, wherein the cloud service management unit is further configured to control an executable application in the algorithm service node, the control including at least one of starting, pausing, deleting, and setting user permissions, and the executable application is an application based on visual inspection.
7. The system of claim 1, wherein the resource service unit is further configured to: providing a hardware driver;
the algorithm service node is further configured to: and calling the hardware equipment supporting the network card through the hardware drive.
8. A visual detection method based on cloud service is characterized by comprising the following steps:
allocating server resources to the algorithm service node;
when a visual detection request sent by acquisition equipment is received, determining a target algorithm node in the plurality of algorithm service nodes, and forwarding the visual detection request to the target algorithm node, wherein the visual detection request comprises an image of a workpiece to be detected and requester information;
and controlling the target algorithm node to perform visual algorithm processing on the image of the workpiece to be tested by utilizing server resources to obtain a visual algorithm processing result, and sending the visual algorithm processing result to an executing mechanism corresponding to the acquisition equipment according to the requester information.
9. An electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the memory-stored computer-executable instructions cause the at least one processor to perform the cloud service-based visual inspection method of claim 8.
10. A computer-readable storage medium having computer-executable instructions stored therein, which when executed by a processor, are configured to implement the cloud service-based visual inspection method of claim 8.
CN202211266725.6A 2022-10-17 2022-10-17 Visual detection method and system based on cloud service Pending CN115766734A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211266725.6A CN115766734A (en) 2022-10-17 2022-10-17 Visual detection method and system based on cloud service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211266725.6A CN115766734A (en) 2022-10-17 2022-10-17 Visual detection method and system based on cloud service

Publications (1)

Publication Number Publication Date
CN115766734A true CN115766734A (en) 2023-03-07

Family

ID=85351698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211266725.6A Pending CN115766734A (en) 2022-10-17 2022-10-17 Visual detection method and system based on cloud service

Country Status (1)

Country Link
CN (1) CN115766734A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116915805A (en) * 2023-07-20 2023-10-20 中移互联网有限公司 Cloud storage image processing method and device and electronic equipment
CN117541911A (en) * 2023-12-20 2024-02-09 烟台新韦达智慧科技有限公司 Management server of cluster type AI detection equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116915805A (en) * 2023-07-20 2023-10-20 中移互联网有限公司 Cloud storage image processing method and device and electronic equipment
CN117541911A (en) * 2023-12-20 2024-02-09 烟台新韦达智慧科技有限公司 Management server of cluster type AI detection equipment
CN117541911B (en) * 2023-12-20 2024-05-17 烟台新韦达智慧科技有限公司 Management server of cluster type AI detection equipment

Similar Documents

Publication Publication Date Title
CN115766734A (en) Visual detection method and system based on cloud service
CN108256118B (en) Data processing method, device, system, computing equipment and storage medium
CN111800443B (en) Data processing system and method, device and electronic equipment
CN113900834B (en) Data processing method, device, equipment and storage medium based on Internet of things technology
CN111625383B (en) Process exception event processing method and device, electronic equipment and storage medium
CN109828830B (en) Method and apparatus for managing containers
CN112269622B (en) Page management method, device, equipment and medium
CN110278101B (en) Resource management method and equipment
CN110633900A (en) Virtual resource allocation method and device and electronic equipment
CN111858112A (en) Method for detecting memory leak, client and server
CN113553178A (en) Task processing method and device and electronic equipment
CN115527603A (en) Hard disk performance testing method, central control machine and testing machine
CN111597024B (en) Cross-domain cluster processing method and device, electronic equipment and storage medium
CN110706148A (en) Face image processing method, device, equipment and storage medium
CN115103007A (en) Service discovery method and device based on distributed cloud and readable storage medium
CN114553762A (en) Method and device for processing flow table items in flow table
CN113849356A (en) Equipment testing method and device, electronic equipment and storage medium
CN113867946A (en) Method, device, storage medium and electronic equipment for accessing resources
CN111475230B (en) Application function configuration method and device and electronic equipment
CN112749062A (en) Server program monitoring method and device, computer equipment and storage medium
CN111339047B (en) Data interaction method, device and system
CN113542073B (en) Product testing method, system, program product and storage medium based on P2P
CN113271228B (en) Bandwidth resource scheduling method, device, equipment and computer readable storage medium
CN114745749A (en) Virtual network element testing method and device, electronic equipment and readable storage medium
US20170286181A1 (en) Deployment and execution of sensing and computational tasks in a network of computing devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination