Data file verification method and apparatus

By using the order encoding of photon polarization states as a verification factor between the sender and receiver, and utilizing quantum communication technology to verify the randomness of data files, the problem of the inability to detect data file content tampering in existing technologies is solved, thus realizing the security and integrity verification of data files.

CN118631539BActive Publication Date: 2025-12-02INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410783429.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2025-12-02
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

Existing technologies cannot perform randomness verification on the content of data files, making it impossible to detect tampering with the file content, especially modifications to monetary fields, which affects the security of downstream applications.

Method used

The order encoding of the consistent polarization states of photons in both the sender and receiver is used as a check factor. The check factor is transmitted through quantum communication technology, and randomness verification of the data file is performed at the receiver to ensure data integrity.

Benefits of technology

It implements randomness verification of data file content, prevents tampering, and improves the security and integrity of data files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118631539B_ABST
    Figure CN118631539B_ABST
Patent Text Reader

Abstract

This invention discloses a data file verification method and apparatus, relating to the fields of quantum communication and data security technology. The method includes: acquiring an original data file sent by a sender, verification data, and data verification parameters, wherein the data verification parameters include a verification factor, which is an order code of the consistent polarization states of photons in the sender and receiver; parsing the position information and the verification factor from the data verification parameters; extracting second target data from the original data file based on the position information; and then extracting verification data from the second target data based on the verification factor; performing a first data file verification by comparing the consistency of the verification data and the verification data to obtain a first verification result. This invention achieves random verification of the content of data files, improving the security of data files.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of quantum communication and data security technology, and more specifically, to a data file verification method and apparatus. Background Technology

[0002] Currently, data file verification in banking systems typically involves the recipient verifying the filename, size, length, and number of elements, or checking the integrity of the data file by examining the correlation between certain fields at the beginning and end. This current method of data file verification cannot handle random changes to the data file content. If the file content changes, even if the length and size remain the same, some characters may be tampered with without being detected. Modifications to certain monetary fields, in particular, can significantly impact downstream applications. Therefore, existing technology lacks a solution for random verification of data file content to improve data file security. Summary of the Invention

[0003] In order to solve at least one of the technical problems in the background art, the present invention proposes a data file verification method and apparatus.

[0004] To achieve the above objectives, according to one aspect of the present invention, a data file verification method is provided, the method being applied to a receiver, the method comprising:

[0005] The original data file, verification data, and data verification parameters sent by the sender are obtained. The data verification parameters include a verification factor and the position information of the first target data in the original data file. The verification data is extracted from the first target data according to the verification factor. The verification factor is the order code of the consistent polarization states in the photon polarization states of the sender and the receiver.

[0006] The location information and the verification factor are parsed from the data verification parameters. Then, the second target data is extracted from the original data file based on the location information. Finally, the verification data is extracted from the second target data based on the verification factor.

[0007] The first data file is verified by comparing the consistency between the verification data and the validation data, and a first validation result is obtained.

[0008] Optionally, the data file verification method further includes:

[0009] If the first verification result is successful, then the first verification result is sent to the sender;

[0010] Receive a verification file sent by the sender based on the first verification result, wherein the verification file includes at least one of: a check file, a control file, and an upstream control file for all sessions.

[0011] The original data file is subjected to a second data file verification based on the verification file to obtain a second verification result, and the original data file is stored when the second verification result is a successful verification.

[0012] Optionally, the verification factor is specifically obtained by the sender using a random polarization filter to sequentially filter n photons each time to obtain the first photon polarization state information of the n photons, and then transmitting the n photons in polarization state sequentially to the receiver through a quantum channel. The receiver sequentially receives the n photons in polarization state, and then uses a random polarization filter to filter the n photons in polarization state one by one each time to obtain the second photon polarization state information of the n photons. The receiver then sends the second photon polarization state information to the sender through a non-quantum channel. Finally, the sender determines the obtained value based on the order encoding of the consistent polarization states in the first photon polarization state information and the second photon polarization state information, where n is a preset target data length parameter and n is an integer greater than 1.

[0013] Optionally, the data file verification method further includes:

[0014] The receiver sequentially receives n photons in polarization state transmitted by the sender through a quantum channel. The sender uses a random polarization filter to filter the n photons sequentially each time to obtain the first photon polarization state information of the n photons. Then, the receiver sequentially transmits the n photons in polarization state to the receiver through the quantum channel. Here, n is a preset target data length parameter and n is an integer greater than 1.

[0015] Each time, a random polarization filter is used to filter each of the n photons in a polarization state to obtain the second photon polarization state information of the n photons;

[0016] The second photon polarization state information is sent to the sender through a non-quantum channel, so that the sender can determine the verification factor based on the order encoding of the consistent polarization states in the first and second photon polarization state information.

[0017] Optionally, the step of filtering each of the n photons in a polarization state using a random polarization filter includes:

[0018] Each time, one of two orthogonal polarization base filters is randomly used to filter each of the n photons in the polarization state.

[0019] Optionally, the verification data is specifically the first target data obtained by the sender extracting n bits of data from the original data file according to a preset extraction rule, and then extracting the first target data according to the verification factor; the data verification parameter is specifically generated by the sender based on the position information of the first target data in the original data file and the verification factor.

[0020] Optionally, the data verification parameters further include: the length of the verification factor; the position information specifically includes: the start position and the end position;

[0021] The process of extracting second target data from the original data file based on the location information, and then extracting verification data from the second target data based on the verification factor, specifically includes:

[0022] The second target data is extracted from the original data file based on the start position and the end position, and then the verification data is extracted from the second target data based on the verification factor and the length of the verification factor.

[0023] Optionally, the target data length parameter n is specifically obtained by the sender randomly selecting a value within a preset numerical range.

[0024] To achieve the above objectives, according to another aspect of the present invention, a data file verification device is provided, which is applied to a receiver, and the device includes:

[0025] The data acquisition unit is used to acquire the original data file, verification data, and data verification parameters sent by the sender. The data verification parameters include a verification factor and the position information of the first target data in the original data file. The verification data is extracted from the first target data according to the verification factor. The verification factor is the order code of the consistent polarization states in the photon polarization states of the sender and the receiver.

[0026] The data verification generation unit is used to parse the location information and the verification factor from the data verification parameters, then extract the second target data from the original data file according to the location information, and then extract the verification data from the second target data according to the verification factor.

[0027] The verification unit is used to perform a first data file verification by comparing the consistency between the verification data and the check data, and to obtain a first verification result.

[0028] To achieve the above objectives, according to another aspect of the present invention, a computer device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described data file verification method.

[0029] To achieve the above objectives, according to another aspect of the present invention, a computer-readable storage medium is also provided, on which a computer program / instructions are stored, which, when executed by a processor, implement the steps of the above-described data file verification method.

[0030] To achieve the above objectives, according to another aspect of the present invention, a computer program product is also provided, comprising a computer program / instructions that, when executed by a processor, implement the steps of the above-described data file verification method.

[0031] The beneficial effects of this invention are as follows:

[0032] This invention uses the order encoding of the consistent polarization states of photons in the sender and receiver as a verification factor. Based on the randomness in quantum mechanics, the verification factor used in this invention has a certain degree of randomness. This invention verifies data files based on this verification factor, realizing random verification of the content of data files, which helps to prevent data files from being tampered with and improves the security of data files. Attached Figure Description

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

[0034] Figure 1 This is a first flowchart of the data file verification method according to an embodiment of the present invention;

[0035] Figure 2 This is a second flowchart of the data file verification method according to an embodiment of the present invention;

[0036] Figure 3 This is a flowchart illustrating the determination of the verification factor in an embodiment of the present invention;

[0037] Figure 4 This is a schematic diagram illustrating the interaction between the sender and receiver in an embodiment of the present invention to determine the verification factor;

[0038] Figure 5 This is a flowchart illustrating the process of determining data verification parameters according to an embodiment of the present invention;

[0039] Figure 6 This is a schematic diagram of photon modulation according to the present invention;

[0040] Figure 7 This is a schematic diagram illustrating the process of data file verification through interaction between the sender and receiver in an embodiment of the present invention;

[0041] Figure 8 This is a structural block diagram of the data file verification device according to an embodiment of the present invention;

[0042] Figure 9 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0043] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0044] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0045] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification, claims and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, products or devices.

[0046] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0047] It should be noted that the information collected in the technical solution of this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with the relevant laws, regulations and standards of the relevant countries and regions, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation portals are provided for users to choose to authorize or refuse.

[0048] It should be noted that the technical solution of this application provides users with corresponding operation entry points for users to choose to agree to or reject the automated decision results; if the user chooses to reject, the process will proceed to the expert decision-making process.

[0049] It should be noted that the data file verification method and apparatus of the present invention can be used in the financial field, or in any field other than the financial field. The application field of the data file verification method and apparatus of the present invention is not limited.

[0050] This invention proposes to utilize quantum communication technology to first determine the consistent polarization states of photons in the sender and receiver, and use these states as the order values ​​for random verification, also known as quasi-random verification factors. When the sender transmits the data file, it also sends the verification factors to the receiver. Upon receiving the data and verification factors, the receiver extracts data according to the positional order of the verification factors for verification. If they match, the data is considered to meet the transmission requirements and has not been tampered with, thus achieving data integrity transmission.

[0051] It should be noted that the application scenarios of the data file verification method and apparatus of the present invention involve a sender and a receiver. The sender sends a data file to the receiver, and the receiver verifies the received data file. The sender and receiver can take various forms; for example, the sender can be a bank system server, and the receiver can be a server for a specific application. The present invention does not limit the specific forms of the sender and receiver.

[0052] It should be noted that the data file verification method and apparatus in the following embodiments of the present invention are applied to the receiving party, that is, the implementing entity of the data file verification method in the following embodiments of the present invention is the receiving party.

[0053] Figure 1 This is a first flowchart of the data file verification method according to an embodiment of the present invention, as follows: Figure 1 As shown, in one embodiment of the present invention, the data file verification method of the present invention includes steps S101 to S103.

[0054] Step S101: Obtain the original data file, verification data, and data verification parameters sent by the sender. The data verification parameters include: a verification factor and the position information of the first target data in the original data file. The verification data is extracted from the first target data according to the verification factor. The verification factor is the order code of the consistent polarization states in the photon polarization states of the sender and the receiver.

[0055] Step S102: Parse the location information and the verification factor from the data verification parameters, then extract the second target data from the original data file based on the location information, and then extract the verification data from the second target data based on the verification factor.

[0056] Step S103: By comparing the consistency between the verification data and the validation data, a first data file validation is performed to obtain a first validation result.

[0057] Figure 2 This is a second flowchart of the data file verification method according to an embodiment of the present invention, as follows: Figure 2 As shown, in one embodiment of the present invention, the data file verification method of the present invention further includes steps S201 to S203.

[0058] Step S201: If the first verification result is successful, then the first verification result is sent to the sender.

[0059] Step S202: Receive the verification file sent by the sender based on the first verification result, wherein the verification file includes at least one of: a check file, a control file, and an upstream control file for all sessions.

[0060] Step S203: Perform a second data file verification on the original data file according to the verification file to obtain a second verification result, and store the original data file when the second verification result is a successful verification.

[0061] This invention proposes to utilize quantum communication technology to first determine the consistent polarization states of photons between the sender and receiver, and use these states as the order values ​​for random verification, also known as quasi-random verification factors. When the sender transmits the data file, it also sends the verification factors to the receiver. Upon receiving the data and verification factors, the receiver extracts data according to the order of the verification factors for verification. If they match, the data is considered to meet the transmission requirements and has not been tampered with, thus achieving data integrity transmission. This invention primarily involves the sender and receiver ends.

[0062] The sender primarily reads the target data length parameter *n* from the system. It transmits photons through different polarization filters, resulting in irregularly polarized photons that are converted into different codes of 0 and 1. These are then sent to the receiver via a quantum channel. Simultaneously, the sender receives the photon polarization state information returned by the receiver through a regular channel. This information is compared with the sender's photon polarization state information, and a subset sequence with consistent polarization states is measured. The positions of these consistent positions are used as check factors (e.g., bits 1, 4, 8, and 9). These check factors, along with their length (e.g., if four check factors are found, the length is 4, and the check factors are bits 1, 4, 8, and 9), are combined with other parameters (such as the start and end positions of the target data) to form data verification parameters. Then, *n* bits of target data are extracted from the original data file according to preset rules. Finally, bits 1, 4, 8, and 9 are extracted from the target data to obtain the verification data. This verification data, along with the data verification parameters and the original data file, is sent to the receiver.

[0063] Preferably, the banking system can set the target data length parameter n to meet the requirements of different verification security levels. Alternatively, it can use a function or random number generation mechanism to set a random number as the length parameter of the verification number, but the length of the random number needs to be controlled to be neither too small nor too large, for example, not less than 1 or greater than 100. By flexibly setting the target data length parameter n, the target data length n can be used as the polarization filter parameter for photonic quantum transmission, converting it into quantum encoded information of different lengths and sending it to the receiver.

[0064] The receiver receives the quantum code sent by the sender through a quantum channel, and filters the polarized photons sent by the sender by setting different polarization filters to obtain the polarization state of each photon. Then, the receiver sends the photon polarization state information to the sender through a non-quantum channel.

[0065] The receiver also verifies the data to be verified sent by the sender, taking into account the data verification parameters. Based on the values ​​set in the data verification parameters, it reads the received raw data file, for example, starting from the 10th bit, reading 10 bits of data to obtain the target data. Then, based on the verification factor (bits 1, 4, 8, and 9), it extracts bits 1, 4, 8, and 9 from the target data to obtain the verification data. This data is then compared with the verification data sent by the sender. If the verification passes, the receiver returns the verification result to the sender.

[0066] After the receiver completes the quantum random number security verification (i.e., the receiver's verification based on the verification factor), it is also necessary to verify the length, size, etc., of the original data file against regular check files and control files, or to verify the overall number of files transmitted. If the verification passes, the verification result is returned to the sender, and the original data file is saved in a locally specified directory or on a server.

[0067] In one embodiment of the present invention, the verification factor is specifically determined as follows: the sender uses a random polarization filter to sequentially filter n photons each time to obtain the first photon polarization state information of the n photons, and then transmits the n photons in polarization state sequentially to the receiver through a quantum channel. The receiver sequentially receives the n photons in polarization state, and then uses a random polarization filter to filter the n photons in polarization state one by one each time to obtain the second photon polarization state information of the n photons. The receiver then sends the second photon polarization state information to the sender through a non-quantum channel. Finally, the sender determines the obtained polarization state information based on the order encoding of the consistent polarization states in the first photon polarization state information and the second photon polarization state information, where n is a preset target data length parameter and n is an integer greater than 1.

[0068] In one embodiment of the present invention, the target data length parameter n is specifically obtained by the sender randomly selecting a value within a preset numerical range. This preset numerical range can be greater than 1 and less than 100.

[0069] In another embodiment of the present invention, the target data length parameter n is specifically a preset value, for example, n = 10.

[0070] In one embodiment of the present invention, the verification data is specifically obtained by the sender extracting n bits of data from the original data file according to a preset extraction rule to obtain first target data, and then extracting the first target data according to the verification factor; the data verification parameter is specifically generated by the sender based on the position information of the first target data in the original data file and the verification factor.

[0071] Figure 3 This is a flowchart of the process for determining the verification factor in an embodiment of the present invention, as follows: Figure 3 As shown, in one embodiment of the present invention, the process of determining the verification factor specifically includes steps S301 to S303.

[0072] Step S301: The receiver sequentially receives n photons in polarization state transmitted by the sender through the quantum channel. The sender uses a random polarization filter to filter the n photons sequentially each time to obtain the first photon polarization state information of the n photons. Then, the receiver sequentially transmits the n photons in polarization state to the receiver through the quantum channel. Here, n is a preset target data length parameter and n is an integer greater than 1.

[0073] In step S302, each time a random polarization filter is used to filter the n photons in polarization state one by one, the second photon polarization state information of the n photons is obtained.

[0074] Step S303: The second photon polarization state information is sent to the sender through a non-quantum channel, so that the sender determines the verification factor based on the order encoding of the consistent polarization states in the first photon polarization state information and the second photon polarization state information.

[0075] In one embodiment of the present invention, the above-mentioned filtering of the n photons in polarization states one by one using random polarization filters specifically includes:

[0076] Each time, one of two orthogonal polarization base filters is randomly used to filter each of the n photons in the polarization state.

[0077] Figure 4 This is a schematic diagram illustrating the interaction between the sender and receiver in determining the check factor according to an embodiment of the present invention, as shown below. Figure 4 As shown, when determining the check factor:

[0078] The sending end primarily involves filtering the quantum light source through its polarization filter to form a quantum code, obtaining the first photon polarization state information of n photons. This information is then transmitted to the receiver via a quantum channel. The sending end also provides the second photon polarization state information to its data processing module. The data processing module compares the second photon polarization state information returned by the receiver with the first photon polarization state information, and places the sequence codes of the measured consistent polarization states into a subset sequence as a check factor.

[0079] The receiver mainly receives the n photons in polarization state transmitted from the quantum channel, performs quantum encoding processing, that is, filters them through the receiver's polarization filter, detects the second photon polarization state information of the n photons, and returns the n photons in polarization state to the sender through a normal channel (i.e., a non-quantum channel).

[0080] Figure 5This is a flowchart illustrating the process of determining data verification parameters according to an embodiment of the present invention. Figure 5 Steps S1 to S3 in the text provide a specific embodiment for determining the check factor. Figure 5 Step S4 in the document provides a specific embodiment for determining data verification parameters. Figure 5 In this embodiment, it is assumed that the preset target data length parameter n = 10.

[0081] In step S1, the sender uses different polarization filters to send 10 photons with different polarization states sequentially from left to right to the receiver. These photons are listed in the first row (i.e., the polarization state information of the first photon). For example, for a polarization filter with a "-" polarization, the photon will automatically convert to a polarization state after passing through this filter. Photons in a polarized state.

[0082] Photons can acquire different polarization states by passing through different polarizations. The principle behind this involves processing at both the sender and receiver. The receiver randomly selects two sets of orthogonal polarization bases (⊕ represents 0° / 90°). This refers to using any type of 45° / 135° polarization filter to modulate single-photon transmission, such as... Figure 6 As shown.

[0083] When processing at the receiving end, if the polarization base is the same as that at the transmitting end, accurate measurement can be achieved; if they are different, the sample will be randomly assigned to a receiver. Because quantum particles are indivisible, the receiving detection will not be distributed evenly at 50%.

[0084] The polarization settings for the sender and receiver are shown in Table 1 below.

[0085] Sender (photon polarization state) Receiver (measurement base 0° / 90°) Receiver (measurement base 45° / 135°) 0° polarization 1 0or1 90° polarization 0 0or1 45° polarization 0or1 1 135° polarization 0or1 0

[0086] Table 1

[0087] In step S2, the receiver randomly uses either a "+" polarization filter or an "x" polarization filter (i.e., two sets of orthogonal polarization base filters) to filter the incoming photons one by one. The states of the 10 received photons are displayed in the second row (i.e., the polarization state information of the second photon). For example, the polarization state of the photon sent by the transmitter is... If the polarization filter at the receiver is set to "+", then after the photon passes through this filter, it is only allowed to be in the state of "+". If a photon passes through, the polarization state obtained at the receiving end will be...

[0088] Step S3: After comparison, the codes of photons with the same polarization state in the photon polarization state information of the sender and receiver are the sequential subset sequence of the matching check factors. For example, if the matched photons are the 1st, 3rd, and 8th photons, then the subset sequence is {1, 3, 8}, and their photon polarization states are... This subset of sequences is allowed to pass through at the receiving end and serves as the check factor.

[0089] Step S4: Combine the check factor, the start position and end position of the target data, and the length of the check factor to form the "data check parameter". The start position of the target data is the beginning position of a segment of data used for check within the entire data file. The end position of the data file is the end position of that segment of data used for check within the entire data file. Subtracting the start position from the end position gives the "target data length parameter n". The length of the check factor refers to the number of quantum polarizations hit in step S3. For example, if the 1st, 3rd, and 8th positions are obtained in the previous step, then the check factor length is 3. Furthermore, the check factor refers to a specific subset sequence, such as {1, 3, 8}. The values ​​of each subset sequence are written into the check factor from left to right. For example, if the check factor length is 3, then 3 characters are set in the "check factor" data block, with each character written into the subset sequence: the first character is "1", the second is "3", and the third is "8". If the check factor length is "N", then the values ​​of the subset sequence at N positions are placed in the check factor data block.

[0090] In one embodiment of the present invention, the data verification parameter further includes: the length of the verification factor; the position information specifically includes: the start position and the end position.

[0091] In one embodiment of the present invention, step S102 above, which involves extracting second target data from the original data file based on the location information and then extracting verification data from the second target data based on the verification factor, specifically includes:

[0092] The second target data is extracted from the original data file based on the start position and the end position, and then the verification data is extracted from the second target data based on the verification factor and the length of the verification factor.

[0093] Figure 7 This is a schematic diagram illustrating the process of data file verification through interaction between the sender and receiver in an embodiment of the present invention, as shown below. Figure 7 As shown, in a specific embodiment of the present invention, the process of data file verification through interaction between the sender and receiver includes the following steps:

[0094] Step 1: The sender performs quantum encoding on the photons and sends them to the receiver through a quantum channel. The receiver filters and detects the photons through a set polarization filter and transmits the detected polarization state information to the next step.

[0095] Step 2: The receiver returns the polarization state information to the sender through a normal channel. After obtaining the polarization state information from the receiver, the sender determines the check factor.

[0096] Step 3: The verification factor, verification factor length, and target data length parameters are processed by the "data file verification parameter model" to form data verification parameters, which are then integrated into the original data file.

[0097] Step 4: The sender transmits the data verification parameters, verification data, and original data file to the data receiver. The data receiver interprets the parameters according to the settings in the data verification parameters and verifies the transmitted data to be verified one by one according to the parameter values. This is the first verification process.

[0098] Step 5: The sender sends the original data verification parameters to the receiver. If the first verification process is successful, the receiver interprets the original data verification parameters and verifies the original data according to the parameters. For example, it verifies the length, size, and status of the data file. If a batch of data files is being transmitted, it also needs to verify the number of data files.

[0099] Step 6: After the receiver performs a second verification on the original data, if the verification is successful, it returns the verification success information to the sender. The data receiver then performs further processing on the data and saves the data in the directory specified by the target application or on the server.

[0100] In one specific embodiment of the present invention, the present invention also provides an embodiment for verifying bank card account transaction detail data files as an example to illustrate the method of the present invention. The specific process for verifying bank card account transaction detail data files includes the following steps:

[0101] Step 401: The sender transmits optical quantum information to the receiver via a quantum channel. The target data length parameter n is set; this parameter n can be pre-defined or randomly set. For example, if a data length of 10 bits is used for verification, then when transmitting the optical quantum information, the 10 bits of optical quantum information are quantum-encoded sequentially and sent from the sender to the receiver.

[0102] Step 402: The receiver obtains the quantum code from the sender, passes it through a randomly set polarization filter, detects the photon information, obtains the final photon polarization state, and returns the photon polarization state information to the sender through a normal channel. The sender obtains the photon polarization state information returned by the receiver, compares it with its own photon polarization state information, and encodes the order of the photon polarization states with consistent polarization as a subset sequence, i.e., the check factor. Assuming that after encoding and identifying the 10-bit photon polarization state, a match is found at bits 1, 3, and 8, then the subset sequence is {1, 3, 8}, and this subset sequence is the check factor.

[0103] Step 403: Combine the obtained verification factor with other elements to form the verification parameters according to the data verification parameter model "start position + end position + verification factor length + verification factor". Taking a bank card account transaction detail data file as an example, the start position is from the 100th position, and a length of 10 characters is extracted. The verification parameters at this time are "100+110+3+138". The data format of the bank card account transaction detail data file is shown in Table 2 below.

[0104]

[0105]

[0106] Table 2

[0107] Following the data format in the table above, the data file after filling in the specific values ​​should be "10001100011000112345678901234567890223456789012345678911112023-01-0112:12:1210112345678901234567891011001234567890123456781101100Zhang SanLi Si000000000001230000000000000000000000000000000000000000000000001000110010000000 Starting from the 100th position, take 10 bits of data, ending at the 109th position. Extracting from the above data, "0110012345" will be the target data (i.e., the first target data). Based on the check factor length of 3, the check factor {1, 3, 8} is used to check the 1st, 3rd, and 8th bits of the target data. The 1st, 3rd, and 8th bits are "0", "1", and "3" respectively, resulting in the check data "013". Combined with the check parameter "1001103138" and the original data file, they are merged together and sent to the receiver as the data to be checked for the next step.

[0108] Step 404: The receiver first interprets the verification parameter "1001103138", which means that the original data extracted from the original data file starts from the 100th bit and ends at the 110th bit. The original data extracted from the original data file is "0110012345" (i.e., the second target data). At this time, according to the verification factor of 3, "138" is determined to be the data of the 1st, 3rd, and 8th bits. The data of the 1st, 3rd, and 8th bits are "0", "1", and "3" respectively, resulting in the verification data "013". The receiver compares the verification data with the above verification data. If the comparison is consistent, the verification is confirmed to be successful. If the verification is successful, the verification result is returned to the sender.

[0109] Step 405: The receiver performs secondary verification on the data. The receiver checks the original data files against the verification file (chk file), control file (CTL file), and upstream control file indicating session completion, verifying consistency in length, size, and file status. If multiple data files exist, the number of files is also checked. Additionally, specific verifications are performed, such as setting verification rules to ensure certain fields are mandatory or related to other fields. If verification is successful, a success message is returned to the sender, and the data receiver proceeds with further processing, saving the data to the directory specified by the target application or on the server.

[0110] In a preferred embodiment of the present invention, when performing correlation verification based on special rules, additional rules need to be set and written to the verification file. Some special rules may be quite complex, and if there are many rules, the overall verification efficiency will be low. By setting the verification parameters through the verification factor and combining them with the randomness length parameter, data from different data file segments can be randomly sampled and checked. When performing random verification on data files using the data file verification parameter model with multiple verification parameters, this can serve as a substitute for the aforementioned special rules, reducing the need to pre-set verification rules.

[0111] As can be seen from the above embodiments, the present invention proposes a data file verification method based on quantum transmission, which achieves at least the following beneficial effects:

[0112] 1. This invention utilizes the characteristics of quantum superposition and entanglement in optical quantum communication, as well as the randomness of quantum measurement results based on the three principles of uncertainty, measurement collapse, and no cloning in quantum mechanics, to obtain a check factor with strong randomness as the subsequent check order. This is used to check the data file with random bits of data, ensuring the efficiency of data check and the integrity of data transmission.

[0113] 2. By utilizing the diversity of values ​​for the target data length parameter n, this invention can verify data files of any length, avoiding the transmission of incorrect data due to the truncation of verification rules caused by a single verification rule. This ensures that the data is authentic, complete, and cannot be tampered with, thus increasing the difficulty of cracking.

[0114] The following will explain some of the terms used in this invention:

[0115] Quantum: If a physical quantity has a smallest indivisible basic unit, then this physical quantity is quantized, and the smallest unit is called a quantum. In physics, a quantum is often used to refer to an indivisible basic entity, the smallest unit used to represent the properties of matter or physical quantities.

[0116] Quantum communication utilizes the principles of quantum mechanics (uncertainty skewness and no-cloning), based on quantum teleportation and quantum storage technologies. Using photons as quantum carriers and employing quantum information encoding based on light polarization, it achieves secure communication of photon state information over arbitrary distances. Its principle is primarily based on the theory of quantum entanglement, using quantum teleportation to transmit information. The process of optical quantum communication is as follows: A pair of entangled particles are pre-constructed and placed at opposite ends of the communication path. A joint measurement (an operation) is performed between the particle with the unknown quantum state and the sending particle. The receiving particle instantly collapses (changes) into a state symmetrical to the state of the sending particle after its collapse. The information from the joint measurement is then transmitted to the receiver via a classical channel. The receiver performs a unitary transformation (equivalent to an inverse transformation) on the collapsed particle based on the received information, thus obtaining the same unknown quantum state as the sending particle.

[0117] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0118] Based on the same inventive concept, embodiments of the present invention also provide a data file verification device. This device is applied to a receiver and can be used to implement the data file verification method described in the above embodiments, as shown in the following embodiments. Since the principle by which the data file verification device solves the problem is similar to that of the data file verification method, embodiments of the data file verification device can refer to embodiments of the data file verification method, and repeated details will not be elaborated further. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0119] Figure 8 This is a structural block diagram of the data file verification device according to an embodiment of the present invention, as shown below. Figure 8 As shown, in one embodiment of the present invention, the data file verification device of the present invention includes:

[0120] Data acquisition unit 1 is used to acquire the original data file, verification data and data verification parameters sent by the sender. The data verification parameters include: a verification factor and the position information of the first target data in the original data file. The verification data is extracted from the first target data according to the verification factor. The verification factor is the order code of the consistent polarization states in the photon polarization states of the sender and the receiver.

[0121] The data generation unit 2 is used to parse the location information and the verification factor from the data verification parameters, then extract the second target data from the original data file according to the location information, and then extract the verification data from the second target data according to the verification factor.

[0122] Verification unit 3 is used to perform first data file verification by comparing the consistency between the verification data and the check data, and obtain a first verification result.

[0123] In one embodiment of the present invention, the data file verification device of the present invention further includes:

[0124] The first verification result sending unit is configured to send the first verification result to the sender if the first verification result is a successful verification.

[0125] A verification file receiving unit is configured to receive a verification file sent by the sender based on the first verification result, wherein the verification file includes at least one of a check file, a control file, and an upstream control file for all sessions.

[0126] The second verification unit is used to perform a second data file verification on the original data file according to the verification file, obtain a second verification result, and store the original data file when the second verification result is a successful verification.

[0127] In one embodiment of the present invention, the data file verification device of the present invention further includes:

[0128] A photon receiving unit is used to sequentially receive n photons in polarization state transmitted by the sender through a quantum channel. The sender uses a random polarization filter to filter the n photons sequentially each time to obtain the first photon polarization state information of the n photons, and then transmits the n photons in polarization state sequentially to the receiver through the quantum channel. Here, n is a preset target data length parameter and n is an integer greater than 1.

[0129] The filtering unit is used to filter the n photons in polarization state one by one using random polarization filters each time to obtain the second photon polarization state information of the n photons;

[0130] A photon polarization state information transmitting unit is used to transmit the second photon polarization state information to the sender through a non-quantum channel, so that the sender can determine the verification factor according to the order encoding of the consistent polarization states in the first photon polarization state information and the second photon polarization state information.

[0131] In one embodiment of the present invention, the filtering unit is specifically used to randomly use one of two orthogonal polarization base polarization filters to filter the n photons in polarization states one by one each time.

[0132] In one embodiment of the present invention, the verification data is specifically obtained by the sender extracting n bits of data from the original data file according to a preset extraction rule to obtain first target data, and then extracting the first target data according to the verification factor; the data verification parameter is specifically generated by the sender based on the position information of the first target data in the original data file and the verification factor.

[0133] In one embodiment of the present invention, the data verification parameter further includes: the length of the verification factor; the position information specifically includes: the start position and the end position;

[0134] In one embodiment of the present invention, the verification data generation unit 2 is specifically used to extract the second target data from the original data file according to the start position and the end position, and then extract the verification data from the second target data according to the verification factor and the length of the verification factor.

[0135] To achieve the above objectives, according to another aspect of this application, a computer device is also provided. For example... Figure 9 As shown, the computer device includes a memory, a processor, a communication interface, and a communication bus. The memory stores a computer program that can run on the processor. When the processor executes the computer program, it implements the steps in the method of the above embodiments.

[0136] The processor can be a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.

[0137] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and units, such as the program units corresponding to the above-described method embodiments of the present invention. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory, thereby implementing the methods described in the above-described method embodiments.

[0138] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor, etc. Furthermore, the memory may include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0139] The one or more units are stored in the memory and, when executed by the processor, perform the methods described in the above embodiments.

[0140] The specific details of the aforementioned computer equipment can be understood by referring to the relevant descriptions and effects in the above embodiments, and will not be repeated here.

[0141] To achieve the above objectives, according to another aspect of this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed in a computer processor, implements the steps in the data file verification method described above. Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.

[0142] To achieve the above objectives, according to another aspect of this application, a computer program product is also provided, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described data file verification method.

[0143] Obviously, those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device, or fabricating them separately as individual integrated circuit modules, or fabricating multiple modules or steps as a single integrated circuit module. Thus, the present invention is not limited to any particular hardware and software combination.

[0144] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A data file verification method, characterized in that, The method is applied to the receiver, and the method includes: The original data file, verification data, and data verification parameters sent by the sender are obtained. The data verification parameters include a verification factor and the position information of the first target data in the original data file. The verification data is extracted from the first target data according to the verification factor. The verification factor is the order code of the consistent polarization states in the photon polarization states of the sender and the receiver. The location information and the verification factor are parsed from the data verification parameters. Then, the second target data is extracted from the original data file based on the location information. Finally, the verification data is extracted from the second target data based on the verification factor. The first data file is verified by comparing the consistency between the verification data and the validation data, and a first validation result is obtained.

2. The data file verification method according to claim 1, characterized in that, Also includes: If the first verification result is successful, then the first verification result is sent to the sender; Receive a verification file sent by the sender based on the first verification result, wherein the verification file includes at least one of: a check file, a control file, and an upstream control file for all sessions. The original data file is subjected to a second data file verification based on the verification file to obtain a second verification result, and the original data file is stored when the second verification result is a successful verification.

3. The data file verification method according to claim 1, characterized in that, The verification factor is specifically determined as follows: the sender uses a random polarization filter to sequentially filter n photons each time to obtain the first photon polarization state information of the n photons, and then transmits the n photons in polarization state sequentially to the receiver through a quantum channel. The receiver sequentially receives the n photons in polarization state, and then uses a random polarization filter to filter the n photons in polarization state one by one each time to obtain the second photon polarization state information of the n photons. The receiver then sends the second photon polarization state information to the sender through a non-quantum channel. Finally, the sender determines the obtained polarization state information based on the order encoding of the consistent polarization states in the first and second photon polarization state information, where n is a preset target data length parameter and n is an integer greater than 1.

4. The data file verification method according to claim 1, characterized in that, Also includes: The receiver sequentially receives n photons in polarization state transmitted by the sender through a quantum channel. The sender uses a random polarization filter to filter the n photons sequentially each time to obtain the first photon polarization state information of the n photons. Then, the receiver sequentially transmits the n photons in polarization state to the receiver through the quantum channel. Here, n is a preset target data length parameter and n is an integer greater than 1. Each time, a random polarization filter is used to filter each of the n photons in a polarization state to obtain the second photon polarization state information of the n photons; The second photon polarization state information is sent to the sender through a non-quantum channel, so that the sender can determine the verification factor based on the order encoding of the consistent polarization states in the first and second photon polarization state information.

5. The data file verification method according to claim 3 or 4, characterized in that, The process of filtering each of the n photons in a polarization state using a random polarization filter each time specifically includes: Each time, one of two orthogonal polarization filters is randomly used to filter each of the n photons in polarization state.

6. The data file verification method according to claim 3 or 4, characterized in that, The verification data is specifically derived by the sender from the original data file by extracting n bits of data according to a preset extraction rule to obtain the first target data, and then extracting the first target data according to the verification factor; the data verification parameters are specifically generated by the sender based on the position information of the first target data in the original data file and the verification factor.

7. The data file verification method according to claim 1, characterized in that, The data verification parameters also include: the length of the verification factor; the position information specifically includes: the start position and the end position; The process of extracting second target data from the original data file based on the location information, and then extracting verification data from the second target data based on the verification factor, specifically includes: The second target data is extracted from the original data file based on the start position and the end position, and then the verification data is extracted from the second target data based on the verification factor and the length of the verification factor.

8. The data file verification method according to claim 3 or 4, characterized in that, The target data length parameter n is specifically obtained by the sender randomly selecting a value within a preset range.

9. A data file verification device, characterized in that, The device is used at the receiver, and the device includes: The data acquisition unit is used to acquire the original data file, verification data, and data verification parameters sent by the sender. The data verification parameters include a verification factor and the position information of the first target data in the original data file. The verification data is extracted from the first target data according to the verification factor. The verification factor is the order code of the consistent polarization states in the photon polarization states of the sender and the receiver. The data verification generation unit is used to parse the location information and the verification factor from the data verification parameters, then extract the second target data from the original data file according to the location information, and then extract the verification data from the second target data according to the verification factor. The verification unit is used to perform a first data file verification by comparing the consistency between the verification data and the check data, and to obtain a first verification result.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 8.

12. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Large-prime-number multiplicative symmetric encryption method based on quantum key distribution

    CN113890735A

  • Quantum direct communication method based on redundancy check and error correction retransmission

    CN114172587A