CN113343217B - Account login limiting method, device, storage medium and equipment - Google Patents
Account login limiting method, device, storage medium and equipment Download PDFInfo
- Publication number
- CN113343217B CN113343217B CN202110758017.3A CN202110758017A CN113343217B CN 113343217 B CN113343217 B CN 113343217B CN 202110758017 A CN202110758017 A CN 202110758017A CN 113343217 B CN113343217 B CN 113343217B
- Authority
- CN
- China
- Prior art keywords
- login
- account
- platform
- value
- sequence
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/45—Structures or tools for the administration of authentication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/31—User authentication
Abstract
The application discloses an account login limiting method, device, storage medium and equipment, and a login credential is generated under the condition that a user logs in an account on a platform through the equipment. And caching the corresponding relation among the universal unique identification code of the account, the login certificate, the equipment number of the equipment, the platform number of the platform and the login timestamp of the account into a preset login list. And counting the total number of the equipment corresponding to the preset platform number in the login list to obtain a first numerical value. And under the condition that the first numerical value is larger than a first preset threshold value, sequencing the corresponding first devices according to the sequence of the login time stamps from early to late to obtain a first sequence. And deleting the first n-digit equipment in the first sequence from the login list, and controlling the target platform to log out the first account. Therefore, by the scheme, the user experience can be improved under the condition that the benefits of the platform are guaranteed.
Description
Technical Field
The present application relates to the field of user login security, and in particular, to a method, an apparatus, a storage medium, and a device for restricting account login.
Background
In order to improve market competitiveness, internet video enterprises generally develop a plurality of platforms (such as a large-screen television terminal, a mobile terminal, a PCweb terminal, and the like) and allow users to share one account on the plurality of platforms. Generally, a user can log in his or her own account on any one platform through different devices (e.g., a mobile phone, a tablet computer, etc.). In order to avoid that a user logs in the same account on the same platform by using a plurality of devices at the same time and guarantee the benefits of the platform, the account is required to be logged in for limitation.
At present, the existing account login limiting mode only allows the same account to log in one platform on one device, and if a user uses a new device to log in the same account on another platform, the device which has logged in the account before is pushed down, so that the user experience is reduced.
Disclosure of Invention
The application provides an account login limiting method, an account login limiting device, a storage medium and an account login limiting device, and aims to improve user experience under the condition that the benefits of a platform are guaranteed.
In order to achieve the above object, the present application provides the following technical solutions:
an account login limiting method comprises the following steps:
generating a login credential when detecting that a user logs in an account on a platform through equipment;
caching the corresponding relation among the universal unique identification code of the account, the login certificate, the equipment number of the equipment, the platform number of the platform and the login timestamp of the account into a preset login list;
counting the total number of the equipment corresponding to the preset platform number in the login list to obtain a first numerical value;
when the first numerical value is larger than a first preset threshold value, sequencing the corresponding first devices according to the sequence of the login time stamps from early to late to obtain a first sequence; the first preset threshold represents the total number of the devices allowed to log in by the target platform; the target platform is as follows: the platform to which the preset platform number belongs; the first device is: the equipment corresponds to the preset platform number;
deleting the first n-bit devices in the first sequence from the login list, and controlling the target platform to log out the first account; the value of n is a first difference value, and the first difference value is the difference value between the first numerical value and the first preset threshold value; the first account number is: and the account number corresponding to the first n-digit equipment in the first sequence.
Optionally, the method further includes:
under the condition that the first numerical value is not larger than a first preset threshold value, counting the total number of login credentials corresponding to the preset platform number in the login list to obtain a second numerical value;
under the condition that the second numerical value is larger than a second preset threshold value, sequencing the corresponding first login credentials according to the sequence of the login timestamps from early to late to obtain a second sequence; the second preset threshold value represents the total number of login credentials allowed to be logged in on the target platform; the first login credential is: a login credential corresponding to the preset platform number;
deleting the login credentials of the first m bits in the second sequence from the login list, and controlling the target platform to log out the second account; the value of m is a second difference value, and the second difference value is the difference value between the second value and the second preset threshold value; the second account is: and the account number corresponding to the first m-bit login credentials in the second sequence.
Optionally, the method further includes:
under the condition that the second numerical value is not larger than the second preset threshold value, counting the total number of login credentials corresponding to preset equipment numbers in the login list to obtain a third numerical value;
when the third numerical value is larger than a third preset threshold value, sequencing the corresponding second login credentials according to the sequence of the login timestamps from early to late to obtain a third sequence; the third preset threshold value represents the total number of login credentials allowed to be logged in on the target device; the target device is as follows: the equipment to which the preset equipment number belongs; the second login credential is: a login credential corresponding to the preset device number;
deleting the login credentials of the first k bits in the third sequence from the login list, and controlling each platform to log out the third account; the value of k is a third difference value, and the third difference value is a difference value between the third numerical value and the third preset threshold value; the third account is: and the account corresponding to the first k digits of login credentials in the third sequence.
Optionally, the method further includes:
and under the condition that the third numerical value is not larger than the third preset threshold, sequencing the corresponding login credentials in the login list according to the sequence of the login timestamps from early to late.
An account login restriction apparatus, comprising:
the generating unit is used for generating a login credential under the condition that a user logs in an account on the platform through equipment is detected;
the cache unit is used for caching the corresponding relation among the universal unique identification code of the account, the login certificate, the equipment number of the equipment, the platform number of the platform and the login timestamp of the account into a preset login list;
the first counting unit is used for counting the total number of the equipment corresponding to the preset platform number in the login list to obtain a first numerical value;
the first sequencing unit is used for sequencing the corresponding first devices according to the sequence of the login timestamps from early to late to obtain a first sequence under the condition that the first numerical value is greater than a first preset threshold; the first preset threshold represents the total number of the devices allowed to be logged in by the target platform; the target platform is as follows: the platform to which the preset platform number belongs; the first device is: the equipment corresponds to the preset platform number;
a first deleting unit, configured to delete the first n devices in the first sequence from the login list, and control the target platform to log out the first account; the value of n is a first difference value, and the first difference value is the difference value between the first numerical value and the first preset threshold value; the first account number is: and the account number corresponding to the first n-digit equipment in the first sequence.
Optionally, the method further includes:
the second counting unit is used for counting the total number of login credentials corresponding to the preset platform number in the login list under the condition that the first numerical value is not larger than a first preset threshold value to obtain a second numerical value;
the second sorting unit is used for sorting the corresponding first login credentials according to the sequence of the login timestamps from early to late to obtain a second sequence under the condition that the second value is greater than a second preset threshold value; the second preset threshold value represents the total number of login credentials allowed to be logged in on the target platform; the first login credential is: a login credential corresponding to the preset platform number;
the second deleting unit is used for deleting the login credentials of the first m bits in the second sequence from the login list and controlling the target platform to log out the second account; the value of m is a second difference value, and the second difference value is a difference value between the second value and the second preset threshold value; the second account is: and the account number corresponding to the first m-bit login credentials in the second sequence.
Optionally, the method further includes:
a third counting unit, configured to count a total number of login credentials corresponding to a preset device number in the login list to obtain a third value when the second value is not greater than the second preset threshold;
a third sorting unit, configured to, when the third numerical value is greater than a third preset threshold, sort the corresponding second login credentials in an order from early to late of the login timestamps to obtain a third sequence; the third preset threshold value represents the total number of login credentials allowed to be logged in on the target device; the target device is as follows: the equipment to which the preset equipment number belongs; the second login credential is: a login credential corresponding to the preset device number;
a third deleting unit, configured to delete the login credentials of the first k bits in the third sequence from the login list, and control each platform to log out the third account; the value of k is a third difference value, and the third difference value is a difference value between the third numerical value and the third preset threshold value; the third account is: and the account corresponding to the first k digits of login credentials in the third sequence.
Optionally, the method further includes:
and the fourth sorting unit is used for sorting the corresponding login credentials in the login list according to the sequence of the login timestamps from early to late under the condition that the third numerical value is not larger than the third preset threshold.
A computer-readable storage medium comprising a stored program, wherein the program executes the account login restriction method.
An account login restriction device, comprising: a processor, a memory, and a bus; the processor and the memory are connected through the bus;
the memory is used for storing a program, and the processor is used for executing the program, wherein the account login limitation method is executed when the program is executed.
According to the technical scheme, a login credential is generated under the condition that a user logs in an account on a platform through equipment. And caching the corresponding relation among the universal unique identification code of the account, the login certificate, the equipment number of the equipment, the platform number of the platform and the login timestamp of the account into a preset login list. And counting the total number of the equipment corresponding to the preset platform number in the login list to obtain a first numerical value. And under the condition that the first numerical value is larger than a first preset threshold value, sequencing the corresponding first devices according to the sequence of the login time stamps from early to late to obtain a first sequence. The first preset threshold value represents the total number of devices allowed to be logged in by the target platform. The target platform is as follows: and presetting the platform to which the platform number belongs. The first device is: and the equipment corresponds to the preset platform number. And deleting the first n-digit equipment in the first sequence from the login list, and controlling the target platform to log out the first account. And the value of n is a first difference value, and the first difference value is the difference value between the first numerical value and a first preset threshold value. The first account number is: account numbers corresponding to the first n-digit devices in the first sequence. And deleting the first n devices in the first sequence from the login list, and controlling the target platform to log out the first account, so that the number of the users logging in different devices simultaneously under the same platform can be limited. Therefore, by the scheme, the user experience can be improved under the condition of ensuring the benefits of the platform.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1a is a schematic diagram of an account login limitation method according to an embodiment of the present application;
fig. 1b is a schematic diagram of an account login limitation method according to an embodiment of the present application;
fig. 2 is a schematic diagram of another account login limitation method provided in the embodiment of the present application;
fig. 3 is a schematic structural diagram of an account login limiting apparatus according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
As shown in fig. 1a and 1b, a schematic diagram of an account login limitation method provided in an embodiment of the present application includes the following steps:
s101: when the condition that a user logs in an account on a platform through equipment is detected, a login certificate (ticket) is generated, and the corresponding relation among a Universal Unique Identifier (UUID) of the account, the login certificate, the equipment number of the equipment, the platform number of the platform and the login timestamp of the account is cached into a preset login list.
The login list includes, but is not limited to, a hash table, in this embodiment, a key (key) of the hash table is used to record a universal unique identifier, a field (field) in the hash table is used to record a login credential, and a value (value) corresponding to the field in the hash table is used to record a character string, where the character string is obtained by json coding a device number, a platform number, and a login timestamp.
Specifically, the corresponding relationship among the universal unique identification code of the account, the login credential, the device number of the device, the platform number of the platform, and the login timestamp of the account is stored in a login list, and the specific implementation logic is as follows: hset (uuid, ticket, value), value { "platform": "platform number", "deviceId": "device number", "sid": ticket, "create _ time": login timestamp, "ip": "127.0.0.1"}.
It should be noted that the above specific implementation process is only for illustration.
It is emphasized that the so-called device number, which is essentially a unique identification of a device, is used to distinguish different devices. The so-called platform number, which is essentially the unique identity of the platform, is used to distinguish between different platforms.
S102: and counting the total number of the equipment corresponding to the preset platform number in the login list to obtain a first numerical value.
S103: and judging whether the first numerical value is larger than a first preset threshold value or not.
If the first value is greater than the first preset threshold, S104 is executed, otherwise S106 is executed.
The first preset threshold value represents the total number of the devices allowed to be logged in by the target platform. The target platform is: and presetting the platform to which the platform number belongs.
The first preset threshold value is used for indicating the total number of the devices allowed to log in on the target platform.
S104: and sequencing the corresponding first equipment according to the sequence of the login time stamps from early to late to obtain a first sequence.
After execution of S104, execution of S105 is continued.
Wherein, the first equipment is: and the equipment corresponds to the preset platform number.
S105: and deleting the first n-digit equipment in the first sequence from the login list, and controlling the target platform to log out the first account.
After execution of S105, execution continues with S106.
And the value of n is a first difference value, and the first difference value is a difference value between the first numerical value and a first preset threshold value. The first account number is: the account number corresponding to the first n-digit device in the first sequence.
S106: and counting the total number of the login credentials corresponding to the preset platform number in the login list to obtain a second number.
S107: and judging whether the second numerical value is larger than a second preset threshold value.
If the second value is greater than the second preset threshold, S108 is executed, otherwise S110 is executed.
Wherein the second preset threshold value characterizes a total number of login credentials allowed to login on the target platform.
S108: and sequencing the corresponding first login credentials according to the sequence of the login timestamps from early to late to obtain a second sequence.
After execution of S108, execution of S109 is continued.
Wherein, the first login credential is: and the login credentials corresponding to the preset platform number.
S109: and deleting the login credentials of the first m bits in the second sequence from the login list, and controlling the target platform to log out the second account.
After execution of S109, execution continues with S110.
And the value of m is a second difference value, and the second difference value is a difference value between a second value and a second preset threshold value. The second account number is: the account corresponding to the first m-digit login credentials in the second sequence.
S110: and counting the total number of the login credentials corresponding to the preset equipment number in the login list to obtain a third numerical value.
S111: and judging whether the third value is larger than a third preset threshold value.
If the third value is greater than the third preset threshold, S112 is executed, otherwise S114 is executed.
Wherein the third preset threshold value characterizes a total number of login credentials allowed to login on the target device. The target device is: and presetting the equipment to which the equipment number belongs.
S112: and sequencing the corresponding second login credentials according to the sequence of the login timestamps from early to late to obtain a third sequence.
After execution of S112, execution of S113 is continued.
Wherein the second login credential is: and the login credentials corresponding to the preset equipment number.
S113: and deleting the login credentials of the first k bits in the third sequence from the login list, and controlling each platform to log out the third account.
After execution of S113, execution of S114 is continued.
And the value of k is a third difference value, and the third difference value is a difference value between a third numerical value and a third preset threshold value.
S114: and sequencing the login credentials in the login list according to the sequence of the corresponding login time stamps from early to late.
And the value of k is a third difference value, and the third difference value is a difference value between a third numerical value and a third preset threshold value. The third account is: and the account number corresponding to the first k digits of login credentials in the third sequence.
It should be noted that, specific implementation logic for ordering the respective login credentials in the login list includes but is not limited to: loginlist ═ hgetall (uuid); sort (loginlist), loginlist (hgetall) (uuid) is used to extract the login credentials corresponding to the universally unique identifier of the account.
In summary, the first n devices in the first sequence are deleted from the login list, and the target platform is controlled to log out the first account, so that the number of users logging in different devices at the same time under the same platform can be limited. And deleting the login credentials of the first m bits in the second sequence from the login list, and controlling the target platform to log out the second account, so that the times that the user logs in the same account at the same time under the same platform can be limited. And deleting the login credentials of the first k bits in the third sequence from the login list, and controlling each platform to log out the third account, so that the number of accounts which can be logged in by the user under the same equipment can be limited. Therefore, by the scheme of the embodiment, the user experience can be improved under the condition of ensuring the benefits of the platform.
It should be noted that, in the above embodiment, the step S106 is an optional implementation manner of the account login limitation method described in this application. In addition, S110 mentioned in the above embodiment is an optional implementation manner of the account login limiting method in the present application. For this reason, the flow mentioned in the above embodiment can be summarized as the method shown in fig. 2.
As shown in fig. 2, a schematic diagram of another account login limitation method provided in the embodiment of the present application includes the following steps:
s201: and generating a login credential under the condition that the user is detected to log in the account on the platform through the equipment.
S202: and caching the corresponding relation among the universal unique identification code of the account, the login certificate, the equipment number of the equipment, the platform number of the platform and the login timestamp of the account into a preset login list.
S203: and counting the total number of the equipment corresponding to the preset platform number in the login list to obtain a first numerical value.
S204: and under the condition that the first numerical value is larger than a first preset threshold value, sequencing the corresponding first devices according to the sequence of the login timestamps from early to late to obtain a first sequence.
The first preset threshold value represents the total number of the devices allowed to be logged in by the target platform. The target platform is: and presetting the platform to which the platform number belongs. The first device is: and the equipment corresponds to the preset platform number.
S205: and deleting the first n-digit equipment in the first sequence from the login list, and controlling the target platform to log out the first account.
And the value of n is a first difference value, and the first difference value is a difference value between the first numerical value and a first preset threshold value. The first account number is: the account number corresponding to the first n-digit device in the first sequence.
In summary, the first n devices in the first sequence are deleted from the login list, and the target platform is controlled to log out the first account, so that the number of users logging in different devices at the same time under the same platform can be limited. Therefore, by using the scheme of the embodiment, the user experience can be improved under the condition of ensuring the benefits of the platform.
Corresponding to the account login limiting method provided by the embodiment of the application, the embodiment of the application also provides an account login limiting device.
As shown in fig. 3, an architecture schematic diagram of an account login limiting device provided in the embodiment of the present application includes:
the generation unit 100 is configured to generate a login credential when detecting that a user logs in an account on a platform through a device.
The caching unit 200 is configured to cache a corresponding relationship between the universal unique identification code of the account, the login credential, the device number of the device, the platform number of the platform, and the login timestamp of the account in a preset login list.
The first counting unit 300 is configured to count the total number of the devices corresponding to the preset platform number in the login list to obtain a first numerical value.
A first sorting unit 400, configured to, when the first value is greater than a first preset threshold, sort the corresponding first devices according to an order from early to late of the login timestamps, so as to obtain a first sequence; the method comprises the steps that a first preset threshold value represents the total number of devices allowed to be logged in by a target platform; the target platform is: presetting a platform to which a platform number belongs; the first device is: and the equipment corresponds to the preset platform number.
A first deleting unit 500, configured to delete the first n devices in the first sequence from the login list, and control the target platform to log out the first account; the value of n is a first difference value, and the first difference value is the difference value between the first numerical value and a first preset threshold value; the first account number is: the account number corresponding to the first n-digit device in the first sequence.
A second counting unit 600, configured to count, when the first value is not greater than the first preset threshold, a total number of login credentials corresponding to a preset platform number in the login list, so as to obtain a second value.
A second sorting unit 700, configured to, when the second value is greater than a second preset threshold, sort the corresponding first login credentials in an order from early to late according to the login timestamps, so as to obtain a second sequence; the second preset threshold value represents the total number of the login credentials allowed to be logged in on the target platform; the first login credentials are: and the login credentials corresponding to the preset platform number.
A second deleting unit 800, configured to delete the first m login credentials in the second sequence from the login list, and control the target platform to log out the second account; the value of m is a second difference value, and the second difference value is the difference value between a second value and a second preset threshold value; the second account is: the account number corresponding to the first m digits of the login credentials in the second sequence.
A third counting unit 900, configured to count the total number of login credentials corresponding to the preset device number in the login list when the second value is not greater than the second preset threshold, to obtain a third value.
A third sorting unit 1000, configured to, when the third value is greater than a third preset threshold, sort the corresponding second login credentials in an order from early to late of the login timestamps to obtain a third sequence; the third preset threshold value represents the total number of the allowed login credentials on the target device; the target device is: presetting equipment to which the equipment number belongs; the second login credential is: and the login credentials corresponding to the preset equipment number.
A third deleting unit 1100, configured to delete the login credentials of the first k bits in the third sequence from the login list, and control each platform to log out the third account; the value of k is a third difference value, and the third difference value is a difference value between a third numerical value and a third preset threshold value; the third account is: and the account number corresponding to the first k digits of login credentials in the third sequence.
A fourth sorting unit 1200, configured to, when the third value is not greater than the third preset threshold, sort the corresponding login credentials in the login list in an order from early to late of the login timestamp.
In summary, the first n devices in the first sequence are deleted from the login list, and the target platform is controlled to log out the first account, so that the number of different devices that the user logs in at the same time on the same platform can be limited. Therefore, by using the scheme of the embodiment, the user experience can be improved under the condition of ensuring the benefits of the platform.
The application also provides a computer-readable storage medium, which comprises a stored program, wherein the program executes the account login limitation method provided by the application.
The application also provides account login limiting equipment, which comprises: a processor, memory, and a bus. The processor is connected with the memory through a bus, the memory is used for storing programs, and the processor is used for running the programs, wherein when the programs are run, the account login limiting method provided by the application is executed, and the method comprises the following steps:
generating a login credential under the condition that a user logs in an account on a platform through equipment is detected;
caching the corresponding relation among the universal unique identification code of the account, the login voucher, the equipment number of the equipment, the platform number of the platform and the login timestamp of the account into a preset login list;
counting the total number of the equipment corresponding to the preset platform number in the login list to obtain a first numerical value;
when the first numerical value is larger than a first preset threshold value, sequencing the corresponding first devices according to the sequence of the login time stamps from early to late to obtain a first sequence; the first preset threshold represents the total number of the devices allowed to be logged in by the target platform; the target platform is as follows: the platform to which the preset platform number belongs; the first device is: the equipment corresponds to the preset platform number;
deleting the first n devices in the first sequence from the login list, and controlling the target platform to log out the first account; the value of n is a first difference value, and the first difference value is the difference value between the first numerical value and the first preset threshold value; the first account number is: and the account number corresponding to the first n-digit equipment in the first sequence.
Optionally, the method further includes:
under the condition that the first numerical value is not larger than a first preset threshold value, counting the total number of login credentials corresponding to the preset platform number in the login list to obtain a second numerical value;
under the condition that the second numerical value is larger than a second preset threshold value, sequencing the corresponding first login credentials according to the sequence of the login timestamps from early to late to obtain a second sequence; the second preset threshold value represents the total number of login credentials allowed to be logged in on the target platform; the first login credential is: a login credential corresponding to the preset platform number;
deleting the login credentials of the first m bits in the second sequence from the login list, and controlling the target platform to log out the second account; the value of m is a second difference value, and the second difference value is the difference value between the second value and the second preset threshold value; the second account is: and the account number corresponding to the first m-bit login credentials in the second sequence.
Optionally, the method further includes:
under the condition that the second numerical value is not larger than the second preset threshold value, counting the total number of login credentials corresponding to preset equipment numbers in the login list to obtain a third numerical value;
when the third numerical value is larger than a third preset threshold value, sequencing the corresponding second login credentials according to the sequence of the login timestamps from early to late to obtain a third sequence; the third preset threshold value represents the total number of login credentials allowed to be logged in on the target device; the target device is as follows: the equipment to which the preset equipment number belongs; the second login credential is: a login credential corresponding to the preset device number;
deleting the login credentials of the first k bits in the third sequence from the login list, and controlling each platform to log out the third account; the value of k is a third difference value, and the third difference value is a difference value between the third numerical value and the third preset threshold value; the third account is: and the account corresponding to the first k digits of login credentials in the third sequence.
Optionally, the method further includes:
and under the condition that the third numerical value is not larger than the third preset threshold, sequencing the corresponding login credentials in the login list according to the sequence of the login timestamps from early to late.
The functions described in the method of the embodiment of the present application, if implemented in the form of software functional units and sold or used as independent products, may be stored in a storage medium readable by a computing device. Based on such understanding, part of the contribution to the prior art of the embodiments of the present application or part of the technical solution may be embodied in the form of a software product stored in a storage medium and including several instructions for causing a computing device (which may be a personal computer, a server, a mobile computing device or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (6)
1. An account login limiting method is characterized by comprising the following steps:
generating a login credential when detecting that a user logs in an account on a platform through equipment;
caching the corresponding relation among the universal unique identification code of the account, the login certificate, the equipment number of the equipment, the platform number of the platform and the login timestamp of the account into a preset login list;
counting the total number of the equipment corresponding to the preset platform number in the login list to obtain a first numerical value;
when the first numerical value is larger than a first preset threshold value, sequencing the corresponding first devices according to the sequence of the login time stamps from early to late to obtain a first sequence; the first preset threshold represents the total number of the devices allowed to be logged in by the target platform; the target platform is as follows: the platform to which the preset platform number belongs; the first device is: the equipment corresponds to the preset platform number;
deleting the first n devices in the first sequence from the login list, and controlling the target platform to log out the first account; the value of n is a first difference value, and the first difference value is the difference value between the first numerical value and the first preset threshold value; the first account number is: the account number corresponding to the first n-digit equipment in the first sequence;
under the condition that the first numerical value is not larger than a first preset threshold value, counting the total number of login credentials corresponding to the preset platform number in the login list to obtain a second numerical value;
under the condition that the second numerical value is larger than a second preset threshold value, sequencing the corresponding first login credentials according to the sequence of the login timestamps from early to late to obtain a second sequence; the second preset threshold value represents the total number of login credentials allowed to be logged in on the target platform; the first login credential is: a login credential corresponding to the preset platform number;
deleting the login credentials of the first m bits in the second sequence from the login list, and controlling the target platform to log out the second account; the value of m is a second difference value, and the second difference value is the difference value between the second value and the second preset threshold value; the second account is: an account corresponding to the first m-digit login credentials in the second sequence;
under the condition that the second numerical value is not larger than the second preset threshold value, counting the total number of login credentials corresponding to preset equipment numbers in the login list to obtain a third numerical value;
when the third numerical value is larger than a third preset threshold value, sequencing the corresponding second login credentials according to the sequence of the login timestamps from early to late to obtain a third sequence; the third preset threshold value represents the total number of login credentials allowed to be logged in on the target device; the target device is as follows: the equipment to which the preset equipment number belongs; the second login credential is: a login credential corresponding to the preset device number;
deleting the login credentials of the first k bits in the third sequence from the login list, and controlling each platform to log out the third account; the value of k is a third difference value, and the third difference value is a difference value between the third numerical value and the third preset threshold value; the third account is: and the account corresponding to the first k digits of login credentials in the third sequence.
2. The method of claim 1, further comprising:
and under the condition that the third numerical value is not greater than the third preset threshold value, sorting the corresponding login credentials in the login list according to the sequence of the login timestamps from early to late.
3. An account login restriction apparatus, comprising:
the generating unit is used for generating a login credential under the condition that a user logs in an account on the platform through equipment is detected;
the cache unit is used for caching the corresponding relation among the universal unique identification code of the account, the login credential, the equipment number of the equipment, the platform number of the platform and the login timestamp of the account into a preset login list;
the first counting unit is used for counting the total number of the equipment corresponding to the preset platform number in the login list to obtain a first numerical value;
the first sequencing unit is used for sequencing the corresponding first devices according to the sequence of the login timestamps from early to late to obtain a first sequence under the condition that the first numerical value is greater than a first preset threshold; the first preset threshold represents the total number of the devices allowed to be logged in by the target platform; the target platform is as follows: the platform to which the preset platform number belongs; the first device is: the equipment corresponds to the preset platform number;
a first deleting unit, configured to delete the first n devices in the first sequence from the login list, and control the target platform to log out the first account; the value of n is a first difference value, and the first difference value is the difference value between the first numerical value and the first preset threshold value; the first account number is: account numbers corresponding to the first n devices in the first sequence;
a second counting unit, configured to count a total number of login credentials corresponding to the preset platform number in the login list to obtain a second numerical value when the first numerical value is not greater than a first preset threshold;
a second sorting unit, configured to, when the second value is greater than a second preset threshold, sort the corresponding first login credentials in an order from early to late according to the login timestamps, to obtain a second sequence; the second preset threshold value represents the total number of login credentials allowed to be logged in on the target platform; the first login credential is: a login credential corresponding to the preset platform number;
the second deleting unit is used for deleting the login credentials of the first m bits in the second sequence from the login list and controlling the target platform to log out the second account; the value of m is a second difference value, and the second difference value is a difference value between the second value and the second preset threshold value; the second account number is: an account number corresponding to the first m-digit login credentials in the second sequence;
a third counting unit, configured to count a total number of login credentials corresponding to a preset device number in the login list to obtain a third value when the second value is not greater than the second preset threshold;
a third sorting unit, configured to, when the third numerical value is greater than a third preset threshold, sort the corresponding second login credentials in an order from early to late of the login timestamps to obtain a third sequence; the third preset threshold value represents the total number of the login credentials allowed to be logged in on the target device; the target device is as follows: the equipment to which the preset equipment number belongs; the second login credential is: a login credential corresponding to the preset device number;
a third deleting unit, configured to delete the login credentials of the first k bits in the third sequence from the login list, and control each platform to log out the third account; the value of k is a third difference value, and the third difference value is a difference value between the third numerical value and the third preset threshold value; the third account number is: and the account corresponding to the first k digits of login credentials in the third sequence.
4. The apparatus of claim 3, further comprising:
and the fourth sorting unit is used for sorting the corresponding login credentials in the login list according to the sequence of the login timestamps from early to late under the condition that the third numerical value is not larger than the third preset threshold.
5. A computer-readable storage medium, characterized in that the computer-readable storage medium includes a stored program, wherein the program executes the account login restriction method according to any one of claims 1 to 2.
6. An account login restriction device, comprising: a processor, a memory, and a bus; the processor and the memory are connected through the bus;
the memory is used for storing a program, and the processor is used for executing the program, wherein the program executes the account login limitation method according to any one of claims 1-2 when running.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110758017.3A CN113343217B (en) | 2021-07-05 | 2021-07-05 | Account login limiting method, device, storage medium and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110758017.3A CN113343217B (en) | 2021-07-05 | 2021-07-05 | Account login limiting method, device, storage medium and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113343217A CN113343217A (en) | 2021-09-03 |
CN113343217B true CN113343217B (en) | 2022-08-23 |
Family
ID=77482502
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110758017.3A Active CN113343217B (en) | 2021-07-05 | 2021-07-05 | Account login limiting method, device, storage medium and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113343217B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113839931B (en) * | 2021-09-07 | 2022-06-28 | 广州爱浦路网络技术有限公司 | Login method, computer device and storage medium |
CN115065512B (en) * | 2022-05-31 | 2024-03-15 | 北京奇艺世纪科技有限公司 | Account login method, system, device, electronic equipment and storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112839028A (en) * | 2020-12-16 | 2021-05-25 | 深圳市镜玩科技有限公司 | Account logout processing method, related device, server and medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8185353B2 (en) * | 2008-04-08 | 2012-05-22 | Microsoft Corporation | Determining computer system usage from logged events |
CN108270753B (en) * | 2016-12-30 | 2021-02-26 | 北京国双科技有限公司 | Method and device for logging out user account |
CN107196949A (en) * | 2017-06-12 | 2017-09-22 | 环球智达科技(北京)有限公司 | The system for limiting same user account registration terminal quantity |
CN107277002A (en) * | 2017-06-12 | 2017-10-20 | 环球智达科技(北京)有限公司 | The method for limiting same user account registration terminal quantity |
CN108848113B (en) * | 2018-08-15 | 2021-03-26 | 广州视源电子科技股份有限公司 | Client device login control method and device, storage medium and server |
-
2021
- 2021-07-05 CN CN202110758017.3A patent/CN113343217B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112839028A (en) * | 2020-12-16 | 2021-05-25 | 深圳市镜玩科技有限公司 | Account logout processing method, related device, server and medium |
Also Published As
Publication number | Publication date |
---|---|
CN113343217A (en) | 2021-09-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113343217B (en) | Account login limiting method, device, storage medium and equipment | |
CN111030936B (en) | Current-limiting control method and device for network access and computer-readable storage medium | |
TWI758260B (en) | Website login method and login system based on mobile phone short message | |
CN109698809B (en) | Method and device for identifying abnormal login of account | |
WO2019200799A1 (en) | Short message verification code pushing method, electronic device and readable storage medium | |
EP3270317B1 (en) | Dynamic security module server device and operating method thereof | |
CN109194671A (en) | A kind of recognition methods of abnormal access behavior and server | |
CN104426835B (en) | Login detection method, server, login detection device and system | |
WO2018018780A1 (en) | Access method and apparatus for controlling wifi access device, and storage medium | |
CN104052757B (en) | Identification system and method based on the client application in mobile phone | |
CN112100603B (en) | Website combined graph verification code defense method and system | |
WO2015078122A1 (en) | Method and device for recognizing data stream | |
CN107666470A (en) | A kind of processing method and processing device of checking information | |
CN107196949A (en) | The system for limiting same user account registration terminal quantity | |
CN111027033B (en) | Interface access method and device | |
CN104519069A (en) | Method and device for intercepting resource requests | |
CN105656912A (en) | Mobile intelligent terminal APP request process control method | |
CN112600864A (en) | Verification code verification method, device, server and medium | |
CN106921626B (en) | User registration method and device | |
CN111585978A (en) | Method, client, server and system for intercepting false requests | |
CN111104685A (en) | Dynamic updating method and device for two-dimensional code | |
CN109818915B (en) | Information processing method and device, server and readable storage medium | |
KR101118605B1 (en) | Log-in system and method with strengthened security | |
CN110933068B (en) | Black and white list real-time optimization method and device, server and storage medium | |
CN110417615B (en) | Check switch control method, device and equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |