CN103957230B - A kind of client user's number determines method, server, client and system - Google Patents
A kind of client user's number determines method, server, client and system Download PDFInfo
- Publication number
- CN103957230B CN103957230B CN201410086524.7A CN201410086524A CN103957230B CN 103957230 B CN103957230 B CN 103957230B CN 201410086524 A CN201410086524 A CN 201410086524A CN 103957230 B CN103957230 B CN 103957230B
- Authority
- CN
- China
- Prior art keywords
- client
- time
- timestamp
- data
- logs
- 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
Links
Abstract
The present invention provides a kind of client user's numbers to determine method, server, client and system, by when determining client user's number, only consider the login time of client, to distinguish the multiple login of same client within a certain period of time, without carrying out complicated data deduplication, so that it may accurately to determine actual client user's number.
Description
Technical field
The present invention relates to technical field of internet application more particularly to a kind of client user's number determine method, server,
Client and system.
Background technology
Existing each client software has the demand for counting its daily active users, it is common practice that in client
During software is installed, a client id (Identification, identity) is generated by random algorithm, by client
End counts client after reporting the data comprising client id, server to be collected into client id data to server end daily
The sum of ID, this sum are exactly daily active users.
When client software is connected to network after each starting up, client id data are reported to server.
Since user's machine may be switched on repeatedly, it may occur that a client software reports multiple client in one day for one day
The case where ID data.In this way, server side also needs to after being removed repetition to the client id data that these are received, it is only true
Real active users.
For possessing the client software of mass users, it is a more complicated to be removed repetition to several ten million client ids
Operation.Common practices is exactly finally to be counted in Collection data structures all clients ID stored in memory
The element number of set is exactly active users.The removal repetitive operation that client id is carried out in single server requires server
Memory size is larger.
In conclusion there are the following problems for the statistical project of the daily active users in existing customer end:Some clients are every
Day repeatedly reports its client id data to server, and there are duplicate data, the daily active users of accurate statistics client need
Carry out complicated data deduplication, it is desirable that server memory capacity is larger.
Invention content
The present invention determines method, server and system in view of the above-mentioned problems, proposing a kind of client user's number.
In one aspect, the present invention provides a kind of client user's numbers to determine method comprising:
Receive the data reported when client logs in;
Determine the current time that client logs in;
Judge that the timestamp is stepped in client whether containing the timestamp for indicating last login time in the data
When record, the information of expression this login time of client sent to client;
When there is no to indicate the timestamp of last login time in the data, determine that the client is to first log into,
Client user's number increases;When there is the timestamp for indicating last login time in the data, the timestamp is indicated
Time is compared with the current login time that client logs in, if the client login time of timestamp expression and client
The current time that end logs in belongs to the pre-set same period, then client user's number is constant;Otherwise, client user
Number increases.
On the other hand, the present invention provides a kind of client user's numbers to determine server comprising:
Receiving unit, for receiving the data reported when client logs in;
Determination unit, the current time for determining client;
Judging unit, for whether judging in the data containing the timestamp for indicating last login time, the time
Stamp is the information of expression this login time of client sent to client when client is logged in;
Updating unit, for when not having to indicate the timestamp of last login time in the data, determining the client
To first log into, client user's number increases at end;It, will be described when there is the timestamp for indicating last login time in the data
The time that timestamp indicates is compared with the current login time that client logs in, if the client that the timestamp indicates is stepped on
The current time that the record time logs in client belongs to the pre-set same period, then client user's number is constant;It is no
Then, client user's number increases.
On the other hand, the present invention provides a kind of clients comprising
Client transmission unit, for sending client data when logging in, the client data is in the non-head of client
When secondary login, including indicate the timestamp of last login;
Client receiving unit, for receiving the timestamp for indicating the current login time of client.
Another aspect, the present invention provides a kind of client user's numbers to determine system comprising above-mentioned client is used
Amount determines server and client side.
The present invention provides a kind of client user's numbers to determine method, server, client and system, by determining visitor
When the end subscriber number of family, only consider client login time, with distinguish same client within a certain period of time repeatedly step on
Record, without carrying out complicated data deduplication, so that it may go out actual client online user number with accurate statistics.
Description of the drawings
Specific embodiments of the present invention are described below with reference to accompanying drawings, wherein:
Fig. 1 is the flow chart that a kind of client user's number provided in an embodiment of the present invention determines method.
Fig. 2 is the instance graph that a kind of client user's number provided in an embodiment of the present invention determines method.
Fig. 3 is the schematic diagram that a kind of client user's number provided in an embodiment of the present invention determines server.
Fig. 4 is a kind of schematic diagram of client provided in an embodiment of the present invention.
Specific implementation mode
In order to make technical scheme of the present invention and advantage be more clearly understood, below in conjunction with attached drawing to the exemplary of the present invention
Embodiment is described in more detail, it is clear that and the described embodiments are merely a part of the embodiments of the present invention, rather than
The exhaustion of all embodiments.
As depicted in figs. 1 and 2, the embodiment provides a kind of client user's numbers to determine method comprising such as
Lower step:
Step S101:Receive the data reported when client logs in.Here, the data that client reports are in the non-head of client
When secondary login, which includes indicating last login time stamp;When client first logs into, without indicating last time in the data
The timestamp of login time.
Client user's number in the embodiment of the present invention, as active real user number.
Step S102:Determine the current time that client logs in.Determine client log in when (server side) it is current when
Between rather than the current time that shows of client because the time of client, usual confidence level was not as good as server.
Step S103:Judge that the timestamp is in client whether containing the timestamp for indicating last login time in data
When end logs in, the information of expression this login time of client sent to client.Client is received by step S101
The data that report when end logs in, client is non-first log into when, include the timestamp for indicating last login time.When judging number
When there is no to indicate the timestamp of last login time in, step S104 is executed;Last time is indicated when judging simultaneously to contain in data
When the timestamp of login time, step S105 is executed.
Step S104:When there is no to indicate the timestamp of last login time in the data received, the client is determined
To first log into, step S105 is continued to execute.
Step S105:Client user's number increases, i.e., ought receive in the data that some client reports without in expression
The timestamp of secondary login time illustrates the timestamp that last login time is not received by before the client, to step on for the first time
Record, i.e., there are one new accessing server by customer end, client user's number will carry out adding one update.
Step S106:When there is the timestamp for indicating last login time in data, time which is indicated with
The current login time that client logs in is compared.According to the timestamp, determine that its last login time is logged in client
Current login time whether belong to certain time period, for example, whether the two belongs to same consecutive days.It is tied according to comparing
Fruit executes step S107.
Step S107:If the client login time that the timestamp indicates belongs to pre-set same with current time
Period, then client user's number is constant;Otherwise, client user's number increases.Here the pre-set same period is with day
For section, it can also make separate stipulations, not limit here according to actual needs.
For example, can judge client last login time and current login time according to the date information in timestamp
Whether belong on the same day, if so, client user's number remains unchanged, otherwise client user's number adds one, is updated.Time
Stamp may include date, hour, minute or second.
For example, the server time of a certain its last login of client is on December 10th, 2013 (5 divide 32 seconds when 12), when
The server time of preceding login is on December 10th, 2013 (42 divide 6 seconds when 20), it is determined that the client last login with it is current
Login belongs to one day, then keeps client user's number constant;If the server time that the client currently logs in is 2013 12
11 (42 divide 6 seconds when 0) of the moon, it is determined that the client last login is not belonging on the same day with current login, then client user
Number increases.
After the update of client user's number, the server time that client currently logs in is determined, and will indicate that client is current
The timestamp of the server time of login is sent to client.The time of reported data currently steps on as it when client is logged in
The time is recorded, and forms timestamp and is sent to client, client logging timestamp, and reports timestamp when logging in next time,
It is convenient subsequently to determine whether the client first logs into, or repeatedly log in.
As shown in figure 3, the embodiment provides a kind of client online user number statistical servers comprising:
Receiving unit 301, for receiving the data reported when client logs in;Determination unit 302, for determine client it is current when
Between;Judging unit 303, for judging whether contain the timestamp for indicating last login time in data, in the embodiment of the present invention
Timestamp be the information of expression this login time of client sent to client when client is logged in;Update
Unit 304, for when there is no to indicate the timestamp of last login time in data, determining that client is to first log into, client
End subscriber number increases;The time for indicating timestamp when there is the timestamp for indicating last login time in data and client
The current login time logged in is compared, if the current time that the client login time that timestamp indicates is logged in client
The pre-set same period is belonged to, then client user's number is constant;Otherwise, client user's number increases, wherein the time
Stamp may include date, hour, minute or second.
The server can also include timestamp transmission unit, for after the update of client user's number, sending and indicating visitor
The timestamp that family end currently logs in.
As shown in figure 4, the embodiment provides a kind of clients comprising:Client transmission unit 401 is used
In log in when send client data, the client data client is non-first log into when, include the time of last login
Stamp;Client receiving unit 402, for receiving the timestamp for indicating the current login time of client.Wherein, client receives single
The timestamp that member 402 receives can be sent when logging in next time by client transmission unit 401.
The embodiment provides a kind of client user's numbers to determine system, including client user as described above
Number determines server and client side.
The present invention provides a kind of client user's numbers to determine method, server, client and system, by determining visitor
When the end subscriber number of family, the login time of client is only accounted for, to distinguish same client within a certain period of time multiple
It logs in, without carrying out complicated data deduplication, so that it may go out actual client online user number with accurate statistics.
The above embodiments are merely illustrative of the technical solutions of the present invention, rather than is limited.Therefore, without departing substantially from this
In the case of the spirit and its essence of invention, those skilled in the art can be variously modified, replace and modification.It will be apparent that but
These change, replacement and modification should be all covered by within the protection domain of the claims in the present invention.
Claims (4)
1. a kind of client user's number determines method, which is characterized in that including:
Receive the data reported when client logs in;
Determine the current time that client logs in;
Judge that, whether containing the timestamp for indicating last login time in the data, the timestamp is logged in client
When, the information of expression this login time of client sent to client;
When there is no to indicate the timestamp of last login time in the data, determine that the client is to first log into, client
End subscriber number increases;When there is the timestamp for indicating last login time in the data, time that the timestamp is indicated
The current time logged in client is compared, if what the client login time that the timestamp indicates was logged in client
Current time belongs to the pre-set same period, then client user's number is constant;Otherwise, client user's number increases;
After the update of client user's number, the server time that client currently logs in is determined, and will indicate that client currently logs in
The timestamp of server time be sent to client.
2. the method as described in claim 1, which is characterized in that the pre-set same period is using day as section.
3. a kind of client user's number determines server, which is characterized in that including:
Receiving unit, for receiving the data reported when client logs in;
Determination unit, the current time for determining client;
Judging unit, for judging that the timestamp is whether containing the timestamp for indicating last login time in the data
When client logs in, the information of expression this login time of client sent to client;
Updating unit, for when not having to indicate the timestamp of last login time in the data, determining that the client is
It first logs into, client user's number increases;When there is the timestamp for indicating last login time in the data, by the time
The time that stamp indicates is compared with the current login time that client logs in, if the client that the timestamp indicates logs in
Between with client log in current time belong to the pre-set same period, then client user's number is constant;Otherwise, objective
Family end subscriber number increases, wherein the client id is locally generated by client;
Timestamp transmission unit determines the server time that client currently logs in, and will after the update of client user's number
Indicate that the timestamp for the server time that client currently logs in is sent to client.
4. a kind of client user's number determines system, which is characterized in that include client user's number determination clothes as described in right 3
Business device and client;
The client includes:
Client transmission unit, for sending client data when logging in, the client data is stepped on for the first time client is non-
When record, including indicate the timestamp of last login;
Client receiving unit, for receiving the timestamp for indicating the current login time of client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410086524.7A CN103957230B (en) | 2014-03-10 | 2014-03-10 | A kind of client user's number determines method, server, client and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410086524.7A CN103957230B (en) | 2014-03-10 | 2014-03-10 | A kind of client user's number determines method, server, client and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103957230A CN103957230A (en) | 2014-07-30 |
CN103957230B true CN103957230B (en) | 2018-09-04 |
Family
ID=51334453
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410086524.7A Active CN103957230B (en) | 2014-03-10 | 2014-03-10 | A kind of client user's number determines method, server, client and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103957230B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104361068B (en) * | 2014-11-06 | 2017-06-16 | 华中科技大学 | Parallel method of partition and system during a kind of data deduplication |
CN107765592B (en) * | 2015-06-12 | 2020-05-26 | Oppo广东移动通信有限公司 | Equipment control method and device and terminal equipment |
CN105488692A (en) * | 2015-11-26 | 2016-04-13 | 广州华多网络科技有限公司 | Method and device for computing number of online users |
CN105761119B (en) * | 2016-03-30 | 2019-11-05 | 广州华多网络科技有限公司 | Online number distribution calculation method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101729571A (en) * | 2009-12-28 | 2010-06-09 | 广州游家信息技术有限公司 | Method, server and system for counting network on-line user number |
CN101860785A (en) * | 2009-04-10 | 2010-10-13 | 北京闻言科技有限公司 | Method for counting number of persons logging in mobile phone client in real time |
CN102281309A (en) * | 2010-06-11 | 2011-12-14 | 腾讯科技(深圳)有限公司 | Network information issuing method, network information issuing system and client |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8041807B2 (en) * | 2006-11-02 | 2011-10-18 | International Business Machines Corporation | Method, system and program product for determining a number of concurrent users accessing a system |
CN101360099B (en) * | 2008-09-18 | 2012-11-28 | 北京中星微电子有限公司 | Method for establishing session status between different components of network video monitoring system |
-
2014
- 2014-03-10 CN CN201410086524.7A patent/CN103957230B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101860785A (en) * | 2009-04-10 | 2010-10-13 | 北京闻言科技有限公司 | Method for counting number of persons logging in mobile phone client in real time |
CN101729571A (en) * | 2009-12-28 | 2010-06-09 | 广州游家信息技术有限公司 | Method, server and system for counting network on-line user number |
CN102281309A (en) * | 2010-06-11 | 2011-12-14 | 腾讯科技(深圳)有限公司 | Network information issuing method, network information issuing system and client |
Also Published As
Publication number | Publication date |
---|---|
CN103957230A (en) | 2014-07-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111555963B (en) | Message pushing method and device, electronic equipment and storage medium | |
CN105490854B (en) | Real-time logs collection method, system and application server cluster | |
CN108696399B (en) | Business service test method and device | |
CN107995266A (en) | Bury point data processing method, device, computer equipment and storage medium | |
CN103957230B (en) | A kind of client user's number determines method, server, client and system | |
US9647915B2 (en) | Detailed end-to-end latency tracking of messages | |
WO2017131774A1 (en) | Log event summarization for distributed server system | |
CN110661794B (en) | Flow identification method and device, electronic equipment and readable storage medium | |
JP2014102661A (en) | Application determination program, fault detection device, and application determination method | |
CN106470123A (en) | Log collecting method, client, server and electronic equipment | |
CN104866296A (en) | Data processing method and device | |
CN112636979A (en) | Cluster alarm method and related device | |
CN107924345A (en) | Data storage area for the polymerization measurement result of measurement | |
US8838774B2 (en) | Method, system, and computer program product for identifying common factors associated with network activity with reduced resource utilization | |
CN104992060A (en) | User age estimation method and apparatus | |
CN108923967A (en) | A kind of duplicate removal discharge record method, apparatus, server and storage medium | |
EP4022436A1 (en) | Assigning a severity level to a computing service using tenant telemetry data | |
US20170223136A1 (en) | Any Web Page Reporting and Capture | |
CN104579754B (en) | A kind of method that statistics Web applies user's access time characteristic | |
CN105743952B (en) | A kind of method for processing business, server and ERP client | |
CN110389875A (en) | Method, apparatus and storage medium for supervisory computer system operating status | |
CN103188137B (en) | Message emerging method based on fatigue control, server and instant messaging client-side | |
CN108255868B (en) | Method and device for checking links in website | |
CN113472858B (en) | Buried point data processing method and device and electronic equipment | |
CN105592173A (en) | Method and system for preventing DNS (Domain Name System) cache from being stained and local DNS server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into 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: 20181205 Address after: 519031 Room 105-53811, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province Patentee after: Zhuhai Seal Interest Technology Co., Ltd. Address before: 519070 Jinshan Software Building, No. 8 Lianshan Lane, Jida Jingshan Road, Zhuhai City, Guangdong Province Patentee before: Zhuhai Juntian Electronic Technology Co.,Ltd. |