CN110087201B - Information processing method, device and storage medium - Google Patents

Information processing method, device and storage medium Download PDF

Info

Publication number
CN110087201B
CN110087201B CN201910344210.5A CN201910344210A CN110087201B CN 110087201 B CN110087201 B CN 110087201B CN 201910344210 A CN201910344210 A CN 201910344210A CN 110087201 B CN110087201 B CN 110087201B
Authority
CN
China
Prior art keywords
service information
sent
service
information
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910344210.5A
Other languages
Chinese (zh)
Other versions
CN110087201A (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 Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910344210.5A priority Critical patent/CN110087201B/en
Publication of CN110087201A publication Critical patent/CN110087201A/en
Application granted granted Critical
Publication of CN110087201B publication Critical patent/CN110087201B/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/18Network architectures or network communication protocols for network security using different networks or channels, e.g. using out of band channels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]

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)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a method, a device and a storage medium for information processing, which specifically comprise the following steps: receiving a plurality of pieces of service information generated by a service system in a preset time period, wherein the service information carries a service identifier and a user identifier; generating an identification key which corresponds to each piece of service information and carries effective duration based on the service identification and the user identification, wherein the effective duration of the identification key is the effective duration of the corresponding service information; determining one of the service information with the same identifier key as service information to be sent; and sending the service information to be sent in the effective time length to a user terminal corresponding to the user identification. According to the embodiment of the application, a large amount of service information generated by operating a verification service by a user is checked in advance, and one effective service information is sent to the user terminal, so that the user experience is improved, and meanwhile, the waste of short message resources is avoided to a great extent.

Description

Information processing method, device and storage medium
Technical Field
The present application relates to the field of mobile communications, and in particular, to a method, an apparatus, and a storage medium for processing information.
Background
Short messages have been widely used in the field of mobile communications as a traditional and effective way of prompting users. Especially, the safety of the user and the operation thereof is ensured through the short message verification code. The method comprises the steps that a plurality of verification code access providers provide short message verification code services, all websites send requests to servers of the access providers through interfaces, the servers send random numbers or letters to mobile phones, and the servers of the access providers conduct verification of the verification codes in a unified mode. The safety of shopping can be ensured accurately and safely by sending the verification code to the mobile phone, and meanwhile, the correctness of the user is also ensured.
However, the same short message with the verification code is sent to the mobile phone of the user in a large quantity, so that the user experience is poor, and if the user does not know which short message verification code is the valid short message verification code. It becomes important to solve the problem of the duplicate transmission of the authentication code. The traditional scheme is more to prevent the same short message content from being repeatedly issued to the mobile phone of the user or to control the position for triggering the sending of the verification code, and the user can click once a minute, but if the user does not receive the verification code short message after one minute, the user clicks the sending of the verification code again, and the repeated operation can possibly cause the user to suddenly receive a plurality of verification code short messages at a certain time, so that the short message resource is wasted, the user can not know the effective short message verification code more directly, and the use experience of the user is reduced.
Disclosure of Invention
The embodiment of the application provides an information processing method, which selects a piece of service information within effective time and sends the service information to a user terminal so as to achieve the effect of improving user experience.
The method comprises the following steps:
receiving a plurality of pieces of service information generated by a service system in a preset time period, wherein the service information carries a service identifier and a user identifier;
generating an identification key which corresponds to each piece of service information and carries effective duration based on the service identification and the user identification, wherein the effective duration of the identification key is the effective duration of the corresponding service information;
determining one of the service information with the same identifier key as service information to be sent;
and sending the service information to be sent in the effective duration to a user terminal corresponding to the user identification. Optionally, receiving a request for sending the service information;
and generating service information carrying a service identifier and a user identifier corresponding to the verification service according to the request for sending the service information.
Optionally, recording the trigger time of each piece of service information and the content information of the service information;
and caching the service information carrying the trigger time and the corresponding content information and the corresponding identification key in a Redis database.
Optionally, one of the service information corresponding to the same identification key cached in the Redis database within a preset time period is determined as service information to be sent.
Optionally, calculating a first time difference between the trigger time corresponding to the service information to be sent and the current time;
comparing the first time difference with the effective duration of the identification key;
when the first time difference is larger than the effective duration, deleting the identification key and intercepting the service information to be sent;
and when the first time difference is smaller than the effective duration, sending the service information to be sent to a user terminal corresponding to a user identifier.
Optionally, the content information and the trigger time of the received current service information which is the same as the identifier key of the service information to be sent are obtained;
comparing the consistency of the content information of the current service information with the content information of the cached service information to be sent;
when the content information of the current service information is consistent with the cached content information of the service information to be sent, respectively calculating a second time difference between the trigger time of the current service information and the current time and a third time difference between the trigger time of the service information to be sent and the current time;
and intercepting the service information to be sent and sending the current service information to a user terminal corresponding to the user identifier when the content information of the current service information is inconsistent with the cached content information of the service information to be sent.
Optionally, respectively comparing the second time difference with the size of the valid duration of the identification key, and comparing the third time difference with the size of the valid duration of the identification key;
when the second time difference and the third time difference are both greater than the effective duration, deleting the identification key, and intercepting the service information to be sent and the current service information;
when the second time difference and the third time difference are both smaller than the effective time length, any one of the service information is sent to the user terminal corresponding to the user identifier;
and intercepting the service information to be sent and sending the current service information to a user terminal corresponding to a user identifier when only the third time difference is greater than the effective time length.
In another embodiment of the present invention, there is provided an information processing apparatus including:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a plurality of pieces of service information generated by a service system in a preset time period, and the service information carries a service identifier and a user identifier;
a first generation module, configured to generate, based on the service identifier and the user identifier, an identifier key that carries an effective duration and corresponds to each piece of service information, where an effective duration of the identifier key is an effective duration of the corresponding service information;
the determining module is used for determining one of the service information with the same identifier key as the service information to be sent;
and the sending module is used for sending the service information to be sent in the effective duration to a user terminal corresponding to the user identifier.
Optionally, the apparatus further comprises:
a second receiving module, configured to receive a request for sending the service information;
and the second generation module is used for generating the service information carrying the service identifier and the user identifier corresponding to the verification service according to the request for sending the service information.
Optionally, the apparatus further comprises:
the recording module is used for recording the triggering time of each piece of service information and the content information of the service information;
and the cache module is used for caching the service information carrying the trigger time and the corresponding content information and the corresponding identification key in a Redis database.
Optionally, the determining module is configured to determine one of the service information corresponding to the same identifier key cached in the Redis database within a preset time period as the service information to be sent.
Optionally, the sending module includes:
a first calculating unit, configured to calculate a first time difference between the trigger time corresponding to the service information to be sent and a current time;
the first comparison unit is used for comparing the first time difference with the effective duration of the identification key;
the first intercepting unit is used for deleting the identification key and intercepting the service information to be sent when the first time difference is greater than the effective duration;
and the first sending unit is used for sending the service information to be sent to the user terminal corresponding to the user identifier when the first time difference is smaller than the effective duration.
Optionally, the sending module further includes:
an obtaining unit, configured to obtain the content information and the trigger time of the received current service information that is the same as the identifier key of the service information to be sent;
a second comparing unit, configured to compare consistency between the content information of the current service information and the content information of the cached service information to be sent;
a second calculating unit, configured to calculate a second time difference between the trigger time of the current service information and the current time and a third time difference between the trigger time of the service information to be sent and the current time, respectively, when the content information of the current service information is consistent with the cached content information of the service information to be sent;
and a second sending unit, configured to intercept the service information to be sent when the content information of the current service information is inconsistent with the cached content information of the service information to be sent, and send the current service information to a user terminal corresponding to the mobile phone number.
Optionally, the sending module further includes:
a third comparing unit, configured to compare the second time difference with the valid duration of the identifier key, and compare the third time difference with the valid duration of the identifier key;
the second intercepting unit is used for deleting the identification key and intercepting the service information to be sent and the current service information when the second time difference and the third time difference are both greater than the effective time length;
a third sending unit, configured to send any one of the pieces of service information to the user terminal corresponding to the user identifier when both the second time difference and the third time difference are smaller than the effective time length;
and the fourth sending unit is used for intercepting the service information to be sent and sending the current service information to the user terminal corresponding to the user identifier when the third time difference is greater than the effective time length.
In another embodiment of the present invention, a non-transitory computer readable storage medium is provided, which stores instructions that, when executed by a processor, cause the processor to perform the steps of one of the above-described methods of information processing.
In another embodiment of the present invention, a terminal device is provided, which includes a processor configured to execute the steps of the information processing method.
As can be seen from the above, based on the above embodiments, firstly, a plurality of pieces of service information generated by a service system within a preset time period are received, where the service information carries a service identifier and a user identifier, secondly, an identifier key carrying an effective duration corresponding to each piece of service information is generated based on the service identifier and the user identifier, where the effective duration of the identifier key is the effective duration of the corresponding service information, then, one piece of service information with the same identifier key is determined as service information to be sent, and finally, the service information to be sent within the effective duration is sent to a user terminal corresponding to the user identifier. According to the embodiment of the application, one effective service information is selected from the service information corresponding to one service, and the service information is sent to the user terminal, so that the situation that a user receives a large amount of service information is avoided, and the use experience of the user is improved. Meanwhile, the waste of short message resources is reduced to a greater extent.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a system structure diagram illustrating an information processing method according to an embodiment of the present application;
FIG. 2 is a diagram illustrating a method of information processing provided by an embodiment of the present application;
fig. 3 is a schematic diagram illustrating a specific flow of a method for processing information provided by an embodiment of the present application;
FIG. 4 is a diagram illustrating a detailed flow of another information processing method provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of an information processing apparatus provided in an embodiment of the present application;
fig. 6 shows a schematic diagram of a terminal device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and examples.
Based on the problems in the prior art, embodiments of the present application provide an information processing method, where, in a plurality of pieces of service information generated by repeatedly clicking one service by a user, the service information may be verification code information in a verification service, an effective piece of service information is screened out, and the service information is sent to a user terminal, so that the user does not repeatedly receive a large amount of effective or ineffective service information, thereby improving user experience and reducing waste of service information sending resources to a great extent.
The application field of the application is mainly in the field of mobile communication, and the application is suitable for some service scenes needing to verify the user identification, such as login pages and the like. As shown in fig. 1, the present invention is an overall system structure diagram of service information for sending an authentication code short message in the method provided in this embodiment. Wherein, the user side 11, such as a user terminal and a Personal Computer (PC), clicks an interface prompt for obtaining the verification code, and the service system 12 receives a request for sending the short message service information of the verification code and generates the short message service information of the verification code according to the request for sending the short message service information of the verification code. Then, the service system 12 calls the short message system 13, sequentially passes through the checker 131, the frequency control controller 132 and the message queue 133 in the short message system 13, where the verification code short message service information is stored in the transmission process, and sends the verification code short message service information to the short message service provider through the sending module 134, and the short message service provider sends the verification code short message service information to the corresponding user terminal. The sending module 134 includes a short message service loader 1341, a load balancing module 1342 for manual channel distribution configuration, and a sender resource pool 1343 including a plurality of senders. Through the system, the effective and qualified identifying code short message service information is sent to the corresponding user terminal.
Referring to fig. 2, a specific flow of an information processing method provided in an embodiment of the present application includes the following detailed steps:
s21, receiving a plurality of pieces of service information generated by the service system within a preset time period, where the service information carries a service identifier and a user identifier.
In this step, after the user triggers an interface prompt for acquiring service information on an interface of a certain service, the service system generates service information corresponding to the verification service. If the interface of the verification service needing verification is provided, the interface prompt for acquiring the service information of the verification code short message is triggered, so that the service system generates the verification code information corresponding to the verification service. Each piece of service information carries a service identifier and a corresponding user identifier. The user identifier is a unique identifier representing the user terminal, such as a mobile phone number. The service identifier is an identifier of a triggered service, and one service corresponds to a specific service identifier. The service identifier may be a string of characters, may be randomly generated, or may be predefined. When the user repeatedly clicks an interface prompt on a certain verification service interface, the service identifiers carried by each piece of service information corresponding to the verification service are the same. In addition, the user repeatedly operates the service within the preset time to trigger the service system to generate the service information. The preset time period mainly refers to the condition of high concurrence of user operation, and the specific numerical value can be preset, for example, 1min, and a plurality of pieces of service information generated due to user operation are received within 1 min.
And after generating the service information carrying the service identifier corresponding to the verification service and the user identifier, the service information service system receives the service information.
S22, based on the service identification and the user identification, generating an identification key which carries effective duration and corresponds to each piece of service information, wherein the effective duration of the identification key is the effective duration of the corresponding service information.
In this step, after receiving the service information carrying the service identifier and the user identifier corresponding to the verification service, the service identifier and the user identifier are stored, and an identifier key is generated according to the service identifier and the user identifier. Specifically, a character string corresponding to the user identifier is added to the character string representing the service identifier, and then an identifier key corresponding to the authentication service in the global is generated by using an Md5 Message Digest Algorithm (Message-Digest Algorithm, Md5) on the basis of the character string.
In addition, the service information received in step S21 also carries the valid duration of the service information, which indicates the valid duration of the service information, and the preferred embodiment is set to be 5-15 minutes. The identification key carries the valid duration, and after the time of the valid duration is over, the identification key is invalid. The effective duration of the identification key is the same as the effective duration of the received service information.
And S23, determining one of the service information with the same identifier key as the service information to be sent.
Here, when the user repeatedly clicks the interface prompt for acquiring the service information on the verification service interface, a plurality of pieces of service information may be received. And each piece of service information generates a corresponding identification key, and when each piece of service information corresponds to the same verification service, the corresponding identification keys are also the same. And determining one of the service information with repeated identification keys as service information to be sent which is possibly sent by a service information service system.
And S24, sending the service information to be sent in the effective time length to the user terminal corresponding to the user identification.
In this step, the validity of the verification code to be sent determined in a large amount of service information generated by repeated operations of the user in a short time is verified in a high concurrency state, and one piece of service information in the valid duration is sent to the user terminal corresponding to the user identifier.
Based on the above embodiment of the present application, firstly, service information generated by a service system due to repeated operations of a user is received, where the service information carries a service identifier and a user identifier corresponding to a verification service, secondly, an identifier key carrying an effective duration corresponding to each piece of service information is generated based on the service identifier and the user identifier, where the effective duration of the identifier key is the effective duration of the corresponding service information, then, one of the pieces of service information that is the same as the identifier key is determined as service information to be sent, and finally, the service information to be sent within the effective duration is sent to a user terminal corresponding to the user identifier. According to the embodiment of the application, one piece of service information within effective duration is screened out from a large number of repeated identification key verification codes generated aiming at a certain verification service, and the service information is sent to the user terminal, so that the user terminal only receives one piece of effective service information, the user experience is greatly improved, and the waste of service information sending resources is greatly reduced.
Fig. 3 is a schematic diagram illustrating a specific flow of an information processing method in an embodiment of the present application. Wherein, the detailed process of the specific flow is as follows:
and S31, the user side triggers the interface prompt for acquiring the service information.
Generally, the service information is used as a way for safe passing of a website, and a user obtains the service information by triggering an interface prompt on a webpage login interface. If the user clicks the interface prompt for multiple times, multiple pieces of service information can be acquired.
S32, the service system generates service information and records the service identification, user identification and the effective time of the service information carried by each piece of service information.
Here, the service system receives a request to transmit service information. And simultaneously, generating service information carrying a service identifier and a user identifier corresponding to the verification service according to the request for sending the service information. In addition, the service information also carries effective duration indicating the aging.
S33, using the service mark and the user mark, generating mark key for each piece of service information in the service information service system.
S34, caching each identification key and corresponding service information into a Redis database.
Here, the Redis database is a data structure storage system in a memory that is granted by a BSD open source protocol (Original BSD license, FreeBSD license, Original BSD license). It can be used as a database, cache and message-centric database. After the service information is generated, caching the service information and the corresponding identification key in a Redis database.
And S35, recording the trigger time of each piece of service information.
In this step, the trigger time of each piece of service information is the time corresponding to the time when the user side clicks the interface prompt for acquiring the service information.
And S36, determining one of the service information corresponding to the same identification key cached in the Redis database in a preset time period as the service information to be sent.
In this step, the predetermined time period is generally a short time interval, such as 1 minute. The preset time period may be preset. When the generated service information is cached in the Redis database within a preset time period after receiving the triggering time for the user side to trigger the interface prompt for acquiring the service information for the first time, the setnx mutual exclusion operation of the Redis database is performed by using the generated identifier key. Specifically, during caching, when the same identification key and corresponding service information are cached in the Redis database, the setnx operation of the Redis returns to 0, which indicates that the operation is repeated, the corresponding service information is generated or sent, and the service information is cancelled; otherwise, if the setnx operation of the Redis returns to 1, the operation is not repeated, and the short message can be continuously sent. And determining one piece of service information which is processed as service information to be sent.
Wherein setnx operation due to Redis database is an atomicity operation and is mutually exclusive. Under the condition of high concurrency of interface prompt for obtaining service information by repeatedly clicking by a user in a short time, only one piece of service information is executed, the operation can return to 1, and the rest pieces of service information return to 0, so that only one piece of service information is sent out aiming at the verification service.
And S37, calculating a first time difference between the trigger time corresponding to the service information to be sent and the current time.
In this step, a retry operation of the Redis is performed on the service information to be sent, and the effective duration of the identifier key of the service information to be sent is set to be the effective duration of the service information to be sent. Specifically, during the validity period of the service information to be sent, as long as the service information is not sent by the underlying service provider, the setnx operation of redis performed on other service information here, and then 0 is returned, which also ensures that only one piece of service information is sent by the verification service.
Therefore, according to the trigger time of the acquired service information, a first time difference between the trigger time corresponding to the service information to be sent and the current time is calculated.
S38, comparing the first time difference with the valid duration of the identification key.
And S391, deleting the identifier key and intercepting the service information to be sent when the first time difference is greater than the effective duration.
In this step, when the first time difference is greater than the effective duration, it indicates that the service information to be sent is invalid. Deleting the identification key corresponding to the verification code information, intercepting the invalid verification code to be sent, and not sending the invalid verification code to be sent.
And S392, when the first time difference is smaller than the effective duration, sending the service information to be sent to the user terminal corresponding to the user identifier.
In this step, when the first time difference is smaller than the effective duration, it is identified that the service information to be sent is still within the corresponding effective duration, and the service information to be sent is sent to the user terminal corresponding to the user identifier.
And the service information service system sends the service information to be sent to a sending system, and the sending system calls an operator interface to send the service information to be sent. After receiving the service information, the user inputs the service information, and the service system performs corresponding operations on the service information, such as verification operations on verification code information.
The embodiment shown in fig. 3 is mainly used for the situation that a large number of verification short messages with the same identification key may be generated when a user repeatedly clicks an interface prompt for obtaining service information in a short time. And sending the effective service information screened by the flow to the user terminal in the high concurrency state.
Fig. 4 is a schematic diagram illustrating a specific flow of another information processing method in the embodiment of the present application. Wherein, the detailed process of the specific flow is as follows:
s401, the user side triggers an interface prompt for acquiring the service information.
S402, the service system generates service information and records service identification, user identification, effective duration of the service information and content information of the service information carried by each piece of service information.
S403, using the service identifier and the user identifier, generating an identifier key for each piece of service information in the service information service system.
S404, caching each identification key and the corresponding service information into a Redis database.
S405, recording the triggering time of each piece of service information.
S406, determining one of the service information corresponding to the same identification key cached in the Redis database in a preset time period as the service information to be sent.
S407, whether the identifier key of the service information to be sent exists is detected.
S408, if the identification key does not exist, the identification key is expired, the service information to be sent is invalid, the service information to be sent is intercepted, the service information to be sent is not sent, and the process is ended.
Here, since the validity duration of the identification key is the same as the validity duration of the service information, and the Redis database scans whether the identification keys are expired, and once the identification keys are expired, the identification keys are deleted to indicate that the service information to be sent is invalid, and the service information to be sent needs to be intercepted and is not sent any more.
S409, if the identification key exists, receiving the current service information which is sent outside the preset time period and is the same as the identification key of the service information to be sent.
In this step, after the interface prompt for obtaining the service information is clicked by the user in a large amount within a short preset time period, in this high concurrency state, if the generated service information is delayed to be sent and not sent to the user terminal, the user may click the interface prompt for obtaining the service information again, and the current service information with the same identifier key for the verification service is generated again.
Therefore, when new current service information is received, setnx operation of Redis performed on the current service information to return to 1.
And S410, acquiring the content information and the trigger time of the current service information.
S411, comparing the consistency between the content information of the current service information and the content information of the service information to be sent.
Here, the content information of the current service information and the service information to be transmitted is subjected to the Md5 message digest algorithm, Md5 values related to the content information are respectively obtained, and the Md5 value of the current service information is compared with the Md5 value of the service information to be transmitted.
And S412, when the content information is consistent, respectively calculating a second time difference and a third time difference between the trigger time and the current time of the current service information and the service information to be sent.
S413, respectively comparing the second time difference and the third time difference with the valid duration of the identification key.
And S414, when the second time difference and the third time difference are both smaller than the effective time length, sending any one of the service information to the user terminal corresponding to the user identifier.
In this step, when both the second time difference and the third time difference are smaller than the valid duration, it indicates that both the current service information and the service information to be sent are valid, the identifier key may be deleted, and one of the identifiers is sent to the user terminal corresponding to the user identifier.
And S415, deleting the identifier key and intercepting the service information to be sent and the current service information when the second time difference and the third time difference are both greater than the effective time length.
In this step, when both the second time difference and the third time difference are greater than the effective time length, it indicates that both the current service information and the service information to be sent are invalid, deletes the identifier key, and intercepts the current service information and the service information to be sent.
And S416, intercepting the service information to be sent and sending the current service information to the user terminal corresponding to the user identifier when the third time difference is larger than the effective time length.
Here, when only the third time difference is greater than the valid duration, it indicates that the service information to be sent is invalid, and the current service information is valid, and sends the current service information to the user terminal corresponding to the user identifier.
S417, when the content information is not consistent, the service information to be sent is intercepted, and the current service information is sent to the user terminal corresponding to the user identification.
In this step, if the Md5 values are not consistent, it indicates that the previous service information to be sent has failed, and there is new service information, that is, the current service information is waiting to be sent, then the service information to be sent is intercepted and is not sent any more, and the current service information is directly called to a bottom layer short message service provider channel to be sent to the user terminal corresponding to the user identifier.
The service information service system sends the processed effective service information to a sending system, and the sending system calls an operator interface to send the effective service information. After receiving the service information, the user inputs the service information, and the service system performs verification operation on the service information. And deleting the identifier key while sending the effective service information to the user terminal.
The embodiment of the application is a method for realizing information processing based on the steps.
The information processing method provided in the embodiment of the application enables the service system to screen out one effective service information and send the effective service information to the user terminal if the user triggers the interface prompt for obtaining the service information for multiple times under the condition that service information sending is delayed or some service systems do not perform operation time range control when obtaining the service information, so that user experience is improved, and meanwhile, waste of service information sending resources is reduced. In addition, the method provided by the embodiment of the application also has a certain anti-brushing effect on the condition that the user maliciously brushes the service information. Meanwhile, the technology of taking the md5 value and using the Redis database and the like adopted in the method is low in time complexity, and the performance of the business information service system cannot be influenced.
Based on the same inventive concept, an embodiment of the present application further provides an information processing apparatus, where as shown in fig. 5, the apparatus includes:
a first receiving module 51, configured to receive multiple pieces of service information generated by a service system in a preset time period, where the service information carries a service identifier and a user identifier;
a first generating module 52, configured to generate, based on the service identifier and the user identifier, an identifier key carrying an effective duration corresponding to each piece of service information, where the effective duration of the identifier key is the effective duration of the corresponding service information;
the determining module 53 is configured to determine one of the service information with the same identifier key as the service information to be sent;
a sending module 54, configured to send the service information to be sent within the effective duration to the user terminal corresponding to the user identifier.
In this embodiment, the specific functions and interaction manners of the first receiving module 51, the first generating module 52, the determining module 53 and the sending module 54 can be referred to the description of the embodiment corresponding to fig. 1, and are not described herein again.
Optionally, the apparatus further comprises:
a second receiving module 55, configured to receive a request for sending service information;
the second generating module 56 is configured to generate service information carrying a service identifier and a user identifier corresponding to the verification service according to the request for sending the service information.
Optionally, the apparatus further comprises:
a recording module 57, configured to record the trigger time of each piece of service information and content information of the service information;
and the caching module 58 is configured to cache the service information carrying the trigger time and the corresponding content information and the corresponding identifier key in a Redis database.
Optionally, the determining module 53 is configured to:
and the method is used for determining one of the service information corresponding to the same identification key cached in the Redis database in a preset time period as the service information to be sent.
Optionally, the sending module 54 includes:
a first calculating unit, configured to calculate a first time difference between the trigger time corresponding to the service information to be sent and a current time;
the first comparison unit is used for comparing the first time difference with the effective duration of the identification key;
the first intercepting unit is used for deleting the identification key and intercepting the service information to be sent when the first time difference is greater than the effective duration;
and the first sending unit is used for sending the service information to be sent to the user terminal corresponding to the user identifier when the first time difference is smaller than the effective duration.
Optionally, the sending module 54 includes:
an obtaining unit, configured to obtain the content information and the trigger time of the received current service information that is the same as the identifier key of the service information to be sent;
a second comparing unit, configured to compare consistency between the content information of the current service information and the content information of the cached service information to be sent;
a second calculating unit, configured to calculate a second time difference between the trigger time of the current service information and the current time and a third time difference between the trigger time of the service information to be sent and the current time, respectively, when the content information of the current service information is consistent with the cached content information of the service information to be sent;
and a second sending unit, configured to intercept the service information to be sent when the content information of the current service information is inconsistent with the cached content information of the service information to be sent, and send the current service information to a user terminal corresponding to the user identifier.
Optionally, the sending module 54 further includes:
a third comparing unit, configured to compare the second time difference with the valid duration of the identifier key, and compare the third time difference with the valid duration of the identifier key;
the second intercepting unit is used for deleting the identification key and intercepting the service information to be sent and the current service information when the second time difference and the third time difference are both greater than the effective time length;
a third sending unit, configured to send any one of the short messages to the user terminal corresponding to the user identifier when both the second time difference and the third time difference are smaller than the effective duration;
and a fourth sending unit, configured to intercept the service information to be sent and send the current service information to a user terminal corresponding to a user identifier when the third time difference is greater than the effective time length.
As shown in fig. 6, another embodiment of the present application further provides a terminal device, which includes a processor 60, where the processor 60 is configured to execute the steps of the information processing method.
As can also be seen from fig. 6, the terminal device provided by the above embodiment further includes a non-transitory computer readable storage medium 61, the non-transitory computer readable storage medium 61 having stored thereon a computer program, which when executed by the processor 60, performs the steps of one of the above-described methods of information processing.
Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, a FLASH, and the like, and when a computer program on the storage medium is run, the information processing method can be executed, so that the screened effective service information is sent to the user terminal, and the user experience is improved.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (16)

1. A method of information processing, comprising:
receiving a plurality of pieces of service information generated by a service system in a preset time period, wherein the service information carries a service identifier and a user identifier;
generating an identification key which corresponds to each piece of service information and carries effective duration based on the service identification and the user identification, wherein the effective duration of the identification key is the effective duration of the corresponding service information;
determining one of the service information with the same identifier key as service information to be sent;
and sending the service information to be sent in the effective duration to a user terminal corresponding to the user identification.
2. The method of claim 1, wherein the step of receiving the plurality of pieces of service information generated by the service system within a preset time period is preceded by the method further comprising:
receiving a request for sending the service information;
and generating service information carrying a service identifier and a user identifier corresponding to the verification service according to the request for sending the service information.
3. The method according to claim 1, wherein between the step of generating an identifier key carrying an effective duration corresponding to each piece of service information and the step of determining one of the pieces of service information having the same identifier key as the service information to be transmitted, the method further comprises:
recording the triggering time of each piece of service information and the content information of the service information;
and caching the service information carrying the trigger time and the corresponding content information and the corresponding identification key in a Redis database.
4. The method according to claim 3, wherein the step of determining one of the service information with the same identifier key as the service information to be sent comprises:
and determining one piece of service information corresponding to the same identification key cached in the Redis database in a preset time period as service information to be sent.
5. The method according to claim 4, wherein the step of sending the service information to be sent within the validity duration to the user terminal corresponding to the user identifier comprises:
calculating a first time difference between the trigger time corresponding to the service information to be sent and the current time;
comparing the first time difference with the effective duration of the identification key;
when the first time difference is larger than the effective duration, deleting the identification key and intercepting the service information to be sent;
and when the first time difference is smaller than the effective duration, sending the service information to be sent to a user terminal corresponding to a user identifier.
6. The method according to claim 4, wherein the step of sending the service information to be sent in the valid duration to the user terminal corresponding to the user identifier further comprises:
acquiring the content information and the trigger time of the received current service information which is the same as the identifier key of the service information to be sent;
comparing the consistency of the content information of the current service information with the content information of the cached service information to be sent;
when the content information of the current service information is consistent with the cached content information of the service information to be sent, respectively calculating a second time difference between the trigger time of the current service information and the current time and a third time difference between the trigger time of the service information to be sent and the current time;
and intercepting the service information to be sent and sending the current service information to a user terminal corresponding to the user identifier when the content information of the current service information is inconsistent with the cached content information of the service information to be sent.
7. The method according to claim 6, wherein between the step of respectively calculating a second time difference between the trigger time of the current service information and the current time and a third time difference between the trigger time of the service information to be sent and the current time and the step when the content information of the current service information is inconsistent with the cached content information of the service information to be sent, further comprising:
respectively comparing the second time difference with the effective duration of the identification key, and comparing the third time difference with the effective duration of the identification key;
when the second time difference and the third time difference are both greater than the effective duration, deleting the identification key, and intercepting the service information to be sent and the current service information;
when the second time difference and the third time difference are both smaller than the effective time length, any one of the service information is sent to the user terminal corresponding to the user identifier;
and intercepting the service information to be sent and sending the current service information to a user terminal corresponding to a user identifier when only the third time difference is greater than the effective time length.
8. An information processing apparatus, comprising:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a plurality of pieces of service information generated by a service system in a preset time period, and the service information carries a service identifier and a user identifier;
a first generation module, configured to generate, based on the service identifier and the user identifier, an identifier key that carries an effective duration and corresponds to each piece of service information, where an effective duration of the identifier key is an effective duration of the corresponding service information;
the determining module is used for determining one of the service information with the same identifier key as the service information to be sent;
and the sending module is used for sending the service information to be sent in the effective duration to a user terminal corresponding to the user identifier.
9. The apparatus of claim 8, further comprising:
a second receiving module, configured to receive a request for sending the service information;
and the second generation module is used for generating the service information carrying the service identifier and the user identifier corresponding to the verification service according to the request for sending the service information.
10. The apparatus of claim 8, further comprising:
the recording module is used for recording the triggering time of each piece of service information and the content information of the service information;
and the cache module is used for caching the service information carrying the trigger time and the corresponding content information and the corresponding identification key in a Redis database.
11. The apparatus of claim 10, wherein the determining module is configured to:
and determining one piece of service information corresponding to the same identification key cached in the Redis database in a preset time period as service information to be sent.
12. The apparatus of claim 11, wherein the sending module comprises:
a first calculating unit, configured to calculate a first time difference between the trigger time corresponding to the service information to be sent and a current time;
the first comparison unit is used for comparing the first time difference with the effective duration of the identification key;
the first intercepting unit is used for deleting the identification key and intercepting the service information to be sent when the first time difference is greater than the effective duration;
and the first sending unit is used for sending the service information to be sent to the user terminal corresponding to the user identifier when the first time difference is smaller than the effective duration.
13. The apparatus of claim 11, wherein the sending module further comprises:
an obtaining unit, configured to obtain the content information and the trigger time of the received current service information that is the same as the identifier key of the service information to be sent;
a second comparing unit, configured to compare consistency between the content information of the current service information and the content information of the cached service information to be sent;
a second calculating unit, configured to calculate a second time difference between the trigger time of the current service information and the current time and a third time difference between the trigger time of the service information to be sent and the current time, respectively, when the content information of the current service information is consistent with the cached content information of the service information to be sent;
and a second sending unit, configured to intercept the service information to be sent when the content information of the current service information is inconsistent with the cached content information of the service information to be sent, and send the current service information to a user terminal corresponding to the user identifier.
14. The apparatus of claim 13, wherein the sending module further comprises:
a third comparing unit, configured to compare the second time difference with the valid duration of the identifier key, and compare the third time difference with the valid duration of the identifier key;
the second intercepting unit is used for deleting the identification key and intercepting the service information to be sent and the current service information when the second time difference and the third time difference are both greater than the effective time length;
a third sending unit, configured to send any one of the pieces of service information to the user terminal corresponding to the user identifier when both the second time difference and the third time difference are smaller than the effective time length;
and the fourth sending unit is used for intercepting the service information to be sent and sending the current service information to the user terminal corresponding to the user identifier when the third time difference is greater than the effective time length.
15. A non-transitory computer readable storage medium storing instructions which, when executed by a processor, cause the processor to perform the steps of the method of information processing according to any one of claims 1 to 7.
16. A terminal device, characterized by comprising a processor for executing the steps of the method of information processing according to any one of claims 1 to 7.
CN201910344210.5A 2019-04-26 2019-04-26 Information processing method, device and storage medium Active CN110087201B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910344210.5A CN110087201B (en) 2019-04-26 2019-04-26 Information processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910344210.5A CN110087201B (en) 2019-04-26 2019-04-26 Information processing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN110087201A CN110087201A (en) 2019-08-02
CN110087201B true CN110087201B (en) 2022-04-12

Family

ID=67417033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910344210.5A Active CN110087201B (en) 2019-04-26 2019-04-26 Information processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN110087201B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113886660A (en) * 2021-10-08 2022-01-04 武汉悦学帮网络技术有限公司 Information processing method and device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283884A (en) * 2014-10-13 2015-01-14 宁波公众信息产业有限公司 Verification code verification method
CN106170004B (en) * 2016-09-23 2020-11-20 北京小米移动软件有限公司 Method and device for processing verification code
CN106302139A (en) * 2016-11-15 2017-01-04 青岛海信移动通信技术股份有限公司 Message treatment method and device
CN106850608A (en) * 2017-01-23 2017-06-13 山东浪潮商用系统有限公司 A kind of short message verification code transmission times control method for frequency

Also Published As

Publication number Publication date
CN110087201A (en) 2019-08-02

Similar Documents

Publication Publication Date Title
JP7093393B2 (en) Service processing methods, equipment, and servers
US8839397B2 (en) End point context and trust level determination
JP5429912B2 (en) Authentication system, authentication server, service providing server, authentication method, and program
CN110888838B (en) Request processing method, device, equipment and storage medium based on object storage
CN109039987A (en) A kind of user account login method, device, electronic equipment and storage medium
CN103023919A (en) Two-dimensional code based login control method and two-dimensional code based login control system
WO2017064511A1 (en) Network identification as a service
CN104954330A (en) Method of accessing data resources, device and system
CN108933789B (en) Method for preventing personal information leakage and third-party application server
CN110798446B (en) Mail batch authorization method and device, computer equipment and storage medium
CN109547426B (en) Service response method and server
US20210203668A1 (en) Systems and methods for malicious client detection through property analysis
CN109726545B (en) Information display method, equipment, computer readable storage medium and device
CN112699034B (en) Virtual login user construction method, device, equipment and storage medium
CN105554136B (en) Backup Data restoring method, apparatus and system
CN115529154A (en) Login management method, login management device, electronic device and readable storage medium
US20220007189A1 (en) Systems and methods for personalized image indicator providing resource verification
CN110087201B (en) Information processing method, device and storage medium
CN112131535A (en) Integrated small program authorization method for multi-deployment environment
CN114500630A (en) Message pushing method, device, system, storage medium and electronic equipment
CN103559430A (en) Application account management method and device based on android system
CN116232754A (en) Login state maintaining method and device
CN108737350B (en) Information processing method and client
CN112351048B (en) Interface access control method, device, equipment and storage medium
CN114338060B (en) Authority verification method, device, system, equipment and storage medium

Legal Events

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