CN103235733A - Method and device for parsing flash mini-game into byte code - Google Patents
Method and device for parsing flash mini-game into byte code Download PDFInfo
- Publication number
- CN103235733A CN103235733A CN2013101422932A CN201310142293A CN103235733A CN 103235733 A CN103235733 A CN 103235733A CN 2013101422932 A CN2013101422932 A CN 2013101422932A CN 201310142293 A CN201310142293 A CN 201310142293A CN 103235733 A CN103235733 A CN 103235733A
- Authority
- CN
- China
- Prior art keywords
- service end
- byte code
- client
- php
- java
- 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.)
- Granted
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to the technical field of games and particularly discloses a method and a device for parsing a flash mini-game into a byte code. The method for parsing the flash mini-game into the byte code comprises: a client-side uploads swf (Small Web Format) files and sends an ajax (Asynchronous JavaScript and XML (eXtensible Markup Language) ) request to a php (Hypertext Preprocessor) server-side every time a swf file uploading is completed; every time the php server-side obtains the ajax request, a tcp (Transmission Control Protocol) client-side is temporarily created, the tcp client-side sends a socket message to a java server-side, the java server-side creates a thread to parse the socket message into the byte code and packages the byte code into a zip file; then the java server-side sends the zip file to the php server-side; the php server-side generates a chained address which is the download link of the zip file; and the client-side downloads the zip file. According to the method and the device for parsing the flash mini-game into the byte code, a user can easily, conveniently and quickly parse the byte code of the swf files in batches, and the user can directly obtain the byte code without the loss of CPU (Central Processing Unit) resources of the user.
Description
Technical field
The present invention relates to game technical field, especially relating to a kind of batch parsing flash trivial games is the method and apparatus of byte code.
Background technology
The Flash recreation is a kind of game form of new rise, it is simple to play, easy to operate, green, need not to install, volume is little, propagation is fast, picture is attractive in appearance etc., and advantage enjoys liking of numerous online friends, the flash trivial games is in the Flash recreation again, because the flash recreation is mainly used on the recreation some interest and appeals, small-sized, bring into play it fully based on the advantage of polar plot.
Client can not directly be played to Flash and be read or operate, and needs just to read or operate by after reader or the player parsing, and this process is exactly that Flash resolves.The general format of Flash is the swf file layout, and computing machine is identified by the code code that reads in the swf file.
Flash recreation is resolved and is adopted Swf Reader in the prior art, and Swf Reader is the code analysis of being write by Java, can parse the byte code in the swf file, but has the parse operation that can only realize single swf file, the defective of can not mass resolving.
Summary of the invention
It is the method and apparatus of byte code that technical matters solved by the invention provides a kind of batch parsing flash trivial games, allow the user can parse the byte code of swf file quickly and easily in batches, and the user needn't loss self cpu resource, just can directly obtain byte code.
In order to solve the problems of the technologies described above, the invention provides a kind of batch parsing flash trivial games is the method for byte code, comprising:
Step 1: client is uploaded swf file or single swf file in batches by the web service end;
Step 2: whenever upload a described swf file and finish, described web service end sends an ajax request to the php service end;
Step 2: when described php service end whenever obtains a described ajax request, just create a tcp client temporarily, described ajax request is positioned over described tcp client, described tcp client writes socket with the filename that described ajax request comprises, described tcp client sends the information of described socket to the java service end, and the information of described socket comprises the specified path of byte code behind the decompress(ion);
Step 4: described java service end is after receiving the information of described socket, described java service end is opened the information of described socket, described java service end is created the information that a thread received and resolved described socket then, described java service end is byte code with the information analysis of described socket, described java service end leaves described byte code in the described specified path of described byte code, described java service end finishes described thread again with the described byte code compression of described specified path and be packaged into z ip file then;
Step 5: described java service end is given described php service end with described zip file transfer;
Step 6: described php service end is responded described ajax request and is generated the chained address, and described chained address is the download address of described zip file;
Step 7: described client is downloaded described zip file according to the described chained address that described php service end generates.
Preferably, described client comprises that mobile phone, personal computer, panel computer or other and website are obtained and communicates by letter and dispose the hardware of playing the swf file (for example: processor) device and software (for example: FLASH software, browser and windows operating system etc.) install.
Simultaneously, it is the device of byte code that the present invention also provides a kind of batch to resolve the flash trivial games, comprising: client, web service end, php service end, tcp client and java service end; Described client links to each other with described php service end with described web service end respectively, described web service end links to each other with described php service end, described php service end links to each other with described tcp client, described tcp client links to each other with described java service end, and described java service end links to each other with described php service end.
Preferably, described php service end also comprises display device.
More preferably, described display device also directly links to each other with described client.
The present invention compared with prior art has following beneficial effect:
The invention provides a kind of batch parsing flash trivial games is the method and apparatus of byte code, allow the user can parse the byte code of swf file quickly and easily in batches, and the user needn't loss self cpu resource, just can directly obtain byte code, have convenient, fast, intelligent, mass, characteristics that efficient is high.
Description of drawings
Fig. 1 exemplarily shows and resolves the method flow diagram that the flash trivial games is byte code in batches;
Fig. 2 exemplarily shows and resolves the apparatus structure synoptic diagram that the flash trivial games is byte code in batches;
Fig. 3 shows exemplarily that the web service end is uploaded and php service end background authentication processing flow chart;
Fig. 4 exemplarily shows php service end and java service end interaction diagrams.
Embodiment
For the technical scheme of understanding technical matters solved by the invention better, providing, below in conjunction with drawings and Examples, the present invention is further elaborated.Specific embodiment described herein is only in order to explaining enforcement of the present invention, but and is not used in restriction the present invention.
Fig. 1 exemplarily shows and resolves the method flow that the flash trivial games is byte code in batches;
S1: client is uploaded swf file or single swf file in batches by the web service end;
S2: as shown in Figure 3, whenever upload a described swf file and finish, described web service end sends an ajax request to the php service end;
S3: as Fig. 3~shown in Figure 4, when described php service end whenever obtains a described ajax request, just create a tcp client temporarily, described ajax request is positioned over described tcp client, described tcp client writes socket with the filename that described ajax request comprises, described tcp client sends the information of described socket to the java service end, and the information of described socket comprises the specified path of byte code behind the decompress(ion);
S4: as shown in Figure 4, described java service end is after receiving the information of described socket, described java service end is opened the information of described socket, described java service end is created the information that a thread received and resolved described socket then, described java service end is byte code with the information analysis of described socket, described java service end leaves described byte code in the described specified path of described byte code, described java service end finishes described thread again with the described byte code compression of described specified path and be packaged into the zip file then;
S5: described java service end is given described php service end with described zip file transfer;
S6: as shown in Figure 3, described php service end is responded described ajax request and is generated the chained address, and described chained address is the download address of described zip file;
S7: described client is downloaded described zip file according to the described chained address that described php service end generates.
In a preferred embodiment, described client comprise mobile phone, personal computer, panel computer or other and website obtain communicate by letter and dispose the hardware unit of playing the swf file (for example: processor) and software (for example: FLASH software, browser and windows operating system etc.) install.
Fig. 2 exemplarily shows in batches and resolves the apparatus structure synoptic diagram that the flash trivial games is byte code, comprising: client 1, web service end 2, php service end 3, tcp client 4 and java service end 5; Described client 1 links to each other with described php service end 3 with described web service end 2 respectively, described web service end 2 links to each other with described php service end 3, described php service end 3 links to each other with described tcp client 4, described tcp client 4 links to each other with described java service end 5, and described java service end 5 links to each other with described php service end 3.
In a preferred embodiment, described php service end 3 also comprises display device 6.
In the embodiment that is more preferably, described display device 6 also directly links to each other with described client 1.
Specific embodiment:
The user opens web service end 2; The swf file that described user will resolve is pulled the framework of uploading of web service end 2 into; Described web service end 2 is uploaded described swf file; Whenever upload a described swf file and finish, described web service end 2 sends an ajax request to described php service end 3; When described php service end 3 whenever obtains a described ajax request, just create a tcp client 4 temporarily, described ajax request is positioned over described tcp client 4, described tcp client 4 writes socket with the filename that described ajax request comprises, the information that described tcp client 4 sends described socket is to java service end 5, and the information of described socket comprises the specified path of byte code behind the decompress(ion); Described java service end 5 is after receiving the information of described socket; Described java service end 5 is opened the information of described socket, described java service end 5 is created the information that a thread received and resolved described socket then, described java service end 5 resolves to byte code with the information backstage of described socket, described java service end 5 leaves described byte code in the described specified path of described byte code, described java service end 5 finishes described thread again with the described byte code compression of described specified path and be packaged into the zip file then; Described java service end 5 is given described php service end 3 with described zip file transfer; Described php service end 3 is responded described ajax request and is generated the chained address, and described chained address is the download address of described zip file; Described user downloads described zip file according to described chained address; Download the back at the described zip file of local decompress(ion), namely can read the described swf file that to resolve; The user both can resolve single described swf file, also can carry out batch to a plurality of described swf files and resolve.
More than by the detailed description of concrete and preferred embodiment the present invention; but those skilled in the art should be understood that; the present invention is not limited to the above embodiment; all within ultimate principle of the present invention; any modification of doing, make up and be equal to replacement etc., all be included within protection scope of the present invention.
Claims (5)
1. a batch is resolved the method that the flash trivial games is byte code, it is characterized in that, comprising:
Step 1: client is uploaded swf file or single swf file in batches by the web service end;
Step 2: whenever upload a described swf file and finish, described web service end sends an ajax request to the php service end;
Step 3: when described php service end whenever obtains a described ajax request, just create a tcp client temporarily, described ajax request is positioned over described tcp client, described tcp client writes socket with the filename that described ajax request comprises, described tcp client sends the information of described socket to the java service end, and the information of described socket comprises the specified path of byte code behind the decompress(ion);
Step 4: described java service end is after receiving the information of described socket, described java service end is opened the information of described socket, described java service end is created the information that a thread received and resolved described socket then, described java service end is byte code with the information analysis of described socket, described java service end leaves described byte code in the described specified path of described byte code, described java service end finishes described thread again with the described byte code compression of described specified path and be packaged into the zip file then;
Step 5: described java service end is given described php service end with described zip file transfer;
Step 6: described php service end is responded described ajax request and is generated the chained address, and described chained address is the download address of described zip file;
Step 7: described client is downloaded described zip file according to the described chained address that described php service end generates.
2. batch parsing flash trivial games according to claim 1 is the method for byte code, it is characterized in that described client comprises that mobile phone, personal computer, panel computer or other and website are obtained and communicates by letter and dispose hardware unit and the software service of playing the swf file.
3. a batch is resolved the device that the flash trivial games is byte code, it is characterized in that, comprising: client, web service end, php service end, tcp client and java service end; Described client links to each other with described php service end with described web service end respectively, described web service end links to each other with described php service end, described php service end links to each other with described tcp client, described tcp client links to each other with described java service end, and described java service end links to each other with described php service end.
4. batch parsing flash trivial games according to claim 3 is the device of byte code, it is characterized in that described php service end also comprises display device.
5. be the device of byte code according to claim 3 and 4 described batches parsing flash trivial games, it is characterized in that described display device also directly links to each other with described client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310142293.2A CN103235733B (en) | 2013-04-22 | 2013-04-22 | A kind of batch resolves the method and apparatus that flash trivial games is byte code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310142293.2A CN103235733B (en) | 2013-04-22 | 2013-04-22 | A kind of batch resolves the method and apparatus that flash trivial games is byte code |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103235733A true CN103235733A (en) | 2013-08-07 |
CN103235733B CN103235733B (en) | 2015-12-02 |
Family
ID=48883778
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310142293.2A Active CN103235733B (en) | 2013-04-22 | 2013-04-22 | A kind of batch resolves the method and apparatus that flash trivial games is byte code |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103235733B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104978182B (en) * | 2014-10-15 | 2018-05-22 | 武汉安天信息技术有限责任公司 | A kind of method and system that jar file is parsed into java |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100262952A1 (en) * | 2005-03-11 | 2010-10-14 | Aptana Incorporated | System And Method For Creating Target Byte Code |
CN102185877A (en) * | 2011-01-31 | 2011-09-14 | 北京开心人信息技术有限公司 | Method and system for displaying FLASH downloading progress on webpage in real time |
CN102592080A (en) * | 2011-12-26 | 2012-07-18 | 北京奇虎科技有限公司 | Flash malicious file detection method and flash malicious file detection device |
CN102902525A (en) * | 2012-08-29 | 2013-01-30 | 四三九九网络股份有限公司 | Method and device for modifying frame frequency of small web format (swf) files in batches |
-
2013
- 2013-04-22 CN CN201310142293.2A patent/CN103235733B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100262952A1 (en) * | 2005-03-11 | 2010-10-14 | Aptana Incorporated | System And Method For Creating Target Byte Code |
CN102185877A (en) * | 2011-01-31 | 2011-09-14 | 北京开心人信息技术有限公司 | Method and system for displaying FLASH downloading progress on webpage in real time |
CN102592080A (en) * | 2011-12-26 | 2012-07-18 | 北京奇虎科技有限公司 | Flash malicious file detection method and flash malicious file detection device |
CN102902525A (en) * | 2012-08-29 | 2013-01-30 | 四三九九网络股份有限公司 | Method and device for modifying frame frequency of small web format (swf) files in batches |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104978182B (en) * | 2014-10-15 | 2018-05-22 | 武汉安天信息技术有限责任公司 | A kind of method and system that jar file is parsed into java |
Also Published As
Publication number | Publication date |
---|---|
CN103235733B (en) | 2015-12-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11213743B2 (en) | Method, system and electronic device for achieving remote control of computer game by game controller | |
US9937414B2 (en) | Methods and apparatus for remote updates | |
KR101412765B1 (en) | Multi-phased and partitioned content preparation and delivery | |
US8150914B1 (en) | Simultaneous download of application file portions | |
EP3465467A1 (en) | Web page accelerations for web application hosted in native mobile application | |
US20120226738A1 (en) | Simultaneous download of application file portions | |
US8549069B1 (en) | Validation of device activity via logic sharing | |
TW201235072A (en) | Method and apparatus for gaming based on mobile terminal | |
CN103747074B (en) | mobile monitoring system based on Web server | |
JP5132825B1 (en) | Game management server device, game management server device program, and terminal device program | |
CN109962972B (en) | Offline packet reassembly method and system | |
CN104573040B (en) | Capture the method and system of web data | |
CN103235733A (en) | Method and device for parsing flash mini-game into byte code | |
JP5891325B2 (en) | Information providing apparatus, information providing method, and program | |
CN103235732A (en) | Method and device for parsing ActionScript of flash mini-games in batches | |
KR20140130352A (en) | Method, System and Computer-readable Storage Medium of On-Line Game on the base of Simultaneous Log-in to a Unique Account ID of the plural Game Terminals | |
US10391403B2 (en) | Game extensions in a gaming environment | |
WO2014065405A1 (en) | Web-server device and program-distribution method | |
WO2014134931A1 (en) | Application processing method and device | |
CN108234578A (en) | A kind of method and device of push | |
Eke | WAP, HTTP and HTML5 Web Socket Architecture Analysis in Contemporary Mobile App Development | |
KR20240114322A (en) | Method, computer device, and computer program to deliver message using cdn | |
WO2024060874A1 (en) | Device upgrading method, system, and apparatus, and computer-readable storage medium | |
CN102609629A (en) | Method and device for batch manufacturing medal games in flash game | |
CN103873606B (en) | Terminal equipment and input resource issuing method thereof |
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 |