CN112153158B - Information processing method and device - Google Patents

Information processing method and device Download PDF

Info

Publication number
CN112153158B
CN112153158B CN202011052928.6A CN202011052928A CN112153158B CN 112153158 B CN112153158 B CN 112153158B CN 202011052928 A CN202011052928 A CN 202011052928A CN 112153158 B CN112153158 B CN 112153158B
Authority
CN
China
Prior art keywords
access request
access
target
requests
verification information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011052928.6A
Other languages
Chinese (zh)
Other versions
CN112153158A (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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202011052928.6A priority Critical patent/CN112153158B/en
Publication of CN112153158A publication Critical patent/CN112153158A/en
Application granted granted Critical
Publication of CN112153158B publication Critical patent/CN112153158B/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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • Marketing (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides an information processing method and device, which are used for receiving at least one first access request and acquiring verification information corresponding to each first access request; determining at least one legal second access request from the at least one first access request based on the verification information, and distributing the at least one second access request to a corresponding server based on a load balancing policy; distributing tokens for the second access request based on a preset rule, and storing the second access request distributed with the tokens into message middleware; and extracting a preset number of third access requests from the message middleware each time, executing the third access requests, and receiving access data returned by the server corresponding to the third access requests until no access request exists in the message middleware. In the scheme, the access requests in the message middleware are processed in batches, and a large number of access requests do not need to be processed at one time, so that the aim of relieving the pressure of a bank system is fulfilled.

Description

Information processing method and device
Technical Field
The present invention relates to the field of internet technologies, and in particular, to an information processing method and apparatus.
Background
With the rapid development of internet technology, more and more merchants open shops on the internet by using the internet technology; in order to promote the development of online stores, more and more merchants have performed shopping activities in online stores, such as twenty-one, twenty-two, and the like. Every time such online shopping activities are carried out, the bank system receives a large number of transactions, and the transactions of the whole bank system are broken down.
In the prior art, when small online shopping activities are carried out, a nickix load strategy or an F5 load strategy is adopted for carrying out load balancing on received transactions, or buffering is carried out in message queue middleware, so that the pressure of a bank system can be relieved to a certain extent. However, when a large online shopping campaign, for example, a full-network type shopping campaign such as twenty-one, twenty-two, etc., is performed, the transaction of the whole banking system still goes down.
Disclosure of Invention
In view of this, the present invention provides an information processing method and apparatus, so as to solve the problem in the prior art that a transaction of a bank system is broken down when the bank system receives a large number of access requests.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
the first aspect of the present invention discloses an information processing method, including:
receiving at least one first access request, and acquiring verification information corresponding to each first access request;
determining at least one legal second access request from the at least one first access request based on the verification information, and distributing the at least one second access request to a corresponding server based on a load balancing policy;
distributing a token for the second access request based on a preset rule, and storing the second access request distributed with the token into message middleware;
and extracting a preset number of third access requests from the message middleware each time, executing the third access requests, and receiving access data returned by the server corresponding to the third access requests until no access request exists in the message middleware.
Optionally, the determining a valid second access request based on the verification information, where the first access request carries an IP address, includes:
acquiring an IP address carried by the first access request;
acquiring target verification information based on the IP address;
judging whether the target verification information is consistent with the verification information;
and if the target verification information is consistent with the verification information, determining that the first access request is a legal second access request.
Optionally, before distributing the at least one second access request to the corresponding server based on the load balancing policy, the method further includes:
judging whether a second access request with the same IP address exists in the at least one second access request or not;
and if so, intercepting the second access request with the same IP address.
Optionally, before the executing the third access request and receiving the access data returned by the server corresponding to the third access request, the method further includes:
judging whether the access data of the third access request exists in a local cache or not;
if the access data of the third access request exists in the local cache, acquiring the access data of the third access request from the local cache;
the executing the third access request and receiving access data returned by the server corresponding to the third access request includes:
and if the access data of the third access request does not exist in the local cache, executing the third access request, and receiving the access data returned by the server corresponding to the third access request.
Optionally, the executing the third access request and receiving access data returned by the server corresponding to the third access request include:
judging whether a target third access request exists in the preset number of third access requests, wherein the target third access request is a third access request with the same access data;
if the target third access request exists, executing the target third access request, receiving access data returned by the server corresponding to the target third access request, and storing the access data of the target third access request into a local cache;
and if the third access request does not exist, executing the third access request, and receiving access data returned by the server corresponding to the third access request.
A second aspect of the present invention discloses an information processing apparatus, the apparatus comprising:
the first receiving unit is used for receiving at least one first access request and acquiring verification information corresponding to each first access request;
a first determining unit, configured to determine at least one valid second access request from the at least one first access request based on the verification information, and distribute the at least one second access request to a corresponding server based on a load balancing policy;
the distribution unit is used for distributing tokens for the second access requests based on a preset rule and storing the second access requests distributed with the tokens into message middleware;
and the second receiving unit is used for extracting a preset number of third access requests from the message middleware each time, executing the third access requests and receiving access data returned by the server corresponding to the third access requests until no access request exists in the message middleware.
Optionally, the first access request carries an IP address, and the first receiving unit includes:
an IP address obtaining unit, configured to obtain an IP address carried by the first access request;
a target authentication information acquisition unit configured to acquire target authentication information based on the IP address;
and the second determining unit is used for determining that the first access request is a legal second access request if the target verification information is consistent with the verification information.
Optionally, the apparatus further comprises:
a first judging unit, configured to judge whether a second access request with the same IP address exists in the at least one access request;
and the intercepting unit is used for intercepting the second access request with the same IP address if the second access request exists.
Optionally, the apparatus further comprises:
the second judging unit is used for judging whether the access data of the third access request exists in the local cache or not;
a third obtaining unit, configured to obtain, if the access data of the third access request exists in the local cache, the access data of the third access request from the local cache;
the second receiving unit is further configured to execute the third access request and receive access data returned by the server corresponding to the third access request if the local cache does not have the access data of the third access request.
Optionally, the second receiving unit includes:
a third judging unit, configured to judge whether a target third access request exists in the preset number of third access riders, where the target third access is a third access request with the same access data;
a third receiving unit, configured to execute the target third access request if the third access request exists, receive access data returned by the server corresponding to the target third access request, and store the access data of the target third access request in a local cache;
and the fourth receiving unit is used for executing the third access request and receiving the access data returned by the server corresponding to the third access request if the third access request does not exist.
The invention provides an information processing method and device, after at least one first access request is received, the verification information of each first access request is obtained, at least one legal second access request is determined from a plurality of received first access requests according to the obtained verification information, the access requests sent by a robot can be eliminated, and the pressure of a bank system is relieved to a certain extent; distributing the determined second access request to a corresponding server based on a load balancing strategy, distributing a token for the second access request based on a preset rule, storing the second access request distributed with the token into a message middleware, extracting a preset number of third access requests from the message middleware each time, executing the third access request, and receiving access data returned by the server corresponding to the third access request until no access request exists in the message middleware. In the embodiment of the invention, the access requests in the message middleware are processed in batches, and a large number of access requests do not need to be processed at one time, so that the aim of relieving the pressure of a bank system is fulfilled.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of an information processing method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for determining at least one valid second access request from at least one first access request based on authentication information and distributing the at least one second access request to a corresponding server based on a load balancing policy according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating another information processing method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.
Referring to fig. 1, a schematic flow chart of an information processing method according to an embodiment of the present invention is shown, where the information processing method specifically includes the following steps:
s101: and receiving at least one first access request, and acquiring the verification information corresponding to each first access request.
In the specific execution of S101, the received access request is referred to as a first access request.
In the specific process of performing S101, the verification information corresponding to the first access request may be a verification code, for example, the verification code corresponding to the first access request may be 0417. Regarding the specific content of the verification information corresponding to the first access request, the inventor may set the verification information according to his own needs, and the embodiment of the present application is not limited thereto.
S102: and determining at least one legal second access request from the at least one first access request based on the verification information, and distributing the at least one second access request to a corresponding server based on a load balancing strategy.
In the specific execution process of S102, after the verification information corresponding to each first access request is acquired, a legal first access request may be determined from the received at least one first access request according to the acquired verification information, and for convenience of distinguishing, the legal first access request is referred to as a second access request, so that the determined second access request is distributed to the corresponding server according to a preset load balancing policy.
S103: and distributing a token for the second access request based on a preset rule, and storing the second access request distributed with the token into the message middleware.
In the specific process of executing S103, the preset rule is preset, and the preset rule may be a token bucket algorithm. After at least one second access request is distributed to the corresponding server based on the load balancing strategy, the number of tokens which can be distributed can be determined according to a token bucket algorithm, so that the tokens are distributed to the second access request according to the determined tokens, and the second access request distributed with the tokens is stored in message middleware.
S104: and extracting a preset number of third access requests from the message middleware each time, executing the third access requests, and receiving access data returned by the server corresponding to the third access requests until no access request exists in the message middleware.
In the specific execution process of S104, after the second access request to which the token is allocated is stored in the message middleware, extracting a preset number of third access requests from the message middleware each time, and determining whether a third access request with the same access data exists in the extracted preset number of third access requests (for convenience of distinguishing, the third access request with the same access data exists is referred to as a target third access request), if a target third access request exists in the preset number of third access requests, executing the target access request, receiving access data returned by a server corresponding to the target third access request, and storing the access data of the target third access request in a local cache; and if the target third access request does not exist in the preset number of third access requests, executing the third access request, and receiving access data returned by the server corresponding to the third access request.
For example, the preset number is 10, 10 third access requests are extracted from the message middleware, and it is determined whether the third access requests have the same access data in the 10 third access requests; if the 10 third access requests do not have the third access request with the same access data, the 10 third access requests are executed respectively, and the access data returned by the server corresponding to each of the 10 third access requests are received.
If a third access request (3 target third access requests) with 3 identical access data exists in the 10 third access requests, any one of the 3 target third access requests can be executed, access data returned by the server corresponding to the target access request is received, and the received access data of the target third access request is stored in the local cache, so that the access data of the other two target third access requests can be obtained from the local cache; and the remaining 7 third access requests execute the 7 third access requests respectively, and receive access data returned by the server corresponding to each of the 7 third access requests.
The invention provides an information processing method, which comprises the steps of obtaining verification information of each first access request after receiving at least one first access request, determining at least one legal second access request from a plurality of received first access requests according to the obtained verification information, eliminating the access requests sent by a robot, and relieving the pressure of a bank system to a certain extent; distributing the determined second access request to a corresponding server based on a load balancing strategy, distributing a token for the second access request based on a preset rule, storing the second access request distributed with the token into a message middleware, extracting a preset number of third access requests from the message middleware each time, executing the third access request, and receiving access data returned by the server corresponding to the third access request until no access request exists in the message middleware. In the embodiment of the invention, the access requests in the message middleware are processed in batches, and a large number of access requests do not need to be processed at one time, so that the aim of relieving the pressure of a bank system is fulfilled.
Based on the information processing method shown in the embodiment of the present invention, when the first access request carries an IP address, a specific process of determining, in step S102, at least one valid second access request from the at least one first access request based on the verification information, and allocating the at least one second access request to a corresponding server based on a load balancing policy is performed, as shown in fig. 2, the specific process specifically includes the following steps:
s201: and acquiring the IP address carried by the first access request.
In the process of specifically executing S201, after receiving the first access request, the IP address carried in the first access request is obtained.
S202: target authentication information is obtained based on the IP address.
In the specific execution process of S202, after the IP address of the first access request is acquired, the target verification information generated by the system based on the first access request is acquired based on the acquired IP address.
S203: judging whether the target verification information is consistent with the verification information; if the target verification information is consistent with the verification information, executing step S204; if the target verification information is inconsistent with the verification information, step S205 is executed.
In the specific execution process of S203, after target verification information generated by the system based on the first access request is acquired according to the IP address of the first access request, whether the target verification information is consistent with verification information corresponding to the first access request is determined; if the first access request is consistent with the second access request, determining that the first access request is a legal first access request, namely the first access request is a second access request, and distributing the second access request to a corresponding server based on a load balancing strategy; if not, determining the first access request as an illegal first access request, and intercepting the first access request.
For example, 5 first access requests are received, and the authentication information and the IP address of each first access request are obtained, where the authentication information of each obtained access request is: the authentication information 1 of the first access request 1 is 0417, the authentication information 2 of the first access request 2 is 0255, the authentication information 3 of the first access request 3 is 0457, the authentication information 4 of the first access request 4 is 0275, and the authentication information 5 of the first access request 5 is 0258;
acquiring target verification information 1 generated by the system based on the first access request 1 according to the IP address of the first access request 1, wherein the target verification information 1 is 0417; acquiring target verification information 2 generated by a system based on the first access request 2 according to the IP address of the first access request 2, wherein the target verification information 2 is 0355; acquiring target verification information 3 generated by a system based on the first access request 3 according to the IP address of the first access request 3, wherein the target verification information 3 is 0457; acquiring target verification information 4 generated by a system based on the first access request 4 according to the IP address of the first access request 4, wherein the target verification information 4 is 0275; and acquiring target verification information 5 generated by the system based on the first access request 5 according to the IP address of the first access request 5, wherein the target verification information 5 is 0258.
Comparing the verification information 1 (0417) with the target verification information 1 (0417), comparing the verification information 2 (0255) with the target verification information 2 (0355), comparing the verification information 3 (0457) with the target verification information 3 (0457), comparing the verification information 4 (0275) with the target verification information 4 (0275), and comparing the verification information 5 (0258) with the target verification information 5 (0258); since the verification information 1 is consistent with the target verification information 1, the verification information 3 is consistent with the target verification information 3, the verification information 4 is consistent with the target verification information 4, and the verification information 5 is consistent with the target verification information 5, the first access request 1, the first access request 3, the first access request 4, and the first access request 5 can be determined to be legal first access requests, that is, the first access request 1, the first access request 3, the first access request 4, and the first access request 5 can be determined to be second access requests; the authentication information 2 is not identical to the target authentication information 2, and it can be determined that the first access request 2 is an illegal first access request.
S204: and distributing the second access request to the corresponding server based on the load balancing strategy.
In the specific execution process of S204, when the verification information corresponding to the first access request is consistent with the target verification information generated by the system based on the first access request, it may be determined that the first access request is a legitimate first access request, that is, the first access request is a second access request, and then the second access request may be distributed to the corresponding server based on the load balancing policy.
As a preferred mode of the embodiment of the present application, the manner of allocating at least one second access request to a corresponding server based on a load balancing policy may be:
and distributing at least one second access request to the corresponding servers respectively based on the F5 load balancing strategy.
For example, as can be known from the example shown in step S203, the first access request 1, the first access request 3, the first access request 4, and the first access request 5 are the second access requests, and the first access request 1, the first access request 3, the first access request 4, and the first access request 5 are respectively allocated to the corresponding servers based on the F5 load balancing policy.
As another preferred mode of the embodiment of the present application, the manner of allocating at least one second access request to a corresponding server based on a load balancing policy may be:
and dividing at least one second access request, distributing one part of the second access requests to corresponding servers by using a Nigix load balancing strategy, and distributing the other part of the second access requests to the corresponding servers respectively by using an LVN load balancing strategy.
For example, as can be known from the example shown in step S203, the first access request 1, the first access request 3, the first access request 4, and the first access request 5 are the second access requests, the first access request 1, the first access request 3, the first access request 4, and the first access request 5 may be divided into two parts, one part of the second access requests is distributed to the corresponding servers by using a Nigix load balancing policy, and the other part of the second access requests is distributed to the corresponding servers by using a LVN load balancing policy.
S205: the first access request is intercepted.
In the specific execution process of S205, when the verification information corresponding to the first access request is inconsistent with the target verification information generated by the system based on the first access request, it may be determined that the first access request is an illegal first access request, and the first access request is intercepted, so that the pressure of the banking system may be relieved to a certain extent, and the security of the banking system may be improved.
In the embodiment of the application, whether the first access request is a legal first access request can be determined by judging whether the verification information corresponding to the first access request is consistent with the target verification information generated by the system based on the first access request; under the condition that the verification information corresponding to the first access request is consistent with the target verification information generated by the system based on the first access request, the first access request can be considered as a legal first access request, that is, the first access request can be determined as a second access request, and then the second access request is distributed to a corresponding server based on a load balancing strategy; under the condition that the verification information corresponding to the first access request is inconsistent with the target verification information generated by the system based on the first access request, the first access request can be determined to be an illegal first access request, the first access request is intercepted, the pressure of a bank system can be relieved to a certain extent, and the safety of the bank system is improved.
Referring to fig. 3, a schematic flow chart of another information processing method provided in the embodiment of the present invention is shown, where the information processing method specifically includes the following steps:
s301: at least one first access request is received, and verification information corresponding to each first access request is obtained.
In the process of specifically executing S301, the specific execution process and implementation principle of S301 are the same as the specific execution process and implementation principle of S101 in fig. 1 disclosed in the foregoing embodiment of the present invention, and reference may be made to corresponding parts in fig. 1 disclosed in the foregoing embodiment of the present invention, which is not described again here.
S302: at least one legitimate second access request is determined from the at least one first access request based on the authentication information.
In the process of specifically executing S302, the specific execution process and implementation principle of S302 are the same as the specific execution process and implementation principle of S102 in fig. 1 disclosed in the foregoing embodiment of the present invention, and reference may be made to corresponding parts in fig. 1 disclosed in the foregoing embodiment of the present invention, which are not described again here.
S303: and judging whether at least one second access request has a second access request with the same IP address, if so, executing step S304, and if not, executing step S306.
In the process of specifically performing S303, after determining at least one valid second access request from the at least one first access request based on the verification information, it may be determined whether a second access request with the same IP address exists in the at least one determined second access request, and if not, performing S206; and if so, intercepting a second access request with the same IP address.
For example, if 8 legal second access requests are determined from at least one first access request based on the verification information, it may be determined whether there are second access requests with the same IP address in the 8 second access requests, and if there are two second access requests with the same IP address in the 8 second access requests, the two second access requests with the same IP address are intercepted.
S304: a second access request having the same IP address is intercepted.
In the specific execution process of S304, in the case that the determined at least one second access request has a second access request with the same IP address, the second access request with the same IP address is intercepted, so that a hacker can be effectively prevented from bringing impact to the banking system by repeatedly sending access requests.
S305: and judging whether a second access request exists currently, and if so, executing the step S306.
In the process of specifically executing S305, after intercepting the second access request having the same IP address, it is determined whether the second access request currently exists, and if the second access request currently exists, it may be considered that the second access request having the same IP address does not exist in the second access request currently exists, and then the second access request currently exists is distributed to the corresponding server based on the load balancing policy. And if the second access request does not exist currently, ending the access process.
S306: and distributing the second access request to the corresponding server based on the load balancing strategy.
In the specific execution process of S306, in a case that the determined second access request does not have a second access request with the same IP address, or in a case that the second access request does exist after the second access request with the same IP address is intercepted, the second access request is allocated to the corresponding server based on the load balancing policy.
S307: and distributing a token for the second access request based on a preset rule, and storing the second access request distributed with the token into the message middleware.
In the process of executing S307 specifically, the specific execution process and implementation principle of S307 are the same as the specific execution process and implementation principle of S103 in fig. 1 disclosed in the foregoing embodiment of the present invention, and reference may be made to corresponding parts in fig. 1 disclosed in the foregoing embodiment of the present invention, which is not described again here.
S308: each time a preset number of third access requests are extracted from the message middleware.
S309: judging whether the local cache has the access data of the third access request; if yes, go to step S310; if not, go to step S311.
In the specific execution process of S309, after the second access request to which the token is allocated is stored in the message middleware, extracting a preset number of third access requests from the message middleware each time, and determining whether the local cache has access data of the third access request, if the local cache has the access data of the third access request, obtaining the access data of the third access request from the local cache; if the access data of the third access request does not exist in the local cache, step S311 is executed.
S310: and acquiring the access data of the third access request from the local cache.
In the process of specifically executing S310, when the third access request access data exists in the local cache, the third access request access data is obtained from the local cache, so that the efficiency of returning the access request access data can be improved to a certain extent.
S311: and executing the third access request, and receiving access data returned by the server corresponding to the third access request.
In the process of specifically executing S311, the specific execution process and implementation principle of S311 are the same as the specific execution process and implementation principle of S104 in fig. 1 disclosed in the foregoing embodiment of the present invention, and reference may be made to corresponding parts in fig. 1 disclosed in the foregoing embodiment of the present invention, which are not described again here.
In the embodiment of the application, whether the determined at least one second access request has the second access request with the same IP address or not is judged, and the second access request with the same IP address is intercepted under the condition that the determined at least one second access request has the second access request with the same IP address, so that the impact of a hacker on a bank system by repeatedly sending the access requests can be effectively prevented. Before executing the third access request, whether the access data of the third access request exists in the local cache or not can be judged, if yes, the access data of the third access request can be directly obtained from the local cache, and the efficiency of returning the access data of the access request can be improved to a certain extent.
For a better understanding of the above, the following description is given by way of example.
For example, 1000 first access requests are received, and the verification code of each first access request is obtained. For each first access request, acquiring a target verification code of the first access request according to the IP address of the first access request so as to judge whether the verification code of the first access request is consistent with the target verification code of the first access request, and if so, determining that the first access request is a legal second access request; if 800 legal second access requests are determined from 1000 first access requests according to the verification code of each acquired first access request, whether the 800 second access requests have the second access requests with the same IP address or not is further judged, and if 100 second access requests have the same IP address, the 100 second access requests are intercepted.
Distributing the remaining 700 second access requests to the corresponding servers based on the load balancing policy; if it is determined that 500 tokens can be allocated according to the token bucket algorithm, allocating tokens for 500 second access requests in the remaining 700 second access requests, and storing the second access requests allocated tokens into message middleware; if the preset number is 200, extracting 200 second access requests (third access requests) distributed with tokens from the message middleware each time; and judging whether the local cache has the access data of any one of the 200 third access requests, and if the local cache has the access data of 10 third access requests, directly acquiring the access data of the 10 third access requests from the local cache.
Continuously judging whether a third access request with the same access data exists in the remaining 190 third access requests; if there are 30 third access requests for the same access data, that is, there are 30 target third access requests, any one of the 30 target third access requests may be executed, the access data returned by the server corresponding to the target access request is received, and the received access data of the target third access request is stored in the local cache, so as to obtain the access data of the remaining 29 target third access requests from the local cache; and for the remaining 160 third access requests, respectively executing the 160 third access requests, and receiving access data returned by the server corresponding to each 160 third access requests.
Based on the information processing method provided in the foregoing embodiment of the present invention, correspondingly, an embodiment of the present invention further provides an information processing apparatus, and referring to fig. 4, a schematic structural diagram of the information processing apparatus provided in the embodiment of the present invention is shown, where the information processing apparatus includes:
a first receiving unit 41, configured to receive at least one first access request, and obtain authentication information corresponding to each first access request;
a first determining unit 42, configured to determine at least one legal second access request from the at least one first access request based on the verification information, and distribute the at least one second access request to a corresponding server based on a load balancing policy;
an allocating unit 43, configured to allocate a token for the second access request based on a preset rule, and store the second access request allocated with the token in the message middleware;
the second receiving unit 44 is configured to extract a preset number of third access requests from the message middleware each time, execute the third access requests, and receive access data returned by the server corresponding to the third access requests until no access request exists in the message middleware.
The specific principle and the execution process of each unit in the information processing apparatus disclosed in the above embodiment of the present invention are the same as those of the information processing method disclosed in the above embodiment of the present invention, and reference may be made to corresponding parts in the information processing method disclosed in the above embodiment of the present invention, which are not described herein again.
The invention provides an information processing device, which is characterized in that after at least one first access request is received, the verification information of each first access request is obtained, at least one legal second access request is determined from a plurality of received first access requests according to the obtained verification information, the access requests sent by a robot can be eliminated, and the pressure of a bank system is relieved to a certain extent; distributing the determined second access request to a corresponding server based on a load balancing strategy, distributing a token for the second access request based on a preset rule, storing the second access request distributed with the token into a message middleware, extracting a preset number of third access requests from the message middleware each time, executing the third access request, and receiving access data returned by the server corresponding to the third access request until no access request exists in the message middleware. In the embodiment of the invention, the access requests in the message middleware are processed in batches, and a large number of access requests at one time are not required to be processed, so that the aim of relieving the pressure of a bank system is fulfilled.
In this embodiment of the present application, the first access request carries an IP address, and preferably, the first receiving unit includes:
the IP address acquisition unit is used for acquiring an IP address carried by the first access request;
a target authentication information acquisition unit configured to acquire target authentication information based on the IP address;
and the second determining unit is used for determining the first access request as a legal second access request if the target verification information is consistent with the verification information.
Further, an information processing apparatus provided in an embodiment of the present application further includes:
the first judging unit is used for judging whether a second access request with the same IP address exists in at least one access request or not;
and the interception unit is used for intercepting the second access request with the same IP address if the second access request exists.
Further, an information processing apparatus provided in an embodiment of the present application further includes:
the second judging unit is used for judging whether the access data of the third access request exists in the local cache or not;
a third obtaining unit, configured to obtain access data of a third access request from the local cache if the access data of the third access request exists in the local cache;
the second receiving unit is further configured to execute the third access request and receive access data returned by the server corresponding to the third access request if the local cache does not have the access data of the third access request.
In this embodiment, preferably, the second receiving unit includes:
the third judging unit is used for judging whether a target third access request exists in a preset number of third access riders, and the target third access is a third access request with the same access data;
the third receiving unit is used for executing the target third access request if the third access request exists, receiving access data returned by the server corresponding to the target third access request, and storing the access data of the target third access request into the local cache;
and the fourth receiving unit is used for executing the third access request and receiving the access data returned by the server corresponding to the third access request if the third access request does not exist.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (8)

1. An information processing method, characterized in that the method comprises:
receiving at least one first access request, and acquiring verification information corresponding to each first access request;
determining at least one legal second access request from the at least one first access request based on the verification information, and distributing the at least one second access request to a corresponding server based on a load balancing policy;
distributing a token for the second access request based on a preset rule, and storing the second access request distributed with the token into message middleware;
extracting a preset number of third access requests from the message middleware each time, executing the third access requests, and receiving access data returned by a server corresponding to the third access requests until no access request exists in the message middleware;
the executing the third access request and receiving access data returned by the server corresponding to the third access request includes:
judging whether a target third access request exists in the preset number of third access requests, wherein the target third access request is a third access request with the same access data;
if the third access request exists, executing the target third access request and the rest third access requests, receiving access data returned by the server corresponding to the target third access request, storing the access data of the target third access request into a local cache, and acquiring the access data of the rest target third access requests from the local cache;
and if the third access request does not exist, executing the third access request, and receiving access data returned by the server corresponding to the third access request.
2. The method of claim 1, wherein the first access request carries an IP address, and wherein the determining a valid second access request based on the authentication information comprises:
acquiring an IP address carried by the first access request;
acquiring target verification information based on the IP address;
judging whether the target verification information is consistent with the verification information;
and if the target verification information is consistent with the verification information, determining that the first access request is a legal second access request.
3. The method of claim 1, wherein before the distributing the at least one second access request to the corresponding server based on the load balancing policy, the method further comprises:
judging whether a second access request with the same IP address exists in the at least one second access request or not;
and if so, intercepting the second access request with the same IP address.
4. The method of claim 1, wherein before the executing the third access request and receiving the access data returned by the server corresponding to the third access request, the method further comprises:
judging whether the access data of the third access request exists in a local cache or not;
if the access data of the third access request exists in the local cache, acquiring the access data of the third access request from the local cache;
the executing the third access request and receiving access data returned by the server corresponding to the third access request includes:
and if the access data of the third access request does not exist in the local cache, executing the third access request, and receiving the access data returned by the server corresponding to the third access request.
5. An information processing apparatus characterized in that the apparatus comprises:
the first receiving unit is used for receiving at least one first access request and acquiring verification information corresponding to each first access request;
a first determining unit, configured to determine at least one legal second access request from the at least one first access request based on the verification information, and distribute the at least one second access request to a corresponding server based on a load balancing policy;
the distribution unit is used for distributing tokens for the second access requests based on a preset rule and storing the second access requests distributed with the tokens into message middleware;
the second receiving unit is used for extracting a preset number of third access requests from the message middleware each time, executing the third access requests, and receiving access data returned by the server corresponding to the third access requests until no access request exists in the message middleware;
the second receiving unit includes:
a third judging unit, configured to judge whether a target third access request exists in the preset number of third access riders, where the target third access is a third access request with the same access data;
a third receiving unit, configured to execute the target third access request and remaining third access requests, receive access data returned by the server corresponding to the target third access request, store the access data of the target third access request in a local cache, and obtain access data of the remaining target third access requests from the local cache;
and the fourth receiving unit is used for executing the third access request and receiving the access data returned by the server corresponding to the third access request if the third access request does not exist.
6. The apparatus of claim 5, wherein the first access request carries an IP address, and wherein the first receiving unit comprises:
an IP address obtaining unit, configured to obtain an IP address carried by the first access request;
a target authentication information acquisition unit configured to acquire target authentication information based on the IP address;
and the second determining unit is used for determining that the first access request is a legal second access request if the target verification information is consistent with the verification information.
7. The apparatus of claim 5, further comprising:
a first judging unit, configured to judge whether a second access request with the same IP address exists in the at least one access request;
and the intercepting unit is used for intercepting the second access request with the same IP address if the second access request exists.
8. The apparatus of claim 5, further comprising:
the second judging unit is used for judging whether the access data of the third access request exists in the local cache or not;
a third obtaining unit, configured to obtain, if the access data of the third access request exists in the local cache, the access data of the third access request from the local cache;
the second receiving unit is further configured to execute the third access request and receive access data returned by the server corresponding to the third access request if the access data of the third access request does not exist in the local cache.
CN202011052928.6A 2020-09-29 2020-09-29 Information processing method and device Active CN112153158B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011052928.6A CN112153158B (en) 2020-09-29 2020-09-29 Information processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011052928.6A CN112153158B (en) 2020-09-29 2020-09-29 Information processing method and device

Publications (2)

Publication Number Publication Date
CN112153158A CN112153158A (en) 2020-12-29
CN112153158B true CN112153158B (en) 2022-10-18

Family

ID=73894304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011052928.6A Active CN112153158B (en) 2020-09-29 2020-09-29 Information processing method and device

Country Status (1)

Country Link
CN (1) CN112153158B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603598A (en) * 2015-10-15 2017-04-26 阿里巴巴集团控股有限公司 Method for processing service request and apparatus thereof
CN108897615A (en) * 2018-05-31 2018-11-27 康键信息技术(深圳)有限公司 Second kills request processing method, application server cluster and storage medium
CN109218298A (en) * 2018-09-04 2019-01-15 中钞信用卡产业发展有限公司杭州区块链技术研究院 A kind of application data access method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603598A (en) * 2015-10-15 2017-04-26 阿里巴巴集团控股有限公司 Method for processing service request and apparatus thereof
CN108897615A (en) * 2018-05-31 2018-11-27 康键信息技术(深圳)有限公司 Second kills request processing method, application server cluster and storage medium
CN109218298A (en) * 2018-09-04 2019-01-15 中钞信用卡产业发展有限公司杭州区块链技术研究院 A kind of application data access method and system

Also Published As

Publication number Publication date
CN112153158A (en) 2020-12-29

Similar Documents

Publication Publication Date Title
CN109493024B (en) Digital asset hosting method, apparatus, and storage medium
KR101814989B1 (en) Method of detecting fraud financial trade and server performing the same
CN106779716B (en) Authentication method, device and system based on block chain account address
EP1829281B1 (en) Authentication device and/or method
CN106372940A (en) Identity authentication method based on block chain network, server and terminal device
CN110113366B (en) CSRF vulnerability detection method and device, computing device and storage medium
WO2014201830A1 (en) Method and device for detecting software-tampering
KR20180113229A (en) Loan service providing method using black chain and system performing the same
WO2014153979A1 (en) Method for implementing application of dynamic code
CN106411950A (en) Block-chain transaction ID based authentication method, device and system
KR101202295B1 (en) Method of paying with unique key value and apparatus thereof
CN112561633B (en) Virtual object order data verification method, device and equipment
US20220150243A1 (en) Authentication server, and non-transitory storage medium
CN110874743A (en) Method and device for determining account transaction risk
CN108234454B (en) Identity authentication method, server and client device
CN108961034A (en) System and method, storage medium based on user behavior certification
CN110765168B (en) Data searching method and device based on user information
CN112153158B (en) Information processing method and device
CN110971609A (en) Anti-cloning method of DRM client certificate, storage medium and electronic equipment
CN107995214B (en) Website login method and related equipment
CN115375308A (en) Secure payment method and device, storage medium and electronic equipment
CN105574724A (en) Safety payment protection method and system, safety application client, and safety server
CN112948812B (en) Verification code distribution method, computing device and storage medium
CN114841698A (en) Transaction information processing method and device and computer readable storage medium
US10650381B2 (en) Method for detecting a risk of substitution of a terminal, corresponding device, program and recording 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