CN112788152A - Picture uploading method capable of saving hard disk space - Google Patents
Picture uploading method capable of saving hard disk space Download PDFInfo
- Publication number
- CN112788152A CN112788152A CN202110117606.3A CN202110117606A CN112788152A CN 112788152 A CN112788152 A CN 112788152A CN 202110117606 A CN202110117606 A CN 202110117606A CN 112788152 A CN112788152 A CN 112788152A
- Authority
- CN
- China
- Prior art keywords
- picture
- uploading
- server
- suffix
- hard disk
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/00095—Systems or arrangements for the transmission of the picture signal
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a picture uploading method for saving hard disk space, which comprises the following steps of 1, setting an uploading server and a formal picture server; step 2, compiling an uploading method at the client, linking an uploading server, modifying the picture suffix, uploading the picture and obtaining the picture address on the uploading server at the end of temp. Step 3, after receiving the picture uploaded by the client, the uploading server immediately modifies the picture ending in temp. jpg into a random number temp. jpg and immediately returns the random number temp. jpg to the client; the picture is put into a redis list, and after the redis data is expired, the picture is automatically deleted by uploading the picture to a server; step 4, uploading service data to a service server, and simultaneously carrying an uploading address to a separate field; and the service server side sends an instruction after acquiring the field with the picture uploading address, and moves the picture from the independent uploading server to the formal picture server. The invention can greatly save the space of the server hard disk.
Description
Technical Field
The invention relates to the technical field of picture uploading, in particular to a picture uploading method capable of saving hard disk space.
Background
According to the traditional picture uploading scheme, after the picture is uploaded, the picture is stored in the server regardless of whether the last picture is adopted or not.
In fact, even after the picture is no longer used and becomes useless, the picture will continue to occupy the hard disk space.
Once the amount of data is large, the useless data is more and more, the storage resources of the hard disk are greatly consumed, and in case of the rented hard disk space, the rent is more and more wasted.
Disclosure of Invention
Aiming at the problems in the related art, the invention provides a picture uploading method for saving hard disk space, so as to overcome the technical problems in the prior related art.
Therefore, the invention adopts the following specific technical scheme:
a picture uploading method for saving hard disk space comprises,
step 1, setting an uploading server and a formal picture server;
step 2, compiling an uploading method at the client, linking an uploading server, modifying the picture suffix, uploading the picture and obtaining the picture address on the uploading server at the end of temp.
Step 3, after receiving the picture uploaded by the client, the uploading server immediately modifies the picture ending in temp. jpg into a random number temp. jpg and immediately returns the random number temp. jpg to the client; the picture is put into a redis list, and after the redis data is expired, the picture is automatically deleted by uploading the picture to a server;
step 4, uploading service data to a service server, and simultaneously carrying an uploading address to a separate field; and the service server side sends an instruction after acquiring the field with the picture uploading address, and moves the picture from the independent uploading server to the formal picture server.
Preferably, in step 2, js' Ajax method can be called to upload the picture.
Preferably, in step 2, a unified upload picture server can be developed.
Preferably, in step 2, the picture is displayed by using the address of the server.
Preferably, in step 2, when the picture suffix is modified, whether the picture suffix has been modified is judged, and if yes, the picture suffix modification process is skipped; otherwise, a suffix is modified for the picture.
Preferably, in step 2, when an uploading instruction of the client is received, if all the pictures are subjected to suffix modification, the pictures subjected to suffix modification are sequentially uploaded; if the pictures do not complete the suffix modification processing, the pictures which have completed the suffix modification processing are sequentially uploaded, and the pictures which have not completed the suffix modification processing are uploaded after the suffix modification is completed.
The invention has the beneficial effects that: in the process that the client selects the pictures to upload the pictures, the selected pictures are processed, so that the picture processing process is performed in advance before the client determines to upload the pictures, the picture uploading process is faster and more continuous, and the broadband utilization rate is improved; meanwhile, the pictures are deleted according to rules by setting a standby server, so that the storage space is cleared in real time; by special processing of the pictures and calling of the uploading address, a large amount of picture data are prevented from being stored in a formal server, and a real-time calling principle is adopted, so that the storage space of the server is greatly saved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a schematic diagram of a picture uploading method for saving hard disk space according to an embodiment of the present application.
Detailed Description
For further explanation of the various embodiments, the drawings which form a part of the disclosure and which are incorporated in and constitute a part of this specification, illustrate embodiments and, together with the description, serve to explain the principles of operation of the embodiments, and to enable others of ordinary skill in the art to understand the various embodiments and advantages of the invention, and, by reference to these figures, reference is made to the accompanying drawings, which are not to scale and wherein like reference numerals generally refer to like elements.
According to an embodiment of the present invention, there is provided a picture uploading method for saving hard disk space, as shown in fig. 1, including,
step 1, setting an uploading server and a formal picture server;
step 2, compiling an uploading method at the client, linking an uploading server, modifying the picture suffix, uploading the picture and obtaining the picture address on the uploading server at the end of temp.
Step 3, after receiving the picture uploaded by the client, the uploading server immediately modifies the picture ending in temp. jpg into a random number temp. jpg and immediately returns the random number temp. jpg to the client; the picture is put into a redis list, and after the redis data is expired, the picture is automatically deleted by uploading the picture to a server;
step 4, uploading service data to a service server, and simultaneously carrying an uploading address to a separate field; and the service server side sends an instruction after acquiring the field with the picture uploading address, and moves the picture from the independent uploading server to the formal picture server.
In at least one embodiment, in step 2, js' Ajax method may be invoked to upload the picture.
In at least one embodiment, a unified upload picture server may also be developed in step 2.
In at least one embodiment, in step 2, the picture is presented with the address of the server.
In at least one embodiment, in step 2, when a suffix of a picture is modified, whether the picture has the modified suffix is judged, and if yes, a picture suffix modification process is skipped; otherwise, a suffix is modified for the picture.
In at least one embodiment, in step 2, when an upload instruction of a client is received, if all the pictures are subjected to suffix modification, the pictures subjected to suffix modification are sequentially uploaded; if the pictures do not complete the suffix modification processing, the pictures which have completed the suffix modification processing are sequentially uploaded, and the pictures which have not completed the suffix modification processing are uploaded after the suffix modification is completed.
The invention has the beneficial effects that: in the process that the client selects the pictures to upload the pictures, the selected pictures are processed, so that the picture processing process is performed in advance before the client determines to upload the pictures, the picture uploading process is faster and more continuous, and the broadband utilization rate is improved; meanwhile, the pictures are deleted according to rules by setting a standby server, so that the storage space is cleared in real time; by special processing of the pictures and calling of the uploading address, a large amount of picture data are prevented from being stored in a formal server, and a real-time calling principle is adopted, so that the storage space of the server is greatly saved.
While, for purposes of simplicity of explanation, the methodologies are shown and described as a series of acts, it is to be understood and appreciated that the methodologies are not limited by the order of acts, as some acts may, in accordance with one or more embodiments, occur in different orders and/or concurrently with other acts from that shown and described herein or not shown and described herein, as would be understood by one skilled in the art. Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention. The various illustrative logical blocks, modules, and circuits described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal. In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software as a computer program product, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a web site, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk (disk) and disc (disc), as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks (disks) usually reproduce data magnetically, while discs (discs) reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (6)
1. The picture uploading method for saving the hard disk space is characterized by comprising the following steps: comprises that
Step 1, setting an uploading server and a formal picture server;
step 2, at the client, linking the uploading server, modifying the picture suffix, ending with temp. jpg, uploading the picture and obtaining the picture address on the uploading server;
step 3, after receiving the picture uploaded by the client, the uploading server immediately modifies the picture ending in temp. jpg into a random number temp. jpg and immediately returns the random number temp. jpg to the client; the picture is put into a redis list, and after the redis data is expired, the picture is automatically deleted by uploading the picture to a server;
step 4, uploading service data to a service server, and simultaneously carrying an uploading address to a separate field; and the service server side sends an instruction after acquiring the field with the picture uploading address, and moves the picture from the independent uploading server to the formal picture server.
2. The picture uploading method for saving hard disk space according to claim 1, wherein: in step 2, a js Ajax method can be called to upload the picture.
3. The picture uploading method for saving hard disk space according to claim 1 or 2, wherein: in step 2, a unified uploading picture server can be developed.
4. The picture uploading method for saving hard disk space according to claim 1, wherein: in step 2, the picture is displayed by the address of the server.
5. The picture uploading method for saving hard disk space according to claim 1, wherein: in step 2, when a picture suffix is modified, judging whether the picture has the modified suffix, if so, skipping the picture suffix modification process; otherwise, a suffix is modified for the picture.
6. The picture uploading method for saving hard disk space according to claim 1, wherein: in step 2, when an uploading instruction of a client is received, if all the pictures complete suffix modification processing, the pictures after suffix modification are sequentially uploaded; if the pictures do not complete the suffix modification processing, the pictures which have completed the suffix modification processing are sequentially uploaded, and the pictures which have not completed the suffix modification processing are uploaded after the suffix modification is completed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110117606.3A CN112788152A (en) | 2021-01-28 | 2021-01-28 | Picture uploading method capable of saving hard disk space |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110117606.3A CN112788152A (en) | 2021-01-28 | 2021-01-28 | Picture uploading method capable of saving hard disk space |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112788152A true CN112788152A (en) | 2021-05-11 |
Family
ID=75759361
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110117606.3A Pending CN112788152A (en) | 2021-01-28 | 2021-01-28 | Picture uploading method capable of saving hard disk space |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112788152A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140109222A1 (en) * | 2012-07-06 | 2014-04-17 | Tencent Technology (Shenzhen) Company Limited | Method and System for Performing Scanning and Killing on Browser Bookmarks |
CN108055302A (en) * | 2017-12-05 | 2018-05-18 | 竞技世界(北京)网络技术有限公司 | A kind of image cache processing method, system and server |
CN110990359A (en) * | 2019-12-18 | 2020-04-10 | 北京华峰创业科技有限公司 | Method and system for cleaning useless data in synchronous framework |
CN111200640A (en) * | 2019-12-23 | 2020-05-26 | 合肥美的智能科技有限公司 | Uploading method based on client and client |
-
2021
- 2021-01-28 CN CN202110117606.3A patent/CN112788152A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140109222A1 (en) * | 2012-07-06 | 2014-04-17 | Tencent Technology (Shenzhen) Company Limited | Method and System for Performing Scanning and Killing on Browser Bookmarks |
CN108055302A (en) * | 2017-12-05 | 2018-05-18 | 竞技世界(北京)网络技术有限公司 | A kind of image cache processing method, system and server |
CN110990359A (en) * | 2019-12-18 | 2020-04-10 | 北京华峰创业科技有限公司 | Method and system for cleaning useless data in synchronous framework |
CN111200640A (en) * | 2019-12-23 | 2020-05-26 | 合肥美的智能科技有限公司 | Uploading method based on client and client |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108965910B (en) | Video caching method and player | |
CN101571827A (en) | Method for saving logs and log system | |
GB2590018A (en) | Video playback method, electronic device, and storage medium | |
US20130097595A1 (en) | Update scanning | |
WO2017036183A1 (en) | Differential upgrade package processing method and device, upgrade method, system and device | |
CN112905113A (en) | Data access processing method and device | |
CN111803917B (en) | Resource processing method and device | |
CN106470353A (en) | Multimedia data processing method and device and electronic equipment | |
CN114116531B (en) | Cache consistency write-back method, device, equipment and medium | |
CN107979629B (en) | Distributed cache system and data cache method and device thereof | |
CN109343908B (en) | Method and device for delaying loading of JS script | |
CN111625203A (en) | Method, system, device and medium for hierarchical storage | |
CN111078497A (en) | Data storage method, equipment and storage medium of BMC (baseboard management controller) | |
CN110740138B (en) | Data transmission method and device | |
CN112788152A (en) | Picture uploading method capable of saving hard disk space | |
CN111142975B (en) | State machine persistence method and state machine persistence system | |
CN108491315A (en) | The page is resident statistical method, device and the computer readable storage medium of duration | |
US8412844B2 (en) | Validating download success | |
EP3731491A1 (en) | Method and device for downloading resources | |
CN114880604A (en) | Data processing method, data sending method, data acquiring method, data processing device, data sending device and data acquiring device | |
CN110740171B (en) | Data fragment transmission method and device | |
CN103618961A (en) | Method, system and browser for displaying video title | |
CN114968963A (en) | File overwriting method and device and electronic equipment | |
CN110795408A (en) | Data processing method and device based on object storage, server and storage medium | |
KR101637022B1 (en) | Apparatus and method for transmitting and receiving content |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210511 |
|
RJ01 | Rejection of invention patent application after publication |