CN107888550A - Performance indications collecting method and device, tactful sending method and device - Google Patents
Performance indications collecting method and device, tactful sending method and device Download PDFInfo
- Publication number
- CN107888550A CN107888550A CN201610875487.7A CN201610875487A CN107888550A CN 107888550 A CN107888550 A CN 107888550A CN 201610875487 A CN201610875487 A CN 201610875487A CN 107888550 A CN107888550 A CN 107888550A
- Authority
- CN
- China
- Prior art keywords
- client
- acquisition
- performance indications
- data
- acquisition strategies
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention discloses a kind of performance indications collecting method and device, tactful sending method and device.Present invention method includes:The acquisition strategies that server is sent are obtained, the acquisition strategies include being used to indicate the client performance indications to be collected when the special scenes of preset interactive application occur;When detecting that the special scenes in the preset interactive application occur, it is acquired according to the data of the performance indications of the acquisition strategies to the client in target time section, wherein, the target time section is the special scenes from occurring the period end;The performance indications data collected are reported.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of performance indications collecting method and device, strategy
Sending method and device.
Background technology
In some interactive applications, the operation of the usage experience of user to the interactive application is extremely important.However, not
Different with the performance of terminal, the bandwagon effect when running the interactive application is also different, and the developer of interactive application needs
The influence of the performance of different terminals to the bandwagon effect of the interactive application is solved, but in the prior art only to terminal at some
Or the scheme that the performance under some working conditions is detected, the data that the program detects are difficult to reflect that terminal is being run
Actual performance situation during interactive application.
The content of the invention
The embodiments of the invention provide a kind of performance indications collecting method and device, tactful sending method and device,
The validity of the data collected can be improved.
In a first aspect, the embodiment of the present invention provides a kind of performance indications collecting method, including:
The acquisition strategies that server is sent are obtained, the acquisition strategies include being used to indicate that client should in preset interactive mode
Performance indications to be collected when special scenes occur;
When detecting that the special scenes in the preset interactive application occur, according to the acquisition strategies to the visitor
The data of the performance indications of the family end in target time section are acquired, wherein, the target time section is described specific
Scene is from occurring the period end;
The performance indications data collected are reported.
Second aspect, the embodiment of the present invention provide a kind of tactful sending method, including:
Acquisition strategies are obtained, the acquisition strategies are used to indicate that client is treated in the special scenes of preset interactive application
The performance indications of collection;
The acquisition strategies are sent to the client, the acquisition strategies be used for the client detect it is described
When special scenes in preset interactive application occur, according to the acquisition strategies to the client in target time section
The data of the performance indications are acquired, wherein, the target time section is the special scenes from occurring to end
Period;
Receive the performance indications data collected that the client is sent.
The third aspect, the embodiment of the present invention provide a kind of performance indications data acquisition device, including:
Acquisition module, for obtaining the acquisition strategies of server transmission, the acquisition strategies include being used to indicate client
The performance indications to be collected when the special scenes of preset interactive application occur;
Acquisition module, for when detecting that the special scenes in the preset interactive application occur, being adopted according to described
The data of the performance indications of the collection strategy to the client in target time section are acquired, wherein, during the target
Between section be the special scenes from occurring to the period end;
Reporting module, for being reported to the performance indications data collected.
Fourth aspect, the embodiment of the present invention provide a kind of tactful dispensing device, it is characterised in that including:
Acquisition module, for obtaining acquisition strategies, the acquisition strategies are used to indicate client in preset interactive application
Special scenes in performance indications to be collected;
Sending module, it is used for the client for the acquisition strategies to be sent to the client, the acquisition strategies
End exists when the special scenes in detecting the preset interactive application occur according to the acquisition strategies to the client
The data of the performance indications in target time section are acquired, wherein, the target time section be the special scenes from
Occur to the period between end;
Receiving module, the performance indications data collected sent for receiving the client.
As can be seen from the above technical solutions, the embodiment of the present invention has advantages below:
In the present invention, by obtaining the acquisition strategies of server transmission, and the special scenes in preset interactive application
The performance indications included in period between occurring and terminating to the acquisition strategies carry out data acquisition, by the data
Report, the data so collected can more accurately reflect actual conditions of the client when running the preset interactive application,
The validity of data is improved, is easy to optimize the preset interactive application according to the data.
Brief description of the drawings
Fig. 1 is the topology view of one embodiment of the system of the present invention;
Fig. 2 is the schematic flow sheet of one embodiment of the performance indications collecting method of the present invention;
Fig. 3 is the schematic flow sheet of one embodiment of the tactful sending method of the present invention;
Fig. 4 is the structure and schematic flow sheet of one embodiment of the system of the present invention;
Fig. 5 is the schematic flow sheet of one embodiment of the performance indications data acquisition device of the present invention;
Fig. 6 is the schematic flow sheet of one embodiment of the tactful dispensing device of the present invention;
Fig. 7 is the structural representation of one embodiment of the terminal of the present invention;
Fig. 8 is the structural representation of one embodiment of the server of the present invention.
Embodiment
The embodiment of the present invention provides a kind of performance indications collecting method, is mainly used in system as shown in Figure 1, should
System includes server 10 and at least one client 11.Fig. 1 is simply lifted herein so that system includes two clients 11 as an example
Example explanation, it is not as a limitation of the invention.
Referring to Fig. 2, Fig. 2 is the schematic flow sheet of one embodiment of the performance indications collecting method of the present invention.
Performance indications collecting method in the present embodiment is the method performed by any one client in system shown in Figure 1,
Specifically, performance indications collecting method includes:
101st, the acquisition strategies that server is sent are obtained, the acquisition strategies include being used to indicate client in preset interaction
The special scenes of formula application performance indications to be collected when occurring.
Preset interactive application is installed in the client in the present embodiment, wherein, the client can be mobile phone, flat board
Computer or other the terminal of preset interactive application can be installed, the interactive application can be game or and other,
This is not restricted.The special scenes of preset interactive application refer to that preset interactive application is entered with user in the process of running
Some scenes of row interaction, such as can be player's battle (English full name in game:Player versus player, English
Text abbreviation:PVP) scene or player VS environment (English full name:Player VS Environment, english abbreviation:PVE) field
Scape, this is not restricted.
In the present embodiment, client obtain server send acquisition strategies method have it is a variety of.For example, client generates
Required parameter, the required parameter is used to ask acquisition strategies, and the required parameter is sent to server.Server is receiving
After the required parameter, the acquisition strategies are sent to client.
Optionally, in the present embodiment, the required parameter includes being used to log in the preset interactive application in client
The information of user account, the information of the user account judge whether to adopt to described in client transmission for the server
Collection strategy.So, the acquisition strategies that server issues can be directed to the user account, improve what is collected according to the acquisition strategies
The validity of data.
Wherein, the information of the user account can have a variety of, it may for example comprise the user for unique mark user account
Identify (English full name:Identity, english abbreviation:ID), system platform during the preset interactive application of user's login (is, for example,
Android system or IOS systems), the type of user account, project label (namely the preset interactive application
APPid), wherein, because user can use the account of other platforms to log in the preset interactive application, the user account
Type refers to the type of the platform belonging to the user account, for example, the type of the user account can be wechat, QQ, visitor
Or the preset interactive application, the type of wherein user account is that the preset interactive application refers to that user is pre- at this
The new account applied for the registration of in interactive application is put, rather than should using the account login preset interactive mode of other platforms
With.In the case of preset interactive application is game, optionally, the information of user account includes what user player was currently located
Game great Qu ID.
Wherein, the method for client generation required parameter has a variety of.For example, the preset interactive application module in client
Detect bring into operation when, obtain the information that user logs in the user account of the preset interactive application, and by user's account
Number information be sent to request module in client, the request module generates required parameter according to the information of the user account,
And send to server.Specifically, request module generation HTTP request and POST request are sent to server, wherein, the use
The information of family account is encapsulated in POST request as at least part of required parameter.
Preferably, also the required parameter is encrypted before required parameter occurs for the request module in client, with
Ensure the safe transmission of user account.The method of encryption has a variety of.For example, the AES that client uses is superencipherment mark
Accurate (English full name:Advanced Encryption Standard, english abbreviation:AES) algorithm, pattern are cipher block chaining
(English full name:Cipher Block Chaining, English full name:CBC) pattern, filling mode ZeroPadding, i.e., not
0 filling of full 16 byte sections.The AES can be realized in full platform, and implementation method is simple, safe.When
So, client can also use other AESs, such as data encryption standards (English full name:Data Encryption
Standard, english abbreviation:DES) algorithm, this is not restricted.
Optionally, what client received server transmission is encryption data bag, and client passes through to the encryption data bag
It is decrypted to obtain the acquisition strategies.In this manner it is ensured that the safe transmission of acquisition strategies.
In the present embodiment, performance indications to be collected can have a variety of.For example, the performance indications to be collected are including per second
Transmit frame number (English full name:Frames Per Second, english abbreviation:FPS), the centre of the preset interactive application
Manage device (English full name:Central Processing Unit, english abbreviation:CPU) CPU of occupancy and the client is accounted for
With at least one in rate, internal memory usage amount, consumed flow, consumption electricity and network delay.Wherein, in the performance to be collected
In the case of index includes the CPU usage of the preset interactive application and the CPU usage of client, compared with prior art
In only the CPU usage of preset interactive application is acquired, the client of same time is also gathered in the present embodiment
It CPU usage, can be used in being contrasted with the CPU usage of preset interactive application, can more objectively reflect that this is pre-
Put the behavior pattern shared by interactive application.In the prior art, if the CPU core number of client is N, N cores CPU occupancy
Rate total amount is represented with N*100%.Preferably, in the present embodiment, the CPU usage of the preset interactive application collected and visitor
The total amount of the CPU usage at family end is represented with 100%, is so advantageous to subsequently carry out data mining and Performance Evaluation exhibition
Show.
In the present embodiment, acquisition strategies also include the configured information of the special scenes, to indicate that client will enter line number
According to the target time section of collection, or, the special scenes can also be the preset interactive application default setting, herein not
It is restricted.Optionally, acquisition strategies also include the collecting method to the performance indications to be collected included by acquisition strategies,
Or the collecting method of each performance indications can also be preset in client, after client receives acquisition strategies, use
Preset acquisition method is acquired to the performance indications to be collected in acquisition strategies, and this is not restricted.
102nd, when detecting that the special scenes in the preset interactive application occur, according to the acquisition strategies in mesh
The data of the performance indications are acquired in the mark period, wherein, the target time section is the special scenes from going out
The period now arrived between terminating.
In the present embodiment, detect special scenes in the preset interactive application occur and the method that terminates have it is more
Kind.So that preset interactive application is game as an example, in SDK (the English full name of preset interactive application:
Software Development Kit, english abbreviation:SDK in), there is provided start interface function and terminate interface function, at this
When two functions are called respectively in the beginning of special scenes and the code logic exited, you can determine going out for the special scenes
Now and terminate.
There is the period to end (namely during target after acquisition strategies are got, in the special scenes in client
Between section) in, according to the acquisition strategies carry out data acquisition.With reference to several examples of the performance indications included by acquisition strategies
It is specifically described to how to carry out data acquisition according to acquisition strategies.
When performance indications to be collected in the acquisition strategies include the FPS, by pre- in the target time section
Put the FPS of frequency (such as every 20ms) collection client;Each FPS collected according to this calculate average FPS, maximum FPS,
At least one of minimum FPS and FPS shake number, wherein, the FPS shakes number is phase occur in the target time section
Difference between the FPS that neighbour collects twice is more than the number of threshold value.Optionally, the FPS shakes number is seriously trembled including FPS
Dynamic number and/or FPS slight jitter numbers, wherein, FPS seriously shakes number and refers to that appearance is adjacent twice in target time section
Difference between the FPS collected is more than the number of first threshold (such as 10 frames), when FPS slight jitter numbers refer to target
Between the difference that occurs in section between the adjacent FPS collected twice be more than Second Threshold (such as 4 frames) and be less than or equal to the first threshold
It is worth the number of (such as 10 frames).Optionally, the FPS shakes number includes the self-defined shake numbers of FPS, namely target time section
The interior difference occurred between the adjacent FPS collected twice is located at the number in custom field.Optionally, in the present embodiment,
FPS acquisition modules are arranged in the SDK of preset interactive application, then, client is it is determined that number to be collected in acquisition strategies
During according to including FPS, the FPS acquisition modules in the SDK of preset interactive application are notified;FPS acquisition modules are after notice is received
Data acquisition is carried out, and the data collected are sent to the data packing block in client, so as to the data packing block
Data are acquired and reported.Wherein, FPS acquisition modules collection FPS method has a variety of, for example, should in preset interactive mode
When SDK in is Unity engines, carry gathers script on Game Object, is triggered by the predetermined frequency and calls the pin
Update () method in this, the called number of preset time period (such as 1s) interior this method is FPS.
When the performance indications to be collected include the network delay, the first moment in target time section uses
User datagram udp protocol sends test data bag to server;Receive the response data packet from the server;According to connecing
At the time of receiving the response data packet and first moment calculates networking time delay.Specifically, the network delay is reception
To at the time of the response data packet and the distance between first moment duration.Optionally, in target time section, by pre-
Network delay described in frequency collection is put, when each network delay collected according to this calculates averaging network time delay, maximum network
At least one of prolong with minimal network time delay.It is general in the prior art to be calculated using ping to obtain network delay, still
The non-root types in part of Android platform lead to not obtain network delay without Ping authorities;In this implementation, due to using
UDP technologies, the full type of full platform can be covered, and the network interaction situation more pressed close in hand trip real process, network delay are adopted
The data of collection have more referential.
CPU usage and the client when performance indications to be collected including the preset interactive application
During CPU usage, the first duration is obtained, a length of preset interactive application is right in the target time section when described first
CPU occupancy duration;Obtain the second duration, when described second a length of client in the target time section to CPU's
Take duration;The CPU usage of the preset interactive application and the CPU usage of the client are calculated, wherein, it is described pre-
The CPU usage for putting interactive application is first duration and the ratio of the duration of the target time section, the client
CPU usage for the duration of second duration and the target time section ratio.In practical application, operating system pair
CPU use is all that time-slotting uses, such as A processes take 10ms, and then B processes take 30ms, then idle 60ms.
Specifically, can by the special scenes occur and at the end of obtain the data of thread_basic_info_t types respectively,
Come the present system time being obtained from since client start, the present system time includes three kinds of times:It is free time, interior
Core time and user time, kernel time and user time are added i.e. CPU total times.So, by by special scenes occur and
At the end of get respectively subtract each other CPU total times, you can obtain the duration of the target time section.By in special scenes knot
(kernel time+user time-free time) that is got during beam and got when special scenes start (kernel time+
User time-free time) subtract each other, you can obtain second duration.By obtaining, preset interactive mode should in target time section
The summation for the timeslice that all processes take, you can obtain first duration.
When the performance indications to be collected include the internal memory usage amount of the preset interactive application, obtain described pre-
Put the process ID of interactive application;Progress information is obtained according to the process ID;Call task_info functions;According to described
Task_info functions and the progress information obtain internal memory usage amount corresponding to the preset interactive process..Specifically,
The process ID of the preset interactive application can be obtained by the systems approach mach_task_self () of client.Call
After task_info functions, the progress information is saved in the variable taskInfo of task_info_t structure Class Types, read
It is the current internal memory usage amount of the preset interactive application to take the resident_size values in taskInfo.
Optionally, the information of client can also be preserved to host_ by calling host_statistics functions
In the variable vmStats of info_t structure types, the free_count values in vmStats are read, the free_count values are
The currently available internal memory usage amount of client.
When the performance indications to be collected include consumed flow, the network interface information of the client is read;Root
Data on flows and the special scenes of the client when the special scenes occur are obtained according to the network interface information
At the end of data on flows;According to data on flows of the client when the special scenes occur and the special scenes knot
Data on flows during beam calculates the consumed flow.Specifically, the consumed flow of the preset interactive application is the client
Hold the difference of the data on flows when the data on flows at the end of the special scenes and the special scenes start.
When the performance indications to be collected include consumption electricity, different system platforms has different acquisition sides
Method.For example, in Android platform, occur passing through following acquisition current electric quantity respectively with the end of in special scenes:
Static broadcast event is registered in Android Manifest.xml files:android.intent.action.BATTERT_
CHANGED, wherein, Android Manifest are the configuration files, rights statements etc. of Android application in this configuration file;
BroadcastReceiver classes (namely broadcast reception class) are inherited, onReceive methods is rewritten, is connect in onReceive methods
Broadcasted and notified by electric quantity change, notified by the broadcast to obtain current electric quantity.Will when special scenes terminate and occur difference
The current electric quantity of acquisition is subtracted each other, you can obtains the consumption electricity.In another example in ios platform, occur and tie in special scenes
Current electric quantity data is obtained by reading UIDevice interfaces respectively during beam, the difference of two electric quantity datas is described disappears
Power consumption.
103rd, the performance indications data collected are reported.
After client collects performance indications data, the performance indications data are subjected to data encapsulation and reported.Wherein, it is objective
The performance indications data can be reported to the server by family end, the performance indications data can also be reported into other services
In device, this is not restricted.
In the present embodiment, by obtaining the acquisition strategies of server transmission, and the specific field in preset interactive application
Scape occur and terminate between period in performance indications that the acquisition strategies are included carry out data acquisition, and by the data
Collection reports, and the data so collected can more accurately reflect reality of the client when running the preset interactive application
Situation, the validity of data is improved, be easy to optimize the preset interactive application according to the performance indications data.
The performance indications collecting method performed by the client in system shown in Figure 1 is described above, under
The tactful sending method performed by the server in the system will be described for face.
Referring to Fig. 3, Fig. 3 is the schematic flow sheet of one embodiment of the tactful sending method of the present invention.The present embodiment
In, tactful sending method includes:
301st, acquisition strategies are obtained, the acquisition strategies are used to indicate special scenes of the client in preset interactive application
In performance indications to be collected.
In the present embodiment, obtain the method for acquisition strategies have it is a variety of.For example, it can receive to the self-defined of the acquisition strategies
It is arranged and stored in database, when needing to send acquisition strategies to client, acquisition strategies is obtained simultaneously in the database
It is sent to client.In another example being stored with acquisition strategies in the database of other servers, gathered needing to send to client
When tactful, the acquisition strategies are obtained from the database.
Optionally, in the present embodiment, server also receives the required parameter of client transmission, and the required parameter includes institute
State and be used for the information for logging in the user account of the preset interactive application in client;The server is according to the user account
Information acquisition strategies corresponding to the information of the user account are inquired about in database.If inquire the letter of the user account
Acquisition strategies corresponding to breath, it is determined that the acquisition strategies are got, if inquiry is less than corresponding to the information of the user account
Acquisition strategies, then acquisition strategies are not sent to the client.
Wherein, server inquires about the information of the user account correspondingly according to the information of the user account in database
The methods of acquisition strategies have a variety of, a kind of preferred embodiment therein is illustrated below.
The information of the user account includes the first parameter and the second parameter.According to the information of the user account in number
During according to inquiring about acquisition strategies corresponding to the information of the user account in storehouse, the total strategy of collection is obtained first, wherein obtaining collection
Total strategy can be identical with the method for the acquisition acquisition strategies of foregoing description, will not be repeated here.Wrapped in the total strategy of collection
At least one acquisition strategies and at least one parameter are included, are had between at least one acquisition strategies and at least one parameter
There is corresponding relation, wherein, each acquisition strategies corresponds at least one parameter, and each parameter corresponds at least one collection plan
Slightly.The priority of first parameter and second parameter is determined, wherein, the priority of first parameter is higher than described the
The priority of two parameters, then, whether include first parameter, if including described in acquisition if inquiring about in the total strategy of the collection
Acquisition strategies corresponding to first parameter;If not including, whether include second parameter, if bag if inquiring about in the total strategy of the collection
Include, obtain acquisition strategies corresponding to second parameter.So, the priority of each parameter in the information of user account come
The acquisition strategies of user corresponding to the parameter are determined whether successively, can be found out and the user's request from the total strategy of collection
The higher acquisition strategies of matching degree.
302nd, the acquisition strategies are sent to the client.
In the present embodiment, it is specific in the preset interactive application is detected that the acquisition strategies are used for the client
When scene occurs, carried out according to the data of the performance indications of the acquisition strategies to the client in target time section
Collection, wherein, the target time section is the special scenes from occurring the period end.
After getting acquisition strategies, the acquisition strategies are packaged and are issued to client.Preferably, the present embodiment
In, also the acquisition strategies are encrypted when being packaged to the acquisition strategies for server, to ensure the peace of the acquisition strategies
Full transmission.The method of encryption has a variety of, is encrypted for example with aes algorithm or DES algorithms, this is not restricted.
303rd, the performance indications data collected that the client is sent are received.
Client is acquired according to the acquisition strategies received to performance indications data, and the performance indications that will be collected
Belong to transmission to server.Server collects the data that each client is sent, so as to the data reported according to each client
Preset interactive application is optimized.
In the present embodiment, acquisition strategies are sent to client by server, enable to client in preset interactive mode
The performance indications that special scenes in occur including the acquisition strategies in the period between end carry out data
Collection, and the data acquisition is reported, the data so collected can more accurately reflect client and run the preset friendship
Actual conditions during mutual formula application, the validity of data is improved, being easy to should to the preset interactive mode according to the performance indications data
With optimizing.
For understand the present invention, with reference to a practical application scene to the present invention performance indications collecting method and
Tactful sending method is illustrated.
As shown in figure 4, Fig. 4 is the workflow schematic diagram of one embodiment of the system of the present invention.Wherein, the system bag
Include client, first server and second server.The second server receives the total strategy of user-defined collection, and should
Total policy store is gathered into redis databases, wherein, gathering total strategy includes at least one acquisition strategies and at least one
Parameter, there is corresponding relation between at least one acquisition strategies and at least one parameter.
Include the game engine of preset game in client.When user logs in and runs the preset game, the trip
Engine of playing carries out SDK initialization, and obtains the information of user account, and the information of the user account includes ID, current institute
System platform, the type of user account when ID in great Qu, user log in preset interactive application, project label.Game is drawn
Hold up the request module information of the user account being sent in client.After request module receives the information of user account,
Generation HTTP request and POST request are sent to first server, wherein, the information of the user account is added using aes algorithm
At least part after close as required parameter is encapsulated in POST request.If there is HTTP request and POST request sends failure
Situation when, such as due to without caused by the reasons such as network send failure when, report the failure result.
When first server receives HTTP request and POST request, obtained from the redis databases of second server
The total strategy of collection.First server also extracts the information of user account from POST request, and according to the information inquiry will under
The acquisition strategies of hair.Specifically, first server inquires about in the total strategy of the collection whether include the ID first, if so,
Then acquisition strategies corresponding to the ID are packaged and encrypted, are then handed down to client.
If nothing, inquire about in the total strategy of the collection and great Qu ID whether is currently located comprising described in, if so, Ze Jiang great areas
Acquisition strategies corresponding to ID are packaged and encrypted, and are then handed down to client.
If nothing, inquire about in the total strategy of the collection whether include the user account type, if so, then by the user account
Acquisition strategies corresponding to type are packaged and encrypted, and are then handed down to client.
If nothing, inquire about system when whether logging in preset interactive application comprising the user in the total strategy of the collection and put down
Platform, if so, then acquisition strategies corresponding to the system platform are packaged and encrypted, then it is handed down to client.
If nothing, inquire about in the total strategy of the collection whether include the project label, if so, then that the project label is corresponding
Acquisition strategies be packaged and encrypt, be then handed down to client.If nothing, error message is returned, is not issued to client
Acquisition strategies.Client need not carry out data acquisition.
Module is issued after acquisition strategies are received in client, extracts performance indications to be collected therein, its
In, the performance indications include FPS, the central processor CPU occupancy of the preset interactive application and the client CPU
Occupancy, internal memory usage amount, consumed flow, consumption electricity and network delay.
So, issue module and notify network delay module, CPU usage acquisition module, internal memory usage amount collection mould respectively
Block, consumed flow acquisition module, consumption electric quantity acquisition module carry out data acquisition.After each module is collected data, data are sent out
The data package module delivered in client.
Issue module and inform about game engine collection FPS.
In the SDK of game engine, the logical code of special scenes is:
NSLog(@”Hello,Game Start”);
NSLog(@”Hello,Now Detect”);
NSLog(@”Hello,Game Playing”);
NSLog(@”Hello,End Detect”);
NSLog(@”Hello,GameEnd”);
Wherein, it is provided with before NSLog (@" Hello, Game Start ") and starts interface function GSDKStart (),
It is provided with behind NSLog (@" Hello, GameEnd ") and terminates interface function GSDKEnd ().When the special scenes occur, open
Beginning interface function GSDKStart () can be called, and at the end of the special scenes, starting interface function GSDKStart () can quilt
Call.
When game engine detects that starting interface function GSDKStart () is called, every 20ms collection clients
FPS, when detecting that terminating interface function GSDKEnd () is called, stop collection FPS.Game engine is adopted always according to the institute
Each FPS collected calculates average FPS, maximum FPS, minimum FPS and FPS shake numbers, wherein, the FPS shakes number includes
FPS seriously shakes number and/or FPS slight jitter numbers.Each FPS calculated is sent the number to client by game engine
According to package module.
The data received are packaged by data package module, and are sent to second server.In second server
Data processing module is handled the data, and is sent to display module, so that display module is carried out to the data after processing
Displaying.
The performance indications collecting method and tactful sending method of the present invention are described above, below will be to this
The performance indications data acquisition device and tactful dispensing device of invention are described.
As shown in figure 5, Fig. 5 is the structural representation of one embodiment of the performance indications data acquisition device of the present invention.
In the present embodiment, performance indications data acquisition device 500 includes:
Acquisition module 501, for obtaining the acquisition strategies of server transmission, the acquisition strategies include being used to indicate client
The end performance indications to be collected when the special scenes of preset interactive application occur;
Acquisition module 502, for when detecting that the special scenes in the preset interactive application occur, according to described
The data of the performance indications of the acquisition strategies to the client in target time section are acquired, wherein, the target
Period is the special scenes from occurring the period end;
Reporting module 503, for being reported to the performance indications data collected.
In the present embodiment, by obtaining the acquisition strategies of server transmission, and the specific field in preset interactive application
The period interior performance indications included to the acquisition strategies between scape occurs and terminated carry out data acquisition, by the data
Report, the data so collected can more accurately reflect actual conditions of the client when running the preset interactive application,
The validity of data is improved, is easy to optimize the preset interactive application according to the data.
Optionally, the acquisition module 501 is specifically used for:
Required parameter is generated, the required parameter is used to ask acquisition strategies;
The required parameter is encrypted, and sent to server;
Receive the encryption data bag from the server;
The encryption data bag is decrypted to obtain acquisition strategies.
Optionally, the required parameter includes being used for the user account for logging in the preset interactive application in client
Information, the information of the user account judge whether to send the acquisition strategies to the client for the server.
Optionally, the performance indications to be collected include per second transmit in frame number FPS, the preset interactive application
Central processor CPU usage and the CPU usage of the client, the internal memory usage amount of the preset interactive application, consumption
At least one of in flow, consumption electricity and network delay.
Optionally, when the performance indications to be collected include the FPS, the acquisition module 502 is specifically used for
The FPS of the client is gathered in the target time section by predetermined frequency;Average FPS, maximum are calculated according to the FPS collected
At least one of FPS, minimum FPS and FPS shake numbers, wherein, the FPS shakes number is to go out in the target time section
Difference between the existing adjacent FPS collected twice is more than the number of threshold value.
Optionally, when the performance indications to be collected include the network delay, the acquisition module 502 is specifically used
In:
Test data bag is sent to server using user datagram udp protocol at the first moment;
Receive the response data packet from the server;
According at the time of receiving the response data packet and first moment calculates networking time delay.
Optionally, the central processor CPU that the preset interactive application is included when the performance indications to be collected accounts for
During with the CPU usage of rate and the client, the acquisition module 502 is specifically used for:
Obtain the first duration, when described first a length of preset interactive application in the target time section to CPU
Occupancy duration;
Obtain the second duration, when described second a length of client in the target time section to CPU occupancy when
It is long;
The CPU usage of the preset interactive application and the CPU usage of the client are calculated, wherein, it is described pre-
The CPU usage for putting interactive application is first duration and the ratio of the duration of the target time section, the client
CPU usage for the duration of second duration and the target time section ratio.
Optionally, when the performance indications to be collected include the internal memory usage amount of the preset interactive application, institute
Acquisition module 502 is stated to be specifically used for:
Obtain the process identification (PID) ID of the preset interactive application;
Progress information is obtained according to the process ID;
Call task_info functions;
The internal memory according to corresponding to the task_info functions and the progress information obtain the preset interactive process
Usage amount.
Optionally, when the performance indications to be collected include the consumed flow, the acquisition module 502 is specifically used
In:
Read the network interface information of the client;
Data on flows and institute of the client when the special scenes occur are obtained according to the network interface information
State the data on flows at the end of special scenes;
According to data on flows of the client when the special scenes occur and the stream at the end of the special scenes
Measure data and calculate the consumed flow.
Referring to Fig. 6, Fig. 6 is the structural representation of one embodiment of the tactful dispensing device of the present invention.The present embodiment
In, the tactful dispensing device 600 includes:
Acquisition module 601, for obtaining acquisition strategies, the acquisition strategies are used to indicate that client should in preset interactive mode
Performance indications to be collected in special scenes;
Sending module 602, it is used for the visitor for the acquisition strategies to be sent to the client, the acquisition strategies
Family end is when the special scenes in detecting the preset interactive application occur, according to the acquisition strategies to the client
The data of the performance indications in target time section are acquired, wherein, the target time section is the special scenes
From occurring the period end;
Receiving module 603, the performance indications data collected sent for receiving the client.
In the present embodiment, acquisition strategies are sent to client by server, enable to client in preset interactive mode
The performance indications that special scenes in occur including the acquisition strategies in the period between end carry out data
Collection, and the data acquisition is reported, the data so collected can more accurately reflect client and run the preset friendship
Actual conditions during mutual formula application, the validity of data is improved, being easy to should to the preset interactive mode according to the performance indications data
With optimizing.
Optionally, the acquisition module 601 is specifically used for:
The required parameter that client is sent is received, the required parameter includes described preset for logging in the client
The information of the user account of interactive application;
Acquisition strategies corresponding to the information that the user account is inquired about in database according to the information of the user account.
Optionally, the information of the user account includes the first parameter and the second parameter;
The acquisition module 601 is inquiring about the letter of the user account according to the information of the user account in database
Corresponding to breath during acquisition strategies, it is specifically used for:
The total strategy of collection is obtained, the total strategy of collection includes at least one acquisition strategies and at least one parameter, institute
Stating has corresponding relation between at least one acquisition strategies and at least one parameter;
The priority of first parameter and second parameter is determined, wherein, the priority of first parameter is higher than
The priority of second parameter;
Whether include first parameter, if including it is corresponding to obtain first parameter if inquiring about in the total strategy of the collection
Acquisition strategies;If not including, whether include second parameter, if including described in acquisition if inquiring about in the total strategy of the collection
Acquisition strategies corresponding to second parameter.
Optionally, described device also includes encrypting module 604, for being sent by the acquisition strategies to the client
Before, the acquisition strategies are encrypted.
The embodiment of the present invention additionally provides another terminal, as shown in fig. 7, for convenience of description, illustrate only and this hair
The related part of bright embodiment, particular technique details do not disclose, refer to present invention method part.The terminal can be with
It is to include mobile phone, tablet personal computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of
Sales, point-of-sale terminal), any terminal device such as vehicle-mounted computer, so that terminal is mobile phone as an example:
Fig. 7 is illustrated that the block diagram of the part-structure of the mobile phone related to terminal provided in an embodiment of the present invention.Reference chart
7, mobile phone includes:Radio frequency (Radio Frequency, RF) circuit 1010, memory 1020, input block 1030, display unit
1040th, sensor 1050, voicefrequency circuit 1060, Wireless Fidelity (wireless fidelity, WiFi) module 1070, processor
The part such as 1080 and power supply 1090.It will be understood by those skilled in the art that the handset structure shown in Fig. 7 is not formed pair
The restriction of mobile phone, it can include than illustrating more or less parts, either combine some parts or different part cloth
Put.
Each component parts of mobile phone is specifically introduced with reference to Fig. 7:
RF circuits 1010 can be used for receive and send messages or communication process in, the reception and transmission of signal, especially, by base station
After downlink information receives, handled to processor 1080;In addition, it is sent to base station by up data are designed.Generally, RF circuits
1010 include but is not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier (Low Noise
Amplifier, LNA), duplexer etc..In addition, RF circuits 1010 can also be led to by radio communication and network and other equipment
Letter.Above-mentioned radio communication can use any communication standard or agreement, including but not limited to global system for mobile communications (Global
System of Mobile communication, GSM), general packet radio service (General Packet Radio
Service, GPRS), CDMA (Code Division Multiple Access, CDMA), WCDMA
(Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution,
LTE), Email, Short Message Service (Short Messaging Service, SMS) etc..
Memory 1020 can be used for storage software program and module, and processor 1080 is stored in memory by operation
1020 software program and module, so as to perform the various function application of mobile phone and data processing.Memory 1020 can be led
To include storing program area and storage data field, wherein, storing program area can storage program area, needed at least one function
Application program (such as sound-playing function, image player function etc.) etc.;Storage data field can store uses institute according to mobile phone
Data (such as voice data, phone directory etc.) of establishment etc..Stored in addition, memory 1020 can include high random access
Device, nonvolatile memory can also be included, a for example, at least disk memory, flush memory device or other volatibility are consolidated
State memory device.
Input block 1030 can be used for the numeral or character information for receiving input, and produce with the user of mobile phone set with
And the key signals input that function control is relevant.Specifically, input block 1030 may include contact panel 1031 and other inputs
Equipment 1032.Contact panel 1031, also referred to as touch-screen, collect touch operation (such as user of the user on or near it
Use the behaviour of any suitable object such as finger, stylus or annex on contact panel 1031 or near contact panel 1031
Make), and corresponding attachment means are driven according to formula set in advance.Optionally, contact panel 1031 may include touch detection
Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band
The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it
Contact coordinate is converted into, then gives processor 1080, and the order sent of reception processing device 1080 and can be performed.In addition,
The polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave can be used to realize contact panel 1031.Except touch surface
Plate 1031, input block 1030 can also include other input equipments 1032.Specifically, other input equipments 1032 can include
But it is not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc.
It is one or more.
Display unit 1040 can be used for display by user input information or be supplied to user information and mobile phone it is each
Kind menu.Display unit 1040 may include display panel 1041, optionally, can use liquid crystal display (Liquid
Crystal Display, LCD), the form such as Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED)
To configure display panel 1041.Further, contact panel 1031 can cover display panel 1041, when contact panel 1031 detects
To after the touch operation on or near it, processor 1080 is sent to determine the type of touch event, is followed by subsequent processing device
1080 provide corresponding visual output according to the type of touch event on display panel 1041.Although in the figure 7, contact panel
1031 and display panel 1041 are the parts independent as two to realize the input of mobile phone and input function, but in some realities
Apply in example, contact panel 1031 and display panel 1041 can be integrated and realize input and the output function of mobile phone.
Mobile phone may also include at least one sensor 1050, such as optical sensor, motion sensor and other sensors.
Specifically, optical sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to ambient light
Light and shade adjust the brightness of display panel 1041, proximity transducer can close display panel when mobile phone is moved in one's ear
1041 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (generally three axles) and add
The size of speed, size and the direction of gravity are can detect that when static, application (such as the horizontal/vertical screen available for identification mobile phone posture
Switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;As for mobile phone also
The other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor, will not be repeated here.
Voicefrequency circuit 1060, loudspeaker 1061, microphone 1062 can provide the COBBAIF between user and mobile phone.Audio
Electric signal after the voice data received conversion can be transferred to loudspeaker 1061, is changed by loudspeaker 1061 by circuit 1060
Exported for voice signal;On the other hand, the voice signal of collection is converted to electric signal by microphone 1062, by voicefrequency circuit 1060
Voice data is converted to after reception, then after voice data output processor 1080 is handled, through RF circuits 1010 to be sent to ratio
Such as another mobile phone, or voice data is exported to memory 1020 further to handle.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronicses postal by WiFi module 1070
Part, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 7 is shown
WiFi module 1070, but it is understood that, it is simultaneously not belonging to must be configured into for mobile phone, can not change as needed completely
Become in the essential scope of invention and omit.
Processor 1080 is the control centre of mobile phone, using various interfaces and the various pieces of connection whole mobile phone,
By running or performing the software program and/or module that are stored in memory 1020, and call and be stored in memory 1020
Interior data, the various functions and processing data of mobile phone are performed, so as to carry out integral monitoring to mobile phone.Optionally, processor
1080 may include one or more processing units;Preferably, processor 1080 can integrate application processor and modulation /demodulation processing
Device, wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor is mainly located
Manage radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 1080.
Mobile phone also includes the power supply 1090 (such as battery) to all parts power supply, it is preferred that power supply can pass through power supply
Management system and processor 1080 are logically contiguous, so as to realize management charging, electric discharge and power consumption pipe by power-supply management system
The functions such as reason.
Although being not shown, mobile phone can also include camera, bluetooth module etc., will not be repeated here.
In embodiments of the present invention, the processor 1080 included by the terminal also there is control to perform row shown in figure 1 above
Method flow.
Fig. 8 is a kind of server architecture schematic diagram provided in an embodiment of the present invention, and the server 1100 can be because of configuration or property
Energy is different and produces bigger difference, can include one or more central processing units (central processing
Units, CPU) 1122 (for example, one or more processors) and memory 1132, one or more storage applications
The storage medium 1130 of program 1142 or data 1144 (such as one or more mass memory units).Wherein, memory
1132 and storage medium 1130 can be it is of short duration storage or persistently storage.One can be included by being stored in the program of storage medium 1130
Individual or more than one module (diagram does not mark), each module can include operating the series of instructions in server.More enter
One step, central processing unit 1122 be could be arranged to communicate with storage medium 1130, and storage medium is performed on server 1100
Series of instructions operation in 1130.
Server 1100 can also include one or more power supplys 1126, one or more wired or wireless nets
Network interface 1150, one or more input/output interfaces 1158, and/or, one or more operating systems 1141, example
Such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
Can be based on the server architecture shown in the Fig. 8 as the step performed by server in above-described embodiment.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with
Realize by another way.For example, device embodiment described above is only schematical, for example, the unit
Division, only a kind of division of logic function, can there is other dividing mode, such as multiple units or component when actually realizing
Another system can be combined or be desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or
The mutual coupling discussed or direct-coupling or communication connection can be the indirect couplings by some interfaces, device or unit
Close or communicate to connect, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list
Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use
When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially
The part to be contributed in other words to prior art or all or part of the technical scheme can be in the form of software products
Embody, the computer software product is stored in a storage medium, including some instructions are causing a computer
Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the present invention
Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
Described above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before
Embodiment is stated the present invention is described in detail, it will be understood by those within the art that:It still can be to preceding
State the technical scheme described in each embodiment to modify, or equivalent substitution is carried out to which part technical characteristic;And these
Modification is replaced, and the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (26)
- A kind of 1. performance indications collecting method, it is characterised in that including:The acquisition strategies that server is sent are obtained, the acquisition strategies include being used to indicate client in preset interactive application Performance indications to be collected when special scenes occur;When detecting that the special scenes in the preset interactive application occur, according to the acquisition strategies to the client The data of the performance indications in target time section are acquired, wherein, the target time section is the special scenes From occurring the period end;The performance indications data collected are reported.
- 2. performance indications collecting method according to claim 1, it is characterised in that described to obtain what server was sent Acquisition strategies, including:Required parameter is generated, the required parameter is used to ask acquisition strategies;The required parameter is encrypted, and sent to server;Receive the encryption data bag from the server;The encryption data bag is decrypted to obtain acquisition strategies.
- 3. performance indications collecting method according to claim 2, it is characterised in that the required parameter includes client It is used for the information for logging in the user account of the preset interactive application in end, the information of the user account is used for the service Device judges whether to send the acquisition strategies to the client.
- 4. the performance indications collecting method according to any one of claims 1 to 3, it is characterised in that described to be collected Performance indications include transmission frame number FPS per second, the central processor CPU occupancy of the preset interactive application and the visitor In the CPU usage at family end, the internal memory usage amount of the preset interactive application, consumed flow, consumption electricity and network delay At least one of.
- 5. performance indications collecting method according to claim 4, it is characterised in that when the performance to be collected refers to It is described according to the performance indications of the acquisition strategies to the client in target time section when mark includes the FPS Data be acquired, including:The FPS of the client is gathered by predetermined frequency in the target time section;At least one of average FPS, maximum FPS, minimum FPS and FPS shake numbers are calculated according to the FPS collected, wherein, The FPS shakes number is that the difference occurred in the target time section between the adjacent FPS collected twice is more than threshold value Number.
- 6. performance indications collecting method according to claim 4, it is characterised in that when the performance to be collected refers to It is described according to the performance of the acquisition strategies to the client in target time section when mark includes the network delay The data of index are acquired, including:Test data bag is sent to server using user datagram udp protocol at the first moment;Receive the response data packet from the server;According at the time of receiving the response data packet and first moment calculates networking time delay.
- 7. performance indications collecting method according to claim 4, it is characterised in that when the performance to be collected refers to Mark include the preset interactive application central processor CPU occupancy and the client CPU usage when, described It is acquired according to the data of the performance indications of the acquisition strategies to the client in target time section, including:Obtain the first duration, a length of preset interactive application accounts in the target time section to CPU when described first Use duration;Obtain the second duration, when described second a length of client in the target time section to CPU occupancy duration;The CPU usage of the preset interactive application and the CPU usage of the client are calculated, wherein, the preset friendship The CPU usage that mutual formula is applied is first duration and the ratio of the duration of the target time section, the CPU of the client Occupancy is the ratio of second duration and the duration of the target time section.
- 8. performance indications collecting method according to claim 4, it is characterised in that when the performance to be collected refers to Mark is when including the internal memory usage amount of the preset interactive application, it is described according to the acquisition strategies to the client in target The data of the performance indications in period are acquired, including:Obtain the process identification (PID) ID of the preset interactive application;Progress information is obtained according to the process ID;Call task_info functions;The internal memory according to corresponding to the task_info functions and the progress information obtain the preset interactive process uses Amount.
- 9. performance indications collecting method according to claim 4, it is characterised in that when the performance to be collected refers to It is described according to the performance of the acquisition strategies to the client in target time section when mark includes the consumed flow The data of index are acquired, including:Read the network interface information of the client;Data on flows and the spy of the client when the special scenes occur are obtained according to the network interface information Determine the data on flows at the end of scene;According to data on flows of the client when the special scenes occur and the flow number at the end of the special scenes According to the calculating consumed flow.
- A kind of 10. tactful sending method, it is characterised in that including:Acquisition strategies are obtained, the acquisition strategies are used to indicate that client is to be collected in the special scenes of preset interactive application Performance indications;The acquisition strategies are sent to the client, the acquisition strategies be used for the client detect it is described preset When special scenes in interactive application occur, according to the acquisition strategies to the client in target time section described in The data of performance indications are acquired, wherein, the target time section be the special scenes from occur to end when Between section;Receive the performance indications data collected that the client is sent.
- 11. tactful sending method according to claim 10, it is characterised in that the acquisition acquisition strategies, including:The required parameter that client is sent is received, the required parameter includes being used to log in the preset interaction in the client The information of the user account of formula application;Acquisition strategies corresponding to the information that the user account is inquired about in database according to the information of the user account.
- 12. tactful sending method according to claim 11, it is characterised in that the information of the user account includes first Parameter and the second parameter;The information according to the user account inquires about acquisition strategies corresponding to the information of the user account in database, Including:Obtain the total strategy of collection, the total strategy of collection includes at least one acquisition strategies and at least one parameter, it is described extremely It is few that there is corresponding relation between an acquisition strategies and at least one parameter;The priority of first parameter and second parameter is determined, wherein, the priority of first parameter is higher than described The priority of second parameter;Whether include first parameter, if including obtaining and being adopted corresponding to first parameter if inquiring about in the total strategy of the collection Collection strategy;Whether if not including, inquiring about in the total strategy of the collection includes second parameter, if including obtaining described second Acquisition strategies corresponding to parameter.
- 13. tactful sending method according to claim 10, it is characterised in that described to send the acquisition strategies to institute Client is stated, is also included before:The acquisition strategies are encrypted.
- A kind of 14. performance indications data acquisition device, it is characterised in that including:Acquisition module, for obtaining the acquisition strategies of server transmission, the acquisition strategies include being used to indicate client pre- The special scenes for putting interactive application performance indications to be collected when occurring;Acquisition module, for when detecting that the special scenes in the preset interactive application occur, according to the collection plan The data of the performance indications slightly to the client in target time section are acquired, wherein, the target time section It is the special scenes from occurring to the period end;Reporting module, for being reported to the performance indications data collected.
- 15. performance indications data acquisition device according to claim 14, it is characterised in that the acquisition module is specifically used In:Required parameter is generated, the required parameter is used to ask acquisition strategies;The required parameter is encrypted, and sent to server;Receive the encryption data bag from the server;The encryption data bag is decrypted to obtain acquisition strategies.
- 16. performance indications data acquisition device according to claim 15, it is characterised in that the required parameter includes visitor It is used for the information for logging in the user account of the preset interactive application in the end of family, the information of the user account is used for the clothes Business device judges whether to send the acquisition strategies to the client.
- 17. the performance indications data acquisition device according to any one of claim 14 to 16, it is characterised in that described to wait to adopt The performance indications of collection include transmission frame number FPS per second, the central processor CPU occupancy of the preset interactive application and described The CPU usage of client, the internal memory usage amount of the preset interactive application, consumed flow, consumption electricity and network delay At least one of in.
- 18. performance indications data acquisition device according to claim 17, it is characterised in that when the performance to be collected When index includes the FPS, the acquisition module is specifically used for gathering the visitor by predetermined frequency in the target time section The FPS at family end;At least one in average FPS, maximum FPS, minimum FPS and FPS shake numbers is calculated according to the FPS collected Kind, wherein, the FPS shakes number is that the difference occurred in the target time section between the adjacent FPS collected twice is big In the number of threshold value.
- 19. performance indications data acquisition device according to claim 17, it is characterised in that when the performance to be collected When index includes the network delay, the acquisition module is specifically used for:Test data bag is sent to server using user datagram udp protocol at the first moment;Receive the response data packet from the server;According at the time of receiving the response data packet and first moment calculates networking time delay.
- 20. performance indications data acquisition device according to claim 17, it is characterised in that when the performance to be collected It is described during the CPU usage of central processor CPU occupancy and the client of the index including the preset interactive application Acquisition module is specifically used for:Obtain the first duration, a length of preset interactive application accounts in the target time section to CPU when described first Use duration;Obtain the second duration, when described second a length of client in the target time section to CPU occupancy duration;The CPU usage of the preset interactive application and the CPU usage of the client are calculated, wherein, the preset friendship The CPU usage that mutual formula is applied is first duration and the ratio of the duration of the target time section, the CPU of the client Occupancy is the ratio of second duration and the duration of the target time section.
- 21. performance indications data acquisition device according to claim 17, it is characterised in that when the performance to be collected When index includes the internal memory usage amount of the preset interactive application, the acquisition module is specifically used for:Obtain the process identification (PID) ID of the preset interactive application;Progress information is obtained according to the process ID;Call task_info functions;The internal memory according to corresponding to the task_info functions and the progress information obtain the preset interactive process uses Amount.
- 22. performance indications data acquisition device according to claim 17, it is characterised in that when the performance to be collected When index includes the consumed flow, the acquisition module is specifically used for:Read the network interface information of the client;Data on flows and the spy of the client when the special scenes occur are obtained according to the network interface information Determine the data on flows at the end of scene;According to data on flows of the client when the special scenes occur and the flow number at the end of the special scenes According to the calculating consumed flow.
- A kind of 23. tactful dispensing device, it is characterised in that including:Acquisition module, for obtaining acquisition strategies, the acquisition strategies are used to indicate spy of the client in preset interactive application Determine performance indications to be collected in scene;Sending module, exist for the acquisition strategies to be sent to the client, the acquisition strategies for the client When detecting that the special scenes in the preset interactive application occur, according to the acquisition strategies to the client in target The data of the performance indications in period are acquired, wherein, the target time section is the special scenes from appearance To the period between end;Receiving module, the performance indications data collected sent for receiving the client.
- 24. tactful dispensing device according to claim 23, it is characterised in that the acquisition module is specifically used for:The required parameter that client is sent is received, the required parameter includes being used to log in the preset interaction in the client The information of the user account of formula application;Acquisition strategies corresponding to the information that the user account is inquired about in database according to the information of the user account.
- 25. tactful dispensing device according to claim 24, it is characterised in that the information of the user account includes first Parameter and the second parameter;The acquisition module is corresponding in the information for inquiring about the user account in database according to the information of the user account Acquisition strategies when, be specifically used for:Obtain the total strategy of collection, the total strategy of collection includes at least one acquisition strategies and at least one parameter, it is described extremely It is few that there is corresponding relation between an acquisition strategies and at least one parameter;The priority of first parameter and second parameter is determined, wherein, the priority of first parameter is higher than described The priority of second parameter;Whether include first parameter, if including obtaining and being adopted corresponding to first parameter if inquiring about in the total strategy of the collection Collection strategy;Whether if not including, inquiring about in the total strategy of the collection includes second parameter, if including obtaining described second Acquisition strategies corresponding to parameter.
- 26. tactful dispensing device according to claim 23, it is characterised in that described device also includes encrypting module, uses Sent in by the acquisition strategies to before the client, the acquisition strategies are encrypted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610875487.7A CN107888550B (en) | 2016-09-30 | 2016-09-30 | Performance index data acquisition method and device and strategy sending method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610875487.7A CN107888550B (en) | 2016-09-30 | 2016-09-30 | Performance index data acquisition method and device and strategy sending method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107888550A true CN107888550A (en) | 2018-04-06 |
CN107888550B CN107888550B (en) | 2021-06-01 |
Family
ID=61769017
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610875487.7A Active CN107888550B (en) | 2016-09-30 | 2016-09-30 | Performance index data acquisition method and device and strategy sending method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107888550B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110457229A (en) * | 2019-08-23 | 2019-11-15 | 腾讯科技(深圳)有限公司 | Game performance monitoring method, device, electronic equipment and storage medium |
CN112256542A (en) * | 2020-10-19 | 2021-01-22 | 中山大学 | eBPF-based micro-service system performance detection method, device and system |
CN112346775A (en) * | 2020-09-21 | 2021-02-09 | 杭州数智政通科技有限公司 | General index data processing method, electronic device and storage medium |
CN113010203A (en) * | 2019-12-20 | 2021-06-22 | Oppo广东移动通信有限公司 | Application optimization method based on open platform and related device |
CN113055402A (en) * | 2021-03-30 | 2021-06-29 | 深圳红途创程科技有限公司 | Data transmission control method and device, computer equipment and storage medium |
CN113541786A (en) * | 2018-12-06 | 2021-10-22 | 华为技术有限公司 | Data acquisition method and related equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104166619A (en) * | 2013-05-20 | 2014-11-26 | 腾讯科技(深圳)有限公司 | Performance measuring method and terminal of application program |
CN104536888A (en) * | 2014-12-24 | 2015-04-22 | 网易(杭州)网络有限公司 | Game testing method and system for mobile devices |
CN104717670A (en) * | 2013-12-13 | 2015-06-17 | 中国移动通信集团公司 | Business quality testing method, device and system |
CN105260306A (en) * | 2015-10-20 | 2016-01-20 | 网易(杭州)网络有限公司 | Performance detection method and device of art materials in game program |
CN105653451A (en) * | 2015-12-29 | 2016-06-08 | 北京金山安全软件有限公司 | Software performance testing method and device |
-
2016
- 2016-09-30 CN CN201610875487.7A patent/CN107888550B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104166619A (en) * | 2013-05-20 | 2014-11-26 | 腾讯科技(深圳)有限公司 | Performance measuring method and terminal of application program |
CN104717670A (en) * | 2013-12-13 | 2015-06-17 | 中国移动通信集团公司 | Business quality testing method, device and system |
CN104536888A (en) * | 2014-12-24 | 2015-04-22 | 网易(杭州)网络有限公司 | Game testing method and system for mobile devices |
CN105260306A (en) * | 2015-10-20 | 2016-01-20 | 网易(杭州)网络有限公司 | Performance detection method and device of art materials in game program |
CN105653451A (en) * | 2015-12-29 | 2016-06-08 | 北京金山安全软件有限公司 | Software performance testing method and device |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113541786A (en) * | 2018-12-06 | 2021-10-22 | 华为技术有限公司 | Data acquisition method and related equipment |
CN110457229A (en) * | 2019-08-23 | 2019-11-15 | 腾讯科技(深圳)有限公司 | Game performance monitoring method, device, electronic equipment and storage medium |
CN110457229B (en) * | 2019-08-23 | 2022-01-28 | 腾讯科技(深圳)有限公司 | Game performance monitoring method and device, electronic equipment and storage medium |
CN113010203A (en) * | 2019-12-20 | 2021-06-22 | Oppo广东移动通信有限公司 | Application optimization method based on open platform and related device |
CN112346775A (en) * | 2020-09-21 | 2021-02-09 | 杭州数智政通科技有限公司 | General index data processing method, electronic device and storage medium |
CN112346775B (en) * | 2020-09-21 | 2024-02-02 | 杭州数智政通科技有限公司 | Index data general processing method, electronic device and storage medium |
CN112256542A (en) * | 2020-10-19 | 2021-01-22 | 中山大学 | eBPF-based micro-service system performance detection method, device and system |
CN112256542B (en) * | 2020-10-19 | 2022-02-08 | 中山大学 | eBPF-based micro-service system performance detection method, device and system |
CN113055402A (en) * | 2021-03-30 | 2021-06-29 | 深圳红途创程科技有限公司 | Data transmission control method and device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107888550B (en) | 2021-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107888550A (en) | Performance indications collecting method and device, tactful sending method and device | |
CN104618222B (en) | A kind of method and device for matching facial expression image | |
CN109379247A (en) | The method and device that the network delay of a kind of pair of application program is detected | |
CN108471376A (en) | Data processing method, apparatus and system | |
CN107133797A (en) | One kind pays abnormal automatic testing method, terminal and computer-readable recording medium | |
CN107291586A (en) | The analysis method and device of a kind of application program | |
CN108874612B (en) | Information acquisition method, related equipment and system | |
CN107562539A (en) | Applied program processing method and device, computer equipment, storage medium | |
CN106331105A (en) | Method and device for guaranteeing network acceleration, and network QoS guarantee method and device | |
CN112148579A (en) | User interface testing method and device | |
CN109640379A (en) | Link aggregation implementation method and Related product | |
CN108810057A (en) | Acquisition method, device and the storage medium of user behavior data | |
CN109640329A (en) | Link aggregation implementation method and Related product | |
CN107864408A (en) | Information displaying method, apparatus and system | |
CN106648460B (en) | Step counting data filtering method and intelligent terminal | |
CN110227268A (en) | A kind of method and device detecting violation game account number | |
CN107483746A (en) | A kind of reminding method of incoming information, terminal called and server | |
CN109921960A (en) | A kind of IDC network of computer room abnormality test method and device | |
CN109600511A (en) | Mobile terminal warranty information management method, mobile terminal and storage medium | |
CN109088986A (en) | Mobile terminal guard method, mobile terminal and computer readable storage medium | |
CN107770381A (en) | Network management and Related product | |
CN107770449A (en) | continuous shooting method, electronic equipment and storage medium | |
CN104836698B (en) | The method and apparatus of monitoring network environment | |
CN104104508B (en) | Method of calibration, device and terminal device | |
CN109474521A (en) | Link aggregation implementation method and Related product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |