CN107277002A - The method for limiting same user account registration terminal quantity - Google Patents

The method for limiting same user account registration terminal quantity Download PDF

Info

Publication number
CN107277002A
CN107277002A CN201710439292.2A CN201710439292A CN107277002A CN 107277002 A CN107277002 A CN 107277002A CN 201710439292 A CN201710439292 A CN 201710439292A CN 107277002 A CN107277002 A CN 107277002A
Authority
CN
China
Prior art keywords
terminal
login
time
web server
user account
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
CN201710439292.2A
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.)
Universal Wisdom Technology Beijing Co Ltd
Original Assignee
Universal Wisdom Technology Beijing 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 Universal Wisdom Technology Beijing Co Ltd filed Critical Universal Wisdom Technology Beijing Co Ltd
Priority to CN201710439292.2A priority Critical patent/CN107277002A/en
Publication of CN107277002A publication Critical patent/CN107277002A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0815Network architectures or network communication protocols for network security for authentication of entities providing single-sign-on or federations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint

Abstract

The invention discloses a kind of method for limiting same user account registration terminal quantity, including:First terminal sends landing request information to WEB server, wherein including ID and first terminal ID;WEB server calls the corresponding login restricted information of ID from Redis databases, logs in restricted information and includes the corresponding all second terminal ID of ID and registration conditions;All log-on messages for calling ID current from Redis databases;Judge whether ID and first terminal ID meet registration conditions according to log-on message, login time is compared with current time if not, extracting login time from log-on message;Judge whether login time exceeds default time threshold, if not, judge whether the quantity for the second terminal that ID is currently logged in reaches default login amount threshold, if it is, sending the prompt message that limitation ID is logged in first terminal according to first terminal ID.

Description

The method for limiting same user account registration terminal quantity
Technical field
The present invention relates to network technique field, more particularly to a kind of side for limiting same user account registration terminal quantity Method.
Background technology
With flourishing for Internet technology, user becomes increasingly popular to handle respectively by terminal device access internet The business of kind.In web application systems, for security consideration, it is necessary to which limiting same user account logs in multiple terminal devices Quantity.
The quantity of multiple terminal devices is logged in for limiting same user account, method of the prior art is as follows:
(1) use MySQL database, in the record of original user account, addition whether logged in, expired time, Equipment Unique Identifier field.Set the condition whether logged in consistent to have logged in, having logged in not out of date, equipment unique mark, often Secondary user updates expiration-time value when having operation, if a period of time does not operate, logging status is expired.
(2) MySQ database L are used, token values are added in user account record, are logged in every time according to timestamp and its His information generates a new token value, constantly detects token values, if token value changes, illustrates user account at it Logged on his terminal device.
Using the efficiency comparison of MySQL database it is low, can not realize dynamic constantly limit same user account log in it is many Individual terminal device.
The content of the invention
It is of the prior art to solve the invention provides a kind of method for limiting same user account registration terminal quantity Method for limiting efficiency is low, can not realize that dynamic constantly limits the count issue of same user account registration terminal equipment.
The embodiments of the invention provide a kind of method for limiting same user account registration terminal quantity, including:
First terminal sends landing request information to WEB server, and ID and the is included in the landing request information One Termination ID;
The WEB server calls the corresponding login restricted information of the ID, the login from Redis databases Restricted information includes the corresponding all second terminal ID of the ID and registration conditions;
All log-on messages for calling the ID current from the Redis databases;
Judge whether the ID and the first terminal ID meet the registration conditions according to the log-on message, such as It is really no, then login time is extracted from the log-on message, the login time and current time are compared;
Judge whether the login time exceeds default time threshold, if it is not, then judging that the ID is currently stepped on Whether the quantity of the second terminal of record reaches default login amount threshold, if it is, according to the first terminal ID to institute State first terminal and send the prompt message that the limitation ID is logged in.
Further, before the current all log-on messages of the ID are called from the Redis databases, institute Stating method also includes:
All second terminals that the ID is currently logged in are according to the default time cycle to the WEB server Send logging status information;
Log-on message in WEB server Redis databases according to the logging status information updating.
Further, methods described also includes:
When the WEB server is not received by the logging status that the second terminal is sent within the default time cycle During information, the WEB server sends the prompting message that the ID is logged off to the second terminal.
Further, call the ID is corresponding to log in limitation letter from Redis databases in the WEB server Before breath, methods described also includes;
ID and second terminal ID are set up mapping relations by the WEB server;
The login restricted information of the mapping relations and registration conditions generation string types is stored in the Redis numbers According in storehouse.
Further, it is described to judge whether the login time specifically includes beyond default time threshold:
Calculate the time difference of the login time and the current time;
Judge whether the time difference exceeds default time threshold.
Further, methods described also includes:
When the login time exceeds default time threshold, then send described to the corresponding terminal of the login time The prompt message that ID is logged off.
Further, the log-on message is specifically included:
The Termination ID and login time information for all second terminals that the ID is currently logged in.
The method of the same user account registration terminal quantity of limitation provided in an embodiment of the present invention, first terminal takes to WEB Business device, which is sent, includes ID and first terminal ID in landing request information, landing request information;WEB server is from Redis numbers According to the corresponding login restricted information of ID is called in storehouse, log in restricted information and include the corresponding all second terminal ID of ID And registration conditions;Judge whether ID and first terminal ID meet registration conditions, if it is not, then being adjusted from Redis databases With the current all log-on messages of ID;Login time is extracted from log-on message, login time and current time are carried out Compare;Judge whether login time exceeds default time threshold, if it is not, then judging the second terminal that ID is currently logged in Whether terminal quantity reaches default login amount threshold, is limited if it is, being sent according to first terminal ID to first terminal The prompt message that ID is logged in.Method provided in an embodiment of the present invention, can realize that dynamic constantly limits same user's account The quantity of number registration terminal equipment, processing speed is fast, efficiency high.
Brief description of the drawings
Fig. 1 is the flow chart of the method for the same user account registration terminal quantity of limitation provided in an embodiment of the present invention.
Embodiment
In order that the object, technical solutions and advantages of the present invention are clearer, below in conjunction with accompanying drawing the present invention is made into One step it is described in detail, it is clear that described embodiment is only embodiment of the invention a part of, rather than whole implementation Example.Based on the embodiment in the present invention, what those of ordinary skill in the art were obtained under the premise of creative work is not made All other embodiment, belongs to the scope of protection of the invention.
First terminal, second terminal in technical solution of the present invention specifically include the terminal device with disposal ability, example Such as, desktop computer, notebook computer, tablet personal computer, smart mobile phone, intelligent television etc..
With reference to the method flow diagram of the same user account registration terminal quantity of limitation shown in Fig. 1, to of the invention real The method for applying the same user account registration terminal quantity of limitation of example offer is described in detail.
As shown in figure 1, the method for the same user account registration terminal quantity of limitation that the present invention is provided is mainly including as follows Step:
Step 101, first terminal sends landing request information to WEB server.
Wherein, ID and first terminal ID are included in landing request information.ID is the unique identifier of user, example The account information of such as user.First terminal ID is the unique identifier of first terminal, for example, the media access control of terminal (Media Access Control, MAC) address, sequence number of terminal etc..
When user account logs in first terminal, first terminal receives the login instruction of user's input, is instructed according to logging in Landing request information is sent to WEB server.
Step 102, WEB server calls the corresponding login restricted information of ID from Redis databases.
Wherein, log in restricted information and include the corresponding all second terminal ID of ID and registration conditions.
Before WEB server calls the corresponding login restricted information of ID from Redis databases, WEB server ID and second terminal ID are set up into mapping relations;By the login limitation of mapping relations and registration conditions generation string types Information is stored in Redis databases.
The registration terminal that user is stored using the string type data structures of Rredis databases limits matching somebody with somebody for number of units Confidence ceases, it is possible to achieve dynamically set configuration information to each user.
Step 103, all log-on messages for calling ID current from Redis databases.
Before the current all log-on messages of ID are called from Redis databases, the institute that ID is currently logged in There is second terminal to send logging status information to WEB server according to the default time cycle;WEB server is according to logging status Log-on message in information updating Redis databases.
When WEB server is not received by the logging status information of second terminal transmission within the default time cycle, WEB server sends the prompting message that ID is logged off to second terminal.
Set specifically, storing user using the hash type data structures of Rredis databases and currently logging in all terminals Data are write using keyfieldvalue in standby log-on message, hash structures, key value is the unique identifier of user, Field value is the unique identifier of terminal device, and value value takes time during User logs in, and device end can be every one The logging status of section time report of user, when writing data using identical keyfield, covers historical data, realizes data Renewal, if to give tacit consent to the user offline on the terminal device for the logging status of device end non-report of user for a long time.It is logical The quantity of field effective information in statistics key is crossed to realize that dynamic constantly limits same user account registration terminal number of units Demand.
Step 104, judge whether ID and first terminal ID meet registration conditions according to log-on message, if it is not, then Perform step 105.
Registration conditions are specifically included:One of first terminal ID and the corresponding multiple second terminal ID of ID are matched, And the quantity for the second terminal that ID is currently logged in is less than default login amount threshold.
Judge whether ID and first terminal ID meet registration conditions and include following two aspects:
First, judge that one of first terminal ID and the corresponding multiple second terminal ID of ID are matched;
Second, should by the current log-on message of ID come the quantity of the counting user ID second terminals currently logged in Quantity is less than default login amount threshold.
As long as being unsatisfactory for one of conditions above, then assert and be unsatisfactory for registration conditions.
Step 105, login time is extracted from log-on message, login time is compared with current time.
Log-on message is specifically included:The Termination ID and login time information for all second terminals that ID is currently logged in.
If being unsatisfactory for registration conditions, all second terminals correspondence that ID is currently logged in is extracted from log-on message Login time information, login time is compared with current time, it is therefore an objective to judge that the current logging status of ID is It is no effective.
Step 106, judge whether login time exceeds default time threshold, if it is not, then performing step 107.
Calculate login time and the time difference of current time;Judge whether time difference exceeds default time threshold. When login time is without departing from default time threshold, illustrate the logging status for all second terminals that ID is currently logged in Effectively, step 107 is performed.
When login time exceeds default time threshold, then exit and step on to the corresponding terminal transmission ID of login time The prompt message of record.
For example, the default effective login time of WEB server is 15 minutes, by ID in all the currently logged in The login time of two terminals is compared with current time, and if logged on more than 15 minutes, then current logged-on status is stepped on to be invalid Record state, WEB server sends prompt message to the second terminal, shows that the user has dropped out login, updates the data in storehouse Log-on message.
Step 107, judge whether the quantity for the second terminal that ID is currently logged in reaches default login amount threshold, If it is, performing step 108.
If the logging status for all second terminals that ID is currently logged in is effective, determine whether that ID is worked as Whether the quantity of all second terminals of preceding login reaches default login amount threshold, if be not reaching to, allows user ID logs in first terminal, if it has been reached, then limitation is logged in, performs step 108.
Step 108, the prompt message that limitation ID is logged in is sent to first terminal according to first terminal ID.
Technical solution of the present invention using can based on internal memory also can persistence log type, Key-Value database Redis, The login restricted information of user is stored using the data structure of the string types in Redis, with the data knot of hash types Structure stores the log-on message of User logs in terminal device, by the effective registration terminal facility information of same user account Statistics, reaches that the same user account of limitation of dynamic constantly logs in the quantity of multiple terminal devices.
The method of the same user account registration terminal quantity of limitation provided in an embodiment of the present invention, first terminal takes to WEB Business device, which is sent, includes ID and first terminal ID in landing request information, landing request information;WEB server is from Redis numbers According to the corresponding login restricted information of ID is called in storehouse, log in restricted information and include the corresponding all second terminal ID of ID And registration conditions;Judge whether ID and first terminal ID meet registration conditions, if it is not, then being adjusted from Redis databases With the current all log-on messages of ID;Login time is extracted from log-on message, login time and current time are carried out Compare;Judge whether login time exceeds default time threshold, if it is not, then judging the second terminal that ID is currently logged in Whether terminal quantity reaches default login amount threshold, is limited if it is, being sent according to first terminal ID to first terminal The prompt message that ID is logged in.Method provided in an embodiment of the present invention, can realize that dynamic constantly limits same user's account The quantity of number registration terminal equipment, processing speed is fast, efficiency high.
Professional should further appreciate that, each example described with reference to the embodiments described herein Unit and algorithm steps, can be realized with electronic hardware, be generally described respectively according to function in the above description The composition and step of example.Function described by being realized to each specific application using distinct methods, but this reality Now it is not considered that beyond the scope of the embodiment of the present invention.Specifically, the computing and control section can dredging collateral logic hardwares Realize, it can be the logical integrated circuit manufactured using integrated circuit technology, and the present embodiment is not construed as limiting to this.
The method that is described with reference to the embodiments described herein can use hardware, computing device the step of algorithm Software module, or the two combination are implemented.Software module can be placed in random access memory (RAM), internal memory, read-only storage (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field In any other form of storage medium well known to interior.
Above-described embodiment, purpose, technical scheme and beneficial effect to the embodiment of the present invention are carried out It is further described, should be understood that the embodiment that the foregoing is only the embodiment of the present invention, and without It is all within the spirit and principle of the embodiment of the present invention in the protection domain for limiting the embodiment of the present invention, any modification for being made, Equivalent substitution, improvement etc., should be included within the protection domain of the embodiment of the present invention.

Claims (7)

1. a kind of method for limiting same user account registration terminal quantity, it is characterised in that methods described includes:
First terminal sends whole comprising ID and first in landing request information, the landing request information to WEB server Hold ID;
The WEB server calls the corresponding login restricted information of the ID, the login limitation from Redis databases Packet contains the corresponding all second terminal ID of the ID and registration conditions;
All log-on messages for calling the ID current from the Redis databases;
Judge whether the ID and the first terminal ID meet the registration conditions according to the log-on message, if It is no, then login time is extracted from the log-on message, the login time and current time are compared;
Judge whether the login time exceeds default time threshold, if it is not, then judging what the ID was currently logged in Whether the quantity of second terminal reaches default login amount threshold, if it is, according to the first terminal ID to described One terminal sends the prompt message that the limitation ID is logged in.
2. the method for the same user account registration terminal quantity of limitation according to claim 1, it is characterised in that from institute State before all log-on messages for calling the ID current in Redis databases, methods described also includes:
All second terminals that the ID is currently logged in are sent according to the default time cycle to the WEB server Logging status information;
Log-on message in WEB server Redis databases according to the logging status information updating.
3. the method for the same user account registration terminal quantity of limitation according to claim 2, it is characterised in that the side Method also includes:
When the WEB server is not received by the logging status information that the second terminal is sent within the default time cycle When, the WEB server sends the prompting message that the ID is logged off to the second terminal.
4. the method for the same user account registration terminal quantity of limitation according to claim 1, it is characterised in that described WEB server is called from Redis databases before the corresponding login restricted information of the ID, and methods described also includes;
ID and second terminal ID are set up mapping relations by the WEB server;
The login restricted information of the mapping relations and registration conditions generation string types is stored in the Redis databases In.
5. the method for the same user account registration terminal quantity of limitation according to claim 1, it is characterised in that described to sentence Whether the login time that breaks specifically includes beyond default time threshold:
Calculate the time difference of the login time and the current time;
Judge whether the time difference exceeds default time threshold.
6. the method for the same user account registration terminal quantity of limitation according to claim 1, it is characterised in that the side Method also includes:
When the login time exceeds default time threshold, then the user is sent to the corresponding terminal of the login time The prompt message that ID logs off.
7. the method for the same user account registration terminal quantity of limitation according to claim 1, it is characterised in that described to step on Record information is specifically included:
The Termination ID and login time information for all second terminals that the ID is currently logged in.
CN201710439292.2A 2017-06-12 2017-06-12 The method for limiting same user account registration terminal quantity Pending CN107277002A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710439292.2A CN107277002A (en) 2017-06-12 2017-06-12 The method for limiting same user account registration terminal quantity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710439292.2A CN107277002A (en) 2017-06-12 2017-06-12 The method for limiting same user account registration terminal quantity

Publications (1)

Publication Number Publication Date
CN107277002A true CN107277002A (en) 2017-10-20

Family

ID=60067519

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710439292.2A Pending CN107277002A (en) 2017-06-12 2017-06-12 The method for limiting same user account registration terminal quantity

Country Status (1)

Country Link
CN (1) CN107277002A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108234449A (en) * 2017-12-07 2018-06-29 深圳市买买提信息科技有限公司 Log on request processing method, server and computer readable storage medium
CN110708320A (en) * 2019-10-11 2020-01-17 北京弘远博学科技有限公司 Method for controlling number of user APP login devices based on Redis
CN113190812A (en) * 2021-05-24 2021-07-30 中国工商银行股份有限公司 Login method, system, electronic equipment and storage medium
CN113343217A (en) * 2021-07-05 2021-09-03 湖南快乐阳光互动娱乐传媒有限公司 Account login limiting method and device, storage medium and equipment
CN114139135A (en) * 2022-02-08 2022-03-04 深圳希施玛数据科技有限公司 Equipment login management method, device and storage medium
CN115001747A (en) * 2022-04-29 2022-09-02 北京奇艺世纪科技有限公司 Device control method, device, electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200666A (en) * 2013-03-20 2013-07-10 广东欧珀移动通信有限公司 Multiuser management method and multiuser management device of mobile terminal
CN103746983A (en) * 2013-12-30 2014-04-23 迈普通信技术股份有限公司 Access authentication method and authentication server
CN105978947A (en) * 2016-04-27 2016-09-28 努比亚技术有限公司 Same account number login equipment number control method and mobile terminal
CN106506810A (en) * 2016-10-12 2017-03-15 北京小米移动软件有限公司 The method and apparatus of the use time of limiting terminal equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200666A (en) * 2013-03-20 2013-07-10 广东欧珀移动通信有限公司 Multiuser management method and multiuser management device of mobile terminal
CN103746983A (en) * 2013-12-30 2014-04-23 迈普通信技术股份有限公司 Access authentication method and authentication server
CN105978947A (en) * 2016-04-27 2016-09-28 努比亚技术有限公司 Same account number login equipment number control method and mobile terminal
CN106506810A (en) * 2016-10-12 2017-03-15 北京小米移动软件有限公司 The method and apparatus of the use time of limiting terminal equipment

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108234449A (en) * 2017-12-07 2018-06-29 深圳市买买提信息科技有限公司 Log on request processing method, server and computer readable storage medium
CN110708320A (en) * 2019-10-11 2020-01-17 北京弘远博学科技有限公司 Method for controlling number of user APP login devices based on Redis
CN113190812A (en) * 2021-05-24 2021-07-30 中国工商银行股份有限公司 Login method, system, electronic equipment and storage medium
CN113343217A (en) * 2021-07-05 2021-09-03 湖南快乐阳光互动娱乐传媒有限公司 Account login limiting method and device, storage medium and equipment
CN114139135A (en) * 2022-02-08 2022-03-04 深圳希施玛数据科技有限公司 Equipment login management method, device and storage medium
CN115001747A (en) * 2022-04-29 2022-09-02 北京奇艺世纪科技有限公司 Device control method, device, electronic device and storage medium
CN115001747B (en) * 2022-04-29 2024-03-01 北京奇艺世纪科技有限公司 Equipment control method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107277002A (en) The method for limiting same user account registration terminal quantity
CN107196949A (en) The system for limiting same user account registration terminal quantity
CN111030936B (en) Current-limiting control method and device for network access and computer-readable storage medium
US20230085654A1 (en) Virtual private cloud flow log event fingerprinting and aggregation
CN101119321B (en) Network flux classification processing method and apparatus
CN106713290B (en) Method for identifying main user account and server
US10530726B2 (en) Email notifications
CN103618733A (en) Data filtering system and method applied to mobile internet
Dai et al. Identifying and estimating persistent items in data streams
CN115348222B (en) Message distribution method, device, server side and storage medium
CN105515830A (en) User management method and device
CN114221994A (en) Dynamic allocation method for PCIE (peripheral component interface express) password card virtualized resources
US20070294359A1 (en) System and method of implementing remote access and control of registered personal appliances via instant messaging
CN101606360A (en) The call identifier of unique compression
CN108763972A (en) One kind is web-based to paint random keyboard system certainly
CN109710502A (en) Log transmission method, apparatus and storage medium
CN103678570A (en) Multi-level storage and recovery method and system of journal file in cloud environment
CN116633688B (en) AIGC service privacy protection method and device
CN105049578B (en) A kind of groups of users management method, system and mobile terminal for saving memory space
CN106254375B (en) A kind of recognition methods of hotspot equipment and device
CN106911660B (en) Information management method and device
CN113014555B (en) Method and device for determining attack event, electronic equipment and storage medium
CN107704328A (en) Client accesses method, system, device and the storage medium of file system
CN104243395B (en) A kind of high frequency time write operation method, interface message processor (IMP) and system
CN107689994A (en) A kind of mission bit stream processing method

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20171020