Request sending method, request processing method and related devices thereof

By generating random data to be verified and verifying its summary value according to the activity type, the server-side pressure problem caused by multiple users' concurrent requests in clothing shopping activities is solved, and the reliability and system stability of requests are improved.

CN118944914APending Publication Date: 2024-11-12CHINA CONSTRUCTION BANK +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410933943.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The existing request sending and request processing methods have reliability problems in clothing shopping activities, especially when multiple users have concurrent requests, which may lead to excessive pressure and crash on the server.

Method used

By generating data to be checked with random data, determining its summary value, and obtaining matching activity verification rules based on the type of target activity, verifying the summary value, and sending the request to the server until it passes the verification. The encryption mechanism is adopted to ensure data security, and the request sending and processing time is distributed to reduce server pressure.

Benefits of technology

It improves the reliability of request sending and processing, reduces the possibility of server crashes, ensures the efficiency and accuracy of request processing, and enhances the stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118944914A_ABST
    Figure CN118944914A_ABST
Patent Text Reader

Abstract

The invention relates to a request sending method, a request processing method and related devices in the technical field of data processing. The request sending method comprises the following steps: in response to a triggering operation for a target activity, generating to-be-verified data matched with the target activity, the to-be-verified data comprising random data; determining an abstract value of the to-be-verified data; identifying the activity type of the target activity, and obtaining an activity verification rule matched with the activity type; verifying the abstract value through an activity verification rule to obtain a verification result; and when the verification result represents that the verification fails, returning to the step of generating the to-be-verified data matched with the target activity until the abstract value passes the verification, and sending an activity execution request carrying the latest to-be-verified data to the server. By adopting the method, the request sending reliability can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a request sending method, a request processing method and related devices, computer equipment, computer-readable storage media and computer program products. Background Art

[0002] Request sending refers to sending a request from one device to another device. Request processing refers to the device processing the received request. Take the sending of purchase requests during a clothing rush event as an example. At the beginning of the rush, multiple users rush to buy clothes on the client page. At the same time, in response to the purchase operation of the rush, the client can generate a purchase request and send the purchase requests of multiple users to the server.

[0003] In traditional technology, a common method of sending purchase requests of multiple users to a server and having the server process the purchase requests of multiple users includes: verifying the purchase requests of multiple users to ensure the authenticity of the purchase requests, and sending the purchase requests that have successfully been verified to the server, and then having the server process the purchase requests that have successfully been verified.

[0004] However, the current methods of sending and processing requests are not reliable enough. Summary of the invention

[0005] Based on this, it is necessary to provide a reliable request sending method, request processing method and related devices, computer equipment, computer readable storage medium and computer program product to address the above technical problems.

[0006] In a first aspect, the present application provides a request sending method, comprising:

[0007] In response to a trigger operation for a target activity, generating data to be verified that matches the target activity, the data to be verified comprising random data;

[0008] Determine the summary value of the data to be verified;

[0009] Identify the activity type of the target activity, and obtain activity verification rules that match the activity type;

[0010] Verify the summary value through the activity verification rule to obtain the verification result;

[0011] When the verification result indicates that the verification has failed, the process returns to the step of generating data to be verified that matches the target activity until the summary value passes the verification, and then sends an activity execution request carrying the latest data to be verified to the server.

[0012] In one embodiment, generating data to be verified that matches a target activity includes:

[0013] Obtain a random string, an activity ID of a target activity, and a local device ID;

[0014] Concatenate the random string, activity ID, and local device ID to obtain the data to be verified for the target activity.

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

[0016] The verification time of the record summary value;

[0017] When the verification result indicates that the verification is successful and the verification time is lower than the preset verification time threshold, an activity execution request carrying the latest data to be verified is sent to the server.

[0018] In one embodiment, the summary value is verified by the activity verification rule to obtain the verification result, including:

[0019] Verifying, by means of the active verification rule, whether the summary value contains a preset number of target characters corresponding to the active verification rule;

[0020] When the digest value contains a preset number of target characters corresponding to the active verification rule, it is determined that the digest value passes the verification.

[0021] In one embodiment, checking whether the summary value contains a preset number of target characters corresponding to the activity verification rule by using the activity verification rule includes:

[0022] Verify whether the summary value contains a preset number of consecutive characters through the activity verification rule;

[0023] or,

[0024] Use the active validation rule to check whether the digest value contains a preset number of identical characters.

[0025] In one embodiment, when the verification result indicates that the verification is successful, sending an activity execution request carrying the latest data to be verified to the server includes:

[0026] When the verification result indicates that the verification is successful, encrypting the verification data;

[0027] Send an activity execution request with the encrypted data to be verified to the server.

[0028] In one embodiment, the data to be verified includes an activity identifier, a local device identifier, and a random character string;

[0029] Encrypt the data to be verified, including:

[0030] At least one of the activity identifier, the local device identifier, and the random character string is encrypted.

[0031] In a second aspect, the present application further provides a request sending device, the device comprising:

[0032] A response module, used to respond to a trigger operation for a target activity and generate data to be verified that matches the target activity, wherein the data to be verified includes random data;

[0033] A determination module, used to determine the summary value of the data to be verified;

[0034] A rule acquisition module, used to identify the activity type of the target activity and acquire activity verification rules that match the activity type;

[0035] A verification module is used to verify the summary value through the active verification rules to obtain the verification result;

[0036] The sending module is used to return to the step of generating data to be verified that matches the target activity when the verification result indicates that the verification has failed, until the summary value passes the verification, and then send an activity execution request carrying the latest data to be verified to the server.

[0037] In one embodiment, the response module is further used to obtain a random string, an activity identifier of a target activity, and a local device identifier; and concatenate the random string, the activity identifier, and the local device identifier to obtain the data to be verified of the target activity.

[0038] In one of the embodiments, the request sending device also includes a time judgment module, which is used to record the verification time of the summary value; when the verification result indicates that the verification is successful and the verification time is lower than the preset verification time threshold, an activity execution request carrying the latest data to be verified is sent to the server.

[0039] In one of the embodiments, the verification module is further used to verify whether the summary value contains a preset number of target characters corresponding to the activity verification rule through the activity verification rule; if the summary value contains the preset number of target characters corresponding to the activity verification rule, it is determined that the summary value passes the verification.

[0040] In one of the embodiments, the verification module is further used to verify whether the summary value contains a preset number of consecutive characters through an active verification rule; or, to verify whether the summary value contains a preset number of identical characters through an active verification rule.

[0041] In one of the embodiments, the sending module is further used for encrypting the data to be verified when the verification result indicates that the verification is successful; and sending an activity execution request carrying the encrypted data to be verified to the server.

[0042] In one of the embodiments, the data to be verified includes an activity identifier, a local device identifier, and a random string; the sending module is further used to encrypt at least one of the activity identifier, the local device identifier, and the random string.

[0043] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0044] In response to a trigger operation for a target activity, generating data to be verified that matches the target activity, the data to be verified comprising random data;

[0045] Determine the summary value of the data to be verified;

[0046] Identify the activity type of the target activity, and obtain activity verification rules that match the activity type;

[0047] Verify the summary value through the activity verification rule to obtain the verification result;

[0048] When the verification result indicates that the verification has failed, the process returns to the step of generating data to be verified that matches the target activity until the summary value passes the verification, and then sends an activity execution request carrying the latest data to be verified to the server.

[0049] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0050] In response to a trigger operation for a target activity, generating data to be verified that matches the target activity, the data to be verified comprising random data;

[0051] Determine the summary value of the data to be verified;

[0052] Identify the activity type of the target activity, and obtain activity verification rules that match the activity type;

[0053] Verify the summary value through the activity verification rule to obtain the verification result;

[0054] When the verification result indicates that the verification has failed, the process returns to the step of generating data to be verified that matches the target activity until the summary value passes the verification, and then sends an activity execution request carrying the latest data to be verified to the server.

[0055] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0056] In response to a trigger operation for a target activity, generating data to be verified that matches the target activity, the data to be verified comprising random data;

[0057] Determine the summary value of the data to be verified;

[0058] Identify the activity type of the target activity, and obtain activity verification rules that match the activity type;

[0059] Verify the summary value through the activity verification rule to obtain the verification result;

[0060] When the verification result indicates that the verification has failed, the process returns to the step of generating data to be verified that matches the target activity until the summary value passes the verification, and then sends an activity execution request carrying the latest data to be verified to the server.

[0061] The request sending method, apparatus, computer device, computer-readable storage medium and computer program product described above respond to a trigger operation for a target activity, generate data to be verified that matches the target activity, and the data to be verified includes random data; determine a summary value of the data to be verified; identify the activity type of the target activity, and obtain an activity verification rule that matches the activity type; verify the summary value using the activity verification rule to obtain a verification result; and when the verification result indicates that the verification has failed, return to the step of generating data to be verified that matches the target activity, until the summary value passes the verification, and send an activity execution request carrying the latest data to be verified to the server. During the whole process, since the summary value is obtained from the data to be verified, and the data to be verified is random, the summary value is also random. After the summary value verification fails using the activity verification rule that matches the activity type of the target activity, a new data to be verified will be generated for a new round of verification. It can be seen that due to different activity verification rules, different activity verification rules have different results for verifying the summary value, and the time to pass the verification is also different, and thus the time to generate and send the activity execution request for the target activity is also different, which can alleviate the pressure on the server when receiving a large number of concurrent requests and reduce the occurrence of server crashes. Therefore, the request sending method has a certain degree of reliability.

[0062] In a sixth aspect, the present application also provides a request processing method, the method comprising:

[0063] Receiving activity execution requests for a target activity sent by multiple clients, and recording a time when the activity execution requests are received, the activity execution requests being sent by the client based on the request sending method;

[0064] For each activity execution request, according to the receiving time of the activity execution request, verify the data to be verified in the activity execution request to obtain a verification result;

[0065] When the verification result indicates that the verification is successful, the activity execution request is processed.

[0066] In one embodiment, the data to be verified includes an activity identifier; the data to be verified in the activity execution request is verified to obtain a verification result, including:

[0067] Extracting the data to be verified in the activity execution request and determining the summary value of the data to be verified, wherein the data to be verified includes the activity identifier;

[0068] Get the activity verification rule that matches the activity identifier;

[0069] The summary value is verified through the activity verification rule to obtain the verification result.

[0070] In one embodiment, extracting the data to be verified in the activity execution request includes:

[0071] Extract the activity ID, the client device ID, and the random string in the activity execution request;

[0072] The activity ID, the client device ID, and the random string are concatenated to obtain the data to be verified for the activity execution request.

[0073] In one embodiment, extracting the data to be verified in the activity execution request includes:

[0074] Extract the data to be verified in the activity execution request;

[0075] In the case where the data to be verified is encrypted data, the data to be verified is decrypted and the data to be verified is updated.

[0076] In one of the embodiments, the data to be verified includes at least one of an encryption activity identifier, an encryption device identifier of the client, and an encrypted random string;

[0077] Decrypt the data to be verified, including:

[0078] Decrypt at least one of the encrypted activity identifier, the encrypted device identifier of the client, and the encrypted random character string in the data to be verified.

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

[0080] Verify whether the client's device ID is consistent with the pre-stored login device ID;

[0081] When the device identification of the client is inconsistent with the pre-stored login device identification, a verification failure message is sent to the client.

[0082] In a seventh aspect, the present application further provides a request processing device, the device comprising:

[0083] A receiving module, used for receiving activity execution requests for target activities sent by multiple clients, and recording the receiving time of the activity execution requests, wherein the activity execution requests are sent by the clients based on the request sending method;

[0084] A result acquisition module is used to verify the data to be verified in each activity execution request according to the receiving time of the activity execution request to obtain the verification result;

[0085] The processing module is used to process the activity execution request when the verification result indicates that the verification is successful.

[0086] In one of the embodiments, the data to be verified includes an activity identifier; the result acquisition module is also used to extract the data to be verified in the activity execution request, determine the summary value of the data to be verified; obtain the activity verification rule that matches the activity identifier; and verify the summary value through the activity verification rule to obtain the verification result.

[0087] In one embodiment, the result acquisition module is also used to extract the activity identifier, the client device identifier, and the random string in the activity execution request; concatenate the activity identifier, the client device identifier, and the random string to obtain the data to be verified of the activity execution request.

[0088] In one of the embodiments, the result acquisition module is further used to extract the data to be verified in the activity execution request; when the data to be verified is encrypted data, the data to be verified is decrypted and the data to be verified is updated.

[0089] In one of the embodiments, the data to be verified includes an encrypted activity identifier, an encrypted device identifier of the client, and at least one of an encrypted random string; decrypting the data to be verified includes: decrypting at least one of the encrypted activity identifier, the encrypted device identifier of the client, and the encrypted random string in the data to be verified.

[0090] In one of the embodiments, the request processing device also includes a prompt module, which is used to verify whether the device identifier of the client is consistent with the pre-stored login device identifier; if the device identifier of the client is inconsistent with the pre-stored login device identifier, a verification failure message is sent to the client.

[0091] In an eighth aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0092] Receiving activity execution requests for a target activity sent by multiple clients, and recording a time when the activity execution requests are received, the activity execution requests being sent by the client based on the request sending method;

[0093] For each activity execution request, according to the receiving time of the activity execution request, verify the data to be verified in the activity execution request to obtain a verification result;

[0094] When the verification result indicates that the verification is successful, the activity execution request is processed.

[0095] In a ninth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0096] Receiving activity execution requests for a target activity sent by multiple clients, and recording a time when the activity execution requests are received, the activity execution requests being sent by the client based on the request sending method;

[0097] For each activity execution request, according to the receiving time of the activity execution request, verify the data to be verified in the activity execution request to obtain a verification result;

[0098] When the verification result indicates that the verification is successful, the activity execution request is processed.

[0099] In a tenth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0100] Receiving activity execution requests for a target activity sent by multiple clients, and recording a time when the activity execution requests are received, the activity execution requests being sent by the client based on the request sending method;

[0101] For each activity execution request, according to the receiving time of the activity execution request, verify the data to be verified in the activity execution request to obtain a verification result;

[0102] When the verification result indicates that the verification is successful, the activity execution request is processed.

[0103] The above-mentioned request processing method, apparatus, computer equipment, computer-readable storage medium and computer program product receive activity execution requests for target activities sent by multiple clients, record the receiving time of the activity execution requests, and the activity execution requests are sent by the client based on the above-mentioned request sending method; for each activity execution request, according to the receiving time of the activity execution request, verify the data to be verified in the activity execution request to obtain the verification result; when the verification result indicates that the verification is successful, process the activity execution request. By receiving activity execution requests for target activities from multiple clients at different receiving times, the pressure of receiving requests is dispersed, thereby improving the reliability of request reception during request processing. Furthermore, the trigger operation of the target activity is executed only after the verification of the activity execution request of each client is successful according to the receiving time of the activity execution request, which can reduce the execution trigger operation caused by invalid requests and further improve the reliability of request processing. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0105] FIG1 is an application environment diagram of a request sending method and a request processing method in one embodiment;

[0106] Figure 2 A schematic diagram of a process of sending a request in one embodiment;

[0107] Figure 3 A schematic diagram of a request processing method in one embodiment;

[0108] Figure 4 It is a structural block diagram of a request sending device in one embodiment;

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

[0110] Figure 6 is an internal structure diagram of a computer device in one embodiment;

[0111] FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

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

[0113] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the acquisition, storage, processing, transmission, etc. of the data are in compliance with relevant laws and regulations.

[0114] The request sending and request processing method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the client 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers.

[0115] The target activity page is displayed on the client 102 held by the user. The target activities displayed on the clients 102 held by different users may be the same or different. For example, the target activity may be an on-time rush purchase activity, a class on-time sign-in activity, etc. It should be explained that even if it is a rush purchase activity for the same item, but the discount strength for the rush purchase of the same item on different clients is different, this application also regards this scenario as a different target activity.

[0116] Taking the target activity as an example, the user triggers the target activity rush purchase operation on the interface displaying the target activity, and the client 102 responds to the trigger operation for the target activity, generates data to be verified that matches the target activity, and the data to be verified includes random data; determines the summary value of the data to be verified; identifies the activity type of the target activity, and obtains the activity verification rule that matches the activity type; verifies the summary value through the activity verification rule to obtain the verification result; when the verification result indicates that the verification has failed, returns to the step of generating the data to be verified that matches the target activity, until the summary value passes the verification, and sends the activity execution request carrying the latest data to be verified to the server 104. Since the summary value is obtained from the data to be verified, and the data to be verified is random, the summary value is also random. When the summary value verification fails using the activity verification rule that matches the activity type of the target activity, a new data to be verified will be generated for a new round of verification. It can be seen that due to different activity verification rules, different activity verification rules have different results for verifying the summary value, and the time to pass the verification is also different, and thus the time to generate and send the activity execution request for the target activity is also different, which can alleviate the pressure on the server when receiving a large number of concurrent requests and reduce the occurrence of server crashes. Therefore, the request sending method has a certain degree of reliability.

[0117] Therefore, the server 104 can sequentially receive the activity execution requests for the target activity sent by multiple clients, record the receiving time of the activity execution request, verify the data to be verified in the activity execution request according to the receiving time of the activity execution request for each activity execution request, and obtain the verification result, and process the activity execution request when the verification result indicates that the verification is successful. Furthermore, the server 104 can also push the execution result of each client's activity execution request to the corresponding client 102.

[0118] The client 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0119] In an exemplary embodiment, Figure 2As shown, a request sending method is provided, and the method is applied to the client 102 in FIG. 1 as an example for explanation. Wherein:

[0120] S100, in response to a trigger operation for a target activity, generating data to be verified that matches the target activity.

[0121] Among them, there is more than one target activity, and the target activities triggered by each user may or may not be different. For example, the target activity can be an on-time rush purchase activity, a class sign-in activity, etc. In the case where the target activity is an on-time rush purchase activity, the target activities are different depending on the items purchased, or the target activities are different depending on the coupons used during the rush purchase. Trigger operations include but are not limited to click, double-click, long press and other operations. Each target activity corresponds to a data to be verified, and the data to be verified contains random data. The random data is random and is randomly generated.

[0122] Specifically, the page of the target activity is displayed on the client held by the user, and the user triggers a snap-up operation, a sign-in operation, etc. on the interface displaying the target activity. The client should generate the to-be-verified data carrying random data for the target activity in response to the triggering operation of the target activity. In practical applications, the to-be-verified data can be represented in the form of a string.

[0123] S200, determining a summary value of the data to be verified.

[0124] The digest is a fixed-length data string generated by algorithmically processing a message or data.

[0125] Specifically, determining the summary value of the data to be verified is to convert the data to be verified into a string of data characters of fixed length. Further, determining the summary value of the data to be verified includes: using a hash algorithm to perform hash processing on the data to be verified to obtain the summary value of the data to be verified.

[0126] It should be explained that hashing refers to transforming an input of any length into an output of a fixed length through a hash algorithm, and the output is the hash value. This conversion is a compression mapping, that is, the space of hash values ​​is usually much smaller than the space of inputs, and different inputs may hash to the same output, so it is impossible to determine the unique input value from the hash value. Simply put, hashing is a function that compresses a message of any length into a message digest of a fixed length.

[0127] Furthermore, the hash algorithm adopted can be MD5 (Message-Digest Algorithm 5, Message Digest Algorithm Version 5) algorithm, SHA (Secure Hash Algorithm)-1 algorithm, SHA-256 algorithm, etc. Take the SHA-256 algorithm as an example. SHA-256: SHA-256 is a cryptographic hash algorithm developed as part of the SHA2 family. It generates a 256-bit (32-byte) hash value, which represents the summary of any data input. Among them, some key features of the SHA-256 algorithm include: generating a unique fixed-size 256-bit hash for inputs of different lengths; the probability of collision between two different inputs of the same hash is very small; any change in the input will result in a completely different hash. The irreversible hashing process cannot restore the original data; the calculation is fast. This makes SHA-256 very ideal for verifying data integrity and authenticity. Therefore, in practical applications, the SHA-256 algorithm is used as a commonly used hash algorithm.

[0128] S300, identifying the activity type of the target activity, and acquiring an activity verification rule that matches the activity type.

[0129] The activity type includes the type of the target activity, which can be customized and is not clearly defined. For example, if the target activity is a rush purchase of items on time, the activity type can be the discount strength of the activity or the type of items purchased in the activity; for another example, if the target activity is to clock in on time for class, the activity type can be a clock-in course.

[0130] Specifically, the activity type of the target activity is identified, and each activity type corresponds to an activity verification rule. Different activity verification rules have different corresponding rule complexities. Taking the preferential strength of the on-time rush purchase activity as an example, the greater the preferential strength, the more complex the corresponding activity verification rule; the lower the preferential strength, the simpler the corresponding activity verification rule; taking the activity type as the type of items for the activity rush purchase as an example, activity verification rules of different complexities can be preset for different object types. For example, more complex activity verification rules can be set for high-value objects, and less complex activity verification rules can be set for low-value objects.

[0131] S400, verifying the summary value through the activity verification rule to obtain a verification result.

[0132] Specifically, the summary value is verified through the activity verification rule. The summary value is the summary value of the data to be verified. Since the data to be verified contains randomly generated random data, the summary value also has randomness. In other words, when the summary value is verified through the activity verification rule, the summary value with randomness is not necessarily the summary value that can meet the activity verification rule. In other words, if the activity verification rule is complex, it is difficult for the summary value of the data to be verified with randomness to match the activity verification rule when it is generated for the first few times; while the activity verification rule is simple, the summary value of the data to be verified with randomness is more likely to match the activity verification rule when it is obtained for the first few times.

[0133] By verifying the digest value, a verification result can be obtained. The verification result can indicate whether the verification is successful or failed. The verification result can be displayed on the result display interface of the client.

[0134] S500, when the verification result indicates that the verification has failed, return to the step of generating data to be verified that matches the target activity, until the summary value passes the verification, and send an activity execution request carrying the latest data to be verified to the server.

[0135] Specifically, when the verification result indicates that the verification has failed, that is, when the summary value does not meet the activity verification rules, the step of generating the data to be verified that matches the target activity is returned, that is, the random data in the data to be verified is regenerated, and new data to be verified is obtained based on the newly randomly generated random data, so as to re-execute the summary verification step of the new data to be verified. Each summary verification requires a certain verification time. Therefore, if the data to be verified is regenerated multiple times, it means that multiple verification processes are executed, and the corresponding verification time is longer.

[0136] When the verification result indicates that the verification is successful, that is, when the summary value passes the verification of the activity verification rule, an activity execution request carrying the latest data to be verified can be generated immediately. Since the activity verification rules of different activity types are different, the verification time required for the summary value of the data to be verified carrying random data to meet the activity verification rules is also different. For example, some summary values ​​of the data to be verified carrying random data only need one verification to meet the activity verification rules, while some summary values ​​of the data to be verified carrying random data need to undergo fifty random data generation before they can meet the activity verification rules.

[0137] Therefore, when there is more than one client, if each client has a different activity type for the target activity, the time for verifying the summary value of the data to be verified is also different, and the time for generating the activity execution request carrying the latest data to be verified is also different. The earlier the summary value of the data to be verified is successfully verified, the earlier the activity execution request carrying the latest data to be verified is generated, and the earlier the activity execution request is sent to the server; the later the summary value of the data to be verified is successfully verified, the later the activity execution request carrying the latest data to be verified is generated, and the later the activity execution request is sent to the server. Therefore, the pressure on the server to receive requests can be dispersed, reducing the occurrence of server crashes.

[0138] In the above request sending method, in response to the trigger operation for the target activity, data to be verified that matches the target activity is generated, and the data to be verified includes random data; the summary value of the data to be verified is determined; the activity type of the target activity is identified, and the activity verification rule that matches the activity type is obtained; the summary value is verified by the activity verification rule to obtain the verification result; when the verification result indicates that the verification fails, the step of generating data to be verified that matches the target activity is returned until the summary value passes the verification, and the activity execution request carrying the latest data to be verified is sent to the server. In the whole process, since the summary value is obtained from the data to be verified, the data to be verified has randomness, so the summary value also has randomness; after the summary value verification fails using the activity verification rule that matches the activity type of the target activity, new data to be verified will be generated for a new round of verification. It can be seen that due to different activity verification rules, different activity verification rules have different results for passing the verification of the summary value, and thus the time for generating and sending the activity execution request of the target activity is also different, which can relieve the pressure on the server when receiving a large number of concurrent requests and reduce the occurrence of server crashes. Therefore, the request sending method has a certain reliability.

[0139] In an exemplary embodiment, generating data to be verified that matches a target activity includes:

[0140] Obtain a random string, an activity identifier of a target activity, and a local device identifier; concatenate the random string, the activity identifier, and the local device identifier to obtain the data to be verified of the target activity.

[0141] The random string is a randomly generated string, which consists of multiple characters and may include letters, numbers and other characters. The activity identifier is a unique identifier for the target activity. Taking the target activity as a rush purchase activity for different items as an example, the activity identifier may be the item identifier; taking the target activity as a rush purchase activity for the same item as an example, the activity identifier may be the coupon identifier for the item. The local device identifier refers to the identifier of the client that triggers the target activity, such as the device number, IMEI (International Mobile Equipment Identity), MAC (Media Access Control Address, local area network address), etc.

[0142] Specifically, the client responds to the user's trigger operation on the target activity, obtains the activity identifier of the target activity, and its own unique device identifier. The client can also randomly obtain 0-9, az, AZ content to randomly generate a random string of preset length. The random string is the random data contained in the data to be verified.

[0143] The client concatenates the activity identifier of the target activity, its own unique device identifier, and a randomly generated random string. The concatenation order is not limited. It can be concatenated in the order of activity identifier, device identifier, random string, or in the order of random string, activity identifier, device identifier. After concatenating the activity identifier of the target activity, its own unique device identifier, and the randomly generated string, the data to be verified of the target activity is obtained.

[0144] In the above embodiment, by concatenating the random character string, the activity identifier, and the local device identifier, the obtained data to be verified can contain random data and have randomness, so that the data to be verified can be verified later.

[0145] In an exemplary embodiment, the method further comprises:

[0146] The verification time of the summary value is recorded; when the verification result indicates that the verification is successful and the verification time is lower than the preset verification time threshold, an activity execution request carrying the latest data to be verified is sent to the server.

[0147] Specifically, the verification duration refers to the total duration of verifying the digest value, which includes the total time spent from the first round of verification to the current round of verification.

[0148] If the verification result indicates that the verification is successful, it is determined whether the verification time spent on the verification is less than the preset verification time threshold. If the verification time spent on the verification is less than the preset verification time threshold, it means that the user's tolerance limit has not been exceeded. At this time, an activity execution request carrying the latest data to be verified can be sent to the server. In actual applications, the preset verification time threshold is generally 8s or 10s.

[0149] If the verification time is equal to or higher than the preset verification time threshold, it means that the user's tolerance limit has been exceeded and the activity execution request carrying the latest data to be verified cannot be sent to the server.

[0150] In some embodiments, if the verification time is equal to or higher than the preset verification time threshold, the verification needs to be stopped regardless of whether the verification is successful or not. The final verification result indicates that the verification has failed. At this time, a message "Too many participants, please try again" can be pushed to the user.

[0151] In the above embodiment, by judging whether the verification time is lower than the preset verification time threshold, it can be judged whether the verification time exceeds the user's tolerance time. If the verification time is lower than the preset verification time threshold, it means that the verification time does not exceed the user's tolerance time. At this time, an activity execution request carrying the latest data to be verified can be directly sent to the server. When the verification time is equal to or higher than the preset verification time threshold, there is no need to generate an activity execution request carrying the latest data to be verified, thereby improving the reliability of request generation.

[0152] In an exemplary embodiment, the summary value is verified by the activity verification rule to obtain a verification result, including:

[0153] The summary value is verified through the activity verification rule to see whether it contains a preset number of target characters corresponding to the activity verification rule; if the summary value contains the preset number of target characters corresponding to the activity verification rule, it is determined that the summary value passes the verification.

[0154] The preset number of target characters in each activity verification rule is different. The target characters are predefined characters, including predefined letters or numbers.

[0155] Specifically, the complexity of the activity verification rule is set by presetting the number of target characters. The more the preset number, the higher the complexity of the activity verification rule, and the more difficult it is for the preset number of target characters to exist in the summary value of the data to be verified carrying random data; the fewer the preset number, the lower the complexity of the activity verification rule, and the more likely it is for the preset number of target characters to exist in the summary value of the data to be verified carrying random data.

[0156] For example, if the preset number is 1 and there is 1 target character, then the corresponding target character is likely to exist in the summary value of the data to be verified that carries random data. For another example, if the preset number is 6 and there are 6 target characters, then the corresponding target character is unlikely to exist in the summary value of the data to be verified that carries random data.

[0157] Through the active verification rules, check whether the summary value contains the preset number of target characters corresponding to the active verification rules. If the summary value contains the preset number of target characters corresponding to the active verification rules, the summary value is determined to have passed the verification; if the summary value does not contain the preset number of target characters corresponding to the active verification rules, the summary value is determined to have failed the verification. If the summary value fails the verification, the verification result indicates that the verification has failed, and it is necessary to randomly generate random data in the data to be verified and re-execute the summary value verification process of the data to be verified.

[0158] In one embodiment, the positions of the preset number of target characters may be fixed or variable, that is, the positions of the preset number of target characters may be any position in the digest value or a position within a fixed position range in the digest value.

[0159] In the case where the positions of a preset number of target characters include positions within a fixed position range in the summary value, if the data to be verified includes a random character string, the fixed position range often refers to the position in the summary value corresponding to the random character string. For example, if the concatenation order of the data to be verified is: activity identifier + local device identifier + random character string, and the random character string is 6 bits in length, then the activity verification rule is that there are a preset number of target characters in the last 6 bits of the summary value.

[0160] In the above embodiment, on the one hand, the complexity of the activity verification rule is set by a preset number of target characters, so that different activity verification rules have different verification times when verifying the summary value, so as to disperse the time for the client to send requests and alleviate the pressure on the server to receive requests; on the other hand, the summary value is determined to have passed the verification only when the activity verification rule is passed and the verification summary value contains the preset number of target characters corresponding to the activity verification rule, thereby achieving the accuracy of the summary value verification.

[0161] In an exemplary embodiment, checking whether the summary value contains a preset number of target characters corresponding to the activity verification rule by using the activity verification rule includes:

[0162] Verify whether the summary value contains a preset number of consecutive characters through the active verification rule; or verify whether the summary value contains a preset number of identical characters through the active verification rule.

[0163] The consecutive characters refer to a plurality of different types of characters, and each character is consecutive, for example, the consecutive characters can be 123456, ABCDEF, abcdef, etc. The identical characters refer to a unique character, such as 000000.

[0164] Specifically, through the activity verification rule, it is verified whether the summary value contains a preset number of consecutive characters or the same characters. For example, if the preset number is 2 digits, it can be verified whether the summary value contains two consecutive characters or the same characters, or it can be verified whether the last digits of the summary value contain two consecutive characters or the same characters. The consecutive characters and the same characters can be preset, for example, the consecutive characters are set to 12 and the same characters are set to 11.

[0165] In some embodiments, not only is the summary value checked by the activity verification rule to see whether it contains a preset number of consecutive characters or identical characters, but the target characters in the activity verification rule can also be configured as various characters, for example, as "13579". The verification is determined to be successful simply by checking whether the summary value contains a preset number of target characters by the activity verification rule.

[0166] In the above embodiment, the activity verification rule is used to verify whether the digest value contains a preset number of identical characters or consecutive characters, thereby accurately determining whether the digest value is successfully verified, thereby improving the efficiency of the digest value verification.

[0167] In an exemplary embodiment, when the verification result indicates that the verification is successful, sending an activity execution request carrying the latest data to be verified to the server includes:

[0168] When the verification result indicates that the verification is successful, the data to be verified is encrypted; and an activity execution request carrying the encrypted data to be verified is sent to the server.

[0169] Specifically, when the verification result indicates that the verification is successful, an activity execution request for the target activity carrying the encrypted data to be verified can be generated. In order to ensure the security of the data to be verified in the activity execution request and reduce the leakage of the data to be verified, the data to be verified can be encrypted before the activity execution request carrying the data to be verified is generated to obtain the encrypted data to be verified, so as to generate the activity execution request for the target activity carrying the encrypted data to be verified.

[0170] Furthermore, encryption of the data to be verified is achieved through an encryption key, for example, the data to be verified is encrypted through an RSA (Rivest-Shamir-Adleman, asymmetric encryption) public key to obtain encrypted data to be verified.

[0171] In the above embodiment, by encrypting the data to be verified, the security of the data to be verified in the activity execution request can be guaranteed, the leakage of the data to be verified can be reduced, and the reliability of the request sending process can be improved.

[0172] In an exemplary embodiment, the data to be verified includes an activity identifier, a local device identifier, and a random character string;

[0173] Encrypt the data to be verified, including:

[0174] At least one of the activity identifier, the local device identifier, and the random character string is encrypted.

[0175] Specifically, since the data to be verified includes the activity identifier, the local device identifier, and the random string, encrypting the data to be verified refers to encrypting at least one of the activity identifier, the local device identifier, and the random string.

[0176] That is to say, the client can encrypt one of the activity identifier, the local device identifier, and the random string; it can also encrypt two of the activity identifier, the local device identifier, and the random string; it can also encrypt all of the activity identifier, the local device identifier, and the random string.

[0177] Taking the encryption of a random string by a client as an example, the client obtains the encrypted random string and concatenates the activity identifier, the local device identifier, and the encrypted random string to obtain encrypted data to be verified.

[0178] In the above embodiment, by encrypting at least one of the activity identifier, the local device identifier, and the random character string, the security of the encrypted data can be guaranteed, data leakage can be reduced, and the reliability of the request sending process can be improved.

[0179] In an exemplary embodiment, Figure 3 As shown, a request processing method is provided, and the method is applied to the server 104 in FIG. 1 as an example for explanation. Among them:

[0180] S600: receiving activity execution requests for a target activity sent by multiple clients, and recording the time when the activity execution requests are received.

[0181] The activity execution request is sent by the client based on the request sending method.

[0182] Specifically, the server receives activity execution requests for a target activity sent by multiple clients. When the server receives activity execution requests for a target activity sent by multiple clients, it records the reception time of each activity execution request. The reception time of each activity execution request may be the same or different. The reception time of the activity execution request is related to the sending time of the activity execution request, and the sending time of the activity execution request is related to the activity type of the target activity. For example, taking the activity execution request for a rush purchase activity for clothing as an example, the sending time of the activity execution request is related to the preferential strength of each client for the rush purchase activity, or is related to the types of different clothing purchased.

[0183] S700 , for each activity execution request, verify the data to be verified in the activity execution request according to the receiving time of the activity execution request to obtain a verification result.

[0184] Specifically, for each activity execution request, the data to be verified in the activity execution request is verified according to the receiving time of the activity execution request, which means that according to the receiving time of the activity execution request, the activity execution request received first is verified first, and the activity execution request received later is verified later.

[0185] The difference between the verification process in the client and the verification process in the client may require multiple verifications, but the server only needs to verify once and use the result of this verification as the verification result. The verification result indicates whether the verification is successful or failed.

[0186] In one embodiment, after receiving each activity execution request, the server immediately verifies the data to be verified in the activity execution request to obtain a verification result.

[0187] S800: When the verification result indicates that the verification is successful, process the activity execution request.

[0188] Specifically, when the verification result indicates that the verification is successful, the activity execution data corresponding to the activity execution request is obtained and the activity execution data is processed. Furthermore, the processing result of the activity execution data can also be sent to the corresponding client.

[0189] When the verification result indicates that the verification has failed, an illegal request message is pushed to the client.

[0190] In the above request processing method, activity execution requests for target activities sent by multiple clients are received, and the receiving time of the activity execution requests is recorded. The activity execution requests are sent by the client based on the above request sending method; for each activity execution request, the data to be verified in the activity execution request is verified according to the receiving time of the activity execution request to obtain a verification result; when the verification result indicates that the verification is successful, the activity execution request is processed. By receiving activity execution requests for target activities from multiple clients at different receiving times, the pressure of receiving requests is dispersed, thereby improving the reliability of request reception during request processing. Furthermore, the trigger operation of the target activity is executed only after the verification of the activity execution request of each client is successful according to the receiving time of the activity execution request, which can reduce the execution trigger operation caused by invalid requests and further improve the reliability of request processing.

[0191] In an exemplary embodiment, verifying the data to be verified in the activity execution request to obtain a verification result includes:

[0192] Extract the data to be verified in the activity execution request, and determine the summary value of the data to be verified; obtain the activity verification rule that matches the activity identifier; verify the summary value through the activity verification rule to obtain the verification result.

[0193] The data to be verified includes an activity identifier.

[0194] Specifically, the server extracts the data to be verified in the activity execution request, and then verifies the data to be verified to obtain the verification result. The means by which the server verifies the data to be verified are similar to those by the client, that is, the server verifies the data to be verified, which is actually also the summary value of the data to be verified. Specifically, the server uses a hash digest algorithm to perform hash processing on the data to be verified and determine the summary value of the data to be verified.

[0195] The server can use the activity verification rules that are consistent with the client's corresponding activity execution request to verify the summary value and obtain the verification result. This verification is essentially to ensure that the data to be verified is consistent with the data to be verified on the client, that is, there is no data tampering in the process of sending from the client to the server. Furthermore, the server obtains the activity verification rules that match the activity identifier in the data to be verified, and then uses the activity verification rules to perform verification.

[0196] In the above embodiment, by verifying the summary value through the activity verification rule matching the activity identifier, it is possible to determine whether data tampering occurs during the process of sending from the client to the server, thereby improving the reliability of request processing.

[0197] In an exemplary embodiment, extracting the data to be verified in the activity execution request includes:

[0198] Extract the activity identifier, the device identifier of the client, and the random string in the activity execution request; concatenate the activity identifier, the device identifier of the client, and the random string to obtain the data to be verified of the activity execution request.

[0199] Specifically, the client generates an activity execution request carrying the activity identifier, the local device identifier, and the random string based on the activity identifier, the local device identifier, and the random string. After receiving the activity execution request, the server extracts the activity identifier, the local device identifier, and the random string in the activity execution request, and obtains the data to be verified of the activity execution request based on the activity identifier, the client device identifier, and the random string.

[0200] Based on the activity identifier, the device identifier of the client, and the random string, the data to be verified of the activity execution request is obtained, including: splicing the activity identifier, the device identifier, and the random string to obtain the data to be verified of the activity execution request. It should be noted that the specific order of splicing is not fixed, for example, it can be spliced ​​in the order of the activity identifier, the device identifier of the client, and the random string, or it can be spliced ​​in the order of the random string, the activity identifier, and the device identifier of the client.

[0201] In the above embodiment, by extracting the activity identifier, the client device identifier, and the random character string in the activity execution request, the data to be verified can be concatenated and then a complete summary verification can be performed on it, thereby improving the reliability of request processing.

[0202] In an exemplary embodiment, extracting the data to be verified in the activity execution request includes:

[0203] Extract the data to be verified in the activity execution request; if the data to be verified is encrypted data, decrypt the data to be verified and update the data to be verified.

[0204] Specifically, in order to ensure that the data to be verified is not leaked during the request sending process, the data to be verified carried in the activity execution request can be encrypted before the activity execution request is sent. In other words, the data to be verified in the activity execution request may be encrypted data to be verified. After receiving the activity execution request, the server extracts the data to be verified in the activity execution request. At this time, the data to be verified cannot be directly processed. Therefore, it is necessary to decrypt the data to be verified and update the data to be verified.

[0205] Furthermore, the data to be verified is decrypted by a decryption private key that matches the encryption public key used by the client for encryption. Specifically, the server generates a pair of encryption public keys and decryption private keys, and sends the encryption public keys to multiple clients, so that each client can encrypt the data to be verified by using the encryption public key; and after the server obtains the data to be verified encrypted by the client using the encryption public key, it decrypts the data to be verified encrypted by the client using the encryption public key by using the decryption private key.

[0206] In the above embodiment, when the data to be verified is encrypted data, the data to be verified is decrypted to obtain the data to be verified. The combination of the encryption public key and the decryption private key can ensure the security of the data to be verified.

[0207] In an exemplary embodiment, decrypting the data to be verified includes:

[0208] Decrypt at least one of the encrypted activity identifier, the encrypted device identifier of the client, and the encrypted random character string in the data to be verified.

[0209] The data to be verified includes at least one of an encryption activity identifier, an encryption device identifier of a client, and an encrypted random character string.

[0210] Specifically, the data to be verified includes an encryption activity identifier, an encryption device identifier of the client, and any two of an encrypted random string; the data to be verified includes an encryption activity identifier, an encryption device identifier of the client, and any two of an encrypted random string; the data to be verified includes an encryption activity identifier, an encryption device identifier of the client, and an encrypted random string.

[0211] Decrypting the data to be verified means decrypting the encrypted data in the data to be verified, and there is no need to decrypt the unencrypted data. For example, the data to be verified includes an activity identifier, a device identifier of the client, and an encrypted random string. Decrypting the data to be verified includes: decrypting the encrypted random string to obtain a random string, and concatenating the random string, the activity identifier, and the device identifier of the client to obtain the data to be verified.

[0212] In the above embodiment, the data to be verified is obtained by decrypting at least one of the encrypted activity identifier, the encrypted device identifier, and the encrypted random character string in the data to be verified, so as to facilitate subsequent verification of the data to be verified.

[0213] In an exemplary embodiment, the request processing method further includes:

[0214] Verify whether the client's device identification is consistent with the pre-stored login device identification; if the client's device identification is inconsistent with the pre-stored login device identification, send a verification failure message to the client.

[0215] The login device identifier refers to the identifier of the login device used by the user when logging in to the client.

[0216] Specifically, the client needs to log in before triggering the target activity. When the client logs in, a login request carrying a login device identifier is generated, and the client sends the login request to the server. The server extracts the login device identifier in the login request and pre-stores the login device identifier in the database.

[0217] After the client sends an activity execution request to the server, the server obtains the client's device identifier in the activity execution request, and matches the device identifier with the pre-stored login device identifier in the database to verify whether the client's device identifier is consistent with the pre-stored login device identifier. If the client's device identifier is inconsistent with the pre-stored login device identifier, it means that the corresponding activity execution request is not an activity execution request issued by the logged-in user and is invalid. At this time, a verification failure message is sent to the client.

[0218] If the device identifier of the client is consistent with the pre-stored login device identifier, it means that the corresponding activity execution request is an activity execution request issued by the logged-in user and is valid. At this time, subsequent operations can be continued.

[0219] In the above embodiment, by verifying whether the device identifier of the client is consistent with the pre-stored login device identifier, it is possible to determine whether the corresponding activity execution request is an activity execution request issued by the logged-in user, that is, to determine whether the corresponding activity execution request is valid, and if the device identifier of the client is inconsistent with the pre-stored login device identifier, a verification failure message is sent to the client to prompt the user that the verification has failed.

[0220] In a specific application example, at 20:00 every day, a limited rush sale will be launched for product A. Therefore, at 20:00 every night, a large number of users will try to purchase a limited number of products through their respective clients, causing the server to face huge concurrent access pressure.

[0221] To solve this technical problem, this application disperses the time for the client to send requests to the server, that is, disperses the pressure on the server to receive requests, and can also reuse the client's computing power, reduce the number of server calculations, and save server resources. The specific process is as follows:

[0222] For any client participating in the rush purchase of product A:

[0223] S1. The client obtains the coupon identifier A used for the rush purchase through an API (Application Programming Interface). At this time, the target activity of the client is to use the coupon corresponding to the coupon identifier to rush purchase the product A.

[0224] S2. The client obtains its own unique device identifier B, such as device number, IMEI, MAC address.

[0225] S3. The client randomly obtains a 6-digit random string C containing 0-9, az, AZ.

[0226] S4. The client concatenates the coupon identifier A, its own device identifier B, and the random string C to obtain a concatenated string D.

[0227] S5. Calculate the digest value E of string D using the SHA-256 hash algorithm.

[0228] S6. Determine whether the summary value E satisfies the activity verification rule of the activity consensus algorithm. If not, repeat the process of steps S3-S6. Among them, the activity consensus algorithm refers to obtaining the activity type of the target activity. At this time, the activity type of the target activity is the discount strength of the coupon corresponding to the coupon identifier. If the discount strength is large, a complex activity verification rule is set for the target activity. For example, the activity verification rule can be used to verify whether the last 6 digits in the summary value are 6 zeros; if the discount strength is small, a simple activity verification rule is set for the target activity. For example, the activity verification rule can be used to verify whether the last 6 digits in the summary value are 2 zeros; if the discount strength is average, a simple activity verification rule is set for the target activity. For example, the activity verification rule can be used to verify whether the last 6 digits in the summary value are 4 zeros.

[0229] S7. If the conditions are met, the loop is terminated. If the verification result is not obtained within the preset verification time, such as 10 seconds, the loop is also terminated, and the user is prompted to try again because there are too many participants.

[0230] S8. Encrypt the random string C using the RSA public key to obtain a random encrypted string F.

[0231] S9. Generate an activity execution request carrying the coupon identifier A, the client's own device identifier B, and a random encrypted string F, and send the activity execution request to the API interface of the server.

[0232] Since the verification time of different clients is inconsistent, the activity execution request can be sent to the server only after the verification is successful. Therefore, the pressure of receiving requests on the server can be dispersed.

[0233] For the server:

[0234] S10. The server receives activity execution requests sent by different clients, and extracts the coupon identifier A, the client's own device identifier B, and the random encrypted string F from the activity execution request.

[0235] S11. The server verifies whether the device ID of the client itself is consistent with the pre-stored login device ID.

[0236] S11. If they are consistent, the random encrypted string F is decrypted by the RSA private key to obtain the original random string C, and the coupon identifier A, the client's own device identifier B, and the random string C are concatenated to obtain a concatenated string G.

[0237] S12. The server calculates the digest value of the concatenated string G.

[0238] S13. The server uses the same consensus algorithm as the client to determine whether the summary value satisfies the activity verification rules that match the coupon identifier. If so, the subsequent rush purchase operation continues; if not, the client is prompted with an illegal transaction.

[0239] Based on the above analysis, this application also provides a specific pseudo code to describe the above process:

[0240] Define the SeckillProduct class

[0241] Attributes include: product ID, name, inventory quantity, price, and activity validation rules;

[0242] Defining User Class

[0243] User attributes include user ID, name, and login device ID;

[0244] When a user requests to participate in a rush sale,

[0245] Get the coupon ID of the rush sale;

[0246] Get the client's own device ID;

[0247] Get the current time;

[0248] while(true){

[0249] Get the current time 2

[0250] Get a random string of preset length;

[0251] Concatenate the coupon ID, the client's own device ID, and a random string;

[0252] SHA-256 hash (concatenated coupon ID + client's own device ID + random string)

[0253] if hash value = active verification rule || time difference > 10s

[0254] break

[0255] }

[0256] If the calculation fails to determine whether the activity validation rules are met

[0257] There are too many active user parameters, please try again.

[0258] else

[0259] Encrypt the random string through RSA to obtain a random encrypted string;

[0260] Generate an activity execution request that carries a random encrypted string, a coupon ID, and the client's own device ID, and submit the activity execution request to the server for processing;

[0261] The server processes the activity execution request;

[0262] Get the parameters of the activity execution request;

[0263] if verifies that the client's own device ID is consistent with the login device ID;

[0264] Terminate, and prompt the user that the device identification is inconsistent;

[0265] else

[0266] Decrypt the random encrypted string through RSA to get a random string;

[0267] SHA-256 hash (concatenated coupon ID + client's own device ID + random string);

[0268] if hash value = active validation rule

[0269] Continue to execute the rush purchase operation;

[0270] else

[0271] Prompt illegal request and terminate execution.

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

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

[0274] In an exemplary embodiment, Figure 4 As shown, a request sending device is provided, comprising: a response module 100, a determination module 200, a rule acquisition module 300, a verification module 400 and a sending module 500, wherein:

[0275] A response module 100 is used to respond to a trigger operation for a target activity and generate data to be verified that matches the target activity, where the data to be verified includes random data;

[0276] A determination module 200, used to determine the summary value of the data to be verified;

[0277] A rule acquisition module 300, for identifying the activity type of the target activity and acquiring an activity verification rule matching the activity type;

[0278] The verification module 400 is used to verify the summary value through the activity verification rule to obtain the verification result;

[0279] The sending module 500 is used to return to the step of generating data to be verified that matches the target activity when the verification result indicates that the verification has failed, until the summary value passes the verification, and then send an activity execution request carrying the latest data to be verified to the server.

[0280] In one embodiment, the response module 100 is further used to obtain a random string, an activity identifier of a target activity, and a local device identifier; and concatenate the random string, the activity identifier, and the local device identifier to obtain the data to be verified of the target activity.

[0281] In one of the embodiments, the request sending device also includes a time judgment module, which is used to record the verification time of the summary value; when the verification result indicates that the verification is successful and the verification time is lower than the preset verification time threshold, an activity execution request carrying the latest data to be verified is sent to the server.

[0282] In one of the embodiments, the verification module 400 is further used to verify whether the summary value contains a preset number of target characters corresponding to the activity verification rule through the activity verification rule; if the summary value contains the preset number of target characters corresponding to the activity verification rule, it is determined that the summary value passes the verification.

[0283] In one embodiment, the verification module 400 is further configured to verify whether the summary value contains a preset number of consecutive characters through an active verification rule; or, to verify whether the summary value contains a preset number of identical characters through an active verification rule.

[0284] In one of the embodiments, the sending module 500 is further used to encrypt the data to be verified when the verification result indicates that the verification is successful; and send an activity execution request carrying the encrypted data to be verified to the server.

[0285] In one embodiment, the data to be verified includes an activity identifier, a local device identifier, and a random string; the sending module 500 is further used to encrypt at least one of the activity identifier, the local device identifier, and the random string.

[0286] In an exemplary embodiment, Figure 5 As shown, a request processing device is provided, including: a receiving module 600, a result acquisition module 700 and a processing module 800, wherein:

[0287] The receiving module 600 is used to receive activity execution requests for target activities sent by multiple clients and record the receiving time of the activity execution requests, where the activity execution requests are sent by the clients based on the request sending method;

[0288] The result acquisition module 700 is used to verify the data to be verified in each activity execution request according to the receiving time of the activity execution request to obtain the verification result;

[0289] The processing module 800 is used to process the activity execution request when the verification result indicates that the verification is successful.

[0290] In one of the embodiments, the data to be verified includes an activity identifier; the result acquisition module 700 is also used to extract the data to be verified in the activity execution request, determine the summary value of the data to be verified; obtain the activity verification rule that matches the activity identifier; and verify the summary value through the activity verification rule to obtain the verification result.

[0291] In one embodiment, the result acquisition module 700 is also used to extract the activity identifier, the client device identifier, and the random string in the activity execution request; concatenate the activity identifier, the client device identifier, and the random string to obtain the data to be verified of the activity execution request.

[0292] In one embodiment, the result acquisition module 700 is further used to extract the data to be verified in the activity execution request; when the data to be verified is encrypted data, the data to be verified is decrypted and the data to be verified is updated.

[0293] In one of the embodiments, the data to be verified includes an encrypted activity identifier, an encrypted device identifier of the client, and at least one of an encrypted random string; the result acquisition module 700 is also used to decrypt at least one of the encrypted activity identifier, the encrypted device identifier of the client, and the encrypted random string in the data to be verified.

[0294] In one of the embodiments, the request processing device also includes a prompt module, which is used to verify whether the device identifier of the client is consistent with the pre-stored login device identifier; if the device identifier of the client is inconsistent with the pre-stored login device identifier, a verification failure message is sent to the client.

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

[0296] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a request sending method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0297] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data to be verified, etc. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a request processing method is implemented.

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

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

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

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

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

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

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

Claims

1. A request sending method, characterized in that: The method comprises: In response to a trigger operation for a target activity, generating data to be verified that matches the target activity, wherein the data to be verified includes random data; Determine a summary value of the data to be verified; Identify the activity type of the target activity, and obtain activity verification rules that match the activity type; Verify the summary value according to the activity verification rule to obtain a verification result; In the case where the verification result indicates a verification failure, the step of generating data to be verified that matches the target activity is returned to until the summary value passes the verification, and an activity execution request carrying the latest data to be verified is sent to the server.

2. The method according to claim 1, characterized in that The generating the data to be verified that matches the target activity includes: Obtaining a random character string, an activity identifier of the target activity, and a local device identifier; The random character string, the activity identifier, and the local device identifier are concatenated to obtain the data to be verified of the target activity.

3. The method according to claim 1, characterized in that The method further comprises: Record the verification time of the summary value; When the verification result indicates that the verification is successful and the verification duration is lower than a preset verification duration threshold, an activity execution request carrying the latest data to be verified is sent to the server.

4. The method according to claim 1, characterized in that: The process of verifying the summary value by the activity verification rule to obtain a verification result includes: Verifying, by means of the activity verification rule, whether the summary value contains a preset number of target characters corresponding to the activity verification rule; In a case where the digest value includes a preset number of target characters corresponding to the activity verification rule, it is determined that the digest value passes the verification.

5. The method according to claim 4, characterized in that The checking, by using the activity verification rule, whether the summary value contains a preset number of target characters corresponding to the activity verification rule comprises: Verifying, by means of the activity verification rule, whether the summary value contains a preset number of consecutive characters; or, Through the activity verification rule, it is verified whether the summary value contains a preset number of identical characters.

6. The method according to any one of claims 1 to 5, characterized in that: When the verification result indicates that the verification is successful, sending an activity execution request carrying the latest data to be verified to the server includes: When the verification result indicates that the verification is successful, encrypting the data to be verified; Send an activity execution request with the encrypted data to be verified to the server.

7. The method according to claim 6, characterized in that The data to be verified includes the activity identifier, the local device identifier, and the random character string; The encrypting the data to be verified includes: Encrypt at least one of the activity identifier, the local device identifier, and the random character string.

8. A request processing method, characterized in that: The method comprises: Receiving activity execution requests for a target activity sent by multiple clients, and recording a receiving time of the activity execution requests, wherein the activity execution requests are sent by the clients based on the request sending method according to any one of claims 1 to 7; For each of the activity execution requests, verify the data to be verified in the activity execution request according to the receiving time of the activity execution request to obtain a verification result; When the verification result indicates that the verification is successful, the activity execution request is processed.

9. The method according to claim 8, characterized in that The data to be verified includes an activity identifier; and verifying the data to be verified in the activity execution request to obtain a verification result includes: Extracting the data to be verified in the activity execution request, and determining a summary value of the data to be verified; Obtaining an activity verification rule that matches the activity identifier; The summary value is verified using the activity verification rule to obtain a verification result.

10. The method according to claim 9, characterized in that The extracting the data to be verified in the activity execution request includes: Extracting the activity identifier, the device identifier of the client, and a random character string from the activity execution request; The activity identifier, the device identifier of the client, and the random character string are concatenated to obtain the data to be verified of the activity execution request.

11. The method according to claim 9, characterized in that The extracting the data to be verified in the activity execution request includes: Extracting the data to be verified in the activity execution request; In the case that the data to be verified is encrypted data, the data to be verified is decrypted and updated.

12. The method according to claim 11, characterized in that The data to be verified includes at least one of an encryption activity identifier, an encryption device identifier of the client, and an encrypted random character string; The decrypting the data to be verified includes: Decrypt at least one of the encryption activity identifier, the encryption device identifier of the client, and the encrypted random character string in the data to be verified.

13. The method according to any one of claims 8 to 12, characterized in that The method further comprises: Verify whether the device identification of the client is consistent with the pre-stored login device identification; When the device identification of the client is inconsistent with the pre-stored login device identification, a verification failure message is sent to the client.

14. A request sending device, characterized in that: The device comprises: A response module, used for responding to a trigger operation for a target activity and generating data to be verified that matches the target activity, wherein the data to be verified includes random data; A determination module, used to determine the summary value of the data to be verified; A rule acquisition module, used to identify the activity type of the target activity and acquire an activity verification rule matching the activity type; A verification module, used to verify the summary value according to the activity verification rule to obtain a verification result; The sending module is used to return to the step of generating the data to be verified that matches the target activity when the verification result indicates a verification failure, until the summary value passes the verification, and send an activity execution request carrying the latest data to be verified to the server.

15. The device according to claim 14, characterized in that The response module is also used to obtain a random string, an activity identifier of the target activity, and a local device identifier; and concatenate the random string, the activity identifier, and the local device identifier to obtain the data to be verified for the target activity.

16. The device according to claim 14, characterized in that The request sending device also includes a time judgment module, which is used to record the verification time of the summary value; when the verification result indicates that the verification is successful and the verification time is lower than a preset verification time threshold, an activity execution request carrying the latest data to be verified is sent to the server.

17. The device according to claim 14, characterized in that The verification module is used to verify whether the summary value contains a preset number of target characters corresponding to the activity verification rule through the activity verification rule; if the summary value contains the preset number of target characters corresponding to the activity verification rule, it is determined that the summary value passes the verification.

18. The device according to claim 17, characterized in that The verification module is further configured to verify, through the activity verification rule, whether the summary value contains a preset number of consecutive characters; or, through the activity verification rule, verify whether the summary value contains a preset number of identical characters.

19. The device according to any one of claims 14 to 18, characterized in that The sending module is further configured to, when the verification result indicates that the verification is successful, encrypt the data to be verified; and send an activity execution request carrying the encrypted data to be verified to the server.

20. The device according to claim 19, characterized in that The data to be verified includes the activity identifier, the local device identifier, and the random string; the sending module is further used to encrypt at least one of the activity identifier, the local device identifier, and the random string.

21. A request processing device, characterized in that: The device comprises: a receiving module, configured to receive activity execution requests for a target activity sent by multiple clients, and record a receiving time of the activity execution requests, wherein the activity execution requests are sent by the clients based on the request sending method according to any one of claims 1 to 7; A result acquisition module, configured to verify the data to be verified in each activity execution request according to the reception time of the activity execution request, and obtain a verification result; The processing module is used to process the activity execution request when the verification result indicates that the verification is successful.

22. The device according to claim 21, characterized in that The data to be verified includes an activity identifier; the result acquisition module is also used to extract the data to be verified in the activity execution request, determine the summary value of the data to be verified; obtain the activity verification rule that matches the activity identifier; and verify the summary value through the activity verification rule to obtain a verification result.

23. The device according to claim 22, characterized in that The result acquisition module is also used to extract the activity identifier, the device identifier of the client, and the random string in the activity execution request; splice the activity identifier, the device identifier of the client, and the random string to obtain the data to be verified of the activity execution request.

24. The device according to claim 22, characterized in that The result acquisition module is further used to extract the data to be verified in the activity execution request; if the data to be verified is encrypted data, decrypt the data to be verified and update the data to be verified.

25. The device according to claim 24, characterized in that The data to be verified includes an encryption activity identifier, an encryption device identifier of the client, and at least one of an encrypted random string; decrypting the data to be verified includes: decrypting at least one of the encryption activity identifier, the encryption device identifier of the client, and the encrypted random string in the data to be verified.

26. The device according to any one of claims 21 to 25, characterized in that The request processing device also includes a prompt module, which is used to verify whether the device identification of the client is consistent with the pre-stored login device identification; if the device identification of the client is inconsistent with the pre-stored login device identification, a verification failure message is sent to the client.

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

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

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

Citation Information

Patent Citations

  • Method for transmitting information, client, server, and system for transmitting information

    CN104796311A

  • Security check method and system during ECU refreshing

    CN106506499A

  • Program result verification method based on information abstract value

    CN112433930A

  • Data reporting method and device, storage medium and electronic equipment

    CN112887222A

  • Client-based interface high-concurrency processing method and device, terminal and medium

    CN117390333A