CN111131461A - Anti-reprocessing method, device, equipment and medium applied to file transmission - Google Patents
Anti-reprocessing method, device, equipment and medium applied to file transmission Download PDFInfo
- Publication number
- CN111131461A CN111131461A CN201911366243.6A CN201911366243A CN111131461A CN 111131461 A CN111131461 A CN 111131461A CN 201911366243 A CN201911366243 A CN 201911366243A CN 111131461 A CN111131461 A CN 111131461A
- Authority
- CN
- China
- Prior art keywords
- file
- duplication
- processed
- mode
- sending
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 93
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000012958 reprocessing Methods 0.000 title claims abstract description 26
- 230000002265 prevention Effects 0.000 claims abstract description 82
- 238000012545 processing Methods 0.000 claims abstract description 39
- 238000012546 transfer Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 13
- 238000010276 construction Methods 0.000 claims description 11
- 230000000875 corresponding effect Effects 0.000 description 14
- 230000008569 process Effects 0.000 description 11
- 230000004048 modification Effects 0.000 description 7
- 238000012986 modification Methods 0.000 description 7
- 238000003672 processing method Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000003032 molecular docking Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/174—Redundancy elimination performed by the file system
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a reprocessing prevention method applied to file transmission, which comprises the following steps: constructing a duplicate prevention dimension configuration table, wherein the duplicate prevention dimension configuration table comprises a sender encoding field, a receiver encoding field, a sending duplicate prevention mode field and a receiving duplicate prevention mode field; constructing a file anti-duplication table, wherein the file anti-duplication table is used for storing file transmission records each time; when a file is sent/received, inquiring the anti-duplication dimension configuration table according to a sender code and a receiver code to obtain a sending anti-duplication mode/a receiving anti-duplication mode of the file to be processed; and inquiring the file anti-duplication table according to the sending anti-duplication mode/receiving anti-duplication mode, if the file transmission record of the file to be processed is not inquired, executing anti-duplication processing according to the sending anti-duplication mode/receiving anti-duplication mode, and then sending/receiving the file to be processed. The invention solves the problems that the conventional file transmission process adopts a unified anti-duplication mode, so that the file anti-duplication mode is excessively prevented and cannot be configured.
Description
Technical Field
The present invention relates to the field of information technologies, and in particular, to a method, an apparatus, a device, and a medium for anti-replay applied to file transfer.
Background
In the prior art, a standard interface is mainly used for docking a deep certification platform during cross-company data transmission, and a process from data application to confirmation is completed in a file interaction mode. During the transmission process of the file, it is most important to ensure the integrity and security of the file. In the process of reading the file, the most important is to avoid the problem that the transaction number/total sum is doubled due to repeated reading of the data in the file, so that larger data abnormality is caused. At present, in order to avoid the duplication of files, the prior art uniformly adopts an interactive mode once a day, that is, a seller/TA party sends a batch of application files once a day, and simultaneously processes the files sent by the TA party/seller once a day. Specifically, an identifier is randomly generated, and for a file to be sent or received, if the identifier is not available today, an operation is executed, then the identifier is added, and if the identifier is judged to exist subsequently, the corresponding operation is not executed any more. In this way, once the file of the current day is read, if for some reason, for example, at different time points, it is a very complicated process to need to re-transmit the modified file once, and it needs to be completed by complicated data modification, so the implementation cost is high. It can be seen that the prior art cannot configure a file anti-duplication mode for different application scenarios to avoid repeatedly reading files.
Therefore, finding a method to solve the problems of excessive duplicate prevention and incapability of configuring a file duplicate prevention mode caused by adopting a unified duplicate prevention mode in the existing file transmission process becomes a technical problem that needs to be solved by technical personnel in the field.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a medium for processing file transmission to prevent duplication, which are used for solving the problems that the existing file transmission process adopts a unified duplication prevention mode to cause excessive duplication prevention and cannot configure a file duplication prevention mode.
A reprocessing method applied to file transmission comprises the following steps:
constructing a duplicate prevention dimension configuration table, wherein the duplicate prevention dimension configuration table comprises a sender encoding field, a receiver encoding field, a sending duplicate prevention mode field and a receiving duplicate prevention mode field;
constructing a file anti-duplication table, wherein the file anti-duplication table is used for storing file transmission records each time;
when a file is sent/received, inquiring the anti-duplication dimension configuration table according to a sender code and a receiver code to obtain a sending anti-duplication mode/a receiving anti-duplication mode of the file to be processed;
and inquiring the file anti-duplication table according to the sending anti-duplication mode/receiving anti-duplication mode, if the file transmission record of the file to be processed is not inquired from the file anti-duplication table, executing anti-duplication processing according to the sending anti-duplication mode/receiving anti-duplication mode, and then sending/receiving the file to be processed.
Further, when sending/receiving the file, querying the anti-duplication dimension configuration table according to the sender code and the receiver code to obtain a sending anti-duplication mode/receiving anti-duplication mode of the file to be processed includes:
matching the sender code with a sender code field in the anti-re-dimensionality configuration table, and matching the receiver code with the receiver code field;
and if the same sender coded field value and the same receiver coded field value are matched, acquiring a corresponding sending anti-duplication mode/receiving anti-duplication mode according to the sender coded field value and the receiver coded field value.
Further, the querying the file duplication prevention table according to the sending duplication prevention mode/receiving duplication prevention mode, if the file transmission record of the file to be processed is not queried from the file duplication prevention table, executing duplication prevention processing according to the sending duplication prevention mode/receiving duplication prevention mode, and then sending/receiving the file to be processed includes:
if the sending anti-duplication mode/the receiving anti-duplication mode is a file name-based anti-duplication mode, inquiring a file name field in the file anti-duplication table according to the file name of the file to be processed;
if the file name field does not contain the file name of the file to be processed, the file to be processed is sent/received;
and adding the sender code, the receiver code, the file name and the creation time of the file to be processed into the file duplication preventing table to generate a transmission record of the file to be processed.
Further, the querying the file duplication prevention table according to the sending duplication prevention mode/receiving duplication prevention mode, if the file transmission record of the file to be processed is not queried from the file duplication prevention table, executing duplication prevention processing according to the sending duplication prevention mode/receiving duplication prevention mode, and then sending/receiving the file to be processed includes:
if the sending anti-duplication mode/the receiving anti-duplication mode is based on the MD5 value, generating an MD5 value according to the file to be processed;
querying an MD5 value field in the file anti-duplication table according to the MD5 value;
if the MD5 value field does not contain the MD5 value of the file to be processed, sending/receiving the file to be processed;
and adding the sender code, the receiver code, the file name, the MD5 value, the creation time and the updating time of the file to be processed into the file anti-duplication table to generate a transmission record of the file to be processed.
Further, the method further comprises:
and if the file transmission record of the file to be processed is inquired from the file duplication preventing table, stopping sending/receiving the file to be processed.
A kind of processing unit of preventing heavy used in file transmission, including:
the device comprises a first construction module, a second construction module and a third construction module, wherein the first construction module is used for constructing a heavy dimension prevention configuration table, and the heavy dimension prevention configuration table comprises a sender encoding field, a receiver encoding field, a sending heavy-dimension prevention mode field and a receiving heavy-dimension prevention mode field;
the second construction module is used for constructing a file anti-duplication table, and the file anti-duplication table is used for storing each file transmission record;
the query module is used for querying the anti-duplication dimension configuration table according to the sender code and the receiver code when the file is sent/received, so as to obtain a sending anti-duplication mode/a receiving anti-duplication mode of the file to be processed;
and the anti-duplication processing module is used for inquiring the file anti-duplication table according to the sending anti-duplication mode/receiving anti-duplication mode, executing anti-duplication processing according to the sending anti-duplication mode/receiving anti-duplication mode if the file transmission record of the file to be processed is not inquired from the file anti-duplication table, and then sending/receiving the file to be processed.
Further, the anti-reprocessing module includes:
the first anti-duplication processing unit is used for inquiring a file name field in the file anti-duplication table according to the file name of the file to be processed if the sending anti-duplication mode/the receiving anti-duplication mode is a file name-based anti-duplication mode;
the first sending/receiving unit is used for sending/receiving the file to be processed if the file name field does not contain the file name of the file to be processed;
and the first adding unit is used for adding the sender code, the receiver code, the file name and the creation time of the file to be processed into the file anti-duplication table so as to generate a transmission record of the file to be processed.
Further, the anti-reprocessing module includes:
the summary information generating unit is used for generating an MD5 value according to the file to be processed if the sending anti-duplication mode/the receiving anti-duplication mode is an MD5 value-based anti-duplication mode;
the second anti-duplication processing unit is used for inquiring the MD5 value field in the file anti-duplication table according to the MD5 value;
a second sending/receiving unit, configured to send/receive the to-be-processed file if the MD5 value field does not include the MD5 value of the to-be-processed file;
and the second adding unit is used for adding the sender code, the receiver code, the file name, the MD5 value, the creation time and the updating time of the file to be processed into the file duplication preventing table so as to generate a transmission record of the file to be processed.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the above anti-replay method for file transfer when executing the computer program.
A computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the above-described anti-replay method applied to file transfer.
The embodiment of the invention constructs a heavy dimension prevention configuration table, wherein the heavy dimension prevention configuration table comprises a sender encoding field, a receiver encoding field, a sending heavy-dimension prevention type field and a receiving heavy-dimension prevention type field; constructing a file anti-duplication table, wherein the file anti-duplication table is used for storing each file transmission record; when a file is sent/received, inquiring the anti-duplication dimension configuration table according to a sender code and a receiver code to obtain a sending anti-duplication mode/a receiving anti-duplication mode of the file to be processed; then inquiring the file anti-duplication table according to the sending anti-duplication mode/receiving anti-duplication mode, if the file transmission record of the file to be processed is not inquired from the file anti-duplication table, executing anti-duplication processing according to the sending anti-duplication mode/receiving anti-duplication mode, and sending/receiving the file to be processed after anti-duplication processing; therefore, the problems that in the prior art, a unified anti-duplication mode is adopted in the file transmission process, so that the file anti-duplication mode is excessively prevented and cannot be configured are solved; furthermore, the file anti-duplication table stores file transmission records of each time in different anti-duplication modes, so that repeated receiving and issuing of data are avoided, the effectiveness and uniqueness of service data are ensured, the accuracy requirement of the service data can be met, the operation efficiency of the system can be improved, and the error rate can be reduced
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a flowchart of a method for preventing reprocessing applied in file transfer according to an embodiment of the present invention;
FIG. 2 is a flowchart of step S103 of the anti-replay method applied to file transfer according to an embodiment of the present invention;
FIG. 3 is a flowchart of step S104 of the anti-replay method applied to file transfer according to an embodiment of the present invention;
FIG. 4 is a flowchart of step S104 of the anti-replay method applied to file transfer according to another embodiment of the present invention;
FIG. 5 is a flowchart of a method for preventing reprocessing applied to file transfer according to another embodiment of the present invention;
FIG. 6 is a schematic block diagram of an anti-replay device for file transfer according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problems that in the prior art, when a standard interface is used for docking a deep certification platform, an excessive anti-duplication mode caused by a once-a-day interaction mode is uniformly adopted in a file transmission process, and a file anti-duplication mode cannot be configured, in the embodiment of the invention, an anti-duplication dimension configuration table and a file anti-duplication table are constructed, a file anti-duplication mode adopted by a reseller/TA (trusted authority/trusted authority) is dynamically configured through the anti-duplication dimension configuration table, and anti-duplication information after file anti-duplication processing in each file transmission process is recorded through the file anti-duplication table.
The following will describe in detail the anti-replay method applied to file transfer provided in this embodiment, as shown in fig. 1, the anti-replay method applied to file transfer includes:
in step S101, a duplication prevention configuration table is constructed, where the duplication prevention configuration table includes a sender encoding field, a receiver encoding field, a sending duplication prevention mode field, and a receiving duplication prevention mode field.
In the embodiment of the present invention, the anti-replay dimensionality configuration table is configured by a terminal using the anti-replay processing method provided by the embodiment of the present invention, and is used for storing relevant information in the anti-replay processing process. The configuration table of the anti-duplication dimension comprises a plurality of configuration records, wherein each configuration record records a field value of a sender code, a field value of a corresponding receiver code, a field value of a sending anti-duplication mode between the sender and the receiver and a field value of a receiving anti-duplication mode. As mentioned above, the field values of the sender code and the receiver code include, but are not limited to, a sponsor code, and a TA party code.
Here, the reseller code and the TA code are two codes applied through the chinese capital market standards net. When the anti-duplication processing method is used by the proxy terminal, the anti-duplication dimension configuration table is maintained by the proxy terminal, the field value of the sender code is the proxy code, meanwhile, the receiver code field, the sending anti-duplication mode field and the receiving anti-duplication mode field are set according to the TA party butted by the proxy, the sending anti-duplication mode field is used for recording the anti-duplication processing mode when the proxy sends a file to the TA party, and the receiving anti-duplication mode field is used for recording the anti-duplication processing mode when the proxy receives the file sent by the TA party. When the TA side terminal uses the anti-duplication processing method, the TA side terminal maintains the anti-duplication dimension configuration table, the field value of the sender code is the TA side code, and meanwhile, the receiver code field, the sending anti-duplication mode field and the receiving anti-duplication mode field are set according to the affiliate connected with the TA side, the sending anti-duplication mode field is used for recording the anti-duplication processing mode when the TA side affiliate sends the file, and the receiving anti-duplication mode field is used for recording the anti-duplication processing mode when the TA side receives the file sent by the affiliate.
Optionally, in the midboard standard interface, the name of the file transfer is defined as OFD _ xxx _? Is there a Txt. Wherein xxx _? Is there a Representing either the TA party code or the sponsor code, yyymmdd representing the time of transmission of the current file, and ww representing the file type. It can be seen that the file name of the same file type and the transmission time of the day are related. Optionally, the file name is used as one of the duplicate prevention modes in the embodiment of the invention. On the other hand, the MD5Message Digest Algorithm (MD5Message-Digest Algorithm) can generate a 128-bit (16-byte) hash value (hash value) according to the file content to ensure the integrity and consistency of the information transmission. The embodiment of the invention takes the hash value obtained by the MD5message digest algorithm as another anti-duplication mode.
In the embodiment of the invention, the anti-duplicate dimension configuration table is constructed, so that both the reseller and the TA (trusted authority) party can flexibly set the anti-duplicate processing mode in the file transmission process, and the problem that a unified anti-duplicate mode is adopted in the file transmission process in the prior art is solved.
In step S102, a file anti-duplication table is constructed, and the file anti-duplication table is used for storing each file transmission record.
Besides the anti-duplication dimension configuration table, the embodiment of the invention also adds the file anti-duplication table. And storing each time file transmission record through the file anti-duplication table every time the file is sent or received by the reseller or the TA. The file anti-duplication table comprises field information corresponding to the anti-duplication mode in the anti-duplication dimension configuration table.
Optionally, the fields in the file anti-duplication table include, but are not limited to, a sender code field, a receiver code field, a file name field, an MD5 value field, a creation time field, and an update time field. And when the sending anti-duplication mode field or the receiving anti-duplication mode field in the anti-duplication dimension configuration table is recorded in an anti-duplication mode based on the file name, adding the file name of the transmitted file to the file name field of the file anti-duplication table when the file transmission record is stored. When the sending anti-duplication mode field or the receiving anti-duplication mode field in the anti-duplication dimension configuration table is recorded in an anti-duplication mode based on the MD5 value, the MD5 value of the transmitted file is added to the MD5 value field of the file anti-duplication table when the file transmission record is stored.
In step S103, when sending/receiving a file, the anti-duplication dimension configuration table is queried according to the sender code and the receiver code to obtain a sending anti-duplication mode/a receiving anti-duplication mode of the file to be processed.
After the anti-duplication dimension configuration table and the file anti-duplication table are set, when the reseller/TA sends/receives a file each time, the anti-duplication dimension configuration table is inquired through a sender code and a receiver code to obtain a sending anti-duplication mode/a receiving anti-duplication mode. Optionally, as shown in fig. 2, when sending/receiving a file in step S103, querying the anti-duplication dimension configuration table according to the sender code and the receiver code to obtain a sending anti-duplication mode/receiving anti-duplication mode of the file to be processed includes:
in step S201, the sender code is matched with a sender code field in the anti-replay configuration table, and the receiver code is matched with the receiver code field.
Here, each configuration record of the anti-duplication dimension configuration table includes a field value of a sender code, a field value of a receiver code, and a field value of a sending anti-duplication mode and a field value of a receiving anti-duplication mode between the sender and the receiver. The embodiment of the invention respectively matches the sender code with the sender code field in the anti-re-dimensionality configuration table and matches the receiver code with the receiver code field to obtain the anti-re-dimensionality configuration record between the sender and the receiver.
In step S202, if the same value of the sender code field and the same value of the receiver code field are matched, a corresponding sending anti-duplication mode/receiving anti-duplication mode is obtained according to the value of the sender code field and the value of the receiver code field.
And if the field values identical to the sender codes and the receiver codes exist in the anti-duplication dimension configuration table, extracting records where the field values are located to obtain sending anti-duplication modes/receiving anti-duplication modes corresponding to the sender codes and the receiver codes. The sending anti-duplication mode/receiving anti-duplication mode comprises a file name-based anti-duplication mode and an MD5 value-based anti-duplication mode.
By the query based on the anti-duplication dimension configuration table, the integration of two anti-duplication modes is realized, so that the reseller/TA (trusted agent) can dynamically configure which file anti-duplication mode is adopted in the anti-duplication dimension configuration table, and the problem that the file anti-duplication mode cannot be configured due to the adoption of a unified anti-duplication mode in the file transmission process in the prior art is solved.
In step S104, the file duplication preventing table is queried according to the transmission duplication preventing manner/reception duplication preventing manner, and if the file transmission record of the file to be processed is not queried from the file duplication preventing table, the duplication preventing process is executed according to the transmission duplication preventing manner/reception duplication preventing manner, and then the file to be processed is transmitted/received.
In the embodiment of the present invention, the query manner of the file duplication preventing table in step S104 is related to the duplication preventing manner. Optionally, as shown in fig. 3, when the sending/receiving anti-duplication mode is a file name based anti-duplication mode, the step S104 includes:
in step S301, if the sending/receiving duplication prevention mode is a duplication prevention mode based on a file name, a file name field in the file duplication prevention table is queried according to the file name of the file to be processed.
As can be seen from the name definition of file transfer in the midrange standard interface as described above, the file name of the same file type and the transmission time/reception time of the day are correlated. The file name field in the file anti-duplication table is inquired through the file name of the file to be processed so as to judge whether the file to be processed is sent or received.
In step S302, if the file name field does not include the file name of the file to be processed, the file to be processed is sent/received.
And if the file name field does not contain the file name of the file to be processed, the file to be processed is not sent/received and is a file to be processed for the first time, and the file to be processed is sent/received.
In step S303, the sender code, the receiver code, the file name, and the creation time of the file to be processed are added to the file duplication prevention table to generate a transmission record of the file to be processed.
After the file to be processed is sent/received, the file transmission record of the time is stored in the file anti-duplication table, the file transmission record comprises a sender code, a receiver code, a file name and creation time of the file to be processed, and the transmission record of the file to be processed is generated. And the transmission record is used for the subsequent anti-reprocessing of the file to be processed.
By the aid of the anti-duplication processing mode based on the file names, a file transmission mode of sending and receiving once a day is realized, repeated receiving and sending of data are avoided, and effectiveness and uniqueness of service data are guaranteed.
Further, with the above-mentioned anti-duplication method based on file names, once a file has a problem and needs to be reprocessed for a second time, data modification is required to support the file. In view of this, the embodiment of the present invention further provides a duplicate prevention mode based on the MD5 value. Optionally, as shown in fig. 4, when the sending/receiving anti-duplication mode is an anti-duplication mode based on an MD5 value, the step S104 includes:
in step S401, if the sending/receiving duplication prevention method is a duplication prevention method based on the MD5 value, an MD5 value is generated according to the file to be processed.
Here, according to the file content of the file to be processed, the embodiment of the present invention generates a corresponding message digest through a message digest algorithm, and generates an MD5 value of the file to be processed. Here, the MD5 value is related to the file content of the file to be processed. If the file content of the file to be processed is not changed, the corresponding MD5 value is also not changed, and if the file content of the file to be processed is changed, the corresponding MD5 value is also changed.
In step S402, the MD5 value field in the file anti-duplication table is queried according to the MD5 value.
According to the embodiment of the invention, the MD5 value of the file to be processed is used for inquiring the MD5 value field in the file anti-duplication table so as to judge whether the file to be processed is sent or received.
In step S403, if the MD5 value field does not include the MD5 value of the pending file, the pending file is transmitted/received.
As described above, if the file content of the file to be processed does not change, the corresponding MD5 value also does not change, and if the file content of the file to be processed changes, the corresponding MD5 value also changes. And if the MD5 value of the file to be processed is not included in the MD5 value field, the file to be processed is indicated to be a file to be processed for the first time or a file which is modified and needs to be reprocessed, and then the file to be processed is sent/received.
In step S404, the sender code, the receiver code, the file name, the MD5 value, the creation time, and the update time of the file to be processed are added to the file duplication prevention table to generate a transmission record of the file to be processed.
After the file to be processed is sent/received, the file transmission record of the current time is stored in the file anti-duplication table, the file transmission record comprises a sender code, a receiver code, an MD5 value, creation time and updating time of the file to be processed, and the transmission record of the file to be processed is generated. And the transmission record is used for the subsequent anti-reprocessing of the file to be processed. Here, the creation time is a time when the file to be processed is first transmitted/received, and the update time is a time when the file to be processed is transmitted/received again. If the file is a file which is transmitted/received for the first time, the updating time does not need to be added.
Through the anti-duplication processing mode based on the MD5 value, if the file to be processed is not sent any more, the file content is unchanged, and the corresponding MD5 value is also unchanged, so that the anti-duplication effect is achieved. When the file to be processed has a problem and needs to be re-sent after modification, the content changes, so that the modified file to be processed is different from the file to be processed before modification, and the MD5 value generated according to the modified file to be processed is also different. Inquiring a file anti-duplication table according to the modified MD5 value of the file to be processed, adding the modified MD5 value of the file to be processed into the file anti-duplication table at the moment and finishing the processing flow of sending/receiving the file, wherein effective file transmission records cannot be obtained; therefore, data modification is carried out on the flow without manual intervention on the premise of keeping the consistency of the stable names, the automatic processing capacity of file transmission is enhanced on the condition of ensuring the anti-reprocessing, meanwhile, errors in the flow modification process are reduced, and the reliability and the flexibility of file transmission are effectively improved.
Optionally, as another preferred example of the present invention, as shown in fig. 5, the method further includes:
in step S105, if the file transmission record of the file to be processed is found from the file duplication prevention table, the sending/receiving of the file to be processed is terminated.
For the above-mentioned duplicate prevention mode based on the file name/duplicate prevention mode based on the MD5 value, if the file name/MD 5 value of the file to be processed is queried from the file duplicate prevention table, indicating that the file to be processed has been transmitted/received, the file to be processed is not processed.
In summary, in the anti-duplication processing method applied to file transmission provided in the embodiment of the present invention, the anti-duplication method is set according to a specific service scenario through the anti-duplication dimension configuration table, and includes an anti-duplication method based on a file name and an anti-duplication method based on an MD5 value, and two anti-duplication policies may be applied to different scenarios, such as scenarios where a reseller/TA sends/receives a modified file, respectively, so as to solve the problems that the file anti-duplication method cannot be configured and excessive anti-duplication is caused by adopting a unified anti-duplication method in a file transmission process in the prior art; furthermore, the file anti-duplication table stores file transmission records of each time in different anti-duplication modes, so that repeated receiving and issuing of data are avoided, the effectiveness and uniqueness of service data are ensured, the accuracy requirement of the service data can be met, the operation efficiency of the system can be improved, and the error rate can be reduced.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, a device for preventing re-processing applied to file transmission is provided, and the device for preventing re-processing applied to file transmission is in one-to-one correspondence with the method for preventing re-processing applied to file transmission in the above embodiment. As shown in fig. 6, the anti-reprocessing device applied to file transmission includes a first building module 61, a second building module 62, a query module 63, and an anti-reprocessing module 64. The functional modules are explained in detail as follows:
a first constructing module 61, configured to construct a duplicate prevention configuration table, where the duplicate prevention configuration table includes a sender encoding field, a receiver encoding field, a sending duplicate prevention mode field, and a receiving duplicate prevention mode field;
a second construction module 62, configured to construct a file duplication prevention table, where the file duplication prevention table is used to store file transmission records each time;
the query module 63 is configured to query the anti-duplication dimension configuration table according to the sender code and the receiver code when sending/receiving a file, so as to obtain a sending anti-duplication mode/a receiving anti-duplication mode of the file to be processed;
and a duplication prevention processing module 64, configured to query the file duplication prevention table according to the sending duplication prevention manner/receiving duplication prevention manner, execute duplication prevention processing according to the sending duplication prevention manner/receiving duplication prevention manner if the file transmission record of the file to be processed is not queried from the file duplication prevention table, and then send/receive the file to be processed.
Optionally, the query module includes:
the matching unit is used for matching the sender code with a sender code field in the anti-re-dimensionality configuration table and matching the receiver code with the receiver code field;
and the obtaining unit is used for obtaining a corresponding sending anti-duplication mode/receiving anti-duplication mode according to the sender coded field value and the receiver coded field value if the same sender coded field value and the same receiver coded field value are matched.
Optionally, the anti-reprocessing module includes:
the first anti-duplication processing unit is used for inquiring a file name field in the file anti-duplication table according to the file name of the file to be processed if the sending anti-duplication mode/the receiving anti-duplication mode is a file name-based anti-duplication mode;
the first sending/receiving unit is used for sending/receiving the file to be processed if the file name field does not contain the file name of the file to be processed;
and the first adding unit is used for adding the sender code, the receiver code, the file name and the creation time of the file to be processed into the file anti-duplication table so as to generate a transmission record of the file to be processed.
Optionally, the anti-reprocessing module includes:
the summary information generating unit is used for generating an MD5 value according to the file to be processed if the sending anti-duplication mode/the receiving anti-duplication mode is an MD5 value-based anti-duplication mode;
the second anti-duplication processing unit is used for inquiring the MD5 value field in the file anti-duplication table according to the MD5 value;
a second sending/receiving unit, configured to send/receive the to-be-processed file if the MD5 value field does not include the MD5 value of the to-be-processed file;
and the second adding unit is used for adding the sender code, the receiver code, the file name, the MD5 value, the creation time and the updating time of the file to be processed into the file duplication preventing table so as to generate a transmission record of the file to be processed.
Optionally, the apparatus further comprises:
and the termination module is used for terminating sending/receiving the file to be processed if the file transmission record of the file to be processed is inquired from the file duplication prevention table.
For the specific limitation of the anti-reprocessing device applied to file transmission, reference may be made to the above limitation of the anti-reprocessing method applied to file transmission, and details are not repeated here. The modules in the anti-reprocessing device applied to file transmission can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a reprocessing method applied to file transfer.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
constructing a duplicate prevention dimension configuration table, wherein the duplicate prevention dimension configuration table comprises a sender encoding field, a receiver encoding field, a sending duplicate prevention mode field and a receiving duplicate prevention mode field;
constructing a file anti-duplication table, wherein the file anti-duplication table is used for storing file transmission records each time;
when a file is sent/received, inquiring the anti-duplication dimension configuration table according to a sender code and a receiver code to obtain a sending anti-duplication mode/a receiving anti-duplication mode of the file to be processed;
and inquiring the file anti-duplication table according to the sending anti-duplication mode/receiving anti-duplication mode, if the file transmission record of the file to be processed is not inquired from the file anti-duplication table, executing anti-duplication processing according to the sending anti-duplication mode/receiving anti-duplication mode, and then sending/receiving the file to be processed.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.
Claims (10)
1. A reprocessing method applied to file transmission is characterized by comprising the following steps:
constructing a duplicate prevention dimension configuration table, wherein the duplicate prevention dimension configuration table comprises a sender encoding field, a receiver encoding field, a sending duplicate prevention mode field and a receiving duplicate prevention mode field;
constructing a file anti-duplication table, wherein the file anti-duplication table is used for storing file transmission records each time;
when a file is sent/received, inquiring the anti-duplication dimension configuration table according to a sender code and a receiver code to obtain a sending anti-duplication mode/a receiving anti-duplication mode of the file to be processed;
and inquiring the file anti-duplication table according to the sending anti-duplication mode/receiving anti-duplication mode, if the file transmission record of the file to be processed is not inquired from the file anti-duplication table, executing anti-duplication processing according to the sending anti-duplication mode/receiving anti-duplication mode, and then sending/receiving the file to be processed.
2. The method as claimed in claim 1, wherein the step of querying the anti-duplication dimension configuration table according to the sender code and the receiver code when sending/receiving the file to obtain the sending/receiving anti-duplication mode of the file to be processed comprises:
matching the sender code with a sender code field in the anti-re-dimensionality configuration table, and matching the receiver code with the receiver code field;
and if the same sender coded field value and the same receiver coded field value are matched, acquiring a corresponding sending anti-duplication mode/receiving anti-duplication mode according to the sender coded field value and the receiver coded field value.
3. The method as claimed in claim 1 or 2, wherein the querying the file anti-duplication table according to the transmission anti-duplication mode/reception anti-duplication mode, if the file transmission record of the file to be processed is not queried from the file anti-duplication table, performing anti-duplication processing according to the transmission anti-duplication mode/reception anti-duplication mode, and then transmitting/receiving the file to be processed comprises:
if the sending anti-duplication mode/the receiving anti-duplication mode is a file name-based anti-duplication mode, inquiring a file name field in the file anti-duplication table according to the file name of the file to be processed;
if the file name field does not contain the file name of the file to be processed, the file to be processed is sent/received;
and adding the sender code, the receiver code, the file name and the creation time of the file to be processed into the file duplication preventing table to generate a transmission record of the file to be processed.
4. The method as claimed in claim 1 or 2, wherein the querying the file anti-duplication table according to the transmission anti-duplication mode/reception anti-duplication mode, if the file transmission record of the file to be processed is not queried from the file anti-duplication table, performing anti-duplication processing according to the transmission anti-duplication mode/reception anti-duplication mode, and then transmitting/receiving the file to be processed comprises:
if the sending anti-duplication mode/the receiving anti-duplication mode is based on the MD5 value, generating an MD5 value according to the file to be processed;
querying an MD5 value field in the file anti-duplication table according to the MD5 value;
if the MD5 value field does not contain the MD5 value of the file to be processed, sending/receiving the file to be processed;
and adding the sender code, the receiver code, the file name, the MD5 value, the creation time and the updating time of the file to be processed into the file anti-duplication table to generate a transmission record of the file to be processed.
5. The reprocessing method for file transfer according to claim 1 or 2, wherein the method further comprises:
and if the file transmission record of the file to be processed is inquired from the file duplication preventing table, stopping sending/receiving the file to be processed.
6. A kind of processing unit of preventing repeating applied to file transmission, characterized by that, comprising:
the device comprises a first construction module, a second construction module and a third construction module, wherein the first construction module is used for constructing a heavy dimension prevention configuration table, and the heavy dimension prevention configuration table comprises a sender encoding field, a receiver encoding field, a sending heavy-dimension prevention mode field and a receiving heavy-dimension prevention mode field;
the second construction module is used for constructing a file anti-duplication table, and the file anti-duplication table is used for storing each file transmission record;
the query module is used for querying the anti-duplication dimension configuration table according to the sender code and the receiver code when the file is sent/received, so as to obtain a sending anti-duplication mode/a receiving anti-duplication mode of the file to be processed;
and the anti-duplication processing module is used for inquiring the file anti-duplication table according to the sending anti-duplication mode/receiving anti-duplication mode, executing anti-duplication processing according to the sending anti-duplication mode/receiving anti-duplication mode if the file transmission record of the file to be processed is not inquired from the file anti-duplication table, and then sending/receiving the file to be processed.
7. The device for preventing reprocessing applied to file transfer of claim 6, wherein said reprocessing preventing module comprises:
the first anti-duplication processing unit is used for inquiring a file name field in the file anti-duplication table according to the file name of the file to be processed if the sending anti-duplication mode/the receiving anti-duplication mode is a file name-based anti-duplication mode;
the first sending/receiving unit is used for sending/receiving the file to be processed if the file name field does not contain the file name of the file to be processed;
and the first adding unit is used for adding the sender code, the receiver code, the file name and the creation time of the file to be processed into the file anti-duplication table so as to generate a transmission record of the file to be processed.
8. The device for preventing reprocessing of file transfers according to claim 6 or 7, wherein said reprocessing prevention module comprises:
the summary information generating unit is used for generating an MD5 value according to the file to be processed if the sending anti-duplication mode/the receiving anti-duplication mode is an MD5 value-based anti-duplication mode;
the second anti-duplication processing unit is used for inquiring the MD5 value field in the file anti-duplication table according to the MD5 value;
a second sending/receiving unit, configured to send/receive the to-be-processed file if the MD5 value field does not include the MD5 value of the to-be-processed file;
and the second adding unit is used for adding the sender code, the receiver code, the file name, the MD5 value, the creation time and the updating time of the file to be processed into the file duplication preventing table so as to generate a transmission record of the file to be processed.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the anti-reprocessing method applied to file transfer according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the anti-replay method applied to file transfer according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911366243.6A CN111131461A (en) | 2019-12-26 | 2019-12-26 | Anti-reprocessing method, device, equipment and medium applied to file transmission |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911366243.6A CN111131461A (en) | 2019-12-26 | 2019-12-26 | Anti-reprocessing method, device, equipment and medium applied to file transmission |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111131461A true CN111131461A (en) | 2020-05-08 |
Family
ID=70503114
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911366243.6A Pending CN111131461A (en) | 2019-12-26 | 2019-12-26 | Anti-reprocessing method, device, equipment and medium applied to file transmission |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111131461A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140006354A1 (en) * | 2010-05-03 | 2014-01-02 | Panzura, Inc. | Executing a cloud command for a distributed filesystem |
US9098432B1 (en) * | 2008-04-08 | 2015-08-04 | Emc Corporation | System and method for data deduplication of backup images |
CN107613031A (en) * | 2017-11-08 | 2018-01-19 | 杭州亿方云网络科技有限公司 | A kind of document transmission system |
CN109241009A (en) * | 2018-08-21 | 2019-01-18 | 中国平安人寿保险股份有限公司 | Prevent file from repeating the method and its control method and device that upload |
CN110069735A (en) * | 2019-03-20 | 2019-07-30 | 平安普惠企业管理有限公司 | JS code is anti-to be repeatedly injected method, apparatus, computer equipment and storage medium |
-
2019
- 2019-12-26 CN CN201911366243.6A patent/CN111131461A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9098432B1 (en) * | 2008-04-08 | 2015-08-04 | Emc Corporation | System and method for data deduplication of backup images |
US20140006354A1 (en) * | 2010-05-03 | 2014-01-02 | Panzura, Inc. | Executing a cloud command for a distributed filesystem |
CN107613031A (en) * | 2017-11-08 | 2018-01-19 | 杭州亿方云网络科技有限公司 | A kind of document transmission system |
CN109241009A (en) * | 2018-08-21 | 2019-01-18 | 中国平安人寿保险股份有限公司 | Prevent file from repeating the method and its control method and device that upload |
CN110069735A (en) * | 2019-03-20 | 2019-07-30 | 平安普惠企业管理有限公司 | JS code is anti-to be repeatedly injected method, apparatus, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108573371B (en) | Data approval method, device, computer equipment and storage medium | |
CN109359994B (en) | Service processing method, device and system based on block chain | |
CN111475376B (en) | Method, apparatus, computer device and storage medium for processing test data | |
CN111460458B (en) | Data processing method, related device and computer storage medium | |
CN112398726B (en) | Receipt information processing method, system and storage medium for push message | |
CN110163003B (en) | Password management method and device | |
WO2022142153A1 (en) | Electricity meter upgrading method and system, smart meter, and storage medium | |
CN110597918A (en) | Account management method and device and computer readable storage medium | |
US20200169389A1 (en) | Creating a blockchain account and verifying blockchain transactions | |
CN110933022A (en) | Block processing method and device, computer equipment and storage medium | |
CN111899019A (en) | Method and system for cross validation and sharing of blacklist and multiple parties | |
CN113255014B (en) | Data processing method based on block chain and related equipment | |
CN110753037A (en) | Token management method, device and storage medium | |
CN111524009A (en) | Transaction verification method and device for blockchain system and hardware equipment | |
US20240163119A1 (en) | Device management method, system, and apparatus | |
CN112069169A (en) | Block data storage method and device, electronic equipment and readable storage medium | |
CN111339130A (en) | Data query method, related equipment and readable storage medium | |
CN112016122A (en) | Webpage data processing method and device, computer equipment and storage medium | |
CN110597820A (en) | Block chain based information processing method and device, storage medium and equipment | |
CN113987445A (en) | User login method and device of USB-KEY, computer equipment and storage medium | |
CN109587013B (en) | APP network compatibility testing method and device, computer equipment and storage medium | |
CN109413200B (en) | Resource import method, client, MES and electronic equipment | |
CN111565173A (en) | Intelligent contract management method and device for block chain system and hardware equipment | |
CN111131461A (en) | Anti-reprocessing method, device, equipment and medium applied to file transmission | |
CN112583606B (en) | Security verification method, server, terminal and storage medium |
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 | ||
AD01 | Patent right deemed abandoned |
Effective date of abandoning: 20231229 |
|
AD01 | Patent right deemed abandoned |