CN107315623B - Method and device for reporting statistical data - Google Patents

Method and device for reporting statistical data Download PDF

Info

Publication number
CN107315623B
CN107315623B CN201710476218.8A CN201710476218A CN107315623B CN 107315623 B CN107315623 B CN 107315623B CN 201710476218 A CN201710476218 A CN 201710476218A CN 107315623 B CN107315623 B CN 107315623B
Authority
CN
China
Prior art keywords
field
application program
target application
data
statistical data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710476218.8A
Other languages
Chinese (zh)
Other versions
CN107315623A (en
Inventor
库宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201710476218.8A priority Critical patent/CN107315623B/en
Publication of CN107315623A publication Critical patent/CN107315623A/en
Application granted granted Critical
Publication of CN107315623B publication Critical patent/CN107315623B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • G06F8/4434Reducing the memory space required by the program code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Evolutionary Biology (AREA)
  • Computer Hardware Design (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a method and a device for reporting statistical data, and belongs to the technical field of computers. The method comprises the following steps: acquiring running statistical data in the running process of a target application program, wherein the running statistical data comprises one or more of behavior class data of a user of the target application program, performance class data of the target application program and quality class data of the target application program; encoding the operation statistical data according to an encoding mode of a type length value TLV; and sending the encoded running statistical data to a server. By adopting the invention, the storage resource can be saved.

Description

Method and device for reporting statistical data
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for reporting statistical data.
Background
With the development of computer technology and network technology, the types of application programs are more and more, in order to enable a user to experience better in the process of using the application programs, technical personnel can set a data statistics process in the application programs to count operation statistics data of the user in the process of using the application programs, such as behavior data and performance data of the user, then the data statistics process sends the operation statistics data to a server, and the technical personnel can use the operation statistics data to improve the functions of the application programs.
In the prior art, before the operation statistical data is sent to the server, the operation statistical data needs to be encoded, different encoding modes are generally available for different types of operation statistical data, and the corresponding server also needs to decode the different types of operation statistical data in different decoding modes. Therefore, the server and the terminal need to store multiple coding modes and occupy more storage resources.
Disclosure of Invention
In order to solve the problem in the prior art, embodiments of the present invention provide a method and an apparatus for reporting statistical data. The technical scheme is as follows:
in a first aspect, a method for reporting statistical data is provided, where the method includes:
acquiring running statistical data in the running process of a target application program, wherein the running statistical data comprises one or more of behavior class data of a user of the target application program, performance class data of the target application program and quality class data of the target application program;
encoding the operation statistical data according to an encoding mode of a type length value TLV;
and sending the encoded running statistical data to a server.
Optionally, the field of the encoded running statistical data is a continuous field composed of a uid field, a cType field, a dwBufferCode field, a cVerLen field, a strVerison field, a cmachienecorden field, a strmachienecode field and a stData field, where the uid field is a login account of the target application program, the cType field is a service type, the dwBufferCode field is a reserved field, the cVerLen field is a byte number of a version number of the target application program, the strVerison field is the version number, the cmachienecorden field is a byte number of a machine code of a login terminal of the target application program, the strmachienecode field is the machine code, and the stData field is a custom protocol body part and is used for carrying the running statistical data.
Optionally, the stData field is a continuous field composed of a wfeldnum field, a wween field and a stField1+ stField2+ stField3+ … … stField, wherein the wfeldnum field is the number of stfields, the wween field is the total number of bytes of the stfields 1+ stField2+ stField3+ … … stField, and the stField1+ stField2+ stField3+ … … stField is used for carrying the operation statistics.
Thus, the number of interactions between the terminal and the server can be reduced.
Optionally, each stField is a continuous field composed of a dwrid (t) field, a wlen (l) field and an stval (v) field, the dwrid (t) field is a service item in the service type, the wlen (l) field is the number of bytes of the stval (v) field, and the stval (v) field is used for carrying running statistics data.
Thus, the number of interactions between the terminal and the server can be reduced.
Optionally, the stval (v) field is a continuous field composed of a csubtype (t) field, a clen (l) field and a wcount (v) field, the csubtype (t) field is a sub-service item in the service item, the clen (l) field is the number of bytes of the wcount (v) field, and the wcount (v) field is used for carrying the running statistics data.
Thus, the expansibility of uploading statistics can be improved.
Optionally, the dwrid (t) field is represented using 4 bytes DWORD and the wcount (v) field is represented using bytes.
In a second aspect, an apparatus for reporting statistical data is provided, where the apparatus includes:
the system comprises an acquisition module, a quality class analysis module and a quality class analysis module, wherein the acquisition module is used for acquiring operation statistical data in the operation process of a target application program, and the operation statistical data comprises one or more of behavior class data of a user of the target application program, performance class data of the target application program and quality class data of the target application program;
the encoding module is used for encoding the operation statistical data according to an encoding mode of a type length value TLV;
and the sending module is used for sending the encoded running statistical data to the server.
Optionally, the field of the encoded running statistical data is a continuous field composed of a uid field, a cType field, a dwBufferCode field, a cVerLen field, a strVerison field, a cmachienecorden field, a strmachienecode field and a stData field, where the uid field is a login account of the target application program, the cType field is a service type, the dwBufferCode field is a reserved field, the cVerLen field is a byte number of a version number of the target application program, the strVerison field is the version number, the cmachienecorden field is a byte number of a machine code of a login terminal of the target application program, the strmachienecode field is the machine code, and the stData field is a custom protocol body part and is used for carrying the running statistical data.
Optionally, the stData field is a continuous field composed of a wfeldnum field, a wween field and a stField1+ stField2+ stField3+ … … stField, wherein the wfeldnum field is the number of stfields, the wween field is the total number of bytes of the stfields 1+ stField2+ stField3+ … … stField, and the stField1+ stField2+ stField3+ … … stField is used for carrying the operation statistics.
Optionally, each stField is a continuous field composed of a dwrid (t) field, a wlen (l) field and an stval (v) field, the dwrid (t) field is a service item in the service type, the wlen (l) field is the number of bytes of the stval (v) field, and the stval (v) field is used for carrying running statistics data.
Optionally, the stval (v) field is a continuous field composed of a csubtype (t) field, a clen (l) field and a wcount (v) field, the csubtype (t) field is a sub-service item in the service item, the clen (l) field is the number of bytes of the wcount (v) field, and the wcount (v) field is used for carrying the running statistics data.
Optionally, the dwrid (t) field is represented using 4 bytes DWORD and the wcount (v) field is represented using bytes.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, in the running process of the target application program, the running statistical data is obtained, the running statistical data is coded according to the coding mode of the type length value TLV, and the coded running statistical data is sent to the server. In this way, the operation statistical data are encoded according to the TLV encoding mode, the terminal can only store one encoding mode, and the corresponding server can also only store one encoding mode, so that the storage resources can be saved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for reporting statistical data according to an embodiment of the present invention;
fig. 2 is a system diagram for reporting statistical data according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for reporting statistical data according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The embodiment of the invention provides a method for reporting statistical data, and an execution main body of the method can be a terminal. The terminal can be a mobile phone, a tablet computer and the like, a target application program is installed in the terminal, the target application program is any application program in all application programs, the terminal can be provided with a processor, a memory, a transceiver and the like, the processor can be used for processing in the process of reporting statistical data, the memory can be used for reporting data required in the process of the statistical data and generated data, and the transceiver can be used for receiving and sending messages and the like. The terminal may further be provided with an input/output device such as a screen, and the screen may be used to display an interface of the target application program. In this embodiment, a terminal is taken as an example of a mobile phone, and a detailed description of the scheme is performed, and other situations are similar to the above, and are not described again in this embodiment.
As shown in fig. 1, the processing flow of the method may include the following steps:
step 101, acquiring running statistical data in the running process of the target application program.
The technical staff can classify the operation statistical data according to the service type of the operation statistical data, for example, the operation statistical data can be classified into behavior data, performance data and quality data of the user, the behavior data of the user can be data of clicking options of an application program, the use duration of the application program and the like, the performance data can be power consumption of the application program and the like, the quality data can be packet loss rate of a voice data packet and the like, and the operation statistical data mentioned in the embodiment of the present invention includes one or more of the behavior data of the user of a target application program, the performance data of the target application program and the quality data of the target application program. The target application program is any application program in all application programs, such as a live application program and the like.
In implementation, a technician may set a data statistics process in a target application program, and when the target application program is started, the target application program may start the data statistics process in a manner of calling an interface, as shown in fig. 2, in an operation process of the target application program, each time a user clicks one option in the target application program, the data statistics process may record a click event of clicking the option once, and the data statistics process may record power consumption of the target application program every 10 minutes, and may also record a packet loss rate of data sent by the user every time.
It should be noted that, for the operation statistical data of different service types, a technician may set different data statistical processes respectively, or may set only one data statistical process.
And 102, encoding the operation statistical data according to the encoding mode of the type length value TLV.
In implementation, after the terminal obtains the running statistical data by using a data statistics process in the target application, as shown in fig. 2, the terminal may use a TLV (type, length, value) encoding manner to perform encoding, so as to obtain the encoded running statistical data.
Optionally, the field of the encoded running statistical data is a continuous field composed of a uid field, a cType field, a dwBufferCode field, a cVerLen field, a strVerison field, a cmachienecordeen field, a strmachienecode field and a stData field, where the uid field is a login account of the target application program, the cType field is a service type, the dwBufferCode field is a reserved field, the cVerLen field is a byte number of a version number of the target application program, the strVerison field is a version number, the cmachienecorden field is a byte number of a machine code of a login terminal of the target application program, the strchine code field is a machine code, and the stData field is a custom protocol body part and is used for carrying the running statistical data.
In implementation, a technician prestores TLV encoding modes in the terminals, where the encoding modes have a bag format of uid field + cType field + dwBufferCode field + cVerLen field + strVerison field + cmacheinecodelen field + strMachineCode field + stData field, and the terminals of the fields can be filled with different contents.
The uid field is a login account of the target application program, and the login account does not refer to a user name of the user for logging in the target application program, but is a unique identifier of the user name of the server corresponding to the user for logging in the target application program.
The cType field is a service type, and can be a behavior type, a performance type, a quality type and the like of the user.
The dwBufferCode field is a reserved field, the default value can now be 0 in consideration of subsequent protocol changes or service type extensions, and the target application can negotiate other values with the server subsequently if extensions are desired.
The cVerLen field is the length of the version number of the target application, i.e. the number of bytes.
The strVerison field is the version number of the target application program, so that the running condition information of the application programs with different version numbers can be counted for the same application program.
The cMachineCodeLen field is the length of the machine code of the login terminal of the target application, i.e. the number of bytes.
The strMachineCode field is a machine code of the login terminal of the target application program, and the machine code may be a unique identifier of the login terminal, and may be a Media Access Control (MAC) address. Therefore, the running condition information of different types of terminals for the same application program can be counted.
It should be noted that the machine code related to the embodiment of the present invention is an MAC address, and any unique identifier that can be used for identifying a terminal can be used as the machine code, which is not limited in the embodiment of the present invention.
The stData field is a custom protocol body part and can be used for carrying running statistical data.
Optionally, the stData field is a continuous field composed of a wfeldnum field, a wween field and a stField1+ stField2+ stField3+ … … stField, wherein the wfeldnum field is the number of stfields, the wween field is the total number of bytes of the stfields 1+ stField2+ stField3+ … … stField, and the stField1+ stField2+ stField3+ … … stField is used for carrying the operation statistics.
In an implementation, the stData field may be a continuous field composed of a wfeldnum field, a wLen field, and stField1+ stField2+ stField3+ … … stField, i.e., stData ═ wfeldnum + wLen + stField1+ stField2+. + stField. wFielddNum denotes the number of stFields, where wFielddNum is N due to the presence of stFieldN, indicating that there are N stFields. wLen is stField1+ stField2+. + stField dn total number of bytes, which can be represented by the following formula: wLen ═ Len (stField1+ stField2+. + stField dn). stField1+ stField2+. + stField may be used to carry running statistics.
It should be noted that the number of stField fields may be determined based on the data size of the operation statistical data, where N is larger when the data size is larger, and N is smaller when the data size is smaller.
It should be further noted that one type field corresponds to one service type, and in one service type, service items of multiple stField fields included in the stData field may be the same or different, and the embodiment of the present invention is not limited thereto.
Through the processing, the service items of the stField fields can be different, so that the operation statistical data of different service items of the same service type can be sent to the server at one time without being sent for multiple times, the interaction times of the terminal and the server can be reduced, and the service performance of the terminal is improved.
Optionally, each stField is a continuous field composed of a dwrid (t) field, a wlen (l) field and an stval (v) field, the dwrid (t) field is a service item in the service type, the wlen (l) field is the number of bytes of the stval (v) field, and the stval (v) field is used for carrying running statistics data.
In implementation, N stfields are described above, N may be determined based on the data amount of the running statistics, and each stField field is a continuous field composed of a dwrid (t) field, a wlen (l) field, and an stval (v) field, i.e., stField ═ dwrid (t) + wlen (l) + stval (v).
The dwrid (t) field is a service item in the service type, for example, the service type is a behavior class of the user, and the service item may be a click item (for example, the number of times a certain option is clicked, etc.), a duration item (for example, the duration of use, etc.), a login status item (for example, stealth, online, etc.), and the like. The service type is performance type, the service item is power consumption, card pause times and the like, the service type is quality type, and the service item is packet loss rate (the proportion of lost of every 100 data packets) and the like.
wLen (L) is the length of stVal (V), i.e., the number of bytes.
stval (v) is used to carry the running statistics of the traffic items represented by dwrid (t). For example, the service type is a behavior class of the user, the service item is a click item, and the operation statistical data is a click number.
Optionally, since sometimes, in order to obtain more detailed operation statistics data, each service item may further include a sub-service item, where the corresponding stval (v) field is a continuous field composed of a csubtype (t) field, a clen (l) field, and a wcount (v) field, the csubtype (t) field is a sub-service item in the service item, the clen (l) field is the number of bytes of the wcount (v) field, and the wcount (v) field is used for carrying the operation statistics data.
In an implementation, the stval (v) field is a continuous field composed of a csubtype (t) field, a clen (l) field, and a wcount (v) field, i.e., stval (v) ═ csubtype (t) + clen (l) + wcount (v).
The csubtype (t) field is a sub-service item in the service item, for example, the target application program is a live broadcast application program, the service type is a behavior class of the user, the service item may be a click item (e.g., the number of times a certain option is clicked, etc.), a time length item (e.g., the duration of use, etc.), the service item is a click item, the sub-service item may be the number of clicks of an option entering a live broadcast room, the number of clicks of a gift delivery option in the live broadcast room, etc., and the service item is a duration item, the sub-service item may be the duration of live broadcast watching in the live broadcast room, the duration of use of the target application program, the duration of jump between pages, etc.
The clen (l) field is the length of the wcount (v) field, i.e. the number of bytes, so that the server can determine the number of bytes of the running statistics.
The wcount (v) field is used for carrying the running statistical data of the sub-service item represented by the csubtype (t), for example, the target application program is a live broadcast application program, the service type is a behavior type of the user, the service item may be a click item, the sub-service item is the click number of the gift delivery option in the live broadcast room, and the running statistical data is the click number.
It should be noted that the number of stval (v) in one stField may be one or more, and the embodiment of the present invention is not limited.
Optionally, the dwrid (t) field is represented using 4 bytes DWORD and the wcount (v) field is represented using bytes.
In implementation, since there are generally many service items, the dwrid (t) field is represented by DWORD (4 bytes), DWORD is 4 bytes, and one byte is 8 bits, so there are 32 bits, each bit is represented by 0 or 1, that is, there are 32 power of service items that can be 2, that is, 32 power of service items that can show 2 at most, and the number of service items that can basically satisfy the statistics of an application program is calculated to be as much as 40 hundred million.
Meanwhile, in order to obtain more detailed operation statistical data, each service item may further include a sub-service item, the sub-service item may be represented by a byte, one byte is 8 bits, each bit is represented by 0 or 1, and it is equivalent to that the service sub-item may have 2 power-of-8 sub-service items, that is, each service may include at most 2 power-of-8 sub-service items.
Step 103, sending the encoded running statistical data to a server.
In implementation, as shown in fig. 2, the terminal obtains the encoded operation statistical data, may send the encoded operation statistical data to the server, and the server may decode the operation statistical data sent by the terminal after receiving the operation statistical data sent by the terminal.
In addition, the server can also send the operation statistical data to a terminal used by a technician, and the technician can improve the function of the target application program by checking the operation statistical data of the target application program, so that the target application program can be used more smoothly.
In the embodiment of the invention, in the running process of the target application program, the running statistical data is obtained, the running statistical data is coded according to the coding mode of the type length value TLV, and the coded running statistical data is sent to the server. In this way, the operation statistical data are encoded according to the TLV encoding mode, the terminal can only store one encoding mode, and the corresponding server can also only store one encoding mode, so that the storage resources can be saved.
Based on the same technical concept, an embodiment of the present invention further provides a device for reporting statistical data, as shown in fig. 3, the device includes:
an obtaining module 310, configured to obtain running statistical data during a running process of a target application, where the running statistical data includes one or more of behavior class data of a user of the target application, performance class data of the target application, and quality class data of the target application;
the encoding module 320 is configured to encode the operation statistic data according to an encoding manner of the type length value TLV;
a sending module 330, configured to send the encoded running statistic data to a server.
Optionally, the field of the encoded running statistical data is a continuous field composed of a uid field, a cType field, a dwBufferCode field, a cVerLen field, a strVerison field, a cmachienecorden field, a strmachienecode field and a stData field, where the uid field is a login account of the target application program, the cType field is a service type, the dwBufferCode field is a reserved field, the cVerLen field is a byte number of a version number of the target application program, the strVerison field is the version number, the cmachienecorden field is a byte number of a machine code of a login terminal of the target application program, the strmachienecode field is the machine code, and the stData field is a custom protocol body part and is used for carrying the running statistical data.
Optionally, the stData field is a continuous field composed of a wfeldnum field, a wween field and a stField1+ stField2+ stField3+ … … stField, wherein the wfeldnum field is the number of stfields, the wween field is the total number of bytes of the stfields 1+ stField2+ stField3+ … … stField, and the stField1+ stField2+ stField3+ … … stField is used for carrying the operation statistics.
Optionally, each stField is a continuous field composed of a dwrid (t) field, a wlen (l) field and an stval (v) field, the dwrid (t) field is a service item in the service type, the wlen (l) field is the number of bytes of the stval (v) field, and the stval (v) field is used for carrying running statistics data.
Optionally, the stval (v) field is a continuous field composed of a csubtype (t) field, a clen (l) field and a wcount (v) field, the csubtype (t) field is a sub-service item in the service item, the clen (l) field is the number of bytes of the wcount (v) field, and the wcount (v) field is used for carrying the running statistics data.
Optionally, the dwrid (t) field is represented using 4 bytes DWORD and the wcount (v) field is represented using bytes.
In the embodiment of the invention, in the running process of the target application program, the running statistical data is obtained, the running statistical data is coded according to the coding mode of the type length value TLV, and the coded running statistical data is sent to the server. In this way, the operation statistical data are encoded according to the TLV encoding mode, the terminal can only store one encoding mode, and the corresponding server can also only store one encoding mode, so that the storage resources can be saved.
It should be noted that: in the device for reporting statistical data provided in the above embodiment, when recommending songs, only the division of the above functional modules is used as an example, and in practical applications, the function distribution may be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the apparatus for reporting statistical data and the method for reporting statistical data provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
Please refer to fig. 4, which illustrates a schematic structural diagram of a terminal according to an embodiment of the present invention, where the terminal may be configured to implement the method for reporting statistical data provided in the foregoing embodiment. Specifically, the method comprises the following steps:
the terminal 400 may include RF (Radio Frequency) circuitry 110, memory 120 including one or more computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, audio circuitry 160, a WiFi (wireless fidelity) module 170, a processor 180 including one or more processing cores, and a power supply 190. Those skilled in the art will appreciate that the terminal configuration shown in fig. 4 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information from a base station and then sends the received downlink information to the one or more processors 180 for processing; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuitry 110 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, the RF circuitry 110 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (short messaging Service), etc.
The memory 120 may be used to store software programs and modules, and the processor 180 executes various functional applications and data processing by operating the software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal 400, and the like. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 120 may further include a memory controller to provide the processor 180 and the input unit 130 with access to the memory 120.
The input unit 130 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 130 may include a touch-sensitive surface 131 as well as other input devices 132. The touch-sensitive surface 131, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 131 (e.g., operations by a user on or near the touch-sensitive surface 131 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. Additionally, the touch-sensitive surface 131 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 may also include other input devices 132. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 140 may be used to display information input by or provided to a user and various graphical user interfaces of the terminal 400, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 140 may include a Display panel 141, and optionally, the Display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141, and when a touch operation is detected on or near the touch-sensitive surface 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although in FIG. 4, touch-sensitive surface 131 and display panel 141 are shown as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 may be integrated with display panel 141 to implement input and output functions.
The terminal 400 can also include at least one sensor 150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 141 and/or a backlight when the terminal 400 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal 400, detailed descriptions thereof are omitted.
Audio circuitry 160, speaker 161, and microphone 162 may provide an audio interface between a user and terminal 400. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 160, and then outputs the audio data to the processor 180 for processing, and then to the RF circuit 110 to be transmitted to, for example, another terminal, or outputs the audio data to the memory 120 for further processing. The audio circuit 160 may also include an earbud jack to provide communication of a peripheral headset with the terminal 400.
WiFi belongs to a short-distance wireless transmission technology, and the terminal 400 can help a user send and receive e-mails, browse web pages, access streaming media, and the like through the WiFi module 170, and provides wireless broadband internet access for the user. Although fig. 4 shows the WiFi module 170, it is understood that it does not belong to the essential constitution of the terminal 400, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 180 is a control center of the terminal 400, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the terminal 400 and processes data by operating or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the mobile phone. Optionally, processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The terminal 400 further includes a power supply 190 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 180 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 190 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal 400 may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the display unit of the terminal 400 is a touch screen display, and the terminal 400 further includes a memory and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:
acquiring running statistical data in the running process of a target application program, wherein the running statistical data comprises one or more of behavior class data of a user of the target application program, performance class data of the target application program and quality class data of the target application program;
encoding the operation statistical data according to an encoding mode of a type length value TLV;
and sending the encoded running statistical data to a server.
Optionally, the field of the encoded running statistical data is a continuous field composed of a uid field, a cType field, a dwBufferCode field, a cVerLen field, a strVerison field, a cmachienecorden field, a strmachienecode field and a stData field, where the uid field is a login account of the target application program, the cType field is a service type, the dwBufferCode field is a reserved field, the cVerLen field is a byte number of a version number of the target application program, the strVerison field is the version number, the cmachienecorden field is a byte number of a machine code of a login terminal of the target application program, the strmachienecode field is the machine code, and the stData field is a custom protocol body part and is used for carrying the running statistical data.
Optionally, the stData field is a continuous field composed of a wfeldnum field, a wween field and a stField1+ stField2+ stField3+ … … stField, wherein the wfeldnum field is the number of stfields, the wween field is the total number of bytes of the stfields 1+ stField2+ stField3+ … … stField, and the stField1+ stField2+ stField3+ … … stField is used for carrying the operation statistics.
Optionally, each stField is a continuous field composed of a dwrid (t) field, a wlen (l) field and an stval (v) field, the dwrid (t) field is a service item in the service type, the wlen (l) field is the number of bytes of the stval (v) field, and the stval (v) field is used for carrying running statistics data.
Optionally, the stval (v) field is a continuous field composed of a csubtype (t) field, a clen (l) field and a wcount (v) field, the csubtype (t) field is a sub-service item in the service item, the clen (l) field is the number of bytes of the wcount (v) field, and the wcount (v) field is used for carrying the running statistics data.
Optionally, the dwrid (t) field is represented using 4 bytes DWORD and the wcount (v) field is represented using bytes.
In the embodiment of the invention, in the running process of the target application program, the running statistical data is obtained, the running statistical data is coded according to the coding mode of the type length value TLV, and the coded running statistical data is sent to the server. In this way, the operation statistical data are encoded according to the TLV encoding mode, the terminal can only store one encoding mode, and the corresponding server can also only store one encoding mode, so that the storage resources can be saved.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. A method for reporting statistical data, the method comprising:
acquiring running statistical data in the running process of a target application program, wherein the running statistical data comprises one or more of behavior class data of a user of the target application program, performance class data of the target application program and quality class data of the target application program, a data statistical process is set in the target application program in advance, and when the target application program is started, the target application program starts the data statistical process in an interface calling mode;
encoding the operation statistical data according to an encoding mode of a type length value TLV;
and sending the encoded operation statistical data to a server, wherein fields of the encoded operation statistical data are continuous fields consisting of a uid field, a cType field, a dwBuffercode field, a cVerLen field, a strVerison field, a cMethaneCode field, a strMachineCode field and a stData field, the uid field is a login account of the target application program, the cType field is a service type, the dwBuffercode field is a reserved field, the cVerLen field is the byte number of the version number of the target application program, the strVerison field is the version number, the cMethaneCode field is the byte number of the machine code of the login terminal of the target application program, the strchine code field is the machine code, and the stData self-defined protocol body part and is used for carrying the operation statistical data.
2. The method of claim 1, wherein the stData field is a continuous field consisting of a wFielddNum field, a wLen field and a stField1+ stField2+ stField3+ … … stFieldN field, wherein the wFielddNum field is the number of stFields, the wLen field is the total number of bytes of the stField1+ stField2+ stField3+ … … stFieldN field, and the stField1+ stField2+ stField3+ … … stFieldN field is used for carrying the running statistics.
3. The method of claim 2, wherein each stField is a consecutive field consisting of a dwrid (t) field, a wlen (l) field, and an stval (v) field, wherein the dwrid (t) field is a service entry in the service type, wherein the wlen (l) field is the number of bytes of the stval (v) field, and wherein the stval (v) field is used for carrying the running statistics.
4. The method of claim 3, wherein the stVal (V) field is a continuous field consisting of a cSubType (t) field, a cLen (l) field and a wCount (v) field, the cSubType (t) field is a sub-service item in the service item, the cLen (l) field is the number of bytes of the wCount (v) field, and the wCount (v) field is used for carrying the operation statistics data.
5. An apparatus for reporting statistical data, the apparatus comprising:
the system comprises an acquisition module, a data statistics module and a data statistics module, wherein the acquisition module is used for acquiring operation statistical data in the operation process of a target application program, the operation statistical data comprises one or more of behavior class data of a user of the target application program, performance class data of the target application program and quality class data of the target application program, a data statistics process is set in the target application program in advance, and when the target application program is started, the data statistics process is started by the target application program in an interface calling mode;
the encoding module is used for encoding the operation statistical data according to an encoding mode of a type length value TLV;
the sending module is used for sending the coded running statistical data to a server, the fields of the coded running statistical data are continuous fields consisting of a uid field, a cType field, a dwBuffercode field, a cVerLen field, a strVerison field, a cMethineCode field, a strMethineCode field and a stData field, wherein the uid field is a login account of the target application program, the cType field is a service type, the dwBuffercode field is a reserved field, the cVerLen field is the number of bytes of a version number of the target application program, the strVerison field is the version number, the cMethineCode field is the number of bytes of a machine code of a login terminal of the target application program, the strMethineCode field is the machine code, and the stData field is a custom protocol body part and is used for carrying the running statistical data.
6. The apparatus of claim 5, wherein the stData field is a continuous field consisting of a wFielddNum field, a wLen field, and a stField1+ stField2+ stField3+ … … stFieldN field, wherein the wFielddNum field is the number of stFields, the wLen field is the total number of bytes of the stField1+ stField2+ stField3+ … … stFieldN field, and the stField1+ stField2+ stField3+ … … stFieldN field is used for carrying the running statistics.
7. The apparatus of claim 6, wherein each stField field is a consecutive field consisting of a dwRID (T) field, a wLen (L) field, and a stVal (V) field, wherein the dwRID (T) field is a service entry in a service type, the wLen (L) field is the number of bytes of the stVal (V) field, and wherein the stVal (V) field is used for carrying the operation statistics.
8. The apparatus of claim 7, wherein the stVal (V) field is a consecutive field consisting of a cSubType (t) field, a cLen (l) field and a wCount (v) field, the cSubType (t) field is a sub-service item in the service item, the cLen (l) field is the number of bytes of the wCount (v) field, and the wCount (v) field is used for carrying the operation statistics data.
CN201710476218.8A 2017-06-21 2017-06-21 Method and device for reporting statistical data Active CN107315623B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710476218.8A CN107315623B (en) 2017-06-21 2017-06-21 Method and device for reporting statistical data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710476218.8A CN107315623B (en) 2017-06-21 2017-06-21 Method and device for reporting statistical data

Publications (2)

Publication Number Publication Date
CN107315623A CN107315623A (en) 2017-11-03
CN107315623B true CN107315623B (en) 2020-08-11

Family

ID=60184138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710476218.8A Active CN107315623B (en) 2017-06-21 2017-06-21 Method and device for reporting statistical data

Country Status (1)

Country Link
CN (1) CN107315623B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109992331A (en) * 2017-12-28 2019-07-09 重庆南华中天信息技术有限公司 The common function portal assembly dynamic adjusting method and system of Behavior-based control analysis

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1933479A (en) * 2005-09-16 2007-03-21 华为技术有限公司 Method for transmitting data in communication system and system thereof
CN101227348A (en) * 2008-02-02 2008-07-23 杭州华三通信技术有限公司 Server and method for collecting performance statistics data of network equipment
CN102377602A (en) * 2011-10-26 2012-03-14 国家广播电影电视总局广播科学研究院 Data stream processing method and system
CN105320572A (en) * 2014-06-27 2016-02-10 腾讯科技(深圳)有限公司 Browser abnormity processing method, device and system
CN106407092A (en) * 2016-09-30 2017-02-15 广州华多网络科技有限公司 Data reporting method, data reporting device, data statistics method and data statistics device for interface operations

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1933479A (en) * 2005-09-16 2007-03-21 华为技术有限公司 Method for transmitting data in communication system and system thereof
CN101227348A (en) * 2008-02-02 2008-07-23 杭州华三通信技术有限公司 Server and method for collecting performance statistics data of network equipment
CN102377602A (en) * 2011-10-26 2012-03-14 国家广播电影电视总局广播科学研究院 Data stream processing method and system
CN105320572A (en) * 2014-06-27 2016-02-10 腾讯科技(深圳)有限公司 Browser abnormity processing method, device and system
CN106407092A (en) * 2016-09-30 2017-02-15 广州华多网络科技有限公司 Data reporting method, data reporting device, data statistics method and data statistics device for interface operations

Also Published As

Publication number Publication date
CN107315623A (en) 2017-11-03

Similar Documents

Publication Publication Date Title
KR101978590B1 (en) Message updating method, device and terminal
WO2016150331A1 (en) Method and device for operating game client
CN106708554B (en) Program operating method and device
CN106254910B (en) Method and device for recording image
CN104142862A (en) Overload protection method and device for server
CN105207880B (en) Group recommending method and device
CN106294168B (en) A kind of method and system carrying out Application testing
CN103455330A (en) Application program management method, terminal, equipment and system
WO2017096909A1 (en) Data connection establishing method and apparatus
CN107104763B (en) Method and device for setting timeout retransmission duration
CN104660769B (en) A kind of methods, devices and systems for adding associated person information
CN111273955B (en) Thermal restoration plug-in optimization method and device, storage medium and electronic equipment
CN106682189B (en) File name display method and device
CN107104930A (en) It is a kind of that the methods, devices and systems for checking authority are set
CN107317828B (en) File downloading method and device
CN106470234B (en) Equipment discovery method and device
CN105577712B (en) A kind of file uploading method, device and system
CN107622234B (en) Method and device for displaying budding face gift
CN115118636B (en) Method and device for determining network jitter state, electronic equipment and storage medium
CN107315623B (en) Method and device for reporting statistical data
CN105159655B (en) Behavior event playing method and device
CN105282628B (en) A kind of method and apparatus of video playing
CN107786423A (en) A kind of method and system of instant messaging
CN107203427B (en) Process control method and device in application multi-open mode and mobile terminal
CN106330875B (en) Message display method and device

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210111

Address after: 511442 3108, 79 Wanbo 2nd Road, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Patentee after: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 511449 28th floor, block B1, Wanda Plaza, Wanbo business district, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Patentee before: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20171103

Assignee: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

Assignor: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Contract record no.: X2021440000053

Denomination of invention: A method and device for reporting statistical data

Granted publication date: 20200811

License type: Common License

Record date: 20210208