CN114760116A - Verification method, verification device, electronic equipment and storage medium - Google Patents

Verification method, verification device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114760116A
CN114760116A CN202210333542.5A CN202210333542A CN114760116A CN 114760116 A CN114760116 A CN 114760116A CN 202210333542 A CN202210333542 A CN 202210333542A CN 114760116 A CN114760116 A CN 114760116A
Authority
CN
China
Prior art keywords
verification
picture
distributed cache
queue
local
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.)
Granted
Application number
CN202210333542.5A
Other languages
Chinese (zh)
Other versions
CN114760116B (en
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202210333542.5A priority Critical patent/CN114760116B/en
Publication of CN114760116A publication Critical patent/CN114760116A/en
Application granted granted Critical
Publication of CN114760116B publication Critical patent/CN114760116B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/36User authentication by graphic or iconic representation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The embodiment of the invention relates to a verification method, a verification device, electronic equipment and a storage medium, wherein the verification method comprises the following steps: acquiring an original picture, and processing the original picture to obtain a verification picture; distributing the verification pictures to two or more distributed cache systems, and respectively writing storage addresses of the verification pictures in the distributed cache systems into corresponding local queues; when receiving a verification request from a client, determining the verification request flow at the current moment; determining a target queue from two or more local queues according to the verification request flow; and sending the storage address at the head of the target queue to the client so that the client downloads a verification picture according to the received storage address for verification. Therefore, the high concurrency problem which can occur in a single storage system when a large number of clients download verification pictures at the same time can be avoided.

Description

Verification method, verification device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of network application, in particular to a verification method, a verification device, electronic equipment and a storage medium.
Background
Currently, in order to prevent a black user from frequently waking up an authentication center, an internet company may first verify the authenticity of the user by a sliding authentication method when the user logs in an APP (Application, mobile phone software). Here, the sliding verification method is: and the user moves the missing part in the verification picture to the corresponding position through dragging operation to obtain a complete picture.
In the prior art, the verification center uploads the verification picture to a cloud storage (e.g., OSS (Operation Support Systems)). And when the verification center receives a verification request sent by the client, downloading a verification picture from the cloud storage and sending the verification picture to the client.
As can be seen from the above description, in the prior art, each time the authentication center receives an authentication request sent by a client, an authentication picture is downloaded from the cloud storage, which is prone to cause a technical problem that the cloud storage is highly concurrent when a large number of clients send authentication requests at the same time.
Disclosure of Invention
In view of this, in order to solve the technical problem that cloud storage is highly concurrent when a large number of clients simultaneously send authentication requests, embodiments of the present invention provide an authentication method, an authentication apparatus, an electronic device, and a storage medium.
In a first aspect, an embodiment of the present invention provides a verification method, where the method includes:
acquiring an original picture, and processing the original picture to obtain a verification picture;
distributing the verification pictures to two or more distributed cache systems, and respectively writing storage addresses of the verification pictures in the distributed cache systems into corresponding local queues;
when receiving a verification request from a client, determining a verification request flow value at the current moment;
determining a target queue from two or more local queues according to the verification request flow value;
and sending the storage address positioned at the head of the target queue to the client so that the client downloads a verification picture according to the received storage address for verification.
In one possible embodiment, the distributing the verification picture to two or more distributed cache systems includes:
distributing the verification picture to the following two distributed cache systems: a content delivery network CDN distributed cache system and a remote dictionary service Redis distributed cache system;
determining a target queue from two or more local queues according to the verification request traffic value, including:
Comparing the verification request flow value with a preset verification request flow threshold value;
if the verification request flow value is larger than the verification request flow threshold value through comparison, determining a local queue corresponding to the CDN distributed cache system as a target queue;
and if the verification request flow value is smaller than or equal to the verification request flow threshold value through comparison, determining a local queue corresponding to the Redis distributed cache system as a target queue.
In a possible embodiment, the obtaining an original picture, and processing the original picture to obtain a verification picture includes:
acquiring two or more original picture sets, wherein the original picture sets comprise a plurality of original pictures, and different original picture sets correspond to different verification scenes;
and processing each original picture in the original picture set to obtain a verification picture set, wherein the verification picture set comprises a plurality of verification pictures.
In a possible embodiment, the writing the storage addresses of the verification pictures in each of the distributed cache systems into corresponding local queues respectively includes:
Establishing a local queue in each local queue group aiming at each verification picture set, wherein one local queue group corresponds to one distributed cache system;
respectively writing the storage addresses of a plurality of verification pictures in the verification picture set in each distributed cache system into local queues corresponding to the verification picture set in each local queue group;
the determining a target queue from two or more local queues comprises:
determining a target queue group from two or more local queue groups according to the verification request flow value;
determining a target verification scene corresponding to the verification request;
and determining a local queue corresponding to the target verification scene in the target queue group as a target queue.
In a possible embodiment, for each verification picture set, the writing, in each distributed cache system, a storage address of each verification picture in the verification picture set into a local queue group corresponding to each distributed cache system, where the local queue corresponding to the verification picture set includes:
for each verification picture set, determining the priority of each verification picture in the verification picture set;
Sequencing a plurality of verification pictures in the verification picture set according to the sequence from high priority to low priority;
and sequentially writing the storage addresses corresponding to the verification pictures in the sequencing result into the local queue corresponding to the verification picture set according to the sequence from front to back.
In one possible implementation, after the sending the storage address at the head of the queue in the target queue to the client, the method further includes:
and inserting the sent memory address into the tail of the target queue.
In a possible embodiment, the processing the original picture to obtain a verification picture includes:
when a preset timing task is started, the original picture is sent to a preset picture production service through a Kafka message so as to call the picture production service to process the original picture, and a verification picture is obtained.
In a possible implementation, before the processing the original picture to obtain the verification picture, the method further includes:
verifying the obtained original picture according to a preset verification rule;
and after the verification is passed, continuously executing the step of processing the original picture to obtain a verification picture.
In a second aspect, an embodiment of the present invention provides an authentication apparatus, including:
the processing module is used for acquiring an original picture and processing the original picture to obtain a verification picture;
the distribution module is used for distributing the verification picture to two or more distributed cache systems and respectively writing the storage address of the verification picture in each distributed cache system into a corresponding local queue;
the first determining module is used for determining the flow value of the verification request at the current moment when the verification request from the client is received;
the second determining module is used for determining a target queue from two or more local queues according to the verification request flow value;
and the sending module is used for sending the storage address positioned at the head of the queue in the target queue to the client so that the client downloads a verification picture according to the received storage address for verification.
In one possible embodiment, the distribution module includes:
the first distribution submodule is used for distributing the verification picture to the following two distributed cache systems: a content delivery network CDN distributed cache system and a remote dictionary service Redis distributed cache system;
The second determining module is specifically configured to:
comparing the verification request flow value with a preset verification request flow threshold value;
if the verification request flow value is larger than the verification request flow threshold value through comparison, determining a local queue corresponding to the CDN distributed cache system as a target queue;
and if the verification request flow value is smaller than or equal to the verification request flow threshold value through comparison, determining a local queue corresponding to the Redis distributed cache system as a target queue.
In one possible implementation, the processing module includes:
the system comprises an acquisition submodule and a verification submodule, wherein the acquisition submodule is used for acquiring two or more original picture sets, the original picture sets comprise a plurality of original pictures, and different original picture sets correspond to different verification scenes;
and the processing submodule is used for processing each original picture in the original picture set aiming at each original picture set to obtain a verification picture set, and the verification picture set comprises a plurality of verification pictures.
In one possible embodiment, the distribution module comprises:
the new creation sub-module is used for creating a local queue in each local queue group aiming at each verification picture set, and one local queue group corresponds to one distributed cache system;
The writing sub-module is used for writing the storage addresses of the plurality of verification pictures in the verification picture set in each distributed cache system into the local queues corresponding to the verification picture set in each local queue group respectively;
the second determining module is specifically configured to:
determining a target queue group from two or more local queue groups according to the verification request flow value;
determining a target verification scene corresponding to the verification request;
and determining a local queue corresponding to the target verification scene in the target queue group as a target queue.
In one possible implementation, the write submodule is specifically configured to:
for each verification picture set, determining the priority of each verification picture in the verification picture set;
sequencing a plurality of verification pictures in the verification picture set according to the sequence from high priority to low priority;
and sequentially writing the storage addresses corresponding to the verification pictures in the sequencing result into the local queue corresponding to the verification picture set according to the sequence from front to back.
In one possible embodiment, the apparatus further comprises:
and the inserting module is used for inserting the sent storage address into the tail of the target queue.
In one possible implementation, the processing module includes:
and the calling submodule is used for sending the original picture to a preset picture production service through a Kafka message when a preset timing task is started so as to call the picture production service to process the original picture and obtain a verification picture.
In one possible embodiment, the apparatus further comprises:
the verification module is used for verifying the acquired original picture according to a preset verification rule;
and the execution module is used for continuously executing the step of processing the original picture to obtain the verification picture after the verification is passed.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor and a memory, the processor being configured to execute a verification program stored in the memory to implement the verification method of any one of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a storage medium, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the authentication method according to any one of the first aspects.
According to the technical scheme provided by the embodiment of the invention, the original picture is obtained and processed to obtain the verification picture, then the verification picture is distributed to two or more distributed cache systems, and the storage addresses of the verification picture in each distributed cache system are respectively written into corresponding local queues; when receiving a verification request from a client, determining the verification request flow at the current moment; and determining a target queue from the two or more local queues according to the verification request flow, and sending a storage address positioned at the head of the queue in the target queue to the client so that the client downloads a verification picture according to the received storage address for verification. Since the verification picture is not stored in a single storage system but stored in two or more distributed cache systems, when the verification center receives a verification request from a client, one distributed cache system can be determined from the two distributed cache systems, so that the client downloads the verification picture from the distributed cache system. Therefore, the problem of high concurrency of a single storage system when a large number of clients download verification pictures at the same time can be avoided.
Drawings
FIG. 1 is a system architecture diagram illustrating an embodiment of the present invention;
FIG. 2 is a flowchart of an embodiment of a verification method according to an embodiment of the present invention;
FIG. 3 is a flowchart of an embodiment of another verification method provided by the present invention;
FIG. 4 is a flowchart of another embodiment of a verification method according to the present invention;
FIG. 5 is a flowchart of another embodiment of a verification method according to the present invention;
FIG. 6 is a block diagram of an embodiment of an authentication apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. 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.
First, an exemplary description is made of a system architecture related to the verification method proposed by the embodiment of the present invention:
Referring to fig. 1, a system architecture diagram according to an embodiment of the present invention is shown.
The system architecture shown in fig. 1 includes: a client 101, a verification center 102, two or more distributed cache systems, and only a distributed cache system 103 and a distributed cache system 104 are taken as examples in fig. 1. Wherein, the client 101, the verification center 102, the distributed cache system 103, and the distributed cache system 104 are connected through network communication.
The client 101 may be a hardware device or software that supports network connectivity to provide various network services. When the client 101 is hardware, it may support various electronic devices with a display screen, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., and fig. 1 only takes the client 101 as a desktop computer as an example. When the client 101 is software, it can be installed in the electronic devices listed above.
The verification center 102 may be implemented by a single server or a server cluster composed of a plurality of servers.
Distributed cache system 103 and distributed cache system 104 may be two disparate distributed cache systems. For example, the distributed cache system 103 is a CDN (Content Delivery Network) distributed cache system, and the distributed cache system 104 is a Remote Dictionary Server (Remote Dictionary Server) distributed cache system.
The verification method provided by the present invention is further explained with specific embodiments in the following with reference to the drawings, and the embodiments do not limit the embodiments of the present invention.
Referring to fig. 2, a flowchart of an embodiment of a verification method according to an embodiment of the present invention is provided. As one example, the process illustrated in FIG. 2 may be applied to a verification center, such as verification center 102 in FIG. 1. As shown in fig. 2, the process may include the following steps:
step 201, obtaining an original picture, and processing the original picture to obtain a verification picture.
In the system architecture shown in fig. 1, a user may upload an original picture to the verification center 102 through a management background of the verification center 102, and after obtaining the original picture, the verification center 102 may call a preset picture production service to process the original picture, so as to obtain a verification picture. The processing of the original picture may include, but is not limited to, the following processing operations: matting, compression, and watermarking, among others.
In an embodiment, the verification center 102 may further be provided with a timing task, where the timing task is used to scan the stored original picture at regular time (here, the verification center 102 may store the original picture first after acquiring the original picture), and send the scanned original picture to the picture production service through a Kafka (a high throughput distributed publish-subscribe messaging system) message, so as to invoke the picture production service to perform asynchronous processing on the original picture, so as to obtain the verification picture.
The stored original pictures are scanned at regular time and processed asynchronously in a mode of combining the timing task and the Kafka message to obtain the verification pictures, and the original pictures can be processed at regular time on the premise of not influencing the main thread.
In an embodiment, after acquiring an original picture, the verification center 102 may first determine a total verification request traffic value corresponding to all verification requests received within a preset time period, then compare the total verification request traffic value with a preset verification request traffic threshold (e.g., 10G), if the total verification request traffic value is greater than the verification request traffic threshold, invoke a picture production server to perform asynchronous processing on the original picture to obtain a verification picture, where the asynchronous processing does not block a current original picture processing thread but allows subsequent operations until other original picture processing threads complete processing of the original picture, and call back to notify the thread to start an original picture processing task of the thread, that is, after the current original picture is processed, continue processing of a next original picture.
If the total verification request flow value is less than or equal to the verification request flow threshold, calling a picture production server to synchronously process the original picture to obtain a verification picture, wherein the synchronous processing can simultaneously process a plurality of original picture processing threads, namely, simultaneously process a plurality of original pictures. The preset time period may be a time period before the time when the original picture is acquired, for example, within 3 minutes before the original picture is acquired, which is not limited in the embodiment of the present invention.
In addition, in an embodiment, after the verification center 102 acquires the original picture, the acquired original picture may be checked according to a preset check rule, and after the check is passed, the picture production service is invoked to process the original picture, so as to obtain the verification picture. The above checks may include, but are not limited to, the following: checking the size, resolution, format, bit depth and size of the original picture, etc.
Step 202, distributing the verification picture to two or more distributed cache systems, and writing storage addresses of the verification picture in each distributed cache system into corresponding local queues respectively.
As can be seen from the description of step 202, in the embodiment of the present invention, the verification center 102 does not merely upload the verification picture to a single storage system, but distributes the verification picture to two or more distributed cache systems. For example, in the system architecture shown in fig. 1, the verification center 102 distributes verification pictures to the distributed cache system 103 and the distributed cache system 104.
Meanwhile, in the embodiment of the present invention, a local queue is provided on the verification center 102 corresponding to each distributed cache system, and is used for storing the storage address of the verification picture in the distributed cache system. For example, in the system architecture shown in fig. 1, two local queues are provided on the verification center 102, and the two local queues correspond to the distributed cache system 103 and the distributed cache system 104, respectively, and are used for storing storage addresses of verification pictures in the distributed cache system 103 and the distributed cache system 104, respectively.
Based on this, in step 202, after the verification center 102 distributes the verification pictures to the two or more distributed cache systems, the storage addresses of the verification pictures in the two or more distributed cache systems are respectively written into the corresponding local queues.
Step 203, when receiving the verification request from the client, determining the verification request flow value at the current moment.
And step 204, determining a target queue from two or more local queues according to the flow value of the verification request.
And 205, sending the storage address at the head of the queue in the target queue to the client, so that the client downloads the verification picture according to the received storage address for verification.
The following collectively describes steps 203 to 205:
as can be seen from the descriptions of step 203 to step 205, in the embodiment of the present invention, each time the verification center 102 receives a verification request from a client, the verification picture is not downloaded from a fixed storage system, but a local queue is determined from two or more local queues as a target queue, that is, a distributed cache system is determined from two or more distributed cache systems, so that the client downloads the verification picture from the distributed cache system. Therefore, the technical problem that when a large number of clients download verification pictures at the same time, a single storage system is highly concurrent can be avoided.
In an embodiment, in a case that the two or more distributed cache systems include a CDN distributed cache system and a Redis distributed cache system, the determining a specific implementation of the target queue from the two or more local queues may include: and determining a verification request flow value at the current moment, and determining a target queue from two or more local queues according to the verification request flow value.
In the embodiment of the present invention, the CDN distributed cache system may be configured to, in a verification scene, when a request for obtaining a verification picture sent by a client is received, determine a storage address of the verification picture in the picture verification request, determine a server closest to the client from the CDN distributed cache system, and send the verification picture corresponding to the storage address in the server to the client. The Redis distributed cache system can be used for directly sending the verification picture which is stored in the server and corresponds to the storage address to the client when a request for obtaining the verification picture, which is sent by the client, is received in a verification scene.
Specifically, the verification center 102 may determine the verification request flow value at the current time based on the Sentinel component, and compare the verification request flow value at the current time with a preset verification request flow threshold (e.g., 1000M). If the verification request flow value is larger than the preset verification request flow threshold value, the current concurrency is high, and the CDN distributed cache system can better cope with high concurrency scenarios, so that a local queue (hereinafter referred to as a CDN local queue) corresponding to the CND distributed cache system can be determined as a target queue; if the verification request flow value is smaller than or equal to the preset verification request flow threshold value through comparison, the current concurrency is low, the Redis distributed cache system can sufficiently cope with a low concurrency scene, and the cost is low, so that a local queue (hereinafter referred to as a Redis local queue) corresponding to the Redis distributed cache system can be determined as a target queue.
Then, the verification center 102 sends the storage address at the head of the queue in the target queue to the client 101, and the client 101 can download the verification picture from the corresponding distributed cache system according to the received storage address to perform verification.
According to the technical scheme provided by the embodiment of the invention, the original picture is obtained and processed to obtain the verification picture, then the verification picture is distributed to two or more distributed cache systems, and the storage addresses of the verification picture in each distributed cache system are respectively written into corresponding local queues; when receiving a verification request from a client, determining the verification request flow at the current moment; and determining a target queue from two or more local queues according to the verification request flow, and sending a storage address positioned at the head of the queue in the target queue to the client so that the client downloads a verification picture according to the received storage address for verification. Since the verification picture is not stored in a single storage system, but stored in two or more distributed cache systems, when the verification center receives a verification request from the client, one distributed cache system can be determined from the two distributed cache systems, so that the client downloads the verification picture from the distributed cache system. Therefore, the problem of high concurrency of a single storage system when a large number of clients download verification pictures at the same time can be avoided.
In addition, the verification picture is stored in the distributed cache system, and the distributed cache system is not limited by regions, so that the verification picture can be obtained from the node which is closest to the client in the distributed cache system after the client receives the storage address of the verification picture, and the performance problems of download delay and the like of the verification picture due to the fact that cloud storage is limited by the regions in the prior art are solved.
Referring to fig. 3, a flowchart of an embodiment of another verification method according to an embodiment of the present invention is shown.
The process shown in fig. 3 may include the following steps based on the process shown in fig. 2:
step 301, two or more original picture sets are obtained, where the original picture sets include multiple original pictures, and different original picture sets correspond to different verification scenes.
Step 302, for each original picture set, processing each original picture in the original picture set to obtain a verification picture set, where the verification picture set includes multiple verification pictures.
Step 301 and step 302 are collectively described below:
in the embodiment of the invention, when the user uploads the original pictures, the original pictures can be uploaded in the form of picture sets, each picture set can comprise a plurality of original pictures, and different picture sets can correspond to different verification scenes.
After obtaining two or more original picture sets, the verification center 102 processes each original picture in the original picture sets for each original picture set to obtain verification pictures corresponding to all the original pictures in the original picture sets, and may obtain a verification picture set according to the verification pictures, where the verification picture set may include multiple verification pictures.
Step 303, for each verification picture set, a local queue is newly established in each local queue group, and one local queue group corresponds to one distributed cache system.
As can be seen from the description of step 202, in the embodiment of the present invention, the verification center 102 does not merely upload the verification picture to a single storage system, but distributes the verification picture to two or more distributed cache systems. For example, in the system architecture shown in fig. 1, the verification center 102 distributes verification pictures to the distributed cache system 103 and the distributed cache system 104.
Meanwhile, in the embodiment of the present invention, the verification center 102 is provided with a local queue group corresponding to each distributed cache system, each local queue group may be provided with a plurality of local queues, and each local queue may correspond to a verification picture set and is used to store the storage addresses of the verification pictures in each verification picture set in each distributed cache system.
For example, in the system architecture shown in fig. 1, the verification center 102 is provided with two local queue groups, where the two local queue groups correspond to the distributed cache system 103 and the distributed cache system 104, respectively, each local queue group may be provided with a plurality of local queues, and each local queue may correspond to a verification picture set, and is used to store the storage addresses of the verification pictures in the distributed cache system 103 and the distributed cache system 104, respectively.
Based on this, in step 303, for each verification picture set, the verification center 102 may create a local queue corresponding to the verification picture set in each local queue group.
For example, suppose that a user uploads three original image sets, and the verification scenes corresponding to the three original image sets are: a login scene, a real name authentication scene and a presentation scene. As described above, the verification center 102 processes the three original image sets to obtain three verification image sets. Continuously assuming that the two or more distributed cache systems include a CDN distributed cache system and a Redis distributed cache system, assuming that the CDN distributed cache system and the Redis distributed cache system correspond to a CDN local queue group and a Redis local queue group, respectively newly building three local queues in the CDN local queue group and the Redis local queue group for the three verification picture sets, and obtaining a local queue detail table shown in table 1 below:
TABLE 1
Figure BDA0003573787670000111
And 304, distributing a plurality of verification pictures in the verification picture set to two or more distributed cache systems, and writing storage addresses of the verification pictures in the distributed cache systems into local queues corresponding to the verification picture set in the local queue groups respectively.
As can be seen from the introduction of step 303, the verification center 102 is provided with a local queue group corresponding to each distributed cache system, each local queue group may be provided with a plurality of local queues, and each local queue may correspond to a verification picture set and is used to store the storage addresses of the verification pictures in each verification picture set in each distributed cache system.
Based on this, in step 304, after the verification center 102 distributes the multiple verification pictures in the verification picture set to two or more distributed cache systems, the storage addresses of the verification pictures in each distributed cache system are respectively written into the local queues corresponding to the verification picture set in each local queue group.
For example, in step 303, on the basis of table 1, after the three original image sets are processed to obtain the verification image sets, the verification images in the three verification image sets may be respectively distributed to the CDN distributed cache system and the Redis distributed cache system.
Then, the storage addresses of the verification pictures in the three verification picture sets in the CDN distributed cache system and the Redis distributed cache system can be written into three local queues in the CDN queue group and the Redis queue group respectively, that is, the storage addresses of the login scene, the real-name authentication scene, and the verification pictures in the rendering scene in the CDN distributed cache system are written into the login scene local queue, the real-name authentication scene local queue, and the rendering scene local queue in the CDN local queue respectively, and the storage addresses of the login scene, the real-name authentication scene, and the verification pictures in the rendering scene in the reds distributed cache system are written into the login scene local queue, the real-name authentication scene local queue, and the rendering scene local queue in the Redis local queue group respectively.
In an embodiment, after obtaining the storage addresses of the multiple verification pictures in the verification picture set in each distributed cache system, the verification center 102 may write the storage addresses into the local queues in each local queue group corresponding to the verification picture set in the following manner: the method comprises the steps of firstly, determining the priority of each verification picture in each verification picture set, then sequencing a plurality of verification pictures in the verification picture sets according to the sequence from high to low in priority, and finally writing storage addresses corresponding to the verification pictures in the sequencing result into a local queue corresponding to the verification picture set in sequence from front to back.
Optionally, the timestamps of the verification pictures in the verification picture set are obtained and are arranged according to the sequence from small to large, and the smaller the timestamp is, the higher the priority of the verification picture is.
Optionally, the content of each verification picture in the verification picture set is obtained, and the priority of each verification picture is determined according to the content of the verification picture.
For example, the verification center 102 may obtain the background color, the theme of the picture, and the text portion of the picture of each verification picture, assuming that the weights of the above three portions are W1, W2, and W3, respectively, and assuming that the lighter the background color of each verification picture is, the higher the priority is; the closer the picture theme of each verification picture is to a preset theme (for example, introduction to a certain product of a company), the higher the priority is; the fewer the text portions of each verification picture, the higher the priority. Assuming that the background color, the picture theme and the priority of the text part of each verification picture obtained by the above method are P1, P2 and P3 respectively, the priority P of each verification picture is obtained by performing weighted calculation according to the following formula (one).
P1W 1+ P2W 2+ P3W 3 (one)
When the storage addresses of the verification pictures in the distributed cache systems are written into the local queues corresponding to the verification picture sets in the local queue groups by the verification center 102, the display strategy of the verification pictures can be more flexible according to the priority level of the verification pictures in each verification picture set.
Step 305, when receiving the verification request from the client, determining the verification request flow value at the current moment.
And step 306, determining a target queue group from two or more local queue groups according to the verification request flow value.
Step 305 and step 306 are collectively described below:
as can be seen from the descriptions of step 305 and step 306, in the embodiment of the present invention, each time an authentication request is received from a client, the authentication center 102 does not download an authentication picture from a fixed storage system, but determines a local queue group as a target queue group from two or more local queue groups, that is, determines a distributed cache system from two or more distributed cache systems, so that the client downloads the authentication picture from the distributed cache system. Therefore, the technical problem that when a large number of clients download verification pictures at the same time, a single storage system is highly concurrent can be avoided.
In an embodiment, in a case that the two or more distributed cache systems include a CDN distributed cache system and a Redis distributed cache system, the verification center 102 may determine, when receiving the verification request from the client, a verification request traffic value at the current time, and determine, according to the verification request traffic value, a target queue group from the two or more local queue groups.
Specifically, the verification center 102 may determine the verification request flow value at the current time based on the Sentinel component, and compare the verification request flow value at the current time with a preset verification request flow threshold (e.g., 1000M). If the verification request flow value is greater than the preset verification request flow threshold value, the current concurrency is high, and the CDN distributed cache system can better cope with high concurrency scenarios, so that a local queue group (hereinafter referred to as a CDN local queue group) corresponding to the CND distributed cache system can be determined as a target queue group; if the verification request flow value is smaller than or equal to the preset verification request flow threshold value, it means that the current concurrency is low, and the Redis distributed cache system is sufficient to cope with a low concurrency scenario and has low cost, so that a local queue group (hereinafter referred to as a Redis local queue) corresponding to the Redis distributed cache system can be determined as a target queue group.
And 307, determining a target verification scene corresponding to the verification request.
And 308, determining a local queue corresponding to the target verification scene in the target queue group as a target queue.
Step 309, sending the storage address at the head of the queue in the target queue to the client, so that the client downloads the verification picture according to the received storage address for verification.
And step 310, inserting the sent storage address into the tail of the target queue.
The following steps 307 to 310 are collectively described:
it should be noted that, the verification request sent by the client 101 may carry parameters related to a verification scenario, and the verification center 102 may determine, according to the parameters, a target verification scenario corresponding to the verification request, and may determine, according to the target verification scenario, a local queue corresponding to the target verification scenario as a target queue.
For example, based on the example in step 303, when the CDN queue group is determined as the target queue group and the target verification scenario is the login scenario, the local queue named login in the CDN queue group is determined as the target queue.
Then, the verification center 102 sends the storage address at the head of the queue in the target queue to the client 101, so that the client 101 downloads the verification picture according to the received storage address for verification.
Then, in order to make each verification picture recyclable, after the verification center 102 sends the storage address at the head of the target queue to the client 101, the verification center 102 may insert the sent storage address into the tail of the target queue.
According to the technical scheme provided by the embodiment of the invention, the verification picture set can be obtained by acquiring two or more original picture sets and processing each original picture in each original picture set; and aiming at each verification picture set, newly establishing a local queue in the local queue group corresponding to each distributed cache system, and respectively writing the storage addresses of a plurality of verification pictures in the verification picture set in the local queue group corresponding to the verification picture set in the local queue group of each distributed cache system. When a verification request from a client is received, determining a target verification scene corresponding to the verification request according to the verification request, and sending a storage address at the head of the local queue corresponding to the target verification scene in the target queue group to the client so that the client downloads a verification picture according to the storage address. In the process, the original pictures are uploaded to the verification center in the form of picture sets, and after the verification picture sets are obtained, a corresponding local queue is set for each verification picture set. When receiving a verification request from a client, the verification center can acquire a storage address from a local queue corresponding to a verification scene according to the verification request and send the storage address to the client, so that the client can acquire verification pictures corresponding to the verification scene in different verification scenes, and the verification pictures can be flexibly displayed according to a customized strategy.
Referring to fig. 4, a flowchart of another embodiment of a verification method according to an embodiment of the present invention is provided.
As shown in fig. 4, the process may include the following:
in the embodiment of the present invention, in order to implement service isolation, a concept of a picture set is introduced, for example: a login scene picture set, a moving picture set, a presentation scene picture set and the like.
In actual operation, a user creates a picture set data table, and inserts basic information such as a service, a name, and an area (overseas/overseas) related to a picture set into the picture set data table. And then, uploading a plurality of original pictures in the new picture set. At this time, in order to adapt to different clients and models, the verification center can flexibly control and verify the content of the original picture, such as size, resolution, format, bit depth and size. The original picture can be uploaded to a storage system (e.g., OSS cloud storage) after passing the verification. Meanwhile, the verification center can create a meta information table, wherein the meta information table stores the record information of each picture processing, and the meta information table comprises the record name, the picture set name, the picture width and height, the version information and the like.
Then, when the original picture is produced (the production refers to a process of obtaining a verification picture by processing the original picture), each picture production task can generate a version number, the rule of the version number is generated according to a time stamp, and the generated version number is updated to a version number field in the meta information table. Then, the verification center can create a meta-information detail data table, which mainly comprises: key, version number, status, and storage type (CDN/Redis). When the verification pictures are respectively stored in different distributed cache systems, different meta-information detail records, such as meta-information detail records of local queues corresponding to the CDN distributed cache system and the Redis distributed cache system, can be created in the data table.
The verification center then creates a timed task comprising: the meta information table is scanned at regular time according to the name of the picture set, and the useless picture set is cleared at regular time (in the verification picture set, the picture set exceeding a preset time period may be regarded as the useless picture set), and the regular time may be every 5 minutes, 10 minutes, and the like, which is not limited in the embodiment of the present invention.
And according to the scanning result of the timing task, combining the meta-information detail table, and aiming at a CDN distributed cache system and a Redis distributed cache system, the verification center respectively sends the two independent Kafka messages outwards.
After monitoring the two Kafka messages, the picture production services of different regional clusters (such as beijing cluster, shanghai cluster, wuhan cluster, etc.), start picture production logic, which includes but is not limited to the following production processes: and traversing all original picture addresses in the picture set library, and respectively carrying out logics such as matting, compression, watermarking and the like on the original pictures corresponding to the original picture addresses. And finally obtaining a verification picture set corresponding to the original picture set.
And then, the verification center respectively uploads the obtained verification picture sets to a CDN distributed cache system and a Redis distributed cache system, updates state fields corresponding to the CDN distributed cache system and the Redis distributed cache system in a meta-information detail table to be successful states, respectively creates a CDN local queue group and a Redis local queue group, each local queue group comprises a plurality of local queues corresponding to the verification picture sets, and the local queues are used for storing storage addresses of the verification picture sets in the CDN distributed cache system and the Redis distributed cache system respectively.
Finally, when the verification center receives a verification request sent by the client, the verification pictures in the verification picture set may be obtained according to the flowchart shown in fig. 5, as shown in fig. 5, which is a flowchart of another verification method provided in the embodiments of the present invention. As shown, the process includes the following:
when the verification center receives a verification request from a client, a verification request flow value at the current moment is determined, and when the verification request flow value is larger than a preset verification request flow threshold, the current concurrency is high, and the CDN distributed cache system can better cope with high concurrency scenes, so that a storage address of a verification picture can be obtained from a CDN local queue group; when the verification request flow value is smaller than or equal to the preset verification request flow threshold, the current concurrency is low, the Redis distributed cache system can sufficiently cope with low concurrency scenes, and the cost is low, so that the storage address of the verification picture can be acquired from the Redis local queue group.
When the storage address of the verification picture is acquired from the Redis local queue group, in the Redis local queue group, a local queue corresponding to a verification scene in the verification request can be divided into: unused queues and used queues. When the storage address of the verification picture is not obtained from the used queue, obtaining the storage address of the verification picture from the unused queue; and if the storage address of the verification picture is acquired from the unused queue, putting the storage address into a Redis local queue, and placing the storage address at the tail of the local queue corresponding to the verification scene in the verification request. If the storage address of any verification picture is not obtained in the Redis local queue group, the verification center obtains the storage address of the verification picture from the local queue corresponding to the verification scene in the verification request in the CDN local queue group, and sends the obtained storage address of the verification picture to the client, so that the client can obtain the verification picture according to the storage address and conduct verification.
According to the technical scheme provided by the embodiment of the invention, by introducing the concept of the picture set, when a user uploads an original picture, the original picture set is uploaded in the form of the picture set, and a related data table is established; then, the verification center obtains two or more original picture sets, and each original picture in each original picture set is processed to obtain a verification picture set; and aiming at each verification picture set, newly establishing a local queue in the local queue group corresponding to each distributed cache system, and respectively writing the storage addresses of a plurality of verification pictures in the verification picture set in the local queue group corresponding to the verification picture set in the local queue group of each distributed cache system. When the verification center receives a verification request from a client, a target queue group can be determined from two or more local queue groups, then a target verification scene corresponding to the verification request is determined, and a storage address at the head of the local queue corresponding to the target verification scene in the target queue group is sent to the client. In this process, since the original picture is uploaded to the authentication center in the form of the picture set, when the authentication request is received from the client, the storage address of the authentication picture can be acquired from the local queue corresponding to the authentication scene in the authentication request. The client can acquire the verification pictures corresponding to the verification scenes in different verification scenes, so that the verification pictures can be flexibly displayed according to the customized strategy.
Meanwhile, when the verification center receives a verification request from the client, the verification request flow value at the current moment can be determined, a target queue group is determined from two or more local queue groups according to the verification request flow value, a local queue corresponding to the target verification scene in the target queue group is determined as a target queue, and a storage address positioned at the head of the queue in the target queue is sent to the client. In this process, the verification center may determine the target queue group from two or more distributed storage systems according to the verification request traffic value at the current time, so as to obtain the storage address of the verification picture, instead of storing the verification picture from a single storage system. Therefore, the problem of high concurrency of a single storage system when a large number of clients download verification pictures at the same time can be avoided.
Fig. 6 is a block diagram of an embodiment of an authentication apparatus according to an embodiment of the present invention, and as shown in fig. 6, the apparatus includes:
the processing module 61 is configured to obtain an original picture, and process the original picture to obtain a verification picture;
the distribution module 62 is configured to distribute the verification image to two or more distributed cache systems, and write storage addresses of the verification image in each distributed cache system into corresponding local queues respectively;
A first determining module 63, configured to determine, when receiving a verification request from a client, a verification request flow value at a current time;
a second determining module 64, configured to determine a target queue from two or more local queues according to the verification request traffic value;
a sending module 65, configured to send the storage address located at the head of the queue in the target queue to the client, so that the client downloads a verification picture according to the received storage address for verification.
In one possible embodiment, the dispensing module 62 comprises (not shown in the figures):
the first distribution submodule is used for distributing the verification picture to the following two distributed cache systems: a content delivery network CDN distributed cache system and a remote dictionary service Redis distributed cache system;
the second determining module 64 is specifically configured to:
comparing the verification request flow value with a preset verification request flow threshold value;
if the verification request flow value is larger than the verification request flow threshold value through comparison, determining a local queue corresponding to the CDN distributed cache system as a target queue;
and if the verification request flow value is smaller than or equal to the verification request flow threshold value through comparison, determining a local queue corresponding to the Redis distributed cache system as a target queue.
In a possible embodiment, the processing module 61 comprises (not shown in the figures):
the system comprises an acquisition submodule and a verification submodule, wherein the acquisition submodule is used for acquiring two or more original picture sets, the original picture sets comprise a plurality of original pictures, and different original picture sets correspond to different verification scenes;
and the processing submodule is used for processing each original picture in the original picture set aiming at each original picture set to obtain a verification picture set, and the verification picture set comprises a plurality of verification pictures.
In one possible embodiment, the dispensing module 62 comprises (not shown in the figures):
the new creation sub-module is used for creating a local queue in each local queue group aiming at each verification picture set, and one local queue group corresponds to one distributed cache system;
the writing sub-module is used for writing the storage addresses of the plurality of verification pictures in the verification picture set in each distributed cache system into the local queues corresponding to the verification picture set in each local queue group respectively;
the second determining module 64 is specifically configured to:
determining a target queue group from two or more local queue groups according to the verification request flow value;
Determining a target verification scene corresponding to the verification request;
and determining a local queue corresponding to the target verification scene in the target queue group as a target queue.
In one possible implementation, the write submodule is specifically configured to:
for each verification picture set, determining the priority of each verification picture in the verification picture set;
sequencing a plurality of verification pictures in the verification picture set according to the sequence from high priority to low priority;
and sequentially writing the storage addresses corresponding to the verification pictures in the sequencing result into the local queue corresponding to the verification picture set according to the sequence from front to back.
In a possible embodiment, the device further comprises (not shown in the figures):
and the inserting module is used for inserting the sent storage address into the tail of the target queue.
In a possible embodiment, the processing module 61 comprises (not shown in the figures):
and the calling submodule is used for sending the original picture to a preset picture production service through a Kafka message when a preset timing task is started so as to call the picture production service to process the original picture and obtain a verification picture.
In a possible embodiment, the device further comprises (not shown in the figures):
the verification module is used for verifying the acquired original picture according to a preset verification rule;
and the execution module is used for continuously executing the step of processing the original picture to obtain the verification picture after the verification is passed.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device 700 shown in fig. 7 includes: at least one processor 701, memory 702, at least one network interface 704, and other user interfaces 703. The various components in the electronic device 700 are coupled together by a bus system 705. It is understood that the bus system 705 is used to enable connected communication between these components. The bus system 705 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various busses are labeled as the bus system 705 in figure 7.
The user interface 703 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, etc.).
It is to be understood that the memory 702 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile memory may be a Random Access Memory (RAM) which functions as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (syncronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM ), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 702 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 702 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 7021 and application programs 7022.
The operating system 7021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application 7022 includes various applications, such as a media player (MediaPlayer), a Browser (Browser), and the like, for implementing various application services. Programs that implement methods in accordance with embodiments of the present invention can be included in application program 7022.
In the embodiment of the present invention, by calling a program or an instruction stored in the memory 702, specifically, a program or an instruction stored in the application 7022, the processor 701 is configured to execute the method steps provided by the method embodiments, for example, including:
acquiring an original picture, and processing the original picture to obtain a verification picture;
distributing the verification pictures to two or more distributed cache systems, and respectively writing storage addresses of the verification pictures in the distributed cache systems into corresponding local queues;
When receiving a verification request from a client, determining a verification request flow value at the current moment;
determining a target queue from two or more local queues according to the verification request flow value;
and sending the storage address at the head of the target queue to the client so that the client downloads a verification picture according to the received storage address for verification.
The method disclosed in the above embodiments of the present invention may be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The processor 701 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702 and performs the steps of the above method in combination with the hardware thereof.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The electronic device provided in this embodiment may be the electronic device shown in fig. 7, and may perform all the steps of the verification method shown in fig. 2 to 4, so as to achieve the technical effect of the verification method shown in fig. 2 to 4, and for brevity, refer to the description related to fig. 2 to 4, which is not described herein again.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors to implement the above-described authentication method performed on the electronic device side.
The processor is configured to execute the authentication program stored in the memory to implement the following steps of the authentication method executed on the electronic device side:
acquiring an original picture, and processing the original picture to obtain a verification picture;
distributing the verification picture to two or more distributed cache systems, and respectively writing the storage address of the verification picture in each distributed cache system into a corresponding local queue;
when receiving a verification request from a client, determining a verification request flow value at the current moment;
Determining a target queue from two or more local queues according to the verification request flow value;
and sending the storage address positioned at the head of the target queue to the client so that the client downloads a verification picture according to the received storage address for verification.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only examples of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (11)

1. A method of authentication, the method comprising:
acquiring an original picture, and processing the original picture to obtain a verification picture;
distributing the verification pictures to two or more distributed cache systems, and respectively writing storage addresses of the verification pictures in the distributed cache systems into corresponding local queues;
when receiving a verification request from a client, determining a verification request flow value at the current moment;
determining a target queue from two or more local queues according to the verification request flow value;
and sending the storage address at the head of the target queue to the client so that the client downloads a verification picture according to the received storage address for verification.
2. The method of claim 1, wherein distributing the verification picture to two or more distributed caching systems comprises:
distributing the verification picture to the following two distributed cache systems: a content delivery network CDN distributed cache system and a remote dictionary service Redis distributed cache system;
determining a target queue from two or more local queues according to the verification request traffic value, including:
comparing the verification request flow value with a preset verification request flow threshold value;
if the verification request flow value is larger than the verification request flow threshold value through comparison, determining a local queue corresponding to the CDN distributed cache system as a target queue;
and if the verification request flow value is smaller than or equal to the verification request flow threshold value through comparison, determining a local queue corresponding to the Redis distributed cache system as a target queue.
3. The method of claim 1, wherein the obtaining an original picture, processing the original picture to obtain a verification picture, comprises:
acquiring two or more original picture sets, wherein the original picture sets comprise a plurality of original pictures, and different original picture sets correspond to different verification scenes;
And processing each original picture in the original picture set to obtain a verification picture set, wherein the verification picture set comprises a plurality of verification pictures.
4. The method according to claim 3, wherein the writing the storage addresses of the verification pictures in each of the distributed cache systems into corresponding local queues respectively comprises:
establishing a local queue in each local queue group aiming at each verification picture set, wherein one local queue group corresponds to one distributed cache system;
respectively writing the storage addresses of a plurality of verification pictures in the verification picture set in each distributed cache system into local queues corresponding to the verification picture set in each local queue group;
the determining a target queue from two or more local queues comprises:
determining a target queue group from two or more local queue groups according to the verification request flow value;
determining a target verification scene corresponding to the verification request;
and determining a local queue corresponding to the target verification scene in the target queue group as a target queue.
5. The method according to claim 4, wherein for each of the verification picture sets, writing storage addresses of a plurality of verification pictures in the verification picture set in each of the distributed cache systems into a local queue group corresponding to each of the distributed cache systems, respectively, and wherein the local queue corresponding to the verification picture set includes:
for each verification picture set, determining the priority of each verification picture in the verification picture set;
sequencing a plurality of verification pictures in the verification picture set according to the sequence of the priorities from high to low;
and sequentially writing the storage addresses corresponding to the verification pictures in the sequencing result into the local queue corresponding to the verification picture set according to the sequence from front to back.
6. The method of claim 1, wherein after sending the memory address at the head of queue in the target queue to the client, the method further comprises:
and inserting the sent memory address into the tail of the target queue.
7. The method according to claim 1, wherein the processing the original picture to obtain the verification picture comprises:
When a preset timing task is started, the original picture is sent to a preset picture production service through a Kafka message so as to call the picture production service to process the original picture, and a verification picture is obtained.
8. The method of claim 1, wherein prior to said processing said original picture to obtain a verification picture, said method further comprises:
verifying the obtained original picture according to a preset verification rule;
and after the verification is passed, continuously executing the step of processing the original picture to obtain a verification picture.
9. An authentication apparatus, the apparatus comprising:
the processing module is used for acquiring an original picture and processing the original picture to obtain a verification picture;
the distribution module is used for distributing the verification pictures to two or more distributed cache systems and respectively writing storage addresses of the verification pictures in the distributed cache systems into corresponding local queues;
the first determining module is used for determining the flow value of the verification request at the current moment when the verification request from the client is received;
The second determining module is used for determining a target queue from two or more local queues according to the verification request flow value;
and the sending module is used for sending the storage address positioned at the head of the queue in the target queue to the client so that the client downloads a verification picture according to the received storage address for verification.
10. An electronic device, comprising: a processor and a memory, the processor being configured to execute an authentication program stored in the memory to implement the authentication method of any one of claims 1 to 8.
11. A storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the authentication method of any one of claims 1 to 8.
CN202210333542.5A 2022-03-30 2022-03-30 Verification method, verification device, electronic equipment and storage medium Active CN114760116B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210333542.5A CN114760116B (en) 2022-03-30 2022-03-30 Verification method, verification device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210333542.5A CN114760116B (en) 2022-03-30 2022-03-30 Verification method, verification device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114760116A true CN114760116A (en) 2022-07-15
CN114760116B CN114760116B (en) 2024-04-12

Family

ID=82328616

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210333542.5A Active CN114760116B (en) 2022-03-30 2022-03-30 Verification method, verification device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114760116B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120151603A1 (en) * 2009-09-01 2012-06-14 Alibaba Group Holding Limited Method, Apparatus and Server for User Verification
CN104092702A (en) * 2014-07-22 2014-10-08 北京京东尚科信息技术有限公司 Network security verification method and system for distributed system
WO2016179894A1 (en) * 2015-05-12 2016-11-17 网宿科技股份有限公司 Cdn-based content management system
CN109995866A (en) * 2019-04-03 2019-07-09 深圳市网心科技有限公司 Distributed document method of calibration, device, computer installation and storage medium
WO2019242638A1 (en) * 2018-06-20 2019-12-26 华为技术有限公司 Load balancing method and device
CN111262892A (en) * 2018-11-30 2020-06-09 北京图森智途科技有限公司 Multi-ROS service discovery system
CN111865920A (en) * 2020-06-18 2020-10-30 多加网络科技(北京)有限公司 Gateway authentication and identity authentication platform and method thereof
CN112711730A (en) * 2021-01-21 2021-04-27 上海观察者信息技术有限公司 Data caching method and device, storage medium and electronic equipment
CN112748879A (en) * 2020-12-30 2021-05-04 中科曙光国际信息产业有限公司 Data acquisition method, system, device, computer equipment and storage medium
CN112764948A (en) * 2021-01-22 2021-05-07 土巴兔集团股份有限公司 Data transmission method, data transmission device, computer device, and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120151603A1 (en) * 2009-09-01 2012-06-14 Alibaba Group Holding Limited Method, Apparatus and Server for User Verification
CN104092702A (en) * 2014-07-22 2014-10-08 北京京东尚科信息技术有限公司 Network security verification method and system for distributed system
WO2016179894A1 (en) * 2015-05-12 2016-11-17 网宿科技股份有限公司 Cdn-based content management system
WO2019242638A1 (en) * 2018-06-20 2019-12-26 华为技术有限公司 Load balancing method and device
CN111262892A (en) * 2018-11-30 2020-06-09 北京图森智途科技有限公司 Multi-ROS service discovery system
CN109995866A (en) * 2019-04-03 2019-07-09 深圳市网心科技有限公司 Distributed document method of calibration, device, computer installation and storage medium
CN111865920A (en) * 2020-06-18 2020-10-30 多加网络科技(北京)有限公司 Gateway authentication and identity authentication platform and method thereof
CN112748879A (en) * 2020-12-30 2021-05-04 中科曙光国际信息产业有限公司 Data acquisition method, system, device, computer equipment and storage medium
CN112711730A (en) * 2021-01-21 2021-04-27 上海观察者信息技术有限公司 Data caching method and device, storage medium and electronic equipment
CN112764948A (en) * 2021-01-22 2021-05-07 土巴兔集团股份有限公司 Data transmission method, data transmission device, computer device, and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨冬菊;冯凯;: "基于缓存的分布式统一身份认证优化机制研究", 计算机科学, no. 03 *
王莉;冯志勇;张平;: "面向分布式缓存系统的无线资源管理:动机、挑战与方法", 电信科学, no. 03 *

Also Published As

Publication number Publication date
CN114760116B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
WO2019201039A1 (en) Method and system for updating application and application server
US10063660B1 (en) Collaborative editing of media in a mixed computing environment
CN111694791B (en) Data access method and device in distributed basic framework
US10893091B2 (en) Management of asynchronous content post and media file transmissions
CN107277128B (en) Method and device for requesting processing order preservation in distributed storage protocol
CN110196843B (en) File distribution method based on container cluster and container cluster
CN110019873B (en) Face data processing method, device and equipment
CN112286723A (en) Computer room disaster recovery control method, terminal and storage medium
CN112437329A (en) Method, device and equipment for playing video and readable storage medium
CN109040263B (en) Service processing method and device based on distributed system
CN105610869B (en) Method and device for scheduling streaming media
CN111586437B (en) Barrage message processing method, system, computing device and storage medium
CN112843676A (en) Data processing method, device, terminal, server and storage medium
CN113452774A (en) Message pushing method, device, equipment and storage medium
CN114760116B (en) Verification method, verification device, electronic equipment and storage medium
CN111327680A (en) Authentication data synchronization method, device, system, computer equipment and storage medium
US20150326686A1 (en) Method, Apparatus and System for Processing User Generated Content
CN116107710A (en) Method, apparatus, device and medium for processing offline rendering tasks
CN111586438B (en) Method, device and system for processing service data
US8615548B1 (en) System and method for deferred data downloading
AU2020226900B2 (en) Adaptive retrieval of objects from remote storage
KR20220146801A (en) Method, computer device, and computer program for providing high-definition image of region of interest using single stream
US20050138228A1 (en) Pull-configured distribution of imagery
CN111090818B (en) Resource management method, resource management system, server and computer storage medium
CN110912953A (en) File storage system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant