CN113609532A - Data integrity checking method and device, computer equipment and storage medium - Google Patents

Data integrity checking method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113609532A
CN113609532A CN202110932361.XA CN202110932361A CN113609532A CN 113609532 A CN113609532 A CN 113609532A CN 202110932361 A CN202110932361 A CN 202110932361A CN 113609532 A CN113609532 A CN 113609532A
Authority
CN
China
Prior art keywords
data
issued
check code
mark file
instruction
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.)
Granted
Application number
CN202110932361.XA
Other languages
Chinese (zh)
Other versions
CN113609532B (en
Inventor
田竞成
尹芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sungrow Power Supply Co Ltd
Original Assignee
Sungrow Power Supply Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sungrow Power Supply Co Ltd filed Critical Sungrow Power Supply Co Ltd
Priority to CN202110932361.XA priority Critical patent/CN113609532B/en
Publication of CN113609532A publication Critical patent/CN113609532A/en
Application granted granted Critical
Publication of CN113609532B publication Critical patent/CN113609532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Abstract

The invention discloses a data integrity checking method, a data integrity checking device, computer equipment and a storage medium. The method comprises the following steps when executed by a data receiving end: if the sign file is determined not to be renamed, generating a receiving check code of the issued data, and acquiring an issued check code in the sign file; the mark file is generated according to a mark file creating instruction sent by a data sending end, and the issued check code is generated by the data sending end according to data to be issued and is stored in the mark file creating instruction; and carrying out integrity check on the issued data according to the received check code and the issued check code. By using the technical scheme of the invention, the data issuing efficiency can be improved, and the repeated issuing and invalid issuing of the data can be reduced.

Description

Data integrity checking method and device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of Internet of things and the technical field of intelligent zero-carbon equipment management under the scene of Internet of things, in particular to a data integrity checking method and device, computer equipment and a storage medium.
Background
The internet of everything has become an important trend for the development of future technologies and information technologies, and under the scene, a large number of intelligent devices and semi-intelligent devices are connected to the network, and higher requirements are also put forward on the complexity and bandwidth of a system network. Meanwhile, due to the limitation of the resources of the equipment of the Internet of things, the characteristics of small data files and high frequency are presented in the information exchange and data file transmission with the equipment management platform.
In a traditional internet scenario, integrity verification of transmitted data is generally performed in the following manner: and the data sending end creates a mark file at the data receiving end, and renames the mark file after the transmission of the data to be transmitted is completed. And the data receiving end judges whether the data transmission is complete or not by checking whether the renamed mark file exists or not. Or the data downloading sending end calculates the check code of the data to be transmitted, the check code and the data to be transmitted are sent to the data receiving end together, the data receiving end calculates the check code of the received data, the two check codes are compared, and whether the data transmission is complete or not is judged.
The first verification method is easy to cause repeated data transmission if the renaming of the marker file fails due to network abnormality after the data transmission is completed. The second verification method also has the problem of repeated data transmission due to lack of feedback from the data receiving end. Technical scheme among the prior art is not suitable for under the thing networking scene, and the zero carbon equipment management platform of wisdom sends down the data integrality check-up of data to intelligent networking terminal equipment or the marginal networking terminal equipment of access.
Disclosure of Invention
The embodiment of the invention provides a data integrity checking method, a data integrity checking device, computer equipment and a storage medium, which are used for improving data issuing efficiency and reducing repeated issuing and invalid issuing of data.
In a first aspect, an embodiment of the present invention provides a data integrity checking method, where the method includes:
if the sign file is determined not to be renamed, generating a receiving check code of the issued data, and acquiring an issued check code in the sign file;
the mark file is generated according to a mark file creating instruction sent by a data sending end, and the issued check code is generated by the data sending end according to data to be issued and is stored in the mark file creating instruction;
and carrying out integrity check on the issued data according to the received check code and the issued check code.
In a second aspect, an embodiment of the present invention provides a data integrity checking method, where the method includes:
generating an issued check code of data to be issued, generating a mark file creating instruction according to the issued check code, and sending the mark file creating instruction to a data receiving end so that the data receiving end generates a mark file storing the issued check code;
transmitting the data to be issued to a data receiving end, and sending a mark file renaming instruction to the data receiving end so that the data receiving end renames the mark file;
if a renaming success instruction fed back by a data receiving end is received, determining that the data to be issued is completely issued; the renaming success instruction is sent after the data receiving end renames the mark file according to the mark file renaming instruction, or the data receiving end determines that the mark file is not renamed and sends the issued check code in the mark file and the received check code of the issued data at the same time.
In a third aspect, an embodiment of the present invention provides a data integrity checking apparatus, where the apparatus includes:
the check code acquisition module is used for generating a receiving check code of the issued data and acquiring an issued check code in the mark file if the mark file is determined not to be renamed;
the mark file is generated according to a mark file creating instruction sent by a data sending end, and the issued check code is generated by the data sending end according to data to be issued and is stored in the mark file creating instruction;
and the data integrity checking module is used for carrying out integrity checking on the issued data according to the received check code and the issued check code.
In a fourth aspect, an embodiment of the present invention provides a data integrity checking apparatus, where the apparatus includes:
the system comprises a mark file creating instruction sending module, a mark file creating module and a data receiving terminal, wherein the mark file creating instruction sending module is used for generating an issued check code of data to be issued, generating a mark file creating instruction according to the issued check code and sending the mark file creating instruction to the data receiving terminal so that the data receiving terminal generates a mark file stored with the issued check code;
the system comprises a mark file renaming instruction sending module, a mark file renaming module and a data receiving terminal, wherein the mark file renaming instruction sending module is used for transmitting data to be issued to the data receiving terminal and sending a mark file renaming instruction to the data receiving terminal so that the data receiving terminal renames a mark file;
the data integrity confirmation module is used for determining that the data to be issued is completely issued if a renaming success instruction fed back by the data receiving end is received; the renaming success instruction is sent after the data receiving end renames the mark file according to the mark file renaming instruction, or the data receiving end determines that the mark file is not renamed and sends the issued check code in the mark file and the received check code of the issued data at the same time.
In a fifth aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the data integrity checking method according to any one of the embodiments of the present invention.
In a sixth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the data integrity checking method according to any one of the embodiments of the present invention.
The embodiment of the invention generates the mark file when receiving the mark file creating instruction sent by the data sending end, and when the integrity of the issued data is verified, if the mark file is not renamed but the receiving check code of the issued data is the same as the issuing check code in the mark file, the integrity of the issued data is determined. The problem that in the prior art, a data integrity checking mode is inaccurate in checking result and easy to cause repeated data issuing is solved, the accuracy and efficiency of data issuing are improved, and repeated and invalid data issuing is reduced.
Drawings
Fig. 1 is a flowchart of a data integrity checking method according to a first embodiment of the present invention;
fig. 2 is a flowchart of another data integrity checking method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a data integrity checking method in the third embodiment of the present invention;
fig. 4 is a flowchart of a data integrity checking method in the fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a data integrity checking apparatus according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a data integrity checking apparatus according to a sixth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computer device in a seventh embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a data integrity checking method according to an embodiment of the present invention, where the method is applicable to a situation of checking integrity of received data in a data issuing scenario of an internet of things, and the method may be executed by a data integrity checking apparatus, where the apparatus may be implemented by software and/or hardware and is generally integrated in a computer device, specifically, the computer device is a data receiving device, and may typically be an intelligent networking terminal device or an edge networking terminal device.
As shown in fig. 1, the technical solution of the embodiment of the present invention specifically includes the following steps:
and S110, if the sign file is determined not to be renamed, generating a receiving check code of the issued data, and acquiring the issued check code in the sign file.
The mark file is generated according to a mark file creating instruction sent by a data sending end, and the issued check code is generated by the data sending end according to data to be issued and is stored in the mark file creating instruction.
Specifically, the data sending end may establish a socket connection with the data receiving end in advance, generate a sending check code according to the data to be sent, construct a flag file creating instruction according to the sending check code, send the flag file creating instruction to the data receiving end, and generate the flag file after the data receiving end receives the instruction.
The data sending end generates a sent check code according to data to be sent, and the data receiving end generates a received check code according to the sent data, which may adopt MD5 information digest Algorithm or Hash algorithms such as SHA-256(Secure Hash Algorithm 256), and the like.
It should be noted that, in this embodiment, the flag file is taken as an example to describe a verification process of the data receiving end on the issued data, but the verification process is not limited to the flag file, and may also be a flag bit in a memory. Specifically, the data sending end generates a sent check code according to the data to be sent, constructs a flag bit creation instruction according to the sent check code, and after the data receiving end receives the flag bit creation instruction, creates a flag bit in the memory and writes the sent check code into the memory. After the data sending end sends the data to be sent down, a flag bit modification instruction is sent to the data receiving end. And the data receiving end checks the integrity of the data according to whether the flag bit is modified and whether the check codes are equal.
And S120, carrying out integrity check on the issued data according to the received check code and the issued check code.
In the embodiment of the invention, when the received check code is the same as the issued check code, the issued data is complete data, otherwise, the issued data is incomplete. The embodiment of the invention comprehensively judges the integrity of the issued data according to whether the mark file is renamed and whether the check codes are the same, improves the capability of a data receiving end for detecting the integrity of the data, can more accurately judge whether the data is complete and eliminates the misjudgment of the integrity of the data.
According to the technical scheme of the embodiment, the mark file is generated when the mark file creating instruction sent by the data sending end is received, and when the integrity of the issued data is checked, if the mark file is not renamed but the receiving check code of the issued data is the same as the issuing check code in the mark file, the integrity of the issued data is determined. The problem that in the prior art, a data integrity checking mode is inaccurate in checking result and easy to cause repeated data issuing is solved, the accuracy and efficiency of data issuing are improved, and repeated and invalid data issuing is reduced.
Example two
Fig. 2 is a flowchart of another data integrity checking method provided in the second embodiment of the present invention, where the second embodiment of the present invention adds a step of creating a flag file according to an instruction issued by a data sending end and renaming the flag file.
Correspondingly, as shown in fig. 2, the technical solution of the embodiment of the present invention specifically includes the following steps:
s210, creating a mark file according to the received mark file creating instruction, acquiring an issued check code in the mark file creating instruction, and storing the issued check code in the mark file.
Before sending data to be issued, a data sending end calculates an issued check code in advance according to the data to be issued, and constructs a mark file creating instruction according to the issued check code. And after the data receiving end receives the mark file creating instruction, creating a mark file and writing the issued check code into the mark file.
And S220, renaming the marker file according to the received marker file renaming instruction.
After the data sending end sends the data to be sent, a mark file renaming instruction is sent to the data receiving end, and after the data receiving end receives the mark file renaming instruction, the mark file is renamed. If the network state is normal, the data receiving end successfully renames the mark file, and then the data to be issued is completely issued. Otherwise, if network delay or failure is encountered, the mark file is not renamed successfully, and the data integrity can be continuously checked according to the check code.
Optionally, after the data sending end issues the data to be issued, the data receiving end checks the integrity of the data, which may be performed synchronously or asynchronously.
Specifically, when the data receiving end asynchronously performs data integrity check, the data sending end sends a check notification instruction to the data receiving end after sending the completed data, and after receiving the check notification instruction sent by the data sending end, the data receiving end first checks the name of the markup file, then checks the check code, and performs data integrity check. The data sending end can also disconnect the connection with the data receiving end after sending the finished data, reestablish the connection with the data receiving end, send the verification notification instruction to the data sending end through the newly established connection, and similarly, the data receiving end checks the integrity of the data after receiving the verification notification instruction, so that the special function between the connections can be realized. And the data receiving end can automatically check the integrity of the data at regular time intervals. In this embodiment, the data integrity check at the data receiving end is synchronous or asynchronous, and the mode during asynchronous processing is not limited.
S230, judging whether the target mark file is renamed, if so, executing S280, otherwise, executing S240.
When the data sending end carries out integrity check on the target issued data, firstly, whether the target mark file matched with the target issued data is renamed is checked, and if the target mark file is renamed, the target issued data is complete.
S240, generating a receiving check code of the issued data, and acquiring the issued check code in the target mark file.
If the target mark file is not renamed, the data sending end continues to check the check code of the target issued data.
And S250, judging whether the received check code is the same as the issued check code, if so, executing S260, and otherwise, executing S270.
If the received check code is the same as the issued check code, the issued data is complete, but at this time, the target mark file is not renamed successfully due to network delay and other reasons, so that the target mark file is renamed after the integrity of the issued data is confirmed.
If the received check code is different from the issued check code, the issued data is incomplete and cannot be used. Optionally, at this time, the issued data is invalid data, and the issued data may be cleaned up, so that the space of the data receiving end is saved.
And S260, determining that the issued data is complete, and renaming the target mark file.
And S270, determining that the issued data is incomplete.
And S280, determining that the issued data is complete.
According to the technical scheme of the embodiment, the mark file storing the issued check code is generated when the mark file creating instruction sent by the data sending end is received, and when the data integrity of the issued data is checked, if the mark file is renamed or is not renamed, but the received check code of the issued data is the same as the issued check code in the mark file, the issued data is determined to be complete. The problem that in the prior art, a data integrity checking mode is inaccurate in checking result and easy to cause repeated data issuing is solved, the accuracy and efficiency of data issuing are improved, and repeated and invalid data issuing is reduced.
EXAMPLE III
Fig. 3 is a flowchart of a data integrity checking method provided in the third embodiment of the present invention, where this embodiment is applicable to a situation in which integrity of data to be issued is checked in a data issuing scenario of an internet of things, and the method may be executed by a data integrity checking device, and the device may be implemented by software and/or hardware and is generally integrated in a computer device, specifically, the computer device is a data sending device, and may typically be a device management platform in the internet of things.
As shown in fig. 3, the technical solution of the embodiment of the present invention specifically includes the following steps:
s310, generating an issued check code of the data to be issued, generating a mark file creating instruction according to the issued check code, and sending the mark file creating instruction to a data receiving end so that the data receiving end generates a mark file stored with the issued check code.
The data sending end is connected with the data receiving end in advance, before data to be issued are issued, an issued check code is generated according to the data to be issued, a mark file creating instruction is constructed according to the issued check code and sent to the data receiving end, after the data receiving end receives the mark file creating instruction, a mark file is created, and the issued check code is written into the mark file.
And S320, transmitting the data to be issued to a data receiving end, and sending a mark file renaming instruction to the data receiving end so that the data receiving end renames the mark file.
After the data sending end finishes sending the data to be sent, a mark file renaming instruction is sent to a data receiving end, the mark file is renamed after the data receiving end receives the mark file renaming instruction, and after the data receiving end renames the mark file, a command of successful renaming is fed back to the data sending end.
S330, if a renaming success command fed back by the data receiving end is received, it is determined that the data to be issued is completely issued.
The renaming success instruction is sent after the data receiving end renames the mark file according to the mark file renaming instruction, or the data receiving end determines that the mark file is not renamed and sends the issued check code in the mark file and the received check code of the issued data at the same time.
And when the data receiving end determines that the mark file matched with the data to be transmitted sent by the data sending end is renamed, the data to be transmitted of the data sending end is completely transmitted. Or although the mark file is not renamed, the received check code of the issued data is the same as the check code in the mark file, and the data to be issued of the data sending end can also be determined to be completely issued. Under the two conditions, the data receiving end feeds back a renaming success instruction to the data sending end, and after the data sending end receives the renaming success instruction, the data to be sent is determined to be successfully sent. The purpose of the setting is to avoid repeated data transmission.
According to the technical scheme of the embodiment of the invention, the data sending end sends the mark file creating instruction to the data receiving end before sending the data, so that the data receiving end generates the mark file stored with the sent check code, and sends the mark file renaming instruction to the data receiving end after sending the data to be sent, so that the data receiving end can check the integrity of the data according to the mark file name and the check code, and the data is determined to be completely sent when receiving the renaming success instruction fed back by the data receiving end. The problem that in the prior art, a data integrity checking mode is inaccurate in checking result and easy to cause repeated data issuing is solved, the accuracy and efficiency of data issuing are improved, and repeated and invalid data issuing is reduced.
Example four
Fig. 4 is a flowchart of another data integrity checking method according to the fourth embodiment of the present invention, and in this embodiment, on the basis of the foregoing embodiment, a determining process for determining that the data to be delivered fails to be delivered is added, and a process for determining in advance whether the data to be delivered is delivered completely before the data to be delivered is delivered.
Correspondingly, as shown in fig. 4, the technical solution of the embodiment of the present invention specifically includes the following steps:
and S410, generating a sending check code of the data to be sent.
In the embodiment of the invention, after the data sending end establishes the sending connection with the data receiving end, the sending check code of the data to be sent is generated.
And S420, sending a query instruction to the data receiving end and receiving a query result fed back by the data receiving end.
The data sending end actively inquires whether the data to be sent is successfully sent before sending the data to be sent, and if the data to be sent is successfully sent before, repeated sending is not needed.
And S430, judging whether the renamed mark file exists according to the query result, if so, executing S440, and if not, executing S450.
When the mark file of the data receiving terminal is renamed or the mark file of the data receiving terminal is not renamed, but the check code in the mark file is the same as the issued check code of the data to be issued, the data to be issued can be determined to be successfully issued without repeated issuing.
And S440, determining that the data to be transmitted is completely transmitted. S4100 is performed.
In the embodiment of the invention, the data sending end judges whether the data to be issued is successfully issued by detecting whether the mark file of the data receiving end is renamed.
Optionally, the data sending end may also determine whether the data to be sent is completely sent before according to the status of the sent log. The status of the delivered log can be divided into to-be-delivered/delivered, successful delivery and failed delivery, and when the to-be-delivered data is delivered for the first time, the data sending end can also create the delivered log of the to-be-delivered data before generating the delivered check code of the to-be-delivered data. And after the data receiving end receives the mark file renaming instruction and successfully renames the mark file, the data sending end modifies the state of the issued log into the successful issue when receiving the renaming success instruction fed back by the data receiving end. The data receiving end renames the mark file when determining that the mark file is not renamed but the issued check code in the mark file is the same as the received check code of the issued data, feeds back a renaming success instruction after renaming, and modifies the state of the issued log into the state of successful issue when the data sending end receives the renaming success instruction, or the data sending end sends a mark file name inquiry instruction to the data receiving end at regular time and modifies the state of the issued log into the state of successful issue after determining that the mark file is renamed.
Similarly, if the data receiving end determines that the marker file is not renamed and the issued check code is different from the received check code, the data receiving end feeds back an issuing failure instruction to the data sending end, and when the data sending end receives the issuing failure instruction, the state of the issued log is modified to be issuing failure. Or, the data sending end sends a check code query instruction to the data receiving end at regular time, and when the number of times that the check codes are different is determined to reach the maximum checking number, the data sending end modifies the state of the issued log into the failure of the issuing. Or, if the data sending end determines that the renaming success instruction fed back by the data receiving end is not received yet after the preset time interval is exceeded, the state of the issued log is modified to be failed in issuing.
When a data sending end sends target data, whether an issued log matched with the target data exists is detected, if the issued log does not exist, the issued log can be newly established, an issued flow is continuously executed, and after the issued data is finished, the state of the issued log is updated. If the issued log exists and the issued log state is the issue failure, the issuing process is continuously executed, and the issued log state is updated after the issued data is completed. If the issued log exists and the issued log state is successful in issuing, the data are not repeatedly issued. If the issued logs exist, but the states of the timing retrieval issued logs are all in waiting for issuing/issuing, and the retrieval times exceed the preset retrieval times, the target data is determined to be not issued successfully, and the target data needs to be issued again.
The timing in this embodiment may refer to every fixed time interval, or may refer to every linearly increasing time interval, or every exponentially increasing time interval, which is not limited in this embodiment.
In the embodiment of the invention, the data sending end judges whether the data is sent in advance before sending the data, so that the accuracy and efficiency of sending the data can be improved, and the repeated sending and the invalid sending of the data are reduced.
S450, generating a mark file creating instruction according to the issued check code, and sending the mark file creating instruction to the data receiving end so that the data receiving end can generate a mark file stored with the issued check code.
In the embodiment of the present invention, if the data to be issued has not been completely issued, the data to be issued needs to be issued in a manner of S450-S4100. S450-S4100 are similar to the above embodiments, and the description of this embodiment is omitted here.
And S460, transmitting the data to be issued to a data receiving end, and sending a mark file renaming instruction to the data receiving end so that the data receiving end renames the mark file.
And S470, judging whether a renaming success instruction fed back by the data receiving end is received, if so, returning to execute S440, and otherwise, executing S480.
And S480, judging whether an issue failure instruction fed back by the data receiving end is received, if so, executing S490, and otherwise, executing S4100.
And S490, determining that the data to be transmitted fails to be transmitted.
The issuing failure instruction is that the data receiving end determines that the mark file is not renamed, and the issuing check code in the mark file is not sent when the receiving check code of the issued data is different from the issuing check code.
And S4100, ending.
It should be noted that, in this embodiment, when the data to be issued is issued, the data receiving end renames the markup file when the markup file is not renamed, but the issued check code in the markup file is the same as the received check code of the issued data. Therefore, when the data sending end judges whether the data to be sent is completely sent before, only the renamed mark file exists in the data receiving end to be judged. When the data receiving end determines that the issued check code in the markup file is the same as the received check code of the issued data, and does not rename the markup file, and the data sending end determines whether the data to be issued has been completely issued before, it needs to determine whether the markup file has been renamed, or the markup file has not been renamed, but the check code in the markup file is the same as the check code of the data to be issued, which is not limited in this embodiment.
According to the technical scheme of the embodiment of the invention, a query instruction is sent to a data receiving end by a data sending end before data is issued, whether the data to be issued is completely issued or not is queried, a mark file creating instruction is sent to the data receiving end when the data to be issued is not completely issued, a mark file storing an issued check code is generated by the data receiving end, a mark file renaming instruction is sent to the data receiving end after the data to be issued is issued, so that the data receiving end can carry out data integrity verification according to the mark file name and the check code, the data is determined to be completely issued when a renaming success instruction fed back by the data receiving end is received, and the data to be issued is determined to fail to be issued when an issuing failure instruction fed back by the data receiving end is received. The problem that in the prior art, a data integrity checking mode is inaccurate in checking result and easy to cause repeated data issuing is solved, the accuracy and efficiency of data issuing are improved, and repeated and invalid data issuing is reduced.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a data integrity checking apparatus in the fifth embodiment of the present invention, where the apparatus is deployed in a data receiving end, and typically, the data receiving end may be an intelligent networking terminal device or an edge networking terminal device. The device includes: a check code acquisition module 510 and a data integrity check module 520, wherein:
a check code obtaining module 510, configured to generate a receiving check code of the issued data and obtain an issued check code in the markup file if it is determined that the markup file is not renamed;
the mark file is generated according to a mark file creating instruction sent by a data sending end, and the issued check code is generated by the data sending end according to data to be issued and is stored in the mark file creating instruction;
and a data integrity check module 520, configured to perform integrity check on the issued data according to the received check code and the issued check code.
According to the technical scheme of the embodiment, the mark file is generated when the mark file creating instruction sent by the data sending end is received, and when the integrity of the issued data is checked, if the mark file is not renamed but the receiving check code of the issued data is the same as the issuing check code in the mark file, the integrity of the issued data is determined. The problem that in the prior art, a data integrity checking mode is inaccurate in checking result and easy to cause repeated data issuing is solved, the accuracy and efficiency of data issuing are improved, and repeated and invalid data issuing is reduced.
On the basis of the above embodiment, the data integrity checking module 520 includes:
and the data integrity confirming unit is used for confirming that the issued data is complete and renaming the marker file if the received check code is identical to the issued check code.
On the basis of the above embodiment, the apparatus further includes:
the mark file creating module is used for creating a mark file according to the received mark file creating instruction, acquiring an issued check code in the mark file creating instruction and storing the issued check code in the mark file;
and the mark file renaming module is used for renaming the mark file according to the received mark file renaming instruction.
The data integrity verification device provided by the embodiment of the invention can execute the data integrity verification method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE six
Fig. 6 is a schematic structural diagram of a data integrity checking apparatus according to a sixth embodiment of the present invention, where the apparatus is deployed in a data transmission end, and may be a device management platform in the internet of things. The device includes: a flag file creation instruction sending module 610, a flag file renaming instruction sending module 620 and a data integrity confirmation module 630. Wherein:
the flag file creating instruction sending module 610 is configured to generate an issued check code of data to be issued, generate a flag file creating instruction according to the issued check code, and send the flag file creating instruction to a data receiving end, so that the data receiving end generates a flag file in which the issued check code is stored;
a flag file renaming instruction sending module 620, configured to transmit data to be issued to a data receiving end, and send a flag file renaming instruction to the data receiving end, so that the data receiving end renames a flag file;
the data integrity confirmation module 630 is configured to determine that the data to be issued is completely issued if a renaming success instruction fed back by the data receiving end is received; the renaming success instruction is sent after the data receiving end renames the mark file according to the mark file renaming instruction, or the data receiving end determines that the mark file is not renamed and sends the issued check code in the mark file and the received check code of the issued data at the same time.
According to the technical scheme of the embodiment of the invention, the data sending end sends the mark file creating instruction to the data receiving end before sending the data, so that the data receiving end generates the mark file stored with the sent check code, and sends the mark file renaming instruction to the data receiving end after sending the data to be sent, so that the data receiving end can check the integrity of the data according to the mark file name and the check code, and the data is determined to be completely sent when receiving the renaming success instruction fed back by the data receiving end. The problem that in the prior art, a data integrity checking mode is inaccurate in checking result and easy to cause repeated data issuing is solved, the accuracy and efficiency of data issuing are improved, and repeated and invalid data issuing is reduced.
On the basis of the above embodiment, the apparatus further includes:
the data issuing failure confirmation module is used for determining that the data to be issued fails to be issued if an issuing failure instruction fed back by the data receiving end is received; the issuing failure instruction is that the data receiving end determines that the mark file is not renamed, and the issuing check code in the mark file is not sent when the receiving check code of the issued data is different from the issuing check code.
On the basis of the above embodiment, the apparatus further includes:
the query result acquisition module is used for sending a query instruction to the data receiving end and receiving a query result fed back by the data receiving end;
and the data issued confirmation module is used for determining that the data to be issued is completely issued if the renamed mark file is determined to exist according to the query result.
The data integrity verification device provided by the embodiment of the invention can execute the data integrity verification method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE seven
Fig. 7 is a schematic structural diagram of a computer apparatus according to a seventh embodiment of the present invention, as shown in fig. 7, the computer apparatus includes a processor 70, a memory 71, an input device 72, and an output device 73; the number of the processors 70 in the computer device may be one or more, and one processor 70 is taken as an example in fig. 7; the processor 70, the memory 71, the input device 72 and the output device 73 in the computer apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 7.
The memory 71 is used as a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as modules corresponding to the data integrity checking method in the embodiment of the present invention (for example, the check code obtaining module 510 and the data integrity checking module 520 in the data integrity checking apparatus, or the flag file creating instruction sending module 610, the flag file renaming instruction sending module 620, and the data integrity confirming module 630 in the data integrity checking apparatus). The processor 70 executes various functional applications of the computer device and data processing by executing software programs, instructions and modules stored in the memory 71, that is, implements the data integrity checking method described above. The method comprises the following steps:
if the sign file is determined not to be renamed, generating a receiving check code of the issued data, and acquiring an issued check code in the sign file;
the mark file is generated according to a mark file creating instruction sent by a data sending end, and the issued check code is generated by the data sending end according to data to be issued and is stored in the mark file creating instruction;
and carrying out integrity check on the issued data according to the received check code and the issued check code.
Alternatively, the data integrity check method as described above is implemented. The method comprises the following steps:
generating an issued check code of data to be issued, generating a mark file creating instruction according to the issued check code, and sending the mark file creating instruction to a data receiving end so that the data receiving end generates a mark file storing the issued check code;
transmitting the data to be issued to a data receiving end, and sending a mark file renaming instruction to the data receiving end so that the data receiving end renames the mark file;
if a renaming success instruction fed back by a data receiving end is received, determining that the data to be issued is completely issued; the renaming success instruction is sent after the data receiving end renames the mark file according to the mark file renaming instruction, or the data receiving end determines that the mark file is not renamed and sends the issued check code in the mark file and the received check code of the issued data at the same time.
The memory 71 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 71 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 71 may further include memory located remotely from the processor 70, which may be connected to a computer device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 72 may be used to receive input numeric or character information and generate key signal inputs relating to user settings and function controls of the computer apparatus. The output device 73 may include a display device such as a display screen.
Example eight
An eighth embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a data integrity checking method, and the method includes:
if the sign file is determined not to be renamed, generating a receiving check code of the issued data, and acquiring an issued check code in the sign file;
the mark file is generated according to a mark file creating instruction sent by a data sending end, and the issued check code is generated by the data sending end according to data to be issued and is stored in the mark file creating instruction;
and carrying out integrity check on the issued data according to the received check code and the issued check code.
Alternatively, the data integrity check method as described above is performed. The method comprises the following steps:
generating an issued check code of data to be issued, generating a mark file creating instruction according to the issued check code, and sending the mark file creating instruction to a data receiving end so that the data receiving end generates a mark file storing the issued check code;
transmitting the data to be issued to a data receiving end, and sending a mark file renaming instruction to the data receiving end so that the data receiving end renames the mark file;
if a renaming success instruction fed back by a data receiving end is received, determining that the data to be issued is completely issued; the renaming success instruction is sent after the data receiving end renames the mark file according to the mark file renaming instruction, or the data receiving end determines that the mark file is not renamed and sends the issued check code in the mark file and the received check code of the issued data at the same time.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the data integrity checking method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the data integrity checking apparatus, each unit and each module included in the embodiment are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (11)

1. A data integrity checking method, performed by a data receiving end, the method comprising:
if the sign file is determined not to be renamed, generating a receiving check code of the issued data, and acquiring an issued check code in the sign file;
the mark file is generated according to a mark file creating instruction sent by a data sending end, and the issued check code is generated by the data sending end according to data to be issued and is stored in the mark file creating instruction;
and carrying out integrity check on the issued data according to the received check code and the issued check code.
2. The method of claim 1, wherein performing integrity check on the transmitted data according to the received check code and the transmitted check code comprises:
and if the received check code is determined to be the same as the issued check code, determining that the issued data is complete, and renaming the marker file.
3. The method of claim 1, prior to determining that the flag file is not renamed, further comprising:
according to the received sign file creating instruction, creating a sign file, acquiring an issued check code in the sign file creating instruction, and storing the issued check code in the sign file;
and renaming the marker file according to the received marker file renaming instruction.
4. A data integrity checking method, performed by a data transmitting end, the method comprising:
generating an issued check code of data to be issued, generating a mark file creating instruction according to the issued check code, and sending the mark file creating instruction to a data receiving end so that the data receiving end generates a mark file storing the issued check code;
transmitting the data to be issued to a data receiving end, and sending a mark file renaming instruction to the data receiving end so that the data receiving end renames the mark file;
if a renaming success instruction fed back by a data receiving end is received, determining that the data to be issued is completely issued; the renaming success instruction is sent after the data receiving end renames the mark file according to the mark file renaming instruction, or the data receiving end determines that the mark file is not renamed and sends the issued check code in the mark file and the received check code of the issued data at the same time.
5. The method of claim 4, further comprising:
if receiving a delivery failure instruction fed back by a data receiving end, determining that the delivery of the data to be delivered fails; the issuing failure instruction is that the data receiving end determines that the mark file is not renamed, and the issuing check code in the mark file is not sent when the receiving check code of the issued data is different from the issuing check code.
6. The method of claim 4, wherein after generating the transmitted check code of the data to be transmitted, further comprising:
sending a query instruction to a data receiving end and receiving a query result fed back by the data receiving end;
and if the renamed mark file exists according to the query result, determining that the data to be issued is completely issued.
7. A data integrity verification apparatus, disposed in a data receiving end, the apparatus comprising:
the check code acquisition module is used for generating a receiving check code of the issued data and acquiring an issued check code in the mark file if the mark file is determined not to be renamed;
the mark file is generated according to a mark file creating instruction sent by a data sending end, and the issued check code is generated by the data sending end according to data to be issued and is stored in the mark file creating instruction;
and the data integrity checking module is used for carrying out integrity checking on the issued data according to the received check code and the issued check code.
8. A data integrity checking apparatus, disposed in a data transmitting end, the apparatus comprising:
the system comprises a mark file creating instruction sending module, a mark file creating module and a data receiving terminal, wherein the mark file creating instruction sending module is used for generating an issued check code of data to be issued, generating a mark file creating instruction according to the issued check code and sending the mark file creating instruction to the data receiving terminal so that the data receiving terminal generates a mark file stored with the issued check code;
the system comprises a mark file renaming instruction sending module, a mark file renaming module and a data receiving terminal, wherein the mark file renaming instruction sending module is used for transmitting data to be issued to the data receiving terminal and sending a mark file renaming instruction to the data receiving terminal so that the data receiving terminal renames a mark file;
the data integrity confirmation module is used for determining that the data to be issued is completely issued if a renaming success instruction fed back by the data receiving end is received; the renaming success instruction is sent after the data receiving end renames the mark file according to the mark file renaming instruction, or the data receiving end determines that the mark file is not renamed and sends the issued check code in the mark file and the received check code of the issued data at the same time.
9. A device management platform, characterized in that the platform establishes a connection with at least two intelligent networked end devices and/or edge networked end devices, the platform being configured to perform the data integrity checking method according to any of claims 4-6.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the data integrity checking method of any one of claims 1-3 or 4-6 when executing the program.
11. A storage medium containing computer-executable instructions for performing the data integrity checking method of any one of claims 1-3 or 4-6 when executed by a computer processor.
CN202110932361.XA 2021-08-13 2021-08-13 Data integrity checking method and device, computer equipment and storage medium Active CN113609532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110932361.XA CN113609532B (en) 2021-08-13 2021-08-13 Data integrity checking method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110932361.XA CN113609532B (en) 2021-08-13 2021-08-13 Data integrity checking method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113609532A true CN113609532A (en) 2021-11-05
CN113609532B CN113609532B (en) 2024-04-12

Family

ID=78340703

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110932361.XA Active CN113609532B (en) 2021-08-13 2021-08-13 Data integrity checking method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113609532B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000295239A (en) * 1999-04-06 2000-10-20 Nec Commun Syst Ltd Transfer control system and method for detecting faulty node at file transfer
CN101060696A (en) * 2006-04-17 2007-10-24 大唐移动通信设备有限公司 A method for ensuring the compatible integrity parameters from both the receiving and sending parties
CN101388058A (en) * 2008-10-17 2009-03-18 北大方正集团有限公司 Data integrity verifying method and apparatus
CN102143010A (en) * 2010-08-24 2011-08-03 华为软件技术有限公司 Method for detecting message revision, sender equipment and receiver equipment
CN104579558A (en) * 2014-12-05 2015-04-29 苏州沃斯麦机电科技有限公司 Method for detecting integrity in data transmission process
CN105488425A (en) * 2015-11-30 2016-04-13 中国科学院国家授时中心 Data security assurance method based on serial port transmission
CN112905106A (en) * 2019-12-04 2021-06-04 贵州白山云科技股份有限公司 Data processing method, device, system, equipment and storage medium
CN112953812A (en) * 2021-01-29 2021-06-11 西藏宁算科技集团有限公司 File message uploading and storing method and device thereof
WO2021134418A1 (en) * 2019-12-31 2021-07-08 华为技术有限公司 Data checking method and apparatus

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000295239A (en) * 1999-04-06 2000-10-20 Nec Commun Syst Ltd Transfer control system and method for detecting faulty node at file transfer
CN101060696A (en) * 2006-04-17 2007-10-24 大唐移动通信设备有限公司 A method for ensuring the compatible integrity parameters from both the receiving and sending parties
CN101388058A (en) * 2008-10-17 2009-03-18 北大方正集团有限公司 Data integrity verifying method and apparatus
CN102143010A (en) * 2010-08-24 2011-08-03 华为软件技术有限公司 Method for detecting message revision, sender equipment and receiver equipment
CN104579558A (en) * 2014-12-05 2015-04-29 苏州沃斯麦机电科技有限公司 Method for detecting integrity in data transmission process
CN105488425A (en) * 2015-11-30 2016-04-13 中国科学院国家授时中心 Data security assurance method based on serial port transmission
CN112905106A (en) * 2019-12-04 2021-06-04 贵州白山云科技股份有限公司 Data processing method, device, system, equipment and storage medium
WO2021134418A1 (en) * 2019-12-31 2021-07-08 华为技术有限公司 Data checking method and apparatus
CN112953812A (en) * 2021-01-29 2021-06-11 西藏宁算科技集团有限公司 File message uploading and storing method and device thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈庄;叶成荫;齐锋;: "云数据传输加密及完整性校验方案", 信息安全研究, no. 07 *

Also Published As

Publication number Publication date
CN113609532B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
CN103248711B (en) A kind of method of files passe and server
CN110995513B (en) Data sending and receiving method in Internet of things system, internet of things equipment and platform
CN108696589B (en) Block chain data transmission method, device, equipment and storage medium
CN109981279B (en) Block chain system, communication method, device, equipment and medium
CN109101664B (en) Data transmission method, device, equipment and medium for lightweight node
CN101686145A (en) Equipment capable of upgrading, upgrading method and system
CN110471692B (en) Over-the-air upgrading method, device, equipment and storage medium of terminal program
CN112532704B (en) Data transmission method, device, electronic equipment and storage medium
CN106487560A (en) A kind of acquisition method of server configuration information, apparatus and system
CN109391673A (en) A kind of method, system and the terminal device of management update file
CN109327511B (en) Data request method and server based on HTTP (hyper text transport protocol)
CN103905495A (en) Application synchronization method and backstage server
CN112394957A (en) Server upgrading method and device, server and storage medium
CN104079623A (en) Method and system for controlling multilevel cloud storage synchrony
CN110460668B (en) File uploading method and device, computer equipment and storage medium
CN109189403B (en) Operating system OS batch installation method and device and network equipment
CN114612101A (en) Reliable inter-link route cross-link method and system for connection
CN113609532B (en) Data integrity checking method and device, computer equipment and storage medium
CN112131014A (en) Decision engine system and business processing method thereof
CN108933681B (en) Configuration updating method of cloud computing system, control center and cloud computing node
CN103731424A (en) Network data transmitting method, device and system
US9189370B2 (en) Smart terminal fuzzing apparatus and method using multi-node structure
WO2022121492A1 (en) File transmission method and apparatus, computer device, and storage medium
CN105354499A (en) Virus searching and killing method and device
CN103236901B (en) A kind of method of transfer instruction and device

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
GR01 Patent grant
GR01 Patent grant