CN105491160A - Processing method and processing device for network transferred files - Google Patents
Processing method and processing device for network transferred files Download PDFInfo
- Publication number
- CN105491160A CN105491160A CN201610029757.2A CN201610029757A CN105491160A CN 105491160 A CN105491160 A CN 105491160A CN 201610029757 A CN201610029757 A CN 201610029757A CN 105491160 A CN105491160 A CN 105491160A
- Authority
- CN
- China
- Prior art keywords
- queue
- file
- internet transmission
- modification time
- confirmed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012545 processing Methods 0.000 title claims abstract description 14
- 238000003672 processing method Methods 0.000 title claims abstract description 11
- 238000012986 modification Methods 0.000 claims abstract description 68
- 230000004048 modification Effects 0.000 claims abstract description 68
- 230000005540 biological transmission Effects 0.000 claims description 95
- 238000000034 method Methods 0.000 claims description 28
- 238000012790 confirmation Methods 0.000 claims description 17
- 238000012546 transfer Methods 0.000 claims description 16
- 238000010586 diagram Methods 0.000 description 8
- 238000004590 computer program Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 2
- 241000931705 Cicada Species 0.000 description 1
- 238000005194 fractionation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
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]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a processing method and a processing device for network transferred files, wherein the processing method and the processing device relate to the technical field of software development and are used for settling a file content reading error in file transferring in prior art. The processing method comprises the steps of storing a to-be-acquired network transferred file into a first queue, wherein the first queue comprises the file name and the last modification time of the to-be-acquired network transferred file; determining whether a second queue is an empty queue, wherein the second queue comprises the file name and the final modification time of a to-be-determined file; if the second queue is a non-empty queue, traversing the second queue, determining whether the final modification time of the to-be-determined file included in the second queue is same with the final modification time of the to-be-acquired network transferred file in the first queue, and if yes, determining a fact that acquisition of the to-be-determined file is unsuccessful.
Description
Technical field
The present invention relates to technical field of software development, relate to a kind of processing method and device of Internet Transmission file more specifically.
Background technology
File transfer (English is: filetransfer) is that a file or a part are wherein passed to another computer system from a computer system.File transfer may going in file transfer to another computer to store, or the file on access remote computer, using file transfer to another computer get on operation (as a program) or process (as data), or file transfer to printer go print.
In prior art, general by FTP (FileTransferProtocol, Chinese be called for short: file transfer protocol (FTP)), HTTP (HyperTextTransferProtocol, Chinese be called for short: HTML (Hypertext Markup Language)), etc. agreement carry out transfer files, after in file transfer to server, program on server can file reading, and complete transport service process, this transmission means is asynchronous transmission.In above-mentioned transmission means, because the program on server cannot judge whether the file of asynchronous transmission completes transmission, and directly file reading may read the file write, and causes file reading content to occur mistake.
Summary of the invention
The embodiment of the present invention provides a kind of processing method and device of Internet Transmission file, in order to solve in prior art the problem existing in file transfer and there is file reading content and occur mistake.
The embodiment of the present invention provides a kind of processing method of Internet Transmission file, comprising:
Be stored in the first queue by Internet Transmission file to be obtained, described first queue comprises the file name of Internet Transmission file to be obtained and the last modification time of described Internet Transmission file to be obtained;
Confirm whether the second queue is empty queue, wherein, described second queue comprises the file name of file to be confirmed and the last modification time of described file to be confirmed;
If described second queue is non-empty queue, travel through described second queue, confirm that whether the last modification time of the file described to be confirmed that described second queue comprises is identical with the last modification time of Internet Transmission file to be obtained described in described first queue, if identical, confirm that described file to be confirmed does not obtain successfully.
Preferably, also comprise:
If described second queue is empty queue, confirm the last modification time of Internet Transmission file to be obtained described in described first queue, by with the minimum Internet Transmission file transfer described to be obtained of current time difference in described second queue.
Preferably, also comprise:
If the last modification time of the file described to be confirmed that described second queue comprises is not identical with the last modification time of Internet Transmission file to be obtained described in described first queue, confirm described file acquisition success to be confirmed.
The embodiment of the present invention also provides a kind of processing unit of Internet Transmission file, comprising:
Memory cell, for being stored in the first queue by Internet Transmission file to be obtained, described first queue comprises the file name of Internet Transmission file to be obtained and the last modification time of described Internet Transmission file to be obtained;
First confirmation unit, for confirming whether the second queue is empty queue, wherein, described second queue comprises the file name of file to be confirmed and the last modification time of described file to be confirmed;
Second confirmation unit, if be non-empty queue for described second queue, travel through described second queue, confirm that whether the last modification time of the file described to be confirmed that described second queue comprises is identical with the last modification time of Internet Transmission file to be obtained described in described first queue, if identical, confirm that described file to be confirmed does not obtain successfully.
Preferably, described first confirmation unit also for:
If described second queue is empty queue, confirm the last modification time of Internet Transmission file to be obtained described in described first queue, by with the minimum Internet Transmission file transfer described to be obtained of current time difference in described second queue.
Preferably, described second confirmation unit also for:
If the last modification time of the file described to be confirmed that described second queue comprises is not identical with the last modification time of Internet Transmission file to be obtained described in described first queue, confirm described file acquisition success to be confirmed.
In the embodiment of the present invention, be stored in the first queue by Internet Transmission file to be obtained, described first queue comprises the file name of Internet Transmission file to be obtained and the last modification time of described Internet Transmission file to be obtained; Confirm whether the second queue is empty queue, wherein, described second queue comprises the file name of file to be confirmed and the last modification time of described file to be confirmed; If described second queue is non-empty queue, travel through described second queue, confirm that whether the last modification time of the file described to be confirmed that described second queue comprises is identical with the last modification time of Internet Transmission file to be obtained described in described first queue, if identical, confirm that described file to be confirmed does not obtain successfully.In above-described embodiment, due on the basis of existing transmission, add the second queue of file to be confirmed, the Internet Transmission file to be obtained of transmission cannot have been judged whether, temporarily be stored in the second queue of file to be confirmed, subsequently through the last modification time of the file in the second queue of file more to be confirmed, further judge whether Internet Transmission file to be obtained completes transmission, adopt said method, can avoid existing in prior art the problem that mistake appears in file reading content.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The process flow schematic diagram of a kind of Internet Transmission file that Fig. 1 provides for the embodiment of the present invention;
The processing unit structural representation of a kind of Internet Transmission file that Fig. 2 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The process flow schematic diagram of what Fig. 1 was exemplary show a kind of Internet Transmission file that the embodiment of the present invention provides, the method at least can be applied to software development.
As shown in Figure 1, the processing method of a kind of Internet Transmission file that the embodiment of the present invention provides, comprises the following steps:
Step 101, is stored in the first queue by Internet Transmission file to be obtained, and described first queue comprises the file name of Internet Transmission file to be obtained and the last modification time of described Internet Transmission file to be obtained;
Step 102, confirms whether the second queue is empty queue, and wherein, described second queue comprises the file name of file to be confirmed and the last modification time of described file to be confirmed;
Step 103, if described second queue is non-empty queue, travel through described second queue, confirm that whether the last modification time of the file described to be confirmed that described second queue comprises is identical with the last modification time of Internet Transmission file to be obtained described in described first queue, if identical, confirm that described file to be confirmed does not obtain successfully.
In a step 101, to the reading process flow process of Internet Transmission file to be obtained, comprise, the file name of the overall network transfer files in catalogue to be obtained and last modification time, all files in above-mentioned catalogue to be obtained is stored in the first queue, wherein, the first queue comprises the file name of Internet Transmission file to be obtained and the last modification time of this Internet Transmission file to be obtained.
It should be noted that, the last modification time of above-mentioned Internet Transmission file to be obtained is the time that Internet Transmission file in each catalogue to be obtained is corresponding when being stored into the first queue.
In embodiments of the present invention, in order to avoid asynchronous transmission of the prior art exists the problem that direct file reading may cause file reading content false.Server adopts the mode of poll, reads the last modification time of Internet Transmission file to be obtained to judge whether Internet Transmission file to be obtained completes reception.
Particularly, in a step 102, create the second queue, wherein, the second queue comprises the file name of file to be confirmed and the last modification time of this file to be confirmed.
In server poll process, need confirmation second queue whether to be empty queue, if the second queue is non-empty queue, namely include file to be confirmed in the second queue.Further, need the last modification time of the file to be confirmed comprised according to the second queue, judge whether this file to be confirmed completes transmission.
Particularly, when the second queue is non-empty queue, travel through the second queue, confirm the last modification time of all files to be confirmed that the second queue comprises, according to the last modification time of institute's subject to confirmation file of this second queue, judge that whether the last modification time of institute's subject to confirmation file of the second queue is identical with the last modification time of Internet Transmission file to be obtained in the first queue, if the last modification time of file to be confirmed is identical with the last modification time of the Internet Transmission file of to be obtained in the first queue in the second queue, then can confirm that this file to be confirmed does not obtain successfully, this can not being obtained successful Internet Transmission file is re-injected in the first queue, wait for and obtaining next time, if the last modification time of file to be confirmed is not identical with the last modification time of the file to be transmitted in the first queue in the second queue, then can confirm that this file to be confirmed in the second queue has obtained successfully, the successful network file of acquisition can be deleted from the second queue.
Further, if the second queue is empty queue, all Internet Transmission files to be obtained in first queue can be sorted according to last modification time, by with current time minimum certain Internet Transmission file to be obtained of difference or multiple Internet Transmission file transfer to be obtained in the second queue.
In embodiments of the present invention, if the file to be confirmed stored in the second queue is certain the to be obtained Internet Transmission file minimum with current time difference in the first queue, then can read other Internet Transmission files to be obtained from the first queue, it should be noted that, " other Internet Transmission files to be obtained " is here the alternative document except being stored into certain the Internet Transmission file to be obtained in the second queue.
Further, after the Internet Transmission file that other in the first queue are to be obtained has all confirmed to obtain successfully, if the last modification time of certain the to be obtained Internet Transmission file minimum with current time difference in the first queue of the storage in the second queue, still consistent with the last modification time of the Internet Transmission file to be obtained of the storage in the first queue, certain the to be obtained Internet Transmission file minimum with current time difference in the first queue stored in the second queue is then continued to be stored in the first queue, wait for and confirm whether this Internet Transmission file to be obtained obtains successfully next time.
In embodiments of the present invention, according to above-mentioned handling process, all Internet Transmission files to be obtained in the first queue can successfully be obtained successively by the method for poll.
Based on same inventive concept, embodiments provide a kind of processing unit of Internet Transmission file, because the principle of this device technical solution problem is similar to a kind of method of acquisition of Internet Transmission file, therefore the enforcement of this device see the enforcement of method, can repeat part and repeats no more.
As shown in Figure 2, be the processing unit structural representation of a kind of Internet Transmission file that the embodiment of the present invention provides, comprise: memory cell 201, the first confirmation unit 202 and the second confirmation unit 203.
Memory cell 201, for being stored in the first queue by Internet Transmission file to be obtained, described first queue comprises the file name of Internet Transmission file to be obtained and the last modification time of described Internet Transmission file to be obtained;
First confirmation unit 202, for confirming whether the second queue is empty queue, wherein, described second queue comprises the file name of file to be confirmed and the last modification time of described file to be confirmed;
Second confirmation unit 203, if be non-empty queue for described second queue, travel through described second queue, confirm that whether the last modification time of the file described to be confirmed that described second queue comprises is identical with the last modification time of Internet Transmission file to be obtained described in described first queue, if identical, confirm that described file to be confirmed does not obtain successfully.
Preferably, described first confirmation unit 202 also for:
If described second queue is empty queue, confirm the last modification time of Internet Transmission file to be obtained described in described first queue, by with the minimum Internet Transmission file transfer described to be obtained of current time difference in described second queue.
Preferably, described second confirmation unit 203 also for:
If the last modification time of the file described to be confirmed that described second queue comprises is not identical with the last modification time of Internet Transmission file to be obtained described in described first queue, confirm described file acquisition success to be confirmed.
Should be appreciated that the logical partitioning that unit that the processing unit of above a kind of Internet Transmission file comprises is only the function that realizes according to this apparatus and carries out, in practical application, superposition or the fractionation of said units can be carried out.And the processing method one_to_one corresponding of the function that the processing unit of a kind of Internet Transmission file that this embodiment provides realizes and a kind of Internet Transmission file that above-described embodiment provides, for the handling process specifically that this device realizes, be described in detail in said method embodiment one, be not described in detail herein.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.
Claims (6)
1. a processing method for Internet Transmission file, is characterized in that, comprising:
Be stored in the first queue by Internet Transmission file to be obtained, described first queue comprises the file name of Internet Transmission file to be obtained and the last modification time of described Internet Transmission file to be obtained;
Confirm whether the second queue is empty queue, wherein, described second queue comprises the file name of file to be confirmed and the last modification time of described file to be confirmed;
If described second queue is non-empty queue, travel through described second queue, confirm that whether the last modification time of the file described to be confirmed that described second queue comprises is identical with the last modification time of Internet Transmission file to be obtained described in described first queue, if identical, confirm that described file to be confirmed does not obtain successfully.
2. the method for claim 1, is characterized in that, also comprises:
If described second queue is empty queue, confirm the last modification time of Internet Transmission file to be obtained described in described first queue, by with the minimum Internet Transmission file transfer described to be obtained of current time difference in described second queue.
3. the method for claim 1, is characterized in that, also comprises:
If the last modification time of the file described to be confirmed that described second queue comprises is not identical with the last modification time of Internet Transmission file to be obtained described in described first queue, confirm described file acquisition success to be confirmed.
4. a processing unit for Internet Transmission file, is characterized in that, comprising:
Memory cell, for being stored in the first queue by Internet Transmission file to be obtained, described first queue comprises the file name of Internet Transmission file to be obtained and the last modification time of described Internet Transmission file to be obtained;
First confirmation unit, for confirming whether the second queue is empty queue, wherein, described second queue comprises the file name of file to be confirmed and the last modification time of described file to be confirmed;
Second confirmation unit, if be non-empty queue for described second queue, travel through described second queue, confirm that whether the last modification time of the file described to be confirmed that described second queue comprises is identical with the last modification time of Internet Transmission file to be obtained described in described first queue, if identical, confirm that described file to be confirmed does not obtain successfully.
5. device as claimed in claim 4, is characterized in that, described first confirmation unit also for:
If described second queue is empty queue, confirm the last modification time of Internet Transmission file to be obtained described in described first queue, by with the minimum Internet Transmission file transfer described to be obtained of current time difference in described second queue.
6. device as claimed in claim 4, is characterized in that, described second confirmation unit also for:
If the last modification time of the file described to be confirmed that described second queue comprises is not identical with the last modification time of Internet Transmission file to be obtained described in described first queue, confirm described file acquisition success to be confirmed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610029757.2A CN105491160B (en) | 2016-01-01 | 2016-01-01 | processing method and device for network transmission file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610029757.2A CN105491160B (en) | 2016-01-01 | 2016-01-01 | processing method and device for network transmission file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105491160A true CN105491160A (en) | 2016-04-13 |
CN105491160B CN105491160B (en) | 2019-12-17 |
Family
ID=55677870
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610029757.2A Active CN105491160B (en) | 2016-01-01 | 2016-01-01 | processing method and device for network transmission file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105491160B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0770964A1 (en) * | 1995-10-26 | 1997-05-02 | Matsushita Electric Industrial Co., Ltd. | File system |
CN103473076A (en) * | 2013-09-25 | 2013-12-25 | 中国联合网络通信集团有限公司 | Issuing method and issuing system for code version |
CN105187533A (en) * | 2015-09-10 | 2015-12-23 | 浪潮软件股份有限公司 | Data transmission method and device |
CN105183749A (en) * | 2015-07-13 | 2015-12-23 | 北京奇虎科技有限公司 | Method and device for crawling promotion content and providing crawled promotion content for use in search |
-
2016
- 2016-01-01 CN CN201610029757.2A patent/CN105491160B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0770964A1 (en) * | 1995-10-26 | 1997-05-02 | Matsushita Electric Industrial Co., Ltd. | File system |
CN103473076A (en) * | 2013-09-25 | 2013-12-25 | 中国联合网络通信集团有限公司 | Issuing method and issuing system for code version |
CN105183749A (en) * | 2015-07-13 | 2015-12-23 | 北京奇虎科技有限公司 | Method and device for crawling promotion content and providing crawled promotion content for use in search |
CN105187533A (en) * | 2015-09-10 | 2015-12-23 | 浪潮软件股份有限公司 | Data transmission method and device |
Also Published As
Publication number | Publication date |
---|---|
CN105491160B (en) | 2019-12-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108933805A (en) | A kind of document transmission method and system | |
CN106657174B (en) | Data synchronization method, data updating method and data updating device | |
CN109496418B (en) | File downloading method and device, and equipment/terminal/server | |
CN103237060B (en) | A kind of data object acquisition, Apparatus and system | |
CN105871587A (en) | Log uploading method and device | |
CN106534261A (en) | Data writing method, device and system | |
CN105095489A (en) | Distributed file deletion method, device and system | |
CN105808589A (en) | File processing method and apparatus | |
CN102687472B (en) | Processing devices and methods for transmitting and receiving data | |
CN112822260B (en) | File transmission method and device, electronic equipment and storage medium | |
CN108512898B (en) | File pushing method and device, computer equipment and storage medium | |
US10540325B2 (en) | Method and device for identifying junk picture files | |
JP2014149813A (en) | Method and system for sending e-mail with large file attached thereto on mobile device | |
CN104714835A (en) | Data access processing method and device | |
CN104079623B (en) | Multistage cloud storage synchronisation control means and system | |
CN103701867A (en) | Method, system and central server for processing call requests | |
CN106131175A (en) | A kind of acquisition of information, information-pushing method and equipment | |
CN105630779A (en) | Hadoop distributed file system based small file storage method and apparatus | |
CN109800005A (en) | A kind of hot update method of client and device | |
US9043646B2 (en) | Client selectable server-side error resolution | |
CN105955805A (en) | Application container transferring method and device | |
CN104750741A (en) | Invalid link processing method and invalid link processing device | |
CN111104387A (en) | Method and device for acquiring data set on server | |
CN104408068A (en) | Report form data processing method and related equipment | |
CN106294627A (en) | Data managing method and data server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
DD01 | Delivery of document by public notice | ||
DD01 | Delivery of document by public notice |
Addressee: BAISHI SOFTWARE (BEIJING) Co.,Ltd. Person in charge of patents Document name: payment instructions |