CN116208388A - Method, device, medium and equipment for logging in multiple devices by same account - Google Patents

Method, device, medium and equipment for logging in multiple devices by same account Download PDF

Info

Publication number
CN116208388A
CN116208388A CN202310082808.8A CN202310082808A CN116208388A CN 116208388 A CN116208388 A CN 116208388A CN 202310082808 A CN202310082808 A CN 202310082808A CN 116208388 A CN116208388 A CN 116208388A
Authority
CN
China
Prior art keywords
login
account
user
logging
devices
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
CN202310082808.8A
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.)
Jiangxi Digital Internet Connection Information Security Technology Co ltd
Original Assignee
Jiangxi Digital Internet Connection Information Security Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangxi Digital Internet Connection Information Security Technology Co ltd filed Critical Jiangxi Digital Internet Connection Information Security Technology Co ltd
Priority to CN202310082808.8A priority Critical patent/CN116208388A/en
Publication of CN116208388A publication Critical patent/CN116208388A/en
Pending legal-status Critical Current

Links

Images

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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present disclosure discloses a method, an apparatus, a medium, and a device for logging in a plurality of devices by using a same account, firstly, responding to an account logging request of a user, obtaining a preset upper limit of the number of logging in devices and a logging number of the logging in devices, then, judging whether the logging number is equal to the upper limit of the number according to the logging number and the upper limit of the number, if the logging number is equal to the upper limit of the number, logging out at least one logging in device, so that the user logs in an account corresponding to the account logging in request, otherwise, directly logging in an account corresponding to the account logging in request.

Description

Method, device, medium and equipment for logging in multiple devices by same account
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a medium, and a device for logging in multiple devices by using the same account.
Background
In daily life, a user often logs in the same account number on a plurality of devices, for example, a office worker logs in his own social account number during work, and also logs in his own social account number on a personal computer after work.
As a user logs in to the same account number at multiple devices, and there is no limit to the number of devices logged in, potential safety hazards may occur. Meanwhile, the current application is often that a default setting user can only log in an account number on one device at the same time, or at most log in the account number on a fixed number of devices at the same time, the upper limit of the number of devices of the simultaneously logged in account number cannot be actively set by the user, and user experience of the user is reduced.
Therefore, how to improve the user experience of the user and ensure the security of the account when the plurality of devices log in is a problem to be solved.
Disclosure of Invention
The specification provides a method, a device, a storage medium and electronic equipment for logging in a plurality of devices by the same account, so as to partially solve the technical problem of how to improve user experience of a user and ensure safety of the account during logging in the plurality of devices.
The technical scheme adopted in the specification is as follows:
the specification provides a method for logging in a plurality of devices by using the same account, which comprises the following steps:
responding to an account login request of a user, and acquiring the upper limit of the number of login devices preset by the user and the login number of the login devices;
judging whether the login quantity is equal to the upper quantity limit or not according to the login quantity and the upper quantity limit;
if the login quantity is equal to the quantity upper limit, at least one login device is logged out, so that the user logs in an account corresponding to the account login request, and otherwise, the user directly logs in the account corresponding to the account login request.
Optionally, obtaining the login number of the login device specifically includes:
responding to each login request of the user, after the account corresponding to the login request is successfully logged in, splicing a session module and a user name of the account, taking a spliced field as a key, taking a current global session Id as a value, and storing the value into a list data structure of a redis;
and inquiring the number of the user names existing in the database to take the number of the user names as the login number.
Optionally, after the account corresponding to the login request is successfully logged in, the session module and the user name of the account are spliced, the spliced field is used as a key, the current global session sessionId is used as a value, and the value is stored into a list data structure of redis, wherein the list data structure specifically comprises:
responding to each login request of the user, after the account corresponding to the login request is successfully logged in, splicing a login module and a user name of the account, taking a spliced field as a key, taking a current session Id as a value, taking a timestamp of a current system as a score, and storing the login state of the account into a data structure of a zest of a redis
Optionally, if the login number is equal to the number upper limit, logging out at least one login device specifically includes:
and if the upper limit of the number is one, deleting the session list corresponding to the user names of all the accounts stored in the database so as to log out all the login devices.
Optionally, if the login number is equal to the number upper limit, logging out at least one login device specifically includes:
if the login number is equal to the upper number limit, at least one login device is logged out of the zest of redis according to the time stamp.
Optionally, according to the timestamp, logging out at least one login device from the zest of redis, which specifically includes:
acquiring the time stamp stored when each user name is stored in the database;
sequencing the time stamps according to the time corresponding to the time stamps;
and logging out the login equipment corresponding to the time stamp with the first sequence.
Optionally, sorting the time stamps according to the time corresponding to the time stamps specifically includes:
and sequencing the timestamps with earlier time corresponding to the timestamps, wherein the sequencing is performed more forward, so as to finish sequencing the timestamps.
The present disclosure provides a device for logging in a plurality of devices by using the same account, including:
the acquisition module is used for responding to an account login request of a user and acquiring the upper limit of the number of login devices preset by the user and the login number of the login devices;
the judging module is used for judging whether the login quantity is equal to the quantity upper limit or not according to the login quantity and the quantity upper limit;
and the login module is used for logging out at least one login device if the login quantity is equal to the quantity upper limit so that the user logs in the account corresponding to the account login request, and if not, directly logging in the account corresponding to the account login request.
The present specification provides a computer readable storage medium storing a computer program which when executed by a processor implements the method of logging in a plurality of devices with the same account number described above.
The present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the method for logging in multiple devices by using the same account when executing the program.
The above-mentioned at least one technical scheme that this specification adopted can reach following beneficial effect:
in the method for logging in multiple devices by the same account provided in the specification, firstly, the upper limit of the number of logging-in devices preset by a user and the logging-in number of the logging-in devices are obtained in response to the account logging-in request of the user, then whether the logging-in number is equal to the upper limit of the number can be judged according to the logging-in number and the upper limit of the number, if the logging-in number is equal to the upper limit of the number, at least one logging-in device is logged out, so that the account corresponding to the account logging-in request of the user is logged in, and if not, the account corresponding to the account logging-in request is directly logged in.
According to the method, the user can set the upper limit of the number of the login devices, the user experience of the user is improved, the operability of the user on the account is improved, after the login, the number of the login devices exceeds the upper limit of the number of the login devices, at least one login device is automatically logged out, and therefore the safety of the account is guaranteed.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification, illustrate and explain the exemplary embodiments of the present specification and their description, are not intended to limit the specification unduly. In the drawings:
fig. 1 is a flow chart of a method for logging in a plurality of devices by using the same account provided in the present specification;
fig. 2 is a flowchart of an embodiment of a method for logging in a plurality of devices by using the same account provided in the present disclosure;
fig. 3 is a schematic diagram of a device for logging in a plurality of devices by using the same account provided in the present specification;
fig. 4 is a schematic diagram of an electronic device corresponding to fig. 1 provided in the present specification.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present specification more apparent, the technical solutions of the present specification will be clearly and completely described below with reference to specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
Fig. 1 is a flow chart of a method for logging in a plurality of devices by using the same account provided in the present specification, which includes the following steps:
s101: and responding to an account login request of a user, and acquiring the upper limit of the number of login devices preset by the user and the login number of the login devices.
As can be seen from the foregoing description, the core innovation point of the method for logging in a plurality of devices by using the same account number provided in the present disclosure is that the user sets the login number of the devices capable of logging in by himself and logs out the login devices automatically after exceeding the login number, so in the present disclosure, the execution subject of the method for logging in a plurality of devices by using the same account number in a specific manner may be a terminal device such as a desktop computer or a notebook computer used by an operator, and the following description is provided only using the terminal device as the execution subject of the method for logging in a plurality of devices by using the same account number provided in the present disclosure.
Firstly, the terminal device can respond to an account number login request of a user to obtain the upper limit of the number of login devices preset by the user and the login number of the login devices, wherein the mode of the upper limit of the number of the login devices preset by the user can be set by the user when the user creates an account number or can be set by the user in the using process.
Specifically, after responding to each account login request of a user, the terminal device can splice a login module and a user name of the account after the account corresponding to the login request is successfully logged in, take a spliced field as a key, take a current global session sessionId as a value, store the value into a list data structure of a redis, and inquire the number of the user names existing in a database when the user logs in other login devices, so that the number of the user names is taken as the login number.
In the list process that the terminal equipment stores the user session information into the redis, the user name of the account can be spliced by the session module name to be used as a key, the current global session Id is used as a value, and the value is stored into a data structure of the list of the redis for session management; and then taking the user name of the login module name spliced account as a key, taking the current session Id as a value, taking the current system millisecond time stamp as a score, and storing the login state into a zset data structure of redis so as to mark the login time of the user.
S102: and judging whether the login quantity is equal to the upper quantity limit or not according to the login quantity and the upper quantity limit.
The terminal device may determine, according to the login number and the number upper limit, whether the login number is equal to the number upper limit.
S103: if the login quantity is equal to the quantity upper limit, at least one login device is logged out, so that the user logs in an account corresponding to the account login request, and otherwise, the user directly logs in the account corresponding to the account login request.
If the terminal device determines that the login number is equal to the upper limit of the number, the number of login devices allowed to login, which is set by the user, reaches the upper limit, and at least one logged-in login device needs to be logged out in order to ensure that the user successfully logs in the login.
Specifically, if the upper limit of the number set by the user is one, the user is not allowed to log in the accounts simultaneously by the plurality of devices, and at the same time, after the terminal device responds to the account login request of the user, the session list corresponding to the user names of all the accounts stored in the database is deleted so as to log out all the login devices.
If the upper limit of the number set by the user is not one, the user is allowed to log in the account numbers simultaneously, meanwhile, after the terminal device determines that the number of logging in is equal to the upper limit of the number, the terminal device can log out at least one logging-in device from the zest of redis according to the time stamp so as to realize the earliest logging-in device, in the specification, the terminal device can acquire the time stamp saved when each user name is stored in the database, then can sort the time stamps according to the time corresponding to the time stamp, log out the logging-in device corresponding to the time stamp with the first sorting order, and a specific sorting mode can be that the earlier the time stamp corresponding to the time stamp is, the earlier the sorting is so as to finish the sorting of the time stamp. Thereby enabling the device that logged in earliest to log out.
An embodiment of a method for logging in a plurality of devices by using the same account provided in the present specification is described below with reference to fig. 2.
The terminal equipment responds to an account login request of a user, after the user inputs an account and a password, whether the account password is correct or not is determined, and if the account password is wrong, the user inputs the account and the password again. If the account number and the password are correct, the number of the login devices is obtained, then the terminal device can judge whether the account number allows the multiple devices to login simultaneously, if the account number does not allow the multiple devices to login simultaneously, and the other login devices are logged in, the account numbers on the other login devices are logged out.
If the account allows multiple devices to be online simultaneously, judging whether the login quantity is equal to the upper quantity limit, if the login quantity is equal to the upper login limit, logging out the login device which logs in earliest, storing the user name and the timestamp of the user login in a corresponding database, and logging in the account on the login device.
According to the method, the user can set the upper limit of the number of the login devices, the user experience of the user is improved, the operability of the user on the account is improved, after the login, the number of the login devices exceeds the upper limit of the number of the login devices, at least one login device is automatically logged out, and therefore the safety of the account is guaranteed.
The method for logging in multiple devices by the same account provided in one or more embodiments of the present disclosure is based on the same concept, and the present disclosure further provides a device for logging in multiple devices by the same account, as shown in fig. 3.
Fig. 3 is a schematic diagram of an apparatus for logging in a plurality of devices by using the same account provided in the present disclosure, including:
an obtaining module 301, configured to obtain, in response to an account login request of a user, an upper limit of a number of login devices preset by the user, and a login number of the login devices;
a judging module 302, configured to judge whether the login number is equal to the number upper limit according to the login number and the number upper limit;
and a login module 303, configured to log out at least one login device if the login number is equal to the number upper limit, so that the user logs in an account corresponding to the account login request, and if not, directly log in an account corresponding to the account login request.
Optionally, the obtaining module 301 is specifically configured to, in response to each login request of the user, splice a session module and a user name of the account after the account corresponding to the login request is successfully logged in, and store a current global session sessionId as a value into a list data structure of a redis with the spliced field as a key; and inquiring the number of the user names existing in the database to take the number of the user names as the login number.
Optionally, the obtaining module 301 is specifically configured to, in response to each login request of the user, splice a login module and a user name of the account after the account corresponding to the login request is successfully logged in, take a spliced field as a key, take a current session id as a value, take a timestamp of a current system as a score, and store a login state of the account into a data structure of a zest of redis.
Optionally, the login module 303 is specifically configured to delete the session list corresponding to the user names of all the accounts stored in the database if the upper limit of the number is one, so as to log out all the login devices.
Optionally, the login module 303 is specifically configured to log out at least one login device from zest of redis according to the timestamp if the login number is equal to the upper number limit.
Optionally, the login module 303 is specifically configured to obtain the timestamp stored when each user name is stored in the database; sequencing the time stamps according to the time corresponding to the time stamps; and logging out the login equipment corresponding to the time stamp with the first sequence.
Optionally, the login module 303 is specifically configured to sort the timestamps corresponding to the earlier time, the earlier the time is, so as to complete the sorting of the time stamps.
The present disclosure also provides a computer readable storage medium storing a computer program operable to perform a method for logging in a plurality of devices using the same account as provided in fig. 1.
The present specification also provides a schematic structural diagram of an electronic device corresponding to fig. 1 shown in fig. 4. At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile storage, as described in fig. 4, although other hardware required by other services may be included. The processor reads the corresponding computer program from the nonvolatile memory to the memory and then runs the computer program to realize the method for logging in a plurality of devices by the same account number as described in fig. 1. Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present description, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or logic devices.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Controler, PLC) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A digital system is "integrated" on a PLC by the designer's own programming without requiring the chip manufacturer to design and fabricate application specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present description is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present description.

Claims (10)

1. A method for logging in a plurality of devices by using a same account, comprising:
responding to an account login request of a user, and acquiring the upper limit of the number of login devices preset by the user and the login number of the login devices;
judging whether the login quantity is equal to the upper quantity limit or not according to the login quantity and the upper quantity limit;
if the login quantity is equal to the quantity upper limit, at least one login device is logged out, so that the user logs in an account corresponding to the account login request, and otherwise, the user directly logs in the account corresponding to the account login request.
2. The method according to claim 1, wherein obtaining the login number of the login device specifically comprises:
responding to each login request of the user, after the account corresponding to the login request is successfully logged in, splicing a session module and a user name of the account, taking a spliced field as a key, taking a current global session Id as a value, and storing the value into a list data structure of a redis;
and inquiring the number of the user names existing in the database to take the number of the user names as the login number.
3. The method according to claim 2, wherein, in response to each login request of the user, after the account corresponding to the login request is successfully logged in, the session module and the user name of the account are spliced, and the spliced field is used as a key, the current global session sessionId is used as a value, and the current global session sessionId is stored into a list data structure of rediss, which specifically includes:
and after the account corresponding to the login request is successfully logged in, splicing the login module and the user name of the account, taking the spliced field as a key, taking the current session Id as a value, taking the timestamp of the current system as a score, and storing the login state of the account into a data structure of a zest of a redis.
4. The method according to claim 2, characterized in that if the login number is equal to the upper number limit, logging out at least one of the login devices, in particular comprises:
and if the upper limit of the number is one, deleting the session list corresponding to the user names of all the accounts stored in the database so as to log out all the login devices.
5. A method according to claim 3, characterized in that if the number of logins is equal to the upper number limit, at least one of the login devices is logged out, in particular comprising:
if the login number is equal to the upper number limit, at least one login device is logged out of the zest of redis according to the time stamp.
6. The method according to claim 5, characterized in that, according to the time stamp, at least one of the login devices is logged out of the zest of redis, comprising in particular:
acquiring the time stamp stored when each user name is stored in the database;
sequencing the time stamps according to the time corresponding to the time stamps;
and logging out the login equipment corresponding to the time stamp with the first sequence.
7. The method according to claim 6, wherein the time stamps are ordered according to the time corresponding to the time stamp, and specifically comprising:
and sequencing the timestamps with earlier time corresponding to the timestamps, wherein the sequencing is performed more forward, so as to finish sequencing the timestamps.
8. An apparatus for logging in a plurality of devices with a same account, comprising:
the acquisition module is used for responding to an account login request of a user and acquiring the upper limit of the number of login devices preset by the user and the login number of the login devices;
the judging module is used for judging whether the login quantity is equal to the quantity upper limit or not according to the login quantity and the quantity upper limit;
and the login module is used for logging out at least one login device if the login quantity is equal to the quantity upper limit so that the user logs in the account corresponding to the account login request, and if not, directly logging in the account corresponding to the account login request.
9. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1-7 when executing the program.
CN202310082808.8A 2023-02-08 2023-02-08 Method, device, medium and equipment for logging in multiple devices by same account Pending CN116208388A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310082808.8A CN116208388A (en) 2023-02-08 2023-02-08 Method, device, medium and equipment for logging in multiple devices by same account

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310082808.8A CN116208388A (en) 2023-02-08 2023-02-08 Method, device, medium and equipment for logging in multiple devices by same account

Publications (1)

Publication Number Publication Date
CN116208388A true CN116208388A (en) 2023-06-02

Family

ID=86516671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310082808.8A Pending CN116208388A (en) 2023-02-08 2023-02-08 Method, device, medium and equipment for logging in multiple devices by same account

Country Status (1)

Country Link
CN (1) CN116208388A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105978947A (en) * 2016-04-27 2016-09-28 努比亚技术有限公司 Same account number login equipment number control method and mobile terminal
US9912676B1 (en) * 2017-06-30 2018-03-06 Study Social, Inc. Account sharing prevention and detection in online education
CN112653681A (en) * 2020-12-15 2021-04-13 中国建设银行股份有限公司 Multi-feature fusion user login access method, device and system
CN115001747A (en) * 2022-04-29 2022-09-02 北京奇艺世纪科技有限公司 Device control method, device, electronic device and storage medium
CN115186249A (en) * 2022-09-13 2022-10-14 飞狐信息技术(天津)有限公司 Management method and system for multi-device simultaneous login, electronic device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105978947A (en) * 2016-04-27 2016-09-28 努比亚技术有限公司 Same account number login equipment number control method and mobile terminal
US9912676B1 (en) * 2017-06-30 2018-03-06 Study Social, Inc. Account sharing prevention and detection in online education
CN112653681A (en) * 2020-12-15 2021-04-13 中国建设银行股份有限公司 Multi-feature fusion user login access method, device and system
CN115001747A (en) * 2022-04-29 2022-09-02 北京奇艺世纪科技有限公司 Device control method, device, electronic device and storage medium
CN115186249A (en) * 2022-09-13 2022-10-14 飞狐信息技术(天津)有限公司 Management method and system for multi-device simultaneous login, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN108628688B (en) Message processing method, device and equipment
CN110618869B (en) Resource management method, device and equipment
CN111459724B (en) Node switching method, device, equipment and computer readable storage medium
CN109922142B (en) File downloading method, device and system
CN110046052B (en) Service calling method and device
CN117931423A (en) Task processing method, device and electronic equipment, and risk identification task processing method and device
CN110022351B (en) Service request processing method and device
CN116208388A (en) Method, device, medium and equipment for logging in multiple devices by same account
CN116302616A (en) Data processing method and device, storage medium and electronic equipment
CN116384505A (en) Data processing method and device, storage medium and electronic equipment
CN116108498A (en) Program execution method, program execution device, storage medium and electronic equipment
CN111368273B (en) Identity verification method and device
CN111966709B (en) Data query method and device and electronic equipment
CN111796864A (en) Data verification method and device
CN111880922A (en) Processing method, device and equipment for concurrent tasks
CN113011165B (en) Method, device, equipment and medium for identifying blocked keywords
CN110704742A (en) Feature extraction method and device
CN117573359B (en) Heterogeneous cluster-based computing framework management system and method
CN117519912B (en) Mirror image warehouse deployment method, device, storage medium and equipment
CN117555697B (en) Distributed training-oriented cache loading system, method, device and equipment
CN117118523B (en) Information transmission system, method and device, storage medium and electronic equipment
CN115952271B (en) Method and device for generating dialogue information, storage medium and electronic equipment
CN117555586B (en) Algorithm application publishing, managing and scoring method
CN112434486B (en) Automatic paging method, device, equipment and medium for device in PCB design
CN116501474B (en) System, method and device for processing batch homogeneous tasks

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