CN111726417B - Delay control method, device, server and storage medium - Google Patents

Delay control method, device, server and storage medium Download PDF

Info

Publication number
CN111726417B
CN111726417B CN202010614680.1A CN202010614680A CN111726417B CN 111726417 B CN111726417 B CN 111726417B CN 202010614680 A CN202010614680 A CN 202010614680A CN 111726417 B CN111726417 B CN 111726417B
Authority
CN
China
Prior art keywords
account
detection result
service
verified
delay
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
CN202010614680.1A
Other languages
Chinese (zh)
Other versions
CN111726417A (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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010614680.1A priority Critical patent/CN111726417B/en
Publication of CN111726417A publication Critical patent/CN111726417A/en
Application granted granted Critical
Publication of CN111726417B publication Critical patent/CN111726417B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/535Tracking the activity of the user
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

The disclosure relates to a delay control method, a delay control device, a server and a storage medium. The method comprises the following steps: receiving service requests sent by a plurality of service terminals through a service interface, wherein the service requests carry account identifications for initiating the service requests and delay time corresponding to the account identifications; monitoring the delay time through a pre-deployed delay judgment logic; and when the time elapsed since the service request is received is consistent with the delay time, acquiring the data to be verified corresponding to the account identifier. The method is used for receiving the service requests sent by a plurality of service servers by deploying a uniform service interface in advance, so that low-cost access to the plurality of service servers can be realized; delay time in service requests of a plurality of service terminals is uniformly monitored and managed by deploying delay judging logic in advance, corresponding services do not need to be deployed in a delay scene independently, and time cost, labor cost and operation and maintenance cost of a developer for processing a delay judging task can be reduced.

Description

Delay control method, delay control device, server and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a delay control method, apparatus, server, and storage medium.
Background
With the development of internet technology, various internet products come along, and users are the premise of survival and development of the internet products. In order to increase the user activity and the number of users of the internet product, various user reflow services are generated to attract more users to use the internet product. Illustratively, the internet product may be a live application, and the user may enter the live application to view the live by clicking on a password or link shared by other users.
In general, the reflowed users include both new users who have registered for the account for the first time and old users who have registered for the account. In order to retain the new user, the account of the reflow user is often detected, and when the account is detected to be a new account, corresponding rewards are issued to the new account and the corresponding sharing account. When an account check is performed, when an account check request arrives for the first time, it is difficult to accurately determine due to lack of necessary information related to the user. Therefore, a certain delay time needs to be configured, and detection is performed after the user generates more behaviors in the delay time. In the related art, for the delay judgment of the backflow service of different users, a set of delay judgment process needs to be deployed separately at the corresponding service server. When a new user backflow service is added, a corresponding delay judgment process needs to be redeployed, so that the problem of high development cost exists.
Disclosure of Invention
The present disclosure provides a delay control method, a delay control device, a server, and a storage medium, so as to at least solve the problem in the related art that when a new user reflow service is added, a corresponding delay determination process needs to be redeployed at a service server, which results in high development cost. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a delay control method, including:
receiving service requests sent by a plurality of service servers through service interfaces, wherein the service requests carry account identifications for initiating the service requests and delay time corresponding to the account identifications, and the delay time is the time required to wait from the time of receiving the service requests;
monitoring the delay time carried by the service request through a pre-deployed delay judgment logic;
and when the time elapsed since the service request is received is consistent with the delay time, acquiring to-be-verified data corresponding to the account identifier, wherein the to-be-verified data is account associated data generated in the delay time.
In one embodiment, after receiving service requests sent by a plurality of service servers through a service interface, the method further includes:
storing an account identifier for initiating a service request and delay time corresponding to the account identifier;
and sending a storage success notice to the service server.
In one embodiment, the data to be verified comprises client information and behavior data to be verified; when it is monitored that the time elapsed since the service request is received is consistent with the delay time, after acquiring the data to be verified corresponding to the account identifier, the method further comprises the following steps:
inquiring the account identification in a preset database, and acquiring a registration verification result of the account identification, wherein the registration verification result comprises first registration and registered;
detecting the account identification according to the registration verification result, the client information and the behavior data to be verified, and generating an account detection result corresponding to the account identification, wherein:
when the obtained registration verification result is the first registration and the pre-deployed data verification logic judges that the client information and the behavior data to be verified are data meeting the preset requirements, generating an account detection result of a new account;
and when the acquired account identifier is the registered account identifier, generating an account detection result of the old account.
In one embodiment, after detecting the account identifier according to the registration verification result, the client information, and the to-be-verified behavior data, and generating an account detection result corresponding to the account identifier, the method further includes:
and updating the stored account identification to be account verified.
In one embodiment, after detecting the account identifier according to the registration verification result, the client information, and the to-be-verified behavior data, and generating an account detection result corresponding to the account identifier, the method further includes:
and adding the account identification and the account detection result corresponding to the account identification into a message queue so that the message task acquires the account detection result corresponding to the account identification from the message queue and sends the account detection result corresponding to the account identification to the service end.
In one embodiment, after sending the account detection result corresponding to the account identifier to the service end, the method further includes:
and in the stored account identification, the account identification which sends the account detection result corresponding to the account identification to the service server is marked as the sent message.
In one embodiment, after detecting the account identifier according to the registration verification result, the client information, and the to-be-verified behavior data, and generating an account detection result corresponding to the account identifier, the method further includes:
acquiring account identifications which are not marked as messages and sent from the stored account identifications at intervals of preset time;
acquiring an account detection result corresponding to an account identifier which is not marked as a message and is sent;
and adding the obtained account detection result into a message queue so that the message task obtains the account detection result from the message queue and sends the obtained account detection result to a service server.
In one embodiment, the method further comprises:
and if the generation of the account detection result fails, waiting for a preset time period, and detecting the account identification again according to the registration verification result, the client information and the behavior data to be verified to generate a new account detection result.
According to a second aspect of the embodiments of the present disclosure, there is provided a delay control apparatus, including:
the receiving module is configured to execute the service requests sent by the service servers through the service interfaces, the service requests carry account identifiers for initiating the service requests and delay time corresponding to the account identifiers, and the delay time is the time needing to wait since the service requests are received;
the time monitoring module is configured to monitor the delay time carried by the service request through a pre-deployed delay judging logic;
and the to-be-verified data acquisition module is configured to acquire to-be-verified data corresponding to the account identifier when the time elapsed since the service request is received is monitored to be consistent with the delay time, wherein the to-be-verified data is account associated data generated in the delay time.
In one embodiment, the apparatus further comprises:
the storage module is configured to execute storage of the account identifier for initiating the service request and the delay time corresponding to the account identifier;
and the sending module is configured to execute sending of a storage success notification to the service server.
In one embodiment, the data to be verified comprises client information and behavior data to be verified; the device further comprises:
the query module is configured to execute account identification query in a preset database and acquire a registration verification result of the account identification, wherein the registration verification result comprises first registration and registered;
the account detection module is configured to perform detection on the account identifier according to the registration verification result, the client information and the to-be-verified behavior data, and generate an account detection result corresponding to the account identifier, wherein:
when the registration verification result is obtained as the first registration and the data of which the client information and the behavior to be verified meet the preset requirements are judged through the pre-deployed data verification logic, generating an account detection result of a new account;
and when the acquired account identifier is the registered account identifier, generating an account detection result of the old account.
In one embodiment, the apparatus further comprises:
an update module configured to perform an update of the stored account identification to account verified.
In one embodiment, the apparatus further comprises:
and the account detection result sending module is configured to add the account identifier and the account detection result corresponding to the account identifier into the message queue, so that the message task obtains the account detection result corresponding to the account identifier from the message queue and sends the account detection result corresponding to the account identifier to the service server.
In one embodiment, the apparatus further comprises:
and the marking module is configured to mark the account identification which is sent to the service server side and corresponds to the account identification in the stored account identification as the message is sent.
In one embodiment, the apparatus further comprises:
the acquisition module is configured to acquire the account identifier which is not marked as the sent message from the stored account identifiers at preset time intervals; acquiring an account detection result corresponding to an account identifier which is not marked as a message and is sent;
and the account detection result sending module is also configured to add the obtained account detection result into the message queue so that the message task obtains the account detection result from the message queue and sends the obtained account detection result to the service server.
In one embodiment, the account detection module is further configured to wait for a preset time period to detect the account identifier again according to the registration verification result, the client information, and the to-be-verified behavior data when the generation of the account detection result fails, so as to generate a new account detection result.
According to a third aspect of the embodiments of the present disclosure, there is provided a server, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of delay control in any embodiment of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium, wherein instructions that, when executed by a processor of a server, enable the server to perform the delay control method described in any one of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program stored in a readable storage medium, from which at least one processor of a device reads and executes the computer program, so that the device performs the latency control method described in any one of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
by deploying a uniform service interface in advance for receiving service requests sent by a plurality of service servers, low-cost access to the plurality of service servers can be realized; by deploying the delay judgment logic in advance, the delay time carried in the service requests sent by the service terminals is monitored and managed in a unified manner, and when a newly added user reflows a service, a developer does not need to deploy a corresponding set of service in a delay scene again, so that the time cost, the labor cost and the operation and maintenance cost for the developer to understand and process the delay judgment task can be reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is an application environment diagram illustrating a delay control method according to an exemplary embodiment.
FIG. 2 is a flow chart illustrating a method of delay control in accordance with an exemplary embodiment.
FIG. 3 is a flowchart illustrating one type of account detection step in accordance with an exemplary embodiment.
FIG. 4 is a flowchart illustrating a step of sending account detection results according to an exemplary embodiment.
FIG. 5 is a flow chart illustrating a method of delay control in accordance with an exemplary embodiment.
Fig. 6 is a block diagram illustrating a latency control apparatus according to an exemplary embodiment.
Fig. 7 is an internal block diagram of a server according to an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in other sequences than those illustrated or described herein. The implementations described in the exemplary embodiments below do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The delay control method provided by the present disclosure may be applied to the application environment shown in fig. 1. Wherein the terminal 110 interacts with the first server 120 through the network. The first server 120 interacts with the second server 130 over a network. The first server 120 is a server at least deployed with a plurality of service servers. The second server 130 is a server at least with a delay control server deployed. The terminal 110 enters the target application in response to the user's triggering operation on the shared information. The terminal 110 initiates an API (Application Programming Interface) request to the corresponding first server 120 according to the sharing information, so that the subsequent terminal 110 can receive the data returned by the first server 120. After receiving the API request, the first server 120 sends a service request to the second server 130 through a preset uniform service interface, where the service request carries an account identifier for initiating the service request and a delay time corresponding to the account identifier, and the delay time is a time that needs to be waited since the service request is received. The second server 130 receives the service requests sent by the plurality of first servers 120 through the service interface, and monitors the delay time carried by each service request through the pre-deployed delay judgment logic. And when the time elapsed since the service request is received is consistent with the delay time, acquiring to-be-verified data corresponding to the account identifier, and judging whether the account identifier is a new account or an old account according to the to-be-verified data. The data to be verified is account related data generated within the delay time. The terminal 110 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the first server 120 and the second server 130 may be implemented by independent servers or a server cluster formed by a plurality of servers.
Fig. 2 is a flowchart illustrating a delay control method according to an exemplary embodiment, where as shown in fig. 2, the delay control method is used in a second server 130, and at least a delay control server is deployed in the second server 130, and includes the following steps:
in step S210, service requests sent by a plurality of service servers are received through the service interface, where the service requests carry account identifiers for initiating the service requests and delay time corresponding to the account identifiers, and the delay time is the time that needs to be waited since the service requests are received.
The service interface is a shared boundary of a plurality of service servers and a delay control server, and is used for uniformly receiving service requests sent by the plurality of service servers. And the plurality of service terminals and the delay control service terminal carry out communication through the service interface. The service request may refer to a request to determine whether the account identifier is a new account or an old account. The account identifier is used for uniquely distinguishing the account, and the account identifier may be a user name and a user ID (Identity document).
Specifically, when the user receives the shared information from another terminal through the client, the shared information may be triggered. The sharing information may be a sharing code, a link, a password, etc. And the client responds to the triggering operation of the user on the shared information and sends an API request to the service server corresponding to the shared information so as to interact with the service server. The service server receives an API request from a terminal, and sends the service request to the delay control server through a preset service interface, wherein the service request carries an account identifier for initiating the service request and delay time corresponding to the account identifier, and the delay time is the time required to wait since the service request is received.
In step S220, the delay time carried by the service request is monitored by the pre-deployed delay determination logic.
The delay judging logic is related logic for judging whether the delay time arrives. The delay judgment logic is configured in advance and stored in the delay control server. Specifically, after receiving a service request sent by the service server, the delay control server monitors the delay time carried by each service request through the pre-deployed delay judgment logic, judges whether the time elapsed since the service request was received is consistent with the delay time carried in the service request, and if so, continues to step S230; otherwise, continuing to monitor.
In step S230, when it is monitored that the time elapsed since the service request is received is consistent with the delay time, to-be-verified data corresponding to the account identifier is acquired, where the to-be-verified data is account related data generated within the delay time.
The data to be verified is not limited to include client information (e.g., terminal device number), behavior data generated by the client within the delay time, and the like. Specifically, after the client initiates an API request to the service server, the service server obtains relevant data of the client in real time, and sends the obtained data to the delay control server. And when the delay control server monitors that the time elapsed since the service request is received is consistent with the delay time, acquiring the related data which is generated in the delay time and corresponds to the account identifier, and taking the acquired related data as the data to be verified. And then, the account identification can be detected according to the acquired data to be verified, and an account detection result corresponding to the account identification is obtained. The account detection result comprises a new account and an old account. The new account may refer to an account registered in the target application for the first time, and the old account may refer to an account registered before the login.
The delay control method is used for receiving and receiving the service requests sent by the plurality of service servers by deploying the uniform service interface in advance, and can realize low-cost access to the service requests of the plurality of service servers; by deploying the delay judgment logic in advance, the delay time carried in the service requests sent by the service terminals is monitored and managed in a unified manner, and when a newly added user reflows a service, a developer does not need to deploy a corresponding set of service in a delay scene again, so that the time cost, the labor cost and the operation and maintenance cost for the developer to understand and process the delay judgment task can be reduced.
In an exemplary embodiment, after receiving, by the service interface, the service requests sent by the multiple service servers in step S210, the method further includes: storing an account identifier for initiating a service request and delay time corresponding to the account identifier; and sending a storage success notice to the service server.
Specifically, after receiving service requests sent by a plurality of service servers, the delay control server stores account identifiers carried in the service requests and delay time corresponding to the account identifiers, and sends a successful storage notification to the service server initiating the service request after successful storage, so that the service server can timely learn the current data processing condition. Further, after receiving the storage success notification, the service server may also send the storage success notification to the corresponding client, so that the client can timely learn the current data processing condition.
In the embodiment, the account identifications carried in the service requests sent by the service servers and the delay time corresponding to the account identifications are uniformly stored, so that on one hand, the delay control server is convenient to uniformly manage the data; on the other hand, a data unified management mechanism is adopted, so that users such as a subsequent data analysis and monitoring alarm system and the like can directly call data, and the data use efficiency is improved.
In an exemplary embodiment, as shown in fig. 3, the data to be verified includes client information and behavior data to be verified; in step S230, after acquiring the to-be-verified data corresponding to the account identifier when it is monitored that the time elapsed since the service request is received is consistent with the delay time, the method further includes the following steps:
in step S310, the account identifier is queried in a preset database, and a registration verification result of the account identifier is obtained, where the registration verification result includes first registration and registered.
The preset database is a database in which registered account identifiers are stored. Specifically, in this embodiment, an account detection server is further deployed in the second server, and is configured to detect whether an account identifier carried in the service request is a new account or an old account. In this embodiment, the new account refers to an account registered for the first time, and the old account refers to an account registered before the login. And when the monitoring delay time of the delay control server is reached, sending the data to be verified corresponding to the acquired account identification to the account detection server, and triggering the account detection server to inquire whether the account identification exists in a preset database. If yes, generating a registered registration verification result, continuing to step S322, and generating an account detection result of the old account; if not, a registration verification result of the first registration is generated, and step S321 is continued to execute a data verification logic.
In step S320, the account identifier is detected according to the registration verification result, the client information, and the to-be-verified behavior data, and an account detection result corresponding to the account identifier is generated, where step S320 may specifically be implemented by the following steps.
In step S321, when the registration verification result is obtained as the first registration and the pre-deployed data verification logic determines that the client information and the behavior data to be verified are data meeting the preset requirement, generating an account detection result of the new account;
in step S322, when the acquiring account id is the registered account id, an account detection result of the old account is generated.
The data verification logic is related logic for judging whether the data meets a preset validity requirement. The legitimacy requirement may refer to that the client information is not in the blacklist, that the client information is not analog information, etc. Specifically, when the account detection server obtains the registration verification result of the account identifier as the first registration, whether the client information and the behavior data to be verified meet the preset legitimacy requirement is continuously judged through the pre-deployed data verification logic.
Illustratively, the client information is not limited to including the terminal device number. The behavior data to be verified includes a user behavior data set generated within the delay time, and each line in the user behavior data set represents a user behavior and may be composed of an account identifier, a behavior type, a timestamp, and the like. The account detection server side can search whether the acquired client side information exists in the blacklist database, and if the acquired client side information exists in the blacklist database, the client side information is determined to be data which does not meet the legality requirement; otherwise, the client information is determined to be the data meeting the legality requirement. In addition, the account detection server can also detect the data of the behavior to be verified. If the user behavior quantity in the behavior data to be verified is less than the preset quantity, judging that the client corresponding to the account identifier is a simulation client, and determining that the behavior data to be verified is data which does not meet the legitimacy requirement; otherwise, determining the behavior data to be verified as the data meeting the legality requirement.
Further, when the account detection server side obtains the registration verification result of the account identifier as the first registration and obtains the client side information and the behavior data to be verified as the data meeting the validity requirement, the account detection server side generates the account detection result of the new account. When the account detection server acquires the registration verification result of the account identifier as the first registration, but acquires at least one of the client information and the behavior data to be verified as the data which does not meet the validity requirement, the account identifier may be discarded, or the account detection result of which the account identifier does not meet the requirement is generated.
In the embodiment, whether the account identification is registered for the first time or not and whether the account identification meets the preset requirements or not are verified according to the account identification and the to-be-verified data corresponding to the account identification, so that the interference of the account identification which does not meet the requirements can be eliminated, the accuracy of account detection is improved, and the compliance of a user group is maintained.
In one exemplary embodiment, the delay control method further includes: and if the account detection result is failed to be generated, waiting for a preset time period, and detecting the account identification again according to the registration verification result, the client information and the behavior data to be verified to generate a new account detection result.
Specifically, if the account detection server detects the account identifier and does not obtain the account detection result corresponding to the account identifier, the account detection server may wait for a preset time period, and detect the account identifier again according to the registration verification result of the account identifier, the client information, and the to-be-verified behavior data, so as to generate a new account detection result. The specific process of detecting the account identifier may be described with reference to the corresponding embodiment in fig. 3, and is not specifically described herein. In the embodiment, the account detection server waits for the preset time period to detect the account identifier again when the generation of the account detection result fails, so that the automation degree of account detection can be improved, and the accuracy of account detection is improved.
In an exemplary embodiment, in step S320, after detecting the account identifier according to the registration verification result, the client information, and the to-be-verified behavior data, and generating an account detection result corresponding to the account identifier, the method further includes: and updating the stored account identification to be account verified.
Specifically, after the account detection server generates an account detection result corresponding to the account identifier, the account detection server sends the generated account detection result to the delay control server, and triggers the delay judgment server to update the stored account identifier to be the verified account. In this embodiment, after the delay control server is triggered to receive the account detection result corresponding to the account identifier, the corresponding stored account identifier is updated to be account verified, so that the consistency of data in the delay control server and the account detection server can be improved, and the error rate is reduced.
In an exemplary embodiment, in step S320, after detecting the account identifier according to the registration verification result, the client information, and the to-be-verified behavior data, and generating an account detection result corresponding to the account identifier, the method further includes: and adding the account identification and the account detection result corresponding to the account identification into a message queue, so that the message task acquires the account detection result corresponding to the account identification from the message queue and sends the account detection result corresponding to the account identification to a service server.
Wherein, the message queue is a container for storing messages in the transmission process of the messages. The main purpose of the message queue is to provide routing and guarantee delivery of the message; if the recipient is not available at the time the message is sent, the message queue will hold the message until it can be successfully delivered. The Message Queue may adopt Active Message Queue (Active Message Queue, an open source Message middleware), rabbitMQ (rabbitmessage Queue, an open source Message middleware implementing an advanced Message Queue protocol), and Kafka (a high-throughput distributed publish-subscribe Message system), which are not limited herein. A message task refers to processing logic that takes a message from a message queue for relevant processing.
In the implementation, a unified message notification mechanism is adopted to notify the service server of the account detection result corresponding to the account identifier. The unified message notification mechanism is implemented by using a message queue. Specifically, after receiving the account detection result corresponding to the account identifier, the delay control server adds the account identifier and the account detection result corresponding to the account identifier to the message queue. And the message task acquires the account detection result corresponding to the account identification from the message queue and sends the account detection result corresponding to the account identification to the corresponding service end. Further, after receiving the account detection result corresponding to the account identifier, the service server may update the service related data corresponding to the account identifier according to the account detection result. For example, if the account detection result corresponding to the account identifier is a new account, the service server may respectively issue corresponding rewards to the account and the corresponding sharing account; if the account detection result corresponding to the account identifier is the old account, the service server can cancel issuing corresponding rewards to the account and the corresponding sharing account.
In this embodiment, on one hand, the asynchronous processing is performed on the account detection result corresponding to the account identifier by using the message queue, so that the concurrent transactions at the peak period can be smoothed, the time required by the server for response is reduced, and the efficiency of notifying the account detection result is improved. On the other hand, the system coupling can be reduced by adopting the message queue, the influence of the service on the system is reduced, and the expandability of the system is improved.
In an exemplary embodiment, after sending the account detection result corresponding to the account identifier to the service end, the method further includes: and marking the account identification which sends the account detection result corresponding to the account identification to the service server side in the stored account identification as the sent message.
Specifically, the message task acquires an account detection result corresponding to the account identifier from the message queue, and sends the account detection result corresponding to the account identifier to the corresponding service end, so that the service end can update service related data corresponding to the account identifier. And the message task marks the account identifier which has sent the account detection result to the service server side from the account identifiers stored in the delay control server side as the message is sent. In the embodiment, the notification task of the account detection result is managed by adopting a uniform message notification mechanism, and the account detection result is consumed to update the mark of the stored account identifier, so that the data in the server can keep consistency, and the account detection result corresponding to the account identifier can be conveniently monitored and sent to the service end.
In an exemplary embodiment, as shown in fig. 4, after detecting an account identifier according to a registration verification result, client information, and behavior data to be verified and generating an account detection result corresponding to the account identifier in step S320, the method further includes the following steps:
in step S410, the account id that is not marked as the message sent is obtained from the stored account ids at preset time intervals.
In step S420, an account detection result corresponding to an account id that is not marked as message sent is obtained.
In step S430, the obtained account detection result is added to the message queue, so that the message task obtains the account detection result from the message queue, and sends the obtained account detection result to the service end.
Specifically, after the delay control server receives the account detection result corresponding to the account identifier from the account detection server, the delay control server acquires, at intervals of a preset time period, the account identifier that is not marked as the message sent and the account detection result corresponding to the account identifier that is not marked as the message sent from the stored account identifier. And the delay control server adds the acquired account identification and the account detection result corresponding to the account identification into the message queue again so that the message task acquires the account detection result corresponding to the account identification from the message queue again and sends the acquired account detection result corresponding to the account identification to the service server corresponding to the account identification. Further, after receiving an account detection result corresponding to the account identifier retransmitted by the message task, the service end can perform idempotent processing on message consumption. Idempotent processing may be guaranteed by account identification. I.e. for the same account identity the same service is considered. Using this unique account identification to determine that the processing logic and execution effects of the same account identification are consistent multiple times later. Exemplarily, if an account detection result corresponding to the account identifier sent by the message task is received, whether service related data corresponding to the account identifier is updated or not may be firstly queried; if the query is updated, returning an update success notification; and if the query is not updated, performing a service-related data updating process, and returning an updating success notification to the message task.
In this embodiment, by obtaining the account identifier that is not marked as the message sent within the preset time period and sending the account detection result to the service end again through the unified message notification mechanism, it can be ensured that all account detections can be sent, and thus the service end can update the service-related data in time.
Fig. 5 is a flowchart illustrating a delay control method according to an exemplary embodiment, where the delay control method is applied to the second server 130 in fig. 1, and at least a delay control server and an account detection server are deployed in the second server 130. The delay control server is at least provided with a data transmission task, a storage task and a delay judgment task. As shown in fig. 5, the method comprises the following steps:
in step S501, the client sends an API request to the corresponding service server in response to a trigger operation of the user on the shared information.
In step S502, the service server responds to the received API request, and sends a service request to the delay control server. The delay control server side can receive service requests sent by a plurality of service server sides through the service interface, the service requests carry account identifications for initiating the service requests and delay time corresponding to the account identifications, and the delay time is the time needing to wait since the service requests are received.
In step S503, the delay control server stores the account identifier for initiating the service request and the delay time corresponding to the account identifier.
In step S504, the storage task generates a storage success notification, and sends the storage success notification to the data transmission task.
In step S505, the delay control server returns the storage success notification to the corresponding service server.
In step S506, the service end returns a storage success notification to the client.
In step S507, the delay determination task monitors the delay time carried by the service request.
In step S508, when it is monitored that the time elapsed since the service request is received is consistent with the delay time, the delay judging task requests data to be verified corresponding to the account identifier, where the data to be verified is account-related data generated within the delay time. The data to be verified is not limited to include client information and behavior data to be verified.
In step S509, the delay determination task acquires data to be verified.
Specifically, the delay determination task may be implemented by a pre-deployed delay determination logic. After the client initiates the API request, the service server can acquire the client information and acquire the user behavior data generated by the client in real time. And the service server sends the acquired client information and the user behavior data to the delay control server, and the delay control server stores the acquired client information and the user behavior data. And when the pre-deployed delay judgment logic monitors that the delay time is reached, acquiring client information and user behavior data in the delay time as to-be-verified data.
In step S510, the delay control server sends the data to be verified to the account detection server, and requests the account detection server to detect the account identifier.
In step S511, the account detection server detects the account identifier according to the data to be verified, and obtains an account detection result corresponding to the account identifier. The account detection result comprises a new account and an old account. The detection of the account identifier may be described with reference to a corresponding embodiment in fig. 3, which is not specifically described herein.
In step S512, the account detection server returns the account detection result corresponding to the account identifier to the delay control server.
In step S513, if the account detection server fails to generate the account detection result, the account detection server waits for a preset time period to detect the account identifier again according to the data to be verified, so as to generate a new account detection result.
In step S514, the delay determination task updates the stored account id to account verified.
In step S515, the delay determination task receives the update success notification.
In step S516, the delay judging task adds the account identifier and the account detection result corresponding to the account identifier into the message queue in response to the update success notification.
In step S517, the message task pulls the account detection result corresponding to the account identifier from the message queue.
In step S518, the message task obtains an account detection result corresponding to the account identifier.
In step S519, the message task sends the account detection result corresponding to the account identifier to the service end.
In step S520, the service server returns a notification that the service-related data is successfully updated to the message task.
In step S521, the message task marks, of the stored account identifiers, the account identifier that sent the account detection result corresponding to the account identifier to the service server as that the message was sent.
In step S522, the message task acquires a flag success notification.
In step S523, the delay judging task requests to acquire an account identifier that is not marked as the message sent from the stored account identifiers at every preset time interval.
In step S524, the delay determination task obtains an account detection result corresponding to the account identifier that is not marked as the message sent.
In step S525, the obtained account detection result is added to the message queue, so that the message task obtains the account detection result from the message queue, and sends the obtained account detection result to the service end.
It should be understood that although the various steps in the flow charts of fig. 1-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
Fig. 6 is a block diagram illustrating a latency control apparatus 600 according to an exemplary embodiment. Referring to fig. 6, the delay control apparatus 600 includes a receiving module 601, a time monitoring module 602, and a to-be-verified data obtaining module 603.
The receiving module 601 is configured to execute receiving, through a service interface, service requests sent by a plurality of service servers, where the service requests carry account identifiers for initiating the service requests and delay time corresponding to the account identifiers, where the delay time is time required to wait since the service requests are received;
a time monitoring module 602 configured to perform monitoring of delay time carried by the service request through a pre-deployed delay judgment logic;
the to-be-verified data obtaining module 603 is configured to obtain to-be-verified data corresponding to the account identifier when it is monitored that the time elapsed since the service request is received is consistent with the delay time, where the to-be-verified data is account related data generated within the delay time.
In an exemplary embodiment, the delay control apparatus 600 further includes:
the storage module is configured to execute storage of the account identifier for initiating the service request and the delay time corresponding to the account identifier;
and the sending module is configured to execute sending of a storage success notification to the service server.
In one exemplary embodiment, the data to be verified comprises client information and behavior data to be verified; the delay control device 600 further includes:
the query module is configured to execute account identification query in a preset database and acquire a registration verification result of the account identification, wherein the registration verification result comprises first registration and registered;
the account detection module is configured to perform detection on the account identifier according to the registration verification result, the client information and the to-be-verified behavior data, and generate an account detection result corresponding to the account identifier, wherein:
when the registration verification result is obtained as the first registration and the data of which the client information and the behavior to be verified meet the preset requirements are judged through the pre-deployed data verification logic, generating an account detection result of a new account;
and when the acquired account identifier is the registered account identifier, generating an account detection result of the old account.
In an exemplary embodiment, the delay control apparatus 600 further includes:
an update module configured to perform an update of the stored account identification to account verified.
In an exemplary embodiment, the delay control apparatus 600 further includes:
and the account detection result sending module is configured to add the account identifier and the account detection result corresponding to the account identifier into the message queue, so that the message task obtains the account detection result corresponding to the account identifier from the message queue and sends the account detection result corresponding to the account identifier to the service server.
In an exemplary embodiment, the delay control apparatus 600 further includes:
and the marking module is configured to mark the account identification which is sent to the service server side and corresponds to the account identification in the stored account identification as the message is sent.
In an exemplary embodiment, the delay control apparatus 600 further includes:
the acquisition module is configured to acquire the account identifier which is not marked as the sent message from the stored account identifiers at preset time intervals; acquiring an account detection result corresponding to an account identifier which is not marked as a message sent;
and the account detection result sending module is also configured to add the obtained account detection result into the message queue so that the message task obtains the account detection result from the message queue and sends the obtained account detection result to the service server.
In an exemplary embodiment, the account detection module is further configured to wait for a preset time period to detect the account identifier again according to the registration verification result, the client information, and the to-be-verified behavior data when the generation of the account detection result fails, so as to generate a new account detection result.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 7 is a block diagram illustrating an apparatus 700 for delay control according to an example embodiment. For example, device 700 may be a server. Referring to fig. 7, device 700 includes a processing component 720 that further includes one or more processors, and memory resources, represented by memory 722, for storing instructions, such as applications, that are executable by processing component 720. The application programs stored in memory 722 may include one or more modules that each correspond to a set of instructions. Further, the processing component 720 is configured to execute instructions to perform the method of latency control described above.
The device 700 may also include a power component 724 configured to perform power management for the device 700, a wired or wireless network interface 726 configured to connect the device 700 to a network, and an input/output (I/O) interface 728. The device 700 may operate based on an operating system stored in the memory 722, such as Windows Server, mac OS X, unix, linux, freeBSD, or the like.
In an exemplary embodiment, a storage medium comprising instructions, such as memory 722 comprising instructions, executable by a processor of device 700 to perform the above-described method is also provided. The storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (18)

1. A delay control method, comprising:
receiving service requests sent by a plurality of service servers through service interfaces, wherein the service requests carry account identifications for initiating the service requests and delay time corresponding to the account identifications, and the delay time is the time needing waiting since the service requests are received;
monitoring the delay time carried by the service request through a pre-deployed delay judgment logic;
and when the time elapsed since the service request is received is consistent with the delay time, acquiring to-be-verified data corresponding to the account identifier, wherein the to-be-verified data is account associated data generated in the delay time.
2. The delay control method according to claim 1, wherein after receiving the service requests from the plurality of service servers through the service interface, the method further comprises:
storing an account identifier for initiating the service request and delay time corresponding to the account identifier;
and sending a storage success notification to the service server.
3. The delay control method according to claim 2, wherein the data to be verified includes client information and behavior data to be verified; when it is monitored that the time elapsed since the service request is received is consistent with the delay time, after the data to be verified corresponding to the account identifier is acquired, the method further includes:
inquiring the account identification in a preset database, and acquiring a registration verification result of the account identification, wherein the registration verification result comprises first registration and registered;
detecting the account identification according to the registration verification result, the client information and the to-be-verified behavior data to generate an account detection result corresponding to the account identification, wherein:
when the registration verification result is obtained and is registered for the first time, and the client information and the behavior data to be verified are judged to be data meeting the preset requirements through the pre-deployed data verification logic, generating an account detection result of a new account;
and when the obtained account identification is the registered account identification, generating an account detection result of the old account.
4. The delay control method according to claim 3, wherein after the detecting the account identifier according to the registration verification result, the client information, and the to-be-verified behavior data and generating an account detection result corresponding to the account identifier, the method further comprises:
and updating the stored account identification to be account verified.
5. The delay control method according to claim 3, wherein after the detecting the account identifier according to the registration verification result, the client information, and the to-be-verified behavior data and generating an account detection result corresponding to the account identifier, the method further comprises:
adding the account identification and the account detection result corresponding to the account identification into a message queue, so that the message task obtains the account detection result corresponding to the account identification from the message queue, and sending the account detection result corresponding to the account identification to the service server.
6. The delay control method according to claim 5, wherein after the sending the account detection result corresponding to the account identifier to the service end, the method further comprises:
and marking the account identification which is stored in the account identification and sends the account detection result corresponding to the account identification to the service server as a message sent.
7. The delay control method according to claim 6, wherein after the detecting the account identifier according to the registration verification result, the client information, and the to-be-verified behavior data and generating an account detection result corresponding to the account identifier, the method further comprises:
acquiring account identifications which are not marked as messages and sent from the stored account identifications at intervals of preset time;
acquiring an account detection result corresponding to the account identifier which is not marked as the sent message;
adding the obtained account detection result into the message queue so that the message task obtains the account detection result from the message queue and sends the obtained account detection result to the service server.
8. The delay control method according to any one of claims 3 to 7, characterized by further comprising:
and if the generation of the account detection result fails, waiting for a preset time period to detect the account identification again according to the registration verification result, the client information and the behavior data to be verified, and generating a new account detection result.
9. A delay control apparatus, comprising:
the receiving module is configured to execute the receiving of service requests sent by a plurality of service servers through service interfaces, wherein the service requests carry account identifiers for initiating the service requests and delay time corresponding to the account identifiers, and the delay time is the time required to wait since the service requests are received;
the time monitoring module is configured to monitor the delay time carried by the service request through a pre-deployed delay judgment logic;
and the to-be-verified data acquisition module is configured to acquire to-be-verified data corresponding to the account identifier when the time elapsed since the service request is received is monitored to be consistent with the delay time, wherein the to-be-verified data is account associated data generated in the delay time.
10. The latency control apparatus of claim 9, further comprising:
the storage module is configured to store the account identifier for initiating the service request and the delay time corresponding to the account identifier;
and the sending module is configured to execute sending of a storage success notification to the service server.
11. The latency control device of claim 10, wherein the data to be verified comprises client information and behavior data to be verified; the device further comprises:
the inquiry module is configured to execute inquiry of the account identifier in a preset database and acquire a registration verification result of the account identifier, wherein the registration verification result comprises first registration and registered;
an account detection module configured to perform detection on the account identifier according to the registration verification result, the client information, and the to-be-verified behavior data, and generate an account detection result corresponding to the account identifier, where:
when the registration verification result is obtained and is the first registration, and the client information and the data of which the behavior to be verified meets the preset requirements are judged through the pre-deployed data verification logic, generating an account detection result of a new account;
and when the obtained account identification is the registered account identification, generating an account detection result of the old account.
12. The latency control apparatus of claim 11, further comprising:
an update module configured to perform an update of the stored account identification to account verified.
13. The latency control apparatus of claim 11, further comprising:
and the account detection result sending module is configured to add the account identifier and the account detection result corresponding to the account identifier into a message queue, so that the message task obtains the account detection result corresponding to the account identifier from the message queue and sends the account detection result corresponding to the account identifier to the service server.
14. The delay control device of claim 13, further comprising:
and the marking module is configured to mark the account identifier which is in the stored account identifier and sends the account detection result corresponding to the account identifier to the service server as the message is sent.
15. The delay control apparatus of claim 14, further comprising:
the acquisition module is configured to acquire the account identifier which is not marked as the sent message from the stored account identifiers at preset time intervals; acquiring an account detection result corresponding to the account identifier which is not marked as the sent message;
the account detection result sending module is further configured to add the obtained account detection result into the message queue, so that the message task obtains the account detection result from the message queue, and sends the obtained account detection result to the service server.
16. The latency control device according to any one of claims 11 to 15, wherein the account detection module is further configured to wait a preset time period to detect the account identifier again according to the registration verification result, the client information, and the to-be-verified behavior data when the generation of the account detection result fails, so as to generate a new account detection result.
17. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the latency control method of any one of claims 1 to 8.
18. A storage medium, wherein instructions in the storage medium, when executed by a processor of a server, enable the server to perform the latency control method of any one of claims 1 to 8.
CN202010614680.1A 2020-06-30 2020-06-30 Delay control method, device, server and storage medium Active CN111726417B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010614680.1A CN111726417B (en) 2020-06-30 2020-06-30 Delay control method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010614680.1A CN111726417B (en) 2020-06-30 2020-06-30 Delay control method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN111726417A CN111726417A (en) 2020-09-29
CN111726417B true CN111726417B (en) 2023-03-24

Family

ID=72570351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010614680.1A Active CN111726417B (en) 2020-06-30 2020-06-30 Delay control method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111726417B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114629883B (en) * 2022-03-01 2023-12-29 北京奇艺世纪科技有限公司 Service request processing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009164748A (en) * 2007-12-28 2009-07-23 Kddi Corp Delay access control method and system
CN104618374A (en) * 2015-02-03 2015-05-13 深圳元景车联科技有限公司 Registration method
CN107767509A (en) * 2017-10-16 2018-03-06 深圳市叮咚互联科技有限公司 Authorization method, server, authoring system and storage medium
CN110990699A (en) * 2019-11-29 2020-04-10 广州市百果园信息技术有限公司 Information pushing system, method, device, equipment and storage medium
CN111158793A (en) * 2020-01-02 2020-05-15 广州虎牙科技有限公司 Application page skipping method and device, electronic equipment and readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060259760A1 (en) * 2005-05-10 2006-11-16 Utstarcom, Inc. Method and apparatus to support communication services using delayed authentication

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009164748A (en) * 2007-12-28 2009-07-23 Kddi Corp Delay access control method and system
CN104618374A (en) * 2015-02-03 2015-05-13 深圳元景车联科技有限公司 Registration method
CN107767509A (en) * 2017-10-16 2018-03-06 深圳市叮咚互联科技有限公司 Authorization method, server, authoring system and storage medium
CN110990699A (en) * 2019-11-29 2020-04-10 广州市百果园信息技术有限公司 Information pushing system, method, device, equipment and storage medium
CN111158793A (en) * 2020-01-02 2020-05-15 广州虎牙科技有限公司 Application page skipping method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN111726417A (en) 2020-09-29

Similar Documents

Publication Publication Date Title
CN102118263B (en) Method and system for distribution of configuration information
CN107689988B (en) Message pushing method and device, electronic equipment and terminal equipment
CN105933355B (en) A kind of internet-of-things terminal management method, Internet of Things server and network server
CN115004673B (en) Message pushing method, device, electronic equipment and computer readable medium
CN106993043B (en) Data communication system and method based on agency
CN104601702B (en) Cluster remote procedure calling (PRC) method and system
CN114024972B (en) Long connection communication method, system, device, equipment and storage medium
CN111159233B (en) Distributed caching method, system, computer equipment and storage medium
US20170279688A1 (en) Method, device and system for providing device application software management service in internet of things
CN108880972B (en) Information processing method, server and terminal
CN108540505B (en) Content updating method and device
CN112650606A (en) Message processing method, device and system, electronic equipment and storage medium
CN114338063B (en) Message queue system, service processing method and computer readable storage medium
CN105164989A (en) Reducing number of server-client sessions
CN111726417B (en) Delay control method, device, server and storage medium
US10764724B2 (en) Method and apparatus for implementing member resource processing
CN113196721B (en) Method and device for discovering Internet of things equipment and terminal equipment
CN110661851A (en) Data exchange method and device
CN110839061B (en) Data distribution method, device and storage medium
CN105577743A (en) Apparatus and method for managing devices
CN113256240B (en) Message processing method and device and server
CN105323270B (en) Network information push method and system
CN113542424B (en) Data processing method, device, equipment and readable storage medium
CN115334155A (en) Message queue agent method and device
CN104462235A (en) Internet of Things general event service mechanism based on Restful Web Service

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