CN109241009B - Method for preventing file from being repeatedly uploaded and control method and device thereof - Google Patents

Method for preventing file from being repeatedly uploaded and control method and device thereof Download PDF

Info

Publication number
CN109241009B
CN109241009B CN201810955403.XA CN201810955403A CN109241009B CN 109241009 B CN109241009 B CN 109241009B CN 201810955403 A CN201810955403 A CN 201810955403A CN 109241009 B CN109241009 B CN 109241009B
Authority
CN
China
Prior art keywords
file
item
transmitted
uploaded
content
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.)
Active
Application number
CN201810955403.XA
Other languages
Chinese (zh)
Other versions
CN109241009A (en
Inventor
王彤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201810955403.XA priority Critical patent/CN109241009B/en
Publication of CN109241009A publication Critical patent/CN109241009A/en
Application granted granted Critical
Publication of CN109241009B publication Critical patent/CN109241009B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/194Calculation of difference between files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a control method and a device for preventing file from being repeatedly uploaded, wherein the method comprises the following steps: receiving an uploading request containing a file to be transmitted, wherein the file to be transmitted is a file based on a format template; comparing the content of the file to be transmitted with the content of each uploaded file according to the format template, wherein each uploaded file is a file based on the format template; if the uploaded file with the repeated content and the file to be uploaded exists, the uploading operation is not executed. The method and the device can reduce the risk of file repeated uploading, reduce the loss caused by file repeated uploading, and enable the file uploading function to be more flexible.

Description

Method for preventing file from being repeatedly uploaded and control method and device thereof
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a method for preventing file from repeated uploading, and a control method and apparatus thereof.
Background
At present, many functions in a configuration system need to import files, and one of the great risks is file re-import. However, if the file name and the file content are simply passed, there is no way to completely judge whether the file imported twice is really a duplicate or a business requirement. If the repeated content is uploaded without the anti-replay mechanism of the system, larger risks and losses may be brought, and as time goes by, the amount of redundant data becomes larger and memory resources are wasted greatly.
Therefore, how to accurately determine whether the file uploaded twice is repeated, and preventing the repeated file from being uploaded is a problem to be solved.
Disclosure of Invention
The invention provides a method for preventing file from being repeatedly uploaded and a control method thereof.
The present invention also provides a computer apparatus and a readable storage medium for executing the control method of the present invention for preventing file repeat.
In order to solve the problems, the invention adopts the following technical proposal:
In a first aspect, the present invention provides a control method for preventing file repeat, the method comprising:
receiving an uploading request containing a file to be transmitted, wherein the file to be transmitted is a file based on a format template;
comparing the content of the file to be transmitted with the content of each uploaded file according to the format template, wherein each uploaded file is a file based on the format template;
If the uploaded file with the repeated content and the file to be uploaded exists, the uploading operation is not executed.
Specifically, the method further comprises the following steps:
And generating the format template based on the uploading request and feeding back to the client.
Specifically, the file to be transmitted includes one or more list items and corresponding item identifiers.
Preferably, the method further comprises:
and after receiving the content information of the source file, the input control of the format template adds an item identifier to the content information of the source file.
Specifically, the comparing, according to the format template, the content of the file to be transferred with the content of each uploaded file, where each uploaded file is a file based on the format template, specifically includes:
Item identifiers and contents of all list items of the file to be transmitted are compared item by item, and whether the item identifiers and contents of all list items in the file to be transmitted are consistent with the item identifiers and contents of all list items in the file to be transmitted is judged;
and if the item identification and the content of each list item of the file to be transmitted are consistent with the item identification and the content of each list item in the transmitted file, judging that the uploaded file with the repeated content and the file to be transmitted exists.
Specifically, the comparing, according to the format template, the content of the file to be transferred with the content of each uploaded file, where each uploaded file is a file based on the format template, specifically includes:
Dividing the total number of repeated list items of the to-be-transmitted file and the transmitted file by the total number of list items of the to-be-transmitted file to calculate the repetition degree of the to-be-transmitted file, wherein the repeated list items are two list items with the same item identification and content as the list items;
And if the repeatability is judged to be greater than a preset threshold, sending a prompt message for processing the repeated list items.
In a second aspect, the present invention provides a method of preventing repeated uploading of a file, the method comprising:
Receiving a triggering instruction for requesting uploading of a file, and displaying a format template;
Receiving content information of a source file input through an input control of the format template, and generating a file to be transmitted;
And submitting an uploading request containing the file to be transmitted to a server.
Specifically, the receiving the content information of the source file input through the input control of the format template, and generating the to-be-transmitted file specifically includes:
dividing content information of the source file into one or more list items;
And adding item identifiers to the one or more list items to generate a pending file containing the one or more list items and corresponding item identifiers.
Specifically, the method further comprises the following steps:
and receiving a modification request aiming at the specified item identifier in the file to be transmitted, and modifying the corresponding item identifier.
Preferably, the responding to the triggering instruction of uploading the file displays a format template, which specifically includes:
The format template is obtained from a server and displayed;
or acquiring and displaying the format template pre-stored locally.
In a third aspect, the present invention provides a control apparatus for preventing file repeat, comprising:
the receiving module is used for receiving an uploading request containing a file to be transmitted, wherein the file to be transmitted is a file based on a format template;
The comparison module is used for comparing the content of the file to be transmitted with the content of each uploaded file according to the format template, and each uploaded file is a file based on the format template;
and the processing module is used for not executing uploading operation if the uploaded file with the repeated content and the file to be uploaded exists.
In a fourth aspect, the present invention provides an apparatus for preventing file repeat upload, comprising:
The display module is used for receiving a trigger instruction for requesting to upload the file, and the display format template is used for receiving the trigger instruction for requesting to upload the file and displaying the format template;
The receiving module is used for receiving the content information of the source file input through the input control of the format template and generating a file to be transmitted;
And the submitting module is used for submitting an uploading request containing the file to be transmitted to the server.
In a fifth aspect, the present invention provides a computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the control method of preventing file repeat upload as in any of the first aspects.
In a sixth aspect, the present invention provides a computer-readable storage medium, in which a program for intelligently adjusting a ring tone of an intelligent terminal is included, which program, when executed by a processor, implements the steps of the control method for preventing file repeat upload as described in any one of the first aspects or implements the steps of the method for preventing file repeat upload as described in any one of the second aspects.
Compared with the prior art, the technical scheme of the invention has at least the following advantages:
1. The invention provides a method for preventing file from repeating uploading and a control method thereof, when a user initiates a file uploading request, a format template is fed back to a client, the user can fill in content information of a source file to be uploaded according to the format template, and generate a file to be uploaded with a standard format, and a server compares the file to be uploaded with the file to be uploaded according to a specific format and content in the file to be uploaded so as to judge whether the file to be uploaded is repeated with the file to be uploaded, thereby preventing the repeated file from being uploaded.
2. The method comprises the steps that the method is expressed at one end of a server, the server receives an uploading request containing a file to be transmitted submitted based on a format template, wherein the file to be transmitted submitted based on the format template contains a plurality of list items and corresponding item identifiers, and the server compares the content of the file to be transmitted with all the files to be transmitted prestored in the format template according to the list items and the corresponding item identifiers to determine whether the file to be transmitted belongs to repeated files; if yes, rejecting the uploading request to prevent the file from being repeatedly uploaded.
3. The method comprises the steps that a client receives a trigger instruction for requesting uploading files, a format template is displayed, content information of source files input through an input control of the format template is received, a file to be transmitted is generated, a file to be transmitted containing one or more list items and corresponding item identifiers is specifically generated, an uploading request containing the file to be transmitted is submitted to a server, and the server compares the file to be transmitted with the transmitted file according to the one or more list items and the corresponding item identifiers to determine whether the file to be transmitted and the file to be transmitted are duplicate files.
4. In the method for preventing file repeat uploading, after the input control of the format template receives the content information of the source file, the item identification is added to the content information of the source file. The serial number is generally incremented from 1, and can be set individually. If the item identification and the list item content of the file uploaded twice are the same, the file is regarded as two repeated files, and the uploading cannot be repeated. The invention reduces the risk of uploading repeated files and has more flexible functions.
5. The invention can also calculate the repeatability of the list file to be uploaded by adopting a full-scale comparison mode when comparing the file contents. Specifically, dividing the total number of repeated list items of the file to be transmitted and the file to be transmitted by the total number of list items of the file to be transmitted to calculate the repetition degree of the file to be transmitted, wherein the repeated list items are two list items with the same item identification and content of the list items; if the repeatability is judged to be greater than a preset threshold, a prompt message for processing the repeated list item is sent, and uploading of repeated information is reduced.
6. When a user needs to upload two repeated files, the invention can adjust the item identifiers in the files, specifically, can inquire whether the repeated files need to be uploaded from a user popup window, display a user interface capable of editing the item identifiers for the user to modify the corresponding item identifiers after receiving the confirmation information of the user agreeing, and respectively upload the item identifiers after receiving the modification request aiming at the designated item identifiers in the files to be transmitted and modifying the corresponding item identifiers. The invention solves the requirement of users when the users need to upload the repeated files, so that the scheme is more flexible.
In summary, the invention reduces the risk of repeated uploading of the file, reduces the loss caused by repeated uploading of the file, saves the storage space, reduces the cost of data management, and ensures that the file uploading function is more flexible.
Drawings
FIG. 1 is a flow chart of an embodiment of a control method for preventing file repeat upload according to the present invention;
FIG. 2 is a flow chart of one embodiment of a control device of the present invention for preventing repeated file uploads;
FIG. 3 is a flow chart of one embodiment of a method for preventing file repeat-up according to the present invention;
FIG. 4 is a flow diagram of one embodiment of an apparatus for preventing file repeat upload in accordance with the present invention;
FIG. 5 is a block diagram of the internal architecture of a computer device in one embodiment.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
In order to enable those skilled in the art to better understand the present invention, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present invention with reference to the accompanying drawings.
In some of the flows described in the specification and claims of the present invention and in the foregoing figures, a plurality of operations occurring in a particular order are included, but it should be understood that the operations may be performed in other than the order in which they occur or in parallel, that the item numbers of the operations, such as S11, S12, etc., are merely used to distinguish between the various operations, and that the item numbers themselves do not represent any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by one of ordinary skill in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
It will be understood by those of ordinary skill in the art that unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
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, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
Referring to fig. 1, the control method for preventing file from being repeatedly uploaded is implemented in a server, wherein in a specific embodiment, the control method includes the following steps:
S11, receiving an uploading request containing a file to be transmitted, wherein the file to be transmitted is a file based on a format template.
In the embodiment of the invention, when the server receives a file uploading request submitted by a client for the first time, a format template is generated in response to the file uploading request and is sent to the client, and the client displays the format template after receiving the format template. In one embodiment, the generated format template may be stored in a server or may be stored in a client, where the client stores the format template, so as to obtain a local format template and display the local format template on a user interface when receiving a file uploading trigger instruction of a user.
Further, the format template has an item identification generation function, namely, after the input control of the format template receives the content information of the source file, an item identification is added to the content information of the source file to serve as duplicate prevention. Wherein the item identification is generally increased from 1 item by item, and personalized settings can be made, and the item identification can be edited. For example, in one embodiment, the item identification may be set to 001, 002, 003, so as to increment item by item. Or in another embodiment, the item identifiers are set to 005, 010 and 015, so as to increment item by item, wherein a plurality of sub sequence numbers are divided between 005 and 010. Or in another embodiment, the item identification is set according to personalized settings such as an arithmetic progression increment or an arithmetic progression increment.
Preferably, the source file is a file in a list form, for example, the source file may be a list, and the input control of the format template adds an item identifier to each list item of the list after receiving the list, where the item identifier may be an item serial number or other symbols with a marking function.
Further, the format template adds item identifiers to the content information of the source file to produce the to-be-transmitted file, and based on the generation principle, the to-be-transmitted file comprises one or more list items and corresponding item identifiers.
The method is applied to an application scene that the source file is a list, and the file to be transmitted is in a list display mode that one name corresponds to one item identifier or one row of names corresponds to one item identifier.
S12, comparing the content of the file to be transmitted with the content of each uploaded file according to the format template, wherein each uploaded file is a file based on the format template.
In the embodiment of the present invention, the comparison between the content of the file to be transmitted and each transmitted file pre-stored in the format template may be performed in the following manner:
Firstly, item identifiers and contents of all list items of the file to be transmitted are compared item by item, and whether the item identifiers and the contents of all list items in the file to be transmitted are consistent with the item identifiers and the contents of all list items in the file to be transmitted; if the files are consistent, judging that the file to be transmitted and the transmitted file belong to repeated files, and traversing the whole file before uploading the file so as to determine that the file to be transmitted passes and then starts uploading.
Specifically, the server reads the content of the newly uploaded file to be uploaded and the content of the file stored on the server, if the item identification of each list item in the two files is identical to the content corresponding to the item, the file is considered as a repeated file, and the server refuses the uploading request of the file. When detecting that the item identification and the list item with different contents corresponding to the item comprise the same item identification but different contents of the item; or the content of the items is the same, the item identifiers are different, and the items are considered as different files, the server receives an uploading request, and the uploaded files are stored in the server. And comparing the contents corresponding to the items in the files by adopting a character string comparison mode, comparing whether the contents of the newly uploaded files are the same as those of the files transmitted in the server item by item according to the item serial numbers, stopping comparison if different list items are found, considering that the newly uploaded files are different from the comparison files, and allowing the files to be uploaded by the server when the newly uploaded files are different from all the files in the server.
And secondly, calculating the repetition degree of the file to be transmitted and the transmitted file by using a full comparison mode, and comparing the repetition degree with a preset threshold value to determine whether the file to be transmitted needs to be uploaded. The repetition degree is used for representing the repetition degree of the file to be transmitted and the transmitted file. Specifically, the total number of repeated list items of the to-be-transmitted file and the transmitted file can be divided by the total number of list items of the to-be-transmitted file to calculate the repetition degree of the to-be-transmitted file, wherein the repeated list items are two list items with the same item identification and content as the list items; and if the repeatability is judged to be greater than a preset threshold, sending a prompt message for processing the repeated list items.
The full-scale comparison mode is applicable to the case that the source file is a file in a list form. When the source file is a list file containing a plurality of list items, in the uploading process, whether the currently calculated repeatability exceeds a preset threshold value or not can be detected, if so, a message for prompting processing of the repeated list items is sent, for example, after the client receives the prompting message, a user is inquired whether the current repeated list items need to be continuously uploaded in a popup window mode.
The method can compare various list items in the uploading process, when the uploading reaches that the repeatability is larger than a preset threshold value, the uploading is stopped, and simultaneously, a prompt message for prompting a user to process the repeated list items is sent, when an instruction for continuing to process the repeated list fed back by the client is received, the uploading operation is continued to be executed, or when an instruction for stopping uploading the list items fed back by the client is received, the uploading operation is directly stopped.
In another embodiment, the full-scale comparison method may also be to judge the repetition degree of the entire file and the transmitted file after traversing the entire file, and execute the uploading operation when the repetition degree is judged not to exceed the preset threshold.
And S13, if the uploaded file with the repeated content and the file to be uploaded exists, not executing the uploading operation.
In the embodiment of the invention, when the file to be transmitted and the transmitted file are judged to be repeated files, the uploading request is refused.
In another embodiment of the present invention, the item identification in the format template may be modified when the user needs to upload the same file. Specifically, for example, the client provides a user interface, a key for uploading repeated files is provided on the user interface, when the user clicks the key, the editable state of the current format template is displayed, after receiving a modification instruction of the user to one or more item identifiers, the server submits an uploading request containing the modified file to be transmitted to the server after corresponding to the modified item identifier, and the server considers the file to be different, and executes the operation of uploading the file.
In another embodiment of the present invention, when a user needs to upload a duplicate list item, the item identification of the duplicate list item that needs to be uploaded may be modified. For example, when the server detects that the repetition degree of the currently uploaded file and the uploaded file exceeds a preset threshold in the process of uploading the file, a notification message prompting to process the repeated list item is sent to the client, the client displays a user interface for selecting whether to continue uploading the repeated list item after receiving the notification message, when receiving a confirmation instruction for agreeing to continue uploading the repeated list item, an editable state of the list item is displayed, when receiving a modification instruction for the list item, the item identification of the list item is modified, a request for continuing uploading is sent to the server, and after receiving the request, the server considers different list items and continues to execute uploading operation.
Referring to fig. 2, in a specific embodiment, the control device for preventing file from being repeatedly uploaded includes a receiving module 11, a comparing module 12 and a processing module 13. Wherein,
The receiving module 11 is configured to receive an upload request including a file to be transmitted, where the file to be transmitted is a file based on a format template.
In the embodiment of the invention, when the server receives a file uploading request submitted by a client for the first time, a format template is generated in response to the file uploading request and is sent to the client, and the client displays the format template after receiving the format template. In one embodiment, the generated format template may be stored in a server or may be stored in a client, where the client stores the format template, so as to obtain a local format template and display the local format template on a user interface when receiving a file uploading trigger instruction of a user.
Further, the format template has an item identification generation function, namely, after the input control of the format template receives the content information of the source file, an item identification is added to the content information of the source file to serve as duplicate prevention. Wherein the item identification is generally increased from 1 item by item, and personalized settings can be made, and the item identification can be edited. For example, in one embodiment, the item identification may be set to 001, 002, 003, so as to increment item by item. Or in another embodiment, the item identifiers are set to 005, 010 and 015, so as to increment item by item, wherein a plurality of sub sequence numbers are divided between 005 and 010. Or in another embodiment, the item identification is set according to personalized settings such as an arithmetic progression increment or an arithmetic progression increment.
Preferably, the source file is a file in a list form, for example, the source file may be a list, and the input control of the format template adds an item identifier to each list item of the list after receiving the list, where the item identifier may be an item serial number or other symbols with a marking function.
Further, the format template adds item identifiers to the content information of the source file to produce the to-be-transmitted file, and based on the generation principle, the to-be-transmitted file comprises one or more list items and corresponding item identifiers.
The method is applied to an application scene that the source file is a list, and the file to be transmitted is in a list display mode that one name corresponds to one item identifier or one row of names corresponds to one item identifier.
And the comparison module 12 is used for comparing the content of the file to be transmitted with the content of each uploaded file according to the format template, wherein each uploaded file is a file based on the format template.
In the embodiment of the present invention, the comparison between the content of the file to be transmitted and each transmitted file pre-stored in the format template may be performed in the following manner:
Firstly, item identifiers and contents of all list items of the file to be transmitted are compared item by item, and whether the item identifiers and the contents of all list items in the file to be transmitted are consistent with the item identifiers and the contents of all list items in the file to be transmitted; if the files are consistent, judging that the file to be transmitted and the transmitted file belong to repeated files, and traversing the whole file before uploading the file so as to determine that the file to be transmitted passes and then starts uploading.
Specifically, the server reads the content of the newly uploaded file to be uploaded and the content of the file stored on the server, if the item identification of each list item in the two files is identical to the content corresponding to the item, the file is considered as a repeated file, and the server refuses the uploading request of the file. When detecting that the item identification and the list item with different contents corresponding to the item comprise the same item identification but different contents of the item; or the content of the items is the same, the item identifiers are different, and the items are considered as different files, the server receives an uploading request, and the uploaded files are stored in the server. And comparing the contents corresponding to the items in the files by adopting a character string comparison mode, comparing whether the contents of the newly uploaded files are the same as those of the files transmitted in the server item by item according to the item serial numbers, stopping comparison if different list items are found, considering that the newly uploaded files are different from the comparison files, and allowing the files to be uploaded by the server when the newly uploaded files are different from all the files in the server.
And secondly, calculating the repetition degree of the file to be transmitted and the transmitted file by using a full comparison mode, and comparing the repetition degree with a preset threshold value to determine whether the file to be transmitted needs to be uploaded. The repetition degree is used for representing the repetition degree of the file to be transmitted and the transmitted file. Specifically, the total number of repeated list items of the to-be-transmitted file and the transmitted file can be divided by the total number of list items of the to-be-transmitted file to calculate the repetition degree of the to-be-transmitted file, wherein the repeated list items are two list items with the same item identification and content as the list items; and if the repeatability is judged to be greater than a preset threshold, sending a prompt message for processing the repeated list items.
The full-scale comparison mode is applicable to the case that the source file is a file in a list form. When the source file is a list file containing a plurality of list items, in the uploading process, whether the currently calculated repeatability exceeds a preset threshold value or not can be detected, if so, a message for prompting processing of the repeated list items is sent, for example, after the client receives the prompting message, a user is inquired whether the current repeated list items need to be continuously uploaded in a popup window mode.
The method can compare various list items in the uploading process, when the uploading reaches that the repeatability is larger than a preset threshold value, the uploading is stopped, and simultaneously, a prompt message for prompting a user to process the repeated list items is sent, when an instruction for continuing to process the repeated list fed back by the client is received, the uploading operation is continued to be executed, or when an instruction for stopping uploading the list items fed back by the client is received, the uploading operation is directly stopped.
In another embodiment, the full-scale comparison method may also be to judge the repetition degree of the entire file and the transmitted file after traversing the entire file, and execute the uploading operation when the repetition degree is judged not to exceed the preset threshold.
And the processing module 13 does not execute uploading operation if the uploaded file with the repeated content and the file to be uploaded exists.
In the embodiment of the invention, when the file to be transmitted and the transmitted file are judged to be repeated files, the uploading request is refused.
In another embodiment of the present invention, the item identification in the format template may be modified when the user needs to upload the same file. Specifically, for example, the client provides a user interface, a key for uploading repeated files is provided on the user interface, when the user clicks the key, the editable state of the current format template is displayed, after receiving a modification instruction of the user to one or more item identifiers, the server submits an uploading request containing the modified file to be transmitted to the server after corresponding to the modified item identifier, and the server considers the file to be different, and executes the operation of uploading the file.
In another embodiment of the present invention, when a user needs to upload a duplicate list item, the item identification of the duplicate list item that needs to be uploaded may be modified. For example, when the server detects that the repetition degree of the currently uploaded file and the uploaded file exceeds a preset threshold in the process of uploading the file, a notification message prompting to process the repeated list item is sent to the client, the client displays a user interface for selecting whether to continue uploading the repeated list item after receiving the notification message, when receiving a confirmation instruction for agreeing to continue uploading the repeated list item, an editable state of the list item is displayed, when receiving a modification instruction for the list item, the item identification of the list item is modified, a request for continuing uploading is sent to the server, and after receiving the request, the server considers different list items and continues to execute uploading operation.
Referring to fig. 3, the method for preventing file repeat uploading provided by the present invention is executed on a client, wherein in a specific embodiment, the method includes the following steps:
s21, receiving a trigger instruction for requesting uploading of the file, and displaying the format template.
In the embodiment of the invention, when the client submits a file uploading request to a server for the first time, the server responds to the file uploading request to generate a format template and sends the format template to the client, and the client displays the format template after receiving the format template. In one embodiment, the generated format template may be stored in a server or may be stored in a client, where the client stores the format template, so as to obtain a local format template presentation and user interface when receiving a file upload trigger instruction of a user later.
Further, when the client receives a trigger instruction for requesting to upload the file, the format template is displayed in response to the trigger instruction for requesting to upload the file. Specifically, the client may obtain the format template from the server and display the format template, or obtain the format template pre-stored locally and display the format template.
S22, receiving content information of a source file input through an input control of the format template, and generating a to-be-transmitted file.
In the embodiment of the invention, after the input control of the format template receives the content information of the source file, the content information of the source file is divided into one or more list items, and item identifiers are added to the one or more list items to generate a pending file containing the one or more list items and the corresponding item identifiers. Wherein the item identification is generally increased from 1 item by item, and personalized settings can be made, and the item identification can be edited.
In another embodiment, when the content information of the source file is a list file containing one or more list items, then an item identification is directly added to the content information of the source file, e.g., the source file is a list.
Further, the format template adds item identifiers to the content information of the source file, and then the to-be-transmitted file is produced, and based on the generation principle, the generated to-be-transmitted file contains one or more list items and corresponding item identifiers.
In another embodiment of the present invention, the format template itself contains one or more item identities, and when receiving the content information of the source file, each item identity is added to the content information of the source file to generate the pending file.
S23, submitting an uploading request containing the file to be transmitted to a server.
In the embodiment of the invention, the modification request aiming at the specified item identifier of the file to be transmitted can be received, and the corresponding item identifier is modified. For example, when the user needs to upload a duplicate file or a duplicate list item, a trigger instruction for modifying the item identifier may be sent to the client to generate a file to be transmitted that is not duplicate with the transmitted file.
Specifically, when a user needs to upload a duplicate file, the item identification in the format template may be modified. Specifically, for example, the client provides a user interface, a key for uploading repeated files is provided on the user interface, when the user clicks the key, the editable state of the current format template is displayed, after receiving a modification instruction of the user to one or more item identifiers, the server submits an uploading request containing the modified file to be transmitted to the server after corresponding to the modified item identifier, and the server considers the file to be different, and executes the operation of uploading the file.
In another embodiment of the present invention, when a user needs to upload a duplicate list item, the item identification of the duplicate list item that needs to be uploaded may be modified. For example, when the server detects that the repetition degree of the currently uploaded file and the uploaded file exceeds a preset threshold in the process of uploading the file, a notification message prompting to process the repeated list item is sent to the client, the client displays a user interface for selecting whether to continue uploading the repeated list item after receiving the notification message, when receiving a confirmation instruction for agreeing to continue uploading the repeated list item, an editable state of the list item is displayed, when receiving a modification instruction for the list item, the item identification of the list item is modified, a request for continuing uploading is sent to the server, and after receiving the request, the server considers different list items and continues to execute uploading operation.
Referring to fig. 4, the present invention further provides a device for preventing file from being repeatedly uploaded, and in a specific embodiment, the device includes a display module 21, a receiving module 22, and a submitting module 23. Wherein,
The display module 21 is configured to receive a trigger instruction for requesting uploading of a file, and display a format template.
In the embodiment of the invention, when the client submits a file uploading request to a server for the first time, the server responds to the file uploading request to generate a format template and sends the format template to the client, and the client displays the format template after receiving the format template. In one embodiment, the generated format template may be stored in a server or may be stored in a client, where the client stores the format template, so as to obtain a local format template presentation and user interface when receiving a file upload trigger instruction of a user later.
Further, when the client receives a trigger instruction for requesting to upload the file, the format template is displayed in response to the trigger instruction for requesting to upload the file. Specifically, the client may obtain the format template from the server and display the format template, or obtain the format template pre-stored locally and display the format template.
And the receiving module 22 is used for receiving the content information of the source file input through the input control of the format template and generating a pending file.
In the embodiment of the invention, after the input control of the format template receives the content information of the source file, the content information of the source file is divided into one or more list items, and item identifiers are added to the one or more list items to generate a pending file containing the one or more list items and the corresponding item identifiers. Wherein the item identification is generally increased from 1 item by item, and personalized settings can be made, and the item identification can be edited.
In another embodiment, when the content information of the source file is a list file containing one or more list items, then an item identification is directly added to the content information of the source file, e.g., the source file is a list.
Further, the format template adds item identifiers to the content information of the source file, and then the to-be-transmitted file is produced, and based on the generation principle, the generated to-be-transmitted file contains one or more list items and corresponding item identifiers.
In another embodiment of the present invention, the format template itself contains one or more item identities, and when receiving the content information of the source file, each item identity is added to the content information of the source file to generate the pending file.
And the submitting module 23 is configured to submit an upload request including the file to be transmitted to a server.
In the embodiment of the invention, the modification request aiming at the specified item identifier of the file to be transmitted can be received, and the corresponding item identifier is modified. For example, when the user needs to upload a duplicate file or a duplicate list item, a trigger instruction for modifying the item identifier may be sent to the client to generate a file to be transmitted that is not duplicate with the transmitted file.
Specifically, when a user needs to upload a duplicate file, the item identification in the format template may be modified. Specifically, for example, the client provides a user interface, a key for uploading repeated files is provided on the user interface, when the user clicks the key, the editable state of the current format template is displayed, after receiving a modification instruction of the user to one or more item identifiers, the server submits an uploading request containing the modified file to be transmitted to the server after corresponding to the modified item identifier, and the server considers the file to be different, and executes the operation of uploading the file.
In another embodiment of the present invention, when a user needs to upload a duplicate list item, the item identification of the duplicate list item that needs to be uploaded may be modified. For example, when the server detects that the repetition degree of the currently uploaded file and the uploaded file exceeds a preset threshold in the process of uploading the file, a notification message prompting to process the repeated list item is sent to the client, the client displays a user interface for selecting whether to continue uploading the repeated list item after receiving the notification message, when receiving a confirmation instruction for agreeing to continue uploading the repeated list item, an editable state of the list item is displayed, when receiving a modification instruction for the list item, the item identification of the list item is modified, a request for continuing uploading is sent to the server, and after receiving the request, the server considers different list items and continues to execute uploading operation.
In one embodiment, the present invention also proposes a computer device 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: receiving an uploading request containing a file to be transmitted submitted based on a format template; comparing the content of the file to be transmitted with each transmitted file prestored in the format template to determine whether the file belongs to a repeated file; if yes, rejecting the uploading request.
In one embodiment, the processor, when executing the computer readable instructions, further performs the steps of: and generating the format template based on the uploading request and feeding back to the client.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating an internal structure of a computer device according to an embodiment. As shown in fig. 5, the computer device includes a processor 1, a storage medium 2, a memory 3, and a network interface 4 connected by a system bus. The storage medium 2 of the computer device stores an operating system, a database, and computer readable instructions, where a control information sequence may be stored in the database, where the computer readable instructions when executed by the processor 1 may enable the processor 1 to implement a control method for preventing file repeat uploading, and the processor 1 may implement functions of a receiving module, a comparing module, and a processing module in a control method device for preventing file repeat uploading in the embodiment shown in fig. 2. The processor 1 of the computer device is used to provide computing and control capabilities, supporting the operation of the entire computer device. The memory 3 of the computer device may have stored therein computer readable instructions that, when executed by the processor 1, cause the processor 1 to perform a control method that prevents repeated uploading of files. The network interface 4 of the computer device is used for communication with a terminal connection. It will be appreciated by those skilled in the art that the structure shown in FIG. 5 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
Furthermore, the present invention also proposes a storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of: receiving an uploading request containing a file to be transmitted, wherein the file to be transmitted is a file based on a format template; comparing the content of the file to be transmitted with the content of each uploaded file according to the format template, wherein each uploaded file is a file based on the format template; if the uploaded file with the repeated content and the file to be uploaded exists, the uploading operation is not executed. The one or more processors can implement the functions of the receiving module, comparing module and processing module of the control device for preventing repeated uploading of files in the embodiment shown in fig. 2. Or cause one or more processors to perform the steps of: receiving a triggering instruction for requesting uploading of a file, and displaying a format template; receiving content information of a source file input through an input control of the format template, and generating a file to be transmitted; and submitting an uploading request containing the file to be transmitted to a server. The one or more processors can implement the functions of the display module, the receiving module, and the submitting module of the control device for preventing file repeat in the embodiment shown in fig. 4
In one embodiment, the processor, when executing the computer readable instructions, further performs the steps of: and generating the format template based on the uploading request and feeding back to the client.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored in a computer-readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (6)

1. A control method for preventing file repeat, the method comprising:
After receiving content information of a source file, wherein the source file is a file in a list form, the content information is a list item in the file in the list form, and item identification is added to each list item in the source file to obtain a file to be transmitted;
receiving an uploading request containing the file to be transmitted, wherein the file to be transmitted is a file based on a format template, and the file to be transmitted contains one or more list items and corresponding item identifiers;
comparing the content of the file to be transmitted with the content of each uploaded file according to the format template, wherein each uploaded file is a file based on the format template;
If the uploaded file with the repeated content and the file to be uploaded exists, the uploading operation is not executed.
2. The method for controlling file repeat prevention according to claim 1, wherein the comparing the content of the file to be transferred with the content of each uploaded file according to the format template, wherein each uploaded file is a file based on the format template, specifically comprises:
item identifiers and contents of all list items of the files to be transmitted are compared item by item, and whether the item identifiers and contents of all list items in all uploaded files are consistent with each other or not is judged;
And if the item identification and the content of each list item of the file to be uploaded are consistent with the item identification and the content of each list item in each uploaded file, judging that the uploaded file with the repeated content and the file to be uploaded exists.
3. The method for controlling file repeat prevention according to claim 1, wherein the comparing the content of the file to be transferred with the content of each uploaded file according to the format template, wherein each uploaded file is a file based on the format template, specifically comprises:
Dividing the total number of repeated list items of the file to be transmitted and each uploaded file by the total number of list items of the file to be transmitted to calculate the repetition degree of the file to be transmitted, wherein the repeated list items are two list items with the same item identification and content of the list items;
And if the repeatability is judged to be greater than a preset threshold, sending a prompt message for processing the repeated list items.
4. A control device for preventing repeated uploading of a file, comprising:
The receiving module is used for adding item identifiers to each list item in the source file to obtain a file to be transmitted after the input control of the format template receives the content information of the source file, wherein the source file is a file in a list form, and the content information is the list item in the file in the list form;
The receiving module is used for receiving an uploading request containing the file to be transmitted, wherein the file to be transmitted is a file based on a format template, and the file to be transmitted contains one or more list items and corresponding item identifiers;
The comparison module is used for comparing the content of the file to be transmitted with the content of each uploaded file according to the format template, and each uploaded file is a file based on the format template;
and the processing module is used for not executing uploading operation if the uploaded file with the repeated content and the file to be uploaded exists.
5. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the control method of preventing file repeat upload as claimed in any one of claims 1 to 3.
6. A computer-readable storage medium, wherein a control program for preventing file repeat-up is included in the computer-readable storage medium, which when executed by a processor, implements the steps of the control method for preventing file repeat-up as claimed in any one of claims 1 to 3.
CN201810955403.XA 2018-08-21 2018-08-21 Method for preventing file from being repeatedly uploaded and control method and device thereof Active CN109241009B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810955403.XA CN109241009B (en) 2018-08-21 2018-08-21 Method for preventing file from being repeatedly uploaded and control method and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810955403.XA CN109241009B (en) 2018-08-21 2018-08-21 Method for preventing file from being repeatedly uploaded and control method and device thereof

Publications (2)

Publication Number Publication Date
CN109241009A CN109241009A (en) 2019-01-18
CN109241009B true CN109241009B (en) 2024-04-23

Family

ID=65071078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810955403.XA Active CN109241009B (en) 2018-08-21 2018-08-21 Method for preventing file from being repeatedly uploaded and control method and device thereof

Country Status (1)

Country Link
CN (1) CN109241009B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110460629A (en) * 2019-06-17 2019-11-15 平安科技(深圳)有限公司 Data upload and method for down loading, server and storage medium
CN110430233B (en) * 2019-06-28 2023-01-10 平安科技(深圳)有限公司 Scene file uploading method and device, computer equipment and storage medium
CN111131461A (en) * 2019-12-26 2020-05-08 平安信托有限责任公司 Anti-reprocessing method, device, equipment and medium applied to file transmission
CN111737765A (en) * 2020-07-31 2020-10-02 支付宝(杭州)信息技术有限公司 Method and device for managing block chain resources
CN113362046A (en) * 2021-08-10 2021-09-07 北京开科唯识技术股份有限公司 Control method and device for preventing salary generation errors

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9773039B2 (en) * 2012-09-14 2017-09-26 Fti Consulting, Inc. Computer-implemented system and method for identifying near duplicate documents
US20140122451A1 (en) * 2012-10-29 2014-05-01 Dropbox, Inc. System and method for preventing duplicate file uploads from a mobile device
US9633022B2 (en) * 2012-12-28 2017-04-25 Commvault Systems, Inc. Backup and restoration for a deduplicated file system

Also Published As

Publication number Publication date
CN109241009A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
CN109241009B (en) Method for preventing file from being repeatedly uploaded and control method and device thereof
US11755371B1 (en) Data intake and query system with distributed data acquisition, indexing and search
JP6348937B2 (en) Method and apparatus for updating object data in object storage system
CN107493264B (en) OTP activation method, mobile terminal, server, storage medium and system
CN111176858A (en) Data request processing method and device
CN112868009A (en) Electronic document signing using blockchains
EP3186943B1 (en) Device verification prior to registration
WO2021082340A1 (en) Data processing method, apparatus, system, and storage medium
CN111680328A (en) Data processing method and device, server and computer readable storage medium
CN112767113A (en) Account checking data processing method, device and system based on block chain
CN111125093B (en) Data processing method and device based on hash storage
CN111008827B (en) Cross-chain transaction signature method and device
CN112035763A (en) Information processing method, device and system, electronic equipment and storage medium
CN110618989B (en) Information processing method, information processing device and related products
CN112818270A (en) Data cross-domain transfer method and device and computer equipment
CN105488199B (en) Mixture table form processing method, device and mobile terminal
US9733994B2 (en) Method and system for communicating information between a mobile device and an enterprise system
CN109104472B (en) Block chain network networking method, device, equipment and computer readable storage medium
CN106571923A (en) User data signature verification method with time effectiveness
US10713278B2 (en) Flexible configuration of offline synchronization scope
US8639750B2 (en) Orchestration of web notifications
CN114003384A (en) Task management method, device and equipment
CN111124447A (en) Platform management method, system, equipment and computer readable storage medium
CN112990890B (en) Notification message sending method, server and computer readable storage medium
CN115757191B (en) Data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant