CN108769083A - Login method, apparatus and system based on distributed server - Google Patents
Login method, apparatus and system based on distributed server Download PDFInfo
- Publication number
- CN108769083A CN108769083A CN201810863295.3A CN201810863295A CN108769083A CN 108769083 A CN108769083 A CN 108769083A CN 201810863295 A CN201810863295 A CN 201810863295A CN 108769083 A CN108769083 A CN 108769083A
- Authority
- CN
- China
- Prior art keywords
- client
- identifying code
- information
- verification
- server
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of login method, apparatus and system based on distributed server.Wherein, this method includes:Receive the logging request that client is sent, will in client corresponding identifying code mark storage to the corresponding browser rs cache information of client;Verification code information corresponding with client is sent to client, by identifying code mark and verification code information associated storage to presetting database;Receive the checking request that client is sent according to verification code information, identifying code mark corresponding with client is determined according to the corresponding browser rs cache information of client, and the verification code information of associated storage is identified from preset data library inquiry identifying code corresponding with client;Checking request is verified according to the verification code information inquired, login response message is returned to client according to check results.Which can realize user's login function in distributed server, in the scene that can be applied to mass users.
Description
Technical field
The present invention relates to field of computer technology, and in particular to a kind of login method, device based on distributed server
And system.
Background technology
It is client after the logging request that client is usually received by server in existing user's login mode
Generate corresponding verification code information.Then, on the one hand, the verification code information is sent to client by server, so that it is used
The verification code information is logged in, and on the other hand, server stores the verification code information into server memory, so as in visitor
The verification code information that it sends is verified in the login process of family end, determines that can the client log in into according to check results
Work(.
But inventor has found in the implementation of the present invention, at least there are following defects in the prior art:Due to clothes
The verification code information of generation is stored in server memory by business device, therefore, can be only applied in single machine scene, i.e.,:It can only be by
One server provides login service.When client terminal quantity is huge, and a server is difficult to cope with, server can not be carried out
Extension, reason are:After extension, the server of the server and subsequent check that generate verification code information may belong to Liang Tai
Different servers, and two-server cannot access the verification code information in other side's memory mutually and cause user that can not step on
Record.It can be seen that existing user's login mode can not be applied in distributed server scene.
Invention content
In view of the above problems, it is proposed that the present invention overcoming the above problem in order to provide one kind or solves at least partly
State the login method based on distributed server, the apparatus and system of problem.
According to an aspect of the invention, there is provided a kind of login method based on distributed server, including:Receive visitor
The logging request that family end is sent will store browsing corresponding to the client with the corresponding identifying code mark of the client
In device cache information;Verification code information corresponding with the client is sent to the client, by the identifying code mark
Know and the verification code information associated storage to presetting database;Receive what the client was sent according to the verification code information
Checking request determines identifying code mark corresponding with the client according to the corresponding browser rs cache information of the client
Know, the verification code information of associated storage is identified from preset data library inquiry identifying code corresponding with the client;Root
The checking request is verified according to the verification code information inquired, returns to log in the client according to check results and ring
Answer message.
Optionally, described to store browsing corresponding to the client with the corresponding identifying code mark of the client
Step in device cache information specifically includes:
Inquire in the corresponding browser rs cache information of the client whether be stored with it is corresponding with the client
Identifying code identifies;
If so, directly acquiring stored opposite with the client in the corresponding browser rs cache information of the client
The identifying code mark answered;
If it is not, corresponding identifying code mark is generated for the client, and generation is corresponding with the client
Identifying code mark storage in the corresponding browser rs cache information of the client.
Optionally, described the step of generating corresponding identifying code mark for the client, specifically includes:
Information is generated according to the identifying code safeguarded in the presetting database, corresponding verification is generated for the client
Code mark, and update the identifying code generation information safeguarded in the presetting database according to result is generated.
Optionally, described the step of identifying the identifying code with the verification code information associated storage to presetting database
It specifically includes:It regard identifying code mark as key, using the verification code information as value, is stored according to key-value pair mode described
Identifying code identifies and the verification code information.
Optionally, the verification code information that the basis inquires verifies the checking request, according to check results
The step of returning to login response message to the client specifically includes:
The verification digital content for including in the checking request is obtained, by the verification digital content and the verification inquired
Code information is compared;
The login response message of successful types or Fail Type is returned to the client according to comparison result.
Optionally, the distributed server includes at least:First server and second server,
The then logging request for receiving client and sending arrives identifying code mark storage corresponding with the client
Step in the corresponding browser rs cache information of the client is executed by the first server;And the reception client
The step of holding the checking request sent according to the verification code information is executed by the second server;The presetting database is used
In shared for the first server and second server.
Optionally, the corresponding browser rs cache information of the client is cookie information.
Optionally, the presetting database is Redis databases.
According to another aspect of the present invention, a kind of entering device based on distributed server is provided, including:
Receiving module is suitable for receiving the logging request that client is sent, will identifying code mark corresponding with the client
Know in storage to the corresponding browser rs cache information of the client;
Memory module will be described suitable for verification code information corresponding with the client is sent to the client
Identifying code identifies and the verification code information associated storage to presetting database;
Enquiry module is suitable for receiving the checking request that the client is sent according to the verification code information, according to described
The corresponding browser rs cache information of client determines identifying code mark corresponding with the client, from the presetting database
The verification code information of inquiry identifying code mark associated storage corresponding with the client;
Correction verification module is tied suitable for being verified to the checking request according to the verification code information inquired according to verification
Fruit returns to login response message to the client.
Optionally, the receiving module is particularly adapted to:
Inquire in the corresponding browser rs cache information of the client whether be stored with it is corresponding with the client
Identifying code identifies;
If so, directly acquiring stored opposite with the client in the corresponding browser rs cache information of the client
The identifying code mark answered;
If it is not, corresponding identifying code mark is generated for the client, and generation is corresponding with the client
Identifying code mark storage in the corresponding browser rs cache information of the client.
Optionally, the receiving module is particularly adapted to:
Information is generated according to the identifying code safeguarded in the presetting database, corresponding verification is generated for the client
Code mark, and update the identifying code generation information safeguarded in the presetting database according to result is generated.
Optionally, the memory module is particularly adapted to:It regard identifying code mark as key, the verification code information is made
For value, the identifying code mark and the verification code information are stored according to key-value pair mode.
Optionally, the correction verification module is particularly adapted to:
The verification digital content for including in the checking request is obtained, by the verification digital content and the verification inquired
Code information is compared;
The login response message of successful types or Fail Type is returned to the client according to comparison result.
Optionally, the distributed server includes at least:First server and second server,
Then receiving module and/or memory module are arranged in the first server;And the enquiry module and/or verification
Module is arranged in the second server;The presetting database is used for total for the first server and second server
It enjoys.
Optionally, the corresponding browser rs cache information of the client is cookie information.
Optionally, the presetting database is Redis databases.
According to a further aspect of the invention, a kind of login system based on distributed server is provided, including:According to
The above-mentioned entering device based on distributed server and the presetting database.
Optionally, the entering device based on distributed server includes:More distributed servers.
According to another aspect of the invention, a kind of electronic equipment is provided, including:Processor, memory, communication interface and
Communication bus, processor, memory and communication interface complete mutual communication by communication bus;
For memory for storing an at least executable instruction, it is above-mentioned based on distributed clothes that executable instruction makes processor execute
The corresponding operation of login method of business device.
In accordance with a further aspect of the present invention, a kind of computer storage media is provided, at least one is stored in storage medium
Executable instruction, executable instruction make processor execute such as the corresponding operation of the above-mentioned login method based on distributed server.
According to login method, apparatus and system disclosed by the invention based on distributed server, first, client is being received
After the logging request that end is sent, browser rs cache letter corresponding to client will be stored with the corresponding identifying code mark of client
In breath;And verification code information corresponding with client is sent to client, identifying code is identified and is associated with verification code information
Store presetting database;Then, after receiving the checking request that the client is sent according to the verification code information, according to
The corresponding browser rs cache information of client determines identifying code mark corresponding with client, from preset data library inquiry and visitor
The verification code information of the corresponding identifying code mark associated storage in family end;According to the verification code information inquired to checking request into
Row verification returns to login response message according to check results to client.It can be seen that in the above method, on the one hand, in advance
It on the other hand, will will be tested with client corresponding identifying code mark storage to the corresponding browser rs cache information of client
It demonstrate,proves in code mark and verification code information associated storage to presetting database, correspondingly, when subsequently received client is according to
It, first, being capable of and client determining according to the corresponding browser rs cache information of client after the checking request that verification code information is sent
It holds corresponding identifying code to identify, then, identifying code mark corresponding with client can be inquired from presetting database and is closed
Join the verification code information of storage, and then completes verification.It can be seen that in which, pass through what is stored in browser rs cache information
The mapping relations of the identifying code mark and verification code information that are stored in identifying code mark and presetting database can ask verification
It asks and is verified.It will not generating the server of verification code information and the server of subsequent check is not same server
Influence the normal implementation of checking procedure.Therefore, which can realize user's login function, Neng Gouying in distributed server
For in the scene of mass users.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technical means of the present invention,
And can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, below the special specific implementation mode for lifting the present invention.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit are common for this field
Technical staff will become clear.Attached drawing only for the purpose of illustrating preferred embodiments, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows the flow diagram of the login method based on distributed server of one embodiment of the invention;
Fig. 2 shows the flow diagrams of the login method based on distributed server of another embodiment of the present invention;
Fig. 3 shows a kind of device knot for entering device based on distributed server that further embodiment of this invention provides
Composition;
Fig. 4 shows the structural schematic diagram of a kind of electronic equipment according to the ... of the embodiment of the present invention.
Specific implementation mode
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
Fig. 1 shows the flow diagram of the login method based on distributed server of one embodiment of the invention.Such as
Shown in Fig. 1, this method includes:
Step S110:The logging request that client is sent is received, identifying code mark storage corresponding with client is arrived
In the corresponding browser rs cache information of client.
Specifically, the operation for receiving the logging request that client is sent can be by any clothes in distributed server cluster
Business device realizes that the front-end server that can also be connected due to distributed server cluster is unified to be completed, and is born by front-end server
Each secondary logging request received is sent to each server in distributed server cluster by duty successively with polling mode.Always
It, the present invention does not limit this.
Wherein, the corresponding browsing of client will be formed and stored in by server with client corresponding identifying code mark
In device cache information, for being inquired during subsequent authentication.
Step S120:Verification code information corresponding with client is sent to client, identifying code is identified and verified
Code information association is stored to presetting database.
Specifically, verification code information corresponding with client can be generated by all kinds of identifying code generating algorithms, and will given birth to
At verification code information corresponding with client be sent to client, so that it is logged in.In addition, due to subsequent verification
Link may have other servers completion, therefore, for the ease of other servers inquire, in this step by identifying code mark with
Verification code information associated storage is to presetting database.
Step S130:The checking request that client is sent according to verification code information is received, according to the corresponding browsing of client
Device cache information determines identifying code mark corresponding with client, from the verification corresponding with client of preset data library inquiry
The verification code information of code mark associated storage.
Specifically, this step may respectively be different clothes from the executive agent of above-mentioned step S110 and step S120
Business device, therefore, in this step, on the one hand, need according to the corresponding browser rs cache information determination of client and client phase
On the other hand corresponding identifying code mark is needed from the identifying code mark association corresponding with client of preset data library inquiry
The verification code information of storage, to realize subsequent verification step.
Step S140:Checking request is verified according to the verification code information inquired, according to check results to client
End returns to login response message.
Specifically, checking procedure can be by comparing in the identifying code for including in the verification code information and checking request that inquire
Hold whether identical mode is realized, if identical, returns to the login response message of successful types;Conversely, then returning to Fail Type
Login response message.
Mode in the present embodiment can be widely applied in all kinds of login scenes, to realize various login process.Thus may be used
See, according to the login method provided in this embodiment based on distributed server, is tested by what is stored in browser rs cache information
The mapping relations of the identifying code mark and verification code information that are stored in card code mark and presetting database, can be to checking request
It is verified.It will not shadow generating the server of verification code information and the server of subsequent check is not same server
Ring the normal implementation of checking procedure.Therefore, which can realize user's login function in distributed server, can apply
In the scene of mass users.
Fig. 2 shows the flow diagrams of the login method based on distributed server of another embodiment of the present invention.
In the present embodiment, distributed server includes at least:First server and second server.Substantially, it is also possible to include
More multiple servers.In addition, the present embodiment is said so that the corresponding browser rs cache information of client is cookie information as an example
It is bright, also, illustrated so that presetting database is Redis databases as an example.Substantially, the present invention can also pass through other forms
Cache information or database realizing.As shown in Fig. 2, this method includes:
Step S200:First server receives the logging request that client is sent.
Specifically, can be responsible for realizing user's login function by distributed server cluster.Work as distributed server cluster
In when including multiple servers, can be by each server according to each secondary logging request of preset strategy wheel stream process, alternatively, also can be by
One front-end server is responsible for orderly distributing each secondary logging request according to loading condition of each server etc..In short, no matter adopting
With which kind of mode, first server refers to a server for being currently used in and handling this logging request.
Step S210:Whether it has been stored in the corresponding browser rs cache information of inquiring client terminal corresponding with client
Identifying code identifies;If so, directly acquiring stored corresponding with client in the corresponding browser rs cache information of client
Identifying code identifies;If it is not, generate corresponding identifying code mark for client, and by generation verification corresponding with client
In code mark storage to the corresponding browser rs cache information of client.
If the client is logged in the recent period, can be stored in corresponding browser rs cache information corresponding with client
Identifying code mark;If conversely, the client is not logged in the recent period, will not be stored in corresponding browser rs cache information and visitor
The corresponding identifying code mark in family end.Correspondingly, in this step, first, it is slow to obtain the corresponding browser of client for server
Deposit information, i.e. cookie information.Then, it inquires in the cookie information and whether has been stored with identifying code corresponding with client
Mark.
Specifically, when generating corresponding identifying code mark for client, since each server parallel processing comes from
The logging request of multiple client, therefore, the corresponding identifying code mark of different user is identical in order to prevent happens, at this
In embodiment, information is generated according to the identifying code safeguarded in presetting database, corresponding identifying code mark is generated for client,
And generate information according to the identifying code safeguarded in result update presetting database is generated.Since the presetting database is serviced by more
Device is shared, therefore, it is possible to effectively prevent identifying code mark is identical to happen.When it is implemented, can be by Redis databases
Safeguard that the generator of identifying code mark, the generator are from increasing type generator.Also, for the ease of inquiry, according to key assignments
Identifying code mark (key-value pair remaps relationship for first) is stored to mode.For example, the key for defining identifying code mark is
JCaptcha, the numerical value that generator is generated are denoted as captchaId as the value for defining identifying code mark.Correspondingly, above-mentioned
In the process, judge whether there is JCaptcha in Cookie, if not provided, being used as by verifying code generator one numerical value of generation
The value of JCaptcha, and cookie is written;If there is then directly acquiring the corresponding values of JCaptcha, i.e. captchaId.
Step S220:Verification code information corresponding with client is sent to client, identifying code is identified and verified
Code information association is stored to presetting database.
After getting identifying code mark corresponding with client, need to generate identifying code letter corresponding with client
Breath.Wherein, identifying code mark is used for one identifying code of unique mark, for example, a client corresponds to a unique verification
Code mark.And verification code information is then the particular content (may include the various forms such as letter, number, pattern) of this identifying code,
In order to promote safety, the corresponding identifying code mark of a client is usually constant, but the same identifying code identifies corresponding test
It is then different in each landfall process to demonstrate,prove code information.
Specifically, all kinds of identifying code generating algorithms (for example, generic validation code generating algorithm) generation and client can be passed through
Corresponding verification code information (such as can be indicated by ValidateCode), and by generation verification corresponding with client
Code information is sent to client, so that it is logged in.In addition, since subsequent verification link may be complete by other servers
At therefore, for the ease of the inquiry of other servers, in this step by identifying code mark and verification code information associated storage in advance
If database.Specifically, when by identifying code mark and verification code information associated storage to presetting database, identifying code is identified
As key, using verification code information as value, storing identifying code mark and verification code information according to key-value pair mode, (key-value pair is
Second remaps relationship).
Step S230:Second server receives the checking request that client is sent according to verification code information, according to client
Corresponding browser rs cache information determines identifying code mark corresponding with client, from preset data library inquiry and client phase
The verification code information of corresponding identifying code mark associated storage.
Specifically, this step and the executive agent of above-mentioned step S200 to step S220 are respectively different servers.
Second server is the server for being responsible for processing checking request.Due to can between above-mentioned logging request and this checking request
Therefore energy separated in time is usually responsible for processing by different servers.Therefore, in this step, on the one hand, need root
Determine on the other hand identifying code mark corresponding with client is needed from pre- according to the corresponding browser rs cache information of client
If the verification code information of data base querying identifying code mark associated storage corresponding with client, to realize subsequent verification
Step.Specifically, it is first remapped in the corresponding browser rs cache information of Relation acquisition client according to above-mentioned first and includes
It is corresponding with identifying code mark to remap relationship determination further according to above-mentioned second for identifying code mark corresponding with client
Verification code information.Since browser rs cache information is provided by client, presetting database is shared by each server, therefore,
Based on above-mentioned double mapping relations, the particular content of verification code information can be determined by other servers.
Step S240:Checking request is verified according to the verification code information inquired, according to check results to client
End returns to login response message.
Specifically, checking request is verified according to the verification code information inquired, according to check results to client
When returning to login response message, first, the verification digital content for including in checking request is obtained, digital content will be verified and inquired
Verification code information is compared;The login response message of successful types or Fail Type is returned to client according to comparison result.
In summary, according to the login method provided in this embodiment based on distributed server, pass through browser rs cache
The mapping relations of the identifying code mark and verification code information that are stored in the identifying code mark and presetting database that are stored in information,
Checking request can be verified.Even if the server of the server and subsequent check that generate verification code information is not same
Server will not influence the normal implementation of checking procedure.Therefore, which can realize that user steps in distributed server
Recording function, in the scene that can be applied to mass users.
In the above method, mobile cloud test management platform is deployed in multiple servers, and a verification is safeguarded by Redis
The generator of code id (i.e. identifying code identifies) (from increasing);The key for defining identifying code id is JCaptcha;Judge in cookie whether
There is JCaptcha, if not provided, generating an id by identifying code id generators is used as the value of JCaptcha, and is arranged
cookie;If there is then obtaining the value of JCaptcha, the value of JCaptcha is labeled as captchaId;Pass through generic validation code
Generating algorithm generates validateCode;Using captchaId as key in redis, setting value validateCode;When
When user logs in, captchaId is obtained by the JCaptcha keys of cookie, then obtained from redis by captchaId
ValidateCode is compared login with the identifying code that user is passed to.Testing after drifting about this method solve server-side cluster
Code check problem is demonstrate,proved, and each user has independent identifying code to identify, and is mutually independent of each other.
Fig. 3 shows a kind of device knot for entering device based on distributed server that further embodiment of this invention provides
Composition, as shown in figure 3, the device includes:
Receiving module 31 is suitable for receiving the logging request that client is sent, will identifying code corresponding with the client
In mark storage to the corresponding browser rs cache information of the client;
Memory module 32, suitable for verification code information corresponding with the client is sent to the client, by institute
State identifying code mark and the verification code information associated storage to presetting database;
Enquiry module 33 is suitable for receiving the checking request that the client is sent according to the verification code information, according to institute
It states the corresponding browser rs cache information of client and determines identifying code mark corresponding with the client, from the preset data
The verification code information of library inquiry identifying code mark associated storage corresponding with the client;
Correction verification module 34, suitable for being verified to the checking request according to the verification code information inquired, according to verification
As a result login response message is returned to the client.
Optionally, the receiving module 31 is particularly adapted to:
Inquire in the corresponding browser rs cache information of the client whether be stored with it is corresponding with the client
Identifying code identifies;
If so, directly acquiring stored opposite with the client in the corresponding browser rs cache information of the client
The identifying code mark answered;
If it is not, corresponding identifying code mark is generated for the client, and generation is corresponding with the client
Identifying code mark storage in the corresponding browser rs cache information of the client.
Optionally, the receiving module 31 is particularly adapted to:
Information is generated according to the identifying code safeguarded in the presetting database, corresponding verification is generated for the client
Code mark, and update the identifying code generation information safeguarded in the presetting database according to result is generated.
Optionally, the memory module is particularly adapted to:It regard identifying code mark as key, the verification code information is made
For value, the identifying code mark and the verification code information are stored according to key-value pair mode.
Optionally, the correction verification module is particularly adapted to:
The verification digital content for including in the checking request is obtained, by the verification digital content and the verification inquired
Code information is compared;
The login response message of successful types or Fail Type is returned to the client according to comparison result.
Optionally, the distributed server includes at least:First server and second server,
Then receiving module and/or memory module are arranged in the first server;And the enquiry module and/or verification
Module is arranged in the second server;The presetting database is used for total for the first server and second server
It enjoys.
Optionally, the corresponding browser rs cache information of the client is cookie information.
Optionally, the presetting database is Redis databases.
The concrete structure and operation principle of above-mentioned modules can refer to the description of corresponding steps in embodiment of the method, herein
It repeats no more.
The present invention also provides a kind of login systems based on distributed server, including:Above-mentioned is taken based on distribution
The entering device of business device and the presetting database.
Optionally, the entering device based on distributed server includes:More distributed servers.
The embodiment of the present application provides a kind of nonvolatile computer storage media, and computer storage media is stored at least
One executable instruction, the computer executable instructions can perform in above-mentioned any means embodiment based on distributed server
It logs in.
Fig. 4 shows the structural schematic diagram of a kind of electronic equipment according to the ... of the embodiment of the present invention, the specific embodiment of the invention
The specific implementation of electronic equipment is not limited.
As shown in figure 4, the electronic equipment may include:Processor (processor) 402, communication interface
(Communications Interface) 404, memory (memory) 406 and communication bus 408.
Wherein:
Processor 402, communication interface 404 and memory 406 complete mutual communication by communication bus 408.
Communication interface 404, for being communicated with the network element of miscellaneous equipment such as client or other servers etc..
Processor 402 can specifically execute the above-mentioned login method based on distributed server for executing program 410
Correlation step in embodiment.
Specifically, program 410 may include program code, which includes computer-managed instruction.
Processor 402 may be central processor CPU or specific integrated circuit ASIC (Application
Specific Integrated Circuit), or be arranged to implement the integrated electricity of one or more of the embodiment of the present invention
Road.The one or more processors that electronic equipment includes can be same type of processor, such as one or more CPU;Also may be used
To be different types of processor, such as one or more CPU and one or more ASIC.
Memory 406, for storing program 410.Memory 406 may include high-speed RAM memory, it is also possible to further include
Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.
Program 410 specifically can be used for so that processor 402 executes following operation:The login that client is sent is received to ask
Ask, will in the client corresponding identifying code mark storage to the corresponding browser rs cache information of the client;
Verification code information corresponding with the client is sent to the client, the identifying code is identified and institute
Verification code information associated storage is stated to presetting database;
The checking request that the client is sent according to the verification code information is received, it is corresponding clear according to the client
Device cache information of looking at determines identifying code mark corresponding with the client, from the preset data library inquiry and the client
Hold the verification code information of corresponding identifying code mark associated storage;
The checking request is verified according to the verification code information inquired, according to check results to the client
Return to login response message.
It is described that the client is arrived into identifying code mark storage corresponding with the client in a kind of optional mode
The step in corresponding browser rs cache information is held to specifically include:
Inquire in the corresponding browser rs cache information of the client whether be stored with it is corresponding with the client
Identifying code identifies;
If so, directly acquiring stored opposite with the client in the corresponding browser rs cache information of the client
The identifying code mark answered;
If it is not, corresponding identifying code mark is generated for the client, and generation is corresponding with the client
Identifying code mark storage in the corresponding browser rs cache information of the client.
In a kind of optional mode, described the step of generating corresponding identifying code mark for the client, specifically wraps
It includes:
Information is generated according to the identifying code safeguarded in the presetting database, corresponding verification is generated for the client
Code mark, and update the identifying code generation information safeguarded in the presetting database according to result is generated.
In a kind of optional mode, it is described by the identifying code mark with the verification code information associated storage to preset
The step of database, specifically includes:Identifying code mark is regard as key, using the verification code information as value, according to key-value pair
Mode stores the identifying code mark and the verification code information.
In a kind of optional mode, the verification code information that the basis inquires verifies the checking request,
The step of returning to login response message to the client according to check results specifically includes:
The verification digital content for including in the checking request is obtained, by the verification digital content and the verification inquired
Code information is compared;
The login response message of successful types or Fail Type is returned to the client according to comparison result.
In a kind of optional mode, the distributed server includes at least:First server and second server,
The then logging request for receiving client and sending arrives identifying code mark storage corresponding with the client
Step in the corresponding browser rs cache information of the client is executed by the first server;And the reception client
The step of holding the checking request sent according to the verification code information is executed by the second server;The presetting database is used
In shared for the first server and second server.
In a kind of optional mode, the corresponding browser rs cache information of the client is cookie information.
In a kind of optional mode, the presetting database is Redis databases.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein.
Various general-purpose systems can also be used together with teaching based on this.As described above, it constructs required by this kind of system
Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that can utilize various
Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention
Example can be put into practice without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of each inventive aspect,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:It is i.e. required to protect
Shield the present invention claims the more features of feature than being expressly recited in each claim.More precisely, as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following specific implementation mode are expressly incorporated in the specific implementation mode, wherein each claim itself
All as a separate embodiment of the present invention.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment
Change and they are arranged in the one or more equipment different from the embodiment.It can be the module or list in embodiment
Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it may be used any
Combination is disclosed to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so to appoint
Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power
Profit requires, abstract and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be with hardware realization, or to run on one or more processors
Software module realize, or realized with combination thereof.It will be understood by those of skill in the art that can use in practice
Microprocessor or digital signal processor (DSP) realize the login according to the ... of the embodiment of the present invention based on distributed server
The some or all functions of some or all components in device.The present invention is also implemented as being retouched here for executing
The some or all equipment or program of device (for example, computer program and computer program product) for the method stated.
It is such to realize that the program of the present invention may be stored on the computer-readable medium, or can have one or more signal
Form.Such signal can be downloaded from internet website and be obtained, either provide on carrier signal or with it is any its
He provides form.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference mark between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be by the same hardware branch
To embody.The use of word first, second, and third does not indicate that any sequence.These words can be explained and be run after fame
Claim.
The invention also discloses a kind of login methods based on distributed server of A1., including:
The logging request that client is sent is received, the visitor is arrived into identifying code mark storage corresponding with the client
In the corresponding browser rs cache information in family end;
Verification code information corresponding with the client is sent to the client, the identifying code is identified and institute
Verification code information associated storage is stated to presetting database;
The checking request that the client is sent according to the verification code information is received, it is corresponding clear according to the client
Device cache information of looking at determines identifying code mark corresponding with the client, from the preset data library inquiry and the client
Hold the verification code information of corresponding identifying code mark associated storage;
The checking request is verified according to the verification code information inquired, according to check results to the client
Return to login response message.
A2. the method according to A1, wherein described that institute is arrived into identifying code mark storage corresponding with the client
The step stated in the corresponding browser rs cache information of client specifically includes:
Inquire in the corresponding browser rs cache information of the client whether be stored with it is corresponding with the client
Identifying code identifies;
If so, directly acquiring stored opposite with the client in the corresponding browser rs cache information of the client
The identifying code mark answered;
If it is not, corresponding identifying code mark is generated for the client, and generation is corresponding with the client
Identifying code mark storage in the corresponding browser rs cache information of the client.
A3. the method according to A2, wherein described the step of generating corresponding identifying code mark for the client
It specifically includes:
Information is generated according to the identifying code safeguarded in the presetting database, corresponding verification is generated for the client
Code mark, and update the identifying code generation information safeguarded in the presetting database according to result is generated.
A4. according to any methods of A1-3, wherein described to close identifying code mark with the verification code information
Connection is stored to the step of presetting database and is specifically included:By the identifying code mark be used as key, using the verification code information as
Value stores the identifying code mark and the verification code information according to key-value pair mode.
A5. according to any methods of A1-4, wherein the verification code information that the basis inquires asks the verification
The step of asking and verified, login response message is returned to the client according to check results specifically includes:
The verification digital content for including in the checking request is obtained, by the verification digital content and the verification inquired
Code information is compared;
The login response message of successful types or Fail Type is returned to the client according to comparison result.
A6. according to any methods of A1-5, wherein the distributed server includes at least:First server with
And second server,
The then logging request for receiving client and sending arrives identifying code mark storage corresponding with the client
Step in the corresponding browser rs cache information of the client is executed by the first server;And the reception client
The step of holding the checking request sent according to the verification code information is executed by the second server;The presetting database is used
In shared for the first server and second server.
A7. according to any methods of A1-6, wherein the corresponding browser rs cache information of the client is Cookie
Information.
A8. according to any methods of A1-7, wherein the presetting database is Redis databases.
B9. a kind of entering device based on distributed server, including:
Receiving module is suitable for receiving the logging request that client is sent, will identifying code mark corresponding with the client
Know in storage to the corresponding browser rs cache information of the client;
Memory module will be described suitable for verification code information corresponding with the client is sent to the client
Identifying code identifies and the verification code information associated storage to presetting database;
Enquiry module is suitable for receiving the checking request that the client is sent according to the verification code information, according to described
The corresponding browser rs cache information of client determines identifying code mark corresponding with the client, from the presetting database
The verification code information of inquiry identifying code mark associated storage corresponding with the client;
Correction verification module is tied suitable for being verified to the checking request according to the verification code information inquired according to verification
Fruit returns to login response message to the client.
B10. the device according to B9, wherein the receiving module is particularly adapted to:
Inquire in the corresponding browser rs cache information of the client whether be stored with it is corresponding with the client
Identifying code identifies;
If so, directly acquiring stored opposite with the client in the corresponding browser rs cache information of the client
The identifying code mark answered;
If it is not, corresponding identifying code mark is generated for the client, and generation is corresponding with the client
Identifying code mark storage in the corresponding browser rs cache information of the client.
B11. the device according to B10, wherein the receiving module is particularly adapted to:
Information is generated according to the identifying code safeguarded in the presetting database, corresponding verification is generated for the client
Code mark, and update the identifying code generation information safeguarded in the presetting database according to result is generated.
B12. according to any devices of B9-11, wherein the memory module is particularly adapted to:By the identifying code mark
Know and be used as key, using the verification code information as value, the identifying code mark and the identifying code are stored according to key-value pair mode
Information.
B13. according to any devices of B9-12, wherein the correction verification module is particularly adapted to:
The verification digital content for including in the checking request is obtained, by the verification digital content and the verification inquired
Code information is compared;
The login response message of successful types or Fail Type is returned to the client according to comparison result.
B14. according to any devices of B9-13, wherein the distributed server includes at least:First server
And second server,
Then receiving module and/or memory module are arranged in the first server;And the enquiry module and/or verification
Module is arranged in the second server;The presetting database is used for total for the first server and second server
It enjoys.
B15. according to any devices of B9-14, wherein the corresponding browser rs cache information of the client is
Cookie information.
B16. according to any devices of B9-15, wherein the presetting database is Redis databases.
C17. a kind of login system based on distributed server, including:It is any described based on distribution according to B9-16
The entering device of server and the presetting database.
C18. the system according to C17, wherein the entering device based on distributed server includes:More distributions
Server.
D19. a kind of electronic equipment, including:Processor, memory, communication interface and communication bus, the processor, institute
It states memory and the communication interface completes mutual communication by the communication bus;
The memory makes the processor execute such as storing an at least executable instruction, the executable instruction
The corresponding operation of the login method based on distributed server described in any one of A1-9.
E20. a kind of computer storage media is stored with an at least executable instruction in the storage medium, described to hold
Row instruction makes processor execute the corresponding operation of the login method based on distributed server as described in any one of A1-9.
Claims (10)
1. a kind of login method based on distributed server, including:
The logging request that client is sent is received, the client is arrived into identifying code mark storage corresponding with the client
In corresponding browser rs cache information;
Verification code information corresponding with the client is sent to the client, the identifying code is identified and is tested with described
The storage of code information association is demonstrate,proved to presetting database;
The checking request that the client is sent according to the verification code information is received, according to the corresponding browser of the client
Cache information determines identifying code mark corresponding with the client, from the preset data library inquiry and the client phase
The verification code information of corresponding identifying code mark associated storage;
The checking request is verified according to the verification code information inquired, is returned to the client according to check results
Login response message.
2. according to the method described in claim 1, wherein, described store identifying code mark corresponding with the client is arrived
Step in the corresponding browser rs cache information of the client specifically includes:
It inquires in the corresponding browser rs cache information of the client and whether has been stored with verification corresponding with the client
Code mark;
If so, directly acquiring stored corresponding with the client in the corresponding browser rs cache information of the client
Identifying code identifies;
If it is not, generate corresponding identifying code mark for the client, and test generation is corresponding with the client
It demonstrate,proves in code mark storage to the corresponding browser rs cache information of the client.
3. according to the method described in claim 2, wherein, described is the step that the client generates corresponding identifying code mark
Suddenly it specifically includes:
Information is generated according to the identifying code safeguarded in the presetting database, corresponding identifying code mark is generated for the client
Know, and the identifying code generation information safeguarded in the presetting database is updated according to result is generated.
4. according to any methods of claim 1-3, wherein described by identifying code mark and the verification code information
Associated storage was specifically included to the step of presetting database:It regard identifying code mark as key, the verification code information is made
For value, the identifying code mark and the verification code information are stored according to key-value pair mode.
5. according to any methods of claim 1-4, wherein the verification code information that the basis inquires is to the verification
The step of asking to be verified, login response message is returned to the client according to check results specifically includes:
The verification digital content for including in the checking request is obtained, the verification digital content and the identifying code inquired are believed
Breath is compared;
The login response message of successful types or Fail Type is returned to the client according to comparison result.
6. according to any methods of claim 1-5, wherein the distributed server includes at least:First server
And second server,
The then logging request for receiving client and sending stores identifying code mark corresponding with the client to described
Step in the corresponding browser rs cache information of client is executed by the first server;And the reception client root
The step of checking request sent according to the verification code information, is executed by the second server;The presetting database is for supplying
The first server and second server are shared.
7. a kind of entering device based on distributed server, including:
Receiving module is suitable for receiving the logging request that client is sent, and identifying code mark corresponding with the client is deposited
It stores up in the corresponding browser rs cache information of the client;
Memory module, suitable for verification code information corresponding with the client is sent to the client, by the verification
Code mark and the verification code information associated storage to presetting database;
Enquiry module is suitable for receiving the checking request that the client is sent according to the verification code information, according to the client
Corresponding browser rs cache information is held to determine identifying code mark corresponding with the client, from the preset data library inquiry
The verification code information of identifying code mark associated storage corresponding with the client;
Correction verification module, suitable for being verified to the checking request according to the verification code information that inquires, according to check results to
The client returns to login response message.
8. a kind of login system based on distributed server, including:It is according to claim 7 to be based on distributed server
Entering device and the presetting database.
9. a kind of electronic equipment, including:Processor, memory, communication interface and communication bus, the processor, the storage
Device and the communication interface complete mutual communication by the communication bus;
The memory makes the processor execute as right is wanted for storing an at least executable instruction, the executable instruction
Ask the corresponding operation of the login method based on distributed server described in any one of 1-6.
10. a kind of computer storage media, an at least executable instruction, the executable instruction are stored in the storage medium
Processor is set to execute the corresponding operation of the login method based on distributed server as described in any one of claim 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810863295.3A CN108769083A (en) | 2018-08-01 | 2018-08-01 | Login method, apparatus and system based on distributed server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810863295.3A CN108769083A (en) | 2018-08-01 | 2018-08-01 | Login method, apparatus and system based on distributed server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108769083A true CN108769083A (en) | 2018-11-06 |
Family
ID=63968311
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810863295.3A Pending CN108769083A (en) | 2018-08-01 | 2018-08-01 | Login method, apparatus and system based on distributed server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108769083A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110138747A (en) * | 2019-04-23 | 2019-08-16 | 微梦创科网络科技(中国)有限公司 | A kind of method and system for verifying account logging state |
CN110445792A (en) * | 2019-08-13 | 2019-11-12 | 北京百佑科技有限公司 | Verification code generation method, verifying code verification method and identifying code login system |
CN111143410A (en) * | 2019-12-19 | 2020-05-12 | 航天信息股份有限公司 | Accommodation public security management method, device and system |
CN111371585A (en) * | 2018-12-26 | 2020-07-03 | 北京奇虎科技有限公司 | Configuration method and device for CDN node |
CN112699152A (en) * | 2021-01-07 | 2021-04-23 | 北京金万维科技有限公司 | Cache method based on OpenResty implementation |
CN113225381A (en) * | 2021-04-02 | 2021-08-06 | 中冶南方都市环保工程技术股份有限公司 | Data interaction method, data interaction system and computer equipment |
CN113742377A (en) * | 2020-11-04 | 2021-12-03 | 北京沃东天骏信息技术有限公司 | Method and device for processing data |
CN113824727A (en) * | 2021-09-26 | 2021-12-21 | 中国联合网络通信集团有限公司 | Webpage login verification method, device, server and storage medium |
CN114172716A (en) * | 2021-12-02 | 2022-03-11 | 北京金山云网络技术有限公司 | Login method, login device, electronic equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106685973A (en) * | 2016-12-30 | 2017-05-17 | 东软集团股份有限公司 | Method and device for remembering log in information, log in control method and device |
CN107204959A (en) * | 2016-03-16 | 2017-09-26 | 阿里巴巴集团控股有限公司 | Verification method, the apparatus and system of identifying code |
CN107306183A (en) * | 2016-04-22 | 2017-10-31 | 索尼公司 | Client, service end, method and authentication system |
CN107317791A (en) * | 2016-12-15 | 2017-11-03 | 平安科技(深圳)有限公司 | Login validation method, logging request method and Security Login System |
CN107633014A (en) * | 2017-08-17 | 2018-01-26 | 深圳市诚壹科技有限公司 | A kind of date storage method and server |
CN108289101A (en) * | 2018-01-25 | 2018-07-17 | 中企动力科技股份有限公司 | Information processing method and device |
-
2018
- 2018-08-01 CN CN201810863295.3A patent/CN108769083A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107204959A (en) * | 2016-03-16 | 2017-09-26 | 阿里巴巴集团控股有限公司 | Verification method, the apparatus and system of identifying code |
CN107306183A (en) * | 2016-04-22 | 2017-10-31 | 索尼公司 | Client, service end, method and authentication system |
CN107317791A (en) * | 2016-12-15 | 2017-11-03 | 平安科技(深圳)有限公司 | Login validation method, logging request method and Security Login System |
CN106685973A (en) * | 2016-12-30 | 2017-05-17 | 东软集团股份有限公司 | Method and device for remembering log in information, log in control method and device |
CN107633014A (en) * | 2017-08-17 | 2018-01-26 | 深圳市诚壹科技有限公司 | A kind of date storage method and server |
CN108289101A (en) * | 2018-01-25 | 2018-07-17 | 中企动力科技股份有限公司 | Information processing method and device |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111371585A (en) * | 2018-12-26 | 2020-07-03 | 北京奇虎科技有限公司 | Configuration method and device for CDN node |
CN110138747A (en) * | 2019-04-23 | 2019-08-16 | 微梦创科网络科技(中国)有限公司 | A kind of method and system for verifying account logging state |
CN110138747B (en) * | 2019-04-23 | 2021-03-23 | 微梦创科网络科技(中国)有限公司 | Method and system for verifying login state of account |
CN110445792A (en) * | 2019-08-13 | 2019-11-12 | 北京百佑科技有限公司 | Verification code generation method, verifying code verification method and identifying code login system |
CN110445792B (en) * | 2019-08-13 | 2021-11-09 | 北京百佑科技有限公司 | Verification code generation method and verification code login system |
CN111143410A (en) * | 2019-12-19 | 2020-05-12 | 航天信息股份有限公司 | Accommodation public security management method, device and system |
CN113742377A (en) * | 2020-11-04 | 2021-12-03 | 北京沃东天骏信息技术有限公司 | Method and device for processing data |
CN112699152A (en) * | 2021-01-07 | 2021-04-23 | 北京金万维科技有限公司 | Cache method based on OpenResty implementation |
CN113225381A (en) * | 2021-04-02 | 2021-08-06 | 中冶南方都市环保工程技术股份有限公司 | Data interaction method, data interaction system and computer equipment |
CN113225381B (en) * | 2021-04-02 | 2022-09-13 | 中冶南方都市环保工程技术股份有限公司 | Data interaction method, data interaction system and computer equipment |
CN113824727A (en) * | 2021-09-26 | 2021-12-21 | 中国联合网络通信集团有限公司 | Webpage login verification method, device, server and storage medium |
CN114172716A (en) * | 2021-12-02 | 2022-03-11 | 北京金山云网络技术有限公司 | Login method, login device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108769083A (en) | Login method, apparatus and system based on distributed server | |
CN109446071A (en) | Interface test method, interface test device, electronic equipment and storage medium | |
CN105337990B (en) | The method of calibration and device of user identity | |
CN103391312B (en) | Resource offline method for down loading and device | |
CN108347356B (en) | Multi-protocol unit testing method and device, electronic equipment and storage medium | |
CN106933871A (en) | Short linking processing method, device and short linked server | |
Grambow et al. | Benchmarking microservice performance: a pattern-based approach | |
CN105159832B (en) | A kind of methods, devices and systems collected in application is tested using exception information | |
CN108829588A (en) | A kind of processing method of test application program, deployment system and device | |
CN108881111A (en) | A kind of method and device for realizing multi-tenant system | |
CN103634935B (en) | WPS (Wi-Fi protected setup) or QSS (quick secure setup)-based network accessing method and device | |
CN108829838A (en) | A kind of account information batch processing method and server | |
CN107862552A (en) | Transmitting advertisement information method, apparatus and system | |
CN111221727B (en) | Test method, test device, electronic equipment and computer readable medium | |
CN110413329A (en) | IOT equipment remote debugging method, apparatus and system | |
CN104683181B (en) | A kind of method for monitoring performance, equipment and system | |
CN110413442A (en) | Parameter verification method and apparatus | |
CN109582583A (en) | Method for testing software, device, computer equipment and storage medium | |
CN109067746A (en) | Communication means and device between client and server | |
US10310962B2 (en) | Infrastructure rule generation | |
CN108924159A (en) | The verification method and device in a kind of message characteristic identification library | |
CN107623693A (en) | Domain name mapping means of defence and device, system, computing device, storage medium | |
CN108089972A (en) | interface test method and device | |
CN106934272A (en) | The method of calibration and device of a kind of application message | |
CN105446869B (en) | The method and system that app application is audited |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181106 |
|
RJ01 | Rejection of invention patent application after publication |