WO2020228292A1 - Data submission request processing method, apparatus and computer device - Google Patents

Data submission request processing method, apparatus and computer device Download PDF

Info

Publication number
WO2020228292A1
WO2020228292A1 PCT/CN2019/119219 CN2019119219W WO2020228292A1 WO 2020228292 A1 WO2020228292 A1 WO 2020228292A1 CN 2019119219 W CN2019119219 W CN 2019119219W WO 2020228292 A1 WO2020228292 A1 WO 2020228292A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
signature value
submission request
data submission
parameter
Prior art date
Application number
PCT/CN2019/119219
Other languages
French (fr)
Chinese (zh)
Inventor
易杉峰
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020228292A1 publication Critical patent/WO2020228292A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server

Definitions

  • This application relates to the field of communication technology, and specifically to a method, device and computer equipment for processing a data submission request.
  • the server can determine that the subsequent data submitted by the user is a repeated submission, and will not respond to the subsequent data submission operation again. However, if in the process of the user's subsequent resubmission of the previous data, if a criminal has tampered with the order of the parameters in the parameter data corresponding to the data submitted by the user again, the server will receive the After the tampered data submission request, it will not be possible to determine that the tampered data submission request is actually a repeated data submission operation, and will mistakenly believe that it is a new data submission operation, which causes the server to repeat the data request Processing, so that the server may write repeated data multiple times, which slows down the processing speed of the server, which in turn affects the normal development of the server's business, and even causes the server to crash or paralyze.
  • the main purpose of this application is to provide a method, device, and computer equipment for processing data submission requests, aiming to solve the technical problem of repeated submissions that may occur in the process of the existing client sending data submission requests to the server.
  • this application proposes a method for processing a data submission request, and the method includes the steps:
  • the combined signature value is matched with the pre-stored signature value in the data cache list to obtain the corresponding matching result, wherein the pre-stored signature value is stored in the data cache list and corresponds to the historical data submission request Historical combined signature value, the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value;
  • the data submission request is processed according to preset rules.
  • This application also provides a device for processing a data submission request, including:
  • the first receiving module is used to receive the data submission request sent by the client through the designated interface
  • the first obtaining module is configured to obtain parameter data corresponding to the data submission request
  • the sorting module is used to sort the parameter data according to the natural order of the initials, and combine according to the sorting order to obtain combined parameter data;
  • the signature module is used to perform signature processing on the combined parameter data to generate a combined signature value
  • the matching module is used to match the combined signature value with the pre-stored signature value in the data cache list to obtain a corresponding matching result, wherein the pre-stored signature value is the historical data stored in the data cache list
  • the historical combined signature value corresponding to the data submission request, the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value;
  • the processing module is configured to process the data submission request according to the matching result and according to preset rules.
  • the application also provides a computer device, including a memory and a processor, the memory stores computer readable instructions, and the processor implements the steps of the above method when the computer readable instructions are executed.
  • the present application also provides a computer-readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the steps of the foregoing method are implemented.
  • the data submission request processing method, device and computer equipment provided in this application receive the data submission request sent by the client through the designated interface; obtain the parameter data corresponding to the data submission request; Sort in natural order, and combine according to the sort order to obtain combined parameter data; perform signature processing on the combined parameter data to generate a combined signature value; pre-store the combined signature value and the data cache list Matching the signature value of, to obtain a corresponding matching result, where the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value ; According to the matching result, the data submission request is processed in accordance with preset rules.
  • FIG. 1 is a schematic flowchart of a method for processing a data submission request according to an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of an apparatus for processing a data submission request according to an embodiment of the present application
  • Fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
  • the processing method of a data submission request includes:
  • S1 Receive the data submission request sent by the client through the designated interface
  • S3 Sort the parameter data according to the natural order of the initials, and combine according to the sorting order to obtain combined parameter data;
  • S5 Match the combined signature value with the pre-stored signature value in the data cache list to obtain a corresponding matching result, where the pre-stored signature value is the one stored in the data cache list and the historical data submission request A corresponding historical combined signature value, the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value;
  • the execution subject corresponding to the method of this embodiment is the processing device of the data submission request, which may specifically be the server.
  • the aforementioned designated interface is an interface with an anti-duplicate submission function, that is, an interface configured with an anti-duplicate code.
  • the designated interface may not include a query interface or a page interface, and the aforementioned designated interface can be determined according to the interface information input by the developer.
  • the server After the server receives the data submission request sent by the client through the above specified interface, it can obtain the address information of the client from the data request, and locate the corresponding client according to the address information, and then download it from the client Obtain the parameter data corresponding to the data submission request, where the parameter data includes the identity parameter and the service request parameter.
  • the parameter data may be in the form of a string of characters.
  • the form of the specific string may be "first Parameter name + first parameter value / second parameter name + second parameter value /".
  • the identification parameters and service request parameters in the parameter data can be sorted according to the natural order of the initials, and combined according to the sort order to obtain the above-mentioned combined parameter data.
  • the natural order of letters refers to the natural arrangement order of English letters, namely ABCD...MNOP...WXYZ.
  • the corresponding combined signature value can be obtained, where the combined signature value can be a number, a character string, or a number Combination with string.
  • the signature calculation algorithm can be used to perform signature processing on the combined specified parameter data, and the signature calculation algorithm is not limited, and it is only necessary to use the signature calculation algorithm to make the calculated combined signature value unique and irreversible.
  • the above-mentioned signature operation algorithm may use a hash operation algorithm, and the above-mentioned combined parameter data is hashed according to the hash operation algorithm to obtain the corresponding combined hash value, namely the above-mentioned combined signature value.
  • the combined signature value is matched with the pre-stored signature value in the data cache list to obtain the matching result.
  • the data submission request can be processed correspondingly according to preset rules.
  • the aforementioned data cache list contains pre-stored signature values
  • the aforementioned pre-stored signature value is stored in the data cache list and corresponds to the historical combined signature value of the historical data submission request
  • the pre-stored signature value corresponds to
  • the historical parameter data corresponding to the historical data submission request is obtained after being sorted in the natural order of the initials and then signed.
  • the specific content of the processing corresponding to the data submission request includes processing the data submission request to obtain the corresponding processing result or restricting the response to the data submission request.
  • the parameter data corresponding to the data submission request is first sorted according to the natural order of the initials and combined according to the sort order to obtain a combined Parameter data, and then sign the combined parameter data to obtain the combined signature value, then match the combined signature value with the pre-stored signature value in the data cache list to obtain the matching result, and submit the data request based on the matching result Perform corresponding processing. If the data submission request is a repeated submission request, the response to the data submission request will be restricted, which is beneficial to avoid repeated submission of data submission requests due to the fact that the order of the parameters in the parameter data has been tampered with.
  • step S1 the method includes:
  • S101 Receive the anti-duplicate submission code input by the developer
  • S102 Create a functional module containing the anti-duplicate submission code
  • the server will obtain the designated interface corresponding to the designated interface information according to the designated interface information input by the developer, and further set the protection for the designated interface corresponding to the designated interface information.
  • Duplicate submission function to realize the specified interface that needs to prevent duplicate submission in custom configuration. Specifically, after receiving the anti-duplication submission code input by the developer, a functional module containing the anti-duplication submission code can be created, and then the designated interface url (Uniform URL) corresponding to the designated interface information input by the developer can be found internally.
  • the interface or page interface is not equipped with the anti-duplicate submission function, which can effectively reduce the resource consumption of the server system and effectively improve the customer's experience.
  • the above functional module containing the anti-duplicate submission code can also be plugged into other usage scenarios, such as a load balancer or flow control distributor, etc., to achieve the anti-duplicate submission of the functional module. Widely used in a variety of usage scenarios.
  • step S2 includes:
  • S200 Invoke a preset interceptor to intercept the data submission request
  • S202 Acquire the parameter data corresponding to the data submission request from the client according to the address information.
  • a filter with the function of intercepting requests is created in advance. After receiving the data submission request from the client, in order to avoid repeated submission of the request, the repeated data submission request triggers multiple identical data submission requests.
  • the server of this embodiment will not immediately respond to the above data submission request to obtain the corresponding response result.
  • the server will first call the pre-created interceptor to intercept the data submission request, and after the interception is successful, extract the client's address information from the data submission request, and then according to the client
  • the address information of the terminal downloads the above-mentioned parameter data corresponding to the data submission request from the client, so that after determining whether the data submission request satisfies the condition of repeated submission, the parameter data is further processed accordingly.
  • step S3 includes:
  • S302 Combine the identity parameter and the service request parameter according to the ranking to obtain the combined parameter data.
  • the above-mentioned parameter data includes the identity parameter and the service request parameter
  • the above-mentioned identity parameter includes the identity parameter name sessionId, ip and the corresponding identity parameter value.
  • the identity parameter can refer to the initiation The address and identity of the client of the data request.
  • the above business request parameters correspond to the business that the user needs to handle, including the business situation that the user needs to handle.
  • the above-mentioned sorting of the parameter data according to the natural order of the initials, the process of obtaining the combined parameter data is specifically: extracting the first parameter name of the above-mentioned identity identification parameter and the second parameter name of the service request parameter, and then adding the above-mentioned first parameter
  • the name and the second parameter name are sorted according to the natural order of the initials, and then the identity identification parameter and the service request parameter are combined according to the sorting to obtain the combined specified parameter data.
  • the parameters corresponding to the data submission request are obtained After the data, the first parameter name of the identity parameter in the parameter data and the second parameter name of the service request parameter are sorted in the natural order of the initials, and the identity parameter and the service request are sorted according to the order.
  • the parameters are combined to obtain the combined parameter data, and then the combined signature value of the specified parameter data of the combination is calculated, and finally it is judged whether there is the same signature value as the combined signature value in the data cache list to judge whether the specified data submission request is a duplicate submission is beneficial to avoid the occurrence of repeated data submission requests.
  • the server mistakenly believes that it is a new data submission request after the order of each parameter in the parameter data has been tampered with, and improves the server's intelligence in processing repeated data submission requests. Sex and accuracy.
  • step S6 includes:
  • the matching result includes that the combined signature value is the same as the pre-stored signature value in the data cache list or the combined signature value is different from the pre-stored signature value in the data cache list.
  • the combined signature value is matched with the signature value pre-stored in the data cache list, that is, it is judged whether the pre-stored signature value in the data cache list is the same as the above The combined signature value is the same. If the above-mentioned combined signature value is not the same as the pre-stored signature value, it indicates that the data submission request is a new data submission request.
  • the server processes the data submission request, that is, executes the submission of the above parameter data Submit the action and get the corresponding response data, and then return the response data to the client.
  • the above-mentioned combined signature value is the same as the pre-stored signature value, it means that the above-mentioned data submission request issued by the client has been submitted before, that is, the above-mentioned data submission request is a repeated submission request, and the server will restrict the The data submission request responds.
  • the parameter data corresponding to the data submission request is first sorted in the natural order of the initials to obtain the combined parameter data, and then the combined parameter data The data is signed to obtain the combined signature value, and the combined signature value is matched with the pre-stored signature value in the data cache list to determine whether the data submission request has been submitted. If it has been submitted, the combined signature value and pre-stored If the signature value of is the same, it will refuse to respond to the data submission request, which is helpful to avoid repeated submission of data submission requests.
  • the server mistakenly believes that it is a new data submission request It effectively prevents the problem of repeated submission of data requests, improves the efficiency of data submission, and also improves the accuracy of the server's processing of data submission requests.
  • step S6 includes:
  • S612 Send the second response data to the client
  • the method for processing the data submission request also needs to further determine the value of the pre-stored signature value. Whether the existence time is greater than the preset first expiration time, if the pre-stored signature value in the data cache list is the same as the aforementioned combined signature value, and the existence time of the pre-stored signature value is less than the preset first expiration time, then It is determined that the data submission request submitted by the client has been submitted before, and then the server will restrict the response to the data submission request.
  • the server will update the combined signature value into the above data cache list, and will process the data submission request, that is, perform the submission action of submitting parameter data and get Corresponding to the second response data, and then return the second response data to the client.
  • the first expiration time can be set according to the repeated submission time input by the user, and the repeated submission time is equivalent to the first expiration time.
  • the pre-stored signature value in the data cache list is set with a first expiration time to indicate that the pre-stored signature value in the data cache list is valid within the first expiration time.
  • the first expiration time can be set If the value is 2s, the pre-stored signature value is valid within 2s, and if the pre-stored signature value has more than 2s, such as 5s, the pre-stored signature value is determined to be invalid Therefore, the parameter data corresponding to the current data submission request can be judged as not duplicate data, and the current data submission request can be regarded as a new data submission request, and the above-mentioned combined signature value can be updated into the data cache list.
  • the replacement of the invalid pre-stored signature value is completed, and the data submission request is processed to obtain the second response data, and the second response data is returned to the user. If the existence time is 1s, the pre-stored signature value is determined to be valid, and it will be determined that the data submission request submitted by the client has been submitted before that, that is, the current data submission request meets the condition of repeated submission. And the parameter data corresponding to the data submission request is repeated data, and the server will restrict the response to the data submission request.
  • This embodiment sets the expiration time for the pre-stored signature value in the data cache list, and only the pre-stored signature value queried within the expiration time can be used as the basis for judging repeated submissions, which not only effectively prevents data from appearing Repeated submission also solves the problem of preventing poor server scalability and effectively improves the efficiency of data processing.
  • step S6 includes:
  • S623 Send the third response data to the client
  • the preset number of repeated submissions is the number of times the same data submission request is allowed to appear within the expiration time.
  • the number of repeated submissions can be set to 2
  • the second expiration time is Set to 5s
  • the same data submission request is allowed to appear twice within 5s when the pre-stored signature value is valid, that is, if the same data submission request occurs twice within 5s when the pre-stored signature value is valid, the server
  • the two data response processing corresponding to the same two data submission requests will be executed, but if the same data submission request occurs four times within 5s when the pre-stored signature value is valid, the server will only execute the first two times Two data response processing corresponding to the received designated data request, and the next two received designated data requests are regarded as repeated data submission requests, and no response will be made.
  • the above anti-duplicate submission method in addition to determining whether the existence time of the pre-stored signature value is less than the preset second expiration time, the above anti-duplicate submission method also needs to further determine whether the pre-stored submission times in the data cache list Less than the preset number of repeated submissions.
  • the server will process the data submission request, that is, execute the submission action of submitting the parameter data and obtain the corresponding third response data, and then return the third response data to the client, and send
  • the above-mentioned pre-stored number of submissions is replaced with the pre-stored number of submissions plus 1 and updated into the data cache list.
  • the server will restrict the response to the data submission request.
  • the pre-stored submission count in the data cache list is further set the number of repeated submissions.
  • the method includes:
  • S6200 Create a first modification interface that dynamically modifies the second expiration time
  • S6201 Create a second modification interface that dynamically modifies the number of repeated submissions.
  • the second expiration time and the number of repeated submissions can be adjusted according to actual conditions, and a first modification interface that dynamically modifies the second expiration time can be created, so that the second modification interface can be used for the second modification interface.
  • the data corresponding to the expiration time can be adjusted at will to meet the changing needs of the business.
  • a second modification interface that dynamically modifies the number of repeated submissions can be created, so that the data corresponding to the number of repeated submissions can be modified through the first modification interface Make random adjustments to further meet the changing needs of the business.
  • an embodiment of the present application also provides a data submission request processing device, including:
  • the first receiving module 1 is configured to receive a data submission request sent by a client through a designated interface
  • the first obtaining module 2 is configured to obtain parameter data corresponding to the data submission request
  • the sorting module 3 is used for sorting the parameter data according to the natural order of the initials, and combining according to the sorting order to obtain combined parameter data;
  • the signature module 4 is used to perform signature processing on the combined parameter data to generate a combined signature value
  • the matching module 5 is configured to match the combined signature value with the pre-stored signature value in the data cache list to obtain a corresponding matching result, wherein the pre-stored signature value is the AND stored in the data cache list The historical combined signature value corresponding to the historical data submission request, where the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value;
  • the processing module 6 is configured to process the data submission request according to the matching result and according to preset rules.
  • the realization process of the functions and roles of the first receiving module, the first obtaining module, the sorting module, the signature module, the matching module and the processing module in the processing device for the data submission request is detailed in the above data submission request.
  • the implementation process corresponding to steps S1 to S6 in the processing method will not be repeated here.
  • the processing device for the aforementioned data submission request includes:
  • the second obtaining module is configured to obtain the specified interface corresponding to the specified interface information according to the specified interface information input by the developer;
  • the second receiving module is used to receive the anti-duplicate submission code input by the developer
  • the first creation module is used to create a functional module containing the anti-duplicate submission code
  • the control module is used to control the designated interface to call the function module.
  • the implementation process of the functions and roles of the second acquisition module, the second receiving module, and the control module in the device for processing the data submission request is detailed in the corresponding steps S100 to S103 in the processing method of the data submission request. The realization process will not be repeated here.
  • the above-mentioned first acquisition module includes:
  • the calling unit is used to call a preset interceptor to intercept the data submission request
  • the first obtaining unit is configured to obtain the address information of the client according to the data submission request after successful interception;
  • the second obtaining unit is configured to obtain the parameter data corresponding to the data submission request from the client according to the address information.
  • the functions and functions of the calling unit, the first acquiring unit and the second acquiring unit in the device for processing the data submission request are detailed in the corresponding steps S200 to S202 in the processing method of the data submission request. The realization process will not be repeated here.
  • the aforementioned sorting module includes:
  • An extraction unit configured to extract the first parameter name of the identity parameter and the second parameter name of the service request parameter
  • a sorting unit configured to sort the first parameter name and the second parameter name in a natural order of initials
  • the combination unit is configured to combine the identity parameter and the service request parameter according to the ranking to obtain the combined parameter data.
  • the implementation process of the functions and roles of the extraction unit, the sorting unit, and the combination unit in the above-mentioned data submission request processing device is detailed in the implementation process corresponding to steps S300 to S302 in the above-mentioned data submission request processing method. This will not be repeated here.
  • the above-mentioned processing module includes:
  • the first processing unit is configured to, if the matching result is that the combined signature value is not the same as the pre-stored signature value, process the data submission request to obtain the corresponding first response result, and combine the Sending the first response data to the client;
  • the first restriction unit is configured to restrict a response to the data submission request if the matching result is that the combined signature value is the same as the pre-stored signature value.
  • the implementation process of the functions and roles of the first processing unit and the first restriction unit in the device for processing the data submission request is detailed in the implementation process corresponding to steps S600 to S601 in the processing method of the data submission request. I will not repeat them here.
  • the above-mentioned processing module includes:
  • a first judgment unit configured to judge whether the existence time of the pre-stored signature value is less than a preset first expiration time if the matching result is that the combined signature value is the same as the pre-stored signature value;
  • the second processing unit is configured to update the combined signature value into the data cache list if it is not less than the preset first expiration time, and process the data submission request to obtain corresponding second response data;
  • a first sending unit configured to send the second response data to the client
  • the second restriction unit is configured to restrict the response to the data submission request if it is less than the preset first expiration time.
  • the realization process of the functions and roles of the first judging unit, the second processing unit, the first sending unit, and the second limiting unit in the device for processing the data submission request is detailed in the processing method of the data submission request.
  • the implementation process corresponding to steps S610 to S613 in, will not be repeated here.
  • the above-mentioned processing module includes:
  • a second determining unit configured to determine whether the existence time of the pre-stored signature value is less than a preset second expiration time if the matching result is that the combined signature value is the same as the pre-stored signature value;
  • the third determining unit is configured to determine whether the number of submissions pre-stored in the data cache list is less than the preset number of repeated submissions if it is less than the preset second expiration time;
  • the third processing unit is configured to replace the value of the pre-stored number of submissions with the value of the pre-stored number of submissions+1 and update it into the data cache list if it is less than the preset number of repeated submissions, and Processing the data submission request to obtain corresponding third response data;
  • a second sending unit configured to send the third response data to the client
  • the third limiting unit is configured to limit the response to the data submission request if it is not less than the preset number of repeated submissions.
  • the above-mentioned processing module includes:
  • the second creation module is configured to create a first modification interface for dynamically modifying the second expiration time
  • the third creation module is used to create a second modification interface for dynamically modifying the number of repeated submissions.
  • the implementation process of the functions and roles of the second creation module and the third creation module in the device for processing the data submission request is detailed in the implementation process corresponding to steps S6200 to S6201 in the processing method of the data submission request. I will not repeat them here.
  • an embodiment of the present application also provides a computer device.
  • the computer device may be a server, and its internal structure may be as shown in FIG. 3.
  • the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed for the computer equipment is used to provide computing and control capabilities.
  • the memory of the computer device includes a volatile or nonvolatile storage medium and internal memory.
  • the volatile or non-volatile storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in a volatile or non-volatile storage medium.
  • the database of the computer device is used to store data such as data submission requests and pre-stored signature values.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instruction is executed by the processor, the method for processing a data submission request shown in any of the foregoing exemplary embodiments is implemented.
  • FIG. 3 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 devices and computer equipment to which the solution of the present application is applied.
  • An embodiment of the present application further provides a computer-readable storage medium.
  • the computer-readable storage medium may be volatile or non-volatile, and computer-readable instructions are stored thereon.
  • the steps in the above-mentioned data submission request processing method embodiment are realized when executed by one or more processors.
  • the data submission request processing method, device, and computer equipment provided in the embodiments of this application can effectively prevent the problem of repeated submission of data, ensure the normal development of server services, and improve data submission requests.
  • the processing efficiency also improves the accuracy of the server's processing of data submission requests.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Abstract

Disclosed by the present application are a data submission request processing method and apparatus and a computer device, wherein the method comprises: by means of a specific interface, receiving a data submission request sent by a client; acquiring parameter data corresponding to the data submission request; sorting the parameter data in alphabetical order, and combining same according to the sorting order to obtain combined parameter data; signing the combined parameter data to generate combined signature values; matching the combined signature values with signature values pre-stored in a data buffer list to obtain corresponding matching results; and according to the matching results, processing the data submission request according to a preset rule. The present application may effectively prevent the problem in which data is repeatedly submitted, which increases the efficiency with which the data submission request is processed, and also increases the accuracy with which a server processes the data submission request.

Description

数据提交请求的处理方法、装置和计算机设备Method, device and computer equipment for processing data submission request
本申请要求于2019年05月13日提交中国专利局、申请号为2019103953100,发明名称为“数据提交请求的处理方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on May 13, 2019, the application number is 2019103953100, and the invention title is "Data submission request processing method, device and computer equipment", the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请涉及通讯技术领域,具体涉及一种数据提交请求的处理方法、装置和计算机设备。This application relates to the field of communication technology, and specifically to a method, device and computer equipment for processing a data submission request.
背景技术Background technique
在现有的互联网应用中,用户通常是通过客户端调用服务器提供的接口来与服务器进行数据交互。当用户通过客户端向服务器发送数据提交请求时,通常是通过点击数据提交的按钮来触发客户端上的数据提交操作,但是如果在点按钮的过程中出现了网络出现延迟或故障、客户端出现卡顿等情形,那么用户会无法判断数据提交操作是否成功。此时通常会出现如果数据提交操作成功了,但用户误认为数据没有提交成功而选择通过按钮进行再次提交的情况,当出现这种情况时,由于后续再次提交的数据提交请求的参数数据与之前提交的数据提交请求内的参数数据是相同的,则服务器可以判断出用户后续再次提交的数据是重复提交,并且不会对后续再次提交的数据提交操作进行响应。但如果在用户后续执行对之前的数据的再次提交的过程中,如果出现了不法分子对用户再次提交的数据所对应的参数数据中各参数的顺序进行了篡改,则此时服务器在接收到经过篡改后的数据提交请求后,会无法判断出该篡改后的数据提交请求其实是属于重复的数据提交操作,并会误认为其是一个新的数据提交操作,从而导致了服务器对数据请求的重复处理,从而可能出现服务器多次写入重复的数据的情况,使得服务器的处理速度变慢,进而影响服务器的业务的正常开展,甚至造成服务器的崩溃或瘫痪。In existing Internet applications, users usually use the client to call the interface provided by the server to interact with the server. When the user sends a data submission request to the server through the client, the data submission operation on the client is usually triggered by clicking the data submission button, but if there is a network delay or failure in the process of clicking the button, the client appears In situations such as freezing, the user will not be able to judge whether the data submission operation is successful. At this time, if the data submission operation is successful, but the user mistakenly believes that the data is not submitted successfully and chooses to submit again through the button, when this happens, the parameter data of the subsequent data submission request is different from the previous one. If the parameter data in the submitted data submission request is the same, the server can determine that the subsequent data submitted by the user is a repeated submission, and will not respond to the subsequent data submission operation again. However, if in the process of the user's subsequent resubmission of the previous data, if a criminal has tampered with the order of the parameters in the parameter data corresponding to the data submitted by the user again, the server will receive the After the tampered data submission request, it will not be possible to determine that the tampered data submission request is actually a repeated data submission operation, and will mistakenly believe that it is a new data submission operation, which causes the server to repeat the data request Processing, so that the server may write repeated data multiple times, which slows down the processing speed of the server, which in turn affects the normal development of the server's business, and even causes the server to crash or paralyze.
技术问题technical problem
本申请的主要目的为提供一种数据提交请求的处理方法、装置和计算机设备,旨在解决现有的客户端向服务器发送数据提交请求的过程中可能会出现重复提交的技术问题。The main purpose of this application is to provide a method, device, and computer equipment for processing data submission requests, aiming to solve the technical problem of repeated submissions that may occur in the process of the existing client sending data submission requests to the server.
技术解决方案Technical solutions
为了实现上述申请目的,本申请提出一种数据提交请求的处理方法,所述方法包括步骤:In order to achieve the purpose of the above application, this application proposes a method for processing a data submission request, and the method includes the steps:
通过指定接口接收客户端发送的数据提交请求;Receive the data submission request sent by the client through the designated interface;
获取与所述数据提交请求对应的参数数据;Obtaining parameter data corresponding to the data submission request;
对所述参数数据按照首字母的自然顺序进行排序,并依照所述排序的顺序进行组合,得到组合的参数数据;Sorting the parameter data according to the natural order of the initials, and combining according to the sorting order to obtain combined parameter data;
对所述组合的参数数据进行签名处理,生成组合签名值;Perform signature processing on the combined parameter data to generate a combined signature value;
将所述组合签名值与数据缓存列表内预存储的签名值进行匹配,得到对应的匹配结果,其中,所述预存储的签名值为所述数据缓存列表内存储的与历史数据提交请求对应的历史组合签名值,所述匹配结果包括所述组合签名值与所述预存储的签名值相同、或所述组合签名值与所述预存储的签名值不相同;The combined signature value is matched with the pre-stored signature value in the data cache list to obtain the corresponding matching result, wherein the pre-stored signature value is stored in the data cache list and corresponds to the historical data submission request Historical combined signature value, the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value;
根据所述匹配结果,按照预设规则对所述数据提交请求进行处理。According to the matching result, the data submission request is processed according to preset rules.
本申请还提供一种数据提交请求的处理装置,包括:This application also provides a device for processing a data submission request, including:
第一接收模块,用于通过指定接口接收客户端发送的数据提交请求;The first receiving module is used to receive the data submission request sent by the client through the designated interface;
第一获取模块,用于获取与所述数据提交请求对应的参数数据;The first obtaining module is configured to obtain parameter data corresponding to the data submission request;
排序模块,用于对所述参数数据按照首字母的自然顺序进行排序,并依照所述排序的顺序进行组合,得到组合的参数数据;The sorting module is used to sort the parameter data according to the natural order of the initials, and combine according to the sorting order to obtain combined parameter data;
签名模块,用于对所述组合的参数数据进行签名处理,生成组合签名值;The signature module is used to perform signature processing on the combined parameter data to generate a combined signature value;
匹配模块,用于将所述组合签名值与数据缓存列表内预存储的签名值进行匹配,得到对应的匹配结果,其中,所述预存储的签名值为所述数据缓存列表内存储的与历史数据提交请求对应的历史组合签名值,所述匹配结果包括所述组合签名值与所述预存储的签名值相同、或所述组合签名值与所述预存储的签名值不相同;The matching module is used to match the combined signature value with the pre-stored signature value in the data cache list to obtain a corresponding matching result, wherein the pre-stored signature value is the historical data stored in the data cache list The historical combined signature value corresponding to the data submission request, the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value;
处理模块,用于根据所述匹配结果,按照预设规则对所述数据提交请求进行处理。The processing module is configured to process the data submission request according to the matching result and according to preset rules.
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现上述方法的步骤。The application also provides a computer device, including a memory and a processor, the memory stores computer readable instructions, and the processor implements the steps of the above method when the computer readable instructions are executed.
本申请还提供一种计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述方法的步骤。The present application also provides a computer-readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the steps of the foregoing method are implemented.
有益效果Beneficial effect
本申请中提供的数据提交请求的处理方法、装置和计算机设备,通过指定接口接收客户端发送的数据提交请求;获取与所述数据提交请求对应的参数数据;对所述参数数据按照首字母的自然顺序进行排序,并依照所述排序的顺序进行组合,得到组合的参数数据;对所述组合的参数数据进行签名处理,生成组合签名值;将所述组合签名值与数据缓存列表内预存储的签名值进行匹配,得到对应的匹配结果,其中,所述匹配结果包括所述组合签名值与所述预存储的签名值相同、或所述组合签名值与所述预存储的签名值不相同;根据所述匹配结果,按照预设规则对所述数据提交请求进行处理。通过本申请能有效地防止了数据出现重复提交的问题,保证了服务器的业务的正常开展,提高了数据提交请求的处理效率,也提高了服务器对数据提交请求处理的准确率。The data submission request processing method, device and computer equipment provided in this application receive the data submission request sent by the client through the designated interface; obtain the parameter data corresponding to the data submission request; Sort in natural order, and combine according to the sort order to obtain combined parameter data; perform signature processing on the combined parameter data to generate a combined signature value; pre-store the combined signature value and the data cache list Matching the signature value of, to obtain a corresponding matching result, where the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value ; According to the matching result, the data submission request is processed in accordance with preset rules. Through this application, the problem of repeated data submission can be effectively prevented, the normal development of the server's business is ensured, the processing efficiency of data submission requests is improved, and the accuracy of the server's processing of data submission requests is also improved.
附图说明Description of the drawings
图1是本申请一实施例的数据提交请求的处理方法的流程示意图;FIG. 1 is a schematic flowchart of a method for processing a data submission request according to an embodiment of the present application;
图2是本申请一实施例的数据提交请求的处理装置的结构示意图;FIG. 2 is a schematic structural diagram of an apparatus for processing a data submission request according to an embodiment of the present application;
图3是本申请一实施例的计算机设备的结构示意图。Fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
本发明的最佳实施方式The best mode of the invention
应当理解,此处所描述的具体实施例仅仅用于解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the application, and are not used to limit the application.
参照图1,本申请一实施例的数据提交请求的处理方法,包括:1, the processing method of a data submission request according to an embodiment of the present application includes:
S1:通过指定接口接收客户端发送的数据提交请求;S1: Receive the data submission request sent by the client through the designated interface;
S2:获取与所述数据提交请求对应的参数数据;S2: Obtain parameter data corresponding to the data submission request;
S3:对所述参数数据按照首字母的自然顺序进行排序,并依照所述排序的顺序进行组合,得到组合的参数数据;S3: Sort the parameter data according to the natural order of the initials, and combine according to the sorting order to obtain combined parameter data;
S4:对所述组合的参数数据进行签名处理,生成组合签名值;S4: Perform signature processing on the combined parameter data to generate a combined signature value;
S5:将所述组合签名值与数据缓存列表内预存储的签名值进行匹配,得到对应的匹配结果,其中,所述预存储的签名值为所述数据缓存列表内存储的与历史数据提交请求对应的历史组合签名值,所述匹配结果包括所述组合签名值与所述预存储的签名值相同、或所述组合签名值与所述预存储的签名值不相同;S5: Match the combined signature value with the pre-stored signature value in the data cache list to obtain a corresponding matching result, where the pre-stored signature value is the one stored in the data cache list and the historical data submission request A corresponding historical combined signature value, the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value;
S6:根据所述匹配结果,按照预设规则对所述数据提交请求进行处理。S6: According to the matching result, the data submission request is processed according to preset rules.
如上述步骤S1至S3所述,本实施例的方法对应的执行主体为数据提交请求的处理装置,具体可为服务器。上述指定接口是具有防重复提交功能的接口,即配置有防重复代码的接口,例如该指定接口可不包括查询接口或页面接口,上述指定接口可根据开发人员输入的接口信息进行确定。服务器在通过上述指定接口接收到客户端发送过来的数据提交请求后,可从该数据请求中获取客户端的地址信息,从而根据该地址信息定位到对应的该客户端,然后从该客户端中下载得到与该数据提交请求对应的参数数据,其中该参数数据包括身份标识参数与业务请求参数,该参数数据可为一串字符串的形式,举例地,具体的字符串的形式可为“第一参数名称+第一参数数值/第二参数名称+第二参数数值/……”。在获得了上述参数数据后,可通过将该参数数据中的身份标识参数与业务请求参数按照首字母的自然顺序进行排序,并依照该排序的顺序进行组合得到上述组合的参数数据,其中上述首字母的自然顺序是指英文字母自然的排列顺序,即ABCD…MNOP…WXYZ。As described in the above steps S1 to S3, the execution subject corresponding to the method of this embodiment is the processing device of the data submission request, which may specifically be the server. The aforementioned designated interface is an interface with an anti-duplicate submission function, that is, an interface configured with an anti-duplicate code. For example, the designated interface may not include a query interface or a page interface, and the aforementioned designated interface can be determined according to the interface information input by the developer. After the server receives the data submission request sent by the client through the above specified interface, it can obtain the address information of the client from the data request, and locate the corresponding client according to the address information, and then download it from the client Obtain the parameter data corresponding to the data submission request, where the parameter data includes the identity parameter and the service request parameter. The parameter data may be in the form of a string of characters. For example, the form of the specific string may be "first Parameter name + first parameter value / second parameter name + second parameter value /...". After obtaining the above parameter data, the identification parameters and service request parameters in the parameter data can be sorted according to the natural order of the initials, and combined according to the sort order to obtain the above-mentioned combined parameter data. The natural order of letters refers to the natural arrangement order of English letters, namely ABCD...MNOP...WXYZ.
如上述步骤S4至S6所述,在得到上述组合的参数数据后,通过对该组合的参数数据进行签名处理,可得到对应的组合签名值,其中上述组合签名值可为数字、字符串或者数字与字符串的结合。另外,可采用签名运算算法对该组合的指定参数数据进行签名处理,对该签名运算算法不作限定,只需要通过该签名运算算法使得计算得到的组合签名值是唯一的且不可逆的即可。具体地,上述签名运算算法可采用哈希运算算法,根据哈希运算算法对上述组合的参数数据进行哈希运算,便可得到对应的组合哈希值,即上述的组合签名值。然后将组合签名值与数据缓存列表内预存储的签名值进行匹配,得到匹配结果。之后根据上述匹配结果,可按照预设规则对该数据提交请求进行对应的处理。其中,上述数据缓存列表内包含有预存储的签名值,且上述预存储的签名值为数据缓存列表内存储的与历史数据提交请求对应的历史组合签名值,该预存储的签名值为由对应的历史数据提交请求对应的历史参数数据经过首字母的自然顺序排序的处理后再进行签名处理后得到的。上述对该数据提交请求进行对应的处理的具体内容包括对该数据提交请求进行处理得到对应的处理结果或者限制对该数据提交请求进行响应。在本实施例,当通过指定接口接收到客户端发送的数据提交请求时,首先对与该数据提交请求对应的参数数据按照首字母的自然顺序进行排序并依照该排序的顺序进行组合得到组合的参数数据,然后对该组合的参数数据进行签名得到组合签名值,之后将该组合签名值与数据缓存列表内预存储的签名值进行匹配来得到匹配结果,并根据该匹配结果来对数据提交请求进行对应的处理,若该数据提交请求为重复提交的请求,则会限制对该数据提交请求进行响应,从而有利于避免出现重复提交的数据提交请求由于参数数据中各参数的顺序被篡改后却被服务器误认为是新的数据提交请求的情况,有效地防止了数据出现重复提交的问题,保证了服务器的业务的正常开展,提高了数据提交请求的处理效率,也提高了服务器对数据提交请求处理的准确率。As described in the above steps S4 to S6, after obtaining the combined parameter data, by signing the combined parameter data, the corresponding combined signature value can be obtained, where the combined signature value can be a number, a character string, or a number Combination with string. In addition, the signature calculation algorithm can be used to perform signature processing on the combined specified parameter data, and the signature calculation algorithm is not limited, and it is only necessary to use the signature calculation algorithm to make the calculated combined signature value unique and irreversible. Specifically, the above-mentioned signature operation algorithm may use a hash operation algorithm, and the above-mentioned combined parameter data is hashed according to the hash operation algorithm to obtain the corresponding combined hash value, namely the above-mentioned combined signature value. Then, the combined signature value is matched with the pre-stored signature value in the data cache list to obtain the matching result. Then, according to the above matching result, the data submission request can be processed correspondingly according to preset rules. Wherein, the aforementioned data cache list contains pre-stored signature values, and the aforementioned pre-stored signature value is stored in the data cache list and corresponds to the historical combined signature value of the historical data submission request, and the pre-stored signature value corresponds to The historical parameter data corresponding to the historical data submission request is obtained after being sorted in the natural order of the initials and then signed. The specific content of the processing corresponding to the data submission request includes processing the data submission request to obtain the corresponding processing result or restricting the response to the data submission request. In this embodiment, when the data submission request sent by the client is received through the designated interface, the parameter data corresponding to the data submission request is first sorted according to the natural order of the initials and combined according to the sort order to obtain a combined Parameter data, and then sign the combined parameter data to obtain the combined signature value, then match the combined signature value with the pre-stored signature value in the data cache list to obtain the matching result, and submit the data request based on the matching result Perform corresponding processing. If the data submission request is a repeated submission request, the response to the data submission request will be restricted, which is beneficial to avoid repeated submission of data submission requests due to the fact that the order of the parameters in the parameter data has been tampered with. The situation of being mistaken by the server as a new data submission request effectively prevents the problem of repeated submission of data, ensures the normal development of the server’s business, improves the processing efficiency of the data submission request, and also improves the server’s data submission request The accuracy of processing.
进一步地,本申请一实施例中,上述步骤S1之前,包括:Further, in an embodiment of the present application, before step S1, the method includes:
S100:根据开发人员输入的指定接口信息,获取与所述指定接口信息对应的所述指定接口;S100: Obtain the specified interface corresponding to the specified interface information according to the specified interface information input by the developer;
S101:接收所述开发人员输入的防重复提交代码;S101: Receive the anti-duplicate submission code input by the developer;
S102:创建包含所述防重复提交代码的功能模块;S102: Create a functional module containing the anti-duplicate submission code;
S103:控制所述指定接口调用所述功能模块。S103: Control the designated interface to call the function module.
如上述步骤S100至S103所述,服务器会根据开发人员输入的指定接口信息,来获取得到与上述指定接口信息对应的上述指定接口,并进一步来为与该指定接口信息相对应的指定接口设置防重复提交功能,以实现自定义配置需要防重复提交的指定接口。具体地,在接收到开发人员输入的防重复提交代码后,可创建出包含该防重复提交代码的功能模块,然后从内部查找出与上述开发人员输入的指定接口信息对应的指定接口url(Uniform Resource Locator,统一资源定位符),最后控制该指定接口url实现对上述功能模块的调用,从而实现根据开发人员的使用意图来配置需要防重复提交的指定接口,而对一些客户不经常使用的查询接口或页面接口不设置防重复提交功能,能有效地降低服务器系统的资源消耗,也能有效地提高客户的使用体验。进一步地,在实际应用上,还可以将上述包含防重复提交代码的功能模块外挂到其它的使用场景,例如负载均衡器或者流量控制分发器,等等,以实现该功能模块的防重复提交在多种使用场景的广泛应用。As described in the above steps S100 to S103, the server will obtain the designated interface corresponding to the designated interface information according to the designated interface information input by the developer, and further set the protection for the designated interface corresponding to the designated interface information. Duplicate submission function to realize the specified interface that needs to prevent duplicate submission in custom configuration. Specifically, after receiving the anti-duplication submission code input by the developer, a functional module containing the anti-duplication submission code can be created, and then the designated interface url (Uniform URL) corresponding to the designated interface information input by the developer can be found internally. Resource Locator, uniform resource locator), and finally control the specified interface url to implement the call to the above functional modules, so as to realize the configuration of the specified interface that needs to be anti-resubmitted according to the developer's use intention, and for some queries that customers do not often use The interface or page interface is not equipped with the anti-duplicate submission function, which can effectively reduce the resource consumption of the server system and effectively improve the customer's experience. Further, in practical applications, the above functional module containing the anti-duplicate submission code can also be plugged into other usage scenarios, such as a load balancer or flow control distributor, etc., to achieve the anti-duplicate submission of the functional module. Widely used in a variety of usage scenarios.
进一步地,本申请一实施例中,上述步骤S2,包括:Further, in an embodiment of the present application, the above step S2 includes:
S200:调用预设的拦截器对所述数据提交请求进行拦截;S200: Invoke a preset interceptor to intercept the data submission request;
S201:拦截成功后,根据所述数据提交请求获取所述客户端的地址信息;S201: After the interception is successful, obtain the address information of the client according to the data submission request;
S202:根据所述地址信息,从所述客户端获取与所述数据提交请求对应的所述参数数据。S202: Acquire the parameter data corresponding to the data submission request from the client according to the address information.
如上述步骤S200至S202所述,预先创建一个具有拦截请求功能的过滤器,当接收到客户端发出的数据提交请求后,为了避免出现请求重复提交导致重复的数据提交请求触发了多个相同的业务处理逻辑的情况,即服务器对多个相同的数据提交请求执行了对应的多个业务逻辑处理的情况,本实施例的服务器不会立即对上述数据提交请求进行响应来得到对应的响应结果,并向客户端返回该响应结果,而服务器首先会调用预先创建的上述拦截器来对该数据提交请求进行拦截,并在拦截成功后从该数据提交请求提取出客户端的地址信息,之后再根据客户端的地址信息从客户端内下载与该数据提交请求对应的上述参数数据,以便在确定该数据提交请求是否满足重复提交的条件之后,进一步对该参数数据进行后续的相应处理。通过对接收到的数据请求进行拦截并判断该数据提交请求是否属于数据请求的重复提交,有利于避免重复的数据请求触发多次相同的业务处理逻辑,有效地保证了服务器业务处理的严密性以及服务器的安全可靠性。As described in the above steps S200 to S202, a filter with the function of intercepting requests is created in advance. After receiving the data submission request from the client, in order to avoid repeated submission of the request, the repeated data submission request triggers multiple identical data submission requests. In the case of business processing logic, that is, when the server performs multiple corresponding business logic processing on multiple identical data submission requests, the server of this embodiment will not immediately respond to the above data submission request to obtain the corresponding response result. And return the response result to the client, and the server will first call the pre-created interceptor to intercept the data submission request, and after the interception is successful, extract the client's address information from the data submission request, and then according to the client The address information of the terminal downloads the above-mentioned parameter data corresponding to the data submission request from the client, so that after determining whether the data submission request satisfies the condition of repeated submission, the parameter data is further processed accordingly. By intercepting the received data request and judging whether the data submission request belongs to the repeated submission of the data request, it is helpful to avoid repeated data requests triggering the same business processing logic multiple times, effectively ensuring the rigor of server business processing and The security and reliability of the server.
进一步地,本申请一实施例中,上述步骤S3,包括:Further, in an embodiment of the present application, the above step S3 includes:
S300:提取所述身份标识参数的第一参数名称与所述业务请求参数的第二参数名称;S300: Extract the first parameter name of the identity parameter and the second parameter name of the service request parameter;
S301:将所述第一参数名称与所述第二参数名称按照首字母的自然顺序进行排序;S301: Sort the first parameter name and the second parameter name in a natural order of initials;
S302:根据所述排序对所述身份标识参数与所述业务请求参数进行组合,得到所述组合的参数数据。S302: Combine the identity parameter and the service request parameter according to the ranking to obtain the combined parameter data.
如上述步骤S300至S302所述,上述的参数数据包括身份标识参数与业务请求参数,上述身份标识参数包括身份标识参数名称sessionId,ip以及对应的身份标识参数数值,该身份标识参数能够指代发起该数据请求的客户端的地址与身份,例如上述身份标识参数包括“sessionId=95d5d86f-bafa-474a-b457-b60a5f661def”以及“ip=183.14.135.240”。上述业务请求参数对应用户需要办理的业务,包含用户需要办理的业务情况,假如用户需要为张三充值10元的业务请求可表示为:“name=zhangsan/charge=10”。上述对参数数据按照首字母的自然顺序进行排序,得到组合的参数数据的过程具体为:提取出上述身份标识参数的第一参数名称与业务请求参数的第二参数名称,然后将上述第一参数名称与第二参数名称按照首字母的自然顺序进行排序,再根据上述排序对身份标识参数与所述业务请求参数进行组合来得到所述组合后的上述指定参数数据。举例地,结合上述的例子,按照对用户输入的数据提交请求对应的参数数据进行按照首字母的自然顺序排序的处理后,得到的组合的参数数据为:“charge=10/ ip=183.14.135.240/ name=zhangsan/sessionId=95d5d86f-bafa-474a-b457-b60a5f661def”。在数据重复提交的场景里,当用户通过客户端向服务器发出了一个特定数据提交请求后,可能会出现该特定数据提交请求被一些非法分子拦截并将与特定数据提交请求对应的特定参数数据中每一个特定参数的顺序进行恶意更改的情形,而如果服务器之前已经处理过该特定数据提交请求,但如果该特定参数数据中各特定参数的顺序发生了改变,导致特定参数数据的特定签名值也发生了改变,那么数据缓存列表中便不会存在与该特定签名值相同的签名值,故服务器会认为这是用户发出的新的数据提交请求并会对上述特定数据提交请求执行对应的响应,从而导致了该特定数据提交请求的重复提交。在本实施例,在获取了与数据提交请求对应的参数数据后,首先会对参数数据中的身份标识参数的第一参数名称与所述业务请求参数的第二参数名称按首字母的自然顺序进行排序,并根据该排序来对身份标识参数与业务请求参数进行组合得到组合的参数数据,之后再计算该组合的指定参数数据的组合签名值,最后判断数据缓存列表内是否存在与该组合签名值相同的签名值来判断该指定数据提交请求是否为重复提交,从而有利于避免出现重复提交的数据提交请求由于参数数据中各参数的顺序被篡改后被服务器误认为是新的数据提交请求的情况,提高了服务器对重复的数据提交请求进行处理的智能性和准确性。As described in the above steps S300 to S302, the above-mentioned parameter data includes the identity parameter and the service request parameter, and the above-mentioned identity parameter includes the identity parameter name sessionId, ip and the corresponding identity parameter value. The identity parameter can refer to the initiation The address and identity of the client of the data request. For example, the aforementioned identity parameters include "sessionId=95d5d86f-bafa-474a-b457-b60a5f661def" and "ip=183.14.135.240". The above business request parameters correspond to the business that the user needs to handle, including the business situation that the user needs to handle. If the user needs to recharge Zhangsan with 10 yuan, the business request can be expressed as: "name=zhangsan/charge=10". The above-mentioned sorting of the parameter data according to the natural order of the initials, the process of obtaining the combined parameter data is specifically: extracting the first parameter name of the above-mentioned identity identification parameter and the second parameter name of the service request parameter, and then adding the above-mentioned first parameter The name and the second parameter name are sorted according to the natural order of the initials, and then the identity identification parameter and the service request parameter are combined according to the sorting to obtain the combined specified parameter data. For example, in combination with the above example, after the parameter data corresponding to the data submission request input by the user is sorted in the natural order of the initials, the combined parameter data obtained is: "charge=10/ ip=183.14.135.240/ name=zhangsan/sessionId=95d5d86f-bafa-474a-b457-b60a5f661def". In the scenario of repeated data submission, when the user sends a specific data submission request to the server through the client, it may appear The specific data submission request is intercepted by some illegal elements and the order of each specific parameter in the specific parameter data corresponding to the specific data submission request is maliciously changed, and if the server has processed the specific data submission request before, but if The order of the specific parameters in the specific parameter data has changed, resulting in the specific signature value of the specific parameter data also being changed. Then the data cache list will not have the same signature value as the specific signature value, so the server will think This is a new data submission request sent by the user and will execute the corresponding response to the above specific data submission request, which results in repeated submissions of the specific data submission request. In this embodiment, the parameters corresponding to the data submission request are obtained After the data, the first parameter name of the identity parameter in the parameter data and the second parameter name of the service request parameter are sorted in the natural order of the initials, and the identity parameter and the service request are sorted according to the order. The parameters are combined to obtain the combined parameter data, and then the combined signature value of the specified parameter data of the combination is calculated, and finally it is judged whether there is the same signature value as the combined signature value in the data cache list to judge whether the specified data submission request is a duplicate Submission is beneficial to avoid the occurrence of repeated data submission requests. The server mistakenly believes that it is a new data submission request after the order of each parameter in the parameter data has been tampered with, and improves the server's intelligence in processing repeated data submission requests. Sex and accuracy.
进一步地,本申请一实施例中,上述步骤S6,包括:Further, in an embodiment of the present application, the above step S6 includes:
S600:若所述匹配结果为所述组合签名值与所述预存储的签名值不相同,则对所述数据提交请求进行处理得到对应的第一响应结果,并将所述第一响应数据发送至所述客户端;S600: If the matching result is that the combined signature value is not the same as the pre-stored signature value, process the data submission request to obtain a corresponding first response result, and send the first response data To the client;
S601:若所述匹配结果为所述组合签名值与所述预存储的签名值相同,则限制对所述数据提交请求进行响应。S601: If the matching result is that the combined signature value is the same as the pre-stored signature value, restrict responding to the data submission request.
如上述步骤S600至S601所述,上述匹配结果包括上述组合签名值与数据缓存列表内的预存储的签名值相同或所述组合签名值与数据缓存列表内的预存储的签名值不相同。在对上述参数数据进行签名处理并生成对应的组合签名值后,通过将该组合签名值与数据缓存列表内预存储的签名值进行匹配,即判断数据缓存列表内预存储的签名值是否与上述组合签名值相同,如果上述组合签名值与预存储的签名值不相同,则表明该数据提交请求为一个新的数据提交请求,之后服务器对该数据提交请求进行处理,即执行提交上述参数数据的提交动作并得到对应的响应数据,再将该响应数据返回给客户端。但如果上述组合签名值与预存储的签名值相同,则说明由客户端发出的上述数据提交请求在之前已经有提交的记录,即上述数据提交请求属于一个重复提交的请求,则服务器会限制对该数据提交请求进行响应。在本实施例,在接收到用户通过客户端发送的数据提交请求时,首先对与该数据提交请求对应的参数数据按照首字母的自然顺序进行排序得到组合的参数数据,然后对该组合的参数数据进行签名得到组合签名值,并通过将该组合签名值与数据缓存列表内的预存储的签名值进行匹配来判断该数据提交请求是否已经被提交,若已提交,即组合签名值与预存储的签名值相同,则会拒绝对该数据提交请求进行响应,从而有利于避免出现重复提交的数据提交请求由于参数数据中各参数的顺序被篡改后被服务器误认为是新的数据提交请求的情况,有效地防止了数据请求出现重复提交的问题,提高了数据提交的效率,也提高了服务器对数据提交请求处理的准确率。As described in steps S600 to S601, the matching result includes that the combined signature value is the same as the pre-stored signature value in the data cache list or the combined signature value is different from the pre-stored signature value in the data cache list. After the above parameter data is signed and the corresponding combined signature value is generated, the combined signature value is matched with the signature value pre-stored in the data cache list, that is, it is judged whether the pre-stored signature value in the data cache list is the same as the above The combined signature value is the same. If the above-mentioned combined signature value is not the same as the pre-stored signature value, it indicates that the data submission request is a new data submission request. After that, the server processes the data submission request, that is, executes the submission of the above parameter data Submit the action and get the corresponding response data, and then return the response data to the client. However, if the above-mentioned combined signature value is the same as the pre-stored signature value, it means that the above-mentioned data submission request issued by the client has been submitted before, that is, the above-mentioned data submission request is a repeated submission request, and the server will restrict the The data submission request responds. In this embodiment, when receiving the data submission request sent by the user through the client, the parameter data corresponding to the data submission request is first sorted in the natural order of the initials to obtain the combined parameter data, and then the combined parameter data The data is signed to obtain the combined signature value, and the combined signature value is matched with the pre-stored signature value in the data cache list to determine whether the data submission request has been submitted. If it has been submitted, the combined signature value and pre-stored If the signature value of is the same, it will refuse to respond to the data submission request, which is helpful to avoid repeated submission of data submission requests. Because the order of each parameter in the parameter data has been tampered with, the server mistakenly believes that it is a new data submission request It effectively prevents the problem of repeated submission of data requests, improves the efficiency of data submission, and also improves the accuracy of the server's processing of data submission requests.
进一步地,本申请一实施例中,上述步骤S6,包括:Further, in an embodiment of the present application, the above step S6 includes:
S610:若所述匹配结果为所述组合签名值与所述预存储的签名值相同,则判断所述预存储的签名值的存在时间是否小于预设的第一失效时间;S610: If the matching result is that the combined signature value is the same as the pre-stored signature value, judge whether the existence time of the pre-stored signature value is less than the preset first expiration time;
S611:若不小于预设的第一失效时间,将所述组合签名值更新进所述数据缓存列表中,并对所述数据提交请求进行处理得到对应的第二响应数据;S611: If it is not less than the preset first expiration time, update the combined signature value into the data cache list, and process the data submission request to obtain corresponding second response data;
S612:将所述第二响应数据发送至所述客户端;S612: Send the second response data to the client;
S613:若小于预设的第一失效时间,则限制对所述数据提交请求进行响应。S613: If it is less than the preset first expiration time, restrict responding to the data submission request.
如上述步骤S610至S613所述,上述数据提交请求的处理方法除了要对数据缓存列表中是否存在与上述组合签名值相同的签名值进行判断之外,还需要进一步判断上述预存储的签名值的存在时间是否大于预设的第一失效时间,如果数据缓存列表中的预存储的签名值与上述组合签名值相同,且该预存储的签名值的存在时间小于预设的第一失效时间,则判定该客户端提交的数据提交请求在之前已提交过了,之后服务器会限制对数据提交请求进行响应。而如果数据缓存列表中的预存储的签名值与上述组合签名值相同,但该预存储的签名值的存在时间大于预设的第一失效时间,则判定该数据提交请求对应的参数数据不是重复的数据,即该数据提交请求不是重复提交的请求,因此服务器会将该组合签名值更新进上述数据缓存列表中,并会对该数据提交请求进行处理,即执行提交参数数据的提交动作并得到对应的第二响应数据,再将该第二响应数据返回给客户端。其中,上述第一失效时间可根据用户输入的重复提交时间进行设定,上述重复提交时间与上述第一失效时间等同。另外,通过对数据缓存列表内的预存储的签名值设置一个第一失效时间来表示数据缓存列表内的预存储的签名值在该第一失效时间内是有效的,例如第一失效时间可设为2s,则预存储的签名值的存在时间在2s之内是有效的,而如果预存储的签名值的存在时间已经超过2s,例如存在时间为5s,则判定该预存储的签名值是无效的,因此可将当前的数据提交请求对应的参数数据判定为不是重复的数据,即可将当前的数据提交请求视为新的数据提交请求,并将上述组合签名值更新进数据缓存列表,以完成对已失效的预存储的签名值的替换,以及对该数据提交请求进行处理得到第二响应数据,并向用户返回该第二响应数据。而如果存在时间为1s,则定该预存储的签名值是有效的,则会判定该客户端提交的数据提交请求在此之前已提交过了,即当前的数据提交请求满足重复提交的条件,且该数据提交请求对应的参数数据是重复的数据,则服务器会限制对所述数据提交请求进行响应。本实施例通过对数据缓存列表中的预存储的签名值设定失效时间,只有在该失效时间之内查询到的预存储的签名值才能作为重复提交的判断依据,不仅有效地防止了数据出现重复提交,还解决了防止服务器的拓展性差的问题,有效地提高了对数据的处理效率。As described in steps S610 to S613 above, in addition to judging whether there is a signature value that is the same as the combined signature value in the data cache list, the method for processing the data submission request also needs to further determine the value of the pre-stored signature value. Whether the existence time is greater than the preset first expiration time, if the pre-stored signature value in the data cache list is the same as the aforementioned combined signature value, and the existence time of the pre-stored signature value is less than the preset first expiration time, then It is determined that the data submission request submitted by the client has been submitted before, and then the server will restrict the response to the data submission request. And if the pre-stored signature value in the data cache list is the same as the above-mentioned combined signature value, but the existence time of the pre-stored signature value is greater than the preset first expiration time, it is determined that the parameter data corresponding to the data submission request is not a duplicate That is, the data submission request is not a repeated submission request, so the server will update the combined signature value into the above data cache list, and will process the data submission request, that is, perform the submission action of submitting parameter data and get Corresponding to the second response data, and then return the second response data to the client. Wherein, the first expiration time can be set according to the repeated submission time input by the user, and the repeated submission time is equivalent to the first expiration time. In addition, the pre-stored signature value in the data cache list is set with a first expiration time to indicate that the pre-stored signature value in the data cache list is valid within the first expiration time. For example, the first expiration time can be set If the value is 2s, the pre-stored signature value is valid within 2s, and if the pre-stored signature value has more than 2s, such as 5s, the pre-stored signature value is determined to be invalid Therefore, the parameter data corresponding to the current data submission request can be judged as not duplicate data, and the current data submission request can be regarded as a new data submission request, and the above-mentioned combined signature value can be updated into the data cache list. The replacement of the invalid pre-stored signature value is completed, and the data submission request is processed to obtain the second response data, and the second response data is returned to the user. If the existence time is 1s, the pre-stored signature value is determined to be valid, and it will be determined that the data submission request submitted by the client has been submitted before that, that is, the current data submission request meets the condition of repeated submission. And the parameter data corresponding to the data submission request is repeated data, and the server will restrict the response to the data submission request. This embodiment sets the expiration time for the pre-stored signature value in the data cache list, and only the pre-stored signature value queried within the expiration time can be used as the basis for judging repeated submissions, which not only effectively prevents data from appearing Repeated submission also solves the problem of preventing poor server scalability and effectively improves the efficiency of data processing.
进一步地,本申请一实施例中,上述步骤S6,包括:Further, in an embodiment of the present application, the above step S6 includes:
S620:若所述匹配结果为所述组合签名值与所述预存储的签名值相同,则判断所述预存储的签名值的存在时间是否小于预设的第二失效时间;S620: If the matching result is that the combined signature value is the same as the pre-stored signature value, judge whether the existence time of the pre-stored signature value is less than a preset second expiration time;
S621:若小于预设的第二失效时间,则判断所述数据缓存列表内预存储的提交次数是否小于预设的重复提交次数;S621: If it is less than the preset second expiration time, determine whether the number of submissions pre-stored in the data cache list is less than the preset number of repeated submissions;
S622:若小于预设的重复提交次数,将所述预存储的提交次数的数值替换为所述预存储的提交次数的值+1并更新进所述数据缓存列表中,并对所述数据提交请求进行处理得到对应的第三响应数据;S622: If it is less than the preset number of repeated submissions, replace the value of the pre-stored number of submissions with the value of the pre-stored number of submissions + 1 and update it into the data cache list, and submit the data Request processing to obtain corresponding third response data;
S623:将所述第三响应数据发送至所述客户端;S623: Send the third response data to the client;
S624:若不小于预设的重复提交次数,则限制对所述数据提交请求进行响应。S624: If it is not less than the preset number of repeated submissions, limit the response to the data submission request.
如上述步骤S620至S624所述,上述预设的重复提交次数为在上述失效时间内允许相同的数据提交请求出现的次数,举例地,上述重复提交次数可设为2次,上述第二失效时间设为5s,则相同的数据提交请求在预存储签名值有效的5s时间内允许出现2次,即如果在预存储签名值有效的5s时间内如果出现了两次相同的数据提交请求,则服务器会执行与该两次相同的数据提交请求对应的两次数据响应处理,但如果在预存储签名值有效的5s时间内如果出现了四次相同的数据提交请求,服务器也只会执行前两次接收到的指定数据请求对应的两次数据响应处理,而将后两次接收到指定数据请求视作重复的数据提交请求,并且不会作出响应。在本实施例,上述防重复提交方法除了要对上述预存储的签名值的存在时间是否小于预设的第二失效时间进行判断之外,还要进一步判断数据缓存列表内预存储的提交次数是否小于预设的重复提交次数,如果上述预存储签名值的存在时间小于预设的失效时间,但数据缓存列表内的预存储的提交次数小于预设的重复提交次数,则判定该数据提交请求对应的参数数据不是重复的数据,因此服务器会对该数据提交请求进行处理,即执行提交参数数据的提交动作并得到对应的第三响应数据,再将该第三响应数据返回给客户端,并且将上述预存储的提交次数的数值替换为该预存储的提交次数加1并更新进数据缓存列表中。而如果数据缓存列表内的预存储的提交次数不小于预设的重复提交次数,则判定该客户端提交的数据提交请求在此之前已提交过了,即当前的数据提交请求满足重复提交的条件,且该数据提交请求对应的参数数据是重复的数据,则服务器会限制对所述数据提交请求进行响应。本实施例在对数据缓存列表中的预存储的签名值设定失效时间的基础上,进一步对数据缓存列表中的预存储的提交次数设置重复提交次数,当在该失效时间之内查询到的预存储的签名值后,需要进一步来确定据缓存列表中的预存储的提交次数与预设的重复提交次数的关系来作为重复提交的判断依据,不仅有效地防止了数据出现重复提交,并且有效的解决了服务器的拓展性差的问题,提高了服务器的拓展性已经服务器对数据的处理效率。As described in steps S620 to S624, the preset number of repeated submissions is the number of times the same data submission request is allowed to appear within the expiration time. For example, the number of repeated submissions can be set to 2, and the second expiration time is Set to 5s, the same data submission request is allowed to appear twice within 5s when the pre-stored signature value is valid, that is, if the same data submission request occurs twice within 5s when the pre-stored signature value is valid, the server The two data response processing corresponding to the same two data submission requests will be executed, but if the same data submission request occurs four times within 5s when the pre-stored signature value is valid, the server will only execute the first two times Two data response processing corresponding to the received designated data request, and the next two received designated data requests are regarded as repeated data submission requests, and no response will be made. In this embodiment, in addition to determining whether the existence time of the pre-stored signature value is less than the preset second expiration time, the above anti-duplicate submission method also needs to further determine whether the pre-stored submission times in the data cache list Less than the preset number of repeated submissions. If the existence time of the above-mentioned pre-stored signature value is less than the preset expiration time, but the pre-stored submission number in the data cache list is less than the preset number of repeated submissions, it is determined that the data submission request corresponds to The parameter data of is not repeated data, so the server will process the data submission request, that is, execute the submission action of submitting the parameter data and obtain the corresponding third response data, and then return the third response data to the client, and send The above-mentioned pre-stored number of submissions is replaced with the pre-stored number of submissions plus 1 and updated into the data cache list. If the number of pre-stored submissions in the data cache list is not less than the preset number of repeated submissions, it is determined that the data submission request submitted by the client has been submitted before that, that is, the current data submission request meets the conditions of repeated submission , And the parameter data corresponding to the data submission request is repeated data, the server will restrict the response to the data submission request. In this embodiment, on the basis of setting the expiration time of the pre-stored signature value in the data cache list, the pre-stored submission count in the data cache list is further set the number of repeated submissions. When the query is found within the expiration time After the pre-stored signature value, it is necessary to further determine the relationship between the pre-stored submission times in the cache list and the preset number of repeated submissions as the basis for judging repeated submissions, which not only effectively prevents the repeated submission of data, but also effectively This solves the problem of poor scalability of the server, and improves the scalability of the server and the efficiency of the server for data processing.
进一步地,上述步骤S620之前,包括:Further, before the above step S620, the method includes:
S6200:创建动态修改所述第二失效时间的第一修改接口;S6200: Create a first modification interface that dynamically modifies the second expiration time;
S6201:创建动态修改所述重复提交次数的第二修改接口。S6201: Create a second modification interface that dynamically modifies the number of repeated submissions.
本实施例中,上述第二失效时间以及上述重复提交次数可根据实际情况进行调整,可创建一个动态修改所述第二失效时间的第一修改接口,以便通过该第一修改接口对该第二失效时间对应的数据进行随意调整,以满足业务多变的需求,另外,可创建一个动态修改所述重复提交次数的第二修改接口,以便通过该第一修改接口对该重复提交次数对应的数据进行随意调整,进一步满足业务多变的需求。在本实施例,通过创建可对第二失效时间以及重复提交时间进行数据修改的两个接口,有利于实现自定义配置第二失效时间以及重复提交时间的具体数值,并且能满足业务多样化的需求,提高用户的使用体验。In this embodiment, the second expiration time and the number of repeated submissions can be adjusted according to actual conditions, and a first modification interface that dynamically modifies the second expiration time can be created, so that the second modification interface can be used for the second modification interface. The data corresponding to the expiration time can be adjusted at will to meet the changing needs of the business. In addition, a second modification interface that dynamically modifies the number of repeated submissions can be created, so that the data corresponding to the number of repeated submissions can be modified through the first modification interface Make random adjustments to further meet the changing needs of the business. In this embodiment, by creating two interfaces that can modify the data of the second expiration time and the repeated submission time, it is conducive to customizing the specific values of the second expiration time and the repeated submission time, and can meet the needs of business diversification. Demand to improve user experience.
参照图2,本申请一实施例中还提供了一种数据提交请求的处理装置,包括:Referring to Figure 2, an embodiment of the present application also provides a data submission request processing device, including:
第一接收模块1,用于通过指定接口接收客户端发送的数据提交请求;The first receiving module 1 is configured to receive a data submission request sent by a client through a designated interface;
第一获取模块2,用于获取与所述数据提交请求对应的参数数据;The first obtaining module 2 is configured to obtain parameter data corresponding to the data submission request;
排序模块3,用于对所述参数数据按照首字母的自然顺序进行排序,并依照所述排序的顺序进行组合,得到组合的参数数据;The sorting module 3 is used for sorting the parameter data according to the natural order of the initials, and combining according to the sorting order to obtain combined parameter data;
签名模块4,用于对所述组合的参数数据进行签名处理,生成组合签名值;The signature module 4 is used to perform signature processing on the combined parameter data to generate a combined signature value;
匹配模块5,用于将所述组合签名值与数据缓存列表内预存储的签名值进行匹配,得到对应的匹配结果,其中,所述预存储的签名值为所述数据缓存列表内存储的与历史数据提交请求对应的历史组合签名值,所述匹配结果包括所述组合签名值与所述预存储的签名值相同、或所述组合签名值与所述预存储的签名值不相同;The matching module 5 is configured to match the combined signature value with the pre-stored signature value in the data cache list to obtain a corresponding matching result, wherein the pre-stored signature value is the AND stored in the data cache list The historical combined signature value corresponding to the historical data submission request, where the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value;
处理模块6,用于根据所述匹配结果,按照预设规则对所述数据提交请求进行处理。The processing module 6 is configured to process the data submission request according to the matching result and according to preset rules.
本实施例中,上述数据提交请求的处理装置中的第一接收模块、第一获取模块、排序模块、签名模块、匹配模块与处理模块的功能和作用的实现过程具体详见上述数据提交请求的处理方法中对应步骤S1至S6的实现过程,在此不再赘述。In this embodiment, the realization process of the functions and roles of the first receiving module, the first obtaining module, the sorting module, the signature module, the matching module and the processing module in the processing device for the data submission request is detailed in the above data submission request. The implementation process corresponding to steps S1 to S6 in the processing method will not be repeated here.
进一步地,本申请一实施例中,上述数据提交请求的处理装置,包括:Further, in an embodiment of the present application, the processing device for the aforementioned data submission request includes:
第二获取模块,用于根据开发人员输入的指定接口信息,获取与所述指定接口信息对应的所述指定接口;The second obtaining module is configured to obtain the specified interface corresponding to the specified interface information according to the specified interface information input by the developer;
第二接收模块,用于接收所述开发人员输入的防重复提交代码;The second receiving module is used to receive the anti-duplicate submission code input by the developer;
第一创建模块,用于创建包含所述防重复提交代码的功能模块;The first creation module is used to create a functional module containing the anti-duplicate submission code;
控制模块,用于控制所述指定接口调用所述功能模块。The control module is used to control the designated interface to call the function module.
本实施例中,上述数据提交请求的处理装置中的第二获取模块、第二接收模块与控制模块的功能和作用的实现过程具体详见上述数据提交请求的处理方法中对应步骤S100至S103的实现过程,在此不再赘述。In this embodiment, the implementation process of the functions and roles of the second acquisition module, the second receiving module, and the control module in the device for processing the data submission request is detailed in the corresponding steps S100 to S103 in the processing method of the data submission request. The realization process will not be repeated here.
进一步地,本申请一实施例中,上述第一获取模块,包括:Further, in an embodiment of the present application, the above-mentioned first acquisition module includes:
调用单元,用于调用预设的拦截器对所述数据提交请求进行拦截;The calling unit is used to call a preset interceptor to intercept the data submission request;
第一获取单元,用于拦截成功后,根据所述数据提交请求获取所述客户端的地址信息;The first obtaining unit is configured to obtain the address information of the client according to the data submission request after successful interception;
第二获取单元,用于根据所述地址信息,从所述客户端获取与所述数据提交请求对应的所述参数数据。The second obtaining unit is configured to obtain the parameter data corresponding to the data submission request from the client according to the address information.
本实施例中,上述数据提交请求的处理装置中的调用单元、第一获取单元与第二获取单元的功能和作用的实现过程具体详见上述数据提交请求的处理方法中对应步骤S200至S202的实现过程,在此不再赘述。In this embodiment, the functions and functions of the calling unit, the first acquiring unit and the second acquiring unit in the device for processing the data submission request are detailed in the corresponding steps S200 to S202 in the processing method of the data submission request. The realization process will not be repeated here.
进一步地,本申请一实施例中,上述排序模块,包括:Further, in an embodiment of the present application, the aforementioned sorting module includes:
提取单元,用于提取所述身份标识参数的第一参数名称与所述业务请求参数的第二参数名称;An extraction unit, configured to extract the first parameter name of the identity parameter and the second parameter name of the service request parameter;
排序单元,用于将所述第一参数名称与所述第二参数名称按照首字母的自然顺序进行排序;A sorting unit, configured to sort the first parameter name and the second parameter name in a natural order of initials;
组合单元,用于根据所述排序对所述身份标识参数与所述业务请求参数进行组合,得到所述组合的参数数据。The combination unit is configured to combine the identity parameter and the service request parameter according to the ranking to obtain the combined parameter data.
本实施例中,上述数据提交请求的处理装置中的提取单元、排序单元与组合单元的功能和作用的实现过程具体详见上述数据提交请求的处理方法中对应步骤S300至S302的实现过程,在此不再赘述。In this embodiment, the implementation process of the functions and roles of the extraction unit, the sorting unit, and the combination unit in the above-mentioned data submission request processing device is detailed in the implementation process corresponding to steps S300 to S302 in the above-mentioned data submission request processing method. This will not be repeated here.
进一步地,本申请一实施例中,上述处理模块,包括:Further, in an embodiment of the present application, the above-mentioned processing module includes:
第一处理单元,用于若所述匹配结果为所述组合签名值与所述预存储的签名值不相同,则对所述数据提交请求进行处理得到对应的第一响应结果,并将所述第一响应数据发送至所述客户端;The first processing unit is configured to, if the matching result is that the combined signature value is not the same as the pre-stored signature value, process the data submission request to obtain the corresponding first response result, and combine the Sending the first response data to the client;
第一限制单元,用于若所述匹配结果为所述组合签名值与所述预存储的签名值相同,则限制对所述数据提交请求进行响应。The first restriction unit is configured to restrict a response to the data submission request if the matching result is that the combined signature value is the same as the pre-stored signature value.
本实施例中,上述数据提交请求的处理装置中的第一处理单元与第一限制单元的功能和作用的实现过程具体详见上述数据提交请求的处理方法中对应步骤S600至S601的实现过程,在此不再赘述。In this embodiment, the implementation process of the functions and roles of the first processing unit and the first restriction unit in the device for processing the data submission request is detailed in the implementation process corresponding to steps S600 to S601 in the processing method of the data submission request. I will not repeat them here.
进一步地,本申请一实施例中,上述处理模块,包括:Further, in an embodiment of the present application, the above-mentioned processing module includes:
第一判断单元,用于若所述匹配结果为所述组合签名值与所述预存储的签名值相同,则判断所述预存储的签名值的存在时间是否小于预设的第一失效时间;A first judgment unit, configured to judge whether the existence time of the pre-stored signature value is less than a preset first expiration time if the matching result is that the combined signature value is the same as the pre-stored signature value;
第二处理单元,用于若不小于预设的第一失效时间,将所述组合签名值更新进所述数据缓存列表中,并对所述数据提交请求进行处理得到对应的第二响应数据;The second processing unit is configured to update the combined signature value into the data cache list if it is not less than the preset first expiration time, and process the data submission request to obtain corresponding second response data;
第一发送单元,用于将所述第二响应数据发送至所述客户端;A first sending unit, configured to send the second response data to the client;
第二限制单元,用于若小于预设的第一失效时间,则限制对所述数据提交请求进行响应。The second restriction unit is configured to restrict the response to the data submission request if it is less than the preset first expiration time.
本实施例中,上述数据提交请求的处理装置中的第一判断单元、第二处理单元、第一发送单元与第二限制单元的功能和作用的实现过程具体详见上述数据提交请求的处理方法中对应步骤S610至S613的实现过程,在此不再赘述。In this embodiment, the realization process of the functions and roles of the first judging unit, the second processing unit, the first sending unit, and the second limiting unit in the device for processing the data submission request is detailed in the processing method of the data submission request. The implementation process corresponding to steps S610 to S613 in, will not be repeated here.
进一步地,本申请一实施例中,上述处理模块,包括:Further, in an embodiment of the present application, the above-mentioned processing module includes:
第二判断单元,用于若所述匹配结果为所述组合签名值与所述预存储的签名值相同,则判断所述预存储的签名值的存在时间是否小于预设的第二失效时间;A second determining unit, configured to determine whether the existence time of the pre-stored signature value is less than a preset second expiration time if the matching result is that the combined signature value is the same as the pre-stored signature value;
第三判断单元,用于若小于预设的第二失效时间,则判断所述数据缓存列表内预存储的提交次数是否小于预设的重复提交次数;The third determining unit is configured to determine whether the number of submissions pre-stored in the data cache list is less than the preset number of repeated submissions if it is less than the preset second expiration time;
第三处理单元,用于若小于预设的重复提交次数,将所述预存储的提交次数的数值替换为所述预存储的提交次数的值+1并更新进所述数据缓存列表中,并对所述数据提交请求进行处理得到对应的第三响应数据;The third processing unit is configured to replace the value of the pre-stored number of submissions with the value of the pre-stored number of submissions+1 and update it into the data cache list if it is less than the preset number of repeated submissions, and Processing the data submission request to obtain corresponding third response data;
第二发送单元,用于将所述第三响应数据发送至所述客户端;A second sending unit, configured to send the third response data to the client;
第三限制单元,用于若不小于预设的重复提交次数,则限制对所述数据提交请求进行响应。The third limiting unit is configured to limit the response to the data submission request if it is not less than the preset number of repeated submissions.
本实施例中,上述数据提交请求的处理装置中的第二判断单元、第三判断单元、第三处理单元、第二发送单元与第三限制单元的功能和作用的实现过程具体详见上述数据提交请求的处理方法中对应步骤S620至S624的实现过程,在此不再赘述。In this embodiment, the implementation process of the functions and effects of the second judgment unit, the third judgment unit, the third processing unit, the second sending unit, and the third restriction unit in the processing device for the data submission request is detailed in the above data The implementation process of steps S620 to S624 corresponds to the processing method of the submission request, which will not be repeated here.
进一步地,本申请一实施例中,上述处理模块,包括:Further, in an embodiment of the present application, the above-mentioned processing module includes:
第二创建模块,用于创建动态修改所述第二失效时间的第一修改接口;The second creation module is configured to create a first modification interface for dynamically modifying the second expiration time;
第三创建模块,用于创建动态修改所述重复提交次数的第二修改接口。The third creation module is used to create a second modification interface for dynamically modifying the number of repeated submissions.
本实施例中,上述数据提交请求的处理装置中的第二创建模块与第三创建模块的功能和作用的实现过程具体详见上述数据提交请求的处理方法中对应步骤S6200至S6201的实现过程,在此不再赘述。In this embodiment, the implementation process of the functions and roles of the second creation module and the third creation module in the device for processing the data submission request is detailed in the implementation process corresponding to steps S6200 to S6201 in the processing method of the data submission request. I will not repeat them here.
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括易失性或非易失性存储介质、内存储器。该易失性或非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为易失性或非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储数据提交请求与预存储的签名值等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现上述任一个示例性实施例所示出的数据提交请求的处理方法。本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的装置、计算机设备的限定。3, an embodiment of the present application also provides a computer device. The computer device may be a server, and its internal structure may be as shown in FIG. 3. The computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed for the computer equipment is used to provide computing and control capabilities. The memory of the computer device includes a volatile or nonvolatile storage medium and internal memory. The volatile or non-volatile storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in a volatile or non-volatile storage medium. The database of the computer device is used to store data such as data submission requests and pre-stored signature values. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instruction is executed by the processor, the method for processing a data submission request shown in any of the foregoing exemplary embodiments is implemented. Those skilled in the art can understand that the structure shown in FIG. 3 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 devices and computer equipment to which the solution of the present application is applied.
本申请一实施例还提供一种计算机可读存储介质,该计算机可读存储介质可以是易失性的,也可以是非易失性的,其上存储有计算机可读指令,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行时实现上述数据提交请求的处理方法实施例中的步骤。An embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium may be volatile or non-volatile, and computer-readable instructions are stored thereon. When executed by one or more processors, the steps in the above-mentioned data submission request processing method embodiment are realized when executed by one or more processors.
综上所述,本申请实施例中提供的数据提交请求的处理方法、装置和计算机设备,能够有效地防止了数据出现重复提交的问题,保证了服务器的业务的正常开展,提高了数据提交请求的处理效率,也提高了服务器对数据提交请求处理的准确率。In summary, the data submission request processing method, device, and computer equipment provided in the embodiments of this application can effectively prevent the problem of repeated submission of data, ensure the normal development of server services, and improve data submission requests. The processing efficiency also improves the accuracy of the server's processing of data submission requests.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性或易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM通过多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the method of the foregoing embodiments can be implemented by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile or In a volatile computer-readable storage medium, when the computer-readable instructions are executed, they may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made using the content of this application description and drawings, or directly or indirectly applied to other related The technical field is equally included in the scope of patent protection of this application.

Claims (20)

  1. 一种数据提交请求的处理方法,其特征在于,包括:A method for processing a data submission request, characterized in that it comprises:
    通过指定接口接收客户端发送的数据提交请求;Receive the data submission request sent by the client through the designated interface;
    获取与所述数据提交请求对应的参数数据;Obtaining parameter data corresponding to the data submission request;
    对所述参数数据按照首字母的自然顺序进行排序,并依照所述排序的顺序进行组合,得到组合的参数数据;Sorting the parameter data according to the natural order of the initials, and combining according to the sorting order to obtain combined parameter data;
    对所述组合的参数数据进行签名处理,生成组合签名值;Perform signature processing on the combined parameter data to generate a combined signature value;
    将所述组合签名值与数据缓存列表内预存储的签名值进行匹配,得到对应的匹配结果,其中,所述预存储的签名值为所述数据缓存列表内存储的与历史数据提交请求对应的历史组合签名值,所述匹配结果包括所述组合签名值与所述预存储的签名值相同、或所述组合签名值与所述预存储的签名值不相同;The combined signature value is matched with the pre-stored signature value in the data cache list to obtain the corresponding matching result, wherein the pre-stored signature value is stored in the data cache list and corresponds to the historical data submission request Historical combined signature value, the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value;
    根据所述匹配结果,按照预设规则对所述数据提交请求进行处理。According to the matching result, the data submission request is processed according to preset rules.
  2. 根据权利要求1所述的数据提交请求的处理方法,其特征在于,所述获取与所述数据提交请求对应的参数数据的步骤,包括:The method for processing a data submission request according to claim 1, wherein the step of obtaining parameter data corresponding to the data submission request comprises:
    调用预设的拦截器对所述数据提交请求进行拦截;Calling a preset interceptor to intercept the data submission request;
    拦截成功后,根据所述数据提交请求获取所述客户端的地址信息;After the interception is successful, obtain the address information of the client according to the data submission request;
    根据所述地址信息,从所述客户端获取与所述数据提交请求对应的所述参数数据。According to the address information, the parameter data corresponding to the data submission request is obtained from the client.
  3. 根据权利要求1所述的数据提交请求的处理方法,其特征在于,所述参数数据包括身份标识参数与业务请求参数,所述对所述参数数据按照首字母的自然顺序进行排序,并依照所述排序的顺序进行组合,得到组合的参数数据的步骤,包括:The method for processing a data submission request according to claim 1, wherein the parameter data includes identification parameters and service request parameters, and the parameter data is sorted according to the natural order of the initials, and the The steps of combining according to the sorting order to obtain combined parameter data include:
    提取所述身份标识参数的第一参数名称与所述业务请求参数的第二参数名称;Extracting the first parameter name of the identity parameter and the second parameter name of the service request parameter;
    将所述第一参数名称与所述第二参数名称按照首字母的自然顺序进行排序;Sorting the first parameter name and the second parameter name in a natural order of initials;
    根据所述排序对所述身份标识参数与所述业务请求参数进行组合,得到所述组合的参数数据。Combine the identity parameter and the service request parameter according to the ranking to obtain the combined parameter data.
  4. 根据权利要求1所述的数据提交请求的处理方法,其特征在于,所述根据所述匹配结果,按照预设规则对所述数据提交请求进行处理的步骤,包括:The method for processing a data submission request according to claim 1, wherein the step of processing the data submission request according to a preset rule according to the matching result comprises:
    若所述匹配结果为所述组合签名值与所述预存储的签名值不相同,则对所述数据提交请求进行处理得到对应的第一响应结果,并将所述第一响应数据发送至所述客户端;If the matching result is that the combined signature value is different from the pre-stored signature value, the data submission request is processed to obtain the corresponding first response result, and the first response data is sent to all The client;
    若所述匹配结果为所述组合签名值与所述预存储的签名值相同,则限制对所述数据提交请求进行响应。If the matching result is that the combined signature value is the same as the pre-stored signature value, then responding to the data submission request is restricted.
  5. 根据权利要求1所述的数据提交请求的处理方法,其特征在于,所述根据所述匹配结果,按照预设规则对所述数据提交请求进行处理的步骤,包括:The method for processing a data submission request according to claim 1, wherein the step of processing the data submission request according to a preset rule according to the matching result comprises:
    若所述匹配结果为所述组合签名值与所述预存储的签名值相同,则判断所述预存储的签名值的存在时间是否小于预设的第一失效时间;If the matching result is that the combined signature value is the same as the pre-stored signature value, judging whether the existence time of the pre-stored signature value is less than the preset first expiration time;
    若不小于预设的第一失效时间,将所述组合签名值更新进所述数据缓存列表中,并对所述数据提交请求进行处理得到对应的第二响应数据;If it is not less than the preset first expiration time, update the combined signature value into the data cache list, and process the data submission request to obtain the corresponding second response data;
    将所述第二响应数据发送至所述客户端;Sending the second response data to the client;
    若小于预设的第一失效时间,则限制对所述数据提交请求进行响应。If it is less than the preset first expiration time, the response to the data submission request is restricted.
  6. 根据权利要求1所述的数据提交请求的处理方法,其特征在于,所述根据所述匹配结果,按照预设规则对所述数据提交请求进行处理的步骤,包括:The method for processing a data submission request according to claim 1, wherein the step of processing the data submission request according to a preset rule according to the matching result comprises:
    若所述匹配结果为所述组合签名值与所述预存储的签名值相同,则判断所述预存储的签名值的存在时间是否小于预设的第二失效时间;If the matching result is that the combined signature value is the same as the pre-stored signature value, determining whether the existence time of the pre-stored signature value is less than a preset second expiration time;
    若小于预设的第二失效时间,则判断所述数据缓存列表内预存储的提交次数是否小于预设的重复提交次数;If it is less than the preset second expiration time, determining whether the number of submissions pre-stored in the data cache list is less than the preset number of repeated submissions;
    若小于预设的重复提交次数,将所述预存储的提交次数的数值替换为所述预存储的提交次数的值+1并更新进所述数据缓存列表中,并对所述数据提交请求进行处理得到对应的第三响应数据;If it is less than the preset number of repeated submissions, replace the value of the pre-stored number of submissions with the value of the pre-stored number of submissions + 1 and update it into the data cache list, and perform the data submission request Process to obtain the corresponding third response data;
    将所述第三响应数据发送至所述客户端;Sending the third response data to the client;
    若不小于预设的重复提交次数,则限制对所述数据提交请求进行响应。If it is not less than the preset number of repeated submissions, the response to the data submission request is restricted.
  7. 根据权利要求6所述的数据提交请求的处理方法,其特征在于,所述若所述匹配结果为所述组合签名值与所述预存储的签名值相同,则判断所述预存储的签名值的存在时间是否小于预设的第二失效时间的步骤之前,包括:The method for processing a data submission request according to claim 6, wherein if the matching result is that the combined signature value is the same as the pre-stored signature value, then the pre-stored signature value is determined Before the step of whether the existence time of is less than the preset second expiration time includes:
    创建动态修改所述第二失效时间的第一修改接口;Creating a first modification interface that dynamically modifies the second expiration time;
    创建动态修改所述重复提交次数的第二修改接口。Create a second modification interface that dynamically modifies the number of repeated submissions.
  8. 一种数据提交请求的处理装置,其特征在于,包括:A processing device for a data submission request, characterized in that it comprises:
    第一接收模块,用于通过指定接口接收客户端发送的数据提交请求;The first receiving module is used to receive the data submission request sent by the client through the designated interface;
    第一获取模块,用于获取与所述数据提交请求对应的参数数据;The first obtaining module is configured to obtain parameter data corresponding to the data submission request;
    排序模块,用于对所述参数数据按照首字母的自然顺序进行排序,并依照所述排序的顺序进行组合,得到组合的参数数据;The sorting module is used to sort the parameter data according to the natural order of the initials, and combine according to the sorting order to obtain combined parameter data;
    签名模块,用于对所述组合的参数数据进行签名处理,生成组合签名值;The signature module is used to perform signature processing on the combined parameter data to generate a combined signature value;
    匹配模块,用于将所述组合签名值与数据缓存列表内预存储的签名值进行匹配,得到对应的匹配结果,其中,所述预存储的签名值为所述数据缓存列表内存储的与历史数据提交请求对应的历史组合签名值,所述匹配结果包括所述组合签名值与所述预存储的签名值相同、或所述组合签名值与所述预存储的签名值不相同;The matching module is used to match the combined signature value with the pre-stored signature value in the data cache list to obtain a corresponding matching result, wherein the pre-stored signature value is the historical data stored in the data cache list The historical combined signature value corresponding to the data submission request, the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value;
    处理模块,用于根据所述匹配结果,按照预设规则对所述数据提交请求进行处理。The processing module is configured to process the data submission request according to the matching result and according to preset rules.
  9. 根据权利要求8所述的数据提交请求的处理装置,其特征在于,所述第一获取模块,包括:The device for processing a data submission request according to claim 8, wherein the first obtaining module comprises:
    调用单元,用于调用预设的拦截器对所述数据提交请求进行拦截;The calling unit is used to call a preset interceptor to intercept the data submission request;
    第一获取单元,用于拦截成功后,根据所述数据提交请求获取所述客户端的地址信息;The first obtaining unit is configured to obtain the address information of the client according to the data submission request after successful interception;
    第二获取单元,用于根据所述地址信息,从所述客户端获取与所述数据提交请求对应的所述参数数据。The second obtaining unit is configured to obtain the parameter data corresponding to the data submission request from the client according to the address information.
  10. 根据权利要求8所述的数据提交请求的处理装置,其特征在于,所述排序模块,包括:The device for processing a data submission request according to claim 8, wherein the sorting module comprises:
    提取单元,用于提取所述身份标识参数的第一参数名称与所述业务请求参数的第二参数名称;An extraction unit, configured to extract the first parameter name of the identity parameter and the second parameter name of the service request parameter;
    排序单元,用于将所述第一参数名称与所述第二参数名称按照首字母的自然顺序进行排序;A sorting unit, configured to sort the first parameter name and the second parameter name in a natural order of initials;
    组合单元,用于根据所述排序对所述身份标识参数与所述业务请求参数进行组合,得到所述组合的参数数据。The combination unit is configured to combine the identity parameter and the service request parameter according to the ranking to obtain the combined parameter data.
  11. 根据权利要求8所述的数据提交请求的处理装置,其特征在于,所述处理模块,包括:The device for processing a data submission request according to claim 8, wherein the processing module comprises:
    第一处理单元,用于若所述匹配结果为所述组合签名值与所述预存储的签名值不相同,则对所述数据提交请求进行处理得到对应的第一响应结果,并将所述第一响应数据发送至所述客户端;The first processing unit is configured to, if the matching result is that the combined signature value is not the same as the pre-stored signature value, process the data submission request to obtain the corresponding first response result, and combine the Sending the first response data to the client;
    第一限制单元,用于若所述匹配结果为所述组合签名值与所述预存储的签名值相同,则限制对所述数据提交请求进行响应。The first restriction unit is configured to restrict a response to the data submission request if the matching result is that the combined signature value is the same as the pre-stored signature value.
  12. 根据权利要求8所述的数据提交请求的处理装置,其特征在于,所述处理模块,包括:The device for processing a data submission request according to claim 8, wherein the processing module comprises:
    第一判断单元,用于若所述匹配结果为所述组合签名值与所述预存储的签名值相同,则判断所述预存储的签名值的存在时间是否小于预设的第一失效时间;A first judgment unit, configured to judge whether the existence time of the pre-stored signature value is less than a preset first expiration time if the matching result is that the combined signature value is the same as the pre-stored signature value;
    第二处理单元,用于若不小于预设的第一失效时间,将所述组合签名值更新进所述数据缓存列表中,并对所述数据提交请求进行处理得到对应的第二响应数据;The second processing unit is configured to update the combined signature value into the data cache list if it is not less than the preset first expiration time, and process the data submission request to obtain corresponding second response data;
    第一发送单元,用于将所述第二响应数据发送至所述客户端;A first sending unit, configured to send the second response data to the client;
    第二限制单元,用于若小于预设的第一失效时间,则限制对所述数据提交请求进行响应。The second restriction unit is configured to restrict the response to the data submission request if it is less than the preset first expiration time.
  13. 根据权利要求8所述的数据提交请求的处理装置,其特征在于,所述处理模块,包括:The device for processing a data submission request according to claim 8, wherein the processing module comprises:
    第二判断单元,用于若所述匹配结果为所述组合签名值与所述预存储的签名值相同,则判断所述预存储的签名值的存在时间是否小于预设的第二失效时间;A second determining unit, configured to determine whether the existence time of the pre-stored signature value is less than a preset second expiration time if the matching result is that the combined signature value is the same as the pre-stored signature value;
    第三判断单元,用于若小于预设的第二失效时间,则判断所述数据缓存列表内预存储的提交次数是否小于预设的重复提交次数;The third determining unit is configured to determine whether the number of submissions pre-stored in the data cache list is less than the preset number of repeated submissions if it is less than the preset second expiration time;
    第三处理单元,用于若小于预设的重复提交次数,将所述预存储的提交次数的数值替换为所述预存储的提交次数的值+1并更新进所述数据缓存列表中,并对所述数据提交请求进行处理得到对应的第三响应数据;The third processing unit is configured to replace the value of the pre-stored number of submissions with the value of the pre-stored number of submissions+1 and update it into the data cache list if it is less than the preset number of repeated submissions, and Processing the data submission request to obtain corresponding third response data;
    第二发送单元,用于将所述第三响应数据发送至所述客户端;A second sending unit, configured to send the third response data to the client;
    第三限制单元,用于若不小于预设的重复提交次数,则限制对所述数据提交请求进行响应。The third limiting unit is configured to limit the response to the data submission request if it is not less than the preset number of repeated submissions.
  14. 根据权利要求13所述的数据提交请求的处理装置,其特征在于,所述处理模块,包括:The device for processing a data submission request according to claim 13, wherein the processing module comprises:
    第二创建模块,用于创建动态修改所述第二失效时间的第一修改接口;The second creation module is configured to create a first modification interface for dynamically modifying the second expiration time;
    第三创建模块,用于创建动态修改所述重复提交次数的第二修改接口。The third creation module is used to create a second modification interface for dynamically modifying the number of repeated submissions.
  15. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现数据提交请求的处理方法,该数据提交请求的处理方法,包括:A computer device includes a memory and a processor, the memory stores computer readable instructions, and is characterized in that when the processor executes the computer readable instructions, a method for processing a data submission request is realized, and the data submission request is Treatment methods, including:
    通过指定接口接收客户端发送的数据提交请求;Receive the data submission request sent by the client through the designated interface;
    获取与所述数据提交请求对应的参数数据;Obtaining parameter data corresponding to the data submission request;
    对所述参数数据按照首字母的自然顺序进行排序,并依照所述排序的顺序进行组合,得到组合的参数数据;Sorting the parameter data according to the natural order of the initials, and combining according to the sorting order to obtain combined parameter data;
    对所述组合的参数数据进行签名处理,生成组合签名值;Perform signature processing on the combined parameter data to generate a combined signature value;
    将所述组合签名值与数据缓存列表内预存储的签名值进行匹配,得到对应的匹配结果,其中,所述预存储的签名值为所述数据缓存列表内存储的与历史数据提交请求对应的历史组合签名值,所述匹配结果包括所述组合签名值与所述预存储的签名值相同、或所述组合签名值与所述预存储的签名值不相同;The combined signature value is matched with the pre-stored signature value in the data cache list to obtain the corresponding matching result, wherein the pre-stored signature value is stored in the data cache list and corresponds to the historical data submission request Historical combined signature value, the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value;
    根据所述匹配结果,按照预设规则对所述数据提交请求进行处理。According to the matching result, the data submission request is processed according to preset rules.
  16. 根据权利要求15所述的计算机设备,其特征在于,所述通过指定接口接收客户端发送的数据提交请求的步骤之前,包括:15. The computer device according to claim 15, wherein before the step of receiving a data submission request sent by a client through a designated interface, the method comprises:
    根据开发人员输入的指定接口信息,获取与所述指定接口信息对应的所述指定接口;Obtaining the specified interface corresponding to the specified interface information according to the specified interface information input by the developer;
    接收所述开发人员输入的防重复提交代码;Receiving the anti-duplicate submission code input by the developer;
    创建包含所述防重复提交代码的功能模块;Create a functional module containing the anti-duplicate submission code;
    控制所述指定接口调用所述功能模块。Controlling the designated interface to call the function module.
  17. 根据权利要求15所述的计算机设备,其特征在于,所述获取与所述数据提交请求对应的参数数据的步骤,包括:The computer device according to claim 15, wherein the step of obtaining parameter data corresponding to the data submission request comprises:
    调用预设的拦截器对所述数据提交请求进行拦截;Calling a preset interceptor to intercept the data submission request;
    拦截成功后,根据所述数据提交请求获取所述客户端的地址信息;After the interception is successful, obtain the address information of the client according to the data submission request;
    根据所述地址信息,从所述客户端获取与所述数据提交请求对应的所述参数数据。According to the address information, the parameter data corresponding to the data submission request is obtained from the client.
  18. 一种计算机可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现数据提交请求的处理方法,该数据提交请求的处理方法,包括:A computer-readable storage medium having computer-readable instructions stored thereon, which is characterized in that, when the computer-readable instructions are executed by a processor, a method for processing a data submission request is realized, and the method for processing a data submission request includes:
    通过指定接口接收客户端发送的数据提交请求;Receive the data submission request sent by the client through the designated interface;
    获取与所述数据提交请求对应的参数数据;Obtaining parameter data corresponding to the data submission request;
    对所述参数数据按照首字母的自然顺序进行排序,并依照所述排序的顺序进行组合,得到组合的参数数据;Sorting the parameter data according to the natural order of the initials, and combining according to the sorting order to obtain combined parameter data;
    对所述组合的参数数据进行签名处理,生成组合签名值;Perform signature processing on the combined parameter data to generate a combined signature value;
    将所述组合签名值与数据缓存列表内预存储的签名值进行匹配,得到对应的匹配结果,其中,所述预存储的签名值为所述数据缓存列表内存储的与历史数据提交请求对应的历史组合签名值,所述匹配结果包括所述组合签名值与所述预存储的签名值相同、或所述组合签名值与所述预存储的签名值不相同;The combined signature value is matched with the pre-stored signature value in the data cache list to obtain the corresponding matching result, wherein the pre-stored signature value is stored in the data cache list and corresponds to the historical data submission request Historical combined signature value, the matching result includes that the combined signature value is the same as the pre-stored signature value, or the combined signature value is different from the pre-stored signature value;
    根据所述匹配结果,按照预设规则对所述数据提交请求进行处理。According to the matching result, the data submission request is processed according to preset rules.
  19. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述通过指定接口接收客户端发送的数据提交请求的步骤之前,包括:The computer-readable storage medium according to claim 18, wherein before the step of receiving a data submission request sent by a client through a designated interface, the method comprises:
    根据开发人员输入的指定接口信息,获取与所述指定接口信息对应的所述指定接口;Obtaining the specified interface corresponding to the specified interface information according to the specified interface information input by the developer;
    接收所述开发人员输入的防重复提交代码;Receiving the anti-duplicate submission code input by the developer;
    创建包含所述防重复提交代码的功能模块;Create a functional module containing the anti-duplicate submission code;
    控制所述指定接口调用所述功能模块。Controlling the designated interface to call the function module.
  20. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述获取与所述数据提交请求对应的参数数据的步骤,包括:The computer-readable storage medium according to claim 18, wherein the step of obtaining parameter data corresponding to the data submission request comprises:
    调用预设的拦截器对所述数据提交请求进行拦截;Calling a preset interceptor to intercept the data submission request;
    拦截成功后,根据所述数据提交请求获取所述客户端的地址信息;After the interception is successful, obtain the address information of the client according to the data submission request;
    根据所述地址信息,从所述客户端获取与所述数据提交请求对应的所述参数数据。According to the address information, the parameter data corresponding to the data submission request is obtained from the client.
PCT/CN2019/119219 2019-05-13 2019-11-18 Data submission request processing method, apparatus and computer device WO2020228292A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910395310.0A CN110221925A (en) 2019-05-13 2019-05-13 Processing method, device and the computer equipment of data submission request
CN201910395310.0 2019-05-13

Publications (1)

Publication Number Publication Date
WO2020228292A1 true WO2020228292A1 (en) 2020-11-19

Family

ID=67820928

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119219 WO2020228292A1 (en) 2019-05-13 2019-11-18 Data submission request processing method, apparatus and computer device

Country Status (2)

Country Link
CN (1) CN110221925A (en)
WO (1) WO2020228292A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110221925A (en) * 2019-05-13 2019-09-10 平安科技(深圳)有限公司 Processing method, device and the computer equipment of data submission request
CN110661863B (en) * 2019-09-20 2022-11-25 政采云有限公司 Request processing method and device, electronic equipment and storage medium
CN110839085A (en) * 2019-11-20 2020-02-25 珠海格力电器股份有限公司 Instruction management method, instruction management device, electronic equipment and storage medium
CN111371852B (en) * 2020-02-24 2022-01-25 腾讯科技(深圳)有限公司 Data processing method and related device
CN111756749B (en) * 2020-06-24 2022-11-04 建信金融科技有限责任公司 Secure access method, device, equipment and storage medium
CN116132534B (en) * 2022-07-01 2024-03-08 马上消费金融股份有限公司 Method, device, equipment and storage medium for storing service request

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150127791A1 (en) * 2007-08-16 2015-05-07 Hand Held Products, Inc. Data collection system having eir terminal interface node
CN107562555A (en) * 2017-08-02 2018-01-09 网宿科技股份有限公司 The cleaning method and server of duplicate data
CN108573741A (en) * 2017-12-25 2018-09-25 北京金山云网络技术有限公司 Business datum recording method, device, equipment and storage medium
CN109240838A (en) * 2018-09-20 2019-01-18 深圳市牛鼎丰科技有限公司 Interface call method, device, computer equipment and storage medium
CN110221925A (en) * 2019-05-13 2019-09-10 平安科技(深圳)有限公司 Processing method, device and the computer equipment of data submission request

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108462580B (en) * 2017-02-22 2020-07-07 腾讯科技(深圳)有限公司 Numerical value transferring method and device
CN109005038A (en) * 2018-08-03 2018-12-14 北京达佳互联信息技术有限公司 Endorsement method, device, electronic equipment and storage medium
CN109634756B (en) * 2018-11-26 2024-03-08 平安科技(深圳)有限公司 Page event processing method, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150127791A1 (en) * 2007-08-16 2015-05-07 Hand Held Products, Inc. Data collection system having eir terminal interface node
CN107562555A (en) * 2017-08-02 2018-01-09 网宿科技股份有限公司 The cleaning method and server of duplicate data
CN108573741A (en) * 2017-12-25 2018-09-25 北京金山云网络技术有限公司 Business datum recording method, device, equipment and storage medium
CN109240838A (en) * 2018-09-20 2019-01-18 深圳市牛鼎丰科技有限公司 Interface call method, device, computer equipment and storage medium
CN110221925A (en) * 2019-05-13 2019-09-10 平安科技(深圳)有限公司 Processing method, device and the computer equipment of data submission request

Also Published As

Publication number Publication date
CN110221925A (en) 2019-09-10

Similar Documents

Publication Publication Date Title
WO2020228292A1 (en) Data submission request processing method, apparatus and computer device
US11468048B2 (en) Asset management method and apparatus, and electronic device
US11270306B2 (en) Asset management method and apparatus, and electronic device
US11290281B2 (en) Asset management method and apparatus, and electronic device
AU2019222743B2 (en) Asset management method and apparatus, and electronic device
US20200133944A1 (en) Asset management method and apparatus, and electronic device
US10511593B2 (en) Cross cloud application access
US10778603B2 (en) Systems and methods for controlling access to broker resources
US10469479B2 (en) Cross cloud tenant discovery
WO2019237594A1 (en) Session persistence method and apparatus, and computer device and storage medium
WO2021013033A1 (en) File operation method, apparatus, device, and system, and computer readable storage medium
WO2019080423A1 (en) Resource value transfer method and apparatus, storage medium, and server
CN112099979B (en) Access control method, device, computer equipment and storage medium
WO2021031905A1 (en) Data management method, apparatus, device and system and computer-readable storage medium
WO2020173126A1 (en) Method and device for blockchain-based session data processing, equipment, and medium
WO2023241366A1 (en) Data processing method and system, and electronic device and computer-readable storage medium
CN111835523B (en) Data request method, system and computing device
CN107948130B (en) File processing method, server and system
US20230046579A1 (en) Information security system and method for secure data transmission among user profiles using a blockchain network
CN114285607B (en) Networking authentication method and system in cloud environment, computer equipment and storage medium
US11930014B2 (en) Information security using multi-factor authorization
WO2023160278A1 (en) Request processing method and apparatus, and storage medium
CN116743391A (en) Tamper-proof method and device for request parameters, computer equipment and storage medium
CN115842818A (en) Big data transmission method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19928727

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19928727

Country of ref document: EP

Kind code of ref document: A1