Real-time data backup method of visual inspection system and related device

Through deep cloning, network topology path determination, load analysis and shared index configuration methods, the problem of insufficient backup efficiency and stability of parameter data in visual detection system is solved, and more efficient and reliable data backup is achieved.

CN120144358APending Publication Date: 2025-06-13GUANGZHOU SMART ROBOVISION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510191804.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the backup of parameter data of visual detection systems, the backup path is fixed and the network topology is not considered, resulting in insufficient backup efficiency and stability. The selection of backup strategy depends on professionals, and the accuracy cannot be guaranteed, which affects system performance.

Method used

By obtaining real-time software parameter data and production parameter data of the visual detection system for deep cloning, determining the target backup path based on the network topology, performing operation load analysis and data backup trend analysis, determining the target backup strategy, and performing shared index configuration, and finally writing the data into the branch backup domain for integration.

Benefits of technology

It improves the reliability and efficiency of parameter data backup, avoids data loss, improves the availability and fault tolerance of the system, and ensures the consistency and reliability of data backup.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144358A_ABST
    Figure CN120144358A_ABST
Patent Text Reader

Abstract

The invention discloses a real-time data backup method of a visual inspection system and a related device, and relates to the technical field of data processing.The method comprises the steps that deep cloning is conducted on real-time software parameter data and real-time production parameter data, and first clone data and second clone data are obtained; determining a target backup path in the plurality of pre-selected backup paths based on the network topology structure; performing operation load analysis based on the operation parameters; performing data backup trend analysis of a branch backup domain on the first clone data and the second clone data to determine a target backup strategy in combination with the operation load analysis data; performing shared index configuration on the first clone data and the second clone data; and writing the first clone data and the second clone data into the corresponding branch backup domains based on a target backup strategy and a target backup path, and integrating the clone data in the branch backup domains by the main backup domain. According to the method, the reliability of parameter data backup can be effectively improved, and parameter data loss when software is abnormal is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular, to a method for real-time backup of data in a visual detection system and related devices. Background Art

[0002] Due to reasons such as software anomalies or operation errors, sometimes the relevant parameter data of the visual detection system is lost or damaged. In order to avoid irreparable consequences, it is necessary to back up the relevant parameter data of the visual detection system. In the current parameter data backup methods, the backup path is basically a fixed path, lacking consideration of the impact of the specific network topology on the backup path, resulting in insufficient efficiency and stability of writing parameter data into the backup domain. At the same time, the selection of the current backup strategy is usually determined based on the data statistics carried out by relevant personnel, but this method is too dependent on the professional qualities of relevant personnel and cannot guarantee the accuracy of the backup strategy selection. If an inappropriate backup strategy is selected, it will not only occupy too many resources, but may also affect the operation performance of the system. At the same time, the current backup of parameter data is usually written into the same backup domain, which cannot effectively improve the availability and fault tolerance of the system, resulting in the failure of the parameter data backup of the visual detection system to achieve the expected effect. Summary of the Invention

[0003] The purpose of the present invention is to overcome the deficiencies of the prior art. The present invention provides a method for real-time backup of data in a visual detection system and related devices, which can effectively improve the reliability of parameter data backup and avoid the loss of parameter data in case of software anomalies.

[0004] To solve the above technical problems, the present invention provides a method for real-time backup of data in a visual detection system, and the method includes:

[0005] Obtain the real-time software parameter data and real-time production parameter data of the visual detection system, and perform deep cloning on the real-time software parameter data and real-time production parameter data to obtain first cloned data corresponding to the real-time software parameter data and second cloned data corresponding to the real-time production parameter data;

[0006] Determine a target backup path from several preselected backup paths based on the network topology structure;

[0007] Obtain the operation parameters of each branch backup domain, and perform operation load analysis based on the operation parameters to obtain operation load analysis data;

[0008] Perform data backup trend analysis on the first cloned data and the second cloned data to obtain data backup trend analysis data, and determine the target backup strategy for the first cloned data and the second cloned data based on the operation load analysis data and the data backup trend analysis data;

[0009] Perform shared index configuration on the first cloned data and the second cloned data to obtain the first cloned data and the second cloned data after shared index configuration;

[0010] Write the first cloned data and the second cloned data after shared index configuration into the corresponding branch backup domains based on the target backup policy and the target backup path, and the main backup domain integrates the cloned data in each branch backup domain.

[0011] Optionally, the performing deep cloning on the real-time software parameter data and the real-time production parameter data to obtain the first cloned data corresponding to the real-time software parameter data and the second cloned data corresponding to the real-time production parameter data includes:

[0012] Perform replication of object node attributes on the real-time software parameter data and the real-time production parameter data to obtain the first cloned data corresponding to the real-time software parameter data and the second cloned data corresponding to the real-time production parameter data.

[0013] Optionally, the determining the target backup path from several preselected backup paths based on the network topology structure includes:

[0014] Obtain the network environment of the vision detection system, and construct a network topology structure based on the network environment;

[0015] Perform failure node detection on the network topology structure to obtain a failure node detection result;

[0016] Obtain the on-off information of each link in the network topology structure, and construct a snapshot graph based on the on-off information;

[0017] Determine the target backup path from several preselected backup paths by using minimum cost analysis based on the snapshot graph and the failure node detection result.

[0018] Optionally, the performing running load analysis based on the running parameters to obtain running load analysis data includes:

[0019] Calculate the load values and performance values of each branch backup domain based on the running parameters;

[0020] Perform load constraint analysis and bearing constraint analysis on each branch backup domain based on the running parameters to obtain load constraint analysis data and bearing constraint analysis data;

[0021] Perform running load analysis based on the load values, performance values, load constraint analysis data and bearing constraint analysis data to obtain the running load analysis data of each branch backup domain.

[0022] Optionally, performing data backup trend analysis on the first cloned data and the second cloned data in the branch backup domain to obtain data backup trend analysis data, and determining the target backup policies for the first cloned data and the second cloned data based on the running load analysis data and the data backup trend analysis data includes:

[0023] Obtaining the first data volume of the first cloned data and the second data volume of the second cloned data, and performing running load trend analysis on the branch backup domain by using a time series prediction model based on the first data volume and the second data volume to obtain running load trend analysis data;

[0024] Performing network bandwidth situation analysis and space resource utilization rate analysis on each branch backup domain to obtain network bandwidth situation data and space resource utilization rate data;

[0025] Performing data backup trend analysis on the branch backup domain based on the running load trend analysis data, the network bandwidth situation data, and the space resource utilization rate data to obtain data backup trend analysis data;

[0026] Performing hierarchical clustering analysis on each backup policy based on the running load analysis data and the data backup trend analysis data to obtain importance data of each backup policy;

[0027] Constructing a data regression analysis model, and determining the target backup policies for the first cloned data and the second cloned data among several backup policies based on the importance data by using the data regression analysis model.

[0028] Optionally, performing shared index configuration on the first cloned data and the second cloned data to obtain the first cloned data and the second cloned data after shared index configuration includes:

[0029] Obtaining the primary key index of the primary key table and the foreign key index of the foreign key table, and generating a shared index item by using identity merging based on the primary key index and the foreign key index;

[0030] Adding the shared index item to the first cloned data and the second cloned data to obtain the first cloned data and the second cloned data after shared index configuration.

[0031] Optionally, writing the first cloned data and the second cloned data after shared index configuration into the corresponding branch backup domain based on the target backup policy and the target backup path, and the primary backup domain integrating the cloned data in each branch backup domain includes:

[0032] Determine the target branch backup domains corresponding to the first cloned data and the second cloned data after the shared index configuration based on the target backup policy and the target backup path, and write the first cloned data and the second cloned data after the shared index configuration into their respective target branch backup domains;

[0033] The main backup domain collects and integrates the cloned data in each branch backup domain based on a preset time period.

[0034] In addition, the present invention also provides a data real-time backup device for a visual detection system, and the device includes:

[0035] Data deep cloning module: used to obtain the real-time software parameter data and real-time production parameter data of the visual detection system, and perform deep cloning on the real-time software parameter data and real-time production parameter data to obtain the first cloned data corresponding to the real-time software parameter data and the second cloned data corresponding to the real-time production parameter data;

[0036] Backup path determination module: used to determine the target backup path from several preselected backup paths based on the network topology structure;

[0037] Operating load analysis module: used to obtain the operating parameters of each branch backup domain, and perform operating load analysis based on the operating parameters to obtain operating load analysis data;

[0038] Backup policy determination module: used to perform data backup trend analysis on the first cloned data and the second cloned data in the branch backup domain to obtain data backup trend analysis data, and determine the target backup policies of the first cloned data and the second cloned data based on the operating load analysis data and the data backup trend analysis data;

[0039] Shared index configuration module: used to perform shared index configuration on the first cloned data and the second cloned data to obtain the first cloned data and the second cloned data after the shared index configuration;

[0040] Parameter data backup module: used to write the first cloned data and the second cloned data after the shared index configuration into the corresponding branch backup domains based on the target backup policy and the target backup path, and the main backup domain integrates the cloned data in each branch backup domain.

[0041] In addition, the present invention also provides an electronic device, the electronic device includes a processor and a memory, the memory is used to store instructions, and the processor is used to call the instructions in the memory so that the electronic device executes the above-mentioned data real-time backup method for the visual detection system.

[0042] In addition, the present invention also provides a computer-readable storage medium storing computer instructions, which, when running on an electronic device, cause the electronic device to execute the data real-time backup method of the above-mentioned vision detection system.

[0043] In the embodiments of the present invention, deep cloning of the real-time software parameter data and real-time production parameter data of the vision detection system can ensure that the obtained cloned data is independent of and does not affect the original data, ensuring the reliability of data cloning. Determining the target backup path among several preselected backup paths by using minimum cost analysis based on the snapshot graph generated by the network topology structure and the failed node detection result can effectively improve the reliability of writing the cloned data into the backup domain, and at the same time, the data backup efficiency can be improved through the target backup path. Performing an operating load analysis based on the operating parameters of each branch backup domain, analyzing the data backup trend of the first cloned data and the second cloned data in the branch backup domain, and determining the target backup strategy for the first cloned data and the second cloned data based on the operating load analysis data and the data backup trend analysis data can more comprehensively analyze the required backup strategy, improve the accuracy of backup strategy selection, allocate resources more reasonably, improve the backup efficiency, and avoid resource waste. Configuring a shared index for the first cloned data and the second cloned data, without having to scan the data multiple times for each backup, improves the data backup efficiency. Writing the first cloned data and the second cloned data after shared index configuration into the corresponding branch backup domains based on the target backup strategy and the target backup path, and the main backup domain integrating the cloned data in each branch backup domain can effectively improve the availability and fault tolerance of the system, ensure the consistency and reliability of data backup, and make the parameter data backup of the vision detection system achieve a more ideal effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for description in the embodiments or the prior art. Obviously, the following described drawings are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0045] Figure 1 It is a flowchart of the data real-time backup method of the vision detection system in the embodiments of the present invention;

[0046] Figure 2 It is a flowchart of the data real-time backup method of the vision detection system in another embodiment of the present invention;

[0047] Figure 3It is a schematic structural diagram of a data real-time backup device of a visual detection system in an embodiment of the present invention;

[0048] Figure 4 It is a schematic structural diagram of an electronic device in an embodiment of the present invention. Specific embodiments

[0049] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0050] Embodiment 1

[0051] Please refer to Figure 1 , Figure 1 It is a schematic flowchart of a data real-time backup method of a visual detection system in an embodiment of the present invention, and the method includes:

[0052] S11: Obtain the real-time software parameter data and real-time production parameter data of the visual detection system, and perform deep cloning on the real-time software parameter data and real-time production parameter data to obtain first cloned data corresponding to the real-time software parameter data and second cloned data corresponding to the real-time production parameter data;

[0053] In the specific implementation process of the present invention, the performing deep cloning on the real-time software parameter data and real-time production parameter data to obtain first cloned data corresponding to the real-time software parameter data and second cloned data corresponding to the real-time production parameter data includes: copying the object node attributes of the real-time software parameter data and real-time production parameter data to obtain first cloned data corresponding to the real-time software parameter data and second cloned data corresponding to the real-time production parameter data.

[0054] Specifically, obtain the real-time software parameter data and real-time production parameter data of the vision detection system. The real-time software parameter data includes the real-time software parameters loaded by the vision detection system and the software parameters manually added or modified. The real-time production parameter data includes the real-time production parameters of each detection station collected by the vision detection system, such as production instruction data and station progress data, etc. Copy the object node attributes of the real-time software parameter data and the real-time production parameter data. Data deep cloning refers to the process of completely copying an object and all its nested objects, ensuring that the copied object is independent of and does not affect the original object. By copying the object node attributes, that is, recursively copying all levels of the real-time software parameter data and the real-time production parameter data, obtain the first cloned data corresponding to the real-time software parameter data and the second cloned data corresponding to the real-time production parameter data. By performing deep cloning on the parameter data, the reliability of data cloning can be ensured, and operations can be carried out without affecting the original data, saving the time of data processing.

[0055] S12: Determine the target backup path from several preselected backup paths based on the network topology structure;

[0056] In the specific implementation process of the present invention, the determining the target backup path from several preselected backup paths based on the network topology structure includes: obtaining the network environment of the vision detection system and constructing a network topology structure based on the network environment; performing a failure node detection on the network topology structure to obtain a failure node detection result; obtaining the on / off information of each link in the network topology structure and constructing a snapshot graph based on the on / off information; and determining the target backup path from several preselected backup paths by using minimum cost analysis based on the snapshot graph and the failure node detection result.

[0057] Specifically, obtain the network environment of the vision detection system, that is, obtain several network nodes and data links of the vision detection system, and construct a network topology structure based on the network environment, and construct a network topology structure according to several network nodes and data links. Detect failed nodes in the network topology structure. The identifier of a failed node is the identifier of the node corresponding to a network device with an abnormal running state. If a failed node is detected, update the network topology structure to obtain a failed node detection result. Obtain the on / off information of each link in the network topology structure, including the moment when each data link is disconnected, the duration of data communication, etc., and construct a snapshot graph based on the on / off information. Determine the link cost of each data link according to the on / off information, and construct a snapshot graph according to the link cost and the set of each data link. Based on the snapshot graph and the failed node detection result, use minimum cost analysis to determine a target backup path among several preselected backup paths. Calculate the node-link cost of the snapshot graph through Dijkstra's algorithm to obtain the node-link cost, and use the depth-first search algorithm to update the node-link cost of the snapshot graph to obtain an updated snapshot graph. With the minimum cost as the optimization goal, combine the updated snapshot graph and the valid node identifiers generated by the failed node detection result, and use the path search model to perform a depth search for the minimum cost backup path to obtain the target backup path.

[0058] S13: Obtain the running parameters of each branch backup domain, and perform running load analysis based on the running parameters to obtain running load analysis data;

[0059] In the specific implementation process of the present invention, the performing running load analysis based on the running parameters to obtain running load analysis data includes: calculating the load value and performance value of each branch backup domain based on the running parameters; performing load constraint analysis and bearing constraint analysis on each branch backup domain based on the running parameters to obtain load constraint analysis data and bearing constraint analysis data; performing running load analysis based on the load value, performance value, load constraint analysis data, and bearing constraint analysis data to obtain the running load analysis data of each branch backup domain.

[0060] Specifically, obtain the operation parameters of each branch backup domain. Each branch backup domain has its own backup management server and media server. Obtain the memory size, backup network bandwidth, memory utilization rate, etc. of each branch backup domain. Calculate the load value and performance value of each branch backup domain based on the operation parameters. Calculate the performance value of each branch backup domain according to the memory size, backup network bandwidth, and processing frequency in the operation parameters combined with their corresponding weights. Calculate the load value of each branch backup domain according to the memory utilization rate, network bandwidth utilization rate, and processor utilization rate in the operation parameters and their corresponding weights. Conduct load constraint analysis and bearing constraint analysis on each branch backup domain based on the operation parameters, that is, conduct load constraint condition analysis and bearing constraint condition analysis on each branch backup domain, conduct upper limit analysis of load requirements and upper limit analysis of bearing resource requirements for each branch backup domain, and obtain load constraint analysis data and bearing constraint analysis data. Conduct operation load analysis based on the load value, performance value, load constraint analysis data, and bearing constraint analysis data. Input the load value, performance value, load constraint analysis data, and bearing constraint analysis data into the load analysis model to obtain the operation load analysis data of each branch backup domain.

[0061] S14: Conduct data backup trend analysis on the first cloned data and the second cloned data in the branch backup domain to obtain data backup trend analysis data, and determine the target backup strategies for the first cloned data and the second cloned data based on the operation load analysis data and the data backup trend analysis data;

[0062] In the specific implementation process of the present invention, the conduct of data backup trend analysis on the first cloned data and the second cloned data in the branch backup domain to obtain data backup trend analysis data, and the determination of the target backup strategies for the first cloned data and the second cloned data based on the operation load analysis data and the data backup trend analysis data includes: obtaining the first data volume of the first cloned data and the second data volume of the second cloned data, and conducting operation load trend analysis on the branch backup domain using the time series prediction model based on the first data volume and the second data volume to obtain operation load trend analysis data; conducting network bandwidth situation analysis and space resource utilization rate analysis on each branch backup domain to obtain network bandwidth situation data and space resource utilization rate data; conducting data backup trend analysis on the branch backup domain based on the operation load trend analysis data, network bandwidth situation data, and space resource utilization rate data to obtain data backup trend analysis data; conducting hierarchical clustering analysis on each backup strategy based on the operation load analysis data and the data backup trend analysis data to obtain importance data of each backup strategy; constructing a data regression analysis model, and determining the target backup strategies for the first cloned data and the second cloned data from several backup strategies based on the data regression analysis model using the importance data.

[0063] Specifically, obtain the first data volume of the first cloned data and the second data volume of the second cloned data, and based on the first data volume and the second data volume, use a time series prediction model to analyze the operation load trend of the branch backup domain, obtain an operation load data sample set, train according to the operation load data sample set to obtain a number of time series sub-models, construct a time series prediction model according to the number of time series sub-models, perform memory occupancy analysis according to the first data volume and the second data volume to obtain target memory occupancy data, perform clustering analysis according to the target memory occupancy data to obtain a clustering analysis result, and use the clustering analysis result according to the time series prediction model to analyze the operation load range of the branch backup domain in different operation states, that is, obtain operation load trend analysis data. Analyze the network bandwidth situation and space resource utilization rate of each branch backup domain to obtain network bandwidth situation data and space resource utilization rate data. Based on the operation load trend analysis data, network bandwidth situation data, and space resource utilization rate data, perform data backup trend analysis of the branch backup domain, determine the space occupancy rate growth trend and subsequent operation load trend of the branch backup domain based on the operation load trend analysis data, network bandwidth situation data, and space resource utilization rate data, determine data backup trend analysis data according to the space occupancy rate growth trend and subsequent operation load trend, and obtain data backup trend analysis data. Based on the operation load analysis data and data backup trend analysis data, perform hierarchical clustering analysis on each backup strategy, convert the backup strategy information of each backup strategy into corresponding discrete values. The backup information of the backup strategy includes backup period, backup method, backup destination, etc. Determine the similarity between each backup strategy according to the Euclidean distance between the discrete values of each backup strategy information, and classify the backup strategies into strategies that need to be focused on and strategies that do not need to be focused on according to the similarity between the backups, combined with the operation load analysis data and data backup trend analysis data. Determine the importance data according to the corresponding discrete values, that is, obtain the importance data of each backup strategy. Construct a data regression analysis model, perform modeling and fitting according to the importance data of each backup strategy and the backup strategy information to obtain a data regression analysis model, and based on the data regression analysis model, use the importance data to determine the target backup strategy of the first cloned data and the second cloned data among a number of backup strategies. Input the importance data of each backup strategy into the data regression analysis model for policy priority calculation to obtain a policy priority coefficient, and use the backup strategy with the highest policy priority coefficient as the target backup strategy.

[0064] S15: Configure a shared index for the first cloned data and the second cloned data to obtain the first cloned data and the second cloned data after the shared index configuration;

[0065] In the specific implementation process of the present invention, the step of performing shared index configuration on the first cloned data and the second cloned data to obtain the first cloned data and the second cloned data after the shared index configuration includes: obtaining the primary key index of the primary key table and the foreign key index of the foreign key table, and generating a shared index item by merging using identifiers based on the primary key index and the foreign key index; adding the shared index item to the first cloned data and the second cloned data to obtain the first cloned data and the second cloned data after the shared index configuration.

[0066] Specifically, to obtain the primary key index of the primary key table and the foreign key index of the foreign key table, and generate a shared index item by merging using identifiers based on the primary key index and the foreign key index, obtain the foreign key value of the foreign key index, match the table identifier of the foreign key table and the data record identifier of the foreign key index according to the foreign key value, and merge with the primary key index according to the table identifier and the data record identifier to form a shared index item. Adding the shared index item to the first cloned data and the second cloned data to obtain the first cloned data and the second cloned data after the shared index configuration. Through the configuration of the shared index, it is not necessary to scan the data multiple times during data backup, and the processes such as data backup and management can be combined into a more efficient process.

[0067] S16: Write the first cloned data and the second cloned data after the shared index configuration into the corresponding branch backup domains based on the target backup policy and the target backup path, and the primary backup domain integrates the cloned data in each branch backup domain.

[0068] In the specific implementation process of the present invention, the step of writing the first cloned data and the second cloned data after the shared index configuration into the corresponding branch backup domains based on the target backup policy and the target backup path, and the primary backup domain integrates the cloned data in each branch backup domain includes: determining the respective target branch backup domains corresponding to the first cloned data and the second cloned data after the shared index configuration based on the target backup policy and the target backup path, and writing the first cloned data and the second cloned data after the shared index configuration into their respective target branch backup domains; the primary backup domain collects and integrates the cloned data in each branch backup domain based on a preset time period.

[0069] Specifically, based on the target backup policy and the target backup path, determine the target branch backup domains corresponding to the first cloned data and the second cloned data after the shared index configuration. The target backup policy determines the backup destination and backup method of the cloned data, and the target backup path determines the writing method and writing channel of the cloned data. Then, write the first cloned data and the second cloned data after the shared index configuration into their respective target branch backup domains. The primary backup domain collects and integrates the cloned data in each branch backup domain based on a preset period. Each branch backup domain operates independently, and the connection network failure of the primary backup domain does not affect the branch backup domains. The branch backup domains automatically push the data to the primary backup domain and automatically repair the data transmission when the connection network terminal between the branch backup domain and the primary backup domain is restored. Even if the primary backup domain fails, the branch backup domain can still provide data access to ensure business continuity. Load balancing can be achieved between the primary backup domain and the branch backup domains, and the read and write operations are distributed to different domains, thereby reducing the load pressure on a single domain, improving the overall performance and stability of the system. At the same time, in the event of a disaster, the business operation can be quickly restored by switching to the branch backup domain, reducing the downtime. Since the data has been replicated to the branch backup domain, the work of the primary backup domain can be quickly taken over to ensure business continuity and data integrity.

[0070] In the embodiment of the present invention, deep cloning of the real-time software parameter data and real-time production parameter data of the vision detection system can ensure that the obtained cloned data is independent of each other and does not affect each other, ensuring the reliability of data cloning. Determining the target backup path from several preselected backup paths using the minimum cost analysis based on the snapshot graph generated by the network topology structure and the failed node detection results can effectively improve the reliability of writing the cloned data into the backup domain, and at the same time, the data backup efficiency can be improved through this target backup path. Performing an operating load analysis based on the operating parameters of each branch backup domain, and conducting a data backup trend analysis of the first cloned data and the second cloned data in the branch backup domains. Determining the target backup policies for the first cloned data and the second cloned data based on the operating load analysis data and the data backup trend analysis data can more comprehensively analyze the required backup policies, improve the accuracy of backup policy selection, allocate resources more reasonably, improve the backup efficiency, and avoid resource waste. Configuring the shared index for the first cloned data and the second cloned data can avoid multiple scans of the data for each backup, improving the data backup efficiency. Writing the first cloned data and the second cloned data after the shared index configuration into the corresponding branch backup domains based on the target backup policy and the target backup path, and the primary backup domain integrating the cloned data in each branch backup domain can effectively improve the availability and fault tolerance of the system, ensure the consistency and reliability of data backup, and make the parameter data backup of the vision detection system achieve a more ideal effect.

[0071] Embodiment 2

[0072] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of the data real-time backup method for the visual detection system in another embodiment of the present invention. The method includes:

[0073] S201: Obtain the real-time software parameter data and real-time production parameter data of the visual detection system, and perform deep cloning on the real-time software parameter data and real-time production parameter data to obtain the first cloned data corresponding to the real-time software parameter data and the second cloned data corresponding to the real-time production parameter data;

[0074] S202: Determine the target backup path among several preselected backup paths based on the network topology structure;

[0075] S203: Obtain the operation parameters of each branch backup domain, and perform operation load analysis based on the operation parameters to obtain operation load analysis data;

[0076] S204: Obtain the first data volume of the first cloned data and the second data volume of the second cloned data, and perform operation load trend analysis on the branch backup domain by using the time series prediction model based on the first data volume and the second data volume to obtain operation load trend analysis data;

[0077] S205: Perform network bandwidth situation analysis and space resource utilization analysis on each branch backup domain to obtain network bandwidth situation data and space resource utilization data;

[0078] S206: Perform data backup trend analysis on the branch backup domain based on the operation load trend analysis data, network bandwidth situation data, and space resource utilization data to obtain data backup trend analysis data;

[0079] S207: Perform hierarchical clustering analysis on each backup strategy based on the operation load analysis data and data backup trend analysis data to obtain the importance data of each backup strategy;

[0080] S208: Construct a data regression analysis model, and determine the target backup strategy for the first cloned data and the second cloned data among several backup strategies based on the importance data by using the data regression analysis model;

[0081] S209: Perform shared index configuration on the first cloned data and the second cloned data to obtain the first cloned data and the second cloned data after shared index configuration;

[0082] S210: Write the first cloned data and the second cloned data after shared index configuration into the corresponding branch backup domains based on the target backup policy and the target backup path, and the main backup domain integrates the cloned data in each branch backup domain.

[0083] In the embodiments of the present invention, by deeply cloning the real-time software parameter data and the real-time production parameter data of the vision detection system, it can be ensured that the obtained cloned data is independent of and does not affect each other with the original data, ensuring the reliability of data cloning. Determining the target backup path from several preselected backup paths by using minimum cost analysis based on the snapshot graph generated by the network topology structure and the failed node detection results can effectively improve the reliability of writing the cloned data into the backup domain, and at the same time, the data backup efficiency can be improved through this target backup path. Conducting running load analysis based on the running parameters of each branch backup domain, performing data backup trend analysis of the first cloned data and the second cloned data in the branch backup domains, and determining the target backup policy for the first cloned data and the second cloned data based on the running load analysis data and the data backup trend analysis data can more comprehensively analyze the required backup policy, improve the accuracy of backup policy selection, allocate resources more reasonably, improve the backup efficiency, and avoid resource waste. Configuring shared indexes for the first cloned data and the second cloned data does not require multiple scans of the data every time a backup is performed, improving the data backup efficiency. Writing the first cloned data and the second cloned data after shared index configuration into the corresponding branch backup domains based on the target backup policy and the target backup path, and the main backup domain integrating the cloned data in each branch backup domain can effectively improve the availability and fault tolerance of the system, ensure the consistency and reliability of data backup, and make the parameter data backup of the vision detection system achieve a more ideal effect.

[0084] Embodiment Three

[0085] Please refer to Figure 3 , Figure 3 which is a schematic structural diagram of the data real-time backup device of the vision detection system in the embodiments of the present invention. The device includes:

[0086] Data Deep Cloning Module 31: Used to obtain the real-time software parameter data and the real-time production parameter data of the vision detection system, and deeply clone the real-time software parameter data and the real-time production parameter data to obtain the first cloned data corresponding to the real-time software parameter data and the second cloned data corresponding to the real-time production parameter data;

[0087] Backup Path Determination Module 32: Used to determine the target backup path from several preselected backup paths based on the network topology structure;

[0088] Operation load analysis module 33: used to obtain the operation parameters of each branch backup domain, and perform operation load analysis based on the operation parameters to obtain operation load analysis data;

[0089] Backup policy determination module 34: used to perform data backup trend analysis on the first cloned data and the second cloned data in the branch backup domain to obtain data backup trend analysis data, and determine the target backup policies of the first cloned data and the second cloned data based on the operation load analysis data and the data backup trend analysis data;

[0090] Shared index configuration module 35: used to perform shared index configuration on the first cloned data and the second cloned data to obtain the first cloned data and the second cloned data after shared index configuration;

[0091] Parameter data backup module 36: used to write the first cloned data and the second cloned data after shared index configuration into the corresponding branch backup domains based on the target backup policies and the target backup paths, and the main backup domain integrates the cloned data in each branch backup domain.

[0092] In the specific implementation process of the present invention, the specific implementation manners of the device items can refer to the implementation manners of the above method items, which will not be elaborated here.

[0093] In the embodiments of the present invention, deep cloning of the real-time software parameter data and the real-time production parameter data of the visual detection system can ensure that the obtained cloned data is independent of each other and does not affect each other, ensuring the reliability of data cloning. Using the minimum cost analysis based on the snapshot graph generated by the network topology structure and the failed node detection results to determine the target backup path among several preselected backup paths can effectively improve the reliability of writing the cloned data into the backup domain, and at the same time improve the data backup efficiency through the target backup path. Performing operation load analysis based on the operation parameters of each branch backup domain, performing data backup trend analysis on the first cloned data and the second cloned data in the branch backup domain, and determining the target backup policies of the first cloned data and the second cloned data based on the operation load analysis data and the data backup trend analysis data can analyze the required backup policies more comprehensively, improve the accuracy of backup policy selection, allocate resources more reasonably, improve the backup efficiency, and avoid resource waste. Performing shared index configuration on the first cloned data and the second cloned data can avoid scanning the data multiple times each time of backup, improving the data backup efficiency. Writing the first cloned data and the second cloned data after shared index configuration into the corresponding branch backup domains based on the target backup policies and the target backup paths, and the main backup domain integrating the cloned data in each branch backup domain can effectively improve the availability and fault tolerance of the system, ensure the consistency and reliability of data backup, and make the parameter data backup of the visual detection system achieve a more ideal effect.

[0094] A computer-readable storage medium provided by an embodiment of the present invention, on which a computer program is stored, and when the program is executed by a processor, it implements the data real-time backup method of the visual detection system in any one of the above embodiments. Among them, the computer-readable storage medium includes, but is not limited to, any type of disk (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic cards or optical cards. That is, the storage device includes any medium that can store or transmit information in a readable form by a device (such as a computer, mobile phone), and can be a read-only memory, a magnetic disk or an optical disk, etc.

[0095] Embodiment 4

[0096] Please refer to Figure 4 , Figure 4 which is a schematic diagram of the structural composition of the electronic device in the embodiment of the present invention.

[0097] The embodiment of the present invention also provides an electronic device, as Figure 4 shown, the electronic device includes a memory 41, a processor 43, and a computer program 42 stored in the memory 41 and executable on the processor 43. Those skilled in the art can understand that Figure 3The electronic device shown does not constitute a limitation on all devices and may include more or fewer components than shown, or combine certain components. The memory 41 can be used to store the computer program 42 and each functional module. The processor 43 runs the computer program 42 stored in the memory 41 to execute various functional applications and data processing of the device. The memory can be an internal memory or an external memory, or include both an internal memory and an external memory. The internal memory can include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, or a random access memory. The external memory can include a hard disk, a floppy disk, a ZIP disk, a USB flash drive, a magnetic tape, etc. The processor 43 can be a central processing unit (CPU), or can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, a single-chip microcomputer, or the processor 43 can also be any conventional processor, etc. The processors and memories disclosed in the present invention include, but are not limited to, these types of processors and memories. The processors and memories disclosed in the present invention are only examples and not limitations.

[0098] As an embodiment, the electronic device includes: one or more processors 43, a memory 41, one or more computer programs 42, where the one or more computer programs 42 are stored in the memory 41 and are configured to be executed by the one or more processors 43, and the one or more computer programs 42 are configured to execute the data real-time backup method of the visual detection system in any one of the above embodiments. For the specific implementation process, please refer to the above embodiments and will not be elaborated here.

[0099] In the embodiments of the present invention, deep cloning of the real-time software parameter data and real-time production parameter data of the visual detection system can ensure that the obtained cloned data is independent of and does not affect the original data, ensuring the reliability of data cloning. Based on the snapshot graph generated by the network topology structure and the failed node detection result, the target backup path is determined from several preselected backup paths by using the minimum cost analysis, which can effectively improve the reliability of writing the cloned data into the backup domain. At the same time, the data backup efficiency can be improved through the target backup path. Based on the operating parameters of each branch backup domain, the operating load analysis is performed, and the data backup trend analysis of the first cloned data and the second cloned data in the branch backup domain is carried out. Based on the operating load analysis data and the data backup trend analysis data, the target backup strategies for the first cloned data and the second cloned data are determined, which can analyze the required backup strategies more comprehensively, improve the accuracy of backup strategy selection, allocate resources more reasonably, improve the backup efficiency, and avoid resource waste. By performing shared index configuration on the first cloned data and the second cloned data, it is not necessary to scan the data multiple times for each backup, improving the data backup efficiency. Based on the target backup strategy and the target backup path, the first cloned data and the second cloned data after shared index configuration are written into the corresponding branch backup domains, and the main backup domain integrates the cloned data in each branch backup domain, which can effectively improve the availability and fault tolerance of the system, ensure the consistency and reliability of data backup, and make the parameter data backup of the visual detection system achieve a more ideal effect.

[0100] In addition, the above has introduced in detail a data real-time backup method and related device for a visual detection system provided by the embodiments of the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention. At the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A real-time data backup method for a visual inspection system, characterized in that: The method comprises: Acquire real-time software parameter data and real-time production parameter data of the visual inspection system, and perform deep cloning on the real-time software parameter data and the real-time production parameter data to obtain first clone data corresponding to the real-time software parameter data and second clone data corresponding to the real-time production parameter data; Determine a target backup path among a plurality of pre-selected backup paths based on a network topology; Obtaining operating parameters of each branch backup domain, and performing operating load analysis based on the operating parameters to obtain operating load analysis data; Performing data backup trend analysis of the branch backup domain on the first clone data and the second clone data to obtain data backup trend analysis data, and determining target backup strategies for the first clone data and the second clone data based on the operation load analysis data and the data backup trend analysis data; Performing shared index configuration on the first clone data and the second clone data to obtain the first clone data and the second clone data after the shared index configuration; Based on the target backup strategy and the target backup path, the first clone data and the second clone data after the shared index configuration are written into the corresponding branch backup domains, and the primary backup domain integrates the clone data in each branch backup domain.

2. The real-time data backup method of the visual inspection system according to claim 1 is characterized in that: The deep cloning of the real-time software parameter data and the real-time production parameter data to obtain first clone data corresponding to the real-time software parameter data and second clone data corresponding to the real-time production parameter data includes: The object node attributes of the real-time software parameter data and the real-time production parameter data are copied to obtain first clone data corresponding to the real-time software parameter data and second clone data corresponding to the real-time production parameter data.

3. The real-time data backup method of the visual inspection system according to claim 1 is characterized in that: The step of determining a target backup path from among a plurality of pre-selected backup paths based on the network topology structure includes: Acquire the network environment of the visual inspection system, and construct a network topology structure based on the network environment; Performing failed node detection on the network topology structure to obtain a failed node detection result; Obtaining on / off information of each link in the network topology structure, and constructing a snapshot graph based on the on / off information; Based on the snapshot graph and the failed node detection result, a target backup path is determined from a plurality of pre-selected backup paths using minimum cost analysis.

4. The real-time data backup method of the visual inspection system according to claim 1 is characterized in that: The performing operation load analysis based on the operation parameters to obtain operation load analysis data includes: Calculate the load value and performance value of each branch backup domain based on the operating parameters; Based on the operating parameters, load constraint analysis and bearer constraint analysis of each branch backup domain are performed to obtain load constraint analysis data and bearer constraint analysis data; Based on the load value, performance value, load constraint analysis data and carrying constraint analysis data, operation load analysis is performed to obtain operation load analysis data of each branch backup domain.

5. The real-time data backup method of the visual inspection system according to claim 1 is characterized in that: The step of performing data backup trend analysis of the branch backup domain on the first clone data and the second clone data to obtain data backup trend analysis data, and determining a target backup strategy for the first clone data and the second clone data based on the operation load analysis data and the data backup trend analysis data, includes: Acquire a first data volume of the first clone data and a second data volume of the second clone data, and perform an operation load trend analysis of the branch backup domain using a time series prediction model based on the first data volume and the second data volume to obtain operation load trend analysis data; Analyze the network bandwidth and space resource utilization of each branch backup domain to obtain network bandwidth data and space resource utilization data; Perform data backup trend analysis on the branch backup domain based on the operation load trend analysis data, network bandwidth situation data and space resource utilization data to obtain data backup trend analysis data; Performing hierarchical cluster analysis on each backup strategy based on the operation load analysis data and the data backup trend analysis data to obtain importance data of each backup strategy; A data regression analysis model is constructed, and based on the data regression analysis model, a target backup strategy for the first clone data and the second clone data is determined from among a plurality of backup strategies using the importance data.

6. The real-time data backup method of the visual inspection system according to claim 1, characterized in that: The step of performing shared index configuration on the first clone data and the second clone data to obtain the first clone data and the second clone data after the shared index configuration includes: Obtaining a primary key index of a primary key table and a foreign key index of a foreign key table, and generating a shared index item based on the primary key index and the foreign key index by merging the identifiers; The shared index item is added to the first clone data and the second clone data to obtain the first clone data and the second clone data after the shared index is configured.

7. The real-time data backup method of the visual inspection system according to claim 1, characterized in that: The first clone data and the second clone data after the shared index configuration are written into the corresponding branch backup domain based on the target backup strategy and the target backup path, and the primary backup domain integrates the clone data in each branch backup domain, including: Determine the target branch backup domains corresponding to the first clone data and the second clone data after the shared index configuration based on the target backup strategy and the target backup path, and write the first clone data and the second clone data after the shared index configuration into the corresponding target branch backup domains; The primary backup domain collects and integrates the cloned data in each branch backup domain based on a preset period.

8. A real-time data backup device for a visual inspection system, characterized in that: The device comprises: Data deep cloning module: used to obtain real-time software parameter data and real-time production parameter data of the visual inspection system, and perform deep cloning on the real-time software parameter data and real-time production parameter data to obtain first clone data corresponding to the real-time software parameter data and second clone data corresponding to the real-time production parameter data; A backup path determination module: used to determine a target backup path from among several pre-selected backup paths based on a network topology; Operation load analysis module: used to obtain operation parameters of each branch backup domain, and perform operation load analysis based on the operation parameters to obtain operation load analysis data; A backup strategy determination module: configured to perform data backup trend analysis of the branch backup domain on the first clone data and the second clone data, obtain data backup trend analysis data, and determine a target backup strategy for the first clone data and the second clone data based on the operation load analysis data and the data backup trend analysis data; A shared index configuration module: configured to perform shared index configuration on the first clone data and the second clone data, and obtain the first clone data and the second clone data after the shared index configuration; Parameter data backup module: used to write the first clone data and the second clone data after the shared index configuration into the corresponding branch backup domain based on the target backup strategy and the target backup path, and the main backup domain integrates the clone data in each branch backup domain.

9. An electronic device, comprising a processor and a memory, characterized in that: The memory is used to store instructions, and the processor is used to call the instructions in the memory, so that the electronic device executes the real-time data backup method of the visual inspection system according to any one of claims 1 to claim 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the real-time data backup method for a visual inspection system according to any one of claims 1 to 7.