CN103294538B - Prevent from swf file importing the method and device that coded lock batch de is removed - Google Patents
Prevent from swf file importing the method and device that coded lock batch de is removed Download PDFInfo
- Publication number
- CN103294538B CN103294538B CN201310168384.3A CN201310168384A CN103294538B CN 103294538 B CN103294538 B CN 103294538B CN 201310168384 A CN201310168384 A CN 201310168384A CN 103294538 B CN103294538 B CN 103294538B
- Authority
- CN
- China
- Prior art keywords
- swf
- thread
- swf file
- source
- 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
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Document Processing Apparatus (AREA)
- Storage Device Security (AREA)
Abstract
The present invention provides to be prevented from a kind of swf file importing the method and device that coded lock batch de is removed, and method includes:The source swf file that batch server control process thread is responsible for itself is performed both by following operation:Process thread and judge whether comprise in the source swf file itself being responsible for prevent from importing coded lock;If do not comprised, directly source swf file being stored in storage device, then, processing thread and being changed into idle thread;If comprised, comprise in the swf file of process thread deletion source prevents importing coded lock, and the source swf file then not comprised to prevent from importing coded lock stores in storage device, then, processes thread and is changed into idle thread.Can batch de remove multiple swf files in anti-importing coded lock, have the advantages that anti-importing coded lock removal efficiency high.
Description
Technical field
The invention belongs to field of computer technology is and in particular to prevent importing coded lock batch de from removing in a kind of swf file
Method and device.
Background technology
Swf (shock wave flash) is the professional format of animation software Flash, is a kind of support vector and point
The Animation File Format of system of battle formations shape, is widely used in the fields such as webpage design, cartoon making.
In prior art, the flash that is published on website game usually by added with preventing from importing coded lock, thus limiting no
Method is modified to flash game or is improved, and therefore, very inconvenient player carries out flash game, limits flash game
Popularization.
Content of the invention
The defect existing for prior art, the present invention provides prevents importing coded lock batch de from removing in a kind of swf file
Method and device, can batch de remove multiple swf files in anti-importing coded lock, have anti-importing coded lock removal efficiency
High advantage.
The technical solution used in the present invention is as follows:
The present invention provides to be prevented from a kind of swf file importing the method that coded lock batch de is removed, and comprises the following steps:
S1, batch server receives X source swf file of client upload;Wherein, X >=1, X is integer;
S2, described batch server according to current memory state and needs described source to be processed swf quantity of documents, creates
Then described Y process thread distributed to described X source swf file by Y process thread;Wherein, Y >=1, Y is integer;
S3, described batch server controls the described thread described source swf file responsible to itself that process to be performed both by down
Row operation:The described thread that processes judges whether comprise in the described source swf file itself being responsible for prevent from importing coded lock;If no
Comprise, then directly described source swf file is stored in storage device, then, described process thread is changed into idle thread;As
Fruit comprises, and comprise in the swf file of described process thread deletion described source prevents importing coded lock, then will not comprise to prevent from leading
The described source swf file entering coded lock stores in storage device, and then, described process thread is changed into idle thread;
S4, described batch server timing judges that described Y processes with the presence or absence of idle thread in thread, if deposited
Then further determining whether there is pending source swf file;If it is present described idle thread is re-assigned to described
Pending source swf file;If it does not exist, then nullifying described idle thread.
Preferably, S3 specifically includes following steps:
S31, described process thread judges whether the described source swf file that itself is responsible for is compressed file, if it is, holding
Row S32;Otherwise, directly execute S33;
S32, described process thread decompresses described source swf file, the source swf file after being decompressed, and then executes
S33;
S33, described process thread parses described source swf file, obtains the swf header information of described source swf file, and
N number of swf initial labels after described swf header information;Wherein, N >=1, N is integer;
S34, described process thread judges whether comprise swf protection label in described N number of swf initial labels;If comprised,
Then directly delete described swf and protect label;Then execute S35;Otherwise, directly execute S36;Wherein, in described swf protection label
Carry and prevent from importing coded lock;
S35, the described process thread described swf header information of restructuring and remaining N-1 swf initial labels, obtain not
Comprise the swf file preventing from importing coded lock, terminate flow process;
S36, the described process thread described swf header information of restructuring and described N number of swf initial labels, re-generate described
Source swf file.
Preferably, described swf protection label is Protect TAG.
The present invention also provides to be prevented from a kind of swf file importing the device that coded lock batch de is removed, including:
Receiver module, for receiving X source swf file of client upload;Wherein, X >=1, X is integer;
Creation module, at according to current memory state and need described source to be processed swf quantity of documents, creating Y
Reason thread;
Distribute module, the Y process thread for creating described creation module is distributed to described receiver module and is received
Described X source swf file;Wherein, Y >=1, Y is integer;
Control module, the described source swf that the described process thread for controlling described creation module to create is responsible for itself
File executes following operation:Described process thread judge whether to comprise to prevent in the described source swf file itself being responsible for import close
Code lock;If do not comprised, directly described source swf file is stored in storage device, then, described process thread is changed into
Idle thread;If comprised, comprise in the swf file of described process thread deletion described source prevents importing coded lock, then will
The described source swf file not comprising to prevent from importing coded lock stores in storage device, and then, described process thread is changed into sky
Idle thread;
Judge module, whether there is idle thread for regularly judging described Y to process in thread;It is additionally operable to work as and judge
When there is idle thread in described Y process thread, further determine whether there is pending source swf file;
Reallocation module, for when described judge module judges to obtain existing pending source swf file, by the described free time
Thread is re-assigned to described pending source swf file;
Cancellation module, for when described judge module judges being there is not pending source swf file, nullifying described sky
Idle thread.
Beneficial effects of the present invention are as follows:
The present invention provides to be prevented from a kind of swf file importing the method and device that coded lock batch de is removed, being capable of batch de
Except the anti-importing coded lock in multiple swf files, have the advantages that anti-importing coded lock removal efficiency is high.
Brief description
Prevent from the swf file that Fig. 1 provides for the present invention importing the method flow schematic diagram that coded lock batch de is removed;
Prevent from the swf file that Fig. 2 provides for the present invention importing the apparatus structure schematic diagram that coded lock batch de is removed.
Specific embodiment
Below in conjunction with accompanying drawing, the present invention is described in detail:
As shown in figure 1, the present invention provides preventing from a kind of swf file importing the method removed of coded lock batch de, including with
Lower step:
S1, batch server receives X source swf file of client upload;Wherein, X >=1, X is integer;
S2, described batch server according to current memory state and needs described source to be processed swf quantity of documents, creates
Then described Y process thread distributed to described X source swf file by Y process thread;Wherein, Y >=1, Y is integer;
In this step, quantity Y processing thread is less than, is more than or equal to source swf quantity of documents X, specifically distinguishes following feelings
Condition:(1) if Y=X, for example, Y=X=5, then distribute to 5 source swf files by 5 process threads, by a process thread
It is responsible for a source swf file.(2) if Y is less than X, for example, Y=5, X=8, then first by 5 process 5 sources of thread process
Swf file, after certain processes thread process and finishes, reprocesses one of still untreated 3 source swf files, finally makes
The active swf file process of institute finishes.(3) if Y is more than X, for example, Y=5, X=3, then can make two or 3 threads are worked in coordination with
Process a source swf file.That is, in the present invention, for a source swf file, can be same by one or more threads
When process, thus improving treatment effeciency.
S3, described batch server controls the described thread described source swf file responsible to itself that process to be performed both by down
Row operation:The described thread that processes judges whether comprise in the described source swf file itself being responsible for prevent from importing coded lock;If no
Comprise, then directly described source swf file is stored in storage device, then, described process thread is changed into idle thread;As
Fruit comprises, and comprise in the swf file of described process thread deletion described source prevents importing coded lock, then will not comprise to prevent from leading
The described source swf file entering coded lock stores in storage device, and then, described process thread is changed into idle thread;
In the present invention, during to source swf file process, the operation preventing importing coded lock is removed to source file, and storage
Operation in storage device, processes thread execution by identical, such that it is able to the complexity of simplified system configuration, simplifies behaviour
Instruct.
This step specifically includes following steps:
S31, described process thread judges whether the described source swf file that itself is responsible for is compressed file, if it is, holding
Row S32;Otherwise, directly execute S33;
S32, described process thread decompresses described source swf file, the source swf file after being decompressed, and then executes
S33;
S33, described process thread parses described source swf file, obtains the swf header information of described source swf file, and
N number of swf initial labels after described swf header information;Wherein, N >=1, N is integer;
S34, described process thread judges whether comprise swf protection label in described N number of swf initial labels;If comprised,
Then directly delete described swf and protect label;Then execute S35;Otherwise, directly execute S36;Wherein, in described swf protection label
Carry and prevent from importing coded lock;Wherein, swf protection label can be Protect TAG.
S35, the described process thread described swf header information of restructuring and remaining N-1 swf initial labels, obtain not
Comprise the swf file preventing from importing coded lock, terminate flow process;
S36, the described process thread described swf header information of restructuring and described N number of swf initial labels, re-generate described
Source swf file.
S4, described batch server timing judges that described Y processes with the presence or absence of idle thread in thread, if deposited
Then further determining whether there is pending source swf file;If it is present described idle thread is re-assigned to described
Pending source swf file;If it does not exist, then nullifying described idle thread.
As shown in Fig. 2 the present invention also provides a kind of device preventing importing coded lock batch de from removing, including:
Receiver module, for receiving X source swf file of client upload;Wherein, X >=1, X is integer;
Creation module, at according to current memory state and need described source to be processed swf quantity of documents, creating Y
Reason thread;
Distribute module, the Y process thread for creating described creation module is distributed to described receiver module and is received
Described X source swf file;Wherein, Y >=1, Y is integer;
Control module, the described source swf that the described process thread for controlling described creation module to create is responsible for itself
File executes following operation:Described process thread judge whether to comprise to prevent in the described source swf file itself being responsible for import close
Code lock;If do not comprised, directly described source swf file is stored in storage device, then, described process thread is changed into
Idle thread;If comprised, comprise in the swf file of described process thread deletion described source prevents importing coded lock, then will
The described source swf file not comprising to prevent from importing coded lock stores in storage device, and then, described process thread is changed into sky
Idle thread;
Judge module, whether there is idle thread for regularly judging described Y to process in thread;It is additionally operable to work as and judge
When there is idle thread in described Y process thread, further determine whether there is pending source swf file;
Reallocation module, for when described judge module judges to obtain existing pending source swf file, by the described free time
Thread is re-assigned to described pending source swf file;
Cancellation module, for when described judge module judges being there is not pending source swf file, nullifying described sky
Idle thread.
Prevent from the swf file that the present invention provides importing the method and device that coded lock batch de is removed, can batch de remove
Anti- importing coded lock in multiple swf files, has the advantages that anti-importing coded lock removal efficiency is high.
The above is only the preferred embodiment of the present invention it is noted that ordinary skill people for the art
For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should
Depending on protection scope of the present invention.
Claims (3)
1. prevent the method that importing coded lock batch de is removed in a kind of swf file it is characterised in that comprising the following steps:
S1, batch server receives X source swf file of client upload;Wherein, X >=1, X is integer;
S2, described batch server according to current memory state and needs described source to be processed swf quantity of documents, creates Y
Process thread, then described Y process thread is distributed to described X source swf file;Wherein, Y >=1, Y is integer;
S3, described batch server controls the described thread described source swf file responsible to itself that process to be performed both by following behaviour
Make:The described thread that processes judges whether comprise in the described source swf file itself being responsible for prevent from importing coded lock;If do not wrapped
Contain, then directly described source swf file is stored in storage device, then, described process thread is changed into idle thread;If
Comprise, comprise in the swf file of described process thread deletion described source prevents importing coded lock, then will not comprise to prevent from importing
The described source swf file of coded lock stores in storage device, and then, described process thread is changed into idle thread;
S4, described batch server timing judges that described Y is processed with the presence or absence of idle thread in thread, if it is present
Further determine whether there is pending source swf file;If it is present described idle thread is re-assigned to described pending
Source swf file;If it does not exist, then nullifying described idle thread;
Wherein, S3 specifically includes following steps:
S31, described process thread judges whether the described source swf file that itself is responsible for is compressed file, if it is, execution
S32;Otherwise, directly execute S33;
S32, described process thread decompresses described source swf file, the source swf file after being decompressed, and then executes S33;
S33, described process thread parses described source swf file, obtains the swf header information of described source swf file, and is located at
Described swf header information N number of swf initial labels below;Wherein, N >=1, N is integer;
S34, described process thread judges whether comprise swf protection label in described N number of swf initial labels;If comprised, directly
Meet the described swf of deletion and protect label;Then execute S35;Otherwise, directly execute S36;Wherein, carry in described swf protection label
Prevent from importing coded lock;
S35, the described process thread described swf header information of restructuring and remaining N-1 swf initial labels, are not comprised
Prevent from importing the swf file of coded lock, terminate flow process;
S36, the described process thread described swf header information of restructuring and described N number of swf initial labels, re-generate described source
Swf file.
2. prevent from importing the method removed of coded lock batch de it is characterised in that institute in swf file according to claim 1
Stating swf protection label is Protect TAG.
3. prevent the device that importing coded lock batch de is removed in a kind of swf file it is characterised in that including:
Receiver module, for receiving X source swf file of client upload;Wherein, X >=1, X is integer;
Creation module, for according to current memory state and need described source to be processed swf quantity of documents, creating Y process line
Journey;
Distribute module, the Y process thread for creating described creation module distributes to the institute that described receiver module receives
State X source swf file;Wherein, Y >=1, Y is integer;
Control module, the described source swf file that the described process thread for controlling described creation module to create is responsible for itself
Execute following operation:The described thread that processes judges whether comprise in the described source swf file itself being responsible for prevent from importing coded lock;
If do not comprised, directly described source swf file is stored in storage device, then, described process thread is changed into the free time
Thread;If comprised, comprise in the swf file of described process thread deletion described source prevents importing coded lock, then will not wrap
Store in storage device containing the described source swf file preventing from importing coded lock, then, described process thread is changed into idle line
Journey;
Described control module specifically for:S31, described process thread judges whether the described source swf file that itself is responsible for is pressure
Contracting file, if it is, execution S32;Otherwise, directly execute S33;
S32, described process thread decompresses described source swf file, the source swf file after being decompressed, and then executes S33;
S33, described process thread parses described source swf file, obtains the swf header information of described source swf file, and is located at
Described swf header information N number of swf initial labels below;Wherein, N >=1, N is integer;
S34, described process thread judges whether comprise swf protection label in described N number of swf initial labels;If comprised, directly
Meet the described swf of deletion and protect label;Then execute S35;Otherwise, directly execute S36;Wherein, carry in described swf protection label
Prevent from importing coded lock;
S35, the described process thread described swf header information of restructuring and remaining N-1 swf initial labels, are not comprised
Prevent from importing the swf file of coded lock, terminate flow process;
S36, the described process thread described swf header information of restructuring and described N number of swf initial labels, re-generate described source
Swf file;
Judge module, whether there is idle thread for regularly judging described Y to process in thread;It is additionally operable to obtain institute when judgement
State Y to process in thread when there is idle thread, further determine whether there is pending source swf file;
Reallocation module, for when described judge module judges to obtain existing pending source swf file, by described idle thread
It is re-assigned to described pending source swf file;
Cancellation module, for when described judge module judges being there is not pending source swf file, nullifying described idle line
Journey.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310168384.3A CN103294538B (en) | 2013-05-09 | 2013-05-09 | Prevent from swf file importing the method and device that coded lock batch de is removed |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310168384.3A CN103294538B (en) | 2013-05-09 | 2013-05-09 | Prevent from swf file importing the method and device that coded lock batch de is removed |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103294538A CN103294538A (en) | 2013-09-11 |
CN103294538B true CN103294538B (en) | 2017-03-01 |
Family
ID=49095470
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310168384.3A Active CN103294538B (en) | 2013-05-09 | 2013-05-09 | Prevent from swf file importing the method and device that coded lock batch de is removed |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103294538B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101916276A (en) * | 2010-08-13 | 2010-12-15 | 北京新岸线网络技术有限公司 | Method, device and server for improving release of rich media file in network |
CN102752312A (en) * | 2012-07-17 | 2012-10-24 | 厦门游家网络有限公司 | Method for decompressing swf files in batches |
-
2013
- 2013-05-09 CN CN201310168384.3A patent/CN103294538B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101916276A (en) * | 2010-08-13 | 2010-12-15 | 北京新岸线网络技术有限公司 | Method, device and server for improving release of rich media file in network |
CN102752312A (en) * | 2012-07-17 | 2012-10-24 | 厦门游家网络有限公司 | Method for decompressing swf files in batches |
Non-Patent Citations (2)
Title |
---|
如何去除flash防导入密码;benny5609;《http://blog.csdn.net/benny5609/article/details/1893126》;20071119;第1-2页 * |
用线程池解决服务器并发请求的方案设计;刘新强等;《现代电子技术》;20110801;第34卷(第15期);第141-143页 * |
Also Published As
Publication number | Publication date |
---|---|
CN103294538A (en) | 2013-09-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104750620B (en) | A kind of internal memory migration method and device | |
CN105354049B (en) | A kind of resource loading method, the apparatus and system of tree-dimensional animation engine | |
CN104123280B (en) | File comparison method and equipment | |
US8434073B1 (en) | Systems and methods for preventing exploitation of byte sequences that violate compiler-generated alignment | |
CN104572679B (en) | Public sentiment data storage method and device | |
CN105446975B (en) | A kind of file packing method and device | |
CN106547624A (en) | Picture loading method and device based on Android | |
CN102870116A (en) | Method and apparatus for content matching | |
CN104375866B (en) | The driving update method and device of a kind of veneer | |
CN105320577B (en) | A kind of data backup and resume method, system and device | |
CN106020891A (en) | Page loading method and device | |
CN106776072A (en) | Information push method and system | |
CN102624545A (en) | Data backup method, data backup device, data recovery method and data recovery device of network management system | |
CN103294538B (en) | Prevent from swf file importing the method and device that coded lock batch de is removed | |
CN106527677A (en) | Method and device for interaction between VR/AR system and user | |
CN106897126A (en) | A kind of picture grasping means and server | |
CN104219271B (en) | Based on the asynchronous multiserver synchronous method for downloading the page of multithreading | |
CN106897052A (en) | APK file compression method and device | |
US20190213042A1 (en) | Java card application memory footprint optimization | |
CN105204883B (en) | A kind of plug-in unit loading processing method and device | |
CN107479960B (en) | Method and device for displaying unit view | |
CN102752312B (en) | Method for decompressing swf files in batches | |
CN103294772B (en) | Method and device for replacing import preventive combination locks in swf (shock wave flash) files in batched manner | |
CN103294539B (en) | The method and apparatus of batch deciphering flash game | |
CN108008984A (en) | A kind of resource file downloading updating method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |