[go: up one dir, main page]

CN102883232B - Method for adding watermarks in swf documents in batches and device thereof - Google Patents

Method for adding watermarks in swf documents in batches and device thereof Download PDF

Info

Publication number
CN102883232B
CN102883232B CN201210314124.8A CN201210314124A CN102883232B CN 102883232 B CN102883232 B CN 102883232B CN 201210314124 A CN201210314124 A CN 201210314124A CN 102883232 B CN102883232 B CN 102883232B
Authority
CN
China
Prior art keywords
file
swf
watermark
swf file
former
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
CN201210314124.8A
Other languages
Chinese (zh)
Other versions
CN102883232A (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.)
4399 NETWORK Co Ltd
Original Assignee
4399 NETWORK Co 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 4399 NETWORK Co Ltd filed Critical 4399 NETWORK Co Ltd
Priority to CN201210314124.8A priority Critical patent/CN102883232B/en
Publication of CN102883232A publication Critical patent/CN102883232A/en
Application granted granted Critical
Publication of CN102883232B publication Critical patent/CN102883232B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a method for adding watermarks in swf documents in batches. The method comprises the following steps: S1, users upload original swf documents which need adding watermarks to a batch processing server; S2, the batch processing server reads the original swf documents by binary system stream; S3, whether the original swf documents are compressed documents or not is judged, if so, the original swf documents are decompressed, and the S4 is carried out, and otherwise, the S4 is directly carried out; S4, the document formats of the original swf documents are analyzed, watermark tags are inserted, and new swf documents are generated in batches; and S5, the generated new swf documents are recompressed and saved to a local directory. By the virtue of the technical scheme provided by the invention, the users can add watermarks in the swf documents in batches, the operation is simple and fast, and the efficiency is improved.

Description

A kind of swf files in batch adds method and the device of watermark
Technical field
The present invention relates to video display arts field, particularly relate to method and device that a kind of swf files in batch adds watermark.
Background technology
Along with developing rapidly of network site of cinema and TV, a lot of people thinks about it and the video display of oneself creation is uploaded on the net, but online thing is easy to be usurped by others, for preventing the generation of this phenomenon, the best way is exactly for swf file adds watermark, can either prevent from usurping, the impact of oneself can be expanded again as Logo mark.
Swf file is the professional format of Flash, is the Animation File Format of a kind of support vector and dot pattern, is widely used in webpage design, the fields such as cartoon making, and swf file is also referred to as Flash file usually.
For swf file adds watermark, being in fact exactly using as the word of watermark, picture, animation or video superimpose on swf file, in prior art, is generally swf file interpolation watermark by two kinds of methods:
1. user adds watermark for single swf file, is mainly realized by software, as long as containing the Video processing software of two or more video editing track, as Prcmicro, in graphic detail etc., can carry out the process superposing watermark.
2. the SWF file write oneself directly adds watermark.
Summary of the invention
The object of the invention is to design method and the device that a kind of swf files in batch adds watermark, user can be allowed to carry out batch to swf file and add watermark, simple to operate, quick.
To achieve these goals, the technical solution used in the present invention is as follows:
Swf files in batch adds a method for watermark, comprises the following steps:
S1, user will need the former swf files passe adding watermark to batch processing server;
S2, described batch processing server binary stream reads described former swf file;
S3, judges whether described former swf file is compressed file, and if so, then decompress described former swf file, performs S4; If not, directly perform S4;
S4, resolves the file format of described former swf file, inserts watermark label, the new swf file of Mass production;
S5, again compresses the described new swf file generated and is saved in local directory.
Preferably, judge whether described former swf file is compressed file, is specially described in S3: the file header identifier of resolving described former swf file, if the file header identifier of described former swf file is CWS, then described former swf file is compressed file; If the file header identifier of described former swf file is FWS, then described former swf file is uncompressed file.
Preferably, the file format of the described former swf file of the parsing described in S4, is specially: the content of resolving swf file, determines the position of adding watermark.
Preferably, also comprised before the insertion watermark label described in S4:
A, arrange need add watermark label;
B, by be provided with described need add watermark label be kept at described batch processing server.
Another technical scheme of the present invention is:
Swf files in batch adds a device for watermark, comprising:
Upper transmission module, for by former swf files passe to batch processing server;
Described batch processing server, adds the process of watermark for carrying out batch to the described former swf file received, insert watermark label, generate new swf file;
Memory module, for being saved in local directory by the new swf file generated.
Preferably, described batch processing server also comprises:
Receiver module, for receiving the former swf file that user uploads with binary stream;
Judge module, for judging whether described former swf file is compressed file;
Decompress files, for being judged as the described former swf file decompression of non-decompress files by described judge module;
Parsing module, for resolving the form of described former swf file, inserting watermark label, generating new swf file;
Compression module, for becoming compressed file by the new swf compressing file generated.
Preferably, described judge module, for judging whether described former swf file is compressed file, is specially: the file header identifier of resolving described former swf file, if the file header identifier of described former swf file is CWS, then described former swf file is compressed file; If the file header identifier of described former swf file is FWS, then described former swf file is uncompressed file.
Preferably, described parsing module, for resolving the form of described former swf file, is specially: the content of resolving swf file, determines the position of adding watermark.
Preferably, described parsing module also comprised before inserting watermark label:
A, arrange need add watermark label;
B, by be provided with described need add watermark label be kept at described batch processing server.
As can be seen from the above technical solutions, beneficial effect of the present invention can be summarized as follows:
Technical scheme of the present invention can allow user carry out batch to swf file to add watermark, simple to operate, quick, improves efficiency.
Accompanying drawing explanation
Fig. 1 is method flow diagram of the present invention;
Fig. 2 is apparatus structure schematic diagram of the present invention.
Embodiment
In order to make technical problem solved by the invention, technical scheme and beneficial effect clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.
The invention provides the method and apparatus that a kind of swf files in batch adds watermark, for improving the efficiency of adding watermark.
Refer to Fig. 1, the method that the swf files in batch in the embodiment of the present invention adds watermark comprises the following steps:
S1, user will need the former swf files passe adding watermark to batch processing server; S2, described batch processing server binary stream reads described former swf file; S3, judges whether described former swf file is compressed file, and if so, then decompress described former swf file, performs S4; If not, directly perform S4; S4, resolves the file format of described former swf file, inserts watermark label, the new swf file of Mass production; S5, again compresses the described new swf file generated and is saved in local directory.
Wherein, judge whether described former swf file is compressed file, is specially: the file header identifier of resolving described former swf file, if the file header identifier of the described former swf file obtained after resolving is CWS, then described former swf file is compressed file; If the file header identifier of described former swf file is FWS after resolving, then described former swf file is uncompressed file.
Wherein, resolve the file format of described former swf file, be specially: the content of resolving swf file, determine the position of adding watermark, insert watermark label.
Also need to carry out following operating procedure before inserting watermark label:
A, arrange need add watermark label;
B, by be provided with described need add watermark label be kept at described batch processing server.
By the described watermark label added that needs is kept in described batch processing server, after described former swf file content is resolved, batch can be carried out to former swf file and add watermark.
In sum, technical scheme of the present invention can allow user carry out batch to swf file to add watermark, simple to operate, quick, improves efficiency.
Refer to Fig. 2, a kind of swf files in batch that also provides in the embodiment of the present invention adds the device of watermark, comprising:
Upper transmission module, for by former swf files passe to batch processing server; Described batch processing server, adds the process of watermark for carrying out batch to the described former swf file received, insert watermark label, generate new swf file; Memory module, for being saved in local directory by the new swf file generated.
Wherein, described batch processing server also comprises:
Receiver module, for receiving the former swf file that user uploads with binary stream;
Wherein, byte in binary stream is written in file or equipment according to programming form, and be read into program according to the form that they read from file or equipment, data in binary stream carry out storing documents according to binary-coded mode, binary stream need not transform newline, the speed of data flow can be accelerated, raise the efficiency.
Judge module, for judging whether described former swf file is compressed file;
Described judge module, for judging whether described former swf file is compressed file, is specially: the file header identifier of resolving described former swf file, if the file header identifier of described former swf file is CWS, then described former swf file is compressed file; If the file header identifier of described former swf file is FWS, then described former swf file is uncompressed file.
The file header of wherein said former swf file starts with three identifiers, three described identifiers are 0x46,0x57 and 0x53 or described three identifiers is 0x46,0x57 and 0x43, if three identifiers of the file header of former swf file are 0x46,0x57 and 0x53, be then uncompressed file; If three identifiers of the file header of former swf file are 0x46,0x57 and 0x43, be then compressed file.
Decompress files, for being judged as the described former swf file decompression of non-decompress files by described judge module;
Parsing module, for resolving the form of described former swf file, determining the position of adding watermark, inserting watermark label, generate new swf file;
Compression module, for becoming compressed file by the new swf compressing file generated.
Described parsing module also comprised before inserting watermark label:
A, arrange need add watermark label;
B, by be provided with described need add watermark label be kept at described batch processing server.
By the described watermark label added that needs is kept in described batch processing server, after described former swf file content is resolved, batch can be carried out to former swf file and add watermark.
In sum, technical scheme of the present invention can allow user carry out batch to swf file to add watermark, simple to operate, quick, improves efficiency.
The present invention is described in detail in preferred embodiment above by concrete; but those skilled in the art should be understood that; the present invention is not limited to the above embodiment; within the spirit and principles in the present invention all; any amendment of doing, equivalent replacement etc., all should be included within protection scope of the present invention.

Claims (4)

1. swf files in batch adds a method for watermark, it is characterized in that, comprising:
S1, user will need the former swf files passe adding watermark to batch processing server;
S2, described batch processing server binary stream reads described former swf file;
S3, judges whether described former swf file is compressed file, and if so, then decompress described former swf file, performs S4; If not, directly perform S4;
S4, resolves the file format of described former swf file, inserts watermark label, the new swf file of Mass production;
Wherein, in step S4, the file format of the described former swf file of described parsing, is specially: the content of resolving swf file, determines the position of adding watermark;
Also comprised before the insertion watermark label described in step S4:
A, arrange need add watermark label;
B, by be provided with described need add watermark label be kept at described batch processing server;
S5, again compresses the described new swf file generated and is saved in local directory.
2. swf files in batch according to claim 1 adds the method for watermark, it is characterized in that, judge whether described former swf file is compressed file described in S3, be specially: the file header identifier of resolving described former swf file, if the file header identifier of described former swf file is CWS, then described former swf file is compressed file; If the file header identifier of described former swf file is FWS, then described former swf file is uncompressed file.
3. swf files in batch adds a device for watermark, it is characterized in that, comprising:
Upper transmission module, for by former swf files passe to batch processing server;
Described batch processing server, adds the process of watermark for carrying out batch to the described former swf file received, insert watermark label, generate new swf file;
Memory module, for being saved in local directory by the new swf file generated;
Described batch processing server also comprises:
Receiver module, for receiving the former swf file that user uploads with binary stream;
Judge module, for judging whether described former swf file is compressed file;
Decompress files, for being judged as the described former swf file decompression of non-decompress files by described judge module;
Parsing module, for resolving the form of described former swf file, inserting watermark label, generating new swf file;
Compression module, for becoming compressed file by the new swf compressing file generated;
Wherein, described parsing module, for resolving the form of described former swf file, is specially: the content of resolving swf file, determines the position of adding watermark;
Described parsing module also comprised before inserting watermark label:
A, arrange need add watermark label;
B, by be provided with described need add watermark label be kept at described batch processing server.
4. swf files in batch according to claim 3 adds the device of watermark, it is characterized in that, described judge module, for judging whether described former swf file is compressed file, be specially: the file header identifier of resolving described former swf file, if the file header identifier of described former swf file is CWS, then described former swf file is compressed file; If the file header identifier of described former swf file is FWS, then described former swf file is uncompressed file.
CN201210314124.8A 2012-08-29 2012-08-29 Method for adding watermarks in swf documents in batches and device thereof Active CN102883232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210314124.8A CN102883232B (en) 2012-08-29 2012-08-29 Method for adding watermarks in swf documents in batches and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210314124.8A CN102883232B (en) 2012-08-29 2012-08-29 Method for adding watermarks in swf documents in batches and device thereof

Publications (2)

Publication Number Publication Date
CN102883232A CN102883232A (en) 2013-01-16
CN102883232B true CN102883232B (en) 2015-04-15

Family

ID=47484338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210314124.8A Active CN102883232B (en) 2012-08-29 2012-08-29 Method for adding watermarks in swf documents in batches and device thereof

Country Status (1)

Country Link
CN (1) CN102883232B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200462B (en) * 2013-03-23 2015-12-02 四三九九网络股份有限公司 A kind of video broadcasting method of swf file
CN103294539B (en) * 2013-05-09 2016-04-06 四三九九网络股份有限公司 The method and apparatus of batch deciphering flash game
CN103279501B (en) * 2013-05-09 2016-05-11 四三九九网络股份有限公司 In batches to the method and apparatus that adds anti-importing coded lock in swf file
CN106919656A (en) * 2017-01-25 2017-07-04 百度在线网络技术(北京)有限公司 The generation method and device of self-defined compressed file
CN113727197B (en) * 2021-07-27 2024-11-29 海南视联通信技术有限公司 Watermark processing method, watermark processing device, terminal equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3729106B2 (en) * 2001-08-31 2005-12-21 日本電気株式会社 Content distribution system and content distribution method used therefor
CN101197827B (en) * 2007-12-14 2010-12-08 华为技术有限公司 Document management method, system and correlated equipment
CN101198045B (en) * 2007-12-20 2012-07-25 清华大学 Stream media digital watermarking system

Also Published As

Publication number Publication date
CN102883232A (en) 2013-01-16

Similar Documents

Publication Publication Date Title
CN104540000B (en) The generation method and terminal of a kind of dynamic thumbnail
CN102883232B (en) Method for adding watermarks in swf documents in batches and device thereof
CN105744292B (en) A kind of processing method and processing device of video data
CN105630459A (en) Method for converting PPT document to HTML page
CN104284238A (en) Video playing method and device based on two-dimensional code
CN111309312A (en) Editing method and device of rich text object, terminal equipment and computer storage medium
CN112035706A (en) Encoding method, decoding method, computer device, and readable storage medium
CN112487763A (en) SVG-based OFD file online display method, server side and system
CN103646048A (en) Method and device for achieving multimedia pictures
US9432489B2 (en) Systems and methods for processing encoded data streams
CN111061896A (en) Loading method, device, equipment and medium for 3D (three-dimensional) graph based on glTF (generalized likelihood TF)
CN103138871B (en) The server data processing system of application program and method in mobile communcations system
CN104077323A (en) Method and device for converting web page content to multimedia messages
CN102883188A (en) Method and system of downloading and playing MP4 files in real time
US20140072223A1 (en) Embedding Media Content Within Image Files And Presenting Embedded Media In Conjunction With An Associated Image
CN102902525B (en) A kind of method of swf files in batch amendment frame frequency
CN105704215B (en) Shared file system and corresponding document sending method and device
TW201207767A (en) Three-dimensional Web user interface used in embedded devices and realizing method thereof
CN102711060A (en) Multimedia message processing method, smart card and terminal equipment
CN113473171A (en) Resource processing method and device
RU2332717C2 (en) Determination of applicability of encoded file for application
CN103218547B (en) SWF files in batch encryption method and device
CN103207958B (en) The SWF files in batch encryption method of AS3.0 script exploitation and device
CN119383420A (en) Video watermarking method, server, system and storage medium
EP1394745B1 (en) Determining usability of a coded file for an application

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant