Data processing method and device, computer device, and storage medium
By setting flow control conditions and degradation strategies in the internet bank account opening system to limit concurrent requests and adopting user assistance or queuing strategies, the system crash problem caused by massive requests was solved, and the system stability and account opening efficiency were improved.
Patent Information
- Application Number
- CN202111369988.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-18
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2041-11-18
AI Technical Summary
In the scenario of opening an account at an internet bank, a massive number of concurrent account opening requests can cause the business processing system to crash. How can we ensure the stability of the system?
By setting rate limiting conditions and degradation strategies, the number of concurrent account opening requests is limited, and user assistance or queuing strategies are used to process requests, thereby reducing the resource or time consumption of business services and ensuring system stability.
When faced with massive concurrent requests, reduce resource consumption on business services or extend processing time to improve system stability and account opening efficiency.
Smart Images

Figure CN116170382B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and in particular, to a data processing method and device, computer equipment, storage medium and computer program product. BACKGROUND
[0002] In recent years, with the rapid development of Internet technology, various Internet services have emerged, and people's life has been inseparable from the Internet. The existing Internet services widely adopt the client-server mode, and a large number of clients send service requests or access requests to the server through the network, and the server processes the access request and returns the processing result. The server can be a specific physical server, or a virtual server formed by combining multiple physical servers to process application requests.
[0003] In the Internet bank account opening scene, when a large number of concurrent user account opening requests are received, if the large number of concurrent account opening requests are directly submitted to the business processing system, the business processing system will be crashed. Therefore, how to limit the large number of concurrent account opening requests to ensure the stability of the business processing system is a problem to be solved at present. SUMMARY
[0004] The embodiments of the present application provide a data processing method and device, computer equipment, storage medium and computer program product, which can ensure the stability of the business processing system when the number of concurrent account opening requests is too large.
[0005] The embodiments of the present application provide a data processing method, comprising:
[0006] When an account opening service request is received, the throttling condition of the account opening service corresponding to the account opening service request is queried;
[0007] If the account opening service request meets the throttling condition, a degradation strategy corresponding to the account opening service is obtained;
[0008] The account opening service request is processed based on the degradation strategy, and a request result of the account opening service request is obtained;
[0009] The amount of account opening service resources consumed by obtaining the request result by using the degradation strategy is less than the amount of account opening service resources consumed by the account opening service for executing the account opening service request to obtain the request result, or the time consumed by obtaining the request result by using the degradation strategy is greater than the time consumed by the account opening service for executing the account opening service request to obtain the request result.
[0010] The embodiments of the present application provide a data processing device, comprising:
[0011] The query module is used to query the rate limiting conditions of the account opening service corresponding to the account opening service request when an account opening service request is received.
[0012] The acquisition module is used to acquire the degradation strategy corresponding to the account opening service if the account opening service request meets the rate limiting condition.
[0013] The processing module is used to process the account opening service request based on the degradation strategy and obtain the request result of the account opening service request.
[0014] Specifically, the amount of account opening service resources consumed by the degradation strategy to obtain the request result is less than the amount of account opening service resources consumed by the account opening service to execute the account opening request and obtain the request result; or, the time consumed by the degradation strategy to obtain the request result is greater than the time consumed by the account opening service to execute the account opening request and obtain the request result.
[0015] One aspect of this application provides a computer device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs the methods described in the above embodiments.
[0016] One embodiment of this application provides a computer storage medium storing a computer program, which includes program instructions. When the program instructions are executed by a processor, they perform the methods described in the above embodiments.
[0017] One aspect of this application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. When the computer instructions are executed by the processor of a computer device, the methods described in the above embodiments are performed.
[0018] This application sets rate limiting conditions for the account opening service. If the current account opening request reaches the rate limiting condition, the service will maintain stability by consuming less resource to obtain the request result; or by consuming more time to wait for the request result. Even with a massive influx of concurrent account opening requests, only a small amount of service resources are consumed, or more time is spent waiting for the request to be executed, reducing the impact of high traffic on the account opening service and improving system stability. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a system architecture diagram for data processing provided in an embodiment of the present invention;
[0021] Figures 2a-2c This is a schematic diagram of a data processing scenario provided by this application example;
[0022] Figure 3 This is a schematic diagram of a data processing method provided in an embodiment of this application;
[0023] Figures 4a-4b This is a schematic diagram of an interface for setting rate limiting conditions provided in an embodiment of this application;
[0024] Figure 5 This is a schematic diagram of a process for rate limiting of OCR requests provided in an embodiment of this application;
[0025] Figure 6 This is a system architecture diagram of an account opening business system provided in an embodiment of this application;
[0026] Figure 7 This is a schematic diagram of a data processing flow provided in an embodiment of this application;
[0027] Figure 8 This is a flowchart illustrating a method for limiting the rate of document authentication requests, provided in an embodiment of this application.
[0028] Figure 9 This is a schematic diagram illustrating the operation of an account opening system provided in an embodiment of this application;
[0029] Figure 10 This is a schematic diagram of a monitoring platform for an account opening business system provided in an embodiment of this application;
[0030] Figure 11 This is an overall deployment architecture diagram of an account opening business system provided in an embodiment of this application;
[0031] Figure 12 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0032] Figure 13 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0034] Please see Figure 1 This is a system architecture diagram for data processing provided in an embodiment of the present invention. The data processing system includes a terminal, a rate limiter, a monitor, and servers 1, 2, and 3. The terminal generates an account opening service request and sends it to the rate limiter. Upon receiving the account opening service request, the rate limiter first queries the rate limiting conditions of the account opening service that executes the request. If the request meets the rate limiting conditions, the rate limiter further queries the degradation policy of the service and processes the request based on the degradation policy to obtain the result. Specifically, the amount of resources consumed by the service to obtain the result based on the degradation policy is less than the amount of resources consumed by the service to execute the request; or, the time consumed to obtain the result based on the degradation policy is less than the time consumed by the service to directly execute the request.
[0035] Subsequently, the rate limiter can report the account opening request and the request result to the monitor. The operators can then use the monitor to understand the system's operation and traffic control status.
[0036] Terminal equipment can also be referred to as terminal, user equipment (UE), access terminal, user unit, mobile device, user terminal, wireless communication equipment, user agent, or user device. Terminal equipment can be smart home appliances, handheld devices with wireless communication capabilities (such as smartphones and tablets), computing devices (such as personal computers (PCs), in-vehicle terminals, smart voice interaction devices, wearable devices, or other smart devices, but is not limited to these.
[0037] Server 10f can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0038] The following are Figures 2a-2c For example, this section explains how to rate-limit and degrade account opening requests in an online banking account opening scenario. Please refer to [link / reference]. Figures 2a-2c This is a schematic diagram of a data processing scenario provided by this application example. Assume that the online banking account opening application involves three processes: mobile phone number verification, document character recognition, and document authentication. When all three processes are successfully verified, the account opening application is approved, and an account can be allocated to the user.
[0039] like Figure 2a As shown, when the terminal enters the mobile phone number verification interface of the online banking APP's account opening application process, it first prompts the user to enter their mobile phone number. After the user enters their mobile phone number, the terminal generates a mobile phone number verification request carrying the mobile phone number and sends this request to the rate limiter. The rate limiter finds that the service corresponding to the mobile phone number verification request is the mobile phone number verification service and checks the rate limiting conditions for the mobile phone number verification service. If the rate limiter finds that the rate limiting conditions for the mobile phone number verification service are empty, that is, no rate limiting conditions are currently set for the mobile phone number verification service, then the rate limiter can directly submit the mobile phone number verification request to the mobile phone number verification server, where the mobile phone number verification service is installed. After the mobile phone number verification server returns the mobile phone number verification result to the rate limiter, if the verification result is that the mobile phone number verification is successful, the rate limiter can forward the successful mobile phone number verification result to the terminal, and the terminal displays... Figure 2b The interface shown is for uploading certificates and licenses. Conversely, if the verification result is that the mobile phone number verification failed, the rate limiter can send a message to the terminal indicating that the mobile phone number verification failed.
[0040] Figure 2b The terminal interface is the document upload interface, corresponding to the second step of the account opening application process. After the user takes a photo of their ID card, the terminal sends a document character recognition request with the ID card photo to the rate limiter. The rate limiter identifies the service corresponding to the document character recognition request as the document character recognition service and checks the rate limiting conditions for that service. If the rate limiter finds that the rate limiting condition for the document character recognition service is: a maximum of 50 document character recognition requests per minute, and the current document character recognition request meets the rate limiting condition, the rate limiting device can generate a user assistance request and send it back to the terminal. Based on the user assistance request, the terminal displays a prompt message on the interface: "Current service is busy, please manually enter your ID card number:" This prompt message encourages the user to manually enter their ID card number. After the user manually enters their ID card number, the terminal sends the manually entered ID card number to the rate limiter, which uses this ID card number as the result of the document character recognition request.
[0041] After the rate limiting device obtains the user's manually entered ID number, such as... Figure 2c As shown, the terminal displays the ID video upload interface, corresponding to the third step of the account opening process. After the user captures a video of their ID card, the terminal sends an ID verification request containing the ID video to the rate limiter. The rate limiter identifies the service corresponding to the ID verification request as the ID verification service and checks its rate limiting conditions. If the rate limiter finds that the ID verification service's rate limiting condition is: a maximum of 10 ID verification requests per minute, and the current ID verification request meets the rate limiting condition, the rate limiting device can cache the current ID verification request in the cache queue. After the next minute, once the execution count of the ID verification service is cleared to zero, the ID verification service is no longer in a rate-limited state. The rate limiting device then submits the ID verification request to the ID verification server, where the ID verification service is installed. After the ID verification server verifies the video, it sends the verification result back to the rate limiter.
[0042] Subsequently, the rate limiter can comprehensively determine whether to approve the user's account opening application based on the results of the mobile phone number verification request (i.e., the verification result of the mobile phone number), the result of the certificate character recognition request (i.e., the ID number manually entered by the user), and the result of the certificate authentication request (i.e., the authentication result of the video).
[0043] The specific process of receiving account opening service requests (such as mobile phone number verification requests, character recognition requests, or document authentication requests in the above embodiments), querying the rate limiting conditions of account opening service (such as mobile phone number verification service, character recognition service, or document authentication service in the above embodiments) (such as the rate limiting conditions of document character recognition service in the above embodiments), and processing account opening service requests using a degradation strategy (such as user assistance in the above embodiments, or caching to a queue) can be found below. Figures 3-11 Corresponding implementation examples.
[0044] Please see Figure 3 This is a schematic diagram of data processing provided in an embodiment of this application. This application can be applied to a bank account opening system, specifically to a high-volume account opening scenario. By setting reasonable rate limiting thresholds and degradation strategies for each functional interface (i.e., each functional service) in the account opening system, the functional interfaces are not overwhelmed by high traffic, ensuring the normal operation of the system. The following embodiments are described with a rate limiting device as the execution subject. The rate limiting device can be a gateway or router in front of each functional interface.
[0045] Data processing may include the following steps:
[0046] Step S301: When an account opening service request is received, query the rate limiting conditions of the account opening service corresponding to the account opening service request.
[0047] Specifically, when the rate limiting device receives an account opening request (as mentioned above) Figures 2a-2c When a mobile phone number verification request, character recognition request, or document authentication request is made in the corresponding embodiment, the rate limiting device queries the rate limiting conditions of the account opening service that provides services for that account opening request. The account opening request may specifically be mobile phone number verification, or document OCR (Optical Character Recognition) recognition, or document authentication, or user face comparison, or tax information investigation, or anti-money laundering list check, or user credit risk verification.
[0048] Correspondingly, when the account opening request is a mobile phone number verification, the account opening service is the mobile phone number verification service; when the account opening request is a certificate OCR recognition, the account opening service is the certificate OCR recognition service, and so on.
[0049] To ensure that account opening requests are not tampered with during transmission, the rate limiting device also needs to verify the signature of the request. Only after successful verification will the rate limiting device proceed with subsequent steps. The specific process is as follows: The account opening request includes the processing object and its electronic signature. For example, if the account opening request is for mobile phone number verification, the processing object is the mobile phone number; if it's for document OCR recognition, the processing object is the document, and so on. The electronic signature is encrypted data obtained by the client sending the account opening request using its private key to encrypt the message digest (e.g., MD5 value) of the processing object. The rate limiting device can verify the electronic signature based on the processing object. Only when the verification is successful will the rate limiting device query the rate limiting conditions for the account opening service. The specific process for verifying the electronic signature is as follows:
[0050] The rate limiting device calculates the message digest of the processing object and decrypts the electronic signature using the public key of the client that sent the account opening request. If the calculated message digest of the processing object equals the decrypted data obtained from decrypting the electronic signature, then the signature verification is successful; otherwise, if the calculated message digest of the processing object does not equal the decrypted data obtained from decrypting the electronic signature, then the signature verification fails.
[0051] Step S302: If the account opening service request meets the rate limiting condition, then obtain the degradation strategy corresponding to the account opening service.
[0052] Specifically, the rate limiting conditions include the maximum number of times the account opening service can be executed within a unit time period. The unit time period is a preset time interval, such as one minute or one hour. The rate limiting device obtains the timestamp of the received account opening request and calls the business statistics service to obtain the execution frequency of the account opening service within the unit time period (referred to as the first unit time period). If the execution frequency of the account opening service within the first unit time period is less than the maximum execution frequency included in the rate limiting conditions, the rate limiting device can determine that the account opening request does not meet the rate limiting conditions; conversely, if the execution frequency of the account opening service within the first unit time period is not less than the maximum execution frequency included in the rate limiting conditions, the rate limiting device can determine that the account opening request meets the rate limiting conditions. The business statistics service can be used to count the execution frequency of the account opening service within different unit time periods.
[0053] If an account opening request meets the rate limiting condition, the rate limiting device will obtain the corresponding degradation strategy based on the service type of the account opening service. The service type is either the first service type or the second service type. The degradation strategy is either the user assistance strategy corresponding to the first service type or the queuing strategy corresponding to the second service type. As the names suggest, the user assistance strategy means that the account opening request is not executed by the account opening service, but by the user; the queuing strategy means that the account opening service is not called temporarily, and the request is submitted to the account opening service after the peak period has passed, so that the account opening service can execute the request.
[0054] Whether an account opening service belongs to the first or second service type depends on the content of the service. If the service can be completed manually by the user, it belongs to the first service type. Conversely, if the service must be completed by equipment, it belongs to the second service type.
[0055] For example, if the service content of the account opening service is anti-money laundering list check, since users cannot complete the anti-money laundering check, the account opening service belongs to the second service type; if the service content of the account opening service is certificate OCR recognition, since certificate OCR recognition is to recognize the characters in the certificate, and users can assist in recognizing the characters in the certificate, the account opening service belongs to the first service type.
[0056] Please see Figures 4a-4b , Figures 4a-4b This is a schematic diagram of an interface for setting rate limiting conditions provided in an embodiment of this application, such as... Figure 4a or Figure 4bAs shown, when the account opening service specifically involves document OCR recognition, operators can set the maximum processing capacity of the document OCR recognition service in the rate limiting interface. Specifically, they can set the maximum number of processing times per minute (e.g., 100 times) or the maximum number of processing times per 15 minutes (e.g., 1000 times). When the degradation switch is enabled, if a document OCR recognition request hits the rate limiting condition, the request will be downgraded. Specifically, the request will not be completed by calling the document OCR recognition service; instead, it will be completed manually. Conversely, when the degradation switch is disabled, the set document OCR recognition conditions are ineffective; that is, there are no rate limiting conditions for the document OCR recognition service, and any received document OCR recognition request will be directly submitted to the service. Figure 4a The shown interface for setting the flow control conditions and Figure 4b The only difference in the traffic limiting settings interface shown is the name of the service provider for the certificate OCR recognition service. Figure 4a The corresponding service provider is TU. Figure 4b The corresponding service provider is VBAI), and the rest is exactly the same, that is, the setup process is the same, and the way to enable / disable the rate limiting conditions is the same.
[0057] Step S303: Process the account opening service request based on the degradation strategy to obtain the request result of the account opening service request; wherein, the amount of account opening service resources consumed by the degradation strategy to obtain the request result is less than the amount of account opening service resources consumed by the account opening service to execute the account opening service request to obtain the request result; or, the time consumed by the degradation strategy to obtain the request result is greater than the time consumed by the account opening service to execute the account opening service request to obtain the request result.
[0058] Specifically, the rate limiting device processes the account opening service request based on this degradation strategy, and obtains the request result of the account opening service request. The request result obtained based on the degradation strategy is consistent with the result obtained after the account opening service request is executed.
[0059] Of course, if the degradation strategy is a queuing strategy, then the time consumed to obtain the request result using this strategy will be greater than the time consumed by the account opening service executing the account opening request. This is because the queuing strategy temporarily refrains from calling the account opening service, waiting for the peak period to pass before calling it. Naturally, the time consumed by the account opening service executing the account opening request after waiting for a period is far greater than the time consumed by directly calling and executing the account opening request directly.
[0060] If the degradation strategy is a user-assisted strategy, then the amount of account opening service resources consumed to obtain the request result using this strategy is less than the amount of account opening service resources consumed by the account opening service itself in executing the account opening request. This is because, with a user-assisted strategy, the account opening service does not need to execute the account opening request; instead, the user executes it. Therefore, the amount of account opening service resources consumed is 0, which is less than the amount of account opening service resources consumed by the account opening service in executing the request and obtaining the result. Account opening service resources refer to the resource quantity of the account opening service, such as the number of CPUs, disk space, and memory.
[0061] The following sections provide detailed explanations of how to obtain the request results for account opening services based on these two strategies. First, the specific process of the user assistance strategy will be explained:
[0062] When the account opening service belongs to the first service type, the degradation strategy is the user assistance strategy. The rate limiting device generates a user assistance request based on the account opening service request and sends it to the client that sent the account opening service request. The client displays a pop-up window according to the instructions in the user assistance request. The pop-up window contains a prompt message to prompt the user for assistance. After reading the prompt message, the user can enter text in the pop-up window. This text is called the user input text. After the client obtains the user input text, it sends it to the rate limiting device. The rate limiting device uses the user input text as the request result of the account opening service request.
[0063] For example, when an account opening request involves document OCR recognition, if the request meets the rate limiting conditions for the account opening service, the rate limiting device generates a user assistance request and sends it to the client. The client displays a pop-up window with a message: "Due to current service busy, we cannot automatically recognize your ID number. Please manually enter your ID number." The user can enter their ID number in the pop-up window, and the client sends this ID number to the rate limiting device. The rate limiting device then uses the ID number sent by the client as the result of the account opening request.
[0064] It can be seen that during the process of obtaining the request result using the user assistance strategy, the account opening service (such as the certificate OCR recognition service) does not execute the account opening service request, and therefore does not consume any resources of the account opening service. Therefore, the amount of account opening service resources consumed by the user assistance strategy to obtain the request result is less than the amount of account opening service resources consumed by the account opening service to execute the account opening service request to obtain the request result.
[0065] Optionally, the rate limiting device reports user assistance requests to the business statistics service, so that the business statistics service can count the total number of user assistance requests based on the number of user assistance requests, in order to monitor the operation of the rate limiting system.
[0066] Please see Figure 5 , Figure 5 This is a flowchart illustrating the rate limiting process for OCR requests provided in this application embodiment. When the account opening service request is specifically an OCR request (i.e., a request to perform character recognition on an uploaded ID photo), the rate limiting process includes the following steps:
[0067] Step S501: Obtain the OCR request.
[0068] Step S502: Call the statistics service to obtain whether the OCR request meets the rate limiting conditions of the OCR service corresponding to the OCR request. If it does not meet the conditions, proceed to steps S503-S504; if it does meet the conditions, proceed to steps S505-S506.
[0069] Specifically, the rate limiting condition can be the maximum number of times the OCR service can be executed within a unit of time. If the number of times the OCR service has been executed within the current unit of time is less than the maximum number of times it can be executed in the rate limiting condition, then the OCR request does not meet the rate limiting condition; conversely, if the number of times the OCR service has been executed within the current unit of time is not less than the maximum number of times it can be executed in the rate limiting condition, then the OCR request meets the rate limiting condition.
[0070] Step S503: Report the OCR request to the statistics service to update the number of times the OCR service has been executed within the current time period.
[0071] Step S504: Asynchronously call the OCR service to obtain the request result of the OCR request.
[0072] Step S505: Report to the monitoring platform.
[0073] Step S506: Generate a user assistance request and send it back to the client. The client displays a prompt message prompting the user to manually enter the identification characters. The manually entered identification characters are used as the result of the OCR request.
[0074] Next, let me explain the specific process of the queuing strategy:
[0075] When the account opening service belongs to the second service type, the degradation strategy is a queuing strategy. The rate limiting device adds the account opening request to a cache queue, which can be a Redis queue. The rate limiting device periodically queries the status of the account opening service, indicating whether it is in a normal or rate-limited state. When the account opening service is in a normal state and the account opening request is in a readable position in the cache queue, the device reads the request from the cache queue and asynchronously calls the account opening service to execute it. This can also be understood as the rate limiting device asynchronously submitting the account opening request to the account opening service, which then executes it and obtains the request result. The rate limiting device uses a callback function to retrieve the request result returned by the account opening service.
[0076] This can be achieved using a multi-threaded approach to read account opening requests that are in a readable position from the cache queue. Specifically, k requests can be read from the cache queue at a time, where k is an integer greater than 1. The readable position in the cache queue can be either the first position or one of the first k positions.
[0077] When the rate limiting device detects that an account opening request meets the rate limiting conditions, it determines that the account opening service has entered a rate-limited state. In other words, the account opening service is already in a rate-limited state before the request is added to the cache queue.
[0078] Asynchronous call to the account opening service means that the rate limiting device does not have to wait for the account opening service to return a result. The rate limiting device can execute other requests. After the account opening service has completed the execution of the account opening request, the callback function of the account opening service will automatically return the request result to the rate limiting device.
[0079] As we can see, if the degradation strategy is a queuing strategy, the rate limiting device will wait for a period of time until the account opening service changes from the rate limiting state to the normal state before submitting the account opening service to the account opening service. The account opening service will then execute the account opening service to obtain the request result. Compared to directly submitting the account opening service to the account opening service, the queuing strategy will obviously take more time.
[0080] Optionally, if an account opening request does not meet the rate limiting conditions, the rate limiting device asynchronously calls the account opening service. The account opening service executes the account opening request and obtains the request result. The rate limiting device uses a callback function to obtain the request result returned by the account opening service. Asynchronous calling of the account opening service means that the rate limiting device does not need to wait for the account opening service to return a result; it can execute other requests. After the account opening service finishes executing the account opening request, the callback function of the account opening service will automatically return the request result to the rate limiting device. Before submitting the account opening request to the account opening service, the rate limiting device can first report the account opening request to the business statistics service. The business statistics service can adjust the execution frequency of the account opening service based on the account opening request, and the adjusted frequency can be used to determine whether the next account opening request meets the rate limiting conditions of the account opening service.
[0081] Please see Figure 6 , Figure 6 This is a system architecture diagram of an account opening system provided in this application embodiment. The account opening system involves a user terminal, a server terminal, and a back-end management terminal. Users upload document images via an app. After receiving the document images, the server inserts a user account opening document processing order into the database and generates a corresponding order number. Users also upload document videos via the app. Upon receiving the video, the server first verifies the file signature information transmitted by the app to ensure consistency between the video transmitted by the app and the video received by the server, preventing information tampering. The server queries the rate limiting conditions for document OCR information recognition and document authentication. Based on the queried rate limiting conditions for document OCR information recognition, the server determines whether the request to recognize the currently uploaded document image meets the rate limiting conditions. If the rate limiting conditions are not met, the server asynchronously calls the downstream document OCR information recognition model to complete the OCR recognition of the currently uploaded document image. Conversely, if the rate limiting conditions are met, the user manually enters the document characters.
[0082] The server determines whether a request to authenticate the currently uploaded ID video meets the rate-limiting conditions for ID verification. If the rate-limiting conditions are not met, the server asynchronously calls the downstream ID verification model to complete the authentication. Conversely, if the rate-limiting conditions are met, the request to authenticate the currently uploaded ID video is cached in a queue. Once the ID verification model returns from the rate-limited state to normal, the server asynchronously calls the downstream ID verification model to complete the authentication.
[0083] The server can write the OCR recognition results (or user-inputted ID characters) and authentication results into the database to update the user's account opening document processing order. Subsequently, the OCR recognition results and authentication results can be used to comprehensively determine whether to approve the user's account opening application.
[0084] As mentioned above, determining the corresponding degradation strategy based on the service type of the account opening service—either requiring user participation or delaying submission—can reduce the impact of high traffic on the account opening service and improve system stability. In addition, asynchronous processing of account opening requests can improve the concurrency of the account opening system, reduce account opening time, and improve account opening efficiency.
[0085] Figure 7 , Figure 7 This is a schematic diagram of a data processing procedure provided in an embodiment of this application. This embodiment mainly describes how the rate limiting device obtains the request result of the account opening service request when the account opening service is a second service type and the price reduction strategy is a queuing strategy. The data processing includes the following steps:
[0086] Step S701: When an account opening service request is received, query the rate limiting conditions of the account opening service corresponding to the account opening service request.
[0087] Step S702: If the account opening service request meets the rate limiting condition, then obtain the degradation strategy corresponding to the account opening service.
[0088] The specific processes of steps S701-S702 can be found above. Figure 3 The corresponding embodiment describes steps S301-S302.
[0089] Step S703: Add the account opening service request to the cache queue and periodically query the status of the account opening service; the status includes a normal status.
[0090] Specifically, when the account opening service is the second service type and the price reduction strategy is a queuing strategy, the rate limiting device adds the account opening service request to the cache queue and periodically queries the status of the account opening service. The status of the account opening service includes normal status or rate limiting status.
[0091] It should be noted that when an account opening request is detected to meet the rate limiting conditions, the account opening service enters a rate-limited state. Of course, if the account opening service's state is not subsequently adjusted, it will remain in a rate-limited state. In this state, the account opening service will not process any requests, and therefore the rate-limiting device will not submit account opening requests to it.
[0092] Optionally, after the rate-limiting device adds an account opening service request to the cache queue, but before periodically querying the status of the account opening service, the rate-limiting device can report a rate-limiting notification message to the business statistics service. This message notifies the business statistics service that the account opening service is in a rate-limited state. The business statistics service also needs to adjust the number of requests in the cache queue based on the rate-limiting statistics message; specifically, it increments the number of requests in the cache queue by 1. Subsequently, when the rate-limiting device needs to periodically query the status of the account opening service, it can obtain the current status of the account opening service by calling the business statistics service.
[0093] Step S704: When the account opening service is in a normal state and the account opening request is in a readable position in the cache queue, read the account opening request from the cache queue and asynchronously call the account opening service to execute the account opening request.
[0094] Specifically, when the rate limiting device detects that the account opening service is in a normal state and the account opening request is in a readable position in the cache queue, it reports the account opening request to the business statistics service. The business statistics service adjusts the execution frequency of the account opening service based on this request; specifically, it increments the execution frequency of the account opening service within the current time period by 1. The rate limiting device also adjusts the number of requests in the cache queue; specifically, it decrements the number of requests in the cache queue by 1. The number of requests in the cache queue can be used by operations personnel to monitor the operation of the account opening system in real time. When the rate limiting device detects that the number of requests in the cache queue exceeds a threshold, it can issue an alarm message. The alarm message notifies operations personnel that there are many people in the queue, allowing them to make corresponding adjustments, such as scaling up the system.
[0095] When the rate limiting device detects that the account opening service is in a normal state and the account opening request is in a readable position in the cache queue, the rate limiting device must not only report the account opening request to the business statistics service, but also asynchronously submit the account opening request to the account opening service. The account opening service processes the account opening request asynchronously and obtains the request result.
[0096] Optionally, as mentioned above, the time period in which the timestamp of the account opening service request is received is called the first time period, and the next time period after the first time period is called the second time period. When the rate limiting device detects that the execution frequency of the account opening service in the second time period is less than the maximum execution frequency in the rate limiting conditions, the rate limiting device reports a normal notification message to the business statistics service. This message is used to notify the business statistics service that the account opening service is in a normal state, that is, to adjust the status of the account opening service from the rate limiting state to the normal state.
[0097] In simple terms, if the number of requests executed by the account opening service within the current time period has reached a threshold, then the account opening service will no longer execute any requests within the current time period, and these requests will be cached in a queue. When the next time period arrives, the count of requests executed by the account opening service restarts. If the number of requests executed by the account opening service in the next time period has not yet reached the threshold, it is determined that the account opening service is in a normal state. A normal account opening service can process requests and therefore can read the cached requests from the previous time period from the queue.
[0098] It should be noted that when the account opening service is in a normal state, the account opening request is in a readable position in the cache queue, and the rate limiting device has not received a new account opening request, the rate limiting device will read the account opening request from the cache queue. Conversely, even if the account opening service is in a normal state and the account opening request is in a readable position in the cache queue, if the rate limiting device receives a new account opening request, the rate limiting device will prioritize processing the new account opening request. After the new account opening request is processed, the rate limiting device will then determine whether the current account opening service is still in a normal state. If so, the rate limiting device will then read the account opening request from the cache queue.
[0099] Optionally, after the rate limiting device caches the account opening service request to the cache queue, it can send a message to the client to remind the user that the current service is busy and please wait. The message can specifically be: "The current service is busy, please wait!"
[0100] Step S705: Receive the request result of the account opening service request returned by the account opening service.
[0101] Optionally, as mentioned above, regardless of whether an account opening request is submitted directly to the account opening service or submitted after a certain period, it needs to be reported to the statistics service. Furthermore, when an account opening request is completed with user assistance, the statistics service is also notified. Additionally, when an account opening request is cached in the cache queue, it is also reported to the statistics service. Therefore, by calling the statistics service, one can obtain the execution frequency of the account opening service over multiple time periods, the number of requests in the cache queue, and the total number of user assistance requests. The rate limiting device can obtain the execution frequency of the account opening service over multiple time periods, the number of requests in the cache queue, the total number of user assistance requests, and the current status of the account opening service by calling the statistics service.
[0102] The rate limiting device can display the execution frequency of the account opening service across multiple time periods, the number of requests in the cache queue, the total number of user assistance requests, and the current status of the account opening service on the interface. Operations personnel can use the interface to understand the operational status of the account opening system, specifically, the number of users in the system queue, the remaining system capacity, and the system health, enabling them to detect application system anomalies.
[0103] Please see Figure 8 , Figure 8 This is a flowchart illustrating the rate limiting process for document authentication requests provided in this application embodiment. When the account opening service request is specifically a document authentication request (i.e., a request to authenticate the uploaded document video), the rate limiting process includes the following steps:
[0104] Step S801: Obtain a document authentication request.
[0105] Step S802: Call the statistics service to obtain whether the document authentication request meets the rate limiting conditions of the document authentication service corresponding to the document authentication request. If it does not meet the conditions, proceed to steps S803-S804; if it does meet the conditions, proceed to steps S805-S810.
[0106] Step S803: Report the document authentication request to the statistics service to update the number of times the document authentication service has been executed within the current time period.
[0107] Step S804: Asynchronously call the document authentication service to obtain the request result of the document authentication request.
[0108] Step S805: Report to the monitoring platform and put the document authentication request into the Redis queue.
[0109] Step S806: Periodically call the statistics service to check whether the document authentication service is under rate limiting.
[0110] Step S807: If not in rate-limited mode, multi-threaded consumption (or reading) of requests in the Redis queue.
[0111] Step S808: Set a cloth lock on the request in the Redis queue to prevent the request from being consumed by other threads.
[0112] Step S809: Report the document authentication request to the statistics service to update the number of times the document authentication service has been executed within the current time period.
[0113] Step S810: Asynchronously call the document authentication service to obtain the request result of the document authentication request.
[0114] Please see Figure 9 , Figure 9This is a schematic diagram illustrating the operation of an account opening system provided in this application embodiment. Users can obtain information about the system's operational status and health by calling the business statistics service. This allows for timely understanding of activity operation data and targeted adjustments to activity strategies.
[0115] Specifically, the number of certificate OCR recognition requests can be obtained through business statistics services (i.e. Figure 9 The number of TU OCR transactions requested and the number of document authentication requests received (i.e.) Figure 9 The data includes: the number of TU-authenticated transactions, the number of successful account openings, the number of completed account opening submissions (i.e., the number of users applying for account opening), the number of account opening requests that passed QC review (i.e., the number of account opening business requests that passed QC review), the number of anti-money laundering reviews that failed, the number of failed account openings, the number of review rejections, the number of account opening requests that met QA flow control (i.e., the number of account opening business requests that met QA flow control conditions), the number of requests requiring supplementary information, the number of account opening requests that met OCR flow control conditions (i.e., the number of account opening business requests that met OCR flow control conditions), and the number of account opening requests that met authentication flow control.
[0116] Please see Figure 10 , Figure 10 This is a schematic diagram of a monitoring platform for an account opening business system provided in an embodiment of this application. Operators can use the system monitoring platform to view the health curve and dashboard of the account opening business system in real time, and understand the system's error codes, as well as information such as the number of successful account openings. Figure 10 As shown, the monitoring platform can monitor in real time the number of successfully opened accounts at various time periods, as well as the total number of account opening applications (e.g., ...). Figure 10 The total number of successfully opened accounts (as shown in 100,691) Figure 10 The total number of failed account openings (as shown in 100,659) Figure 10 As shown in 32), it can also monitor the total number of system error codes reported by the account opening system (such as...). Figure 10 The system error codes shown total 32. It can also monitor the percentage of the 20 most frequently reported system error codes from the account opening system relative to the total number of system error codes. For example... Figure 10 As shown, error code 1 and error code 2 are two of the 20 most frequently reported system error codes in the account opening system.
[0117] Please see Figure 11 , Figure 11This is an overall deployment architecture diagram of an account opening business system provided in an embodiment of this application. The architecture of the account opening business system mainly includes: Web service, rate limiting service, database operation service, etc. The service registry handles service registration, service discovery, and service disaster recovery switching. The web service processes user app operation requests and returns responses. The COS file storage service stores uploaded ID images and videos during the account opening process. The rate limiting service handles rate limiting threshold judgment, asynchronous requests, and production queue information for the interface (i.e., the account opening service of this application). The database operation service handles database operations and database disaster recovery switching. The Timer service consumes requests in the queue and reports response results to the monitoring platform. The user center service stores and verifies user login and user status information. The cache queue stores temporarily unprocessed account opening requests. Services provided by Service Provider 1 (including ID verification, character recognition service 1, and character recognition service 2) can be called via a CC proxy, and services provided by Service Provider 2 (including ID character verification, ID verification, and credit verification services) can be called via a Proxy.
[0118] As described above, the monitoring platform of this application can perceive the operation of the account opening system in real time. Once an anomaly occurs, it will promptly notify the operations personnel, which greatly improves the efficiency of handling account opening system faults. Furthermore, by consuming requests in the queue through multiple threads, the processing efficiency of requests can be improved and the user waiting time can be reduced. In addition, during the process of consuming requests in the queue through multiple threads, a distributed lock is used to avoid duplicate consumption of requests, which further improves the processing efficiency of business requests.
[0119] For further details, please see Figure 12 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. Figure 12 As shown, the data processing device 1 can be applied to the above-mentioned Figures 3-11 The current limiting device in the corresponding embodiment. Specifically, the data processing device 1 can be a computer program (including program code) running on a computer device, for example, the data processing device 1 is an application software; the data processing device 1 can be used to execute the corresponding steps in the method provided in the embodiments of this application.
[0120] The data processing device 1 may include a query module 11, an acquisition module 12, and a processing module 13.
[0121] The query module 11 is used to query the rate limiting conditions of the account opening service corresponding to the account opening service request when an account opening service request is received.
[0122] The acquisition module 12 is used to acquire the degradation strategy corresponding to the account opening service if the account opening service request meets the rate limiting condition.
[0123] Processing module 13 is used to process the account opening service request based on the degradation strategy to obtain the request result of the account opening service request;
[0124] Specifically, the amount of account opening service resources consumed by the degradation strategy to obtain the request result is less than the amount of account opening service resources consumed by the account opening service to execute the account opening request and obtain the request result; or, the time consumed by the degradation strategy to obtain the request result is greater than the time consumed by the account opening service to execute the account opening request and obtain the request result.
[0125] In one possible implementation, the data processing device 1 may further include a calling module 14.
[0126] The module 14 is used to asynchronously call the account opening service to execute the account opening service request if the account opening service request does not meet the rate limiting condition, and to report the account opening service request to the business statistics service, so that the business statistics service adjusts the execution frequency of the account opening service according to the account opening service request.
[0127] The calling module 14 is also used to receive the request result of the account opening service request returned by the account opening service.
[0128] In one possible implementation,
[0129] The account opening service is a first service type, and the degradation strategy is a user assistance strategy corresponding to the first service type. The amount of account opening service resources consumed by using the user assistance strategy to obtain the request result is less than the amount of account opening service resources consumed by the account opening service to execute the account opening request and obtain the request result; or...
[0130] The account opening service is a second service type, and the degradation strategy is a queuing strategy corresponding to the second service type. The time consumed by the queuing strategy to obtain the request result is greater than the time consumed by the account opening service to execute the account opening request and obtain the request result. The first service type and the second service type are divided according to the request content.
[0131] In one possible implementation, when the account opening service is the first service type, the processing module 13, when processing the account opening request based on the degradation strategy to obtain the request result of the account opening request, specifically performs the following:
[0132] A user assistance request is generated based on the account opening service request, and the user assistance request is sent to the client corresponding to the account opening service request, so that the client displays a pop-up window based on the user assistance request, and the pop-up window is used to receive user input text;
[0133] Receive the user input text sent by the client, and use the user input text as the request result of the account opening service request;
[0134] The acquisition module 12 is further configured to:
[0135] The user assistance request is reported to the business statistics service, which then calculates the total number of user assistance requests based on the user assistance request.
[0136] In one possible implementation, when the account opening service is a second service type, the processing module 13, when processing the account opening request based on the degradation strategy to obtain the request result of the account opening request, specifically performs the following:
[0137] The account opening request is added to a cache queue, and the status of the account opening service is queried periodically; the status includes a normal status.
[0138] When the account opening service is in a normal state and the account opening request is in a readable position in the cache queue, the account opening request is read from the cache queue and the account opening service is asynchronously invoked to execute the account opening request.
[0139] Receive the request result of the account opening service returned by the account opening service.
[0140] In one possible implementation, the data processing device 1 may further include a first reporting module 15.
[0141] The first reporting module 15 is used to report the account opening service request to the business statistics service, so that the business statistics service adjusts the execution frequency of the account opening service according to the account opening service request, and adjusts the number of requests contained in the cache queue by the business statistics service.
[0142] In one possible implementation, the data processing device 1 may further include a second reporting module 16.
[0143] The second reporting module 16 is used to report a rate limiting notification message to the business statistics service so that the business statistics service can adjust the number of requests contained in the cache queue according to the rate limiting notification message. The rate limiting notification message is used to indicate that the account opening business service is in a rate limiting state.
[0144] When the processing module 13 is used to periodically query the status of the account opening service, it is specifically used for:
[0145] The status of the account opening service is obtained by periodically calling the business statistics service.
[0146] In one possible implementation, the data processing device 1 may further include a display module 17.
[0147] The display module 17 is used to call the business statistics service to obtain the execution frequency of the account opening business service in multiple unit time periods, and to call the business statistics service to obtain the number of requests contained in the cache queue.
[0148] The display module 17 is also used to display the execution frequency of the account opening service in multiple time periods on the interface, as well as the number of requests contained in the cache queue.
[0149] In one possible implementation, the rate limiting condition includes the maximum number of times the account opening service can be executed within a unit time period;
[0150] The data processing device 1 may further include: a judgment module 18, the judgment module 18 being used for:
[0151] Obtain the timestamp of the received account opening request;
[0152] Call the business statistics service to obtain the execution frequency of the account opening business service within the first unit time period where the received timestamp is located;
[0153] If the number of times the account opening service has been executed within the first unit time period is less than the maximum number of executions, then it is determined that the account opening service request does not meet the rate limiting condition.
[0154] If the number of times the account opening service has been executed within the first unit time period is not less than the maximum number of executions, then the account opening service request is determined to meet the rate limiting condition.
[0155] In one possible implementation, the determining module 18 is further configured to:
[0156] When it is detected that the execution frequency of the account opening service within the second unit time period is less than the maximum execution number, a normal notification message is reported to the business statistics service. The normal notification message is used to indicate that the account opening service is in a normal state. The second unit time period is the next unit time period after the first unit time period.
[0157] In one possible implementation, the account opening request includes a processing object and the electronic signature of the processing object;
[0158] When the query module 11 receives an account opening request and queries the rate limiting conditions of the account opening service corresponding to the account opening request, it is specifically used for:
[0159] When an account opening request is received, the electronic signature is verified according to the processing object. When the verification is successful, the rate limiting conditions of the account opening service corresponding to the account opening request are queried.
[0160] According to an embodiment of the present invention, Figures 3-11 Each step involved in the method shown can be performed by... Figure 12 The data processing is performed by the various modules within the shown data processing device. For example, Figure 3 Steps S301-S303 shown Figure 5 Steps S501-S506 are shown. Figure 7 Steps S701-S702 shown can be respectively performed by Figure 12 The query module 11, retrieval module 12, processing module 13, and calling module 14 shown are used for execution; for example, Figure 7 Steps S703-S705 shown in the figure Figure 8 Steps S801-S810 shown can be respectively generated by Figure 12 The first reporting module 15, the second reporting module 16, the display module 17, and the judgment module 18 shown are used to execute this.
[0161] Further, please see Figure 13 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figures 3-11 In the corresponding embodiment, the terminal device can be a computer device 1000. For example... Figure 13As shown, computer device 1000 may include a user interface 1002, a processor 1004, an encoder 1006, and a memory 1008. A signal receiver 1016 is used to receive or transmit data via a cellular interface 1010, a Wi-Fi interface 1012, ..., or an NFC interface 1014. The encoder 1006 encodes the received data into a data format that can be processed by a computer. The memory 1008 stores a computer program, and the processor 1004 is configured to execute the steps in any of the above method embodiments via the computer program. The memory 1008 may include volatile memory (e.g., dynamic random access memory DRAM) and may also include non-volatile memory (e.g., one-time programmable read-only memory OTPROM). In some instances, the memory 1008 may further include memory remotely located relative to the processor 1004, which can be connected to the computer device 1000 via a network. The user interface 1002 may include a keyboard 1018 and a display 1020.
[0162] exist Figure 13 In the computer device 1000 shown, the processor 1004 can be used to call computer programs stored in the memory 1008 to achieve:
[0163] When an account opening request is received, query the rate limiting conditions of the account opening service corresponding to the account opening request.
[0164] If the account opening service request meets the rate limiting condition, then obtain the degradation strategy corresponding to the account opening service.
[0165] The account opening request is processed based on the aforementioned degradation strategy to obtain the request result of the account opening request.
[0166] Specifically, the amount of account opening service resources consumed by the degradation strategy to obtain the request result is less than the amount of account opening service resources consumed by the account opening service to execute the account opening request and obtain the request result; or, the time consumed by the degradation strategy to obtain the request result is greater than the time consumed by the account opening service to execute the account opening request and obtain the request result.
[0167] In one embodiment, the processor 1004 further performs the following steps:
[0168] If the account opening service request does not meet the rate limiting condition, the account opening service is asynchronously invoked to execute the account opening service request, and the account opening service request is reported to the business statistics service, so that the business statistics service adjusts the execution frequency of the account opening service according to the account opening service request.
[0169] Receive the request result of the account opening service returned by the account opening service.
[0170] In one embodiment, the account opening service is a first service type, and the degradation strategy is a user assistance strategy corresponding to the first service type. The amount of account opening service resources consumed by using the user assistance strategy to obtain the request result is less than the amount of account opening service resources consumed by the account opening service to execute the account opening request and obtain the request result; or...
[0171] The account opening service is a second service type, and the degradation strategy is a queuing strategy corresponding to the second service type. The time consumed by the queuing strategy to obtain the request result is greater than the time consumed by the account opening service to execute the account opening request and obtain the request result. The first service type and the second service type are divided according to the request content.
[0172] In one embodiment, when the account opening service is the first service type, the processor 1004, when processing the account opening request based on the degradation strategy and obtaining the request result of the account opening request, specifically performs the following steps:
[0173] A user assistance request is generated based on the account opening service request, and the user assistance request is sent to the client corresponding to the account opening service request, so that the client displays a pop-up window based on the user assistance request, and the pop-up window is used to receive user input text;
[0174] Receive the user input text sent by the client, and use the user input text as the request result of the account opening service request;
[0175] The processor 1004 further performs the following steps:
[0176] The user assistance request is reported to the business statistics service, which then calculates the total number of user assistance requests based on the user assistance request.
[0177] In one embodiment, when the account opening service is a second service type, the processor 1004, when processing the account opening request based on the degradation strategy and obtaining the request result of the account opening request, specifically performs the following steps:
[0178] The account opening request is added to a cache queue, and the status of the account opening service is queried periodically; the status includes a normal status.
[0179] When the account opening service is in a normal state and the account opening request is in a readable position in the cache queue, the account opening request is read from the cache queue and the account opening service is asynchronously invoked to execute the account opening request.
[0180] Receive the request result of the account opening service returned by the account opening service.
[0181] In one embodiment, before executing the asynchronous call to the account opening service to execute the account opening request step, the processor 1004 further performs the following steps:
[0182] The account opening service request is reported to the business statistics service, which then adjusts the execution frequency of the account opening service based on the account opening service request, and adjusts the number of requests contained in the cache queue.
[0183] In one embodiment, before performing the step of periodically querying the status of the account opening service, the processor 1004 further performs the following steps:
[0184] A rate limiting notification message is reported to the business statistics service so that the business statistics service can adjust the number of requests contained in the cache queue according to the rate limiting notification message. The rate limiting notification message is used to indicate that the account opening business service is in a rate limiting state.
[0185] When the processor 1004 performs a periodic query on the status of the account opening service, it specifically executes the following steps:
[0186] The status of the account opening service is obtained by periodically calling the business statistics service.
[0187] In one embodiment, the processor 1004 further performs the following steps:
[0188] Call the business statistics service to obtain the execution frequency of the account opening business service in multiple unit time periods, and call the business statistics service to obtain the number of requests contained in the cache queue;
[0189] The interface displays the execution frequency of the account opening service across multiple time units, as well as the number of requests contained in the cache queue.
[0190] In one embodiment, the rate limiting condition includes the maximum number of times the account opening service can be executed within a unit time period;
[0191] The processor 1004 further performs the following steps:
[0192] Obtain the timestamp of the received account opening request;
[0193] Call the business statistics service to obtain the execution frequency of the account opening business service within the first unit time period where the received timestamp is located;
[0194] If the number of times the account opening service has been executed within the first unit time period is less than the maximum number of executions, then it is determined that the account opening service request does not meet the rate limiting condition.
[0195] If the number of times the account opening service has been executed within the first unit time period is not less than the maximum number of executions, then the account opening service request is determined to meet the rate limiting condition.
[0196] In one embodiment, the processor 1004 further performs the following steps:
[0197] When it is detected that the execution frequency of the account opening service within the second unit time period is less than the maximum execution number, a normal notification message is reported to the business statistics service. The normal notification message is used to indicate that the account opening service is in a normal state. The second unit time period is the next unit time period after the first unit time period.
[0198] In one embodiment, the account opening request includes a processing object and the electronic signature of the processing object;
[0199] When the processor 1004 receives an account opening service request and queries the rate limiting conditions of the account opening service corresponding to the account opening service request, it specifically performs the following steps:
[0200] When an account opening request is received, the electronic signature is verified according to the processing object. When the verification is successful, the rate limiting conditions of the account opening service corresponding to the account opening request are queried.
[0201] It should be understood that the computer device 1000 described in the embodiments of this application can execute the foregoing text. Figures 3-11 The description of the data processing method in the corresponding embodiments can also be performed as described above. Figure 12 The description of the data processing device 1 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.
[0202] Furthermore, it should be noted that this application embodiment also provides a computer storage medium, which stores a computer program executed by the aforementioned data processing device 1. The computer program includes program instructions, and when the processor executes the program instructions, it can execute the aforementioned... Figures 3-11The description of the data processing method in the corresponding embodiments is already provided and will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the embodiments of the computer storage medium involved in this application, please refer to the description of the method embodiments of this application. As an example, program instructions can be deployed and executed on a single computer device, or on multiple computer devices located in one location, or on multiple computer devices distributed across multiple locations and interconnected via a communication network. Multiple computer devices distributed across multiple locations and interconnected via a communication network can be combined to form a blockchain network.
[0203] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned... Figures 3 to 11 The methods described in the corresponding embodiments are therefore not repeated here.
[0204] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0205] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A data processing method, characterized in that, include: When an account opening request is received, query the rate limiting conditions of the account opening service corresponding to the account opening request. If the account opening service request meets the rate limiting condition, then a degradation strategy corresponding to the account opening service is obtained; the degradation strategy corresponds to the service type of the account opening service, which is either a first service type or a second service type, and the first service type and the second service type are determined based on whether the service content of the account opening service can be completed by the user; The account opening request is processed based on the aforementioned degradation strategy to obtain the request result of the account opening request. Wherein, if the account opening service is a first service type, the degradation strategy is a user assistance strategy corresponding to the first service type, and the amount of account opening service resources consumed by the user assistance strategy to obtain the request result is less than the amount of account opening service resources consumed by the account opening service to execute the account opening request to obtain the request result. Alternatively, if the account opening service is a second service type, the degradation strategy is a queuing strategy corresponding to the second service type, and the time consumed by the queuing strategy to obtain the request result is greater than the time consumed by the account opening service to execute the account opening request and obtain the request result.
2. The method according to claim 1, characterized in that, The method further includes: If the account opening service request does not meet the rate limiting condition, the account opening service is asynchronously invoked to execute the account opening service request, and the account opening service request is reported to the business statistics service, so that the business statistics service adjusts the execution frequency of the account opening service according to the account opening service request. Receive the request result of the account opening service returned by the account opening service.
3. The method according to claim 1, characterized in that, When the account opening service is the first service type, the process of handling the account opening request based on the degradation strategy to obtain the request result includes: A user assistance request is generated based on the account opening service request, and the user assistance request is sent to the client corresponding to the account opening service request, so that the client displays a pop-up window based on the user assistance request, and the pop-up window is used to receive user input text; Receive the user input text sent by the client, and use the user input text as the request result of the account opening service request; The method further includes: The user assistance request is reported to the business statistics service, which then calculates the total number of user assistance requests based on the user assistance request.
4. The method according to claim 3, characterized in that, When the account opening service is a second service type, the process of handling the account opening request based on the degradation strategy to obtain the request result includes: The account opening request is added to a cache queue, and the status of the account opening service is queried periodically; the status includes a normal status. When the account opening service is in a normal state and the account opening request is in a readable position in the cache queue, the account opening request is read from the cache queue and the account opening service is asynchronously invoked to execute the account opening request. Receive the request result of the account opening service returned by the account opening service.
5. The method according to claim 4, characterized in that, Before the asynchronous call to the account opening service to execute the account opening request step, the method further includes: The account opening service request is reported to the business statistics service, which then adjusts the execution frequency of the account opening service based on the account opening service request, and adjusts the number of requests contained in the cache queue.
6. The method according to claim 4, characterized in that, Before the step of periodically querying the status of the account opening service, the following steps are also included: A rate limiting notification message is reported to the business statistics service so that the business statistics service adjusts the number of requests contained in the cache queue according to the rate limiting notification message. The rate limiting notification message is used to indicate that the account opening business service is in a rate limiting state. The periodic query of the account opening service status includes: The status of the account opening service is obtained by periodically calling the business statistics service.
7. The method according to claim 6, characterized in that, The method further includes: Call the business statistics service to obtain the execution frequency of the account opening business service in multiple unit time periods, and call the business statistics service to obtain the number of requests contained in the cache queue; The interface displays the execution frequency of the account opening service across multiple time units, as well as the number of requests contained in the cache queue.
8. The method according to any one of claims 1-7, characterized in that, The rate limiting conditions include the maximum number of times the account opening service can be executed within a unit time period; The method further includes: Obtain the timestamp of the received account opening request; Call the business statistics service to obtain the execution frequency of the account opening business service within the first unit time period where the received timestamp is located; If the number of times the account opening service has been executed within the first unit time period is less than the maximum number of executions, then it is determined that the account opening service request does not meet the rate limiting condition. If the number of times the account opening service has been executed within the first unit time period is not less than the maximum number of executions, then the account opening service request is determined to meet the rate limiting condition.
9. The method according to claim 8, characterized in that, The method further includes: When it is detected that the execution frequency of the account opening service within the second unit time period is less than the maximum execution number, a normal notification message is reported to the business statistics service. The normal notification message is used to indicate that the account opening service is in a normal state. The second unit time period is the next unit time period after the first unit time period.
10. The method according to claim 1, characterized in that, The account opening request includes a processing object and the electronic signature of the processing object; When an account opening request is received, the step of querying the rate limiting conditions of the account opening service corresponding to the account opening request includes: When an account opening request is received, the electronic signature is verified according to the processing object. When the verification is successful, the rate limiting conditions of the account opening service corresponding to the account opening request are queried.
11. A data processing apparatus, characterized in that, include: The query module is used to query the rate limiting conditions of the account opening service corresponding to the account opening service request when an account opening service request is received. The acquisition module is used to acquire a degradation strategy corresponding to the account opening service if the account opening service request meets the rate limiting condition; the degradation strategy corresponds to the service type of the account opening service, the service type is a first service type or a second service type, and the first service type and the second service type are divided according to whether the service content of the account opening service can be completed by the user; The processing module is used to process the account opening service request based on the degradation strategy and obtain the request result of the account opening service request. Wherein, if the account opening service is a first service type, the degradation strategy is a user assistance strategy corresponding to the first service type, and the amount of account opening service resources consumed by the user assistance strategy to obtain the request result is less than the amount of account opening service resources consumed by the account opening service to execute the account opening request to obtain the request result. Alternatively, if the account opening service is a second service type, the degradation strategy is a queuing strategy corresponding to the second service type, and the time consumed by the queuing strategy to obtain the request result is greater than the time consumed by the account opening service to execute the account opening request and obtain the request result.
12. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1-10.
13. A computer storage medium, characterized in that, The computer storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, cause a computer device having the processor to perform the steps of the method according to any one of claims 1-10.
14. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-10.
Citation Information
Patent Citations
Service degradation method and device, storage medium and computer equipment
CN112398700A