CN118260363A - Data copying method, system and computer storage medium - Google Patents
Data copying method, system and computer storage medium Download PDFInfo
- Publication number
- CN118260363A CN118260363A CN202410343714.6A CN202410343714A CN118260363A CN 118260363 A CN118260363 A CN 118260363A CN 202410343714 A CN202410343714 A CN 202410343714A CN 118260363 A CN118260363 A CN 118260363A
- Authority
- CN
- China
- Prior art keywords
- data
- copied
- equipment
- time period
- preset time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000003860 storage Methods 0.000 title abstract description 8
- 230000010076 replication Effects 0.000 claims abstract description 29
- 239000011159 matrix material Substances 0.000 claims description 13
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000012545 processing Methods 0.000 abstract description 3
- 238000004891 communication Methods 0.000 description 8
- 238000005259 measurement Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000001186 cumulative effect Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000000513 principal component analysis Methods 0.000 description 2
- 238000012706 support-vector machine Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000003066 decision tree Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F16/273—Asynchronous replication or reconciliation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2365—Ensuring data consistency and integrity
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present application relates to the field of data processing technologies, and in particular, to a data replication method, system, and computer storage medium. The method comprises the steps that whether a first equipment model is matched with a second equipment model of a receiving device or not is detected by a sending device, when the sending device detects that the first equipment model is matched with the second equipment model in a first preset time period, data to be copied is copied to the receiving device, whether the data to be copied is copied successfully or not is checked by the receiving device in a second preset time period, when the data to be copied is successfully copied, a copying success signal is returned to the sending device by the receiving device, and automatic data updating is carried out by utilizing the data to be copied. The application realizes the same data set value between two devices and realizes the rapid and accurate data replication.
Description
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data replication method, system, and computer storage medium.
Background
With the rise of the cost in each aspect, the domestic manufacturing industry is hoped to improve the production efficiency and quality and reduce the cost in each aspect through the introduction of more automation equipment. As one of the most basic elements of an automation installation, a sensor is also increasingly demanded.
The existing data copying method is a process of copying data from one data source to one or more target positions, and aims to ensure availability, redundancy, backup, distribution and instantaneity of the data, so that the consistency of the copied data can be realized only, and the consistency of all the data of two devices cannot be maintained. In the conventional sensor data processing method, if the data set values between two sensors are required to be consistent, the data set value of one device needs to be manually modified or set according to the data set value of the other device, and the data set value between the two devices needs to be calibrated for multiple times after modification or setting, so that the operation is complex and the data copying cannot be performed quickly and accurately.
Disclosure of Invention
In view of the above, the present application provides a data copying method, system, and computer storage medium, which copies data from one device to another device, realizes the consistency of data set values of the two devices, and realizes fast and accurate data copying.
A first aspect of the present application provides a data replication method, the method comprising:
the transmitting device detects whether the first device model is matched with the second device model of the receiving device;
when the sending device detects that the first device model is matched with the second device model in a first preset time period, the sending device copies data to be copied to the receiving device, so that the receiving device checks whether the data to be copied is copied successfully in a second preset time period and returns copy information;
The transmitting device receives the copy information.
In an alternative embodiment, the copying of the data to be copied by the transmitting device to the receiving device includes:
acquiring a first data set corresponding to the sending equipment and a second data set corresponding to the receiving equipment;
Comparing each first original data in the first data set with each second original data in the second data set to judge whether target original data which is different from each second original data exists in each first original data or not;
when the target original data exists in the first data set, determining the target original data as the data to be copied;
when the data quantity of the data to be copied is equal to 1, directly copying the data to be copied to the receiving equipment;
and when the data quantity is more than or equal to 2, identifying the importance degree of each piece of data to be copied, and copying the data to be copied to the receiving equipment according to the importance degree.
In an alternative embodiment, the identifying the importance level of each piece of data to be copied includes:
Generating a data matrix according to the data to be copied, and performing feature calculation on the data matrix to obtain a target feature value corresponding to each piece of data to be copied;
and determining the importance degree corresponding to each piece of data to be copied according to the target characteristic value.
In an alternative embodiment, the method further comprises:
triggering a mechanical error signal when the sending device detects that the first device model is not matched with the second device model in the first preset time period;
and alarming according to the mechanical error signal, and displaying the comparison result of the first equipment model and the second equipment model.
In an alternative embodiment, the sending device detecting whether the first device model matches the second device model of the receiving device includes:
the sending equipment receives an input signal sent by the receiving equipment and detects whether a handshake signal in the input signal is read or not in a third preset time period;
and when the handshake signal is read in the second preset time period, the sending equipment returns a target signal corresponding to the handshake signal to the receiving equipment and executes an operation of detecting whether the first equipment model is matched with the second equipment model of the receiving equipment.
The second aspect of the present application also provides a data replication method, the method comprising:
the method comprises the steps that receiving equipment receives data to be replicated, wherein the data to be replicated is replication data which is sent by a sending equipment when detecting that a first equipment signal is matched with a second equipment signal of the receiving equipment in a first preset time period;
the receiving equipment checks whether the data to be copied is copied successfully in a second preset time period;
If the data to be copied is copied successfully in the second preset time period, automatic data updating is carried out according to the data to be copied, and copy information is returned to the sending equipment.
In an optional embodiment, the receiving device verifying whether the data to be copied is copied successfully within a second preset time period includes:
checking whether all the data to be copied are successfully copied or not, and checking whether target copy data with copy errors exist in the data to be copied or not;
When all the data to be copied are successfully copied and the target copy data does not exist in the data to be copied, determining that the data to be copied is successfully copied in the second preset time period;
And when the data to be copied is not completely copied successfully and/or the target copied data exists in the data to be copied, determining that the data to be copied is not copied successfully in the second preset time period.
In an alternative embodiment, when the data to be copied is not copied successfully within the second preset time period, the method further includes:
Step 1, the receiving equipment returns the copying information carrying the copying unsuccessful signal to the sending equipment, and the sending equipment copies the target data to be copied corresponding to the copying unsuccessful signal to the receiving equipment;
Step 2, checking whether the target data to be copied is copied successfully in the second preset time period;
And step 3, when the target data to be copied is not copied successfully in the second preset time period, iteratively executing the steps 1 to 2 until the target data to be copied is copied successfully to the receiving equipment.
A third aspect of the present application provides a data copying system, the system comprising a transmitting apparatus for:
detecting whether the first equipment model is matched with the second equipment model of the receiving equipment;
When the first equipment model is detected to be matched with the second equipment model in a first preset time period, copying the data to be copied to the receiving equipment, so that the receiving equipment checks whether the data to be copied is copied successfully in a second preset time period, and returns copy information;
when the copying information is that the data to be copied is copied successfully in the second preset time period, the data to be copied is utilized for automatic data updating;
and receiving the copy information.
In an alternative embodiment, the system further comprises a receiving device for:
Receiving data to be copied, wherein the data to be copied is the copy data which is sent by the sending equipment when the sending equipment detects that a first equipment signal is matched with a second equipment signal of the receiving equipment in a first preset time period;
checking whether the data to be copied is copied successfully in a second preset time period;
If the data to be copied is copied successfully in the second preset time period, automatic data updating is carried out according to the data to be copied, and a copying success signal is returned to the sending equipment.
A fourth aspect of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the data replication method described above.
In summary, the data copying method, system and computer storage medium provided by the application are used for comparing the first equipment signal of the sending equipment with the second equipment model of the receiving equipment, so as to ensure that the data copying is performed after the models of the sending equipment and the receiving equipment are matched. When the transmitting device copies the data to be copied to the receiving device, the receiving device checks whether the data to be copied is copied successfully, and when the data to be copied is copied successfully, the receiving device updates the data to be copied by using the data to be copied, so that the data set value in the receiving device is consistent with the data set value in the transmitting device, no manual participation is needed in the whole process, and the data copy can be realized rapidly and accurately.
Drawings
FIG. 1 is a block diagram of a data replication system according to an embodiment of the present application;
FIG. 2 is a flow chart of a data replication method according to an embodiment of the present application;
FIG. 3 is a flow chart of another data replication method according to an embodiment of the present application;
FIG. 4 is a flow chart illustrating a method of copying data from a transmitting device to a receiving device in accordance with an embodiment of the present application;
FIG. 5 is another flow chart illustrating copying data from a transmitting device to a receiving device in accordance with an embodiment of the present application;
Fig. 6 is a schematic structural diagram of a transmitting apparatus according to an embodiment of the present application;
Fig. 7 is a schematic structural diagram of a receiving apparatus according to an embodiment of the present application.
Detailed Description
The terminology used in the following embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates to the contrary. It should also be understood that the term "and/or" as used in this disclosure is intended to encompass any or all possible combinations of one or more of the listed items.
The terms "first," "second," and the like, are used below for descriptive purposes only and are not to be construed as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature, and in the description of embodiments of the application, unless otherwise indicated, the meaning of "a plurality" is two or more.
Referring to fig. 1, an architecture diagram of a data replication system according to an embodiment of the present application is shown.
The data replication system 1 includes a transmitting device 10 and a receiving device 12. The transmitting device 10 and the receiving device 12 are two independent devices. In the embodiment of the present application, the sending device 10 and the receiving device 12 are digital display pressure sensors, which are respectively used for sending and receiving data to be copied, so as to realize data copying. In addition, both the transmitting device 10 and the receiving device 12 adopt microprocessor technology, so that the operation control of the transmitting device and the receiving device is more intelligent. Not only can automatic measurement and recording be completed, but also the accuracy and stability of data can be improved through digital signal transmission. And the sending device 10 and the receiving device 12 are also provided with touch screens and data processing functions, so that data can be monitored and processed and analyzed in real time, and the working efficiency and the requirements of clients are met.
In the embodiment of the present application, the data to be copied is copied to the receiving apparatus 12 by the transmitting apparatus 10, so as to achieve that the data set value in the transmitting apparatus 10 is consistent with the data set value in the receiving apparatus 12. Referring to fig. 4 together, first, the transmitting device 10 detects whether or not its own first device model matches the second device model of the receiving device 12 within a first preset period of time (for example, 2 seconds), and when the first device model matches the second device model, determines which of the data to be copied in the transmitting device 10 needs to be copied to the receiving device 12, the transmitting device 10 copies the data to be copied to the receiving device 12. Further, when the receiving device 12 receives the data to be copied, it is checked whether the data to be copied is copied successfully within a second preset time period (for example, 10 seconds), and when the data to be copied is completely copied successfully, the receiving device 12 updates the data to be copied by using the data to be copied, and sends the copy information carrying the copy success to the sending device 10, so that the sending device 10 can know that the receiving device 12 has received all the information to be copied when receiving the copy information, and does not need to resend the information to be copied to the receiving device 12, thereby realizing that the set value of each data between the sending device 10 and the receiving device 12 is consistent, not needing to be manually involved, and realizing quick and accurate data copying.
Referring to fig. 2, a flowchart of a data replication method according to an embodiment of the present application is shown, and the data replication method includes the following steps.
S21, the sending device detects whether the first device model is matched with the second device model of the receiving device.
Digital-type pressure sensors of different device models may have different hardware architectures, storage formats, or communication protocols. If data is copied from one model of device to another model of device, data copy failure or data corruption may result from hardware compatibility issues. Secondly, copying the data to be copied of the transmitting device to the receiving device is to ensure that the set value of each data of the transmitting device and the receiving device are consistent, and when the model numbers between the transmitting device and the receiving device are not matched, the set value between the two devices cannot be completely consistent even if the data to be copied is successfully copied.
Therefore, before copying data to another device, the device models of the transmitting device and the receiving device need to be acquired, the device model of the transmitting device is referred to as a first device model, and the device model of the receiving device is referred to as a second device model. The receiving device further verifies whether the first device model matches the second device model for a first preset period of time (e.g., 2 seconds). When the first equipment model is matched with the second equipment model, the receiving equipment receives the data to be copied sent by the sending equipment.
In an alternative embodiment, the sending device detecting whether the first device model matches the second device model of the receiving device includes:
the sending equipment receives an input signal sent by the receiving equipment and detects whether a handshake signal in the input signal is read or not in a third preset time period;
and when the handshake signal is read in the second preset time period, the sending equipment returns a target signal corresponding to the handshake signal to the receiving equipment and executes an operation of detecting whether the first equipment model is matched with the second equipment model of the receiving equipment.
Referring also to fig. 5, before comparing the device models between the transmitting device and the receiving device, it is necessary to ensure that both the transmitting device and the receiving device enter the copy mode. In particular, the transmitting device receives an input signal from the receiving device, wherein the input signal may comprise a handshake signal. Further, the sending device detects whether the handshake signal sent by the receiving device is read or not within a third preset time period (for example, 5 seconds), the sending device starts to check whether a target signal is returned to the receiving device after the handshake signal is read, when the sending device is determined to read the handshake signal and returns a target signal to the receiving device after the handshake signal is read, the sending device and the receiving device are indicated to both enter a copy mode, and the sending device can execute the next step, namely, whether the first device model and the second device model are matched or not is detected. When it is determined that the transmitting device does not read the handshake signal, or after the handshake signal is read and in order to return a target signal to the receiving device, it may be determined that at least one of the transmitting device and the receiving device has not performed a copy mode, and no operation of detecting whether the first device model and the second device model of the receiving device match is performed.
In some embodiments, since the sending device and the receiving device are both dual-digital-display digital pressure sensors and have a dual-screen display function, when the device model between the sending device and the receiving device is consistent, or whether the data copying is successful, etc., the data can be displayed through the display. In addition, the current value and the reference value can be checked at the same time, and the reference value can be checked and set smoothly without switching the screen mode. When an operation of setting a reference value or the like is performed in the transmitting apparatus and the receiving apparatus perform a copy mode, the relevant data setting performed in the transmitting apparatus is synchronously copied to the receiving apparatus.
In an alternative embodiment, the method further comprises:
triggering a mechanical error signal when the sending device detects that the first device model is not matched with the second device model in the first preset time period;
and alarming according to the mechanical error signal, and displaying the comparison result of the first equipment model and the second equipment model.
Referring to fig. 5, when the first equipment model is not matched with the second equipment model in the first preset time period, the equipment triggering model error signal is sent, and an alarm is given according to the model error signal so as to remind relevant staff to find the mismatch problem between the equipment in time. In addition, the transmitting device may also transmit copy error data with a non-matching model to the receiving device, and display error reporting information with a non-matching model.
In other embodiments, the receiving device may also verify whether the first device model matches the second device model for a first preset time period (e.g., 2 seconds), and when the first device model does not match the second device model for the first preset time period, the receiving device triggers a model error signal. In addition, the sending device and the receiving device can display the first device model and the second device model, and the comparison result between the first device model and the second device model, for example, the comparison result can be that the first device model is matched with the second device model, or the first device model is not matched with the second device model, so that related staff can take related measures to solve the problem of model mismatch, follow-up data transmission is ensured to be carried out smoothly, and data consistency is maintained.
When the first device model matches the second device model within the first preset time period, the transmitting device transmits the data to be copied to the receiving device, and the receiving device receives the data to be copied and verifies whether the data to be copied is copied successfully, i.e. step S22 is performed.
And S22, when the sending equipment detects that the first equipment model is matched with the second equipment model in a first preset time period, the sending equipment copies the data to be copied to the receiving equipment, so that the receiving equipment checks whether the data to be copied is copied successfully in a second preset time period, and returns copy information.
In the embodiment of the present application, since the sending device and the receiving device are both digital display type pressure sensors, the data to be copied may include, but is not limited to: calibration parameters (e.g., zero calibration values, slope calibration values, etc.), configuration setting parameters (e.g., measurement range, sampling frequency, alarm threshold, etc.), etc. In some embodiments, the sending device may transmit the data to be replicated to the receiving device directly over a cable or network line according to wired communications (e.g., serial communications interface, ethernet interface, etc.); the transmitting device may also communicate with the receiving device through wireless communication (e.g., wi-Fi, bluetooth, zigbee, etc.), that is, through a wireless module built in the transmitting device or an external wireless adapter, and copy the data to be copied into the receiving device.
In an alternative embodiment, the transmitting device firstly acquires all data of itself, called a first data set, and simultaneously acquires all data in the receiving device, called a second data set, and compares the first data set with the second data set to determine whether the second original data in the second data set is different from each first original video data in the first data set, when the second original data is different from the first original data, the second original data which is different is called target original data, and the target original data is determined as data to be copied, namely, only the data which is different from the receiving device is copied from the transmitting device to the receiving device, and the same data does not need to be copied. The transmitting device further determines the data amount of the data to be copied and judges whether the data amount of the data to be copied is greater than 1. When the number of the data to be copied is 1, representing that only one data in the receiving device and the sending device is different, the different data to be copied is directly copied into the receiving device. In some embodiments, the sending device may transmit the data to be replicated to the receiving device using a network transmission protocol such that the set point of each data in the receiving device is consistent with the sending device.
And when the data quantity of the data to be copied is more than or equal to 2, determining the importance degree corresponding to each piece of data to be copied, and copying the data to be copied to the receiving equipment according to the importance degree. Specifically, a data matrix is generated according to the data to be copied, wherein the data matrix is a two-dimensional array, each row in the data matrix represents the data of each function corresponding to the same device, and each column represents the data of different devices under the same function. And further performing feature calculation on the data matrix to obtain a plurality of target feature values. Specifically, principal component analysis (PRINCIPAL COMPONENT ANALYSIS, PCA) may be used to map the data to be copied from the original high-dimensional feature space into the low-dimensional feature space, and retain the most important principal component in the original data to be copied, where the principal component is a linear combination of the original feature data to be copied, i.e., the target feature value. Then, inputting the target characteristic value into a data importance degree analysis model which is trained and completed in advance based on a machine learning algorithm (such as K nearest neighbor algorithm (K Nearest Neighbors, KNN), decision tree, support vector machine (Support Vector Machine, SVM) and the like), outputting importance degree scores of each piece of data to be copied, finally sorting according to the importance degree scores, and copying the data to be copied to receiving equipment one by one according to the sorted result.
In other embodiments, when determining the target feature value corresponding to each piece of data to be replicated, the sending device may further sort the feature values corresponding to each piece of data to be replicated obtained through calculation from large to small. The eigenvalues represent the importance of the features of the data matrix, and the eigenvalues indicate the strength of the linear relationship that exists for each item of data in the data to be replicated. Larger eigenvalues represent a stronger linear relationship. By performing feature computation on the data matrix, it is thus possible to determine the most important feature in the data to be copied, i.e. the feature with the largest feature value. And further determining a cumulative contribution corresponding to each piece of data to be copied according to the sorted plurality of eigenvalues, wherein the cumulative contribution= (sum of the first n eigenvalues)/(sum of all eigenvalues). In some embodiments, a plurality of contribution threshold intervals may be preset, where each contribution threshold interval corresponds to a level of importance. For example, a first contribution degree threshold interval, a second contribution degree threshold interval and a third contribution degree threshold interval may be preset, where the first contribution degree threshold interval corresponds to the importance degree of the first level, the second contribution degree threshold interval corresponds to the importance degree of the second level, and the third contribution degree threshold interval corresponds to the importance degree of the third level, so that the importance degree corresponding to each piece of data to be replicated may be determined according to the accumulated contribution degree.
In some embodiments, before generating the data matrix, the data matrix may be generated according to the normalized data by calculating the mean and variance of each item of data in the data matrix, and normalizing the data of the corresponding item according to the mean and variance. By calculating the mean and variance of each item of data, quantitative indexes of the central tendency and the discrete degree of each feature in the data to be copied can be obtained. The normalization can enable the mean value and the variance among different features to be compared under the same scale, and the influence of the scale is eliminated.
After the transmitting device copies the data to be copied to the receiving device, the receiving device needs to verify whether the data to be copied is copied successfully within a second preset time period (for example, 10 seconds). And after the receiving device detects that the data to be copied are completely copied in the second preset time period, returning copy information carrying the copy success to the sending device so that the sending device executes step S23.
S23, the transmitting device receives the copy information.
After the sending device receives the copy information carrying the copy success sent by the device to be received, the sending device can know that the data to be copied is completely copied to the receiving device successfully, and the data to be copied which is not copied successfully can be not retransmitted later.
Referring to fig. 3, a flowchart of another data replication method according to an embodiment of the present application is shown. The data replication method may include the following steps.
S31, receiving data to be copied by a receiving device, wherein the data to be copied is the copy data which is sent by a sending device when detecting that a first device signal is matched with a second device signal of the receiving device in a first preset time period.
When the first equipment model of the sending equipment is matched with the second equipment model of the receiving equipment, the sending equipment sends the data to be copied to the receiving equipment, and the receiving equipment receives the data to be copied sent by the sending equipment.
S32, the receiving equipment checks whether the data to be copied is copied successfully in a second preset time period.
When the receiving device receives the data to be copied, it needs to be verified in a second preset time period (for example, 10 seconds) whether the data to be copied is successfully copied, which may include whether the data to be copied is completely copied, whether the data to be copied is erroneously copied, and the like.
In an optional embodiment, the receiving device verifying whether the data to be copied is copied successfully in a second preset time period includes:
Checking whether all the data to be copied are successfully copied to the receiving equipment or not, and checking whether target copy data with copy errors exist in the data to be copied or not;
when all the data to be copied are successfully copied to the receiving equipment and the target copy data does not exist in the data to be copied, determining that the data to be copied is successfully copied in the second preset time period;
And when the data to be copied is not completely copied to the receiving equipment successfully, and/or the target copy data exists in the data to be copied, determining that the data to be copied is not copied successfully in the second preset time period.
In the embodiment of the application, whether the data to be copied is copied successfully or not needs to be checked, whether the data to be copied is completely copied to the receiving equipment or not is also checked, and whether the data to be copied to the receiving equipment is completely copied correctly or not is also checked. Only when the data to be copied is completely copied to the receiving device and the data to be copied is completely copied correctly, it can be determined that the data to be copied is copied successfully within the second preset time period. If the data to be copied is not completely copied to the receiving device and/or the data to be copied is not completely copied correctly, it can be determined that the data to be copied is not copied successfully within the second preset time period.
And S33, if the data to be copied is copied successfully in the second preset time period, automatically updating the data according to the data to be copied, and returning copy information to the sending equipment.
When it is determined that the data to be copied is all successfully copied to the receiving apparatus, the receiving apparatus returns a copy success signal to the transmitting apparatus, and the receiving apparatus replaces the data to be copied by itself so as to be identical to the set value of each data in the transmitting apparatus. For example, the measurement range of the sending device is 0-20, the measurement range of the receiving device is 0-10, the measurement range of the sending device is copied to the receiving device on the assumption that the data to be copied is the measurement range, and when the copying is successful, the receiving device updates its measurement range according to the measurement range of the sending device, i.e. copies 0-20 to 0-10, so as to replace 0-10 with 0-20.
After the receiving device automatically updates the data according to the data to be copied, the copying information carrying the copying success signal is returned to the sending device, so that the sending device can not send the data to be copied which is not copied successfully to the receiving device.
Referring to fig. 5 together, when it is verified that the data to be copied is not copied successfully within the second preset time period, the receiving device may send a verification inaccuracy signal to the sending device, so that the sending device retransmits the data to be copied, which is not copied successfully, to the receiving device.
In an alternative embodiment, when the data to be copied is not copied successfully within the second preset time period, the method further includes:
Step 1, the receiving equipment returns the copying information carrying the copying unsuccessful signal to the sending equipment, and the sending equipment copies the target data to be copied corresponding to the copying unsuccessful signal to the receiving equipment;
Step 2, checking whether the target data to be copied is copied successfully in the second preset time period;
And step 3, when the target data to be copied is not copied successfully in the second preset time period, iteratively executing the steps 1 to 2 until the target data to be copied is copied successfully to the receiving equipment.
In some embodiments, first, the receiving device needs to determine which data in the data to be replicated is not replicated successfully, call the data to be replicated that is not replicated successfully as target data to be replicated, and return the replication information carrying the replication unsuccessful signal of the target data to be replicated to the sending device, so that the sending device can re-replicate the target data to be replicated to the receiving device, and the receiving device continues to check whether the re-replicated target data to be replicated is replicated successfully. If the copying is not successful, the receiving device returns a copying unsuccessful signal to the sending device, so that the sending device re-copies the copying unsuccessful data to the receiving device until all the data to be copied in the sending device are successfully copied to the receiving device.
The application detects whether the sending device and the receiving device perform the copy mode, when the sending device reads the handshake signal sent by the receiving device in a preset time period, and returns a target signal to the receiving device after reading the handshake signal so as to inform the receiving device of performing the copy mode. And then comparing the first device signal of the sending device with the second device model of the receiving device to ensure that the models between the sending device and the receiving device are matched before data copying. When the transmitting device copies the data to be copied to the receiving device, the receiving device checks whether the data to be copied is copied successfully, and when the data to be copied is copied successfully, the receiving device updates the data to be copied by using the data to be copied, so that the data set value in the receiving device is consistent with the data set value in the transmitting device, no manual participation is needed in the whole process, and the data copy can be realized rapidly and accurately.
Referring to fig. 6, a schematic structural diagram of a transmitting device according to an embodiment of the present application is shown.
In the preferred embodiment of the present application, the transmitting device 10 includes a first memory 101, at least one first processor 102, at least one first communication bus 103.
It will be appreciated by those skilled in the art that the configuration of the transmitting device 10 shown in fig. 6, respectively, is not limiting of the embodiments of the present application, and that the transmitting device 10 may also include more or less other hardware or a different arrangement of components than illustrated.
In some embodiments, the first memory 101 stores a computer program that, when executed by the at least one first processor 102, performs all or part of the steps in the data replication method.
In some embodiments, the at least one first communication bus 103 is arranged to enable connected communication between the first memory 101 and the at least one first processor 102, etc.
Referring to fig. 7, a schematic diagram of a receiving device according to an embodiment of the present application is shown.
In the preferred embodiment of the present application, the receiving device 12 includes a second memory 121, at least one second processor 122, at least one second communication bus 123.
It should be understood that the specific embodiment provided in the foregoing embodiment of fig. 6 is equally applicable to the receiving apparatus 12 in this embodiment, and the specific implementation of the receiving apparatus in this embodiment will be apparent to those skilled in the art from the foregoing description of the transmitting apparatus 10, and will not be described in detail herein for brevity.
The above embodiments are not intended to limit the scope of the present application, so: all equivalent changes in structure, shape and principle of the application should be covered in the scope of protection of the application.
Claims (10)
1. A method of data replication, the method comprising:
the transmitting device detects whether the first device model is matched with the second device model of the receiving device;
when the sending device detects that the first device model is matched with the second device model in a first preset time period, the sending device copies data to be copied to the receiving device, so that the receiving device checks whether the data to be copied is copied successfully in a second preset time period and returns copy information;
The transmitting device receives the copy information.
2. The data copying method according to claim 1, characterized in that the transmitting device copying data to be copied to the receiving device includes:
acquiring a first data set corresponding to the sending equipment and a second data set corresponding to the receiving equipment;
Comparing each first original data in the first data set with each second original data in the second data set to judge whether target original data which is different from each second original data exists in each first original data or not;
when the target original data exists in the first data set, determining the target original data as the data to be copied;
when the data quantity of the data to be copied is equal to 1, directly copying the data to be copied to the receiving equipment;
and when the data quantity is more than or equal to 2, identifying the importance degree of each piece of data to be copied, and copying the data to be copied to the receiving equipment according to the importance degree.
3. The data replication method of claim 2, wherein said identifying the importance level of each of said data to be replicated comprises:
Generating a data matrix according to the data to be copied, and performing feature calculation on the data matrix to obtain a target feature value corresponding to each piece of data to be copied;
and determining the importance degree corresponding to each piece of data to be copied according to the target characteristic value.
4. A data replication method according to any one of claims 1 to 3, characterized in that the method further comprises:
triggering a mechanical error signal when the sending device detects that the first device model is not matched with the second device model in the first preset time period;
and alarming according to the mechanical error signal, and displaying the comparison result of the first equipment model and the second equipment model.
5. A data copying method according to any one of claims 1 to 3, wherein the transmitting device detecting whether the first device model matches the second device model of the receiving device comprises:
the sending equipment receives an input signal sent by the receiving equipment and detects whether a handshake signal in the input signal is read or not in a third preset time period;
and when the handshake signal is read in the second preset time period, the sending equipment returns a target signal corresponding to the handshake signal to the receiving equipment and executes an operation of detecting whether the first equipment model is matched with the second equipment model of the receiving equipment.
6. A method of data replication, the method comprising:
the method comprises the steps that receiving equipment receives data to be replicated, wherein the data to be replicated is replication data which is sent by a sending equipment when detecting that a first equipment signal is matched with a second equipment signal of the receiving equipment in a first preset time period;
the receiving equipment checks whether the data to be copied is copied successfully in a second preset time period;
If the data to be copied is copied successfully in the second preset time period, automatic data updating is carried out according to the data to be copied, and copy information is returned to the sending equipment.
7. The data replication method of claim 6, wherein the receiving device verifying whether the data to be replicated was successfully replicated within a second preset time period comprises:
checking whether all the data to be copied are successfully copied or not, and checking whether target copy data with copy errors exist in the data to be copied or not;
When all the data to be copied are successfully copied and the target copy data does not exist in the data to be copied, determining that the data to be copied is successfully copied in the second preset time period;
And when the data to be copied is not completely copied successfully and/or the target copied data exists in the data to be copied, determining that the data to be copied is not copied successfully in the second preset time period.
8. The data replication method according to claim 6 or 7, characterized in that when the data to be replicated is not replicated successfully within the second preset time period, the method further comprises:
Step 1, the receiving equipment returns the copying information carrying the copying unsuccessful signal to the sending equipment, and the sending equipment copies the target data to be copied corresponding to the copying unsuccessful signal to the receiving equipment;
Step 2, checking whether the target data to be copied is copied successfully in the second preset time period;
And step 3, when the target data to be copied is not copied successfully in the second preset time period, iteratively executing the steps 1 to 2 until the target data to be copied is copied successfully to the receiving equipment.
9. A data replication system, characterized in that the replication system comprises a transmitting device for:
detecting whether the first equipment model is matched with the second equipment model of the receiving equipment;
When the first equipment model is detected to be matched with the second equipment model in a first preset time period, copying the data to be copied to the receiving equipment, so that the receiving equipment checks whether the data to be copied is copied successfully in a second preset time period, and returns copy information;
when the copying information is that the data to be copied is copied successfully in the second preset time period, the data to be copied is utilized for automatic data updating;
and receiving the copy information.
10. The data replication system of claim 9, further comprising a receiving device for:
Receiving data to be copied, wherein the data to be copied is the copy data which is sent by the sending equipment when the sending equipment detects that a first equipment signal is matched with a second equipment signal of the receiving equipment in a first preset time period;
checking whether the data to be copied is copied successfully in a second preset time period;
If the data to be copied is copied successfully in the second preset time period, automatic data updating is carried out according to the data to be copied, and a copying success signal is returned to the sending equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410343714.6A CN118260363A (en) | 2024-03-25 | 2024-03-25 | Data copying method, system and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410343714.6A CN118260363A (en) | 2024-03-25 | 2024-03-25 | Data copying method, system and computer storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118260363A true CN118260363A (en) | 2024-06-28 |
Family
ID=91608593
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410343714.6A Pending CN118260363A (en) | 2024-03-25 | 2024-03-25 | Data copying method, system and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118260363A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105094650A (en) * | 2014-04-25 | 2015-11-25 | 联想(北京)有限公司 | Data transmission method, data transmission device and electronic device |
CN106973089A (en) * | 2017-03-16 | 2017-07-21 | 北京索瑞特医学技术有限公司 | Data processing method and device |
CN114070400A (en) * | 2020-07-29 | 2022-02-18 | 斯蒂芬·U·费特克 | Bidirectional data exchange between devices via bar codes |
US11876629B1 (en) * | 2022-12-08 | 2024-01-16 | Hangzhou Keencool Intelligent Technology Co., Ltd. | Data transmission method, device, electronic equipment, and storage medium |
-
2024
- 2024-03-25 CN CN202410343714.6A patent/CN118260363A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105094650A (en) * | 2014-04-25 | 2015-11-25 | 联想(北京)有限公司 | Data transmission method, data transmission device and electronic device |
CN106973089A (en) * | 2017-03-16 | 2017-07-21 | 北京索瑞特医学技术有限公司 | Data processing method and device |
CN114070400A (en) * | 2020-07-29 | 2022-02-18 | 斯蒂芬·U·费特克 | Bidirectional data exchange between devices via bar codes |
US11876629B1 (en) * | 2022-12-08 | 2024-01-16 | Hangzhou Keencool Intelligent Technology Co., Ltd. | Data transmission method, device, electronic equipment, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017000424A1 (en) | Protocol detection method and apparatus | |
CN111221807B (en) | Cloud service-oriented industrial equipment big data quality testing method and framework | |
Magna et al. | Self-Repairing classification algorithms for chemical sensor array | |
US11709474B2 (en) | Method and apparatus for detecting abnormality of manufacturing facility | |
CN111506358B (en) | Method and device for updating container configuration | |
CN113568899A (en) | Data optimization method based on big data and cloud server | |
US20220222545A1 (en) | Generation method, non-transitory computer-readable storage medium, and information processing device | |
CN118260363A (en) | Data copying method, system and computer storage medium | |
CN110290203A (en) | Artificial intelligence cloud computing carries out Noninvasive production defect recognition and information communication to manufactured goods | |
CN114371974A (en) | Buried point data checking method and electronic equipment | |
CN117611008A (en) | Data quality evaluation method and device | |
CN113507397B (en) | Method for collecting terminal equipment state automatic inspection based on cloud operation and maintenance | |
CN116186976A (en) | Verification method and verification system for accuracy of data collected by equipment platform sensor | |
CN111541503B (en) | Detection method and detection device for connection tightness of WIFI antenna | |
CN114760372A (en) | Water meter protocol matching method and system, storage medium and intelligent terminal | |
CN113869373A (en) | Equipment abnormality detection method and device, computer equipment and storage medium | |
CN110046067B (en) | Interface testing method and device | |
KR102473141B1 (en) | Method and system for determining good/defective products using artificial intelligence-based PLC module | |
CN110771101B (en) | Intrusion detection device, intrusion detection method, and intrusion detection system | |
CN109311135A (en) | Long control device, manufacture system are surveyed, long control method is surveyed and surveys long control program | |
CN113300912A (en) | Equipment testing method and device and electronic equipment | |
CN117076327B (en) | Automatic interface detection and repair method and system | |
CN113760710B (en) | Task testing method, device, computer equipment and readable storage medium | |
CN113850987B (en) | System for detecting product quality | |
CN115102856B (en) | Method and system for upgrading equipment of Internet of things |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |