Industrial vision edge device model security updating method, device, system and computer readable storage medium

By using descriptive metadata to match target operator nodes in industrial vision edge devices and updating the model when the detection software stops running, the problems of unclear model update correspondence and the impact of updates on online detection are solved, thus achieving safe and accurate model replacement.

CN123137690APending Publication Date: 2026-11-20GUANGDONG AOPUTE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611528659.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In existing technologies, when updating the model of industrial vision edge devices, the correspondence between the model to be updated and the operator nodes in the detection project is unclear, the update granularity is coarse, and replacing the model during software operation or equipment production may affect online detection.

Method used

By acquiring descriptive metadata from the model update data, the target operator node is matched, and the model is replaced when the detection software stops running, ensuring that other operator nodes are not affected by the update. At the same time, version chain and canary verification mechanisms are used for security control.

Benefits of technology

It enables accurate model updates, reduces the impact on testing software and production, and ensures the safety and reliability of updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123137690A_ABST
    Figure CN123137690A_ABST
Patent Text Reader

Abstract

The application discloses an industrial visual edge device model security updating method, device, system and computer readable storage medium. The method is executed by an industrial visual edge device running industrial visual detection software, obtains a model file to be updated and metadata thereof, judges whether descriptive metadata for identifying a target operator node exists in model updating data, and finds a matched target operator node in a detection project; a state acquisition result for judging whether the detection software stops running is acquired; only when three conditions of existence of the descriptive metadata, matching of the target operator node and stopping of the detection software are met at the same time, the current model borne by the target operator node is allowed to be replaced by the model file to be updated, and other operator nodes are kept from being replaced by this time of updating. Thus, state-constrained model updating of the target operator node in the detection project is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of industrial vision and industrial artificial intelligence edge software technology, and in particular to a method, apparatus, system, and computer-readable storage medium for securely updating industrial vision edge device models. Background Technology

[0002] Industrial vision inspection software can be deployed on industrial vision edge devices and process objects to be inspected from the industrial site through an inspection process. The inspection process can consist of multiple operator nodes, each of which undertakes processing functions such as positioning, measurement, defect detection, or character recognition. At least one operator node can carry a model to complete the corresponding inspection function.

[0003] When the operator node carrying the model needs to use a new model or an existing historical model, the corresponding model needs to be delivered to the edge device and a corresponding relationship established with the specific operator node in the detection project. If only manual copying and selection are relied upon, mismatches can easily occur between the model, operator node and version; if updates are performed at the granularity of the entire detection project, container or software module, operator nodes that do not need to be updated in this instance may be affected.

[0004] Furthermore, industrial vision edge devices may be in online inspection or production mode. Directly replacing the model currently being used by the operator node in this state could interfere with the operation of the industrial vision inspection software. Therefore, it is necessary to constrain the timing of model replacement while being able to locate the target operator node, and to prevent edge devices that do not meet the safe update conditions from performing the current replacement operation.

[0005] Therefore, there is an urgent need for an industrial vision edge device model update method that can locate target operator nodes, constrain the timing of model replacement, and prevent edge devices that do not meet the safe update conditions from performing the current replacement operation, in order to overcome the above-mentioned defects. Summary of the Invention

[0006] The purpose of this invention is to provide a method, apparatus, system, and computer-readable storage medium for securely updating industrial vision edge device models, in order to solve the technical problems in the prior art such as unclear correspondence between the model to be updated and the operator nodes in the detection project, coarse update granularity, and the possibility that replacing the model during software operation or equipment production may affect online detection.

[0007] To achieve this objective, the present invention adopts the following technical solution: Firstly, this invention provides a secure update method for an industrial vision edge device model. This method is executed by an industrial vision edge device running industrial vision inspection software. The inspection process of the industrial vision inspection software includes multiple operator nodes, and the target operator node among these multiple operator nodes carries the current model. The secure update method for the industrial vision edge device model includes the following steps: S1. Obtain model update data, which includes the model file to be updated and the metadata corresponding to the model file to be updated; S2. Determine whether there is descriptive metadata in the model update data that is associated with the model file to be updated and is used to identify the target operator node. If there is descriptive metadata, search for the target operator node that matches the descriptive metadata in the detection project. S3. Obtain the status acquisition result used to determine whether the industrial vision inspection software has stopped running. The industrial vision inspection software has stopped running means that the industrial vision inspection software has not performed online inference and the industrial vision edge device is in a non-production state.

[0008] S4. When all three conditions are met simultaneously—the existence of descriptive metadata in the model update data, the existence of target operator nodes in the inspection project that match the descriptive metadata, and the status acquisition results indicating that the industrial vision inspection software has stopped running—it is determined that the model update is allowed.

[0009] S5. In response to the determination result that the model update is allowed, replace the current model carried by the matching target operator node with the model file to be updated, and keep other operator nodes in the detection project, except for the matching target operator node, from being replaced by this model update.

[0010] In some implementations, the descriptive metadata also includes target version information and update action information. The target version information is used to identify the target version, and the update action information is used to indicate version advancement or historical version rollback; when the update action information indicates historical version rollback, the target version is an existing historical version of the target operator node.

[0011] In some implementations, the model file to be updated and the descriptive metadata are acquired separately and each has a corresponding model identifier. The edge device associates the model file to be updated with the descriptive metadata based on the model identifier. Alternatively, the edge device can acquire a single model update data package that includes the model file to be updated and its descriptive metadata.

[0012] In some implementations, descriptive metadata includes an operator identifier that uniquely identifies the target operator node. The edge device compares this operator identifier with the operator identifiers of each operator node in the detection project and identifies the operator node with the same operator identifier as the matching target operator node. Alternatively, when the descriptive metadata does not include available operator identifiers, a joint project identifier consisting of the target project identifier, operator type, and operator name can be used to first determine the target detection project instance corresponding to this update, and then perform unique candidate matching within that target detection project instance; if the target detection project instance or candidate operator node cannot be uniquely determined, the target operator node is not considered to have matched successfully.

[0013] In some implementations, step S3 determines whether the industrial vision inspection software has stopped running by detecting the existence of the industrial vision inspection software process, reading the running status flag, calling the running status interface, receiving a heartbeat, or performing an inter-process communication handshake; or, by acquiring at least one of the following: production line production status signal, programmable logic controller production status signal, and stop, changeover, or idle status information actively reported by the industrial vision inspection software.

[0014] In some implementations, descriptive metadata also includes model file checksums. Before replacing the current model with the model file to be updated, an integrity check is performed on the model file to be updated based on the model file checksum, and the replacement is performed if the integrity check passes.

[0015] In some implementations, a grayscale verification device first uses model update data to replace the model of the target operator node and obtains a verification result. Subsequently, other devices to be updated acquire the model update data. Each device to be updated independently performs a judgment on three conditions and replaces the current model carried by the matching target operator node in its own device only when all three conditions are met.

[0016] In some implementations, the cloud-based model repository maintains a version chain of the target operator node and a record of the currently active version of the target operator node on the edge device. After the model replacement is complete, the edge device generates an update result including the edge device, the target operator node, and the target version, and sends the update result to the cloud-based model repository for updating the record of the currently active version.

[0017] In some implementations, when the update action is a rollback of a historical version, the model update data also includes selected node range information. Edge devices belonging to the selected node range obtain the historical model file corresponding to the target historical version, and still use the historical model file to replace the current model carried by the target operator node when all three conditions are met.

[0018] In some implementations, the target version is used as the idempotency criterion for the target operator node within a selected node range. If the currently effective version is the same as the target version, it is not replaced repeatedly; if the currently effective version is different from the target version, the three conditions are still evaluated.

[0019] In some implementations, the edge device sends a rollback result after rolling back to a historical version. The cloud tracks the rollback results by node and sends a retry command when the edge device fails to roll back or times out. In response to the retry command, the edge device re-acquires the historical model file and re-executes the judgment of the three conditions. If the status acquisition result does not indicate that the industrial vision inspection software has stopped running, the rollback can be placed in a pending state, and the three conditions will be re-judged if the re-acquired status acquisition result indicates that the industrial vision inspection software has stopped running.

[0020] In some implementations, when the historical model lacks descriptive metadata for identifying the target operator node, the historical model is sent to the cloud and supplementary descriptive metadata is retrieved from the cloud. This supplementary descriptive metadata is generated by the cloud based on the binding relationship between the model and the target project, target operator node, and model version stored in the existing model asset record that was saved before the supplementation in the unified model repository and uniquely corresponds to the historical model. The historical model is then used as the model file to be updated and associated with the supplementary descriptive metadata to form model update data. If the existing model asset record or the binding relationship cannot be uniquely determined, model update data is not formed.

[0021] In some implementations, industrial vision edge devices interact with any of a plurality of cloud platforms via a cloud-edge communication module and obtain model update data from the cloud platform with which they interact.

[0022] Secondly, this invention provides a secure update device for industrial vision edge devices, which is deployed on industrial vision edge devices running industrial vision inspection software, and includes an update data acquisition module, an operator matching module, a status acquisition module, a security determination module, and a model replacement module. Each module respectively completes the acquisition of model update data, the determination of descriptive metadata and target operator matching, the determination of the detection software's stopped running status, the joint determination of the three conditions, and the replacement of the target operator model.

[0023] Thirdly, this invention provides a secure update system for industrial vision edge devices, comprising a cloud subsystem, a cloud-edge communication module, and an edge update subsystem. The cloud subsystem provides model update data, the cloud-edge communication module transmits the model update data to the edge update subsystem, the edge update subsystem is deployed on the industrial vision edge device, and completes target operator matching, status acquisition, three condition determinations, and target operator model replacement.

[0024] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by an industrial vision edge device, it causes the industrial vision edge device to perform any of the above-described industrial vision edge device model security update methods.

[0025] Compared with the prior art, the present invention has the following beneficial effects: This invention addresses several key aspects. Firstly, it matches the descriptive metadata associated with the model file to be updated with the operator nodes within the detection project, enabling the updated model to be located at a specific target operator node. Secondly, it simultaneously determines the existence of descriptive metadata, the matching of the target operator node, and the cessation of the detection software's operation, constraining the model replacement action to a state where all three conditions are met. Thirdly, during replacement, only the current model carried by the matching target operator node is replaced, while the current models carried by other operator nodes are not replaced by this model update, thus reducing the impact of a single update. Furthermore, after grayscale verification, each edge device independently executes the three condition checks, combining batch horizontal scaling with node-level state control. Finally, this invention supports the restoration of historical versions of target operator nodes within a selected node range through version chains, idempotent determination of limited scope, rollback result tracking, retry, and pending processing mechanisms.

[0026] The present invention has other features and advantages, which will be apparent from or will be set forth in detail in the accompanying drawings and following detailed description, which together serve to explain the particular principles of the invention. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a schematic diagram of the overall architecture of the industrial vision edge device model security update method in Embodiment 1 of the present invention.

[0029] Figure 2 This is a schematic diagram of the overall process of model security update in Embodiment 1 of the present invention.

[0030] Figure 3 This is a schematic diagram of the three-condition joint determination process in Embodiment 1 of the present invention.

[0031] Figure 4This is a schematic diagram of the replacement of the target operator node model in the detection project in Embodiment 1 of the present invention.

[0032] Figure 5 This is a schematic diagram of the version chain and batch rollback process in Embodiment 1 of the present invention.

[0033] Figure 6 This is a schematic diagram of the overall logic of one embodiment of the industrial vision edge device model security update method in Embodiment 1 of the present invention.

[0034] Figure 7 This is a schematic diagram of the components of the industrial vision edge device model security update device in Embodiment 2 of the present invention.

[0035] Figure 8 This is a schematic diagram illustrating the composition and interaction of the industrial vision edge device model security update system in Embodiment 3 of the present invention. Detailed Implementation

[0036] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this application in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this application and are therefore intended to limit the scope of protection of this application.

[0037] The industrial vision edge devices referred to in this article are edge computing devices capable of running industrial vision inspection software and performing vision inspection processing in industrial settings. Industrial vision inspection software can be configured with one or more inspection projects, each project comprising multiple operator nodes. It should be noted that operator nodes are software functional nodes within an inspection project, and do not necessarily represent physically independent hardware components.

[0038] The term "industrial vision inspection software stop running" as used in this article refers to the industrial vision inspection software not performing online inference and the industrial vision edge device being in a non-production state, and is not limited to the software process having to exit; when it cannot be confirmed that the industrial vision inspection software is not performing online inference, the status acquisition result does not indicate that the industrial vision inspection software has stopped running.

[0039] The target operator node is the operator node to which this model update points. The current model is the model that the target operator node carried before this replacement, and the model file to be updated is the model file that is intended to be used to replace the current model. When the update action is a rollback of a historical version, the model file to be updated can be a historical model file corresponding to the target historical version.

[0040] Model update data is used to provide edge devices with the model file to be updated and the corresponding metadata. The model file to be updated and the metadata can be transmitted separately and associated with each other on the edge device, or they can be encapsulated in a single model update data packet. Regardless of the organization method, the correspondence between the model file to be updated and the descriptive metadata is maintained.

[0041] Descriptive metadata is used to identify the target operator node corresponding to the model to be updated, and can also identify the target version and update action. For example, fields of descriptive metadata may include one or more of operatorId, operatorType, operatorName, targetProjectId, modelId, modelVersion, prevModelVersion, checksum, updateAction, or releaseTimestamp. The above field names are used to explain the technical meaning of the corresponding information and do not imply that all fields are required.

[0042] The three conditions referred to in this article are: the presence of descriptive metadata in the model update data, the existence of target operator nodes in the inspection project that match the descriptive metadata, and the status acquisition result indicating that the industrial vision inspection software has stopped running. It is worth noting that the three conditions are logically ANDed; only when all three conditions are met simultaneously will a decision be made to allow the model update.

[0043] Example 1 Please see Figures 1-6 In the industrial vision edge device model security update method of this embodiment, the industrial vision edge device runs industrial vision inspection software. The inspection process includes multiple operator nodes connected in series or associated according to the inspection process, wherein the target operator node carries the current model. The edge device executes steps S1 to S5. Figure 1 This diagram illustrates the overall architecture of the method in this embodiment. Figure 6 A general logical diagram illustrating one implementation of the method of this embodiment is shown. The implementation process of each step of this embodiment will be described in detail below.

[0044] As an optional implementation of Embodiment 1, the model update data, matching, state acquisition, integrity verification, grayscale horizontal scaling, and compatibility mode can be configured as follows. The following optional features can be used individually or in combination in Embodiment 1, unless there is a clear substitution relationship between the corresponding technical features.

[0045] S1. Obtain model update data, which includes the model file to be updated and the metadata corresponding to the model file to be updated.

[0046] Understandably, the input to this step includes the model file to be updated and its metadata, and the output is model update data that can be used for subsequent metadata judgment, target operator matching, and model replacement. The model update data can be provided by the cloud subsystem via the cloud-edge communication module.

[0047] In a multi-cloud access approach, industrial vision edge devices interact with any of multiple cloud platforms via a cloud-edge communication module, obtaining model update data from the cloud platform with which they are currently interacting. Edge devices do not need to use all cloud platforms simultaneously as data sources for a single update.

[0048] For example, the cloud-edge communication module can use communication methods such as remote procedure calls, hypertext transfer, WebSocket, or message queues to transmit model update data and update results between the cloud subsystem and the edge update subsystem. Within the edge device, data interaction can also be performed using methods such as shared memory, named pipes, or local sockets. The above methods are all optional examples and do not constitute a set of protocols that must be used simultaneously.

[0049] In the implementation of separate acquisition of model files and metadata, the model file to be updated and the descriptive metadata each have corresponding model identifiers. The edge device reads the model identifiers of both and associates the model file to be updated with the descriptive metadata when the model identifiers match. The descriptive metadata also carries information used to identify the target operator node, thereby establishing a correspondence between the model file, the descriptive metadata, and the subsequently determined target operator node.

[0050] In the alternative implementation of single-packet acquisition, the edge device acquires a single model update data packet, which includes the model file to be updated and its corresponding descriptive metadata. The edge device retrieves two types of data from the data packet and then performs subsequent judgments. It is understandable that single-packet acquisition and separate acquisition are two alternative ways to organize model update data, without changing the content of the three condition judgments.

[0051] Descriptive metadata can include target version information and update action information. Update action information can indicate version advancement or historical version rollback. When advancing a version, the target version is the version that is to be implemented on the target operator node; when rolling back a historical version, the target version is a historical version that already exists in the version chain of the target operator node.

[0052] The model identifier in the descriptive metadata is used to establish the association between the model file to be updated and the descriptive metadata; the operator identifier is used to locate the target operator node; the target version information is used to indicate the version to be applied; and the update action information is used to indicate version advancement or historical version rollback. The above information can be carried separately in different data objects, or it can be carried together in a single update data package.

[0053] In the grayscale horizontal display mode, the cloud or update control terminal first provides model update data to the grayscale verification device. The grayscale verification device independently performs descriptive metadata judgment, target operator matching, status acquisition, and joint judgment of three conditions according to Example 1, and completes the model replacement of the target operator node when the conditions are met.

[0054] Once the grayscale verification device passes the verification, the other devices among the multiple industrial vision edge devices (excluding the grayscale verification device) that are to be updated then acquire the model update data corresponding to the same update target. The devices to be updated can be selected based on production line, project, equipment grouping, branch company, or group node range.

[0055] Each device to be updated independently obtains the target operator node matching result and status acquisition result on its own device, and independently executes three condition judgments. If one device meets the three conditions and completes the replacement, it does not mean that other devices will automatically meet the conditions; other devices still need to decide whether to allow the model update based on their own detection process and their own status.

[0056] A unified cloud-based model repository can save corresponding model files, assign version identifiers, and form existing model asset records after model training or evaluation is completed. These existing model asset records store model identifiers and the binding relationships between the model and target project identifiers, operator identifiers, and model versions. They can also be associated with model version chains, training tasks, edge device model or hardware version binding records, and an inventory of installed versions on edge nodes. This implementation uses the model files, version information, and the aforementioned binding relationships provided by the model repository, without limiting the model structure, training algorithm, training data, or training parameters. The incremental generation of version identifiers does not prevent edge devices from switching from the currently active version to an existing historical version.

[0057] In the historical model compatibility approach, if the historical model lacks descriptive metadata to identify the target operator node, the edge device can send the historical model to the cloud. The cloud uses existing model asset records already saved in the unified model repository before this supplementary entry as the basis for supplementation. When the historical model has a model identifier, the cloud prioritizes finding the corresponding existing model asset record based on the model identifier and uses the model file checksum to verify the consistency between the historical model and the existing model asset record. When the historical model does not have a model identifier, candidate model asset records can be filtered based on the model file checksum. However, the model file checksum is only used for integrity verification or candidate record filtering and is not used alone as the basis for determining the binding relationship between the model and the target project, target operator node, and model version.

[0058] The existing model asset record stores the binding relationships between the model and the target project identified by the target project identifier, the target operator node identified by the operator identifier, and the model version. The cloud recovers the target project identifier, operator identifier, and model version from the binding relationships and cross-verifies the recovered binding relationships using at least one auxiliary record from the model version chain, training task record, edge device model or hardware version binding record, and edge node installed version ledger. The cloud generates and returns supplementary descriptive metadata only when a unique existing model asset record and its binding relationship are determined after cross-verification; if no candidate record is found, multiple candidate records exist, or different records conflict with each other, the cloud does not return supplementary descriptive metadata that can be used for automatic updates, and the edge device does not generate model update data.

[0059] It is worth noting that the update action information in the supplemented descriptive metadata is explicitly specified by this model update task and is not automatically inferred as a historical version rollback simply because the model to be supplemented belongs to a historical model. After successful supplementation, the edge device treats the historical model as the model file to be updated, associates the supplemented descriptive metadata with the historical model, and forms model update data that can be matched with the target operator. After the association is completed, the historical model still executes according to steps S2 to S5 of Embodiment 1, and does not skip the three condition judgments due to the supplemented metadata.

[0060] When rolling back a historical version, the update action information indicates that the historical version should be rolled back, the target version information points to the existing historical version of the target operator node, and the model update data also includes the selected node range information. The selected node range can correspond to at least one set of nodes from production lines, engineering, equipment groups, branch offices, or groups.

[0061] The edge device first determines whether it belongs to the selected node range. If the edge device belongs to the range, it retrieves the historical model file corresponding to the target historical version and uses the historical model file as the model file to be updated; if the edge device does not belong to the range, the rollback task is not executed.

[0062] S2. Determine whether there is descriptive metadata in the model update data that is associated with the model file to be updated and is used to identify the target operator node. If there is descriptive metadata, search for the target operator node that matches the descriptive metadata in the detection project.

[0063] Understandably, the edge device first checks if the model update data contains descriptive metadata associated with the model file to be updated and used to identify the target operator node. If this descriptive metadata does not exist, the operator node to which this update points cannot be determined, and therefore no decision is made to allow the model update, nor is the model replacement performed.

[0064] When descriptive metadata exists, the edge device searches for matching target operator nodes within the current detection project based on the descriptive metadata. The search scope is the operator nodes within the detection project corresponding to the current model update, rather than replacing the entire detection project or all models on the edge device together.

[0065] Preferably, an operator identifier is used in a primary matching method. Specifically, the descriptive metadata includes an operator identifier that uniquely identifies the target operator node. The edge device compares this operator identifier with the operator identifiers of each operator node in the detection process, and determines the operator node with the same operator identifier as the matching target operator node. The matching output includes at least the target operator node matching result, and includes the target operator node when the matching is successful.

[0066] In alternative matching methods, when the descriptive metadata does not provide an available operator identifier, a joint project identifier consisting of three fields—target project identifier, operator type, and operator name—can be used.

[0067] Specifically, the edge device first determines the target detection project instance corresponding to this update in its own device based on the target project identifier, and then searches for candidate operator nodes with the same operator type and operator name only within the target detection project instance.

[0068] The uniqueness of this joint project identifier is only required to be valid within each target detection project instance of the edge device receiving this update, and is not required to be globally unique between different edge devices or all detection projects.

[0069] A match is considered successful only if the target project identifier uniquely corresponds to a target detection project instance and the number of candidate operator nodes is one.

[0070] If any field is missing, the target detection project instance cannot be uniquely determined, the number of candidate operator nodes is zero or more than one, or the joint project identifier conflicts with the information recorded by this device, the target operator node is determined to be unmatched, and therefore this model replacement will not be performed.

[0071] It should be noted that when an operator identifier exists and is available, the operator identifier is still used as the primary matching criterion for the target operator node. Furthermore, the joint project identifier does not cover matching results that conflict with operator identifiers.

[0072] S3. Obtain the status acquisition result used to determine whether the industrial vision inspection software has stopped running. The industrial vision inspection software has stopped running means that the industrial vision inspection software has not performed online inference and the industrial vision edge device is in a non-production state.

[0073] Specifically, the edge device acquires the status acquisition results used to determine whether the industrial vision inspection software has stopped running. The status acquisition results are used to indicate whether the aforementioned stop-run state—where online inference is not being performed and the software is in a non-production state—has been reached.

[0074] For example, the status information used to determine whether the industrial vision inspection software has stopped running can be obtained by at least one of the following methods: detecting the existence of the industrial vision inspection software process, reading the running status flag, calling the running status interface, receiving a heartbeat, or performing an inter-process communication handshake. These methods are optional means of obtaining or verifying the stop-run status, and are ultimately used to determine whether the industrial vision inspection software has stopped running.

[0075] Furthermore, whether the industrial vision inspection software has stopped running can also be determined by acquiring at least one of the following methods: production line production status signals, programmable logic controller production status signals, and stop, changeover, or idle status information actively reported by the industrial vision inspection software. The aforementioned signals or information are used to obtain or verify the stopped running state of the industrial vision inspection software, indicating that it has not performed online inference; if this state cannot be confirmed, condition three is not met.

[0076] S4. When all three conditions are met simultaneously—the existence of descriptive metadata in the model update data, the existence of target operator nodes in the inspection project that match the descriptive metadata, and the status acquisition results indicating that the industrial vision inspection software has stopped running—it is determined that the model update is allowed.

[0077] Specifically, the edge device performs a joint determination based on the existence of descriptive metadata, the matching result of the target operator node, and the state acquisition result. When the descriptive metadata exists, the target operator node matches, and the state acquisition result indicates that the detection software has stopped running, all three conditions are met simultaneously, and the edge device outputs a determination result that allows the model to be updated.

[0078] Understandably, when descriptive metadata is missing or no matching target operator node is found, the edge device will not perform the current model replacement. Similarly, if the status acquisition result does not indicate that the detection software has stopped running, the edge device will not perform the current replacement. For tasks that allow waiting, such as rollback, the task can be placed in a pending state and re-evaluated after the status is reacquired.

[0079] Before performing the historical model replacement, the edge device obtains the current effective version of the target operator node and uses the target version as the idempotency determination criterion within the selected node range and the scope defined by the target operator node. This scope is used to avoid extending the determination of the target version of one operator to a global determination shared by all operators or all nodes.

[0080] When the current effective version matches the target version, it indicates that the target operator node on the edge device is already in the target version for this rollback, and therefore the current model will not be replaced again. When the current effective version does not match the target version, the edge device continues to perform the checks on the existence of descriptive metadata, target operator matching, and security status.

[0081] When the status acquisition result does not indicate that the detection software has stopped running, the edge device does not immediately replace the historical model file. Instead, it rolls back the historical version for that edge device to a pending state. In the pending state, the edge device reacquires the status acquisition result, and if the reacquired status acquisition result indicates that the detection software has stopped running, it re-executes the judgment of the three conditions.

[0082] S5. In response to the determination result that the model update is allowed, replace the current model carried by the matching target operator node with the model file to be updated, and keep the current model carried by other operator nodes in the detection project, except for the matching target operator node, from being replaced by this model update.

[0083] Specifically, in response to the determination result that allows model updates, the edge device obtains the model file to be updated corresponding to the target operator node and uses this file to replace the current model carried by the target operator node. The replacement object is limited to the model carried by the target operator node by descriptive metadata and matching results; the current models carried by other operator nodes within the detection project are not replaced by this model update.

[0084] Edge devices perform existence checks on the descriptive metadata associated with historical model files, search for target operator nodes that match the descriptive metadata in the detection process, and obtain status acquisition results to determine whether the detection software has stopped running. Only when all three conditions are met simultaneously is the current model carried by the target operator node replaced with the historical model file, thus switching the currently effective version to the target historical version.

[0085] In the model file integrity verification method, descriptive metadata also includes a model file checksum. Before replacement, the edge device calculates or reads the corresponding checksum result of the model file to be updated based on this checksum, and determines that the integrity verification has passed if the two match. For example, the checksum can be an MD5 value. It is important to note that this verification is for file integrity checking and does not represent identity authentication or a security mechanism to resist malicious attacks.

[0086] If the integrity check fails, the edge device will not use the model file to be updated to perform the current replacement. The integrity check is an optional additional step beyond target operator matching and the three conditional decisions, and does not change the three core conditions: the existence of descriptive metadata, target operator node matching, and software shutdown.

[0087] Furthermore, after the replacement is complete, the target operator node carries the model corresponding to the model file to be updated, while other operator nodes continue to retain the models they carried before this update. The edge device can generate update results to represent the update relationship between the device, the target operator node, and the target version, and use the update results for subsequent version records.

[0088] As an optional extension, this embodiment can maintain a version chain and perform batch rollbacks subject to security locks. See also... Figure 3 and Figure 5 The cloud-based model repository maintains a version chain for the target operator nodes and records the currently active version of the target operator nodes on each edge device. The version identifier in the version chain is used to distinguish different model versions, and the currently active version indicates the version currently used by the target operator node on a specific edge device.

[0089] During normal version updates, the edge device obtains the target version information from the version chain and the currently active version information of the target operator node on its own device. After the edge device completes the model replacement according to Example 1, it generates an update result including the industrial vision edge device, the target operator node, and the target version, and sends the update result to the cloud model repository.

[0090] The cloud-based model repository updates the current active version record of the target operator node on the industrial vision edge device based on the update results. This record reflects the result completed at the edge and does not replace the edge device's judgment of the three conditions before performing the replacement.

[0091] Once the rollback is complete, the edge device generates a rollback result and sends it to the cloud. The rollback result is used to associate the industrial vision edge device, the target operator node, and the target historical version, so that the cloud can track the rollback status by node and update the corresponding records.

[0092] When the cloud determines that a rollback of an edge device has failed based on the rollback results, or determines that the rollback of the edge device has timed out during the corresponding tracking period, it can send a retry command to the edge device. After receiving the retry command, the edge device will re-acquire the historical model file and re-execute the judgment of the three conditions. It cannot skip the security lock just because it is a retry.

[0093] Understandably, through the above method, different edge devices within the selected node range can complete the rollback according to their respective statuses. Devices that have met the conditions complete the historical version switch of the target operator node, devices whose detection software has not yet been confirmed to have stopped running remain pending processing and await reassessment, and devices that have not matched the target operator node do not perform the replacement.

[0094] Example 2 Please see Figure 7The industrial vision edge device model security update device 100 of this embodiment is deployed on an industrial vision edge device running industrial vision inspection software, and includes an update data acquisition module 110, an operator matching module 120, a status acquisition module 130, a security determination module 140, and a model replacement module 150. It should be noted that each module can be divided according to software function, and does not need to correspond to physically independent hardware components. The various components of the industrial vision edge device model security update device 100 of this embodiment will be described in detail below.

[0095] The update data acquisition module 110 receives model files and metadata from the cloud and outputs model update data. When the model files and metadata are obtained separately, the update data acquisition module 110 establishes an association based on the corresponding model identifier; when a single model update data package is obtained, the update data acquisition module 110 retrieves the model file to be updated and its metadata from the data package.

[0096] The operator matching module 120 receives model update data and operator node information of the current detection project, and determines whether there is descriptive metadata in the model update data that is associated with the model file to be updated and used to identify the target operator node. If the descriptive metadata exists, the operator matching module 120 searches for the target operator node based on the operator identifier or other selected matching information, and outputs the result of the existence of descriptive metadata and the matching result of the target operator node.

[0097] The status acquisition module 130 acquires the status acquisition result used to determine whether the industrial vision inspection software has stopped running. The specific method for obtaining the status acquisition result can be any of the methods described in Embodiment 1.

[0098] The security determination module 140 receives the existence result of descriptive metadata, the matching result of the target operator node, and the status acquisition result. Only when the descriptive metadata exists, the target operator node matches, and the status acquisition result indicates that the detection software has stopped running, will the security determination module 140 output a determination result that allows the model to be updated.

[0099] The model replacement module 150 receives a determination result indicating that a model update is permitted, the model file to be updated, and the target operator node. In response to the determination result indicating that a model update is permitted, the model replacement module 150 replaces the current model carried by the target operator node with the model file to be updated, while ensuring that the current models carried by other operator nodes in the detection project are not replaced by this model update.

[0100] The updated data acquisition module 110 can also provide model file verification values ​​to the model replacement module 150, which, or a corresponding verification function, performs integrity verification before replacement. The model replacement module 150 can also generate update or rollback results and return them to the cloud subsystem via the cloud-edge communication module. These additional functions do not alter the basic collaborative relationship between the five modules.

[0101] Example 3 Please see Figure 8 and combined Figure 1 The industrial vision edge device model security update system 200 of this embodiment includes a cloud subsystem 210, a cloud-edge communication module 220, and an edge update subsystem 230. The three form a data interaction relationship through downlink model update data and uplink update or rollback results. The various components of the industrial vision edge device model security update system 200 of this embodiment will be described in detail below.

[0102] The cloud subsystem 210 provides model update data, which includes the model file to be updated and the corresponding metadata. The cloud subsystem 210 can also maintain a version chain and a record of the currently active version of the target operator node on the edge device, and update the corresponding records according to the update or rollback results returned by the edge device.

[0103] The cloud-edge communication module 220 communicates with both the cloud subsystem 210 and the edge update subsystem 230, transmitting model update data from the cloud subsystem 210 to the edge update subsystem 230, and transmitting update results, rollback results, or status information from the edge update subsystem 230 back to the cloud subsystem 210. The cloud-edge communication module 220 can interact with any of the multiple cloud platforms.

[0104] The edge update subsystem 230 is deployed on the industrial vision edge device running the industrial vision inspection software. The edge update subsystem 230 receives model update data, determines whether descriptive metadata exists, searches for the target operator node in the inspection process based on the descriptive metadata, and obtains the status acquisition result used to determine whether the industrial vision inspection software has stopped running.

[0105] The edge update subsystem 230 jointly judges three conditions: the existence of descriptive metadata, the matching of target operator nodes, and the cessation of operation of industrial vision inspection software. When all three conditions are met, it determines that model update is allowed. In response to the allowed result, it only replaces the current model carried by the target operator node, and keeps the current models carried by other operator nodes from being replaced by this model update.

[0106] In this embodiment, when the industrial vision edge device model security update system 200 performs grayscale horizontal scaling, the cloud subsystem 210 first provides model update data to the edge update subsystem 230 corresponding to the grayscale verification device. After obtaining the verification result, it then provides model update data to other devices to be updated. Each edge update subsystem 230 independently performs target operator matching and three condition judgments.

[0107] When the industrial vision edge device model security update system 200 of this embodiment performs historical version rollback, the cloud subsystem 210 provides the target historical version and the selected node range. The edge update subsystem 230 within the selected range obtains the historical model file and reuses the three conditional security locks. The cloud subsystem 210 receives the rollback results of each node through the cloud-edge communication module 220 and can send retry commands for failed or timed-out nodes.

[0108] Example 4 This embodiment stores a computer program on a computer-readable storage medium. When the computer program is executed by the industrial vision edge device, it causes the industrial vision edge device to perform the industrial vision edge device model security update method described in Embodiment 1.

[0109] It is understood that the above-described storage medium implementation method does not limit the processor model, physical type of storage medium, or program instruction format of the industrial vision edge device. As long as the computer program can implement the corresponding method after being executed by the industrial vision edge device, an execution result corresponding to the selected method can be generated.

[0110] Combination Figures 1-8 This invention addresses several key aspects. First, it matches the descriptive metadata associated with the model file to be updated with the operator nodes within the detection project, enabling the model to be updated to be located at a specific target operator node. Second, it simultaneously determines the existence of descriptive metadata, the matching of the target operator node, and the cessation of the detection software's operation, constraining the model replacement action to a state where all three conditions are met. Third, during replacement, only the current model carried by the matching target operator node is replaced, while the current models carried by other operator nodes are not replaced by this model update, thereby reducing the impact of a single update. Fourth, after grayscale verification, each edge device independently executes the three condition judgments, combining batch horizontal expansion with node-level state control. Finally, this invention supports the restoration of historical versions of target operator nodes within a selected node range through version chains, idempotent determination of limited scope, rollback result tracking, retry, and pending processing mechanisms.

[0111] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for securely updating an industrial vision edge device model, characterized in that, The process is executed by an industrial vision edge device running industrial vision inspection software. The inspection process of the industrial vision inspection software includes multiple operator nodes, and the target operator node among the multiple operator nodes carries the current model. The industrial vision edge device model security update method includes the following steps: Obtain model update data, which includes a model file to be updated and metadata corresponding to the model file to be updated. The metadata includes descriptive metadata associated with the model file to be updated and used to identify the target operator node. Determine whether there is descriptive metadata in the model update data that is associated with the model file to be updated and used to identify the target operator node; and if the descriptive metadata exists, search for the target operator node that matches the descriptive metadata in the detection project according to the descriptive metadata. Obtain the status acquisition result used to determine whether the industrial vision inspection software has stopped running. The industrial vision inspection software stopping running means that the industrial vision inspection software is not performing online inference and the industrial vision edge device is in a non-production state. When the following three conditions are met simultaneously: the descriptive metadata exists in the model update data, a target operator node that matches the descriptive metadata exists in the inspection project, and the status acquisition result indicates that the industrial vision inspection software has stopped running, it is determined that the model update is allowed. In response to the determination result that the model update is allowed, the current model carried by the matching target operator node is replaced with the model file to be updated, and other operator nodes in the detection project other than the matching target operator node are not replaced by this model update.

2. The industrial vision edge device model security update method as described in claim 1, characterized in that, The descriptive metadata also includes target version information for identifying the target version and update action information for identifying update actions. The update action information is used to indicate version advancement or historical version rollback. When indicating historical version rollback, the target version is an existing historical version of the target operator node.

3. The industrial vision edge device model security update method as described in claim 1, characterized in that, Obtaining the model update data specifically includes: The model file to be updated and the descriptive metadata are obtained respectively. The model file to be updated and the descriptive metadata each have a corresponding model identifier. The descriptive metadata also includes an operator identifier for identifying the target operator node. The model file to be updated is associated with the descriptive metadata according to the model identifier.

4. The industrial vision edge device model security update method as described in claim 1, characterized in that, Obtaining the model update data specifically includes: Obtain a single model update data package, which includes the model file to be updated and the descriptive metadata corresponding to the model file to be updated.

5. The industrial vision edge device model security update method as described in claim 1, characterized in that, The descriptive metadata includes an operator identifier used to uniquely identify the target operator node. Finding a matching target operator node in the detection process based on the descriptive metadata specifically includes: The operator identifier is compared with the operator identifiers of each operator node in the detection project, and the operator node with the same operator identifier is determined as the matching target operator node.

6. The industrial vision edge device model security update method as described in claim 1, characterized in that, When the descriptive metadata does not include an operator identifier for uniquely identifying the target operator node, the descriptive metadata includes a joint project identifier consisting of the target project identifier, operator type, and operator name; Based on the descriptive metadata, the system searches for matching target operator nodes in the detection process, specifically including: Based on the target project identifier, find the corresponding detection project instance among the detection project instances on the industrial vision edge device; Only when the number of found detection project instances is one, the detection project instance is determined as the target detection project instance, and within the target detection project instance, the operator type and the operator name are compared with the operator type and operator name of each operator node, respectively. Only when there is only one candidate operator node that matches both the operator type and the operator name is that candidate operator node identified as the matching target operator node. If the target project identifier, the operator type, or the operator name is missing, the number of detected project instances is not equal to one, the number of candidate operator nodes is not equal to one, or the joint project identifier conflicts with the information recorded by the industrial vision edge device, it is determined that there is no matching target operator node.

7. The industrial vision edge device model security update method as described in claim 1, characterized in that, Obtaining the state acquisition result specifically includes: The system determines whether the industrial vision inspection software has stopped running by detecting the existence of the process, reading the running status flag, calling the running status interface, receiving a heartbeat, or performing an inter-process communication handshake.

8. The industrial vision edge device model security update method as described in claim 1, characterized in that, Obtaining the state acquisition result specifically includes: By acquiring at least one of the production line production status signals, programmable logic controller production status signals, and stop, changeover, or idle status information actively reported by the industrial vision inspection software, it is determined whether the industrial vision inspection software has stopped running.

9. The method for securely updating the industrial vision edge device model as described in claim 1, characterized in that, The descriptive metadata also includes a model file checksum. Before replacing the current model with the model file to be updated, an integrity check is performed on the model file to be updated based on the model file checksum, and the replacement is performed when the integrity check passes.

10. The method for securely updating the industrial vision edge device model as described in claim 1, characterized in that, The industrial vision edge device is the device to be updated among multiple industrial vision edge devices, excluding the grayscale verification device. Obtaining the model update data specifically includes: after the grayscale verification device has used the model update data to complete the model replacement of the target operator node and obtained the verification result, obtaining the model update data. The industrial vision edge device independently performs the judgment of the three conditions, and replaces the current model carried by the matching target operator node in the industrial vision edge device when the three conditions are met simultaneously.

11. The industrial vision edge device model security update method as described in claim 2, characterized in that, Obtaining the model update data specifically includes: Obtain the target version information in the version chain maintained by the cloud model repository for the target operator node and the currently active version information of the target operator node on the industrial vision edge device; After replacing the current model with the model file to be updated, an update result including the industrial vision edge device, the target operator node, and the target version is generated, and the update result is sent to the cloud model repository for updating the current effective version record of the target operator node.

12. The industrial vision edge device model security update method as described in claim 2, characterized in that, The update action identified by the update action information is a historical version rollback, the target version is the historical version of the target operator node, and the model update data also includes selected node range information. Obtaining the model update data specifically includes: When the industrial vision edge device belongs to the selected node range, the historical model file corresponding to the historical version is obtained, and the historical model file is used as the model file to be updated. When all three conditions are met, the current model carried by the matching target operator node is replaced with the historical model file to switch the current effective version of the target operator node to the historical version.

13. The industrial vision edge device model security update method as described in claim 12, characterized in that, Before replacing the current model with the historical model file, obtain the current effective version of the target operator node, and use the target version as the idempotency determination criterion for the target operator node within the selected node range; If the current effective version is consistent with the target version, the current model will not be replaced again; if the current effective version is inconsistent with the target version, the judgment of the three conditions will continue to be executed.

14. The industrial vision edge device model security update method as described in claim 12, characterized in that, After performing a historical version rollback, the rollback result of the industrial vision edge device is generated and sent. The system receives a retry instruction generated when the rollback fails or times out on the industrial vision edge device based on node-by-node tracking of the rollback result, and in response to the retry instruction, reacquires the historical model file and re-executes the judgment of the three conditions.

15. The industrial vision edge device model security update method as described in claim 12, characterized in that, If the status acquisition result does not indicate that the industrial vision inspection software has stopped running, the historical version of the industrial vision edge device will be rolled back to the pending state. If the status acquisition result is re-acquired in the pending state, and the re-acquired status acquisition result indicates that the industrial vision inspection software has stopped running, the judgment of the three conditions is re-executed.

16. The method for securely updating the industrial vision edge device model as described in claim 1, characterized in that, When the historical model lacks descriptive metadata for identifying the target operator node, the historical model is sent to the cloud, and the supplementary descriptive metadata returned by the cloud is obtained. The supplementary descriptive metadata is generated by the cloud after uniquely identifying the existing model asset record corresponding to the historical model from the unified model repository, and uniquely determining the target project identifier, operator identifier, and model version based on the binding relationship between the model and the target project, target operator node, and model version pre-saved in the existing model asset record. The supplementary descriptive metadata includes the target project identifier, the operator identifier, and the model version. The historical model is used as the model file to be updated, and the supplementary descriptive metadata is associated with the historical model to form the model update data; When the existing model asset record or the binding relationship cannot be uniquely determined, the model update data will not be generated.

17. The method for securely updating industrial vision edge device models as described in claim 1, characterized in that, Obtaining the model update data specifically includes: the industrial vision edge device interacting with any one of multiple cloud platforms through a cloud-edge communication module, and obtaining the model update data from the cloud platform with which the data interaction takes place.

18. A secure update device for industrial vision edge device models, characterized in that, Deployed on an industrial vision edge device running industrial vision inspection software, the inspection process of the industrial vision inspection software includes multiple operator nodes, and the target operator node among the multiple operator nodes carries the current model; The industrial vision edge device model security update device includes: The update data acquisition module is used to acquire model update data, which includes a model file to be updated and metadata corresponding to the model file to be updated. The metadata includes descriptive metadata associated with the model file to be updated and used to identify the target operator node. The operator matching module is used to determine whether there is descriptive metadata associated with the model file to be updated and used to identify the target operator node in the model update data, and when the descriptive metadata exists, to search for the target operator node that matches the descriptive metadata in the detection project. The status acquisition module is used to acquire the status acquisition result for determining whether the industrial vision inspection software has stopped running. The industrial vision inspection software has stopped running means that the industrial vision inspection software has not performed online inference and the industrial vision edge device is in a non-production state. The safety determination module is used to output a determination result that allows model updates when the following three conditions are met simultaneously: the existence of the descriptive metadata in the model update data, the existence of a target operator node that matches the descriptive metadata in the detection project, and the status acquisition result of the operator matching module. The model replacement module is used to replace the current model carried by the matching target operator node with the model file to be updated, based on the determination result of allowing model updates and the model file to be updated obtained by the update data acquisition module, while keeping other operator nodes in the detection project, except for the matching target operator node, from being replaced by this model update.

19. A secure update system for industrial vision edge device models, characterized in that, include: A cloud subsystem is used to provide model update data, which includes a model file to be updated and metadata corresponding to the model file to be updated. The metadata includes descriptive metadata associated with the model file to be updated and used to identify the target operator node. The cloud-edge communication module communicates with both the cloud subsystem and the edge update subsystem to transmit the model update data from the cloud subsystem to the edge update subsystem. The edge update subsystem is deployed on an industrial vision edge device running industrial vision inspection software. The inspection process of the industrial vision inspection software includes multiple operator nodes, and the target operator node among the multiple operator nodes carries the current model. The edge update subsystem is configured as follows: Receive the model update data; Determine whether there is descriptive metadata in the model update data that is associated with the model file to be updated and used to identify the target operator node; and if the descriptive metadata exists, search for the target operator node that matches the descriptive metadata in the detection project according to the descriptive metadata. Obtain the status acquisition result used to determine whether the industrial vision inspection software has stopped running. The industrial vision inspection software stopping running means that the industrial vision inspection software is not performing online inference and the industrial vision edge device is in a non-production state. When the following three conditions are met simultaneously: the descriptive metadata exists in the model update data, a target operator node that matches the descriptive metadata exists in the inspection project, and the status acquisition result indicates that the industrial vision inspection software has stopped running, it is determined that the model update is allowed. In response to the determination result that the model update is allowed, the current model carried by the matching target operator node is replaced with the model file to be updated, and other operator nodes in the detection project other than the matching target operator node are not replaced by this model update.

20. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the industrial vision edge device, it causes the industrial vision edge device to perform the industrial vision edge device model security update method as described in any one of claims 1 to 17.