A data access method and apparatus

By intercepting and verifying data access requests, and utilizing message digests and historical access information, the problem of increased server load caused by repeated submissions of access requests was solved, thereby improving server performance and data access efficiency, and enhancing user experience.

CN116112235BActive Publication Date: 2025-12-19CHINA CONSTRUCTION BANK +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310010926.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-05
Publication Date
2025-12-19
Estimated Expiration
2043-01-05

AI Technical Summary

Technical Problem

In business development, repeated submissions of access requests due to factors such as malicious repeated access, operational jitter, and network communication failures can increase server load or even cause server crashes, affecting data access efficiency.

Method used

By intercepting data access requests, the system determines whether to perform verification based on configuration file information and access type. If so, it extracts and processes the access information into a message digest to obtain an encrypted value. The system then verifies the value using historical access information stored in the database. If the verification passes, the data is sent to the gateway system for access; otherwise, it is sent directly.

Benefits of technology

This effectively avoids duplicate submissions, reduces server load, improves server performance stability and data access efficiency, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116112235B_ABST
    Figure CN116112235B_ABST
Patent Text Reader

Abstract

The application discloses a data access method and device, and relates to the technical field of big data. A specific implementation of the method comprises the following steps: intercepting a data access request, judging whether to verify the data access request according to configuration file information and an access type indicated by the data access request; if yes, performing information digest extraction processing on access information to obtain an encryption value, verifying the data access request according to the encryption value and historical access information stored in a database, and in the case of passing the verification, sending the data access request to a gateway system, routing the data access request to an access address indicated by the access information via the gateway system, and performing data access; and if no, directly sending the data access request to the gateway system, routing the data access request to the access address indicated by the access information via the gateway system, and performing data access. The implementation reduces the server load, improves the stability of the server performance, improves the data access efficiency, and enhances the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of big data, and particularly relates to a data access method and device. BACKGROUND

[0002] With the growth of Internet business, the number of business data access increases dramatically. However, in the business development, due to malicious repeated initiation of access, human operation errors caused by operation jitter, network communication faults and other factors, the situation of repeated submission of access requests often occurs, which leads to an increase in server load, and even causes the server to be down, thereby affecting the data access efficiency. How to check the data access and avoid the situation of repeated submission is a technical problem to be solved at present. SUMMARY

[0003] Therefore, the embodiments of the present application provide a data access method and device, which can classify data access requests according to access types, check data access requests of specific access types, thereby avoiding the situation of repeated submission, effectively reducing the server load, improving the stability of server performance, and further improving the efficiency of data access and user experience.

[0004] To achieve the above-mentioned purpose, according to an aspect of the embodiments of the present application, a data access method is provided, comprising:

[0005] intercepting a data access request, judging whether to check the data access request according to configuration file information and an access type indicated by the data access request; wherein the data access request indicates the access type and access information;

[0006] if yes, performing information digest extraction processing on the access information to obtain an encryption value, checking the data access request according to the encryption value and historical access information stored in a database, and in the case of passing the check, sending the data access request to a gateway system and routing the data access request to an access address indicated by the access information via the gateway system to perform data access;

[0007] if no, directly sending the data access request to the gateway system and routing the data access request to the access address indicated by the access information via the gateway system to perform data access.

[0008] Further, before the step of judging whether to check the data access request according to the configuration file information and the access type indicated by the data access request, the method further comprises:

[0009] checking the data access request to determine that the data access request does not include a repeated submission field.

[0010] Further, if it is determined that the data access request includes the repeated submission field when checking the data access request, the method further comprises:

[0011] The access information is subjected to information digest extraction processing to obtain an encryption value, the historical access information corresponding to the encryption value in the database is cleared, and the access information including the data access request and the time stamp corresponding to the data access request is stored in the database;

[0012] The data access request is sent to the gateway system and routed to the access address indicated by the access information via the gateway system to perform data access.

[0013] Further, the historical access information includes historical data access requests and access time stamps corresponding to the historical data access requests; and the step of verifying the data access request according to the encryption value and the historical access information stored in the database further includes:

[0014] The historical time stamp corresponding to the encryption value is obtained from the historical access information;

[0015] A first difference between the historical time stamp and a current time stamp is calculated, and it is determined whether the first difference is less than or equal to a first time difference threshold, so as to verify the data access request;

[0016] If the first difference is less than or equal to the first time difference threshold, the initiator of the data access request is sent a rejection access information;

[0017] If the first difference is greater than the first time difference threshold, a repeated access field is added in the data access request.

[0018] Further, the method further includes:

[0019] The historical access information in the database is iterated at a regular time to determine a second difference between the historical time stamp in the historical access information and a current time difference;

[0020] It is determined whether the second difference is greater than a second time difference threshold, and if so, the corresponding historical access information is deleted.

[0021] Further, before the step of determining whether to verify the data access request according to the configuration file information and the access type indicated by the data access request, the method further includes:

[0022] The first time difference threshold and the second time difference threshold are configured according to at least one of a database storage performance, an access service requirement and an access type.

[0023] According to another aspect of an embodiment of the present application, a data access device is provided, including:

[0024] An intercepting module is configured to intercept a data access request, and determine whether to verify the data access request according to the configuration file information and an access type indicated by the data access request; wherein the data access request indicates the access type and access information;

[0025] A verifying module is configured to, when verifying the data access request, perform information digest extraction processing on the access information to obtain an encryption value, verify the data access request according to the encryption value and historical access information stored in a database, and in a case where the verification is passed, send the data access request to a gateway system and route the data access request to an access address indicated by the access information via the gateway system to perform data access;

[0026] A data access module is configured to, when not verifying the data access request, directly send the data access request to the gateway system and route the data access request to the access address indicated by the access information via the gateway system to perform data access.

[0027] Further, the apparatus further comprises a viewing module configured to, before the step of determining whether to verify the data access request according to the configuration file information and the access type indicated by the data access request, view the data access request and determine that the data access request does not include a repeated submission field.

[0028] The viewing module is configured to view the data access request and determine that the data access request does not include a repeated submission field.

[0029] Further, the apparatus further comprises an information digest extraction module configured to, when viewing the data access request and determining that the data access request includes a repeated submission field, perform information digest extraction processing on the access information to obtain an encryption value, clear historical access information corresponding to the encryption value in the database, store access information including the data access request and a timestamp corresponding to the data access request in the database, and send the data access request to the gateway system and route the data access request to the access address indicated by the access information via the gateway system to perform data access.

[0030] The information digest extraction module is configured to perform information digest extraction processing on the access information to obtain an encryption value, clear historical access information corresponding to the encryption value in the database, store access information including the data access request and a timestamp corresponding to the data access request in the database, and send the data access request to the gateway system and route the data access request to the access address indicated by the access information via the gateway system to perform data access.

[0031] The information digest extraction module is configured to perform information digest extraction processing on the access information to obtain an encryption value, clear historical access information corresponding to the encryption value in the database, store access information including the data access request and a timestamp corresponding to the data access request in the database, and send the data access request to the gateway system and route the data access request to the access address indicated by the access information via the gateway system to perform data access.

[0032] Further, the verifying module is further configured to:

[0033] obtain a historical timestamp corresponding to the encryption value from the historical access information;

[0034] calculate a first difference value of the historical timestamp and a current timestamp, and determine whether the first difference value is less than or equal to a first time difference threshold value, to implement verification of the data access request;

[0035] If the first difference value is less than or equal to the first time difference threshold value, send rejection access information to an initiator of the data access request.

[0036] If the first difference is greater than the first time difference threshold, a repeated access field is added in the data access request.

[0037] According to another aspect of the embodiments of the present application, an electronic device for data access is provided, comprising:

[0038] one or more processors;

[0039] a storage device configured to store one or more programs,

[0040] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the above data access methods.

[0041] According to still another aspect of the embodiments of the present application, a computer readable medium having stored thereon a computer program is provided, which, when executed by a processor, implements any of the above data access methods.

[0042] According to yet another aspect of the embodiments of the present application, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements any of the above data access methods.

[0043] One embodiment of the above application has the following advantages or beneficial effects: because the data access request is intercepted, and according to the configuration file information and the access type indicated by the data access request, it is determined whether to verify the data access request; wherein the data access request indicates the access type and the access information; if yes, the access information is subjected to message digest extraction processing to obtain an encryption value, and according to the encryption value and the historical access information stored in the database, the data access request is verified, and in the case of passing the verification, the data access request is sent to the gateway system and routed to the access address indicated by the access information via the gateway system for data access; if no, the data access request is directly sent to the gateway system and routed to the access address indicated by the access information via the gateway system for data access. Therefore, the technical means overcomes the technical problem of the related art that the server load is increased, and even the server is down, and the data access efficiency is low due to the frequent occurrence of repeated submission of access requests, and further achieves the technical effect that the data access requests are classified according to the access type, the data access requests of a specific access type are verified, and the situation of repeated submission is avoided, the server load is effectively reduced, the stability of the server performance is improved, and the efficiency of data access is improved, and the user experience is improved.

[0044] The further effects of the above-mentioned non-conventional optional mode will be described in the following in conjunction with the specific embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0045] The accompanying drawings are used to better understand the present application and do not constitute undue limitations on the present application. Among them:

[0046] Figure 1 is a schematic diagram of the main flow of a data access method according to an embodiment of the present application;

[0047] Figure 2a is a schematic diagram of the main flow of a data access method according to another embodiment of the present application;

[0048] Figure 2b is a schematic diagram of the main flow of a data access method according to yet another embodiment of the present application;

[0049] Figure 3 is a schematic diagram of the main modules of a data access apparatus according to an embodiment of the present application;

[0050] Figure 4 is an exemplary system architecture diagram to which an embodiment of the present application can be applied;

[0051] Figure 5 is a structural schematic diagram of a computer system of a terminal device or a server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0052] Exemplary embodiments of the present application are described below with reference to the accompanying drawings, which include various details of the embodiments of the present application to assist in understanding, and should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Also, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0053] Figure 1 is a schematic diagram of the main flow of a data access method according to an embodiment of the present application; as Figure 1 shown, the data access method provided by the embodiments of the present application mainly includes:

[0054] Step S101, intercepting a data access request, and judging whether to verify the data access request according to configuration file information and an access type indicated by the data access request; wherein the data access request indicates the access type and access information.

[0055] Specifically, the configuration file information configures the access types that need to perform verification, according to a specific embodiment of the present application, the access types with more repeated access requests, more access volume, and higher business type priority level can be set to need verification according to historical data access information. It should be noted that the above cases are only examples, and can be adjusted according to actual conditions.

[0056] According to the embodiment of the present application, the data access request can be checked or not according to the server load, if the server load is low, the data access request can not be checked, and the data access request is routed to the corresponding access address through the gateway system to perform data access, which improves the data access efficiency. If the server load is high, the data access request can be checked to reduce the server load and avoid server downtime.

[0057] Further, according to the embodiment of the present application, before the step of judging whether to check the data access request according to the configuration file information and the access type indicated by the data access request, the method further comprises:

[0058] Viewing the data access request to determine that the data access request does not include the repeated submission field.

[0059] According to the embodiment of the present application, the repeated submission of the access request does not necessarily belong to the malicious repeated initiation of the access, and it can also be due to network communication failure, or the operator initiates data access again after a period of time. In order to avoid incorrect judgment and access rejection of all repeated submission of the data access request, the repeated submission field in the data access request is preferably viewed. In the case that the data access request does not include the repeated submission field, the step of judging whether to check the data access request according to the configuration file information and the access type indicated by the data access request is executed.

[0060] Preferably, according to the embodiment of the present application, if the data access request is viewed and it is determined that the data access request includes the repeated submission field, the method further comprises:

[0061] The access information is subjected to information digest extraction processing to obtain an encryption value, the historical access information corresponding to the encryption value in the database is cleared, and the access information including the data access request and the timestamp corresponding to the data access request is stored in the database.

[0062] The data access request is sent to the gateway system, and routed to the access address indicated by the access information through the gateway system to perform data access.

[0063] Through the above setting, for the data access request including the repeated submission field, the corresponding request is sent to the corresponding access address through the gateway system, and before the access information is subjected to information digest extraction processing to obtain an encryption value, the historical access information corresponding to the encryption value in the database is cleared, and the access information including the data access request and the timestamp corresponding to the data access request is stored in the database, thereby the historical access stored in the database can be updated to more accurately judge whether the subsequent initiated data access request belongs to the repeated initiation situation.

[0064] Further, according to the embodiment of the present application, the historical access information includes historical data access requests and access time stamps corresponding to the historical data access requests; and the step of verifying the data access request according to the encryption value and the historical access information stored in the database further includes:

[0065] obtaining a historical time stamp corresponding to the encryption value from the historical access information;

[0066] calculating a first difference value between the historical time stamp and a current time stamp, and determining whether the first difference value is less than or equal to a first time difference threshold, so as to verify the data access request;

[0067] if the first difference value is less than or equal to the first time difference threshold, sending rejection access information to an initiator of the data access request;

[0068] if the first difference value is greater than the first time difference threshold, adding a repeated access field in the data access request.

[0069] The verification of the data access request is realized by comparing the first difference value between the historical time stamp and the current time stamp with the first time difference threshold, which avoids the situation of repeatedly initiating multiple data access in a short time, reduces the server load, and avoids the situation of server downtime.

[0070] Exemplarily, according to the embodiment of the present application, the method further includes:

[0071] periodically traversing the historical access information in the database to determine a second difference value between the historical time stamp in the historical access information and a current time difference; and determining whether the second difference value is greater than a second time difference threshold, and if so, deleting the corresponding historical access information.

[0072] Through the above setting, the contents stored in the database are periodically cleaned, which helps to release the memory space in the database and improve the verification efficiency.

[0073] Optionally, according to the embodiment of the present application, before the step of determining whether to verify the data access request according to the configuration file information and the access type indicated by the data access request, the method further includes:

[0074] configuring the first time difference threshold and the second time difference threshold according to at least one of database storage performance, access service demand and access type.

[0075] According to the embodiment of the present application, the database storage performance, the access service demand and the access type are only main reference factors for configuring the first time difference threshold and the second time difference threshold, and in specific implementation, they can also be adjusted according to actual situation.

[0076] Step S102, if it is judged that the data access request needs to be checked, the access information is subjected to information digest extraction processing to obtain an encryption value, the data access request is checked according to the encryption value and the historical access information stored in the database, and in the case of passing the check, the data access request is sent to the gateway system and routed to the access address indicated by the access information via the gateway system for data access.

[0077] Specifically, if the verification fails, the initiator of the data access request is fed back with the access rejection information, and further, the reason for the access rejection (i.e. the check result is sent to the initiator of the corresponding data access request) can also be fed back.

[0078] Step S103, if it is judged that the data access request does not need to be checked, the data access request is directly sent to the gateway system and routed to the access address indicated by the access information via the gateway system for data access.

[0079] According to the technical scheme of the embodiment of the present application, the data access request is intercepted, it is judged whether the data access request needs to be checked according to the configuration file information and the access type indicated by the data access request, wherein the data access request indicates the access type and the access information; if yes, the access information is subjected to information digest extraction processing to obtain an encryption value, the data access request is checked according to the encryption value and the historical access information stored in the database, in the case of passing the check, the data access request is sent to the gateway system and routed to the access address indicated by the access information via the gateway system for data access; if no, the data access request is directly sent to the gateway system and routed to the access address indicated by the access information via the gateway system for data access, so that the technical problem of the related art that the server load is increased due to the repeated submission of the access request, and even the server is down and the data access efficiency is low is overcome, and the technical effect that the data access request is classified according to the access type, the data access request of a specific access type is checked, the situation of repeated submission is avoided, the server load is effectively reduced, the stability of the server performance is improved, the data access efficiency is improved, and the user experience is improved is achieved.

[0080] Figure 2a is a schematic diagram of the main process of the data access method according to another embodiment of the present application; as shown in Figure 2a the data access method provided by the embodiment of the present application mainly includes:

[0081] Step S201, intercepting the data access request, checking the data access request, judging whether the data access request includes the repeat submission field. If yes, i.e. the data access request includes the repeat submission field, step S202 is executed; if no, i.e. the data access request does not include the repeat submission field, step S203 is executed.

[0082] According to the embodiment of the present application, since the repeatedly submitted access request does not necessarily belong to the case of malicious repeated initiation of access, it can also be due to network communication failure, or the operator initiates data access again after a period of time interval. In order to avoid incorrect judgment and rejection of access to all repeatedly submitted data access requests, it is preferred to check whether the data access request includes the repeat submission field. In the case that the data access request does not include the repeat submission field, the step of judging whether to perform the verification of the data access request according to the configuration file information and the access type indicated by the data access request is executed. If the data access request includes the repeat submission field, the data access request can be directly sent to the corresponding access address by the gateway system for access.

[0083] Step S202, performing information digest extraction processing on the access information to obtain an encryption value, clearing the historical access information corresponding to the encryption value in the database, storing the access information including the data access request and the timestamp corresponding to the data access request into the database; sending the data access request to the gateway system and routing to the access address indicated by the access information through the gateway system for data access.

[0084] Specifically, according to the historical data access information, the access type with more repeated access requests, more access volume and higher business type priority level can be set to need to be verified, and the access type needing to be verified can be placed in the configuration information file. It should be noted that the above-mentioned cases are only examples, which can be adjusted according to actual conditions.

[0085] Exemplarily, according to the embodiment of the present application, the above-mentioned method further includes:

[0086] Periodically traversing the historical access information in the database to determine a second difference value of the difference between the historical timestamp in the historical access information and the current time; judging whether the second difference value is greater than a second time difference threshold, and if yes, deleting the corresponding historical access information.

[0087] Through the above-mentioned setting, the contents stored in the database are periodically cleared, which helps to release the memory space in the database and improve the verification efficiency.

[0088] Optionally, according to the embodiment of the present application, before the step of judging whether to verify the data access request according to the configuration file information and the access type indicated by the data access request, the method further includes:

[0089] The first time difference threshold and the second time difference threshold are configured according to at least one of database storage performance, access service demand, and access type.

[0090] According to the embodiment of the present application, the database storage performance, the access service demand, and the access type are only used as the main reference factors for configuring the first time difference threshold and the second time difference threshold, and in the specific implementation, the adjustment can also be made according to the actual situation.

[0091] In step S203, it is judged whether the data access request is verified according to the configuration file information and the access type indicated by the data access request, wherein the data access request indicates the access type and the access information. If yes, the data access request is verified, and step S204 is executed; if no, the data access request is not verified, and step S206 is executed.

[0092] According to the embodiment of the present application, it can also be judged whether the data access request needs to be verified according to the server load situation. If the current server load rate is low, the data access request can not be verified, and is directly routed to the corresponding access address through the gateway system to execute the data access, which improves the data access efficiency. If the current server load rate is high, in order to reduce the server load and avoid the server downtime, the part or all of the data access requests can be verified.

[0093] In step S204, the historical timestamp corresponding to the encryption value is obtained from the historical access information, the first difference between the historical timestamp and the current timestamp is calculated, and it is judged whether the first difference is less than or equal to the first time difference threshold. If the first difference is less than or equal to the first time difference threshold, it indicates that the verification fails, and step S205 is executed; if the first difference is greater than the first time difference threshold, it indicates that the verification passes, and step S206 is executed.

[0094] According to the comparison between the first difference between the historical timestamp and the current timestamp and the first time difference threshold, the verification of the data access request is realized, which avoids the situation of repeatedly initiating multiple data accesses in a short time, reduces the server load, and avoids the situation of server downtime.

[0095] According to another aspect of the embodiment of the present application, even if the first difference is less than or equal to the first time difference threshold and the verification fails, the operation personnel can make a judgment again. For the allowed access, the repeated submission field is added in the data access request, and then the data access is executed again. According to another embodiment of the present application, if the access information corresponding to the encryption value cannot be queried in the database according to the encryption value, the repeated submission field can also be added in the data access request corresponding to the encryption value, and then the access operation is executed by forwarding to the corresponding access address through the gateway system.

[0096] Step S205, sending the rejection access information to the initiator of the data access request.

[0097] Step S206, performing the information digest extraction processing on the access information to obtain the encryption value, and according to the encryption value and the historical access information stored in the database, sending the data access request to the gateway system, and routing to the access address indicated by the access information via the gateway system to perform the data access.

[0098] According to the technical scheme of the embodiment of the present application, the data access request is intercepted, and whether to verify the data access request is determined according to the configuration file information and the access type indicated by the data access request, wherein the data access request indicates the access type and the access information; if yes, the information digest extraction processing is performed on the access information to obtain the encryption value, and the data access request is verified according to the encryption value and the historical access information stored in the database, and in the case of passing the verification, the data access request is sent to the gateway system, and is routed to the access address indicated by the access information via the gateway system to perform the data access; if no, the data access request is directly sent to the gateway system, and is routed to the access address indicated by the access information via the gateway system to perform the data access, so that the technical problem of the server load increase caused by the repeated submission of the access request in the related art, and even more, the server downtime and the low data access efficiency are overcome, and the technical effect that the data access request is classified according to the access type, the data access request of a specific access type is verified, and the repeated submission is avoided, the server load is effectively reduced, the stability of the server performance is improved, and the data access efficiency is improved, and the user experience is improved is achieved.

[0099] Figure 2b is a schematic diagram of the main process of the data access method according to another embodiment of the present application; as shown in Figure 2b the data access method provided by the embodiment of the present application mainly includes:

[0100] Step S211, obtaining the historical data access information, and constructing the configuration file information according to the repeated access times of different access types, the access amount and the business type priority in the historical data access type; wherein the configuration file information includes the access type that needs to be verified.

[0101] Specifically, according to a specific embodiment of the present application, the access type with more repeated access requests, more access amount and higher business type priority can be set as the access type that needs to be verified according to the historical data access information. It should be noted that the above-mentioned situation is only an example, and can be adjusted according to the actual situation.

[0102] According to the embodiment of the present application, whether the data access request needs to be checked can be determined according to the server load condition. If the current server load rate is low, the data access request can not be checked, and is directly routed to the corresponding access address through the gateway system to perform data access, which improves the data access efficiency. If the current server load rate is high, to reduce the server load and avoid server downtime, part or all of the data access requests can be checked.

[0103] In step S212, the data access request is intercepted, and the target data access request that needs to be checked is determined according to the configuration file information and the access type indicated by the data access request.

[0104] According to the embodiment of the present application, after intercepting the data access request, the data access request can be first viewed to determine whether the repeated submission field is included in the data access request. If the repeated submission field is not included in the data access request, the target data access request that needs to be checked is determined according to the configuration file information and the access type indicated by the data access request. If the repeated submission field is included in the data access request, it indicates that the current data access request is allowed to be repeatedly accessed, and the access information indicated by the current data access request can be processed by information digest extraction to obtain an encryption value. The historical access information corresponding to the encryption value in the database is cleared, and the access information including the data access request and the timestamp corresponding to the data access request is stored in the database. Then, the data access request is sent to the gateway system and routed to the access address indicated by the access information through the gateway system to perform data access.

[0105] In step S213, the historical timestamp corresponding to the encryption value is obtained from the historical access information, and the first difference value between the historical timestamp and the current timestamp corresponding to the target data access request is calculated.

[0106] According to another aspect of the embodiment of the present application, the historical timestamp corresponding to the encryption value can not exist in the historical access information stored in the database. At this time, it indicates that the current target data access request has no access record in a period of time. At this time, the repeated submission field can be added in the target data access request, and then the corresponding data access is performed.

[0107] In step S214, it is determined whether the first difference value is less than or equal to the first time difference threshold. If yes, that is, the first difference value is less than or equal to the first time difference threshold, it indicates that the check fails, and step S215 is performed. If no, that is, the first difference value is greater than the first time difference threshold, it indicates that the check passes, and step S216 is performed.

[0108] In step S215, the access rejection information is sent to the initiator of the data access request.

[0109] Step S215, the access information is subjected to information digest extraction processing to obtain an encryption value, and according to the encryption value and the historical access information stored in the database, the data access request is sent to the gateway system, routed to the access address indicated by the access information via the gateway system, and data access is performed.

[0110] According to the technical scheme of the embodiment of the present application, the data access request is intercepted, and according to the configuration file information and the access type indicated by the data access request, it is determined whether to verify the data access request; wherein the data access request indicates the access type and the access information; if yes, the access information is subjected to information digest extraction processing to obtain an encryption value, and according to the encryption value and the historical access information stored in the database, the data access request is verified, and in the case of passing the verification, the data access request is sent to the gateway system, routed to the access address indicated by the access information via the gateway system, and data access is performed; if no, the data access request is directly sent to the gateway system, routed to the access address indicated by the access information via the gateway system, and data access is performed. Therefore, the technical means overcomes the situation of repeated submission of access requests in the related art, which leads to an increase in server load, and even causes the server to be down and the data access efficiency to be low, thereby achieving the technical effect of classifying the data access requests according to the access type, verifying the data access requests of a specific access type, thereby avoiding the situation of repeated submission, effectively reducing the server load, improving the stability of the server performance, and thereby improving the efficiency of data access and the user experience.

[0111] Figure 3 is a schematic diagram of the main modules of the data access device provided by the embodiment of the present application; as shown in Figure 3 the data access device 300 provided by the embodiment of the present application mainly comprises:

[0112] The interception module 301 is configured to intercept a data access request, and determine whether to verify the data access request according to configuration file information and an access type indicated by the data access request; wherein the data access request indicates the access type and access information.

[0113] Specifically, the configuration file information is configured with an access type that needs to be verified, and according to a specific embodiment of the present application, the access type with more repeated access requests, more access volume, and higher business type priority level can be set to need to be verified according to historical data access information. It should be noted that the above-mentioned situation is only an example, and can be adjusted according to actual conditions.

[0114] According to the embodiment of the present application, the data access request can be checked or not according to the server load condition. If the current server load rate is low, the data access request can not be checked, and the data access request is routed to the corresponding access address through the gateway system directly to perform data access, which improves the data access efficiency. If the current server load rate is high, the server load can be reduced and the server can be prevented from being down by checking part or all of the data access requests.

[0115] Further, according to the embodiment of the present application, the data access device 300 further comprises a checking module, which is used to:

[0116] check the data access request to determine whether the data access request includes the repeated submission field.

[0117] According to the embodiment of the present application, the repeated submission of the access request can not be the case of malicious repeated initiation of access, but can be the case that the previous access fails due to network communication failure or the case that the operator initiates data access again after a period of time interval. In order to avoid incorrect judgment and access rejection of all repeated submission of the data access request, the data access request can be checked to determine whether the repeated submission field is included. If the repeated submission field is not included in the data access request, the step of determining whether to check the data access request according to the configuration file information and the access type indicated by the data access request is executed again.

[0118] Preferably, according to the embodiment of the present application, the data access device 300 further comprises an information digest extraction module, which is used to:

[0119] perform information digest extraction processing on the access information to obtain an encryption value, clear the historical access information corresponding to the encryption value in the database, and store the access information including the data access request and the time stamp corresponding to the data access request into the database;

[0120] send the data access request to the gateway system, and route the data access request to the access address indicated by the access information through the gateway system to perform data access.

[0121] Through the above setting, for the data access request including the repeated submission field allowing access, the access information is subjected to the message digest extraction processing before the corresponding request is sent to the corresponding access address via the gateway system, the encrypted value is obtained, the historical access information corresponding to the encrypted value in the database is cleared, and the access information including the data access request and the timestamp corresponding to the data access request is stored in the database, thereby the historical access stored in the database can be updated to more accurately judge whether the subsequently initiated data access request belongs to the repeated initiation situation.

[0122] Further, according to the embodiment of the present application, the historical access information includes historical data access request and access timestamp corresponding to the historical data access request; the above-mentioned verification module 302 is further used for:

[0123] obtaining the historical timestamp corresponding to the encrypted value from the historical access information;

[0124] calculating the first difference value of the historical timestamp and the current timestamp, and judging whether the first difference value is less than or equal to the first time difference threshold, to realize the verification of the data access request;

[0125] if the first difference value is less than or equal to the first time difference threshold, sending the rejection access information to the initiator of the data access request;

[0126] if the first difference value is greater than the first time difference threshold, adding the repeated access field in the data access request.

[0127] According to the comparison between the first difference value of the historical timestamp and the current timestamp and the first time difference threshold, the verification of the data access request is realized, the situation of repeatedly initiating multiple data accesses in a short time is avoided, the server load is reduced, and the situation of server downtime is avoided.

[0128] Exemplarily, according to the embodiment of the present application, the above-mentioned data access device 300 further includes a judgment module, which is used for:

[0129] timely traversing the historical access information in the database, determining the second difference value of the historical timestamp and the current time difference in the historical access information, judging whether the second difference value is greater than the second time difference threshold, and if so, deleting the corresponding historical access information.

[0130] Through the above setting, the contents stored in the database are periodically cleared, which helps to release the database memory space and improve the verification efficiency.

[0131] Optionally, according to the embodiment of the present application, the above-mentioned data access device 300 further includes a time difference threshold configuration module, which is used for:

[0132] The first time difference threshold and the second time difference threshold are configured according to at least one of database storage performance, access service demand, and access type.

[0133] According to the embodiment of the present application, the database storage performance, the access service demand, and the access type are only used as the main reference factors for configuring the first time difference threshold and the second time difference threshold, and in the specific implementation, the actual situation can also be adjusted.

[0134] The checking module 302 is configured to perform information digest extraction processing on the access information to obtain an encryption value, and check the data access request according to the encryption value and the historical access information stored in the database, and in the case of passing the check, send the data access request to the gateway system and route it to the access address indicated by the access information through the gateway system for data access.

[0135] Specifically, if the check fails, the initiator of the data access request is fed back with the access rejection information, and further, the reason for the access rejection (i.e., the check result is sent to the initiator of the corresponding data access request) can also be fed back.

[0136] The data access module 303 is configured to directly send the data access request to the gateway system and route it to the access address indicated by the access information through the gateway system for data access without checking the data access request.

[0137] According to the technical scheme of the embodiment of the present application, the data access request is intercepted, and it is determined whether to check the data access request according to the configuration file information and the access type indicated by the data access request, wherein the data access request indicates the access type and the access information; if yes, the access information is subjected to information digest extraction processing to obtain an encryption value, and the data access request is checked according to the encryption value and the historical access information stored in the database, and in the case of passing the check, the data access request is sent to the gateway system and routed to the access address indicated by the access information through the gateway system for data access; if no, the data access request is directly sent to the gateway system and routed to the access address indicated by the access information through the gateway system for data access. Therefore, the technical problem of the related art that the server load is increased due to the repeated submission of the access request, and even the server is down and the data access efficiency is low, is overcome, and the technical effect that the data access request is classified according to the access type, the data access request of a specific access type is checked, and the repeated submission is avoided, the server load is effectively reduced, the stability of the server performance is improved, and the data access efficiency is improved, and the user experience is improved, is achieved.

[0138] Figure 4An exemplary system architecture 400 to which the data access method or the data access apparatus of the embodiments of the present application can be applied is shown.

[0139] As shown in Figure 4 The system architecture 400 can include terminal devices 401, 402, 403, a network 404 and a server 405. The network 404 is a medium to provide a communication link between the terminal devices 401, 402, 403 and the server 405. The network 404 can include various connection types, such as wired, wireless communication link or fiber cable, etc.

[0140] The users can use the terminal devices 401, 402, 403 to interact with the server 405 through the network 404 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0141] The terminal devices 401, 402, 403 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers and desktop computers, etc.

[0142] The server 405 can be a server providing various services, such as a server for users to perform data access / data processing using the terminal devices 401, 402, 403 (only as examples). The server can analyze and process the received data access request and other data, and feed back the processing results (such as encryption value, check result - only as examples) to the terminal devices.

[0143] It should be noted that the data access method provided by the embodiments of the present application is generally executed by the server 405, and accordingly, the data access apparatus is generally provided in the server 405.

[0144] It should be understood that the number of terminal devices, networks and servers in Figure 4 is only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.

[0145] Reference is made below to Figure 5 which shows a structural schematic diagram of a computer system 500 suitable for implementing the terminal device or the server of the embodiments of the present application. Figure 5 The terminal device or the server shown is only an example and should not bring any limitation to the functions and use range of the embodiments of the present application.

[0146] As shown in Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501 which can perform various appropriate actions and processes in accordance with programs stored in a read only memory (ROM) 502 or loaded from a storage section 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0147] Connected to the I / O interface 505 are an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as necessary. A removable recording medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 510 as necessary, so that a computer program read therefrom is installed into the storage section 508 as necessary.

[0148] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program in accordance with the embodiments disclosed herein. For example, the embodiments disclosed herein include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication section 509 and / or installed from the removable recording medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-described functions defined in the system of the present application are performed.

[0149] It should be noted that the computer-readable medium in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or instrument, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection with one or more conductive wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or instrument. In the present application, the computer-readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or instrument. The program code contained in the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0150] The flow diagrams and block diagrams in the drawings are illustrations of possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.

[0151] The computer program product of the embodiments of the present application comprises a computer program which, when executed by a processor, implements any one of the above data access methods.

[0152] The modules described in the embodiments of the present application can be implemented in the form of software or hardware. The modules described can also be arranged in a processor, for example, a processor can be described as including an intercepting module, a verifying module and a data accessing module. In some cases, the names of the modules do not constitute a limitation on the modules themselves, for example, the intercepting module can also be described as "a module for intercepting a data accessing request, judging whether to verify the data accessing request according to configuration file information and an access type indicated by the data accessing request; wherein the data accessing request indicates the access type and access information".

[0153] As another aspect, the present application also provides a computer readable medium, which can be included in the device described in the above embodiments or exist independently without being assembled into the device. The computer readable medium carries one or more programs, when the one or more programs are executed by the device, the device includes: intercepting a data accessing request, judging whether to verify the data accessing request according to configuration file information and an access type indicated by the data accessing request; wherein the data accessing request indicates the access type and access information; if yes, performing information digest extraction processing on the access information to obtain an encryption value, verifying the data accessing request according to the encryption value and historical access information stored in a database, and in the case of passing the verification, sending the data accessing request to a gateway system and routing the data accessing request to an access address indicated by the access information via the gateway system to perform data access; if no, directly sending the data accessing request to the gateway system and routing the data accessing request to the access address indicated by the access information via the gateway system to perform data access.

[0154] According to the technical scheme of the embodiment of the present application, because the data access request is intercepted, whether to verify the data access request is determined according to the configuration file information and the access type indicated by the data access request; the data access request indicates the access type and the access information; if yes, the access information is subjected to information digest extraction processing to obtain an encryption value, and the data access request is verified according to the encryption value and the historical access information stored in the database; in the case of passing the verification, the data access request is sent to the gateway system and routed to the access address indicated by the access information through the gateway system to perform data access; if no, the data access request is directly sent to the gateway system and routed to the access address indicated by the access information through the gateway system to perform data access. Therefore, the technical scheme overcomes the technical problem of the related art that the server load is increased due to the repeated submission of the access request, and even the server is down, and the data access efficiency is low, thereby achieving the technical effect that the data access requests are classified according to the access types, the data access requests of specific access types are verified, the repeated submission is avoided, the server load is effectively reduced, the stability of the server performance is improved, the data access efficiency is improved, and the user experience is improved.

[0155] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made depending on design requirements and other factors. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A data access method, characterized by, The method comprises the following steps: intercepting a data access request, judging whether to verify the data access request according to configuration file information and an access type indicated by the data access request; wherein the data access request indicates an access type and access information; the configuration file information configures the access type that needs to be verified, and sets the access type with more repeated access requests, more access volume and higher business type priority level as the access type that needs to be verified according to historical data access information; if yes, performing information digest extraction processing on the access information to obtain an encryption value, verifying the data access request according to the encryption value and historical access information stored in a database, and sending the data access request to a gateway system to be routed to an access address indicated by the access information via the gateway system for data access if the verification is passed; if no, directly sending the data access request to the gateway system to be routed to the access address indicated by the access information via the gateway system for data access; Before the step of judging whether to verify the data access request according to the configuration file information and the access type indicated by the data access request, the method further comprises the following steps: checking the data access request to determine that the data access request does not include a repeated submission field; if the data access request is checked and it is determined that the data access request includes the repeated submission field, the method further comprises the following steps: performing information digest extraction processing on the access information to obtain an encryption value, clearing historical access information corresponding to the encryption value in the database, storing access information including the data access request and a time stamp corresponding to the data access request into the database, and sending the data access request to the gateway system to be routed to the access address indicated by the access information via the gateway system for data access; the historical access information includes historical data access requests and access time stamps corresponding to the historical data access requests; the step of verifying the data access request according to the encryption value and the historical access information stored in the database further comprises the following steps: obtaining a historical time stamp corresponding to the encryption value from the historical access information; calculating a first difference value of the historical time stamp and a current time stamp, and judging whether the first difference value is less than or equal to a first time difference threshold value to realize verification of the data access request; if the first difference value is less than or equal to the first time difference threshold value, sending rejection access information to an initiator of the data access request; if the first difference value is greater than the first time difference threshold value, adding a repeated access field in the data access request. The method further comprises the following steps:

2. The data access method of claim 1, wherein, timely traversing historical access information in the database to determine a second difference value of a historical time difference in the historical access information and a current time difference; judging whether the second difference value is greater than a second time difference threshold value, and if yes, deleting the corresponding historical access information. ​ 3. The data access method of claim 1, wherein, Before the step of judging whether to verify the data access request according to the access type indicated by the configuration file information and the data access request, the method further comprises: Configuring the first time difference threshold and the second time difference threshold according to at least one of database storage performance, access service demand and access type.

4. A data access device, characterized by Comprise: An intercepting module, configured to intercept a data access request, and judge whether to verify the data access request according to the access type indicated by the configuration file information and the data access request; wherein the data access request indicates an access type and access information; the configuration file information configures the access type that needs to be verified, and sets the access type with more repeated access requests, more access volume and higher service type priority level as the access type that needs to be verified according to historical data access information; A verifying module, configured to, when verifying the data access request, perform message digest extraction processing on the access information to obtain an encryption value, verify the data access request according to the encryption value and historical access information stored in a database, and send the data access request to a gateway system to route to an access address indicated by the access information via the gateway system to perform data access in the case of verification passing; A data access module, configured to, when not verifying the data access request, directly send the data access request to a gateway system to route to an access address indicated by the access information via the gateway system to perform data access; The device further comprises a viewing module, configured to, before the step of judging whether to verify the data access request according to the access type indicated by the configuration file information and the data access request, view the data access request and determine that the data access request does not include a repeated submission field; The device further comprises a message digest extraction module, configured to, when viewing the data access request and determining that the data access request includes a repeated submission field, perform message digest extraction processing on the access information to obtain an encryption value, clear historical access information corresponding to the encryption value in the database, store access information including the data access request and a timestamp corresponding to the data access request into the database, and send the data access request to a gateway system to route to an access address indicated by the access information via the gateway system to perform data access; The verifying module is further configured to: Obtain a historical timestamp corresponding to the encryption value from the historical access information; Calculate a first difference value of the historical timestamp and a current timestamp, and judge whether the first difference value is less than or equal to a first time difference threshold, to realize verification of the data access request; If the first difference value is less than or equal to the first time difference threshold, send rejection access information to an initiator of the data access request; If the first difference value is greater than the first time difference threshold, add a repeated access field in the data access request. Comprise: One or more processors; A storage device configured to store one or more programs, 5. An electronic device for data access, characterized in that ​ ​ ​ When the one or more programs are executed by the one or more processors, the one or more processors implement a method as claimed in any one of claims 1-3.

6. A computer readable medium having stored thereon a computer program, characterized in that, The program, when executed by a processor, implements a method as claimed in any one of claims 1-3.

7. A computer program product comprising a computer program, characterized in that, The computer program, when executed by a processor, implements a method as claimed in any one of claims 1-3.

Citation Information

Patent Citations

  • Security access method, device, equipment and storage medium

    CN111756750A

  • Flow limiting method and device for repeated requests, equipment and storage medium

    CN113438227A

  • Repeated access request attack interception method and device, equipment and storage medium

    CN114697132A