CN103279501B - In batches to the method and apparatus that adds anti-importing coded lock in swf file - Google Patents

In batches to the method and apparatus that adds anti-importing coded lock in swf file Download PDF

Info

Publication number
CN103279501B
CN103279501B CN201310168413.6A CN201310168413A CN103279501B CN 103279501 B CN103279501 B CN 103279501B CN 201310168413 A CN201310168413 A CN 201310168413A CN 103279501 B CN103279501 B CN 103279501B
Authority
CN
China
Prior art keywords
swf
coded lock
source
file
swf file
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
CN201310168413.6A
Other languages
Chinese (zh)
Other versions
CN103279501A (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 CN201310168413.6A priority Critical patent/CN103279501B/en
Publication of CN103279501A publication Critical patent/CN103279501A/en
Application granted granted Critical
Publication of CN103279501B publication Critical patent/CN103279501B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a kind of batch to the method and apparatus that adds anti-importing coded lock in swf file, method comprises: batch processing server receive client upload X source swf file and need to be to the anti-importing coded lock information of adding in the swf file of described source; Batch processing server is according to current internal storage state and need source to be processed swf quantity of documents, creates Y processing threads, then Y processing threads is distributed to X source swf file; Batch processing server controls processing threads is all carried out following operation to self responsible source swf file: processing threads adds the anti-importing coded lock information corresponding with source swf file in the swf file of source, obtains the swf file that comprises anti-importing coded lock. Can in multiple swf files, efficiently add anti-importing coded lock in batches, have advantages of that anti-importing coded lock interpolation efficiency is high.

Description

In batches to the method and apparatus that adds anti-importing coded lock in swf file
Technical field
The invention belongs to field of computer technology, be specifically related to a kind of batch and add anti-importing close in swf fileThe method and apparatus of code lock.
Background technology
Swf (shockwaveflash) is the professional format of animation software Flash, is that a kind of support vowedThe animation file form of amount and dot pattern, is widely used in the field such as webpage design, cartoon making.
Because swf file format is disclosed file format, code is also standard code, therefore, works as issueWhen person issues a flash works on website, in prior art, exist these flash works to be led by other staffEnter the player to flash, the risk of then distorting these flash works in undelegated situation.
Summary of the invention
The defect existing for prior art, the invention provides a kind of batch and add anti-importing in swf fileThe method and apparatus of coded lock can efficiently add anti-importing coded lock, tool in batches in multiple swf filesThere is anti-importing coded lock to add the high advantage of efficiency.
The technical solution used in the present invention is as follows:
The invention provides a kind of batch to the method that adds anti-importing coded lock in swf file, comprise following stepRapid:
S1, batch processing server receive client upload X source swf file and need to be to described source swfThe anti-importing coded lock information of adding in file; Wherein, X >=1, X is integer;
S2, described batch processing server is according to current internal storage state and need described source to be processed swf number of filesAmount, creates Y processing threads, then a described Y processing threads is distributed to described X source swf file; ItsIn, Y >=1, Y is integer;
S3, the described source swf file that processing threads is responsible for self described in described batch processing server controls is all heldThe following operation of row: described processing threads to add in the swf file of described source corresponding with described source swf file described inAnti-importing coded lock information, obtains the swf file that comprises anti-importing coded lock;
S4, described batch processing server timing judges in a described Y processing threads whether have idle thread, asFruit exists, and further judges whether to exist pending source swf file; If existed, by described idle lineJourney is re-assigned to described pending source swf file; If there is no, nullify described idle thread.
Preferably, S3 specifically comprises the following steps:
S31, described processing threads receives described source swf file and described anti-importing coded lock information; ThenJudge that whether described source swf file is compressed file, if so, carries out S32; Otherwise, directly carry out S33;
S32, the described processing threads described source swf file that decompresses, obtains the source swf file after decompress(ion), thenCarry out S33;
S33, described processing threads is resolved described source swf file, obtains the swf header information of described source swf file,And be positioned at described swf header information N swf initial labels below; Wherein, N >=1, N is integer;
S34, described processing threads generates swf protection label, and wherein, described swf protection label comprises data headAnd data volume; Then described anti-importing coded lock information S2 being obtained writes in described data volume, is wrappedContaining the swf protection label of anti-importing coded lock;
S35, the described swf protection label that comprises anti-importing coded lock is inserted into described N by described processing threadsIn swf initial labels, obtain N+1 swf label;
S36, described processing threads recombinate described swf header information and described N+1 swf label, obtainThe swf file that comprises anti-importing coded lock.
Preferably, described swf protection label is ProtectTAG.
Preferably, S35 is specially:
Described processing threads judges that in described N swf initial labels, whether comprising background color arranges label, asFruit comprises, and the described swf protection label that comprises anti-importing coded lock is inserted into described background color mark is setAfter signing; If do not comprised, further judge in described N swf initial labels whether comprise XMP unitData label, if comprised, described in the described swf protection label that comprises anti-importing coded lock being inserted intoAfter XMP metadata tag; If do not comprised, by the described swf protection mark that comprises anti-importing coded lockLabel are inserted into optional position in described N swf initial labels.
Preferably, label is set is SetBackgroundColorTAG to described background color; Described XMP unitData label is MetadataTAG.
The present invention also provides a kind of batch to the device that adds anti-importing coded lock in swf file, comprising:
Receiver module, for receive client upload X source swf file and need to be to described source swf fileThe anti-importing coded lock information of middle interpolation; Wherein, X >=1, X is integer;
Creation module, for according to current internal storage state and need described source to be processed swf quantity of documents, createsY processing threads;
Distribution module, distributes to described receiver module for Y the processing threads that described creation module is created and connectsDescribed X the source swf file of receiving; Wherein, Y >=1, Y is integer;
Control module, described in controlling that described processing threads that described creation module creates is responsible for selfSource swf file is carried out following operation: described processing threads adds and described source swf literary composition in the swf file of described sourceThe described anti-importing coded lock information that part is corresponding, obtains the swf file that comprises anti-importing coded lock;
Judge module, judges for timing whether a described Y processing threads exists idle thread; Also for working asWhen judgement obtains there is idle thread in a described Y processing threads, further judge whether to exist pending sourceSwf file;
Heavy distribution module, in the time that described judge module judgement obtains existing pending source swf file, by instituteState idle thread and be re-assigned to described pending source swf file;
Nullify module, in the time that described judge module judgement is not existed pending source swf file, nullifyDescribed idle thread.
Beneficial effect of the present invention is as follows:
Batch provided by the invention, to the method and apparatus that adds anti-importing coded lock in swf file, can be criticizedAmount efficiently adds anti-importing coded lock in multiple swf files, has anti-importing coded lock interpolation efficiency highAdvantage.
Brief description of the drawings
Fig. 1 is that batch provided by the invention adds the method flow of anti-importing coded lock to illustrate in swf fileFigure;
Fig. 2 is that batch provided by the invention adds the apparatus structure of anti-importing coded lock to illustrate in swf fileFigure.
Detailed description of the invention
Below in conjunction with accompanying drawing, the present invention is described in detail:
As shown in Figure 1, the invention provides a kind of batch to the method that adds anti-importing coded lock in swf file,Comprise the following steps:
S1, batch processing server receive client upload X source swf file and need to be to described source swfThe anti-importing coded lock information of adding in file; Wherein, X >=1, X is integer;
In the present invention, anti-importing coded lock information is obtained by User Defined. In addition, anti-importing coded lock letterBetween breath and source swf file, can be one-one relationship, can be also many-one relationship. Especially when anti-importing is closeWhen code lock information and source swf file are many-one relationship, user only need to input once anti-importing by clientCoded lock information, batch processing server can add anti-importing coded lock information for multiple sources swf file automatically,Thereby simplify user's operation, improved user's experience.
S2, described batch processing server is according to current internal storage state and need described source to be processed swf number of filesAmount, creates Y processing threads, then a described Y processing threads is distributed to described X source swf file; ItsIn, Y >=1, Y is integer;
Adopt multithreading processing mode, can effectively improve the treatment effeciency of source swf file.
In this step, the quantity Y of processing threads is less than, is more than or equal to source swf quantity of documents X, specifically distinguishesFollowing situation: (1) if Y=X, for example, Y=X=5, distributes to 5 processing threads 5 source swf literary compositionsPart, is responsible for a source swf file by a processing threads. (2) if Y is less than X, for example, Y=5, X=8,First process 5 source swf files by 5 processing threads, after certain processing threads is disposed, then processStill in untreated 3 source swf files, finally makes the active swf file process of institute complete. (3) ifY is greater than X, for example, Y=5, X=3, can make two or source swf file of 3 thread associated treatment.That is to say, in the present invention, for a source swf file, can be processed by one or more threads simultaneously,Thereby raising treatment effeciency.
S3, the described source swf file that processing threads is responsible for self described in described batch processing server controls is all heldThe following operation of row: described processing threads to add in the swf file of described source corresponding with described source swf file described inAnti-importing coded lock information, obtains the swf file that comprises anti-importing coded lock;
In this step, in the swf file of source, add the anti-importing coded lock information corresponding with source swf file, concreteComprise the following steps:
S31, described processing threads receives described source swf file and described anti-importing coded lock information; ThenJudge that whether described source swf file is compressed file, if so, carries out S32; Otherwise, directly carry out S33;
S32, the described processing threads described source swf file that decompresses, obtains the source swf file after decompress(ion), thenCarry out S33;
S33, described processing threads is resolved described source swf file, obtains the swf header information of described source swf file,And be positioned at described swf header information N swf initial labels below; Wherein, N >=1, N is integer.
S34, described processing threads generates swf protection label, and wherein, described swf protection label comprises data headAnd data volume; Then described anti-importing coded lock information S2 being obtained writes in described data volume, is wrappedContaining the swf protection label of anti-importing coded lock;
Wherein, swf protection label is ProtectTAG.
S35, the described swf protection label that comprises anti-importing coded lock is inserted into described N by described processing threadsIn swf initial labels, obtain N+1 swf label;
In this step, the insertion position of the swf protection label that comprises anti-importing coded lock is preferably: described processingThread judges that in described N swf initial labels, whether comprising background color arranges label, if comprised, willThe described swf protection label that comprises anti-importing coded lock be inserted into described background color arrange label after; AsFruit does not comprise, and further judges in described N swf initial labels whether comprise XMP metadata tag, asFruit comprises, and the described swf protection label that comprises anti-importing coded lock is inserted into described XMP metadata tagAfter; If do not comprised, the described swf protection label that comprises anti-importing coded lock is inserted into described NOptional position in individual swf initial labels. Wherein, label is set is SetBackgroundColor to background colorTAG; XMP metadata tag is MetadataTAG.
S36, described processing threads recombinate described swf header information and described N+1 swf label, obtainThe swf file that comprises anti-importing coded lock.
S4, described batch processing server timing judges in a described Y processing threads whether have idle thread, asFruit exists, and further judges whether to exist pending source swf file; If existed, by described idle lineJourney is re-assigned to described pending source swf file; If there is no, nullify described idle thread.
In the present invention, during to source swf file process, source file is added to the operation of anti-importing coded lock, andStore the operation in memory device into, carry out by identical processing threads, thereby can simplify system configurationComplexity, instruction simplifies the operation.
Insert swf protection label in the swf file of source after, when importing, FLASH developing instrument comprises swf protectionWhen the source swf file of label, comprise swf protection label as long as be resolved in the swf file of source, can stop immediatelyImport operation, thereby the problem of effectively protecting source swf file to be imported into without permission and to revise.
As shown in Figure 2, the present invention also provides a kind of batch to the device that adds anti-importing coded lock in swf file,It is characterized in that, comprising:
Receiver module, for receive client upload X source swf file and need to be to described source swf fileThe anti-importing coded lock information of middle interpolation; Wherein, X >=1, X is integer;
Creation module, for according to current internal storage state and need described source to be processed swf quantity of documents, createsY processing threads;
Distribution module, distributes to described receiver module for Y the processing threads that described creation module is created and connectsDescribed X the source swf file of receiving; Wherein, Y >=1, Y is integer;
Control module, described in controlling that described processing threads that described creation module creates is responsible for selfSource swf file is carried out following operation: described processing threads adds and described source swf literary composition in the swf file of described sourceThe described anti-importing coded lock information that part is corresponding, obtains the swf file that comprises anti-importing coded lock;
Judge module, judges for timing whether a described Y processing threads exists idle thread; Also for working asWhen judgement obtains there is idle thread in a described Y processing threads, further judge whether to exist pending sourceSwf file;
Heavy distribution module, in the time that described judge module judgement obtains existing pending source swf file, by instituteState idle thread and be re-assigned to described pending source swf file;
Nullify module, in the time that described judge module judgement is not existed pending source swf file, nullifyDescribed idle thread.
Batch provided by the invention, to the method and apparatus that adds anti-importing coded lock in swf file, can be criticizedAmount efficiently adds anti-importing coded lock in multiple swf files, has anti-importing coded lock interpolation efficiency highAdvantage.
The above is only the preferred embodiment of the present invention, it should be pointed out that common for the artTechnical staff, under the premise without departing from the principles of the invention, can also make some improvements and modifications,These improvements and modifications also should be looked protection scope of the present invention.

Claims (6)

1. batch, to a method that adds anti-importing coded lock in swf file, is characterized in that, comprise withLower step:
S1, batch processing server receive client upload X source swf file and need to be to described source swfThe anti-importing coded lock information of adding in file; Wherein, X >=1, X is integer;
S2, described batch processing server is according to current internal storage state and need described source to be processed swf number of filesAmount, creates Y processing threads, then a described Y processing threads is distributed to described X source swf file; ItsIn, Y >=1, Y is integer;
S3, the described source swf file that processing threads is responsible for self described in described batch processing server controls is all heldThe following operation of row: described processing threads to add in the swf file of described source corresponding with described source swf file described inAnti-importing coded lock information, obtains the swf file that comprises anti-importing coded lock;
S4, described batch processing server timing judges in a described Y processing threads whether have idle thread, asFruit exists, and further judges whether to exist pending source swf file; If existed, by described idle lineJourney is re-assigned to described pending source swf file; If there is no, nullify described idle thread.
2. batch according to claim 1 is to the method that adds anti-importing coded lock in swf file, its spyLevy and be, S3 specifically comprises the following steps:
S31, described processing threads receives described source swf file and described anti-importing coded lock information; ThenJudge that whether described source swf file is compressed file, if so, carries out S32; Otherwise, directly carry out S33;
S32, the described processing threads described source swf file that decompresses, obtains the source swf file after decompress(ion), thenCarry out S33;
S33, described processing threads is resolved described source swf file, obtains the swf header information of described source swf file,And be positioned at described swf header information N swf initial labels below; Wherein, N >=1, N is integer;
S34, described processing threads generates swf protection label, and wherein, described swf protection label comprises data headAnd data volume; Then described anti-importing coded lock information S2 being obtained writes in described data volume, is wrappedContaining the swf protection label of anti-importing coded lock;
S35, the described swf protection label that comprises anti-importing coded lock is inserted into described N by described processing threadsIn swf initial labels, obtain N+1 swf label;
S36, described processing threads recombinate described swf header information and described N+1 swf label, obtainThe swf file that comprises anti-importing coded lock.
3. batch according to claim 2 is to the method that adds anti-importing coded lock in swf file, its spyLevy and be, described swf protection label is ProtectTAG.
4. batch according to claim 2 is to the method that adds anti-importing coded lock in swf file, its spyLevy and be, S35 is specially:
Described processing threads judges that in described N swf initial labels, whether comprising background color arranges label, asFruit comprises, and the described swf protection label that comprises anti-importing coded lock is inserted into described background color mark is setAfter signing; If do not comprised, further judge in described N swf initial labels whether comprise XMP unitData label, if comprised, described in the described swf protection label that comprises anti-importing coded lock being inserted intoAfter XMP metadata tag; If do not comprised, by the described swf protection mark that comprises anti-importing coded lockLabel are inserted into optional position in described N swf initial labels.
5. batch according to claim 4 is to the method that adds anti-importing coded lock in swf file, its spyLevy and be, it is SetBackgroundColorTAG that described background color arranges label; Described XMP metadataLabel is MetadataTAG.
6. batch, to a device that adds anti-importing coded lock in swf file, is characterized in that, comprising:
Receiver module, for receive client upload X source swf file and need to be to described source swf fileThe anti-importing coded lock information of middle interpolation; Wherein, X >=1, X is integer;
Creation module, for according to current internal storage state and need described source to be processed swf quantity of documents, createsY processing threads;
Distribution module, distributes to described receiver module for Y the processing threads that described creation module is created and connectsDescribed X the source swf file of receiving; Wherein, Y >=1, Y is integer;
Control module, described in controlling that described processing threads that described creation module creates is responsible for selfSource swf file is carried out following operation: described processing threads adds and described source swf literary composition in the swf file of described sourceThe described anti-importing coded lock information that part is corresponding, obtains the swf file that comprises anti-importing coded lock;
Judge module, judges for timing whether a described Y processing threads exists idle thread; Also for working asWhen judgement obtains there is idle thread in a described Y processing threads, further judge whether to exist pending sourceSwf file;
Heavy distribution module, in the time that described judge module judgement obtains existing pending source swf file, by instituteState idle thread and be re-assigned to described pending source swf file;
Nullify module, in the time that described judge module judgement is not existed pending source swf file, nullifyDescribed idle thread.
CN201310168413.6A 2013-05-09 2013-05-09 In batches to the method and apparatus that adds anti-importing coded lock in swf file Active CN103279501B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310168413.6A CN103279501B (en) 2013-05-09 2013-05-09 In batches to the method and apparatus that adds anti-importing coded lock in swf file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310168413.6A CN103279501B (en) 2013-05-09 2013-05-09 In batches to the method and apparatus that adds anti-importing coded lock in swf file

Publications (2)

Publication Number Publication Date
CN103279501A CN103279501A (en) 2013-09-04
CN103279501B true CN103279501B (en) 2016-05-11

Family

ID=49062021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310168413.6A Active CN103279501B (en) 2013-05-09 2013-05-09 In batches to the method and apparatus that adds anti-importing coded lock in swf file

Country Status (1)

Country Link
CN (1) CN103279501B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107895107A (en) * 2017-12-21 2018-04-10 郑州云海信息技术有限公司 A kind of method and system of batch setting BMC username and passwords

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799673A (en) * 2012-07-17 2012-11-28 厦门游家网络有限公司 Method for volume compression of swf (shock wave flash) files
CN102883232A (en) * 2012-08-29 2013-01-16 四三九九网络股份有限公司 Method for adding watermarks in swf documents in batches and device thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5277434B2 (en) * 2007-12-17 2013-08-28 エヌエイチエヌ コーポレーション Content providing method and content providing system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799673A (en) * 2012-07-17 2012-11-28 厦门游家网络有限公司 Method for volume compression of swf (shock wave flash) files
CN102883232A (en) * 2012-08-29 2013-01-16 四三九九网络股份有限公司 Method for adding watermarks in swf documents in batches and device thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
用线程池解决服务器并发请求的方案设计;刘新强,曾兵义;《现代电子技术》;20110801(第34卷第5期);141-143页 *

Also Published As

Publication number Publication date
CN103279501A (en) 2013-09-04

Similar Documents

Publication Publication Date Title
CN108536761B (en) Report data query method and server
CN109740317A (en) A kind of digital finger-print based on block chain deposits card method and device
CN112052370A (en) Message generation method and device, electronic equipment and computer readable storage medium
CN110011788A (en) A kind of data processing method based on block chain, system and relevant device
CN109165266A (en) List generation method, device, computer equipment and storage medium
CN104077420B (en) Method and device for importing data into HBase database
CN114979120B (en) Data uploading method, device, equipment and storage medium
CN115080651A (en) Excel data import method and device, electronic equipment and storage medium
CN104732123A (en) Function operation authority control method based on JSON format
CN114398346A (en) Data migration method, device, equipment and storage medium
CN103279501B (en) In batches to the method and apparatus that adds anti-importing coded lock in swf file
CN114398282A (en) Test script generation method, device, equipment and storage medium
CN113468175A (en) Data compression method and device, electronic equipment and storage medium
US9442898B2 (en) Electronic document that inhibits automatic text extraction
CN102946311B (en) A kind of key process for dispersing that strengthens the security of symmetric key system
CN109408035B (en) Flow configuration method, storage medium and server of business system
CN114610305A (en) Development method and device of invisible webpage resources, electronic equipment and medium
CN113918517A (en) Multi-type file centralized management method, device, equipment and storage medium
CN104200139B (en) The generation method of instruction code in a kind of Java software watermark void method
CN103294539B (en) The method and apparatus of batch deciphering flash game
CN107870914A (en) A kind of method and apparatus for preventing that the page is tampered
CN103294772B (en) Method and device for replacing import preventive combination locks in swf (shock wave flash) files in batched manner
CN112686759A (en) Account checking monitoring method, device, equipment and medium
CN103390055A (en) File transmission method and system
US20150220956A1 (en) Creating Consumable Content with Embedded Codes, and Tracking use of Embedded Codes

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