Data processing method and apparatus, electronic device, and memory

By generating and concatenating data sequences and verification data to form signature-verified exchange data, the problems of easily cracked exchange data and high server load are solved, achieving secure and efficient generation and management of exchange data.

CN113947426BActive Publication Date: 2025-10-28BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111197273.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-14
Publication Date
2025-10-28
Estimated Expiration
2041-10-14

AI Technical Summary

Technical Problem

The existing exchange data is easy to crack. As the number of generated data increases, the duplication rate is high, and the server is under great pressure, posing a risk of SQL injection.

Method used

By generating a first data sequence, converting it into first verification data based on the target parameters, and concatenating it with the data sequence to form the target exchange data, signature verification is achieved, database queries are reduced, and frequency control restrictions are increased.

Benefits of technology

It improves the security and uniqueness of exchange data, reduces server load, prevents brute-force attacks, and reduces the possibility of SQL injection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113947426B_ABST
    Figure CN113947426B_ABST
Patent Text Reader

Abstract

This disclosure provides a data processing method, apparatus, electronic device, and memory, relating to the field of computer technology, and particularly to the field of data processing. The specific implementation scheme is as follows: A first data sequence of target exchange data to be generated is obtained, wherein the target exchange data is used to exchange for target resources; the first data sequence is transformed based on target parameters to obtain first verification data, wherein the first verification data is used to verify whether the input first exchange data is consistent with the target exchange data; the first verification data and the first data sequence are concatenated to obtain the target exchange data, thus solving the technical problem of being unable to generate valid exchange data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more particularly to data processing methods, apparatus, electronic devices, and memories in the field of data processing. Background Technology

[0002] Currently, when generating exchange data, the number of digits of the random code can be calculated based on the total length of the input exchange data. Then, each digit is randomly assigned a value, and the generated exchange data is then stored in the database and mapped to a unique exchange resource.

[0003] The aforementioned exchange data is easy to crack, and as the number of exchange data generated increases, the proportion of duplicates also increases. Summary of the Invention

[0004] This disclosure provides a data processing method, apparatus, electronic device, and memory.

[0005] According to one aspect of this disclosure, a data processing method is provided. The method may include: acquiring a first data sequence of target exchange data to be generated, wherein the target exchange data is used to exchange for target resources; transforming the first data sequence based on target parameters to obtain first verification data, wherein the first verification data is used to verify whether the input first exchange data is consistent with the target exchange data; and concatenating the first verification data and the first data sequence to obtain the target exchange data.

[0006] According to another aspect of this disclosure, another data processing method is also provided. This method may include: responding to an input command applied to an operation interface by inputting first exchange data; responding to a verification operation command applied to the operation interface by displaying a verification result of the first exchange data on the operation interface, wherein the verification result includes a result of verifying whether the first exchange data is consistent with target exchange data based on the first verification data, the first verification data being obtained by converting a first data sequence based on target parameters, the first verification data and the first data sequence being used to concatenate the first verification data and the target exchange data being used to exchange for target resources.

[0007] According to another aspect of this disclosure, another data processing method is also provided. This method may include: responding to an input command applied to an operation interface by inputting a first redemption code; responding to a verification operation command applied to the operation interface by displaying a verification result of the first redemption code on the operation interface, wherein the verification result includes a result of verifying whether the first redemption code is consistent with a target redemption code based on first verification data, the first verification data being obtained by converting a first data sequence based on target parameters, the first verification data and the first data sequence being used to concatenate to obtain a target redemption code, and the target redemption code being used to redeem learning resources on an educational platform.

[0008] According to another aspect of this disclosure, a data processing apparatus is provided. The apparatus may include: an acquisition unit for acquiring a first data sequence of target exchange data to be generated, wherein the target exchange data is used to exchange for target resources; a conversion unit for converting the first data sequence based on target parameters to obtain first verification data, wherein the first verification data is used to verify whether the input first exchange data is consistent with the target exchange data; and a splicing unit for splicing the first verification data and the first data sequence to obtain the target exchange data.

[0009] According to another aspect of this disclosure, another data processing apparatus is also provided. This apparatus may include: a first input unit for inputting first exchange data in response to an input command applied to an operation interface; and a first display unit for displaying a verification result of the first exchange data on the operation interface in response to a verification operation command applied to the operation interface. The verification result includes a result of verifying whether the first exchange data is consistent with target exchange data based on the first verification data. The first verification data is obtained by converting a first data sequence based on target parameters. The first verification data and the first data sequence are used to concatenate the first verification data to obtain target exchange data, which is used to exchange for target resources.

[0010] According to another aspect of this disclosure, another data processing apparatus is also provided. This apparatus may include: a second input unit for inputting a first redemption code in response to an input command applied to an operation interface; and a second display unit for displaying a verification result of the first redemption code on the operation interface in response to a verification operation command applied to the operation interface. The verification result includes a result of verifying whether the first redemption code matches a target redemption code based on first verification data. The first verification data is obtained by converting a first data sequence based on target parameters. The first verification data and the first data sequence are concatenated to obtain a target redemption code, which is used to redeem learning resources on an educational platform.

[0011] According to another aspect of this disclosure, a data electronic device is also provided. The electronic device may include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the data processing method of the embodiments of this disclosure.

[0012] According to another aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to cause a computer to perform a data processing method according to an embodiment of this disclosure.

[0013] According to another aspect of this disclosure, a computer program product is also provided, including a computer program that, when executed by a processor, implements a data processing method according to an embodiment of this disclosure.

[0014] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0015] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0016] Figure 1 This is a flowchart of a data processing method according to an embodiment of the present disclosure;

[0017] Figure 2 This is a flowchart of another data processing method according to an embodiment of the present disclosure;

[0018] Figure 3 This is a flowchart of another data processing method according to an embodiment of the present disclosure;

[0019] Figure 4 This is a schematic diagram illustrating the generation of a redemption code according to an embodiment of this disclosure;

[0020] Figure 5 This is a flowchart illustrating a method for generating and redeeming redemption codes in an educational setting, according to an embodiment of this disclosure.

[0021] Figure 6 This is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure;

[0022] Figure 7 This is a schematic diagram of another data processing apparatus according to an embodiment of the present disclosure;

[0023] Figure 8 This is a schematic diagram of another data processing apparatus according to an embodiment of the present disclosure;

[0024] Figure 9 This is a schematic block diagram of an electronic device according to an embodiment of the present disclosure. Detailed Implementation

[0025] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0026] Figure 1 This is a flowchart of a data processing method according to an embodiment of the present disclosure. Figure 1 As shown, the method may include the following steps:

[0027] Step S102: Obtain the first data sequence of target exchange data to be generated, wherein the target exchange data is used to exchange for target resources.

[0028] In the technical solution provided by step S102 of this disclosure, the first data sequence can be a data sequence generated according to certain data rules, such as a data sequence generated by considering the target exchange data upgrade, the validity period of the target exchange data (validity period verification), and the serial number that is incremented in time sequence. It can be a base-36 serial number, such as 3l1kva2vci33.

[0029] In this embodiment, the first data sequence is used to generate target redemption data. This target redemption data can be a combination of letters or numbers, and can be used to redeem corresponding target resources online. The target resource can be a physical resource such as an item, or a virtual resource such as promotional information or a type of promotional information. Merchants can sell the target redemption data through other platforms, print offline gift cards, etc., and send the target redemption data to users. Optionally, the target redemption data in this embodiment is a redemption code.

[0030] In operational activities, target redemption data can be unique, used to redeem target resources, and the demand is relatively large. Target redemption data should also be as concise as possible and managed, such as viewing target redemption data, identifying invalid target redemption data, and statistically analyzing the usage of target redemption data.

[0031] Step S104: The first data sequence is transformed based on the target parameters to obtain the first verification data, wherein the first verification data is used to verify whether the input first exchange data is consistent with the target exchange data.

[0032] In the technical solution provided by step S104 of this disclosure, after obtaining the first data sequence of the target exchange data to be generated, the first data sequence is transformed based on the target parameters to obtain the first verification data, wherein the first verification data is used to verify whether the input first exchange data is consistent with the target exchange data.

[0033] In this embodiment, the target parameter can be a key fixed in the server, or a fixed weighted value, such as ac2dp6rbnw2u. That is, for any first data sequence, the target parameter can remain constant. Optionally, the target parameter can also be flexibly adjusted according to different business requirements; no specific restrictions are imposed here.

[0034] This embodiment can convert the first data sequence based on the aforementioned target parameters to obtain first verification data, which is also a verification code. This first verification data is used to verify whether the input first exchange data matches the target exchange data. It can be a signature used for verification, such as a base-36 'bv'. The first exchange data can be the exchange data to be verified entered by the user through the target account. If the first verification data determines that the input first exchange data matches the target exchange data, then the verification of the first exchange data is successful, meaning the first exchange data is legitimate. If the first verification data determines that the input first exchange data does not match the target exchange data, then the verification of the first exchange data fails, meaning the first exchange data is counterfeit.

[0035] The first verification data in this embodiment is used to verify whether the input first exchange data is consistent with the target exchange data, thereby avoiding the need to obtain the user-input exchange data from the database for verification during the verification process. In this way, the legality of the input first exchange data can be verified without reading the database, which greatly reduces the pressure on the server.

[0036] Step S106: Concatenate the first verification data and the first data sequence to obtain the target exchange data.

[0037] In the technical solution provided by step S106 of this disclosure, after converting the first data sequence based on the target parameters to obtain the first verification data, the first verification data and the first data sequence can be concatenated to obtain the target exchange data.

[0038] In this embodiment, the first verification data can be concatenated with the first data sequence. For example, the first verification data can be concatenated with the first data sequence to obtain the final target exchange data.

[0039] Through steps S102 to S106 above, a first data sequence of target exchange data to be generated is obtained, wherein the target exchange data is used to exchange for target resources; the first data sequence is transformed based on target parameters to obtain first verification data, wherein the first verification data is used to verify whether the input first exchange data is consistent with the target exchange data; the first verification data and the first data sequence are concatenated to obtain the target exchange data. In other words, this embodiment adds first verification data, which is concatenated with the first data sequence to form target exchange data. In this way, without reading the database, the first verification data can be used to verify whether the input first exchange data is consistent with the target exchange data. This avoids verifying the first exchange data from the database when verifying the input first exchange data. Instead, the legality of the input first exchange data can be verified without reading the database, thereby greatly reducing the server load and avoiding the possibility of database language (Structured Query Language, SQL) data injection. This solves the technical problem of ineffective data exchange and achieves the technical effect of effectively generating exchange data.

[0040] The method described in this embodiment will be further described below.

[0041] As an optional implementation, the method further includes: obtaining the target number of times the first exchange data is entered through the target account within the target time period; determining that the target number does not exceed the target number threshold, and verifying the currently entered first exchange data based on the first verification data; and determining that the verification of the currently entered first exchange data is successful, then exchanging the target resource to the target account.

[0042] In this embodiment, users can log in using a target account to input first exchange data to verify its legitimacy. This embodiment can add frequency control restrictions by setting a target number threshold. This target number threshold can be the maximum number of times the target account is allowed to input the first exchange data for verification within a target time period. For example, the same target account can redeem a maximum of 100 times within one day. Optionally, this embodiment obtains the target number of times the target account inputs the first exchange data within the target time period, and then determines whether the target number exceeds the target number threshold. If the target number does not exceed the target number threshold, the currently input first exchange data can be verified based on the first verification data. If the target number exceeds the target number threshold, the exchange process can be terminated. Compared to verifying the user-input first exchange data in the database, this method can preliminarily determine whether the first exchange data is forged, is less time-consuming, and thus reduces the server's processing load.

[0043] In this embodiment, if the verification of the currently input first exchange data based on the first verification data is successful, the target resource can be exchanged to the target account, and the exchange information of the first exchange data can be obtained. Then, the target resource can be exchanged to the target account based on the exchange information. If the verification of the currently input first exchange data based on the first verification data fails, the target resource can be exchanged to the target account. For example, items, discount information, or a type of discount information can be exchanged to the target account, and the user has the right to use the target resource through the target account.

[0044] As an optional implementation, verifying the currently input first exchange data based on the first verification data includes: deleting the second verification data located at the verification bit of the first exchange data to obtain a second data sequence; converting the second data sequence based on the target parameter to obtain a third verification data; if the third verification data is the same as the first verification data, then the verification of the currently input first exchange data is determined to be successful; if the third verification data is different from the first verification data, then the verification of the currently input first exchange data is determined to be unsuccessful.

[0045] In this embodiment, the first exchange data has a check bit, for example, the last two bits of the first exchange data. When verifying the currently input first exchange data based on the first check data, this embodiment can delete the second check data from the check bit of the first exchange data to obtain a second data sequence. This embodiment can use the same method as transforming the first data sequence based on the target parameter to obtain the first check data, transforming the second data sequence based on the target parameter to obtain third check data, and then comparing the third check data with the first check data. If the third check data is found to be the same as the first check data, the verification of the currently input first exchange data is successful, that is, the first exchange data is valid; if the third check data is found to be different from the first check data, the verification of the currently input first exchange data fails, that is, the first exchange data is counterfeit.

[0046] As an optional implementation, step S104, converting the first data sequence based on the target parameters to obtain the first verification data, includes: segmenting the target parameters to obtain multiple sub-parameters; segmenting the first data sequence to obtain multiple sub-data sequences; and determining the first verification data based on each sub-parameter and the corresponding sub-data sequence.

[0047] In this embodiment, when converting the first data sequence based on the target parameter to obtain the first verification data, the target parameter can be segmented to obtain multiple sub-parameters. For example, if the target parameter is ac2dp6rbnw2u, it can be segmented every two bits to obtain multiple sub-parameters ac, 2d, p6, rb, nw, 2u. Alternatively, the first data sequence can be segmented to obtain multiple sub-data sequences. For example, if the first data sequence is 3l1kva2vci33, it can be segmented every two bits to obtain multiple sub-data sequences 3l, 1k, va, 2v, ci, 33. Each sub-data sequence can correspond to a sub-parameter, and the first verification data is determined based on each sub-parameter and its corresponding sub-data sequence.

[0048] As an optional implementation, determining the first verification data based on each sub-parameter and the corresponding sub-data sequence includes: obtaining the product between each sub-parameter and the corresponding sub-data sequence to obtain multiple products; taking the remainder of each product based on the target base to obtain multiple remainders; converting the sum of the multiple remainders into a third data sequence in the target base; and determining the first verification data based on the third data sequence.

[0049] In this embodiment, when determining the first verification data based on each sub-parameter and its corresponding sub-data sequence, the sub-parameter and its corresponding sub-data sequence are multiplied segment by segment to obtain the product between the sub-parameter and its corresponding sub-data sequence, resulting in multiple products. Then, the remainder of each product is taken based on the target base. For example, the target base can be 36, which can be obtained by dividing each product by 36*36 and obtaining the remainder. Multiple products correspond to multiple remainders, and the sum of the multiple remainders is converted to base 36 to obtain the third data sequence. This embodiment can determine the first verification data based on the third data sequence.

[0050] As an optional implementation, determining the first check data based on the third data sequence includes: determining the data at the target bit in the third data sequence as the first check data.

[0051] In this embodiment, when determining the first verification data based on the third data sequence, a target bit can be determined first in the third data sequence. For example, the target bit is the last two bits of the third data sequence. Then, the data at the target bit is determined as the first verification data. For example, the data at the last two bits is bv, and then bv is determined as the first verification data.

[0052] It should be noted that the method of converting the second data sequence based on the target parameters to obtain the third verification data in this embodiment can be the same as the method of converting the first data sequence based on the target parameters to obtain the first verification data described above, and will not be repeated here.

[0053] The method for obtaining the first data sequence of the target exchange data to be generated in this embodiment is described below.

[0054] As an optional implementation, step S102, obtaining the first data sequence of the target exchange data to be generated includes: generating the first data sequence based on at least one of the following data: version data, wherein the version data is used to represent the version of the target exchange data; time data, wherein the time data is used to represent the validity period of using the target exchange data; and sequence number data, wherein the sequence number data is used to represent the sequence number of the target exchange data among multiple exchange data, and the sequence numbers of the multiple exchange data are incremented in chronological order.

[0055] In this embodiment, version data is determined. This version data can be a version number representing the version of the target redemption data, and can be used as a prefix for the target redemption code, such as the first two digits of the target redemption code, which can be 01, providing scalability for subsequent upgrades of the target redemption data. This embodiment can also obtain time data, which can be used to support the validity period of the target redemption code, i.e., to support the validity period verification of the target redemption code. This embodiment can also obtain sequence number data, which can be generated incrementally based on Redis transactions, used to represent the sequence number of the target redemption data among multiple redemption data. That is, the generated sequence number increments sequentially, ensuring the uniqueness of the target redemption data and thus avoiding the problem of high redemption data duplication. Optionally, the above sequence number can be a total of 26 digits, and the number of target redemption data that can be generated at the day level is 67,108,864 (2 26 ( ), for normal business use.

[0056] This embodiment can generate a first data sequence based on the version data, time data, and sequence number data described above. It will be further described below.

[0057] As an optional implementation, determining the first data sequence based on version data and time data includes: concatenating time data and sequence number data to obtain a third data sequence; and generating the first data sequence based on the version data and the third data sequence.

[0058] In this embodiment, after obtaining the time data and sequence number data, the time data and sequence number data can be concatenated to obtain a third data sequence. Optionally, this embodiment can convert the time data into binary data, and can also convert the sequence number data into binary data, and then concatenate the binary time data and binary sequence number data to obtain the third data sequence. Optionally, this embodiment can pad the binary sequence number data with zeros to 26 bits, and then concatenate it after the binary time data to obtain the third data sequence, which is binary data and can also be called a date-incrementing sequence number.

[0059] For example, the time data is 210726 (date), which is converted to binary data as 10101100110000. The sequence number data is 111 (count), which is converted to binary data and padded with zeros to 26 bits, resulting in 000000000000000001101111. Then, 10101100110000 and 00000000000000000001101111 are concatenated to obtain the third data sequence 101011001100000000000000000000001101111.

[0060] After concatenating the time data and sequence number data to obtain the third data sequence, this embodiment can generate the first data sequence based on the version data and the third data sequence. Alternatively, the first data sequence can be generated based on the version data, mask data, and the third data sequence.

[0061] As an optional implementation, generating the first data sequence based on version data and the third data sequence includes: adjusting the third data sequence based on mask data; and concatenating the adjusted third data sequence and the version data to obtain the first data sequence.

[0062] In this embodiment, when generating the first data sequence based on version data, mask data, and the third data sequence, the third data sequence can be adjusted based on the mask data. Optionally, this embodiment can randomly generate 20 bits as mask data, convert it to binary data, and then adjust the third data sequence using the binary mask data. Optionally, this embodiment can segment and interleave the binary third data sequence using the binary mask data to make the final generated target exchange data highly random, prevent brute-force attacks, and improve the security of the target exchange data.

[0063] Optionally, in this embodiment, the third data sequence, which is binary, is segmented every four bits, and the mask data is segmented every two bits. Then, each segment of the mask data is added to the end of each corresponding segment of the third data sequence to obtain an adjusted third data sequence. The adjusted third data sequence is binary data. The number of segments obtained by segmenting the third data sequence every four bits is the same as the number of segments obtained by segmenting the mask data every two bits. The multiple segments obtained by segmenting the third data sequence every four bits correspond one-to-one with the multiple segments obtained by segmenting the mask data every two bits.

[0064] For example, the third data sequence 1010110011000000000000000000000001101111 is segmented every two bits, resulting in segments of 1010 1100 1100 0000 0000 0000 0000 0000 01101111. The mask data is 20 bits. Converting it to binary data and padding it with zeros to 26 bits gives 00000000100100011100. Then, it is segmented again, resulting in segments of 00 00 00 00 10 01 0001 11 00. Each of these segments is added to the end of the corresponding segment of the third data sequence to obtain the adjusted third data sequence.

[0065] After adjusting the third data sequence based on the mask data, the adjusted third data sequence and the version data can be concatenated. For example, the binary version data can be placed in the third and fourth bits of the adjusted binary third data sequence to obtain the first data sequence. For example, if the version data is 01, it can be placed in the third and fourth bits of the adjusted third data sequence to obtain the first data sequence 00011010001100001100000001000000100000000010000110110001111, which can be converted to base 36 to obtain 3l1kva2vci33.

[0066] As an optional implementation, step S106, concatenating the first verification data and the first data sequence to obtain the target exchange data, includes concatenating the first verification data after the first data sequence to obtain the target exchange data.

[0067] In this embodiment, after concatenating the first verification data and the first data sequence to obtain the target exchange data, the first verification data can be concatenated to the end of the first data sequence to obtain the target exchange data. For example, if the first verification data is bv in base 36 and the first data sequence is 3l1kva2vci33 in base 36, the first verification data can be concatenated to the end of the first data sequence to obtain the target exchange data 3l1kva2vci33bv.

[0068] As an optional implementation, the method further includes: determining the target resource corresponding to the exchange type of the target exchange data; and if the verification of the currently input first exchange data is successful, then exchanging the target resource to the target account used to input the first exchange data.

[0069] In this embodiment, the type of target exchange data is determined, and then the target resource corresponding to that type is determined. Once the first exchange data currently input is successfully verified based on the first verification data, the target resource is exchanged to the target account used to input the first exchange data. For example, a course is assigned to the target account, thereby achieving the purpose of allocating the corresponding target resource to the target account according to the type of target exchange data.

[0070] For example, if the type of the target exchange data is determined to be type A, the corresponding target resources can be course 1 and course 2. If the type of the target exchange data is determined to be type B, the corresponding target resources can be course 3 and course 4.

[0071] Optionally, the target resource in this embodiment corresponds to a target resource identifier set, which includes the identifier (ID) of each target resource. For example, the target resource identifier set is a course ID set, which includes the IDs of each course. This implementation can initially declare the name of the target redemption data and the target resource identifier set, then create a new type of target redemption data, select the type, specify the quantity of target redemption data, create a target redemption data generation record, obtain the task to be generated for redemption data through a scheduled task, and then use it to generate the target redemption data. Furthermore, it stores the type of target redemption data, the target resource identifier set, and the quantity of target redemption data to achieve the purpose of storing it in a database.

[0072] Figure 2 This is a flowchart of another data processing method according to an embodiment of this disclosure. Figure 2 As shown, the method may include the following steps:

[0073] Step S202: In response to the input command applied to the operation interface, input the first exchange data.

[0074] In the technical solution provided by step S202 of this disclosure, when making an exchange, the user can trigger an input command on the operation interface. The input command is used to obtain the first exchange data, thereby responding to the input command and inputting the first exchange data. The first exchange data is the exchange data to be verified in order to exchange for the target resource.

[0075] Optionally, in this embodiment, login is performed using a target account. After logging in, the user responds to the input command and inputs the first exchange data.

[0076] Step S204: In response to the verification operation command applied to the operation interface, the verification result of the first exchange data is displayed on the operation interface. The verification result includes the result of verifying whether the first exchange data is consistent with the target exchange data based on the first verification data.

[0077] In the technical solution provided in step S204 of this disclosure, the first verification data is obtained by converting the first data sequence based on the target parameters. The first verification data and the first data sequence are used to splice together to obtain the target exchange data, which is used to exchange for the target resources.

[0078] In this embodiment, the user can trigger a verification operation command on the operation interface. The verification operation command is used to verify the first exchange data input above, and in response to the verification operation command, the verification result of the first exchange data is displayed on the operation interface.

[0079] In this embodiment, the first data sequence can be a data sequence generated according to certain data rules, which can be used to generate target redemption data. The target redemption data can be the result of a combination of letters or numbers. In operational activities, the target redemption data can be unique, each target redemption data corresponds to a target resource, and the demand is relatively large. The target redemption data should also be as concise as possible, and the target redemption code data should be manageable.

[0080] This embodiment can transform the aforementioned first data sequence based on target parameters to obtain first verification data. The target parameters can be a fixed key on the server or flexibly adjusted according to different business needs. The first verification data, also known as a verification code, is used to verify whether the input first exchange data matches the target exchange data. If the first verification data determines that the input first exchange data matches the target exchange data, a successful verification result is obtained and displayed on the interactive interface, allowing the user to exchange the target resource for the target account associated with the input first exchange data. If the first verification data determines that the input first exchange data does not match the target exchange data, a failed verification result is obtained and displayed on the interactive interface, prohibiting the user from exchanging the target resource for the target account associated with the input first exchange data.

[0081] In this embodiment, the first verification data can be concatenated with the first data sequence to obtain the target exchange data.

[0082] In this embodiment, with the popularization of the network and the rapid improvement of mobile terminal performance, the arrival of the mobile era has broken the limitation of education requiring large periods of study. There are more and more scenarios of knowledge payment and online education. At the same time, since the carriers of knowledge in the Internet scenario are generally text, images, audio, etc., they are very easy to copy or steal. How to avoid the loss of producers' interests requires effective encryption methods and the use of effective redemption codes to redeem educational resources, educational products and other learning resources. The following is an example of the educational scenario in this embodiment.

[0083] Figure 3 This is a flowchart of another data processing method according to an embodiment of this disclosure. Figure 3 As shown, the method may include the following steps:

[0084] Step S302: In response to the input command applied to the operation interface, enter the first redemption code.

[0085] In the technical solution provided by step S302 of this disclosure, when redeeming learning resources in an educational scenario, the student can trigger an input command on the operation interface. This input command is used to obtain a first redemption code. In response to the input command, the student enters the first redemption code, which is a redemption code to be verified for redeeming learning resources.

[0086] Optionally, in this embodiment, login is performed using a target account. After logging in, the user responds to the input command and enters the first redemption code.

[0087] Step S304: In response to the verification operation command applied to the operation interface, the verification result of the first redemption code is displayed on the operation interface. The verification result includes the result of verifying whether the first redemption code is consistent with the target redemption code based on the first verification data.

[0088] In the technical solution provided in step S304 of this disclosure, the first verification data is obtained by converting the first data sequence based on the target parameters. The first verification data and the first data sequence are used to concatenate to obtain the target redemption code, which is used to redeem learning resources on the education platform.

[0089] In this embodiment, the student can trigger a verification operation command on the operation interface. The verification operation command is used to verify the first redemption code that was entered above. It can obtain the target number of times the first redemption code was entered through the target account within the target time period. If it is determined that the target number of times has not exceeded the target number threshold, the verification operation command is responded to and the verification result of the first redemption code is displayed on the operation interface.

[0090] In this embodiment, the first data sequence can be a data sequence generated according to certain data rules, which can be used to generate a target redemption code. The target redemption code can be the result of a combination of letters or numbers. In operational activities, the target redemption code can be unique, each target redemption code corresponds to a target resource, and the demand is relatively large. The redemption code should also be as concise as possible, and the target redemption code data should be manageable.

[0091] This embodiment can transform the first data sequence based on the target parameters to obtain first verification data, which is used to verify whether the input first redemption code is consistent with the target redemption code. When the first verification data determines that the input first redemption code is consistent with the target redemption code, a verification result indicating successful verification of the first redemption code is obtained and displayed on the interactive interface, allowing users to redeem learning resources from the target account associated with the input first redemption code. When the first verification data determines that the input first redemption code is inconsistent with the target redemption code, a verification result indicating failed verification of the first redemption code is obtained and displayed on the interactive interface, prohibiting users from redeeming learning resources from the target account associated with the input first redemption code.

[0092] In this embodiment, the target redemption code can be obtained by concatenating the first verification data with the first data sequence.

[0093] In the above method of this embodiment, signature verification of the redemption code is added, so that the legality of the signature can be verified without reading the database, which greatly reduces the pressure on the server; at the same time, frequency control restrictions are added to fundamentally solve the possibility of brute-force attacks, and the concept of version data is added to facilitate the subsequent upgrade of the redemption data generation algorithm. Thus, this embodiment optimizes the generation, redemption, and sale of redemption data and proposes a safe and efficient method for generating and redeeming redemption data.

[0094] The technical solution described above in this embodiment will be further illustrated with examples below, specifically using redemption data as redemption codes.

[0095] Redemption codes consist of a combination of letters or numbers, allowing users to redeem corresponding items online. Merchants can then sell redemption codes through other platforms, print offline gift cards, or send them to users.

[0096] In related technologies, the method for generating redemption codes typically involves calculating the number of digits of a random code based on the total length of the input redemption code, then randomly assigning a value to each digit to obtain the redemption code; the generated redemption code is then stored in a database and mapped to a unique redemption resource; during verification, the redemption code entered by the user is retrieved and verified from the database.

[0097] The above-mentioned methods for generating redemption codes have poor security, and hackers can crack them through brute force. The uniqueness of the redemption codes generated by these methods is low, and the random generation of redemption codes is uncontrollable. As the number of redemption codes generated increases, the proportion of duplicates also increases. The availability of redemption codes is poor. Because the codes are queried and verified from the database in real time, this not only puts a lot of pressure on the server, but also increases the possibility of SQL injection.

[0098] However, in actual operations, redemption codes are required to be unique, with each code corresponding to a specific discount or type of discount. Moreover, the demand is often quite high. Redemption code information should be as concise as possible, and these codes should be manageable, such as viewing redemption codes, identifying expired codes, and tracking their usage.

[0099] Therefore, redemption codes need to have the following characteristics: security, uniqueness, availability, and extremely large quantity. To address these characteristics, this embodiment provides a method for generating, redeeming, and selling redemption codes.

[0100] Figure 4 This is a schematic diagram illustrating the generation of a redemption code according to an embodiment of this disclosure. For example... Figure 4 As shown, the following methods are involved:

[0101] S1, the first two digits of the generated redemption code are the version number by default, for example, 01, which provides scalability for subsequent redemption code upgrades.

[0102] S2, the redemption code generation algorithm includes time information, such as 210726 (date), thus supporting the verification of the redemption code's validity period.

[0103] S3 generates serial numbers based on Redis transactions, for example, 111 (counting times). This, combined with the aforementioned time information, ensures the uniqueness of the redemption code. The generated redemption codes can increment sequentially, with a total serial number of 26 digits. It supports generating redemption codes up to 67108864 per day, which is sufficient for business use.

[0104] This embodiment concatenates the aforementioned time information and sequence number. The time information 210726 can be converted into binary 10101100110000, and the sequence number 111 can be converted into binary and padded with zeros to 26 bits to obtain 00000000000000000001101111. This is then concatenated with 10101100110000 to obtain the date incrementing sequence number 1101011001100110000000000000000000001101111.

[0105] S4. Randomly generate 20 bits of data as mask data. Convert this mask data to binary and pad with zeros to obtain 00000000100100011100. Use this to segment and shuffle the binary date sequence. For example, segmenting the binary mask data 00000000100100011100 results in 00 00 00 00 10 01 00 01 1100. Segmenting the binary date sequence results in 1010 1100 1100 0000 0000 0000 000000000 0110 1111. Concatenate 00 00 00 00 10 01 00 01 11 00 to 1010 1100 1100 11000000. After each segment of data in 0000 0000 0000 0000 0110 1111, the binary date increment sequence is segmented and shuffled using mask data. This results in a highly random redemption code, preventing brute-force attacks and improving security. The prefix version number 01 is then placed in the third and fourth bits of the shuffled binary data, resulting in 0001101000110000110000000010000001000000000010000110110001111. This is then converted into a base-36 serial number, resulting in 3l1kva2vci33.

[0106] S5, simultaneously add a weighted value ac2dp6rbnw2u. This weighted value is fixed, equivalent to a key, fixed in the server, and can be flexibly adjusted according to different business needs. This weighted value is multiplied by the sequence number above in segments. For example, segmenting the weighted value yields ac 2d p6 rb nw 2u, and segmenting the sequence number above yields 3l 1kva 2v ci 33. Then, segmentally multiply ac 2d p6 rb nw 2u and 3l 1kva 2v ci 33, divide the product of the segmented multiplications by 36*36 to obtain the remainders, then add the multiple remainders, and then convert the sum of the remainders to base 36, taking the last two digits bv as the check digit, and appending it to the above sequence number 3l1kva2vci33 to obtain the redemption data 3l1kva2vci33bv.

[0107] S6 adds a pre-verification step during the verification process. It removes the verification bits from the user-input redemption code, then calculates the verification code using the code from S5 above, and compares it with the verification code already generated in S5. If they are the same, the pre-verification passes; otherwise, the pre-verification fails. This achieves the purpose of verifying the signature of the redemption code. Compared to obtaining the user-input redemption code and verifying it from the database, this method preliminarily determines whether the redemption code is counterfeit, takes less time, and reduces the server processing pressure.

[0108] S7 adds frequency control restrictions to the redemption code verification, limiting the number of redemptions to 100 per user per day, thus eliminating the possibility of brute-force attacks at the source.

[0109] With the popularization of the internet and the rapid improvement of mobile phone performance, the arrival of the mobile era has broken the limitation of education requiring large periods of study. There are more and more scenarios for paid knowledge and online education. At the same time, since knowledge in the internet context is generally carried by text, images, audio and other media, it is very easy to copy or steal. To avoid losses to producers, effective encryption methods are needed, and effective redemption codes should be used to redeem educational resources and products.

[0110] Figure 5 This is a flowchart illustrating a method for generating and redeeming redemption codes in an educational setting, according to an embodiment of this disclosure. Figure 5 As shown, the redemption code generation method in this embodiment may include:

[0111] Step S501: Declare the redemption code name and course ID set.

[0112] The course ID set in this embodiment includes the IDs of multiple courses.

[0113] Step S502: Create a new redemption code type.

[0114] The redemption code type in this embodiment corresponds to at least one course ID.

[0115] Step S503: Select the redemption code type and specify the number of redemption codes.

[0116] Step S504: Create a redemption code generation record based on the redemption code type and the number of redemption codes.

[0117] This embodiment can store the redemption code generation records in the redemption code type table.

[0118] Step S505: Obtain multiple code-generating tasks through a scheduled task, and generate redemption codes through these tasks.

[0119] This embodiment can store the redemption code in a redemption code information table.

[0120] This embodiment can store information such as redemption code type, quantity, and course ID set in the database.

[0121] The redemption code redemption method in this embodiment may include the following steps:

[0122] Step S506: Determine whether the number of times the target account has logged in exceeds the target number threshold.

[0123] If it is determined that the number of logins through the target account exceeds the target number threshold, then proceed to step S507; otherwise, end the process.

[0124] Step S507: Determine whether the redemption code signature verification was successful.

[0125] If the verification of the redemption code signature is successful, step S508 can be executed; otherwise, the process ends.

[0126] Step S508: Obtain the redemption code information based on the redemption code.

[0127] Step S509: Assign courses to users based on redemption code information.

[0128] This embodiment assigns courses to users based on redemption code information and outputs the user's course schedule.

[0129] In this embodiment, by adding signature verification for the redemption code, the legality of the signature can be verified without reading the database, greatly reducing the pressure on the server side; at the same time, frequency control restrictions are added, thereby fundamentally solving the possibility of brute-force attacks; and the concept of version number is added, which facilitates the subsequent upgrade of the redemption code generation algorithm.

[0130] This disclosure also provides an embodiment for performing Figure 1 The data processing method of the embodiment shown.

[0131] Figure 6 This is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure. Figure 6 As shown, the data processing device 60 may include: an acquisition unit 61, a conversion unit 62, and a splicing unit 63.

[0132] The acquisition unit 61 is used to acquire the first data sequence of target exchange data to be generated, wherein the target exchange data is used to exchange for target resources.

[0133] The conversion unit 62 converts the first data sequence based on the target parameters to obtain the first verification data, wherein the first verification data is used to verify whether the input first exchange data is consistent with the target exchange data.

[0134] The splicing unit 63 is used to splice the first verification data and the first data sequence to obtain the target exchange data.

[0135] Optionally, the device further includes: a first acquisition unit, configured to acquire the target number of times the first exchange data is entered through the target account within the target time period; a first determination unit, configured to determine that the target number of times does not exceed the target number threshold, and to verify the currently entered first exchange data based on the first verification data; and a second determination unit, configured to determine that the verification of the currently entered first exchange data is successful, and then to exchange the target resource to the target account.

[0136] Optionally, the first determining unit includes: a deletion module, used to delete the second verification data located at the verification bit of the first exchange data to obtain a second data sequence; a conversion module, used to convert the second data sequence based on the target parameter to obtain third verification data; a first determining module, used to determine that the verification of the currently input first exchange data is successful if the third verification data is the same as the first verification data; and a second determining module, used to determine that the verification of the currently input first exchange data fails if the third verification data is different from the first verification data.

[0137] Optionally, the conversion unit 62 includes: a first processing module for segmenting the target parameters to obtain multiple sub-parameters; a second processing module for segmenting the first data sequence to obtain multiple sub-data sequences; and a third determining module for determining first verification data based on each sub-parameter and the corresponding sub-data sequence.

[0138] Optionally, the third determining module includes: an acquisition submodule, used to acquire the product between each sub-parameter and the corresponding sub-data sequence to obtain multiple products; a remainder submodule, used to take the remainder of each product based on the target base to obtain multiple remainders; a conversion submodule, used to convert the sum of multiple remainders into a third data sequence in the target base; and a determining submodule, used to determine the first verification data based on the third data sequence.

[0139] Optionally, the determining submodule is used to determine the first check data based on the third data sequence through the following steps: determining the data at the target bit in the third data sequence as the first check data.

[0140] Optionally, the acquisition unit 61 includes: a generation module, configured to generate a first data sequence based on at least one of the following: version data, wherein the version data is used to represent the version of the target exchange data; time data, wherein the time data is used to represent the validity period of using the target exchange data; and sequence number data, wherein the sequence number data is used to represent the sequence number of the target exchange data among multiple exchange data, and the sequence numbers of the multiple exchange data are incremented in chronological order.

[0141] Optionally, the generation module is used to obtain the first data sequence of the target exchange data to be generated through the following steps: concatenating the time data and the sequence number data to obtain the third data sequence; and generating the first data sequence based on the version data and the third data sequence.

[0142] Optionally, the generation module is used to generate a first data sequence based on version data and a third data sequence through the following steps: adjusting the third data sequence based on mask data; and concatenating the adjusted third data sequence and the version data to obtain the first data sequence.

[0143] Optionally, the splicing unit 63 includes: a splicing module, used to splice the first verification data after the first data sequence to obtain the target exchange data.

[0144] Optionally, the device further includes: a third determining unit for determining the target resource corresponding to the exchange type of the target exchange data; and a fourth determining unit for determining that if the verification of the currently input first exchange data is successful, the target resource will be exchanged to the target account used to input the first exchange data.

[0145] This disclosure also provides an embodiment for performing Figure 2 The data processing method of the embodiment shown.

[0146] Figure 7 This is a schematic diagram of another data processing apparatus according to an embodiment of the present disclosure. Figure 7 As shown, the data processing device 70 may include a first input unit 71 and a first display unit 72.

[0147] The first input unit 71 is used to respond to input commands applied to the operation interface and input the first exchange data.

[0148] The first display unit 72 is used to respond to the verification operation command applied to the operation interface and display the verification result of the first exchange data on the operation interface. The verification result includes the result of verifying whether the first exchange data and the target exchange data are consistent based on the first verification data. The first verification data is obtained by converting the first data sequence based on the target parameters. The first verification data and the first data sequence are used to concatenate the first verification data to obtain the target exchange data. The target exchange data is used to exchange for the target resource.

[0149] This disclosure also provides an embodiment for performing Figure 3 The data processing method of the embodiment shown.

[0150] Figure 8 This is a schematic diagram of another data processing apparatus according to an embodiment of the present disclosure. Figure 8 As shown, the data processing device 80 may include: a second input unit 81 and a second display unit 82.

[0151] The second input unit 81 is used to respond to input commands applied to the operation interface and input the first redemption code.

[0152] The second display unit 82 is used to respond to a verification operation command applied to the operation interface and display the verification result of the first redemption code on the operation interface. The verification result includes the result of verifying whether the first redemption code matches the target redemption code based on first verification data. The first verification data is obtained by converting a first data sequence based on target parameters. The first verification data and the first data sequence are concatenated to obtain the target redemption code, which is used to redeem learning resources on the education platform.

[0153] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0154] It should be noted that the above-mentioned units and modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0155] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0156] According to embodiments of this disclosure, an electronic device is also provided. The electronic device may include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a method for determining the driving trajectory of a vehicle according to embodiments of this disclosure.

[0157] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0158] According to embodiments of this disclosure, this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the data processing method of embodiments of this disclosure.

[0159] Optionally, in this embodiment, the non-volatile storage medium described above can be configured to store a computer program for performing the following steps:

[0160] S1, Obtain the first data sequence of target exchange data to be generated, wherein the target exchange data is used to exchange for target resources;

[0161] S2, transform the first data sequence based on the target parameters to obtain the first verification data, wherein the first verification data is used to verify whether the input first exchange data is consistent with the target exchange data;

[0162] S3, concatenate the first verification data and the first data sequence to obtain the target exchange data.

[0163] Optionally, in this embodiment, the aforementioned non-transitory computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. More specific examples of readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0164] According to embodiments of this disclosure, this disclosure also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0165] S1, Obtain the first data sequence of target exchange data to be generated, wherein the target exchange data is used to exchange for target resources;

[0166] S2, transform the first data sequence based on the target parameters to obtain the first verification data, wherein the first verification data is used to verify whether the input first exchange data is consistent with the target exchange data;

[0167] S3, concatenate the first verification data and the first data sequence to obtain the target exchange data.

[0168] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0169] The program code for implementing the data processing method of this disclosure in this embodiment can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0170] Figure 9 This is a schematic block diagram of an electronic device according to an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0171] like Figure 9 As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. The RAM 903 may also store various programs and data required for the operation of the device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0172] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 909, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0173] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as data processing methods. For example, in some embodiments, the data processing method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform data processing methods by any other suitable means (e.g., by means of firmware).

[0174] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0175] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0176] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0177] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0178] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0179] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0180] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0181] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A data processing method, comprising: Obtain a first data sequence of target exchange data to be generated, wherein the target exchange data is used to exchange for target resources; The first data sequence is transformed based on the target parameters to obtain the first verification data, wherein the first verification data is used to verify whether the input first exchange data is consistent with the target exchange data; The first verification data and the first data sequence are concatenated to obtain the target exchange data; The step of converting the first data sequence based on the target parameters to obtain the first verification data includes: segmenting the target parameters to obtain multiple sub-parameters; segmenting the first data sequence to obtain multiple sub-data sequences; obtaining the product between each sub-parameter and the corresponding sub-data sequence to obtain multiple products; taking the remainder of each product based on the target base to obtain multiple remainders; converting the sum of the multiple remainders into a third data sequence in the target base; and determining the data at the target position in the third data sequence as the first verification data.

2. The method according to claim 1, further comprising: Obtain the target number of times the first redemption data is entered through the target account within the target time period; Once it is determined that the target number of times has not exceeded the target number of times threshold, the first exchange data currently input is verified based on the first verification data; If the verification of the first exchange data input is successful, the target resource will be exchanged for the target account. The verification of the currently input first exchange data based on the first verification data includes: deleting the second verification data at the verification bit of the first exchange data to obtain a second data sequence; converting the second data sequence based on the target parameter to obtain a third verification data, wherein the step of converting the second data sequence based on the target parameter to obtain the third verification data is the same as the step of converting the first data sequence based on the target parameter to obtain the first verification data; if the third verification data is the same as the first verification data, then the verification of the currently input first exchange data is determined to be successful; if the third verification data is not the same as the first verification data, then the verification of the currently input first exchange data is determined to be unsuccessful.

3. The method according to claim 1, wherein, The first data sequence for obtaining the target exchange data to be generated includes: The first data sequence is generated based on at least one of the following: Version data, wherein the version data is used to represent the version of the target exchange data; Time data, wherein the time data is used to indicate the validity period of the target exchange data; The sequence number data is used to represent the sequence number of the target exchange data among multiple exchange data, and the sequence numbers of the multiple exchange data are incremented in chronological order.

4. The method according to claim 3, wherein, The first data sequence for obtaining the target exchange data to be generated includes: The time data and the sequence number data are concatenated to obtain a third data sequence; The first data sequence is generated based on the version data and the third data sequence.

5. The method according to claim 4, wherein, Generating the first data sequence based on the version data and the third data sequence includes: The third data sequence is adjusted based on the mask data; The adjusted third data sequence and the version data are concatenated to obtain the first data sequence.

6. The method according to any one of claims 1 to 5, wherein, The target exchange data is obtained by concatenating the first verification data and the first data sequence. The first verification data is concatenated to the first data sequence to obtain the target exchange data.

7. The method according to any one of claims 1 to 5, wherein, Also includes: Determine the target resource corresponding to the exchange type of the target exchange data; If the verification of the first exchange data entered is successful, the target resource will be exchanged to the target account used to enter the first exchange data.

8. A data processing method, comprising: Responding to input commands applied to the user interface, input the first exchange data; In response to a verification operation command applied to the operation interface, the verification result of the first exchange data is displayed on the operation interface. The verification result includes a result verifying whether the first exchange data is consistent with the target exchange data based on the first verification data. The first verification data is obtained by converting a first data sequence based on target parameters. The first verification data and the first data sequence are used to concatenate the first verification data to obtain the target exchange data, which is used to exchange for target resources. The conversion of the first data sequence based on target parameters includes: determining the data at the target position in the third data sequence; converting the sum of multiple remainders to the target base; taking the remainder of each product based on the target base; obtaining the product of each sub-parameter and its corresponding sub-data sequence; segmenting the target parameters; and segmenting the first data sequence.

9. A data processing method, comprising: Responding to the input command on the user interface, enter the first redemption code; In response to a verification operation command applied to the operation interface, the verification result of the first redemption code is displayed on the operation interface. The verification result includes a result verifying whether the first redemption code matches a target redemption code based on first verification data. The first verification data is obtained by converting a first data sequence based on target parameters. The first verification data and the first data sequence are used to concatenate the first verification data to obtain the target redemption code, which is used to redeem learning resources on an education platform. The first verification data is obtained by converting the first data sequence based on target parameters, including: determining the data at the target position in a third data sequence; converting the sum of multiple remainders to a target base; taking the remainder of each product based on the target base; obtaining the multiple products by multiplying each sub-parameter and its corresponding sub-data sequence; segmenting the target parameters; and segmenting the first data sequence.

10. A data processing apparatus, comprising: An acquisition unit is used to acquire a first data sequence of target exchange data to be generated, wherein the target exchange data is used to exchange for target resources; The conversion unit converts the first data sequence based on the target parameters to obtain first verification data, wherein the first verification data is used to verify whether the input first exchange data is consistent with the target exchange data; The splicing unit is used to splice the first verification data and the first data sequence to obtain the target exchange data; The conversion unit is further configured to convert the first data sequence based on the target parameters through the following steps to obtain the first verification data: segmenting the target parameters to obtain multiple sub-parameters; segmenting the first data sequence to obtain multiple sub-data sequences; obtaining the product between each sub-parameter and the corresponding sub-data sequence to obtain multiple products; taking the remainder of each product based on the target base to obtain multiple remainders; converting the sum of the multiple remainders into a third data sequence in the target base; and determining the data at the target position in the third data sequence as the first verification data.

11. A data processing apparatus, comprising: The first input unit is used to respond to input commands on the operation interface and input the first exchange data; A first display unit is configured to respond to a verification operation command applied to the operation interface and display the verification result of the first exchange data on the operation interface. The verification result includes a result verifying whether the first exchange data is consistent with the target exchange data based on the first verification data. The first verification data is obtained by converting a first data sequence based on target parameters. The first verification data and the first data sequence are concatenated to obtain the target exchange data, which is used to exchange for target resources. The conversion of the first data sequence based on target parameters includes: determining the data at the target position in a third data sequence; converting the sum of multiple remainders to a target base; taking the remainder of each product based on the target base; obtaining the product of each sub-parameter and its corresponding sub-data sequence; segmenting the target parameters; and segmenting the first data sequence.

12. A data processing apparatus, comprising: The second input unit is used to respond to input commands applied to the operation interface and input the first redemption code; The second display unit is used to respond to a verification operation command applied to the operation interface and display the verification result of the first redemption code on the operation interface. The verification result includes a result of verifying whether the first redemption code is consistent with a target redemption code based on first verification data. The first verification data is obtained by converting a first data sequence based on target parameters. The first verification data and the first data sequence are used to concatenate the first verification data to obtain the target redemption code, which is used to redeem learning resources on an education platform. The first verification data is obtained by converting the first data sequence based on target parameters, including: determining the data at the target position in a third data sequence; converting the sum of multiple remainders to a target base; taking the remainder of each product based on the target base; obtaining the product of each sub-parameter and its corresponding sub-data sequence; segmenting the target parameters; and segmenting the first data sequence.

13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-9.

15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Communication method applied to client and server, and electronic devices

    CN108400979A

  • Method and device for generating and verifying exchange code

    CN110738513A