CN112882886A - Software use duration statistical method and device - Google Patents

Software use duration statistical method and device Download PDF

Info

Publication number
CN112882886A
CN112882886A CN201911203868.0A CN201911203868A CN112882886A CN 112882886 A CN112882886 A CN 112882886A CN 201911203868 A CN201911203868 A CN 201911203868A CN 112882886 A CN112882886 A CN 112882886A
Authority
CN
China
Prior art keywords
software
window
counting
display area
acquiring
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.)
Pending
Application number
CN201911203868.0A
Other languages
Chinese (zh)
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201911203868.0A priority Critical patent/CN112882886A/en
Publication of CN112882886A publication Critical patent/CN112882886A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • 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/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Abstract

The invention discloses a method and a device for counting software service time, and relates to the technical field of computers. One embodiment of the method comprises: acquiring the arrangement sequence of the forms corresponding to the software on the z sequence; acquiring a process identifier corresponding to each window and a display area on a terminal screen according to the window handle; determining software information corresponding to the window according to the process identifier, wherein the software information indicates timestamp information; and counting the service time of the corresponding software according to the arrangement sequence, the display area and the software information. The embodiment avoids the problem of statistical omission, and improves the accuracy of statistical data.

Description

Software use duration statistical method and device
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for counting software service time.
Background
The user viscosity and other information of the corresponding software can be obtained through the use time of the software, and data support is provided for popularization or adjustment of the software.
In the prior art, the software service time is counted mainly by means of monitoring the change of window time, acquiring a system process flow table at fixed time, capturing a screen on a desktop at fixed time and the like.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
1. the problem of window coverage cannot be solved, and the situation of omission of statistics is easy to occur;
2. software in a user visible area cannot be determined through a system process flow table, and a corresponding software program is difficult to accurately identify through screen capture, so that the accuracy rate of statistical data is low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for counting software usage time, which can avoid the problem of missing statistics and improve the accuracy of statistical data.
In order to achieve the above object, according to a first aspect of the embodiments of the present invention, there is provided a method for counting software usage time, including:
acquiring the arrangement sequence of the forms corresponding to the software on the z sequence;
acquiring a process identifier corresponding to each window and a display area on a terminal screen according to the window handle;
determining software information corresponding to the window according to the process identifier, wherein the software information indicates timestamp information;
and counting the service time of the corresponding software according to the arrangement sequence, the display area and the software information.
Further, the step of acquiring the display area of each frame on the terminal screen according to the frame handle comprises: and acquiring the coordinate position of the corresponding window on the terminal screen according to the window handle, and acquiring the display area of the corresponding window on the terminal screen by performing area calculation on the coordinate position.
Further, the step of counting the service life of the corresponding software according to the arrangement sequence, the display area and the software information comprises the following steps: and according to the arrangement sequence, determining all frames enabling the display areas corresponding to the frames to be larger than or equal to the upper limit of the threshold value of the terminal screen from the uppermost frame of the z sequence, and software information corresponding to all the frames.
Further, the step of counting the usage duration of the corresponding software according to the arrangement order, the display area and the software information further comprises: and according to the software information, counting the service time of the software corresponding to all the forms when the display area corresponding to each form is positioned between the upper threshold and the lower threshold of the terminal screen.
Further, the statistical method of the software duration further comprises the following steps: and accumulating the use durations of the same type of software to obtain the total use duration.
Further, the number of the terminal screens is at least one.
Further, the statistical method of the software duration further comprises the following steps: setting a cycle period, and executing the following steps in a cycle mode: acquiring the arrangement sequence of the forms corresponding to the software on the z sequence; acquiring a process identifier corresponding to each window and a display area on a terminal screen according to the window handle; determining software information corresponding to the window according to the process identifier; and counting the service time of the corresponding software according to the arrangement sequence, the display area and the software information.
According to a second aspect of the embodiments of the present invention, there is provided a device for counting software usage time, including:
the arrangement sequence acquisition module is used for acquiring the arrangement sequence of the windows corresponding to the software on the z sequence;
the window handle module is used for acquiring a process identifier corresponding to each window and a display area on a terminal screen according to the window handle;
the software information determining module is used for determining software information corresponding to the window according to the process identifier, wherein the software information indicates timestamp information;
and the counting module is used for counting the service life of the corresponding software according to the arrangement sequence, the display area and the software information.
According to a third aspect of the embodiments of the present invention, there is provided a terminal apparatus including:
one or more processors;
a storage device for storing one or more programs,
when executed by one or more processors, the one or more programs cause the one or more processors to implement any of the software usage time statistics described above.
According to a fourth aspect of the embodiments of the present invention, there is provided a computer-readable medium, on which a computer program is stored, which when executed by a processor, implements a method for counting usage time of software as any one of the above.
One embodiment of the above invention has the following advantages or benefits: the arrangement sequence of the forms corresponding to the acquisition software on the z sequence is adopted; acquiring a process identifier corresponding to each window and a display area on a terminal screen according to the window handle; determining software information corresponding to the window according to the process identifier, wherein the software information indicates timestamp information; according to the technical means of counting the service time of corresponding software according to the arrangement sequence, the display area and the software information, the technical problems of statistical omission and low statistical accuracy caused by the problem that window coverage cannot be solved in the prior art are solved, and the technical effects of avoiding the statistical omission and improving the accuracy of statistical data are achieved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a statistical method for software usage duration according to a first embodiment of the present invention;
FIG. 2a is a schematic diagram of a main flow of a statistical method for software usage duration according to a second embodiment of the present invention;
FIG. 2b is a schematic representation of a z-order placement order obtained according to the method shown in FIG. 2 a;
FIG. 3 is a schematic diagram of the main modules of the device for counting the usage duration of software according to the embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a statistical method for software usage duration according to a first embodiment of the present invention; as shown in fig. 1, the method for counting software service life provided by the embodiment of the present invention mainly includes:
and step S101, acquiring the arrangement sequence of the forms corresponding to the software in the z sequence.
The window z-order is a virtual axis in the terminal screen, from the inside out. If the width of the terminal screen is taken as the x-axis and the height of the terminal screen is taken as the y-axis, the z-order is an axis perpendicular to the two axes, and the main function is to arrange the order of the frames, which frame is activated preferentially, and the like.
The arrangement sequence of the window bodies on the z sequence is obtained through the setting, the situation that the window bodies are covered in the prior art can be solved, and the problem of statistical omission is avoided.
And step S102, acquiring the process identifier corresponding to each form and the display area on the terminal screen according to the form handle.
Specifically, according to the embodiment of the present invention, the step of acquiring the display area of each window on the terminal screen according to the window handle includes: and acquiring the coordinate position of the corresponding window on the terminal screen according to the window handle, and acquiring the display area of the corresponding window on the terminal screen by performing area calculation on the coordinate position.
Through the above setting, a window handle corresponding to a corresponding window can be obtained through an API (Application Program Interface), and then a display area of the window in a terminal screen and a process identifier (PID, process ID) corresponding to the window can be obtained through the window handle.
And step S103, determining software information corresponding to the window according to the process identifier, wherein the software information indicates the timestamp information.
Through the setting, the software name and the timestamp information corresponding to the window displayed on the screen can be obtained, and the service life is further determined.
According to the embodiment of the invention, the software information further comprises information such as a software name, a software version, a digital signature corresponding to the software and the like.
The problem that the accuracy of statistics is influenced by more irrelevant data doped in the derived statistical data due to the fact that software names are obtained to avoid the problem that a process list of a system is obtained in the prior art, software and time before and after process change are obtained by comparing contents in the process list, and the software in a user visible area cannot be distinguished is solved. Whether the software is legal or not can be determined through the digital signature; and the hash value corresponding to the software can be obtained through calculation, and whether the software file is tampered or not can be determined through comparison of the hash values. Through the arrangement, the pirate and illegal software can be effectively avoided.
And step S104, counting the service time of the corresponding software according to the arrangement sequence, the display area and the software information.
Specifically, according to the embodiment of the present invention, the step of counting the usage duration of the corresponding software according to the arrangement order, the display area, and the software information includes: and according to the arrangement sequence, determining all frames which enable the display areas corresponding to the frames to be larger than or equal to the upper limit of the threshold value and software information corresponding to all the frames from the uppermost frame of the z sequence.
Through the setting, the duration corresponding to all software displayed on the terminal screen can be counted, the problem of missing of statistics caused by window covering is avoided, and the accuracy of software duration counting is improved. Meanwhile, according to the statistical result, corresponding software update can be recommended according to the preference of the user.
Further, according to the embodiment of the present invention, the step of counting the usage duration of the corresponding software according to the arrangement order, the display area, and the software information further includes: and according to the software information, counting the service time of the software corresponding to all the forms when the display area corresponding to each form is positioned between the upper threshold and the lower threshold of the terminal screen.
The setting judges the display area of the window at regular time, determines the use state of the corresponding window, namely stops the corresponding use duration statistics when the display area of the window is smaller than the lower limit of the threshold value of the terminal screen (invisible or closed on the screen), and further performs the use duration statistics.
Further, according to a specific implementation manner of the embodiment of the present invention, the software time duration statistical method further includes: and accumulating the use durations of the same types of software to obtain the total use duration, and uploading the total use duration to the server at regular time. According to the actual situation, the user may switch to the window corresponding to other software to perform corresponding business operation in the process of using the software, so that the using process of the same software is not continuous, and therefore, by the setting, in a certain time, several using durations of the same software are summarized to obtain the total using duration, and the total using duration is uploaded to the server to perform corresponding recording.
Specifically, the number of the terminal screens is at least one. According to the actual situation, one or more display screens of the desktop can be provided.
According to the embodiment of the present invention, the method for counting software durations further includes: setting a cycle period, and executing the following steps in a cycle mode: acquiring the arrangement sequence of the forms corresponding to the software on the z sequence; acquiring a process identifier corresponding to each window and a display area on a terminal screen according to the window handle; determining software information corresponding to the window according to the process identifier; and counting the service time of the corresponding software according to the arrangement sequence, the display area and the software information.
By setting a cycle period, the arrangement sequence, the display area and the software information of the window are acquired at regular time, and then the software service time is counted.
According to the technical scheme of the embodiment of the invention, the arrangement sequence of the forms corresponding to the acquisition software on the z sequence is adopted; acquiring a process identifier corresponding to each window and a display area on a terminal screen according to the window handle; determining software information corresponding to the window according to the process identifier, wherein the software information indicates timestamp information; according to the technical means of counting the service time of corresponding software according to the arrangement sequence, the display area and the software information, the technical problems of statistical omission and low statistical accuracy caused by the problem that window coverage cannot be solved in the prior art are solved, and the technical effects of avoiding the statistical omission and improving the accuracy of statistical data are achieved.
FIG. 2a is a schematic diagram of a main flow of a statistical method for software usage duration according to a second embodiment of the present invention; as shown in fig. 2a, the method for counting software durations provided in the embodiment of the present invention mainly includes:
step S201, periodically acquiring the arrangement order of the forms corresponding to the software in the z-order.
Z-order of the window: the position of the windows in the overlapping window stack is indicated, which is positioned according to an imaginary axis (the z-axis extending outwards from the screen). The top z-order frame covers (both fully and partially) all other frames and the bottom z-order frame is covered (both fully and partially) by all other frames.
The arrangement sequence of the forms on the z sequence (as shown in fig. 2 b) is obtained by timing (setting a cycle period), so that the problem that the forms are covered in the prior art can be solved, the situation of omission of statistics is avoided, and the accuracy of the statistics of the use duration is further improved. Specifically, the timing may be set to obtain the arrangement order of the window pairs in the z-order every second or every minute, according to the actual situation.
And step S202, acquiring a display area of the window on the terminal screen according to the window handle according to the arrangement sequence from the upper layer to the lower layer.
Firstly, the display area corresponding to the top window in the z-order is obtained through the window handle, and the window handle is obtained through an API. For example, obtaining the window handle of the top window in z-order can be realized by calling system API GetTopWindow.
Specifically, the coordinate position of the corresponding window on the terminal screen can be obtained according to the window handle, and the display area of the corresponding window on the terminal screen is obtained by performing area calculation on the coordinate position. According to a specific implementation manner of the embodiment of the invention, the implementation can be realized by adopting a calling system API, namely GetWindowRect.
Step S203, judging whether the acquired display area exceeds the upper limit of the terminal screen threshold value. If yes, go to step S204; if not, go to step S205.
The upper limit of the threshold value can be the area of the whole desktop screen (at least one desktop screen) or slightly smaller than the area, so that the purpose of setting is to filter a window with a too small display area, and the influence of irrelevant data on the final statistical result is avoided.
And step S204, acquiring the process identifier of the acquired form according to the form handle.
And acquiring a process identifier corresponding to the form through the form handle, wherein the process identifier indicates attributes of an application program (software) corresponding to the form, including attribute information such as a software name, a software version, a timestamp and the like.
And step S205, acquiring the next window of the arrangement sequence.
According to the arrangement sequence from the uppermost layer to the bottommost layer, the display areas of the corresponding windows are sequentially obtained, and omission of statistics can be avoided. In particular, this may be accomplished by calling the system API GetNextWindow.
And step S206, determining software information corresponding to the form according to the process identifier.
Specifically, the process identifier indicates an attribute of the application (software) corresponding to the form, including attribute information such as a software name, a software version, and a timestamp. Through the setting, the software name and the timestamp information corresponding to the window displayed on the screen can be obtained, and the service life is further determined. The problem that the accuracy of statistics is influenced by acquiring a process list of a system in the prior art, acquiring software and time before and after process change by comparing contents in the process list, and failing to acquire software in a user visible region and derive statistical data doped with more irrelevant data is solved.
Further, information such as a digital signature corresponding to the software can be acquired according to the process identifier, and whether the software is legal or not can be determined through the digital signature; and the hash value corresponding to the software can be obtained through calculation, and whether the software file is tampered or not can be determined through comparison of the hash values. Through the arrangement, the pirate and illegal software can be effectively avoided.
And step S207, counting the service life of the corresponding software according to the software information.
And counting the service time of the corresponding software according to the timestamp information indicated by the software information. Through the arrangement, the statistics of the service time of the software only partially covered is realized, the condition of omission of statistics is avoided, and the accuracy of time statistics is improved. Meanwhile, according to the statistical result, corresponding software update can be recommended according to the preference of the user.
Further, according to the embodiment of the present invention, the statistical method for software time duration further includes: and accumulating the use durations of the same types of software to obtain the total use duration, and uploading the total use duration to the server at regular time. According to the actual situation, the user may switch to the window corresponding to other software to perform corresponding business operation in the process of using the software, so that the using process of the same software is not continuous, and therefore, by the setting, in a certain time, several using durations of the same software are summarized to obtain the total using duration, and the total using duration is uploaded to the server to perform corresponding recording.
According to the technical scheme of the embodiment of the invention, the arrangement sequence of the forms corresponding to the acquisition software on the z sequence is adopted; acquiring a process identifier corresponding to each window and a display area on a terminal screen according to the window handle; determining software information corresponding to the window according to the process identifier, wherein the software information indicates timestamp information; according to the technical means of counting the service time of corresponding software according to the arrangement sequence, the display area and the software information, the technical problems of statistical omission and low statistical accuracy caused by the problem that window coverage cannot be solved in the prior art are solved, and the technical effects of avoiding the statistical omission and improving the accuracy of statistical data are achieved.
FIG. 3 is a schematic diagram of the main modules of the device for counting the usage duration of software according to the embodiment of the present invention; as shown in fig. 3, the device 300 for counting software usage time provided by the embodiment of the present invention mainly includes:
and an arrangement order obtaining module 301, configured to obtain an arrangement order of the forms corresponding to the software in the z-order.
The window z-order is a virtual axis in the terminal screen, from the inside out. If the width of the terminal screen is taken as the x-axis and the height of the terminal screen is taken as the y-axis, the z-order is an axis perpendicular to these two axes.
The arrangement sequence of the window bodies on the z sequence is obtained through the setting, the problem that the window bodies are covered in the prior art can be solved, and the problem of statistical omission is avoided.
And the form handle module 302 is configured to obtain a process identifier corresponding to each form and a display area on the terminal screen according to the form handle.
Specifically, according to the embodiment of the present invention, the form handler module 302 is further configured to: and acquiring the coordinate position of the corresponding window on the terminal screen according to the window handle, and acquiring the display area of the corresponding window on the terminal screen by performing area calculation on the coordinate position.
Through the above setting, a window handle corresponding to a corresponding window can be obtained through an API (Application Program Interface), and then a display area of the window in a terminal screen and a process identifier (PID, process ID) corresponding to the window can be obtained through the window handle.
And a software information determining module 303, configured to determine, according to the process identifier, software information corresponding to the window, where the software information indicates timestamp information.
Through the setting, the software name and the timestamp information corresponding to the window displayed on the screen can be obtained, and the service life is further determined.
According to the embodiment of the invention, the software information further comprises information such as a software name, a software version, a digital signature corresponding to the software and the like.
The problem that the accuracy of statistics is influenced by more irrelevant data doped in the derived statistical data due to the fact that software names are obtained to avoid the problem that a process list of a system is obtained in the prior art, software and time before and after process change are obtained by comparing contents in the process list, and the software in a user visible area cannot be distinguished is solved. Whether the software is legal or not can be determined through the digital signature; and the hash value corresponding to the software can be obtained through calculation, and whether the software file is tampered or not can be determined through comparison of the hash values. Through the arrangement, the pirate and illegal software can be effectively avoided.
And the counting module 304 is configured to count the service life of the corresponding software according to the arrangement order, the display area, and the software information.
Specifically, according to the embodiment of the present invention, the statistic module 304 is further configured to: and according to the arrangement sequence, determining all frames enabling the display areas corresponding to the frames to be larger than or equal to the upper limit of the threshold value of the terminal screen from the uppermost frame of the z sequence, and software information corresponding to all the frames.
Through the setting, the duration corresponding to all software displayed on the screen can be counted, the problem of missing of statistics caused by window covering is avoided, and the accuracy of software duration counting is improved. Meanwhile, according to the statistical result, corresponding software update can be recommended according to the preference of the user.
Further, according to the embodiment of the present invention, the statistic module 304 is further configured to: and according to the software information, counting the service time of the software corresponding to all the forms when the display area corresponding to each form is positioned between the upper threshold and the lower threshold.
The setting judges the display area of the window at regular time, determines the use state of the corresponding window, namely stops the corresponding use duration statistics when the display area of the window is smaller than the lower limit of the threshold value of the terminal screen (invisible or closed on the screen), and further performs the use duration statistics.
Further, according to a specific implementation manner of the embodiment of the present invention, the device 300 for counting software usage durations further includes an uploading module, configured to accumulate the usage durations of the same type of software to obtain a total usage duration, and upload the total usage duration to the server at regular time. According to the actual situation, the user may switch to the window corresponding to other software to perform corresponding business operation in the process of using the software, so that the using process of the same software is not continuous, and therefore, by the setting, in a certain time, several using durations of the same software are summarized to obtain the total using duration, and the total using duration is uploaded to the server to perform corresponding recording.
Specifically, the number of the above-mentioned screens is at least one. According to the actual situation, one or more display screens of the desktop can be provided.
According to the embodiment of the present invention, the device 300 for counting the software use duration further includes a loop module, configured to set a loop period, and perform the following steps in a loop: acquiring the arrangement sequence of the forms corresponding to the software on the z sequence; acquiring a process identifier corresponding to each window and a display area on a terminal screen according to the window handle; determining software information corresponding to the window according to the process identifier; and counting the service time of the corresponding software according to the arrangement sequence, the display area and the software information.
By setting a cycle period, the arrangement sequence, the display area and the software information of the window are acquired at regular time, and then the software service time is counted.
According to the technical scheme of the embodiment of the invention, the arrangement sequence of the forms corresponding to the acquisition software on the z sequence is adopted; acquiring a process identifier corresponding to each window and a display area on a terminal screen according to the window handle; determining software information corresponding to the window according to the process identifier, wherein the software information indicates timestamp information; according to the technical means of counting the service time of corresponding software according to the arrangement sequence, the display area and the software information, the technical problems of statistical omission and low statistical accuracy caused by the problem that window coverage cannot be solved in the prior art are solved, and the technical effects of avoiding the statistical omission and improving the accuracy of statistical data are achieved.
It can be understood that, since the method embodiment and the apparatus embodiment are different presentation forms of the same technical concept, the content of the method embodiment portion in the present application should be synchronously adapted to the apparatus embodiment portion, and is not described herein again.
Fig. 4 shows an exemplary system architecture 400 to which the method for counting the usage time of software or the device for counting the usage time of software according to the embodiment of the present invention can be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405 (this architecture is merely an example, and the components included in a particular architecture may be adapted according to application specific circumstances). The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 401, 402, 403. The background management server may analyze and perform other processing on the received data such as the arrangement order, the process identifier, the display area, and the like, and feed back a processing result (for example, software information, a use duration — only an example) to the terminal device.
It should be noted that the method for counting the software use duration provided by the embodiment of the present invention is generally executed by the server 405, and accordingly, the device for counting the software use duration is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises an arrangement sequence acquisition module, a window handle module and a statistic module. The names of these modules do not in some cases form a limitation on the modules themselves, for example, the arrangement order acquiring module may also be described as a "module for acquiring an arrangement order in the z-order of the corresponding form of the software".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: acquiring the arrangement sequence of the forms corresponding to the software on the z sequence; determining a process identifier corresponding to each window and a display area on a terminal screen according to the window handle; determining software information corresponding to the window according to the process identifier, wherein the software information indicates timestamp information; and counting the service time of the corresponding software according to the arrangement sequence, the display area and the software information.
According to the technical scheme of the embodiment of the invention, the arrangement sequence of the forms corresponding to the acquisition software on the z sequence is adopted; determining a process identifier corresponding to each window and a display area on a terminal screen according to the window handle; determining software information corresponding to the window according to the process identifier, wherein the software information indicates timestamp information; according to the technical means of counting the service time of corresponding software according to the arrangement sequence, the display area and the software information, the technical problems of statistical omission and low statistical accuracy caused by the problem that window coverage cannot be solved in the prior art are solved, and the technical effects of avoiding the statistical omission and improving the accuracy of statistical data are achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A statistical method for software use duration is characterized by comprising the following steps:
acquiring the arrangement sequence of the forms corresponding to the software on the z sequence;
acquiring a process identifier corresponding to each window and a display area on a terminal screen according to the window handle;
determining software information corresponding to the window according to the process identifier, wherein the software information indicates timestamp information;
and counting the service time of the corresponding software according to the arrangement sequence, the display area and the software information.
2. The method for counting the use duration of software according to claim 1, wherein the step of obtaining the display area of each frame on the terminal screen according to the frame handle comprises: and acquiring the coordinate position of the corresponding window on the terminal screen according to the window handle, and acquiring the display area of the corresponding window on the terminal screen by performing area calculation on the coordinate position.
3. The method for counting software use duration according to claim 1 or 2, wherein the step of counting the use duration of the corresponding software according to the arrangement order, the display area and the software information comprises: and determining all the forms which enable the display areas corresponding to the forms to be larger than or equal to the upper limit of the threshold value of the terminal screen and software information corresponding to all the forms from the uppermost form of the z sequence according to the arrangement sequence.
4. The method for counting software service life according to claim 3, wherein the step of counting the service life of the corresponding software according to the arrangement order, the display area and the software information further comprises: and according to the software information, counting the service time of the software corresponding to all the forms when the display area corresponding to each form is positioned between the upper threshold and the lower threshold of the terminal screen.
5. The method for counting software use duration according to claim 1, wherein the method for counting software use duration further comprises: and accumulating the use durations of the same type of software to obtain the total use duration.
6. The method for counting the use duration of software according to claim 1, wherein the number of the terminal screens is at least one.
7. The method for counting software use duration according to claim 1, wherein the method for counting software use duration further comprises: setting a cycle period, and executing the following steps in a cycle mode: acquiring the arrangement sequence of the forms corresponding to the software on the z sequence; acquiring a process identifier corresponding to each window and a display area on a terminal screen according to the window handle; determining software information corresponding to the window according to the process identifier; and counting the service time of the corresponding software according to the arrangement sequence, the display area and the software information.
8. A device for counting the use duration of software is characterized by comprising:
the arrangement sequence acquisition module is used for acquiring the arrangement sequence of the windows corresponding to the software on the z sequence;
the window handle module is used for acquiring a process identifier corresponding to each window and a display area on a terminal screen according to the window handle;
the software information determining module is used for determining software information corresponding to the window according to the process identifier, wherein the software information indicates timestamp information;
and the counting module is used for counting the service life of the corresponding software according to the arrangement sequence, the display area and the software information.
9. A terminal device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN201911203868.0A 2019-11-29 2019-11-29 Software use duration statistical method and device Pending CN112882886A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911203868.0A CN112882886A (en) 2019-11-29 2019-11-29 Software use duration statistical method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911203868.0A CN112882886A (en) 2019-11-29 2019-11-29 Software use duration statistical method and device

Publications (1)

Publication Number Publication Date
CN112882886A true CN112882886A (en) 2021-06-01

Family

ID=76038818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911203868.0A Pending CN112882886A (en) 2019-11-29 2019-11-29 Software use duration statistical method and device

Country Status (1)

Country Link
CN (1) CN112882886A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1995028704A1 (en) * 1994-04-18 1995-10-26 Matsushita Electric Industrial Co., Ltd. Method and apparatus for preventing illegal copying and illegal installation of information on optical recording medium
US20060026253A1 (en) * 2004-07-29 2006-02-02 International Business Machines Corporation Using windowed user interface z-order with collaboration data for improved management of acknowledge of incoming instant messages
CN101004632A (en) * 2005-11-18 2007-07-25 三星电子株式会社 Method and apparatus for reducing power consumption in display area
US20130339284A1 (en) * 2012-06-15 2013-12-19 Iolo Technologies, Llc Predicted software usage duration
JP2014164560A (en) * 2013-02-26 2014-09-08 Nippon Telegr & Teleph Corp <Ntt> Dynamic manual creation device and method therefor and computer program
CN105139122A (en) * 2015-08-21 2015-12-09 福建天晴数码有限公司 Program operation time duration statistics method and system
CN105468462A (en) * 2014-08-14 2016-04-06 腾讯科技(深圳)有限公司 Inter-process communication authentication method and system as well as inter-application communication method and system
US20170083166A1 (en) * 2015-09-18 2017-03-23 Google Inc. Management of inactive windows
US20180196785A1 (en) * 2017-01-10 2018-07-12 Hewlett Packard Enterprise Development Lp Identifying a layout error

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1995028704A1 (en) * 1994-04-18 1995-10-26 Matsushita Electric Industrial Co., Ltd. Method and apparatus for preventing illegal copying and illegal installation of information on optical recording medium
US20060026253A1 (en) * 2004-07-29 2006-02-02 International Business Machines Corporation Using windowed user interface z-order with collaboration data for improved management of acknowledge of incoming instant messages
CN101004632A (en) * 2005-11-18 2007-07-25 三星电子株式会社 Method and apparatus for reducing power consumption in display area
US20130339284A1 (en) * 2012-06-15 2013-12-19 Iolo Technologies, Llc Predicted software usage duration
JP2014164560A (en) * 2013-02-26 2014-09-08 Nippon Telegr & Teleph Corp <Ntt> Dynamic manual creation device and method therefor and computer program
CN105468462A (en) * 2014-08-14 2016-04-06 腾讯科技(深圳)有限公司 Inter-process communication authentication method and system as well as inter-application communication method and system
CN105139122A (en) * 2015-08-21 2015-12-09 福建天晴数码有限公司 Program operation time duration statistics method and system
US20170083166A1 (en) * 2015-09-18 2017-03-23 Google Inc. Management of inactive windows
US20180196785A1 (en) * 2017-01-10 2018-07-12 Hewlett Packard Enterprise Development Lp Identifying a layout error

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HOWARDF.DOVER ET AL: "Asymmetric effects of dynamic usage behavior on duration in subscription-based online service", 《JOURNAL OF INTERACTIVE MARKETING》, vol. 20, no. 3, 31 December 2006 (2006-12-31) *
安凤翔等: "可视化组件技术在播控系统中的应用", 《电信技术》, no. 1, 25 January 2018 (2018-01-25) *

Similar Documents

Publication Publication Date Title
CN110012217B (en) Method and device for determining acquisition resolution and electronic equipment
EP3452907B1 (en) Control of applications that use system resources
CN107390983B (en) Service instruction execution method, client and storage medium
CN110392306B (en) Data processing method and equipment
US20140052542A1 (en) Method, client and system for recommending software
WO2014026553A1 (en) Method, client, and system for recommending software
CN111258736B (en) Information processing method and device and electronic equipment
US11616638B2 (en) Blockchain ledger growth management
CN113505302A (en) Method, device and system for supporting dynamic acquisition of buried point data and electronic equipment
CN109388737B (en) Method and device for sending exposure data of content item and storage medium
CN105553770B (en) Data acquisition control method and device
US10205813B2 (en) Method and system for detecting abnormal contact information and server
CN109492163B (en) List display recording method and device, terminal equipment and storage medium
US10311031B2 (en) Method, apparatus, and storage medium for removing redundant information from terminal
CN110928706A (en) Applet interaction method and device, electronic equipment and storage medium
CN111698365A (en) Information display method and device
CN109391658B (en) Account data synchronization method and equipment, storage medium and terminal thereof
CN111246273B (en) Video delivery method and device, electronic equipment and computer readable medium
US20170372681A1 (en) Method, apparatus, and storage medium
US9910737B2 (en) Implementing change data capture by interpreting published events as a database recovery log
EP3594823B1 (en) Information display method, terminal and server
CN112882886A (en) Software use duration statistical method and device
CN110262856B (en) Application program data acquisition method, device, terminal and storage medium
CN114143590A (en) Video playing method, server and storage medium
EP3214829B1 (en) Methods for presenting contact information and determining contact information and related devices

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