Specific embodiment
According to presently filed embodiment, it is proposed that a kind of game data analysis, treating method and apparatus.
To enable present invention purpose, feature, advantage more obvious and understandable, below will
With reference to the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is described, it is clear that
Described embodiment is only some embodiments of the present application, and not all embodiments.Based on the application
In embodiment, the institute that those of ordinary skill in the art are obtained under the premise of creative work is not made
There is other embodiment, belong to the scope of the application protection.
Game data analysis, treating method and apparatus that the embodiment of the present application is provided, can apply to game
FTP client FTP.Described device can be positioned over game client system inside, or an independence
Entity and the game client system data cube computation, it is also possible to as with the game client system
The internals of the server system of network connection and exist, it is also possible to a part be arranged on game client
In system, a part be arranged on server system in, its specific implementation can be it is flexile,
Here is not limited.The game client can apply in all kinds of terminal devices, and the terminal sets
The standby including but not limited to terminal device such as computer, smart mobile phone, panel computer Pad, Intelligent worn device,
Here is not limited.
Fig. 1 is the game data analysis and process flow figure that the embodiment of the present application is provided, such as Fig. 1 institutes
Show, the game data analysis of the embodiment of the present application and processing method include:
S101, when game client system is started, by preset monitoring programme the game of loading is obtained
The information of data.
S102, analyzes the game data information, obtains analysis result.
S103, process is optimized according to the analysis result to the game client system.
Wherein, the monitoring programme is used to obtain the game number loaded during the startup game client system
According to information.The game data includes but is not limited to picture, word, numerical value, audio frequency, video, dynamic
The data such as picture.The information of the game data includes listed files, the game number of the game data
According to loading duration, the handling duration of the game data, in the processing sequence of the game data one
Plant or various.
When the application is implemented, the monitoring programme specifically (can again be properly termed as hook by hook
Subprogram) technology realization, system is changed by hook technologies and is called, game client system is linked into,
When main program, in the Basic API of call operation system, (English full name is Application Programming
Interface, Chinese full name is application programming interface) when, then replicated by preset monitoring programme
Portion records out, so as to obtain the details of the game data that system is loaded in start-up course.
After the information of the game data that loading is obtained by preset monitoring programme, that is, analyze the game data letter
Breath, and analysis result is obtained, and then the game client system is carried out according to the analysis result excellent
Change is processed.According to the difference of the information of the game data for obtaining, the analysis and process to the game data
Mode can be various.
Below by the application implement describe in detail it is following be only that the application is implemented when
The example of some embodiments, is not regarded as the restriction to the application.
In some embodiments, the step of the application still further comprises preset monitoring programme, the prison
Control program is used to obtain the game data information loaded during the startup game client system.
Wherein, as shown in Fig. 2 preset monitoring programme can comprise the following steps:
S201, obtains the entrance function of game client system main program.
When the application is implemented, the prison of the game data to loading can be realized by hook technologies
Control, acquisition.Wherein, hook is a platform of windows messaging treatment mechanism, and application program can be with
Subprogram is set above to monitor certain message of specified window, and the window for being monitored can be it
What his process was created.After message is reached, before target window process function it is processed.Hook machine
System allows application program to intercept and capture and processes windows message or particular event.Hook is actually a process
The program segment of message, is called by system, and it is linked into system.Whenever specific message sends, do not having
Before having arrival purpose window, hook program just first captures the message, that is, Hook Function first obtains control.
At this moment Hook Function i.e. can be with working process (change) message, it is also possible to does not deal with and continues transmission
The message, can also force the transmission of end.In this application, hook technologies are exactly applied,
The system of changing is called, and is linked into game client system, when main program is at the bottom of call operation system
During layer API, then portion is replicated by preset monitoring programme and record out, started so as to obtain system
During load game data details.
When implementing, it is necessary first to obtain the entrance function of game client system main program (for example
WinMain functions).Specifically, (English full name is Interactive can to pass through IDA
Disassembler, Chinese full name is interactive disassembler) file is opened, obtain WinMain functions
Address.As shown in figure 3, in the embodiment of the present application obtain entrance function an example, such as Fig. 3
Shown, entry address is 00586350.
S202, changes game client system master program file, in the game client master program file
Middle dynamic link library (DLL) file of the implantation comprising the monitoring programme.
After the entrance function for obtaining main program, you can to change game client system master program file,
And implantation includes the dll file of the monitoring programme in the game client master program file, is opening
During dynamic game client program, the dll file is loaded, you can opening to obtain to run monitoring programme
The information of the game data loaded during dynamic game client program.
When implementing, changing the operation of main journey file can be realized by binary tools, it is also possible to straight
Connected Ollydbg (dis-assembling) instruments to change, the method for modification is typically in the use one of tail of file
A kind of individual blank JMP (jump instruction) is realizing.Its effect can be the most end for jumping to main program,
With the execution sequence of reprogramming, the defence program for preventing main program runs.Then, will be including writing
Hook functions dll file implantation master program file in.Its major function is in game client system
Title, storing path, the time parameter information of the file are obtained when establishment file or reading file.Its
In, when time parameter can include creation time, read access time, operation process time, the modification of file
Between etc., specifically can be arranged as required to.As shown in figure 4, for an exemplary illustration of hook functions.
Monitoring programme is arranged after success, you can to start game client system, load preset monitoring journey
Sequence is obtaining the information of the game data of loading.In the game number that loading is obtained by preset monitoring programme
According to information when, you can with according to obtain the file title, storing path, time parameter information
Obtain listed files, the loading duration of the game data, the game data of the game data of loading
Handling duration, the processing sequence of the game data in one or more.
After the information of game data of loading is obtained by preset monitoring programme, you can with to the trip
The information of play data is analyzed, and obtains analysis result, and then according to the analysis result to the trip
Play FTP client FTP is optimized process.According to the difference of the information of the game data for obtaining, to the trip
The analysis of play data and processing mode can be various.
In a kind of possible implementation, when the information of the game data includes the game data of loading
Listed files when, the analysis game data information, obtaining analysis result includes:It is relatively more described
The title of each file in listed files, judges whether identical title;When judgement has identical name
During title, it is determined that there is game data when game client system is started to repeat to load.Illustrate,
When starting game client system, A files are loaded with the first stage, in second stage A is loaded with again
File, at this moment second stage loading A files are exactly unnecessary, that is, there is a problem of repeating load document.
In this application, due to obtaining all files that game data load phase is loaded by monitoring programme
List, therefore can pass through comparison document list in each file filename, judge whether identical
Filename.During if there is identical filename, it is determined that there is repetition loading, and carry out corresponding
Optimization processing.Specifically, when there is game data repetition loading when it is determined that starting game client system,
It is described process is optimized to the FTP client FTP according to the analysis result to include:By the game visitor
Family end system is configured to when first time the game data is loaded, and from local disk the game number is read
According to, and save it in internal memory, when the game data is loaded for the second time, directly read from internal memory
Take the game data.So, then system resource is saved without the need for repeating loading identical file, and
Improve data processing speed.
In the implementation of another possibility, when the information of the game data includes game data
During loading duration, the analysis game data information, obtaining analysis result includes:Judge what is obtained
Whether the loading duration of the game data is more than very first time threshold value;If it is, determining the game number
According to load time it is long.When implementing, very first time threshold value is rule of thumb set, when described first
Between threshold value be load game data reasonable duration, if the load time exceed very first time threshold value, table
The bright load time is long.At this moment, then process can be optimized to the game data for loading.
Usually, the factor for causing the game data load time long can include:Data memory format is not
Rationally, (reading manner) unreasonable, data are without pretreatment etc. in data loading source.It is determined that institute
State game data load time it is long when, it is described according to the analysis result to the game client system
System be optimized process include it is set forth below in one kind or arbitrarily combination:
(1) change the storage format of the game data, the game data is stored into into capacity little
Form.Because the storage format of picture is different, its capacity is different.Can be by the specific applied field of analysis
Scape, by data storage into different forms.Illustrate, similarly for image data, some applied fields
Scape is higher to picture quality requirement, then need the form that picture is stored into high definition;Some application scenarios pair
Picture quality is less demanding, then picture can be stored into into the less form of common, capacity.According to point
Analysis result, thus it is possible to vary the storage format of partial game data, stores into capacity little by the game data
Form, to reduce the load time, improve data treatment effeciency.
(2) change the reading manner of the game data, the game data is configured to from local text
Digital independent is carried out in part server or local game installation kit.The loading source of data or reading side
Formula is unreasonable, is also the key factor for causing the data load time long.At this moment, can be by partial data
The mode read from network is configured to, by partial game data configuration into from local file server or originally
Digital independent is carried out in ground game installation kit.As such, it is possible to effectively reduce the data load time, system is improved
System data-handling efficiency.
(3) game data is compressed.Partial data is loaded without overcompression, is also to cause number
According to the load time it is long the reason for.Therefore, it can the process such as be compressed, sort to loading data in advance.
In having a kind of possible implementation, when the information of the game data includes the place of game data
During reason duration, the analysis game data information, obtaining analysis result includes:Judge the institute for obtaining
The handling duration of game data is stated whether more than the second time threshold;If it is, determining the game data
Process time it is long.Second time threshold is rule of thumb set, and second time threshold is swum to process
The reasonable duration of play data, if process time is more than the second time threshold, shows that process time is long.
At this moment, then process can be optimized to the game data for processing.
Usually, the long factor of game data process time is caused to include:Data are untreated,
The data structure of processing data, process logic, algorithm are unreasonable, the input and output of data, reading manner
It is unreasonable etc..Therefore, according to above-mentioned factor, when it is determined that the process time of the game data is long,
It is described according to the analysis result to the game client system be optimized process include it is set forth below in
One kind or arbitrarily combine:
(1) game data is pre-processed, the pretreatment includes entering the game data
Row sequence, compression or form conversion.Illustrate, if data are looked into without sequence from file
Data are looked for consume very many times, after being ranked up to data, searching data will become more
Easily.Therefore, when pre-processing to game data, data can be ranked up with process.Additionally,
If game data is saved into various different forms, it will cause reading, the difficult treatment of file,
Need to convert thereof into reference format and processed again, thereby result in process time long.In this application,
In advance the file of noncanonical format can be converted into into the file of reference format, for example, file be preserved into into mark
Accurate XML file, so, when game client system is started, processing data will become more easy,
Effectively reduce the process time of data.Similarly, data are compressed, it is also possible to effectively reduce number
According to process time.Certainly, this is only the exemplary illustration pre-processed to data, and other are to data
The mode for being pre-processed is also contained in the application, and here is not limited.
(2) performance optimization processing, the performance optimization processing bag are carried out to the game client system
Include and optimize the data structure of the game client system, process logic or algorithm.When implementing,
Data structure is unreasonable to be also to cause a factor of data processing time length.Therefore, it can by optimization
Data result reduces data processing time.Additionally, the algorithm, process logic to system is optimized,
The process time of data can be reduced.
(3) data processing sequence of the game client system is adjusted.By adjusting data
Processing sequence, it will the effective data-handling efficiency of lift system.
(4) data input output to the game client system, storage mode, reading manner enter
Row optimization processing.Illustrate, the reading manner of data is to read from internal memory or read from network
The data-handling efficiency of system will all be affected.At this moment, it is possible to by the reading manner of configuration data,
Partial data is configured to read from internal memory, partial data is configured to be read from network.Additionally, also
Conventional partial data can be configured to memory-resident, other data just can after processing is completed i.e. from
Delete in internal memory.Specific optimization method can be flexile, as long as the process of data can be improved
Efficiency.
In another possible implementation, when the information of the game data includes the game number of loading
According to listed files when, the analysis game data information, obtaining analysis result includes:When described
When the information of game data includes the listed files of the game data of loading, according to each text of the listed files
The attribute of part determines whether each file is the necessary file for starting the game client system;If there is
At least one file is not the necessary file for starting the game client system, it is determined that the game number
It is unreasonable according to loading.When implementing, by the listed files of analysis loading, analyze which file is
It is no to load when must start up the stage, where loaded after whether file can start, for example, A files
Have to when being and start plus use, that is just loaded in startup stage, B files just can be used after startup,
B files can be thus allowed to be not loaded with when starting.In this manner it is possible to distinguish which file is
Start the necessary file of the game client system, which is not to start the game client system
Necessary file.It is not the necessary file for starting the game client system if there is at least individual file,
Then determine that the game data loading is unreasonable.
When it is determined that the game data loading it is unreasonable when, it is described according to the analysis result to the game
FTP client FTP is optimized process to be included:Necessary listed files is created, the necessary listed files includes
Start the necessary file of the game client system;The game client is configured to described in startup
During game client system, the game data corresponding to the file in the necessary listed files is only loaded.
In this manner it is possible to only load necessary file in startup stage, the data volume of loading is effectively reduced, carried
High system data processing speed and efficiency.
As shown in figure 5, a kind of game data analysis provided for the application and processing meanss schematic diagram, institute
State device 500 to be applied in game client system, described device includes:
Data capture unit 501, for when the game client system is started, by preset monitoring
Program obtains the information of the game data of loading;The information of the game data includes the game data
Listed files, the loading duration of the game data, the handling duration of the game data, the game
One or more in the processing sequence of data;
Data analysis unit 502, for analyzing the game data information, obtains analysis result;
Data processing unit 503, it is excellent for being carried out to the game client system according to the analysis result
Change is processed.
Wherein, described device also includes:
Preset unit, for preset monitoring programme, the monitoring programme is used to obtain the startup game visitor
The game data information loaded during the end system of family.
Wherein, the preset unit is specifically included:
Subelement is obtained, for obtaining the entrance function of game client system main program;
Modification subelement, for changing game client system master program file so that the monitoring programme
Obtain in game client system establishment file or when reading file the title of the file, storing path,
Time parameter information;
The data capture unit specifically for:
Title, storing path, the game of time parameter acquisition of information loading according to the file for obtaining
The listed files of data, the loading duration of the game data, the handling duration of the game data, institute
State one or more in the processing sequence of game data.
Wherein, the data analysis unit includes:
First data analysis subelement, for including the game data of loading when the information of the game data
Listed files when, the title of each file, judges whether identical name in the comparison listed files
Claim;When judging to there is identical title, it is determined that there is game data when game client system is started
Repeat to load.
Wherein, the data processing unit includes:
First data processing subelement, for there is game data when it is determined that starting game client system
When repeating to load, the game client system is configured to when first time the game data is loaded,
The game data is read from local disk, and is saved it in internal memory, the trip is being loaded for the second time
During play data, the game data is directly read from internal memory.
The data analysis unit includes:
Second data analysis subelement, for including the game data of loading when the information of the game data
Listed files when, according to the attribute of each file of the listed files determine each file be whether start described in
The necessary file of game client system;It is not to start the game client if there is at least one file
The necessary file of end system, it is determined that the game data loading is unreasonable.
14th, device according to claim 13, it is characterised in that the data processing unit includes:
Second data processing subelement, for when it is determined that game data loading is unreasonable, establishment must
Listed files, the necessary listed files is wanted to include starting the necessary file of the game client system;
The game client is configured to, when the game client system is started, only to load the necessary text
The game data corresponding to file in part list.
Wherein, the data analysis unit includes:
3rd data analysis subelement, for judging whether the loading duration of the game data of acquisition is big
In very first time threshold value;If it is, determining that the load time of the game data is long.
Wherein, the data processing unit include it is set forth below in one kind or arbitrarily combine:
3rd data processing subelement, for when it is determined that the load time of the game data is long, changing
Become the storage format of the game data, the game data is stored into into the little form of capacity;
4th data processing subelement, for when it is determined that the load time of the game data is long, changing
Become the reading manner of the game data, the game data is configured to from local file server or
Digital independent is carried out in local game installation kit;
5th data processing subelement, for when it is determined that the load time of the game data is long, pressing
Contract the game data.
Wherein, the data analysis unit includes:
4th data analysis subelement, for judging whether the handling duration of the game data of acquisition is big
In the second time threshold;If it is, determining that the process time of the game data is long.
Wherein, the data processing unit include it is set forth below in one kind or arbitrarily combine:
6th processes subelement, for when it is determined that the process time of the game data is long, to described
Game data is pre-processed, the pretreatment includes being ranked up the game data, compress or
Form is changed;
7th processes subelement, for when it is determined that the process time of the game data is long, to described
Game client system carries out performance optimization processing, and the performance optimization processing includes the optimization game visitor
The data structure of family end system, process logic or algorithm;
8th processes subelement, for when it is determined that the process time of the game data is long, to described
The data processing sequence of game client system is adjusted;
9th processes subelement, for when it is determined that the process time of the game data is long, to described
The data input output of game client system is optimized process.
The function of above-mentioned each unit may correspond to the above-mentioned game data analysis of Fig. 1 detailed descriptions and process side
The process step of method, repeats no more in this.
Game data analysis, treating method and apparatus that the embodiment of the present application is provided, can pass through preset
Monitoring programme obtains the information for starting the game data loaded during game client system, it is possible to analyze institute
Game data information is stated, analysis result is obtained, according to the analysis result to the game client system
Process is optimized, so as to reduce game client system starting time, system resource waste is reduced,
System data treatment effeciency is improve, Consumer's Experience is improved.
Professional should further appreciate that, with reference to the embodiments described herein description
The unit and algorithm steps of each example, can be come with electronic hardware, computer software or the combination of the two
Realize, in order to clearly demonstrate the interchangeability of hardware and software, in the above description according to function
Generally describe the composition and step of each example.These functions are come with hardware or software mode actually
Perform, depending on the application-specific and design constraint of technical scheme.Professional and technical personnel can be to every
Individual specific application using different methods to realize described function, but it is this realize it is not considered that
Beyond scope of the present application.
The step of method described with reference to the embodiments described herein or algorithm, can be with hardware, process
The software module that device is performed, or the combination of the two is implementing.Software module can be placed in random access memory
(RAM), internal memory, read-only storage (ROM), electrically programmable ROM, electrically erasable ROM, post
It is known any other form of in storage, hard disk, moveable magnetic disc, CD-ROM or technical field
In storage medium.
Above-described specific embodiment, the purpose, technical scheme and beneficial effect to the application is carried out
Further describe, should be understood that the specific embodiment that the foregoing is only the application and
, it is not used to limit the protection domain of the application, it is all within spirit herein and principle, done
Any modification, equivalent substitution and improvements etc., should be included within the protection domain of the application.