CN111711687B - File data transmission and storage method - Google Patents

File data transmission and storage method Download PDF

Info

Publication number
CN111711687B
CN111711687B CN202010544918.8A CN202010544918A CN111711687B CN 111711687 B CN111711687 B CN 111711687B CN 202010544918 A CN202010544918 A CN 202010544918A CN 111711687 B CN111711687 B CN 111711687B
Authority
CN
China
Prior art keywords
file
field
server
uploaded
url
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
CN202010544918.8A
Other languages
Chinese (zh)
Other versions
CN111711687A (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202010544918.8A priority Critical patent/CN111711687B/en
Publication of CN111711687A publication Critical patent/CN111711687A/en
Application granted granted Critical
Publication of CN111711687B publication Critical patent/CN111711687B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The invention discloses a file data transmission and storage method, which comprises the following steps: step 1, adding a first field on a file header of an existing file, wherein the first field is a author name; step 2, adding a second field on the file header of the existing file, wherein the second field is an address uploaded to the server; step 3, adding a third field on the file header of the existing file, wherein the third field marks whether the client edits the file; the method and the device can reduce the waste of server storage and bandwidth caused by unnecessary file transmission, only one file needs to be stored in the server for the same file, and the uploading efficiency is improved because the size of the file is larger than that of the url text. Meanwhile, repeated storage of the same file on the server is reduced, so that the url returned by the server is added in the file header, repeated uploading of the same file for many times can be prevented, and only the url of the file needs to be uploaded.

Description

File data transmission and storage method
Technical Field
The invention relates to the technical field of computer software, in particular to a file data transmission and storage method.
Background
A file transfer is the transfer of a file or a portion thereof from one computer system to another. A file or a portion thereof is transferred from one computer system to another. It may transfer the file to another computer for storage, or to access the file on a remote computer, or to another computer for execution (as a program) or processing (as data), or to a printer for printing. Since the file systems of the computers in a network are often different, a common file transfer rule is established across the network, known as the File Transfer Protocol (FTP).
At present, on the premise of complying with a transmission protocol, a local file path is acquired and uploaded to a server in a file stream manner, but when the local file path needs to be uploaded again, for example, a file is downloaded to the local, and when the local file needs to be sent or forwarded or uploaded to a friend circle of a user, the file which is already in the server is uploaded again, which causes waste of bandwidth and waste of server space, or for example, a picture is downloaded on an e-commerce platform and uploaded to a shop of the user, which needs to be uploaded repeatedly, and the server already has the file, which causes unnecessary waste of resources.
Disclosure of Invention
The invention aims to provide a file data transmission and storage method, which aims to solve the problem that unnecessary resource waste is caused by the fact that when a local file path is acquired in the prior art, the local file path is uploaded to a server in a file stream mode, but when the local file path needs to be uploaded again in the mode, the local file path needs to be uploaded again.
In order to achieve the purpose, the invention provides the following technical scheme: a file data transmission and storage method comprises the following steps:
step 1, adding a first field on a file header of an existing file, wherein the first field is a author name;
step 2, adding a second field on the file header of the existing file, wherein the second field is an address uploaded to the server;
step 3, adding a third field on the file header of the existing file, wherein the third field marks whether the client edits the file;
step 4, detecting the source of the file by using the first field, emptying the first field and the second field when the third field marks that the client edits the file, and detecting whether the second field has content when the third field marks that the client does not edit the file;
step 5, if the detected second field has no content, uploading the local text in a streaming mode, if the second field has the content, detecting whether the array inside of the field contains the domain name of the service provider, if the second field has the content, only uploading the url of the corresponding service provider, and if the second field does not have the content, uploading the local text in the streaming mode;
step 6, if the array of the second field contains the domain name of the service provider, only the url is uploaded, whether the server contains complete file information is detected, if the server contains the complete information, the file does not need to be uploaded, and if the server does not contain the complete information, the file needs to be uploaded again;
preferably, the author name in step 1 is the copyright of the identified document.
Preferably, the addresses uploaded to the server in the step 2 are arrays.
Preferably, the size of the file in step 6 is larger than the size of the url text.
Compared with the prior art, the invention has the beneficial effects that: a file data transmission storage method is more beneficial than a method for storing files by a database, the files are stored by the database in one-to-one correspondence with positions, once the corresponding relation of the files is moved, the corresponding relation is damaged, and urls are stored in file headers of the files, the urls follow the files, the urls uploaded to a server are known no matter how the files are moved, unnecessary file transmission can be reduced, waste of storage and bandwidth of the server is caused, all the files are stored in a shared place of the server instead of different server providers, only one file can be stored on the server at the moment, and uploading efficiency is improved. The storage of the server is reduced, and the url of the uploaded file is added in the file, so that repeated uploading can be prevented.
Drawings
FIG. 1 is a first flowchart of text transmission according to the present invention;
FIG. 2 is a flow chart of text transmission according to the present invention;
FIG. 3 is a flowchart of file downloading according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Example 1: text transmission mode
Referring to fig. 1-2, the present invention provides a technical solution: a file data transmission and storage method comprises the following steps:
step 1, adding a first field on a file header of an existing file, wherein the first field is a author name;
step 2, adding a second field on the file header of the existing file, wherein the second field is an address uploaded to a server;
step 3, adding a third field on the file header of the existing file, wherein the third field marks whether the client edits the file;
step 4, detecting the source of the file by using the first field, emptying the first field and the second field when the third field marks that the client edits the file, and detecting whether the second field has content when the third field marks that the client does not edit the file;
step 5, if the detected second field has no content, uploading the local text in a streaming mode, if the second field has the content, detecting whether the array inside of the field contains the domain name of the service provider, if the second field has the content, only uploading the url of the corresponding service provider, and if the second field does not have the content, uploading the local text in the streaming mode;
step 6, if the array of the second field contains the domain name of the service provider, only the url is uploaded, whether the server contains complete file information is detected, if the server contains the complete information, the file does not need to be uploaded, and if the server does not contain the complete information, the file needs to be uploaded again;
specifically, the author name in step 1 is the copyright of the identified file.
Specifically, the address uploaded to the server in step 2 is an array.
In particular, the size of the file in step 6 is larger than the size of the url text, so that the traffic resource for uploading can be reduced, and this prevents the same file from being kept on the server continuously.
In summary, the following steps: if the next time the client downloads the text from the server, the header of the text contains the url, the client only needs to judge whether the text exists in the server, if so, the client only needs to upload the url without uploading the text again, and if not, the client uploads the text again.
Example 2: file downloading mode
Referring to fig. 3, the present invention provides a technical solution: a file data transmission and storage method comprises the following steps:
step 1, adding a first field on a file header of an existing file, wherein the first field is a author name;
step 2, adding a second field on the file header of the existing file, wherein the second field is an address uploaded to the server;
step 3, adding a third field on the file header of the existing file, wherein the third field marks whether the client edits the file;
step 4, detecting the source of the file by using the first field, emptying the first field and the second field when the third field marks that the client edits the file, and detecting whether the second field has content when the third field marks that the client does not edit the file;
step 5, if the detected second field has no content, uploading the local text in a streaming mode, if the second field has the content, detecting whether the array inside of the field contains the domain name of the service provider, if the second field has the content, only uploading the url of the corresponding service provider, and if the second field does not have the content, uploading the local text in the streaming mode;
step 6, if the array of the second field contains the domain name of the service provider, only the url is uploaded, whether the server contains complete file information is detected, if the server contains the complete information, the file does not need to be uploaded, and if the server does not contain the complete information, the file needs to be uploaded again;
specifically, in step 1, the author name is the copyright of the identified file.
Specifically, the address uploaded to the server in step 2 is an array.
In particular, the size of the file in step 6 is larger than the size of the url text, so that the traffic resource for uploading can be reduced, and this prevents the same file from being kept on the server continuously.
In summary, the following steps: at present, a url is arranged in the file header of the file, a database, the url of the file and a path of the file can be established at a client according to the file, and if the url has a corresponding file path and the file is complete, the file does not need to be downloaded to a server. Only the local picture needs to be displayed. This can avoid the same client from downloading the same file from the server repeatedly, and save the storage space of the client. For example, the Wechat edge is a picture with a large number of pictures.
In the description of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "fixed" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral part; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The standard parts used in the invention can be purchased from the market, the special-shaped parts can be customized according to the description of the specification and the accompanying drawings, the specific connection mode of each part adopts conventional means such as bolts, rivets, welding and the like mature in the prior art, the machines, the parts and equipment adopt conventional models in the prior art, and the circuit connection adopts the conventional connection mode in the prior art, so that the detailed description is omitted.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (4)

1. A file data transmission and storage method is characterized in that: the method comprises the following steps:
step 1, adding a first field on a file header of an existing file, wherein the first field is a name of a author;
step 2, adding a second field on the file header of the existing file, wherein the second field is an address url uploaded to the server;
step 3, adding a third field on the file header of the existing file, wherein the third field marks whether the client edits the file;
step 4, detecting the source of the file by using the first field, emptying the first field and the second field when the third field marks that the client edits the file, and detecting whether the second field has content when the third field marks that the client does not edit the file;
step 5, if the detected second field has no content, uploading the local text in a streaming mode, if the second field has the content, detecting whether the array inside of the field contains the domain name of the server, if the second field has the content, only uploading the url of the corresponding server, and if the second field does not have the content, uploading the local text in the streaming mode;
and 6, if the array of the second field contains the domain name of the server, only uploading url, detecting whether the server contains complete file information, if so, the file does not need to be uploaded, and if not, the file needs to be uploaded again.
2. The method for transmitting and storing file data according to claim 1, wherein: the author name in step 1 is the copyright of the identified document.
3. The method for transmitting and storing file data according to claim 1, wherein: the addresses uploaded to the server in the step 2 are arrays.
4. The method for transmitting and storing file data according to claim 1, wherein: the size of the file in said step 6 is larger than the size of the url text.
CN202010544918.8A 2020-06-15 2020-06-15 File data transmission and storage method Active CN111711687B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010544918.8A CN111711687B (en) 2020-06-15 2020-06-15 File data transmission and storage method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010544918.8A CN111711687B (en) 2020-06-15 2020-06-15 File data transmission and storage method

Publications (2)

Publication Number Publication Date
CN111711687A CN111711687A (en) 2020-09-25
CN111711687B true CN111711687B (en) 2023-03-24

Family

ID=72540566

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010544918.8A Active CN111711687B (en) 2020-06-15 2020-06-15 File data transmission and storage method

Country Status (1)

Country Link
CN (1) CN111711687B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101004777A (en) * 2006-01-21 2007-07-25 鸿富锦精密工业(深圳)有限公司 System and method for automatic loading digital relief watermark
CN102646249A (en) * 2012-02-28 2012-08-22 北京佰策邦信息科技有限公司 Method and server for issuing product electronic data
CN102868765A (en) * 2012-10-09 2013-01-09 乐视网信息技术(北京)股份有限公司 Method and system for uploading files
CN104348919A (en) * 2014-11-07 2015-02-11 北京奇虎科技有限公司 Method and device for downloading file and browser
CN104753768A (en) * 2015-03-23 2015-07-01 联想(北京)有限公司 Information processing method and electronic equipment
CN107018068A (en) * 2017-05-25 2017-08-04 深圳市保千里电子有限公司 The method and system that file is transmitted during a kind of instant messaging
US9794763B1 (en) * 2016-05-17 2017-10-17 Kukudocs Inc. Method and system for sharing documents on mobile messenger
CN109151059A (en) * 2018-09-27 2019-01-04 乐蜜有限公司 A kind of file uploading method, device, electronic equipment and storage medium
CN109284252A (en) * 2018-09-11 2019-01-29 武汉虹信通信技术有限责任公司 Lightweight file method for managing system in a kind of communication equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101004777A (en) * 2006-01-21 2007-07-25 鸿富锦精密工业(深圳)有限公司 System and method for automatic loading digital relief watermark
CN102646249A (en) * 2012-02-28 2012-08-22 北京佰策邦信息科技有限公司 Method and server for issuing product electronic data
CN102868765A (en) * 2012-10-09 2013-01-09 乐视网信息技术(北京)股份有限公司 Method and system for uploading files
CN104348919A (en) * 2014-11-07 2015-02-11 北京奇虎科技有限公司 Method and device for downloading file and browser
CN104753768A (en) * 2015-03-23 2015-07-01 联想(北京)有限公司 Information processing method and electronic equipment
US9794763B1 (en) * 2016-05-17 2017-10-17 Kukudocs Inc. Method and system for sharing documents on mobile messenger
CN107018068A (en) * 2017-05-25 2017-08-04 深圳市保千里电子有限公司 The method and system that file is transmitted during a kind of instant messaging
CN109284252A (en) * 2018-09-11 2019-01-29 武汉虹信通信技术有限责任公司 Lightweight file method for managing system in a kind of communication equipment
CN109151059A (en) * 2018-09-27 2019-01-04 乐蜜有限公司 A kind of file uploading method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111711687A (en) 2020-09-25

Similar Documents

Publication Publication Date Title
CN101409706B (en) Method, system and relevant equipment for distributing data of edge network
US9888089B2 (en) Client side cache management
CN102771080B (en) Use the system and method that the efficient media of buffer memory transmits
US6862607B1 (en) Method to provide information in an internet telecommunication network
US20070027857A1 (en) System and method for searching multimedia and download the search result to mobile devices
US20110055386A1 (en) Network analytics management
US20060047844A1 (en) One step approach to deliver multimedia from local PC to mobile devices
US20020004808A1 (en) Optimizing bandwidth consumption for document distribution over a multicast enabled wide area network
EP1773021A1 (en) Data push service method and system using data pull model
CN102469149A (en) Method and device for carrying out self-adaptive adjustment on images by agent
CN102356390A (en) Flexible logging, such as for a web server
CN1643878A (en) Method and apparatus for configuring and controlling network resources in content delivery with distributed rules
CN102111685A (en) Acceleration method, equipment and system for network video loading
US20200351371A1 (en) Content delivery network transitional caching
CN103475682A (en) File transfer method and file transfer equipment
CN103455439A (en) Local caching device, system and method for providing content caching service
JP2014514639A (en) System and method for transmitting real-time images
CN100377522C (en) OMA download realizing method in content distributing network
US20150113101A1 (en) Method and apparatus for providing streaming content
CN102833241B (en) Streaming media service traffic record merged-processing method and device
CN111711687B (en) File data transmission and storage method
EP1395006B1 (en) Method and apparatus for data distribution through a network
US8301781B1 (en) Methods and systems for browser file transfer
CN108234325B (en) System based on IP anycast and message forwarding method
CN116150513A (en) Data processing method, device, electronic equipment and computer readable storage medium

Legal Events

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