Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Automatic replacing method and apparatus of same-name file

A technology of files with the same name and files, applied to electrical components, transmission systems, etc., can solve problems such as operational errors and low efficiency, and achieve the effect of improving replacement efficiency and avoiding errors

Inactive Publication Date: 2014-10-08
LETV CLOUD COMPUTING CO LTD
View PDF5 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, manually replacing files with the same name is inefficient and prone to the risk of operational errors

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Automatic replacing method and apparatus of same-name file
  • Automatic replacing method and apparatus of same-name file
  • Automatic replacing method and apparatus of same-name file

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0064] figure 1 It is a schematic flow chart of an automatic replacement method for a file with the same name in the embodiment of the present application; as figure 1 As indicated, it may specifically include:

[0065] S101. Obtain a replacement picture;

[0066] In this embodiment, a file storage server is established in the background, the replacement file is stored on the file storage server, and the replacement file can be obtained directly from it.

[0067] In this embodiment, a specific data uploading interface is set in the existing file uploading system, and only webpage element files are allowed to be uploaded to the file storage server. Specifically, the picture may be uploaded to the file storage server through http post.

[0068] It should be noted that if there are multiple replacement pictures, batch processing can be performed. For example, a form uploaded in the form of http post is provided, and multiple replacement pictures are uploaded in batches by loa...

Embodiment 2

[0085] figure 2 A schematic flow diagram of formatting the file name of the replacement file according to Embodiment 2 of the present application; as figure 2 shown, which can include:

[0086] S112. Obtain the domain name classifier included in the storage directory of the replacement picture;

[0087] If the domain name specifiers are COM, ORG, GOV, NET, EDU, etc. Taking COM as an example, if the uploaded file storage directory is: i0^img^letv^com~dyw~2013~12~test.png, then, according to the ^com~ included in the storage directory, it is the domain name classifier.

[0088] S122. Divide the storage directory of the replacement picture into two sections according to the domain name classifier;

[0089] Use ^ in the storage directory as a separator, and split the storage directory into the first array such as: i0, img, letv, com, which is the front section; the front section includes the domain name address letv.com of the file name;

[0090] Use ~ in the storage directo...

Embodiment 3

[0095] image 3 It is the automatic replacement method of the file with the same name in the third embodiment of this application; this embodiment is aimed at the scene with a rollback requirement, that is, restoring the replaced picture. like image 3 As indicated, it may specifically include:

[0096] S301. Obtain the uploaded replacement picture file from the file storage server, and format the storage directory and file name of the replacement file;

[0097] S302. According to the storage directory of the replacement picture obtained by formatting, traverse the storage directory of the corresponding source file, and find the source file with the same file name as the replacement picture as the replaced picture;

[0098] S303. Replace the replaced file from the replacement picture, and distribute and cache the replacement picture to each CDN node;

[0099] For steps S301-S303, reference may be made to the relevant records of the first and second embodiments above, and de...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an automatic replacing method and apparatus of a same-name file. The method comprises: obtaining a replacing file and carrying out formatting on the storage directory and the file name of the replacing file; according the storage directory of the replacing file, obtained through the formatting, traversing the storage directory of a corresponding source file, finding out a source file which has the same file name as the replacing file therefrom, and taking the four file which has the same file name as a replaced file; and replacing the replaced file by the replacing file, and distributing and caching the replacing file to each CDN node. According to the invention, the storage directory and the file name of the replacing file are formatted, then the storage directory of the source file is traversed to find out the source file which has the same file name as the replacing file to be taken as the replaced file, and then the replacing file is distributed and cached to each CDN node, such that, during file replacement, one CDN node can be selected according to a "nearest" principle and the replacing file is obtained and used to update the replaced file from caching.

Description

technical field [0001] The present application relates to the technical field of content distribution, in particular to a method and device for automatically replacing files with the same name. Background technique [0002] When the website elements are updated, the uploaded data is automatically allocated to the storage directory completely according to the date. Therefore, even if the data with the same file name is located in different storage directories due to different upload dates, it cannot be automatically batched into the same storage directory. uploaded with the same name. For example, with the continuous expansion of business types, if you want to temporarily replace the pictures, JS, CSS and other files used by some business applications, you need the website editor to manually push the new pictures to the cache of each CDN node. The CDN node caches to replace the old pictures. After running for a period of time, if you want to switch back to the old picture, ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/08
Inventor 刘旺张国斌
Owner LETV CLOUD COMPUTING CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products