CN115695288A - Login control method and device, electronic equipment and storage medium - Google Patents

Login control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115695288A
CN115695288A CN202211336137.5A CN202211336137A CN115695288A CN 115695288 A CN115695288 A CN 115695288A CN 202211336137 A CN202211336137 A CN 202211336137A CN 115695288 A CN115695288 A CN 115695288A
Authority
CN
China
Prior art keywords
service unit
login
key
user
information
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
CN202211336137.5A
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202211336137.5A priority Critical patent/CN115695288A/en
Publication of CN115695288A publication Critical patent/CN115695288A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a login control method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring user login information, and inquiring routing information based on the user login information, wherein the routing information points to a service unit where user data is located; acquiring a fragmentation rule, and determining a shunt key based on the routing information and the fragmentation rule; the shunting key is used for marking a target service unit to be logged in, and the target service unit is a service unit where user data is located; and sending a redirection login request to the target service unit based on the shunt key to complete login. The method and the device have the advantages that the shunting key of the service unit where the user data is located is determined, the redirection login request is forwarded to the service unit where the user data is located based on the shunting key so as to complete login, the service unit where the user data is located processes the redirection login request of the user, cross-cell calling is avoided, the problem of cross-cell data reading and writing under a multi-living scene is solved, and self-sealing in the service unit is realized.

Description

Login control method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of multi-event technologies, and in particular, to a login control method and apparatus, an electronic device, and a storage medium.
Background
With the deep development of internet services, the traditional single machine room has resource bottleneck and poor expandability, and meanwhile, the whole service system is unavailable due to extreme scenes such as machine room power failure, earthquakes, fire disasters and the like; in order to meet the requirement of system service continuity, a multi-activity high-availability deployment architecture becomes the first choice.
The first problem faced by the multi-active architecture is that the service response time is prolonged due to cross-unit data access caused by delay caused by physical distance; in order to solve the problem of physical distance delay, a unit architecture needs to be realized, and self-sealing of data reading and writing in a unit is realized.
However, when the unit where the user data is located is not consistent with the request processing unit, the problem of reading and writing data across units exists.
Disclosure of Invention
The invention provides a login control method, a login control device, electronic equipment and a storage medium, and aims to solve the problem of cross-unit data reading and writing in a multi-living scene.
According to an aspect of the present invention, there is provided a login control method, including:
acquiring user login information, and inquiring routing information based on the user login information, wherein the routing information points to a service unit where user data is located;
acquiring a fragmentation rule, and determining a shunt key based on the routing information and the fragmentation rule; the shunting key is used for marking a target service unit to be logged in, and the target service unit is a service unit where user data is located;
and sending a redirection login request to the target service unit based on the shunt key to complete login.
According to another aspect of the present invention, there is provided a login control device, including:
the routing information query module is used for acquiring user login information and querying routing information based on the user login information, wherein the routing information points to a service unit where user data is located;
the distribution key determining module is used for acquiring a fragmentation rule and determining a distribution key based on the routing information and the fragmentation rule; the shunting key is used for marking a target service unit to be logged in, and the target service unit is a service unit where user data is located;
and the forwarding login module is used for sending a redirection login request to the target service unit based on the shunt key to complete login.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the login control method according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement a login control method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, the shunting key of the service unit where the user data is located is determined, the redirection login request is forwarded to the service unit where the user data is located based on the shunting key so as to complete login, the service unit where the user data is located processes the redirection login request of the user, cross-cell calling is avoided, the problem of cross-cell reading and writing of data under a multi-activity scene is solved, and self-sealing in the service unit is realized.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a login control method according to an embodiment of the present invention;
fig. 2 is a schematic logic diagram of a session secondary generation according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a request forwarding logic according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a login control device according to a second embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a result of an electronic device according to a third embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a login control method provided in an embodiment of the present invention, where this embodiment is applicable to a situation where a service unit in which user data is located is logged in under a multi-event scenario and a user request is processed in the service unit in which the user data is located, and the method may be executed by a login control method device, where the login control device may be implemented in a form of hardware and/or software, and the login control method device may be configured in an electronic device provided in an embodiment of the present invention. As shown in fig. 1, the method includes:
s110, obtaining user login information, and inquiring routing information based on the user login information, wherein the routing information points to a service unit where user data is located.
The user login information refers to login information input by a user in a login page, and specifically, the user login information includes, but is not limited to, information such as a user name and a password, and is not limited herein; the routing information refers to routing information for performing data reading and writing between a service unit that processes a user request after processing the user request and a service unit in which user data is located, and specifically, the routing information includes a source address, a destination address, and the like, which is not limited herein. In the embodiment, user login information is acquired, and routing information is inquired based on the user login information; illustratively, the routing information for the user is queried based on the user name. It can be understood that the service unit processing the user request writes the user data into the service unit where the user data is located after processing the user request, that is, the routing information points to the service unit where the user data is located.
On the basis of the foregoing embodiment, optionally, the obtaining of the user login information specifically includes: receiving a user login request sent by a client, and acquiring user login information in the user login request, wherein the user login request is generated based on user login operation detected by the client.
The user login operation includes, but is not limited to, inputting login information, inputting a verification code, clicking a login control, and the like, which is not limited herein. In the embodiment, the client generates a user login request when detecting the user login operation and sends the user login request to the server; and the server receives a user login request sent by the client and acquires user login information in the user login request. It will be appreciated that the user login request is directed to the service unit that processes the user request.
S120, obtaining a fragmentation rule, and determining a distribution key based on the routing information and the fragmentation rule; the shunting key is used for marking a target service unit to be logged in, and the target service unit is a service unit where user data is located.
The fragmentation rule is a division rule of the service units, is used for distributing users to different service units, has the same function and only serves the users in the service units; specifically, the fragmentation rule may be fragmentation according to the service type, for example, assuming that there are 4 applications, and the rooms in the a and B sites deploy these applications, but the applications 1 and 2 are only in the room access flow of the a site, the room in the B site is only hot standby, the applications 3 and 4 are only in the room access flow of the B site, and the room in the a site is hot standby; or the business can be divided according to the geographical location, for example, the selling service is taken as an example, the business is divided into different machine rooms according to the geographical location of the user, and the related merchants, users and riders in the whole business range are all in the same geographical location; and is not limited thereto. In the embodiment, a fragmentation rule of a unitized multi-active architecture is obtained, and a shunt key is determined according to routing information and the fragmentation rule; the shunting key is used for marking a service unit stored in the user data and serving as a forwarding basis of a subsequent request; the service unit stored in the user data is the target service unit to be logged in.
On the basis of the foregoing embodiment, optionally, the determining, based on the routing information and the fragmentation rule, a split key includes: determining a plurality of divided service units based on a fragmentation rule; determining a service unit in which the user data is located from the divided service units based on the routing information; and determining a shunting key based on the service unit where the user data is located.
When a unitized multi-active architecture is constructed, service units are divided according to a certain fragmentation rule. In this embodiment, the multiple divided service units of the current unitized multi-active architecture are determined according to the fragmentation rule corresponding to the current unitized multi-active architecture, the service unit in which the user data is stored is determined in the multiple divided service units based on the routing information, and then the shunt key is determined based on the service unit in which the user data is located, that is, the identifier of the service unit in which the user data is located is determined.
It should be noted that the forking key does not contain user information, and only marks the service unit in which the user data is stored.
S130, sending a redirection login request to the target service unit based on the shunt key to complete login.
The target service unit is a service unit stored in the user data. In this embodiment, after receiving the redirection login request, the redirection login request is forwarded to the target service unit, and the target service unit processes the redirection login request to complete login.
On the basis of the foregoing embodiment, optionally, before sending a redirect login request to the target service unit based on the forking key, the method further includes: writing the shunting key into a text file, and sending the text file to a client so that the client generates a redirected login request based on the text file; and receiving a redirection login request sent by the client.
In the embodiment, before the redirection login request is sent to the target service unit based on the shunt key, the shunt key is embedded into a response message of the user login request and sent to the client, and the redirection login request generated and sent by the client is received; specifically, the shunts are written into a text file, the text file is sent to the client through a response message, the client receives the text file, a redirection login request is generated based on the text file, the redirection login request is sent to the server, and the server receives the redirection login request; the text file is a text file for storing the shunt key, and specifically, the text file includes but is not limited to a cookie; illustratively, the shunt key is written into a cookie, the cookie is transmitted to a client browser through a response message, the cookie is stored in the client after the browser receives the response, a redirection login request is generated, and the cookie is automatically carried in the redirection login request and is sent to a server.
On the basis of the foregoing embodiment, optionally, sending a redirection login request to the target service unit based on the forking key to complete login, including: and analyzing the text file in the redirected login request to obtain a shunt key, and forwarding the redirected login request to the target service unit based on the shunt key to complete login.
In the embodiment, after a redirection login request sent by a client is received, a text file in the redirection login request is obtained, the text file is analyzed to obtain a shunt key, and the redirection request is forwarded to a target service unit based on the shunt key to complete login; that is, the redirected logon request is forwarded to the service unit where the user data is stored to complete the logon.
On the basis of the above embodiment, optionally, the client stores the received text file; the method further comprises the following steps: and judging whether the user login request carries a text file, if so, forwarding the user login request to a target service unit corresponding to a shunt key in the text file.
In the embodiment, the client stores the received text file, and when the user logs in again, the user login request automatically carries the text file; and under the condition of receiving a user login request sent by a client to a server, judging whether the user login request carries a text file, if so, analyzing the text file to obtain a shunting key, and forwarding the user login request to a shunting and corresponding target service unit.
It will be appreciated that the forwarded redirected login request is directed to the target service unit, i.e. the service unit where the user data is stored.
On the basis of the foregoing embodiment, optionally, after obtaining the user login information, the method further includes: determining a mark of an initial service unit based on the user login information and the fragmentation rule; under the condition that the marks of the shunting key and the initial service unit are different, inquiring the session information of the initial service unit; and writing the session information into the target service unit based on the shunting key.
The initial service unit is a service unit corresponding to a server for receiving a user login request. In the process that a client sends a user login request to a server until login is successful, an initial service unit generates session information with the client, if a service unit where the user session information is located is different from a service unit where user data is located, after subsequent transactions are forwarded to the service unit where the user data is located, transaction exception can be caused because the session information cannot be inquired in the transaction processing process. In the embodiment, the mark of the initial service unit is inquired based on the user login information and the fragmentation rule, the shunting key is compared with the mark of the initial service unit, if the marks are different, the session information is inquired based on the session key, and the session information is written into a cache database in the service unit marked by the shunting key according to the shunting key; wherein the session key includes, but is not limited to, sessionId; the cache database includes, but is not limited to, redis, which is not limited herein.
Exemplarily, fig. 2 is a logic diagram of a session secondary generation according to an embodiment of the present invention. As shown in fig. 2, the mark of the initial service unit is queried, whether the identifier of the forking key is consistent with the identifier of the initial service unit is determined, if not, the session information is queried according to the SessionId, and the session information is written into Redis in the service unit marked by the forking key according to the forking key.
In some embodiments, optionally, after completing the login, the method further comprises: receiving a user request, analyzing a text file in the user request, loading the user request to a current service unit if the text file has no shunt key, and forwarding the user request to a service unit marked by a shunt key based on the shunt key if the text file has the shunt key.
The current service unit refers to a service unit for receiving a user request. In the embodiment, a user request is received, a text file carried in the user request is obtained, if the text file has no shunt key, the user request is loaded to a current service unit, and the user request is processed by the current service unit; and if the text file has the shunting key, forwarding the user request to the service unit marked by the shunting key according to the shunting key, and processing the user request by the service unit marked by the shunting key.
For example, fig. 3 is a schematic diagram of a request forwarding logic according to an embodiment of the present invention. As shown in fig. 3, after receiving a user request, first parsing a cookie in the request message, and if there is no bypass key, defaulting to load the request to the current service unit; and if the shunt key exists, forwarding the request according to the shunt key.
According to the technical scheme, the shunting key of the service unit where the user data is located is determined, the redirection login request is forwarded to the service unit where the user data is located based on the shunting key so as to complete login, the service unit where the user data is located processes the redirection login request of the user, cross-cell calling is avoided, the problem of cross-cell reading and writing of data in a multi-living scene is solved, and self-sealing in the service unit is achieved.
Example two
Fig. 4 is a schematic structural diagram of a login control device according to a second embodiment of the present invention. As shown in fig. 4, the apparatus includes:
the routing information query module 410 is configured to obtain user login information, and query routing information based on the user login information, where the routing information points to a service unit where user data is located;
the distribution key determining module 420 is configured to obtain a fragmentation rule, and determine a distribution key based on the routing information and the fragmentation rule; the shunting key is used for marking a target service unit to be logged in, and the target service unit is a service unit where user data is located;
the forwarding login module 430 is configured to send a redirection login request to the target service unit based on the split key, so as to complete login.
Optionally, the routing information query module 410 includes a login information obtaining unit, configured to receive a user login request sent by a client, and obtain user login information in the user login request, where the user login request is generated based on a user login operation detected by the client.
Optionally, the split key determining module 420 is specifically configured to determine a plurality of divided service units based on a fragmentation rule; determining a service unit in which the user data is located from the divided service units based on the routing information; and determining a shunting key based on the service unit where the user data is located.
Optionally, before sending a redirection login request to the target service unit based on the split key, the apparatus further includes a login request redirection module, configured to write the split key into a text file, and send the text file to a client, so that the client generates a redirection login request based on the text file; and receiving a redirected login request sent by the client.
Optionally, the forwarding and logging-in module 430 is specifically configured to parse the text file in the redirection and logging request to obtain a bypass key, and forward the redirection and logging request to the target service unit based on the bypass key to complete logging in.
Optionally, the client stores the received text file; the device also comprises a login judging module used for judging whether the user login request carries a text file or not, if so, the user login request is forwarded to a target service unit corresponding to a split key in the text file.
Optionally, after obtaining the user login information, the apparatus further includes a session secondary generation module, configured to determine a flag of an initial service unit based on the user login information and the fragmentation rule; under the condition that the marks of the shunting key and the initial service unit are different, inquiring the session information of the initial service unit; and writing the session information into the target service unit based on the shunting key.
The login control device provided by the embodiment of the invention can execute the login control method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE III
Fig. 5 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to the bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The processor 11 performs the various methods and processes described above, such as a login control method.
In some embodiments, the login control method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the login control method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the login control method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the login control method of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
Example four
An embodiment of the present invention further provides a computer-readable storage medium, where a computer instruction is stored in the computer-readable storage medium, where the computer instruction is used to enable a processor to execute a login control method, where the method includes:
acquiring user login information, and inquiring routing information based on the user login information, wherein the routing information points to a service unit where user data is located; acquiring a fragmentation rule, and determining a shunt key based on the routing information and the fragmentation rule; the user data login method comprises the steps that a shunt key is used for marking a target service unit to be logged in, wherein the target service unit is a service unit where user data are located; and sending a redirection login request to the target service unit based on the shunt key to complete login.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired result of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A login control method, comprising:
acquiring user login information, and inquiring routing information based on the user login information, wherein the routing information points to a service unit where user data is located;
acquiring a fragmentation rule, and determining a shunt key based on the routing information and the fragmentation rule; the shunting key is used for marking a target service unit to be logged in, and the target service unit is a service unit where user data is located;
and sending a redirection login request to the target service unit based on the shunt key to complete login.
2. The method of claim 1, wherein the obtaining user login information comprises:
receiving a user login request sent by a client, and acquiring user login information in the user login request, wherein the user login request is generated based on user login operation detected by the client.
3. The method of claim 1, wherein the determining a forking key based on the routing information and the fragmentation rule comprises:
determining a plurality of divided service units based on a fragmentation rule;
determining a service unit in which the user data is located from the divided service units based on the routing information;
and determining a shunting key based on the service unit where the user data is located.
4. The method of claim 1, wherein prior to sending a redirect entry request to the target traffic unit based on the offload key, the method further comprises:
writing the shunting key into a text file, and sending the text file to a client so that the client generates a redirection login request based on the text file;
and receiving a redirected login request sent by the client.
5. The method of claim 4, wherein sending a redirect login request to the target business unit based on the offload key to complete login comprises:
and analyzing the text file in the redirected login request to obtain a shunt key, and forwarding the redirected login request to the target service unit based on the shunt key to complete login.
6. The method of claim 4, wherein the client stores the received text file;
the method further comprises the following steps:
and judging whether the user login request carries a text file, if so, forwarding the user login request to a target service unit corresponding to a shunt key in the text file.
7. The method of claim 1, wherein after obtaining user login information, the method further comprises:
determining a mark of an initial service unit based on the user login information and the fragmentation rule;
under the condition that the marks of the shunting key and the initial service unit are different, inquiring the session information of the initial service unit;
and writing the session information into the target service unit based on the shunting key.
8. A login control device, comprising:
the routing information query module is used for acquiring user login information and querying routing information based on the user login information, wherein the routing information points to a service unit where user data is located;
the distribution key determining module is used for acquiring a fragmentation rule and determining a distribution key based on the routing information and the fragmentation rule; the shunting key is used for marking a target service unit to be logged in, and the target service unit is a service unit where user data is located;
and the forwarding login module is used for sending a redirection login request to the target service unit based on the shunt key to complete login.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the login control method of any one of claims 1-7.
10. A computer-readable storage medium, having stored thereon computer instructions for causing a processor to execute a login control method according to any one of claims 1-7.
CN202211336137.5A 2022-10-28 2022-10-28 Login control method and device, electronic equipment and storage medium Pending CN115695288A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211336137.5A CN115695288A (en) 2022-10-28 2022-10-28 Login control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211336137.5A CN115695288A (en) 2022-10-28 2022-10-28 Login control method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115695288A true CN115695288A (en) 2023-02-03

Family

ID=85046217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211336137.5A Pending CN115695288A (en) 2022-10-28 2022-10-28 Login control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115695288A (en)

Similar Documents

Publication Publication Date Title
CN111460129B (en) Method, device, electronic equipment and storage medium for generating identification
US10454855B2 (en) System and method for predicting availability status changes of instant messenger users
US9390156B2 (en) Distributed directory environment using clustered LDAP servers
CN111770176B (en) Traffic scheduling method and device
CN116414628A (en) Transaction request processing method and device in new and old system switching process
CN113360689B (en) Image retrieval system, method, related device and computer program product
CN115695288A (en) Login control method and device, electronic equipment and storage medium
CN111835857B (en) Method and apparatus for accessing data
US20220276901A1 (en) Batch processing management
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN114070889A (en) Configuration method, traffic forwarding method, device, storage medium, and program product
CN113691403A (en) Topological node configuration method, related device and computer program product
CN112860796A (en) Method, apparatus, device and storage medium for synchronizing data
CN111833036B (en) Method, apparatus, device and computer readable medium for judging repeat transaction
CN113595870B (en) Push message processing method and device, electronic equipment and storage medium
CN116760741B (en) Data state monitoring method, device, equipment and medium
CN115840604B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN115801357A (en) Global exception handling method, device, equipment and storage medium
CN116260855B (en) Communication method, communication device, electronic equipment and storage medium
CN111769965B (en) Information processing method, device and equipment
CN110262756B (en) Method and device for caching data
CN115665240A (en) Proxy service adding method, device, electronic equipment and storage medium
CN117632824A (en) Communication method, communication device, electronic equipment and storage medium
CN117615021A (en) Route forwarding method, device, equipment and storage medium
CN114490128A (en) Data storage method and device under remote multi-active architecture

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