Data request processing method and device, computer equipment, readable storage medium and program product

By storing account information in the cache server and deducting the amount by using the preset quota module, the problem of response blockage in high concurrency scenarios is solved, and data processing efficiency and security are improved.

CN119449885APending Publication Date: 2025-02-14SUZHOU LANGDONG NET TEC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411555910.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the scenario where multiple accounts connect to data services, high concurrency scenarios may lead to blockage of a single response, resulting in inefficiency of data services.

Method used

By storing account information in the cache server and directly obtaining account information from the cache server when receiving data requests, avoid frequent interaction with the account information database. At the same time, the preset quota processing module is used to deduct quota to ensure the atomicity of the operation.

Benefits of technology

Reduce response blockage in high concurrency scenarios, improve data processing efficiency, shorten data service response time, and ensure the security and reliability of data processing processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449885A_ABST
    Figure CN119449885A_ABST
Patent Text Reader

Abstract

The invention relates to a data request processing method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: in response to a received data request sent by an account, obtaining an account identifier of the account; when account information matched with the account identifier exists in a cache server, the account information is obtained from the cache server, and the account information is obtained from an account information database when a first data request sent by the account is received in a cache period corresponding to the current moment; and under the condition that the account information accords with a verification condition, obtaining service data matched with the data request from a service database, and sending the service data to the account. By adopting the method, the data request processing efficiency can be improved, and the data service response time can be shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, apparatus, computer device, computer-readable storage medium and computer program product for processing data requests. Background Art

[0002] In the data services provided to the outside world, in order to ensure the security and reliability of the data services, when receiving a data request from an account, it is necessary to first verify whether the identity and service of the request are valid, and then enter the call process. After the call is completed, the account balance will be deducted.

[0003] However, when multiple accounts are connected to data services, high concurrency scenarios are inevitable when processing interface requests sent by accounts. At this time, a single response may be blocked, resulting in low data service efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide a data request processing method, apparatus, computer device, computer-readable storage medium and computer program product that can improve efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for processing a data request, comprising:

[0006] In response to receiving a data request sent by an account, obtaining an account identifier of the account;

[0007] When account information matching the account identifier exists in the cache server, the account information is obtained from the cache server, wherein the account information is obtained from the account information database when the first data request sent by the account is received within the cache period corresponding to the current moment;

[0008] When the account information meets the verification condition, business data matching the data request is obtained from a business database, and the business data is sent to the account.

[0009] In one embodiment, after sending the business data to the account, the method further includes:

[0010] Generate a quota deduction request matching the data request;

[0011] According to the deduction amount corresponding to the amount deduction request, the data service amount corresponding to the account is deducted by using a preset amount processing module in the cache server to obtain the deducted data service amount, wherein the preset amount processing module is configured not to receive other requests when processing the amount deduction request.

[0012] In one embodiment, after sending the business data to the account, the method further includes:

[0013] Obtaining log data corresponding to the data request, the log data including request information, service content, consumption quota, and quota deduction information;

[0014] The log data is sent to a preset log queue.

[0015] In one embodiment, the method further comprises:

[0016] In response to receiving a data proofreading instruction, determining a proofreading period and a proofreading account corresponding to the data proofreading instruction;

[0017] Acquire target log data generated by the account to be checked within the period to be checked from the preset log queue;

[0018] The amount to be deducted corresponding to the period to be proofread is determined according to the target log data, and the amount of the account to be proofread is deducted in the account information database to obtain the amount after deduction.

[0019] In one embodiment, the account information includes the service scope of the account and the remaining balance of the account, and when the account information meets the verification condition, obtaining business data matching the data request from the business database includes:

[0020] Determine the service type and consumption amount corresponding to the data request;

[0021] When the service type is within the service scope and the consumption amount is less than or equal to the remaining amount, business data matching the data request is acquired from a business database.

[0022] In one embodiment, when the account information meets the verification condition, obtaining business data matching the data request from a business database, the method further includes:

[0023] When there is no account information matching the account identifier in the cache server, acquiring the account information matching the account identifier from the account information database;

[0024] The account information is loaded into the cache server, and the cache duration is set to a preset cache period.

[0025] In a second aspect, the present application further provides a data request processing device, comprising:

[0026] A first acquisition module, configured to acquire an account identifier of the account in response to receiving a data request sent by the account;

[0027] A second acquisition module is used to acquire the account information from the cache server when there is account information matching the account identifier in the cache server, wherein the account information is acquired from the account information database when the first data request sent by the account is received within the cache period corresponding to the current moment;

[0028] The sending module is used to obtain business data matching the data request from a business database and send the business data to the account if the account information meets the verification conditions.

[0029] In one embodiment, the device further comprises:

[0030] A generating module, used to generate a credit limit deduction request matching the data request;

[0031] A deduction module is used to deduct the data service quota corresponding to the account in the cache server using a preset quota processing module according to the deduction quota corresponding to the quota deduction request, so as to obtain the deducted data service quota, wherein the preset quota processing module is configured not to receive other requests when processing the quota deduction request.

[0032] In one embodiment, the device further comprises:

[0033] A first acquisition submodule is used to acquire log data corresponding to the data request, wherein the log data includes request information, service content, consumption quota, and quota deduction information;

[0034] The sending submodule is used to send the log data to a preset log queue.

[0035] In one embodiment, the device further comprises:

[0036] A first determination submodule is used to determine, in response to receiving a data proofreading instruction, a proofreading period and a proofreading account corresponding to the data proofreading instruction;

[0037] A second acquisition submodule is used to acquire, from the preset log queue, target log data generated by the account to be checked within the period to be checked;

[0038] The second determination submodule is used to determine the amount to be deducted corresponding to the to-be-checked period according to the target log data, and deduct the amount of the to-be-checked account in the account information database to obtain the deducted amount.

[0039] In one embodiment, the account information includes the service scope of the account and the remaining balance of the account, and the sending module is further used to:

[0040] Determine the service type and consumption amount corresponding to the data request;

[0041] When the service type is within the service scope and the consumption amount is less than or equal to the remaining amount, business data matching the data request is acquired from a business database.

[0042] In one embodiment, the device further comprises:

[0043] A third acquisition submodule, configured to acquire account information matching the account identifier from an account information database when account information matching the account identifier does not exist in the cache server;

[0044] The loading module is used to load the account information into the cache server and set the cache duration to a preset cache period.

[0045] In a third aspect, an embodiment of the present disclosure further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the methods in the embodiments of the present disclosure are implemented.

[0046] In a fourth aspect, the embodiments of the present disclosure further provide a computer-readable storage medium, wherein a computer program is stored thereon, and when the computer program is executed by a processor, the steps of any one of the methods in the embodiments of the present disclosure are implemented.

[0047] In a fifth aspect, the embodiments of the present disclosure further provide a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of any one of the methods in the embodiments of the present disclosure are implemented.

[0048] The above-mentioned data request processing method, device, computer equipment, computer-readable storage medium and computer program product, when receiving a data request sent by an account, obtains the account identifier of the account and searches it in the cache server. When there is account information matching the account identifier in the cache server, the account information is obtained from the cache server, wherein the account information is obtained from the account information database when the first data request sent by the account is received in the cache period corresponding to the current moment, so that the account information can be obtained according to the received data request within a certain period and stored in the cache server. If the account data request is received again within the period, the account information can be directly obtained from the cache server without interacting with the account information database again. Only one interaction with the account information database is required within a certain period, which effectively reduces the amount of data processing, improves data processing efficiency, reduces the problem of response congestion in high-concurrency scenarios, effectively shortens the data service response time, and is applicable to more application scenarios. And when the account information meets the verification, the business data is obtained from the business database and sent to the account, and each data request is verified by the account information, which can also ensure the security and reliability of the data processing process in high-concurrency scenarios, taking into account both data processing efficiency and data processing security. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 An application environment diagram of a method for processing a data request in one embodiment;

[0051] Figure 2 A flowchart of a method for processing a data request in an embodiment;

[0052] Figure 3 A flowchart of a credit limit deduction process in an embodiment;

[0053] Figure 4 is a flow chart of a method for processing a data request in another embodiment;

[0054] Figure 5 is a structural block diagram of a data request processing device in one embodiment;

[0055] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] The data request processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server can include but is not limited to a cache server, a database server, a business server, a log server, etc. The cache server receives the data request sent by the account through the terminal, and obtains the account identifier of the account, searches in the cache server, and if there is account information matching the account identifier, the account information is directly obtained in the cache server. The cache server verifies the account. After the verification is passed, the business data matching the data request is obtained from the business database of the business server and sent to the terminal corresponding to the account. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0058] In an exemplary embodiment, Figure 2 As shown, a method for processing a data request is provided, and the method is applied to Figure 1 The following is an example of a server in the example, including:

[0059] Step S210, in response to receiving a data request sent by an account, obtaining an account identifier of the account;

[0060] Exemplarily, the account can send a data request through a preset interface. In one example, a data service platform can provide data services for the account, and the account sends a data request on a corresponding interface on the data service platform.

[0061] Optionally, the data request carries an account identifier of the account, and the account identifier is used to perform operations such as identity verification on the account. In an example, the account identifier may be set as a unique key corresponding to the account.

[0062] In a possible implementation, the cache server receives a data request sent by an account and obtains an account identifier.

[0063] Step S220, when account information matching the account identifier exists in the cache server, the account information is obtained from the cache server, wherein the account information is obtained from the account information database when the first data request sent by the account is received within the cache period corresponding to the current moment;

[0064] Exemplarily, after obtaining the account identifier, the cache server is searched according to the account identifier. In one example, the cache database in the cache server can be searched. The account information may include but is not limited to the service scope corresponding to the account, the remaining balance of the account, etc., which can be determined according to the actual application scenario.

[0065] Optionally, after receiving a data request for an account, if the account information is not found in the cache server, the corresponding account information can be obtained from the account information database, and the obtained account information can be stored in the cache server, and a cache time can be set. If the corresponding account information can be found in the cache server, it can be considered that the account information has been cached before the current time, that is, it is cached in the cache server when the first data request is received within the cache period corresponding to the current time.

[0066] In one example, the account information database may be set in a database server to store the account information.

[0067] Step S230, when the account information meets the verification condition, obtain the business data matching the data request from the business database, and send the business data to the account.

[0068] Exemplarily, the account information is verified. If the account information meets the verification conditions, it is considered that the verification is passed, and the business data matching the data request is obtained from the business database and sent to the account.

[0069] In an example, the verification conditions can be determined based on the actual application scenario, and verification and judgment can be performed on multi-dimensional information such as basic account information, whether the service has expired, whether the service is out of scope, whether the account balance is sufficient, etc., to ensure the security and reliability of data processing.

[0070] Optionally, the business database may be arranged in the business server for storing business-related data. In one example, the business database may be used to store all or part of the business-related data of the data service platform, and the business-related data is used to provide the required data to the account.

[0071] In the embodiment of the present disclosure, when a data request sent by an account is received, the account identifier of the account is obtained and searched in the cache server. When there is account information matching the account identifier in the cache server, the account information is obtained from the cache server, wherein the account information is obtained from the account information database when the first data request sent by the account is received in the cache period corresponding to the current moment, so that the account information can be obtained according to the received data request within a certain period and stored in the cache server. If the data request of the account is received again within the period, the account information can be directly obtained from the cache server without interacting with the account information database again. Only one interaction with the account information database is required within a certain period, which effectively reduces the amount of data processing, improves the data processing efficiency, reduces the problem of response congestion in high-concurrency scenarios, and is applicable to more application scenarios. And when the account information meets the verification, the business data is obtained from the business database and sent to the account, and each data request is verified by the account information, which can also ensure the security and reliability of the data processing process in high-concurrency scenarios, taking into account both data processing efficiency and data processing security.

[0072] In one embodiment, after sending the business data to the account, the method further includes:

[0073] Generate a quota deduction request matching the data request;

[0074] According to the deduction amount corresponding to the amount deduction request, the data service amount corresponding to the account is deducted by using a preset amount processing module in the cache server to obtain the deducted data service amount, wherein the preset amount processing module is configured not to receive other requests when processing the amount deduction request.

[0075] Exemplarily, after the business data is sent to the account, a credit deduction operation needs to be performed to generate a credit deduction request that matches the data request. In one example, the credit deduction request may include but is not limited to the deduction amount, the data request content corresponding to the credit deduction, the execution time of the data request corresponding to the credit deduction, etc., which can be determined based on the actual application scenario.

[0076] The corresponding deduction amount can be determined according to the quota deduction request, and the data service quota corresponding to the account is deducted by using the preset quota processing module in the cache server. The preset quota processing module can be obtained by encapsulating according to the preset encapsulation mode. In one example, the preset encapsulation mode can include a Lua script, and all logics are encapsulated in the Lua script to obtain the preset quota processing module, which is executed as a whole. There is no race condition during execution, and atomic execution is guaranteed.

[0077] Optionally, the preset credit limit processing module only performs operations on one credit limit deduction request at the same time, avoiding the problem of deduction errors when processing multiple requests at the same time, that is, the preset credit limit processing module is configured not to receive other requests when processing the credit limit deduction request. In one example, when there are multiple credit limit deduction requests, credit limit deductions can be performed sequentially through the preset credit limit processing module.

[0078] In one possible implementation, the process of deducting the data service quota corresponding to the account using a preset quota processing module is executed in the cache server, with the purpose of temporarily updating the quota, reducing interactions with other servers, and ensuring the accuracy of the account's data service quota.

[0079] Figure 3 is a schematic diagram showing a credit limit deduction process according to an exemplary embodiment, referring to Figure 3 As shown, the credit limit deduction logic is encapsulated by the Lua script. For the request thread requesting credit limit deduction, the script runs the encapsulated logic as a whole, thereby ensuring that the credit limit deduction can be correctly executed for each request thread without any race condition problem.

[0080] In the disclosed embodiment, after obtaining business data and sending it to the account, a corresponding credit deduction request is generated, and according to the deduction credit corresponding to the credit deduction request, a preset credit processing module is used in the cache server to deduct the data service credit corresponding to the account to obtain the deducted data service credit, and the credit deduction is executed by a separate preset credit processing module in the cache server, and the processing procedure is set so that other requests are not received when processing the credit deduction request, and the execution will not be interrupted by other commands, and there is no race condition problem, which avoids the problem of credit deduction errors in high concurrency scenarios, and is suitable for more application scenarios; and in this embodiment, credit deduction is performed in the cache server, while ensuring data processing efficiency and reducing data interaction complexity.

[0081] In one embodiment, after sending the business data to the account, the method further includes:

[0082] Obtaining log data corresponding to the data request, the log data including request information, service content, consumption quota, and quota deduction information;

[0083] The log data is sent to a preset log queue.

[0084] Exemplarily, after the business data is sent to the account, log records can also be performed. In one example, log data corresponding to the data request is obtained, and the log data may include but is not limited to request information, service content, consumption quota, and quota deduction information, wherein the information in the log data is all information corresponding to the data request.

[0085] In one example, log data is stored in a log queue, and the log data is sent to a preset log queue, which can be set according to an actual application scenario. In one example, the preset log queue can be stored in a log server.

[0086] The disclosed embodiment records log data corresponding to a data request and sends it to a preset log queue, so as to facilitate subsequent data proofreading and analysis processing, and further ensure the reliability and security of data request processing.

[0087] In one embodiment, the method further comprises:

[0088] In response to receiving a data proofreading instruction, determining a proofreading period and a proofreading account corresponding to the data proofreading instruction;

[0089] Acquire target log data generated by the account to be checked within the period to be checked from the preset log queue;

[0090] The amount to be deducted corresponding to the period to be proofread is determined according to the target log data, and the amount of the account to be proofread is deducted in the account information database to obtain the amount after deduction.

[0091] Exemplarily, the data proofreading instruction may be automatically triggered periodically, for example, a proofreading cycle is set, and the data proofreading instruction is periodically triggered according to the proofreading cycle; the data proofreading instruction may be sent to the operation and maintenance personnel, and may be specifically determined according to the actual application scenario.

[0092] According to the data proofreading instruction, the period to be proofread and the account to be proofread are determined. In one example, the account to be proofread may include one or more accounts. For example, the account to be proofread may be an account that has sent a data request in the period to be proofread.

[0093] Optionally, log data generated by the account to be verified within the verification period is obtained from a preset log queue, which is the target log data.

[0094] In one example, the amount to be deducted corresponding to the account to be proofread within the proofreading period is determined based on the target log data. If the account to be proofread includes multiple accounts, the amount to be deducted corresponding to each account to be proofread is determined separately, and proofread separately. The amount to be deducted can be obtained by adding up all the deduction amounts of the account to be proofread within the proofreading period.

[0095] Exemplarily, the amount of the account to be checked is deducted from the account information database to obtain the deducted amount. In one example, the account information in the cache server can also be checked according to the deducted amount to determine whether the amount is consistent.

[0096] In the disclosed embodiment, after receiving a data proofreading instruction, the corresponding target log data is obtained from the preset log queue, and the allowable deduction amount corresponding to the period to be proofread is determined according to the target log data, and the amount of the account to be proofread is deducted in the account information database, so that the amount in the account information database can be updated according to the data proofreading instruction. The asynchronous processing of the amount deduction in the account information database and the call and sending of the business data not only ensures the accuracy of the amount deduction, but also effectively improves the timeliness and accuracy of the data request processing response.

[0097] In one embodiment, the account information includes the service scope of the account and the remaining balance of the account, and when the account information meets the verification condition, obtaining business data matching the data request from the business database includes:

[0098] Determine the service type and consumption amount corresponding to the data request;

[0099] When the service type is within the service scope and the consumption amount is less than or equal to the remaining amount, business data matching the data request is acquired from a business database.

[0100] Exemplarily, the account information includes the service scope and remaining balance of the account. In one example, the data service platform can provide a variety of different data services, and the account can activate the required data services according to actual needs. The required data services activated by the account are the service scope corresponding to the account. Different accounts can correspond to different service scopes.

[0101] In one example, when an account sends a data request to obtain a data service, a corresponding amount needs to be deducted. Different data services correspond to different amounts, which can be determined based on actual application scenarios.

[0102] Optionally, when verifying the account information, the service scope and the amount can be verified. Determine the service type and the consumption amount corresponding to the data request. If the service type corresponding to the data request is within the service scope of the account and the consumption amount is less than or equal to the remaining amount, it can be considered that the data service corresponding to the data request is within the service scope of the account and the account amount is sufficient. At this time, obtain the business data from the business database and send it to the account.

[0103] In the embodiment of the present disclosure, when verifying account information, it is determined based on the account information whether the data request is within the service scope corresponding to the account and whether the remaining balance of the account is sufficient to support the consumption of the data request, thereby realizing the separate setting of different service scopes for different accounts, being suitable for application scenarios with multiple interfaces and multiple accounts, and ensuring the security and reliability of the data processing process.

[0104] In one embodiment, when the account information meets the verification condition, obtaining the business data matching the data request from the business database also includes:

[0105] When there is no account information matching the account identifier in the cache server, acquiring the account information matching the account identifier from the account information database;

[0106] The account information is loaded into the cache server, and the cache duration is set to a preset cache period.

[0107] Exemplarily, after the account identifier is determined, if there is no account information matching the account identifier in the cache server, the account information can be obtained from the account information database and cached, wherein matching account information is searched for according to the account identifier in the account information database.

[0108] In one example, when the account information is loaded into the cache server, the cache duration is set to a preset cache period, which can be determined according to the actual application scenario. The duration for which the account information is stored in the cache server is the cache duration, and when the cache duration is reached, the account information is deleted from the cache server.

[0109] In the disclosed embodiment, when there is no account information matching the account identifier in the cache server, the corresponding account information is obtained from the account information database and loaded into the cache server, and the cache period is set to implement the caching of the account information. When the account sends a data request within the preset cache period, there is no need to interact with the account information database, and the account information can be directly obtained from the cache server, which effectively reduces the complexity of data interaction and data processing, simplifies the data processing flow, improves data processing efficiency, and is suitable for more application scenarios.

[0110] Figure 4 FIG. 1 is a flow chart of a method for processing a data request according to an exemplary embodiment. Figure 4 As shown, the data flow process includes the account side (i.e., the terminal corresponding to the account), cache server, database server, business server, and log server. Specifically, the account sends a request, wherein the corresponding account identifier is carried when sending the data request. When the cache server receives the account request, the system first queries the cache server through the account identifier whether there is cache information. If there is no cache, the corresponding account information is queried in the account information database in the database server. If the corresponding account information does not exist in the account information database, it proves that the transmitted account information is incorrect. At this time, an error status code is returned to prompt the account to enter correctly; if the corresponding account information is found normally in the database, the account information, service activation status, and credit information of the account are loaded into the cache data, and a certain cache time is set. If there is a cache, the data in the cache is used to identify whether the service corresponding to the customer is normal, including: whether the service has been opened, whether the service has expired, and whether there is enough credit.

[0111] In one possible implementation, the limit identification and limit deduction are encapsulated into a complete set of atomic operations through scripting, ensuring that only one request modifies the corresponding limit at the same time. The specific process is as follows: After the basic account verification is passed, the business data is obtained; after the business data is obtained, the data begins to be returned to the account side. During this period, the Lua script provided by Redis is used to encapsulate all logic in the Lua script for execution, and the script is executed as a whole, that is, the preset limit deduction processing module. It will not be interrupted by other commands during execution, and there is no race condition problem, thereby ensuring atomic execution.

[0112] When the data is returned normally, the log data is recorded in the queue, and another asynchronous program records the log content, including the time of the request, service content, amount to be deducted for the service, whether the deduction is successful, etc. The proofreading program is executed according to the preset proofreading cycle, and all the call situations of the account to be proofread in the proofreading cycle are read. After accumulating all the call records, the amount to be deducted is obtained, that is, the amount to be deducted; the amount deduction action is executed, and the amount of the account in the database is deducted first, and then the latest amount information is synchronized to the cache server.

[0113] Through this embodiment, it can be ensured that the account does not interfere with each other under high concurrent requests, and the corresponding basic information is pre-loaded to reduce the interaction with the database. At the same time, for sensitive operations such as credit limit deduction, atomic exclusive operations are used to ensure the uniqueness of credit limit deduction, and cached data is used first, and the data in the log is used to correct the credit limit in the subsequent proofreading process. All credit limit deduction logics are encapsulated through atomic operations to ensure the business exclusivity of each credit limit deduction logic and avoid credit limit deduction errors; the asynchronous program is used to proofread the actual situation and make further precise proofreading, which further improves the accuracy of the data.

[0114] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0115] Based on the same inventive concept, the embodiment of the present application also provides a data request processing device for implementing the data request processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the one or more data request processing devices provided below can refer to the limitations of the data request processing method above, and will not be repeated here.

[0116] In an exemplary embodiment, Figure 5 As shown, a data request processing device 500 is provided, comprising:

[0117] A first acquisition module 510, configured to acquire an account identifier of the account in response to receiving a data request sent by the account;

[0118] A second acquisition module 520 is configured to acquire the account information from the cache server when there is account information matching the account identifier in the cache server, wherein the account information is acquired from the account information database when the first data request sent by the account is received within the cache period corresponding to the current moment;

[0119] The sending module 530 is used to obtain business data matching the data request from a business database and send the business data to the account if the account information meets the verification condition.

[0120] In one embodiment, the device further comprises:

[0121] A generating module, used to generate a credit limit deduction request matching the data request;

[0122] A deduction module is used to deduct the data service quota corresponding to the account in the cache server using a preset quota processing module according to the deduction quota corresponding to the quota deduction request, so as to obtain the deducted data service quota, wherein the preset quota processing module is configured not to receive other requests when processing the quota deduction request.

[0123] In one embodiment, the device further comprises:

[0124] A first acquisition submodule is used to acquire log data corresponding to the data request, wherein the log data includes request information, service content, consumption quota, and quota deduction information;

[0125] The sending submodule is used to send the log data to a preset log queue.

[0126] In one embodiment, the device further comprises:

[0127] A first determination submodule is used to determine, in response to receiving a data proofreading instruction, a proofreading period and a proofreading account corresponding to the data proofreading instruction;

[0128] A second acquisition submodule is used to acquire, from the preset log queue, target log data generated by the account to be checked within the period to be checked;

[0129] The second determination submodule is used to determine the amount to be deducted corresponding to the to-be-checked period according to the target log data, and deduct the amount of the to-be-checked account in the account information database to obtain the deducted amount.

[0130] In one embodiment, the account information includes the service scope of the account and the remaining balance of the account, and the sending module is further used to:

[0131] Determine the service type and consumption amount corresponding to the data request;

[0132] When the service type is within the service scope and the consumption amount is less than or equal to the remaining amount, business data matching the data request is acquired from a business database.

[0133] In one embodiment, the device further comprises:

[0134] A third acquisition submodule, configured to acquire account information matching the account identifier from an account information database when account information matching the account identifier does not exist in the cache server;

[0135] The loading module is used to load the account information into the cache server and set the cache duration to a preset cache period.

[0136] Each module in the above-mentioned data request processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0137] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store account information and other data involved in the method described in this embodiment. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for processing data requests is implemented.

[0138] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0139] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0140] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0141] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0142] It should be noted that the account information (including but not limited to account device information, account personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the account or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0143] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0144] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0145] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for processing a data request, characterized in that: The method comprises: In response to receiving a data request sent by an account, obtaining an account identifier of the account; When account information matching the account identifier exists in the cache server, the account information is obtained from the cache server, wherein the account information is obtained from the account information database when the first data request sent by the account is received within the cache period corresponding to the current moment; When the account information meets the verification condition, business data matching the data request is obtained from a business database, and the business data is sent to the account.

2. The method according to claim 1, characterized in that After sending the business data to the account, the method further includes: Generate a quota deduction request matching the data request; According to the deduction amount corresponding to the amount deduction request, the data service amount corresponding to the account is deducted by using a preset amount processing module in the cache server to obtain the deducted data service amount, wherein the preset amount processing module is configured not to receive other requests when processing the amount deduction request.

3. The method according to claim 2, characterized in that After sending the business data to the account, the method further includes: Obtaining log data corresponding to the data request, the log data including request information, service content, consumption quota, and quota deduction information; The log data is sent to a preset log queue.

4. The method according to claim 3, characterized in that The method further comprises: In response to receiving a data proofreading instruction, determining a proofreading period and a proofreading account corresponding to the data proofreading instruction; Acquire target log data generated by the account to be checked within the period to be checked from the preset log queue; The amount to be deducted corresponding to the period to be proofread is determined according to the target log data, and the amount of the account to be proofread is deducted in the account information database to obtain the amount after deduction.

5. The method according to claim 1, characterized in that The account information includes the service scope of the account and the remaining balance of the account. When the account information meets the verification condition, obtaining business data matching the data request from the business database includes: Determine the service type and consumption amount corresponding to the data request; When the service type is within the service scope and the consumption amount is less than or equal to the remaining amount, business data matching the data request is acquired from a business database.

6. The method according to claim 1, characterized in that In the case where the account information meets the verification condition, obtaining business data matching the data request from a business database, the method further includes: When there is no account information matching the account identifier in the cache server, acquiring the account information matching the account identifier from the account information database; The account information is loaded into the cache server, and the cache duration is set to a preset cache period.

7. A data request processing device, characterized in that: The device comprises: A first acquisition module, configured to acquire an account identifier of the account in response to receiving a data request sent by the account; A second acquisition module is used to acquire the account information from the cache server when there is account information matching the account identifier in the cache server, wherein the account information is acquired from the account information database when the first data request sent by the account is received within the cache period corresponding to the current moment; The sending module is used to obtain business data matching the data request from a business database and send the business data to the account if the account information meets the verification conditions.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.