Data transmission method and device, computer equipment and readable storage medium

The data transmission method improves security by verifying request timeliness, uniqueness, and signature accuracy, ensuring the integrity and authenticity of data transmission through a multi-layered judgment process.

CN119182537APending Publication Date: 2024-12-24CHINA SOUTHERN POWER GRID BIG DATA SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing data transmission methods lack sufficient security measures, particularly in ensuring the integrity and authenticity of data transmission, despite the use of encryption algorithms.

Method used

A data transmission method that verifies the timeliness, uniqueness, and accuracy of request identification information and encryption signatures before transmitting encrypted data, using a multi-layered judgment process to enhance security.

Benefits of technology

Enhances data transmission security by ensuring the authenticity and integrity of data transmission through rigorous verification of request timeliness, uniqueness, and signature consistency, thereby reducing the risk of data tampering and replay attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182537A_ABST
    Figure CN119182537A_ABST
Patent Text Reader

Abstract

The invention relates to a data transmission method and device, computer equipment and a readable storage medium. The method comprises the following steps: acquiring request receiving time of a data acquisition request; wherein the data acquisition request carries request sending time, request identification information of the data acquisition request and a request encryption signature; under the condition that the time difference between the request receiving time and the request sending time is not greater than a preset time difference threshold value, performing uniqueness judgment on the request identification information; if the judgment is passed, generating a reference encrypted signature according to the request sending time and the request identification information; and under the condition that the reference encrypted signature is consistent with the request encrypted signature, transmitting the to-be-transmitted data ciphertext to a data receiving end. By adopting the method, the data transmission security 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 information security technology, and in particular to a data transmission method, apparatus, computer equipment and readable storage medium. Background Art

[0002] With the rapid development of information technology, interfaces play a key role in data interaction between different systems and applications. However, interfaces face many security threats, such as data replay and data tampering.

[0003] In order to ensure the security and integrity of interface data, various encryption, signature and verification technologies are constantly developing. However, in the process of data transmission, common encryption algorithms are still used to encrypt data before transmission, and the security of data transmission is not high. Summary of the invention

[0004] Based on this, it is necessary to provide a data transmission method, apparatus, computer device and readable storage medium that can improve the security of data transmission in response to the above technical problems.

[0005] In a first aspect, the present application provides a data transmission method, applied to a data sending end, comprising:

[0006] Obtaining the request receiving time of the data acquisition request; wherein the data acquisition request carries the request sending time, the request identification information of the data acquisition request and the request encryption signature;

[0007] If the time difference between the request receiving time and the request sending time is not greater than a preset time difference threshold, determining the uniqueness of the request identification information;

[0008] If the judgment is passed, a reference encryption signature is generated according to the request sending time and request identification information;

[0009] When the reference encryption signature is consistent with the request encryption signature, the ciphertext of the data to be transmitted is transmitted to the data receiving end.

[0010] In one of the embodiments, the request encryption signature is generated by the data receiving end by encrypting the request sending time and the request identification information using a first encryption algorithm;

[0011] Accordingly, a reference encryption signature is generated based on the request sending time and request identification information, including:

[0012] Using a second encryption algorithm, encrypt the request sending time and the request identification information to generate a reference encryption signature;

[0013] The first encryption algorithm is the same as the second encryption algorithm.

[0014] In one embodiment, determining the uniqueness of the request identification information includes:

[0015] If the request identification information exists in the historical request identification database, it is determined that the uniqueness determination fails;

[0016] If the request identification information does not exist in the historical request identification database, it is determined that the uniqueness determination is passed;

[0017] The historical request identification database is used to store request identification information corresponding to each historical data acquisition request.

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

[0019] When the time difference between the request receiving time and the request sending time is greater than a preset time difference threshold, a request timeout prompt is fed back to the data receiving end; or,

[0020] If the uniqueness of the request identification information fails to be determined, a repeat request prompt is fed back to the data receiving end; or,

[0021] When the reference encryption signature is inconsistent with the requested encryption signature, a signature anomaly prompt is fed back to the data receiving end.

[0022] In a second aspect, the present application also provides a data transmission method, applied to a data receiving end, comprising:

[0023] Sending a data acquisition request to a data sending end so that the data sending end obtains a request receiving time corresponding to the data acquisition request; wherein the data acquisition request carries the request sending time, request identification information of the data acquisition request and a request encryption signature;

[0024] Obtaining the ciphertext of the data to be transmitted sent by the data sending end when the data sending conditions are met;

[0025] Among them, satisfying the data sending conditions includes: the time difference between the request receiving time and the request sending time is not greater than the preset time difference threshold, the uniqueness of the request identification information is determined to be passed, and the reference encryption signature generated by the data sending end is consistent with the request encryption signature.

[0026] In one of the embodiments, the reference encrypted signature is generated by the data sending end using a second encryption algorithm to encrypt the request sending time and request identification information;

[0027] Accordingly, the generation process of requesting an encrypted signature includes:

[0028] Using a first encryption algorithm, encrypt the request sending time and the request identification information to generate a request encryption signature;

[0029] The first encryption algorithm is the same as the second encryption algorithm.

[0030] In a third aspect, the present application further provides a data transmission device, configured at a data sending end, comprising:

[0031] A time acquisition module is used to obtain the request receiving time of the data acquisition request; wherein the data acquisition request carries the request sending time, the request identification information of the data acquisition request and the request encryption signature;

[0032] A uniqueness determination module, used to determine the uniqueness of the request identification information when the time difference between the request receiving time and the request sending time is not greater than a preset time difference threshold;

[0033] A signature generation module is used to generate a reference encryption signature according to the request sending time and request identification information if the judgment is passed;

[0034] The data sending module is used to transmit the ciphertext of the data to be transmitted to the data receiving end when the reference encryption signature is consistent with the request encryption signature.

[0035] In a fourth aspect, the present application further provides a data transmission device, which is configured at a data receiving end and includes:

[0036] A request sending module is used to send a data acquisition request to a data sending end so that the data sending end obtains a request receiving time corresponding to the data acquisition request; wherein the data acquisition request carries the request sending time, the request identification information of the data acquisition request and the request encryption signature;

[0037] The data receiving module is used to obtain the ciphertext of the data to be transmitted sent by the data sending end when the data sending conditions are met;

[0038] Among them, satisfying the data sending conditions includes: the time difference between the request receiving time and the request sending time is not greater than the preset time difference threshold, the uniqueness of the request identification information is determined to be passed, and the reference encryption signature generated by the data sending end is consistent with the request encryption signature.

[0039] In a fifth 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:

[0040] Obtaining the request receiving time of the data acquisition request; wherein the data acquisition request carries the request sending time, the request identification information of the data acquisition request and the request encryption signature;

[0041] If the time difference between the request receiving time and the request sending time is not greater than a preset time difference threshold, determining the uniqueness of the request identification information;

[0042] If the judgment is passed, a reference encryption signature is generated according to the request sending time and request identification information;

[0043] When the reference encryption signature is consistent with the request encryption signature, the ciphertext of the data to be transmitted is transmitted to the data receiving end.

[0044] In a sixth 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:

[0045] Obtaining the request receiving time of the data acquisition request; wherein the data acquisition request carries the request sending time, the request identification information of the data acquisition request and the request encryption signature;

[0046] If the time difference between the request receiving time and the request sending time is not greater than a preset time difference threshold, determining the uniqueness of the request identification information;

[0047] If the judgment is passed, a reference encryption signature is generated according to the request sending time and request identification information;

[0048] When the reference encryption signature is consistent with the request encryption signature, the ciphertext of the data to be transmitted is transmitted to the data receiving end.

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

[0050] Obtaining the request receiving time of the data acquisition request; wherein the data acquisition request carries the request sending time, the request identification information of the data acquisition request and the request encryption signature;

[0051] If the time difference between the request receiving time and the request sending time is not greater than a preset time difference threshold, determining the uniqueness of the request identification information;

[0052] If the judgment is passed, a reference encryption signature is generated according to the request sending time and request identification information;

[0053] When the reference encryption signature is consistent with the request encryption signature, the ciphertext of the data to be transmitted is transmitted to the data receiving end.

[0054] The above-mentioned data transmission method, apparatus, computer equipment and readable storage medium, after the data sending end receives the data acquisition request and before sending the data to be transmitted to the data receiving end, will perform multiple layers of judgment on the content carried by the data acquisition request, and will send the data to be transmitted to the data receiving end only when all multiple layers of judgment are passed. Specifically, first, the time difference between the request reception time and the request sending time is judged for timeliness; secondly, the request identification information is judged for uniqueness; further, the request encryption signature is judged for accuracy, which can improve the security of data transmission. In addition, when sending the data to be transmitted to the data receiving end, the data to be transmitted will be encrypted, and the ciphertext of the data to be transmitted will be transmitted to the data receiving end, which can further improve the security of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] 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.

[0056] Figure 1 is an application environment diagram of a data transmission method in an embodiment;

[0057] Figure 2 A schematic diagram of a flow chart of a data transmission method in an embodiment;

[0058] Figure 3 A schematic diagram of a flow chart of steps for generating a reference encrypted signature in one embodiment;

[0059] Figure 4 Schematic diagram of a uniqueness determination step in one embodiment;

[0060] Figure 5A A flowchart of a request timeout prompt feedback step in one embodiment;

[0061] Figure 5B A flowchart of repeatedly requesting prompt feedback steps in one embodiment;

[0062] Figure 5C A flowchart of a signature abnormality prompt feedback step in an embodiment;

[0063] Figure 6 A schematic diagram of a flow chart of a data transmission method in another embodiment;

[0064] Figure 7 A schematic diagram of a flow chart of a data transmission method in another embodiment;

[0065] Figure 8 is a structural block diagram of a data transmission device in one embodiment;

[0066] Fig. 9 is a structural block diagram of a data transmission device in another embodiment;

[0067] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0068] 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.

[0069] The data transmission method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the data sending end 102 communicates with the data receiving end 104 through the network. The data sending end 102 obtains the request receiving time of the data acquisition request; wherein the data acquisition request carries the request sending time, the request identification information of the data acquisition request and the request encryption signature; the data sending end 102 determines the uniqueness of the request identification information when the time difference between the request receiving time and the request sending time is not greater than the preset time difference threshold; if the determination is passed, the data sending end 102 generates a reference encryption signature according to the request sending time and the request identification information; when the reference encryption signature is consistent with the request encryption signature, the data sending end 102 transmits the ciphertext of the data to be transmitted to the data receiving end. Among them, the data sending end 102 and the data receiving end 104 can be, but are not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc.

[0070] In an exemplary embodiment, Figure 2 As shown, a data transmission method is provided, which is applied to Figure 1 Taking the data sending end 102 in the example as an example, the method includes the following steps:

[0071] S210, obtaining a request receiving time of a data acquisition request.

[0072] The data acquisition request carries the request sending time, the request identification information of the data acquisition request, and the request encryption signature. The request sending time is used to represent the current system time corresponding to the moment when the data receiving end sends the data acquisition request. The request identification information is a unique identifier indicating the data acquisition request. The request encryption signature is data that encrypts and protects the content of the data acquisition request.

[0073] For example, in this embodiment, when the data transmitting end receives the data acquisition request sent by the data receiving end, it obtains the current time of the system and uses the current time of the system as the request receiving time. Further, the data transmitting end can parse the received data acquisition request to obtain the request sending time, the request identification information of the data acquisition request and the request encryption signature.

[0074] S220: When the time difference between the request receiving time and the request sending time is not greater than a preset time difference threshold, determine the uniqueness of the request identification information.

[0075] The preset time difference threshold may be determined based on manual experience or through a large number of experiments, and the present application does not impose any limitation on this. For example, the preset time difference threshold may be 1 second.

[0076] Specifically, in this embodiment, after determining the request receiving time and the request sending time, the time difference between the request receiving time and the request sending time is calculated, and the time difference is compared with a preset time difference threshold. When the time difference is less than the preset time difference threshold, it is determined that the timeliness verification passes; when the time difference is not less than the preset time difference threshold, it is determined that the timeliness verification fails.

[0077] Furthermore, when the timeliness verification is passed, the uniqueness of the request identification information is determined.

[0078] S230: If the determination is successful, a reference encryption signature is generated according to the request sending time and the request identification information.

[0079] Exemplarily, in this embodiment, the request identification information can be input into a pre-trained uniqueness determination model to obtain a uniqueness determination result of the request identification information. Among them, the uniqueness determination model can be constructed based on a common neural network model, which is not described in detail here. Furthermore, in the process of training the uniqueness determination model, the request identification information sample can be input into the uniqueness determination model to obtain a uniqueness prediction result output by the uniqueness determination model. According to the difference between the uniqueness prediction result and the unique label data corresponding to the corresponding request identification sample, the model parameters of the uniqueness determination model are adjusted to improve the model accuracy of the uniqueness determination model.

[0080] Furthermore, when the uniqueness of the request identification information is determined to be passed, the request sending time and the request identification information are input into a pre-trained encryption signature generation model to obtain a reference encryption signature.

[0081] Optionally, in this embodiment, the request sending time and the request identification information may be encrypted based on a predetermined data encryption algorithm to generate a reference encryption signature. The predetermined data encryption algorithm may be the same as or corresponding to the data encryption algorithm corresponding to the data receiving end, and this application does not impose any limitation on this.

[0082] S240, when the reference encryption signature is consistent with the request encryption signature, the ciphertext of the data to be transmitted is transmitted to the data receiving end.

[0083] The ciphertext of the data to be transmitted is the data after the data required by the data receiving end is encrypted. The encryption algorithm used to encrypt the data to be transmitted can be determined in advance based on manual experience. For example, it can be a symmetric encryption algorithm, an asymmetric encryption algorithm, or a national secret SM4 algorithm. This application does not make any limitation on this.

[0084] Illustratively, in this embodiment, the reference encryption signature is compared with the request encryption signature for consistency, and if they are consistent, it is determined that the data receiving end is trustworthy, and the ciphertext of the data to be transmitted is transmitted to the data receiving end.

[0085] In the above data transmission method, after the data sending end receives the data acquisition request, before sending the data to be transmitted to the data receiving end, multiple layers of judgment will be performed on the content carried by the data acquisition request, and the data to be transmitted will be sent to the data receiving end only when all multiple layers of judgment are passed. Specifically, first, the time difference between the request reception time and the request sending time is judged for timeliness; secondly, the uniqueness of the request identification information is judged; further, the accuracy of the request encryption signature is judged, which can improve the security of data transmission. In addition, when sending the data to be transmitted to the data receiving end, the data to be transmitted will be encrypted, and the ciphertext of the data to be transmitted will be transmitted to the data receiving end, which can further improve the security of data transmission.

[0086] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the generation process of the request encryption signature and the reference encryption signature is limited.

[0087] See also Figure 3 The steps for generating the reference encrypted signature shown include:

[0088] S310: Use a second encryption algorithm to encrypt the request sending time and the request identification information to generate a reference encryption signature.

[0089] The first encryption algorithm is the same as the second encryption algorithm. For example, the first encryption algorithm and the second encryption algorithm can both be message authentication code algorithms. (Hash-based Message Authentication Code).

[0090] In the above embodiment, the second encryption algorithm used when generating the reference encryption algorithm is the same as the first encryption algorithm used when generating the request encryption signature, which facilitates the subsequent consistency determination between the reference encryption algorithm and the request encryption signature.

[0091] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the uniqueness determination process of the request identification information is refined.

[0092] See also Figure 4 The uniqueness determination steps shown include:

[0093] S410, determining whether the request identification information exists in a historical request identification database.

[0094] The historical request identification database is used to store the request identification information corresponding to each historical data acquisition request. It is understandable that the data sending end stores the request identification information corresponding to all received data acquisition requests in the historical request identification database. Moreover, different data acquisition requests correspond to different request identification information.

[0095] S420: If yes, determine that the uniqueness determination fails.

[0096] If the request identification information exists in the historical request identification database, it is determined that the data acquisition request is not sent for the first time, and it is determined that the uniqueness determination of the data acquisition request fails.

[0097] S430: If not, determine that the uniqueness determination is passed.

[0098] In the above embodiment, the request identification information is compared with the historical request identification in the historical request identification database, and when the request identification information does not exist in the historical request identification database, it is determined that the uniqueness determination of the request identification information passes, making the uniqueness determination process simpler and clearer.

[0099] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the operations performed by the data sending end in different situations where the data acquisition request does not meet the data transmission requirements are further described.

[0100] See also Figure 5A The request timeout prompt feedback steps shown include:

[0101] S510A: When the time difference between the request receiving time and the request sending time is greater than a preset time difference threshold, a request timeout prompt is fed back to the data receiving end.

[0102] The prompt mode and content of the request timeout prompt can be set as needed. For example, a voice prompt message can be output, or a text prompt message can be output. For example, an abnormal information "the request exceeds the maximum allowed time range" can be output to the data receiving end.

[0103] See also Figure 5B Repeat the steps shown to request prompt feedback, including:

[0104] S510B: When the uniqueness determination of the request identification information fails, a repeat request prompt is fed back to the data receiving end.

[0105] The prompt mode and content of the repeated request prompt can be set as needed. For example, a voice prompt message can be output, or a text prompt message can be output. For example, an abnormal message "Do not repeat the request" can be output to the data receiving end.

[0106] See also Figure 5C The steps for providing feedback on signature anomaly shown include:

[0107] S510C: When the reference encryption signature is inconsistent with the requested encryption signature, a signature abnormality prompt is fed back to the data receiving end.

[0108] The prompt mode and content of the signature abnormality prompt can be set as needed. For example, a voice prompt message can be output, or a text prompt message can be output. For example, "signature error" can be output to the data receiving end.

[0109] In the above embodiments, the operations performed by the data sending end in different situations where the data acquisition request does not meet the data transmission requirements are further explained, so that the data transmission method provided by the present application is clearer and more complete.

[0110] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. Figure 6 As shown, a data transmission method is provided, which is applied to Figure 1 Taking the data receiving end 104 in the example as an example, the method includes the following steps:

[0111] S610: Send a data acquisition request to a data sending end, so that the data sending end obtains a request receiving time corresponding to the data acquisition request.

[0112] The data acquisition request carries the request sending time, the request identification information of the data acquisition request and the request encryption signature.

[0113] Exemplarily, in this embodiment, when there is a demand for data acquisition, the current time of the system is acquired, and the current time is used as the request sending time and added to the data acquisition request.

[0114] Further, randomly generate coded data, for example, randomly generate 128-bit data and arrange and encode the 128-bit data according to a preset format to form a Universally Unique Identifier (UUID) string as the request identification information of the data acquisition request. Further, save the request sending time and the request identification information in the form of MAP, arrange the request sending time and the request identification information in sequence, format the sorted request sending time and the request identification information, generate an intermediate string, encrypt the intermediate string to obtain the target string, and store the target string in the form of a key-value pair as the request encryption signature.

[0115] S620, obtaining the ciphertext of the data to be transmitted sent by the data sending end when the data sending condition is met.

[0116] Among them, satisfying the data sending conditions includes: the time difference between the request receiving time and the request sending time is not greater than the preset time difference threshold, the uniqueness of the request identification information is determined to be passed, and the reference encryption signature generated by the data sending end is consistent with the request encryption signature.

[0117] Specifically, in this embodiment, after receiving the ciphertext of the data to be transmitted sent by the data sending end, the ciphertext of the data to be transmitted is decrypted using the same or corresponding encryption method as that of the data sending end to obtain the required data.

[0118] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, a data transmission method is introduced in detail.

[0119] See also Figure 7 The data transmission method shown includes:

[0120] S701, the data receiving end sends a data acquisition request to the data sending end;

[0121] The data acquisition request includes the request sending time, the request identification information of the data acquisition request and the request encryption signature;

[0122] Specifically, the request sending time is generated as follows: obtain the system millisecond time and convert it to seconds, and add it to the original request in the form of a key-value uniform resource locator (URL) request parameter, with the key value being "timestamp". The request identification information is generated as follows: by arranging and encoding the randomly generated 128-bit data in a specific format, a UUID string is finally formed as the unique identifier of the request, and it is added to the original request in the form of a key-value URL request parameter, with the key value being "nonce"; the request encryption signature is generated as follows: save the request parameters in the form of a Map and sort the Key values ​​in ASCII encoding order, and intercept the request parameter part of the URL after the request parameters are sorted and formatted as a string, and then encrypt it using the HMAC algorithm and convert it into a hexadecimal string, and add it to the original request in the form of a key-value URL request parameter, with the key value being "sign".

[0123] S702, the data sending end obtains the request receiving time of the data acquisition request in response to the data acquisition request;

[0124] S703, the data sending end determines whether the time difference between the request receiving time and the request sending time is greater than a preset time difference threshold;

[0125] Specifically, obtain the timestamp parameter in the request (i.e., the time when the request is sent) and compare it with the system time (i.e., the time when the request is received) to determine whether the time difference between the two exceeds the maximum deviation value allowed by the program.

[0126] S704: If yes, a request timeout prompt is fed back to the data receiving end;

[0127] S705, if not, determining whether the request identification information exists in the historical request identification database;

[0128] The historical request identification database is used to store request identification information corresponding to each historical data acquisition request.

[0129] S706: If yes, a repeat request prompt is fed back to the data receiving end;

[0130] S707, if not, determine that the uniqueness determination is passed, and continue to execute S708;

[0131] S708, using a second encryption algorithm to encrypt the request sending time and request identification information to generate a reference encryption signature;

[0132] Specifically, the signature parameter of the sign interface is obtained, and the request identification information and the request sending time are encrypted and converted into a hexadecimal string using the same HMAC algorithm as the data receiving end, and compared with the sign parameter value to verify the authenticity of the request.

[0133] S709, determining whether the reference encrypted signature is consistent with the requested encrypted signature;

[0134] S710, if yes, transmit the encrypted data to be transmitted to the data receiving end;

[0135] S711, if not, feeding back a signature abnormality prompt to the data receiving end;

[0136] S712, the data receiving end receives the ciphertext of the data to be transmitted, and decrypts the ciphertext of the data to be transmitted to obtain the target data.

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

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

[0139] In an exemplary embodiment, Figure 8 As shown, a first data transmission device is provided, comprising: a time acquisition module 810, a uniqueness determination module 820, a signature generation module 830 and a data sending module 840, wherein:

[0140] The time acquisition module 810 is used to acquire the request receiving time of the data acquisition request.

[0141] The data acquisition request carries the request sending time, the request identification information of the data acquisition request and the request encryption signature.

[0142] The uniqueness determination module 820 is used to determine the uniqueness of the request identification information when the time difference between the request receiving time and the request sending time is not greater than a preset time difference threshold.

[0143] The signature generation module 830 is used to generate a reference encryption signature according to the request sending time and the request identification information if the determination is passed.

[0144] The data sending module 840 is used to transmit the ciphertext of the data to be transmitted to the data receiving end when the reference encryption signature is consistent with the request encryption signature.

[0145] In one embodiment, the data receiving end uses a first encryption algorithm to generate a request encryption signature by encrypting the request sending time and request identification information; correspondingly, the signature generation module 830 is used to use a second encryption algorithm to encrypt the request sending time and request identification information to generate a reference encryption signature; wherein the first encryption algorithm is the same as the second encryption algorithm.

[0146] In one embodiment, the uniqueness determination module 820 includes a first determination unit, which is used to determine that the uniqueness determination fails if the request identification information exists in the historical request identification database; and a second determination unit, which is used to determine that the uniqueness determination passes if the request identification information does not exist in the historical request identification database; wherein the historical request identification database is used to store the request identification information corresponding to each historical data acquisition request.

[0147] In one embodiment, the first data transmission device also includes a prompt module, including a first prompt unit, which is used to feedback a request timeout prompt to the data receiving end when the time difference between the request receiving time and the request sending time is greater than a preset time difference threshold; or, a second prompt unit, which is used to feedback a repeat request prompt to the data receiving end when the uniqueness of the request identification information fails to be determined; or, a third prompt unit, which is used to feedback a signature exception prompt to the data receiving end when the reference encryption signature is inconsistent with the request encryption signature.

[0148] In an exemplary embodiment, Fig. 9 As shown, a second data transmission device is provided, including: a request sending module 910 and a data receiving module 920, wherein:

[0149] The request sending module 910 is used to send a data acquisition request to the data sending end, so that the data sending end obtains the request receiving time corresponding to the data acquisition request.

[0150] The data acquisition request carries the request sending time, the request identification information of the data acquisition request and the request encryption signature.

[0151] The data receiving module 920 is used to obtain the ciphertext of the data to be transmitted sent by the data sending end when the data sending conditions are met.

[0152] Among them, satisfying the data sending conditions includes: the time difference between the request receiving time and the request sending time is not greater than the preset time difference threshold, the uniqueness of the request identification information is determined to be passed, and the reference encryption signature generated by the data sending end is consistent with the request encryption signature.

[0153] In one embodiment, the reference encrypted signature is generated by the data sending end using the second encryption algorithm to encrypt the request sending time and request identification information; accordingly, the second data transmission device includes an encryption signature generation module, which is used to use the first encryption algorithm to encrypt the request sending time and request identification information to generate a request encryption signature; wherein the first encryption algorithm is the same as the second encryption algorithm.

[0154] Each module in the above data transmission 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.

[0155] 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. Fig.10As 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 an 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 data transmission 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.

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

[0157] In an exemplary embodiment, a computer device is 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-mentioned method embodiments when executing the computer program.

[0158] 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.

[0159] 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.

[0160] 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.

[0161] 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.

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

Claims

1. A data transmission method, characterized in that: Applied to a data sending end, the method comprises: Obtaining the request receiving time of the data acquisition request; wherein the data acquisition request carries the request sending time, the request identification information of the data acquisition request and the request encryption signature; If the time difference between the request receiving time and the request sending time is not greater than a preset time difference threshold, determining the uniqueness of the request identification information; If the determination is successful, a reference encryption signature is generated according to the request sending time and the request identification information; When the reference encryption signature is consistent with the request encryption signature, the ciphertext of the data to be transmitted is transmitted to the data receiving end.

2. The method according to claim 1, characterized in that The request encryption signature is generated by the data receiving end by encrypting the request sending time and the request identification information using a first encryption algorithm; Correspondingly, generating a reference encryption signature according to the request sending time and the request identification information includes: Using a second encryption algorithm, encrypt the request sending time and the request identification information to generate a reference encryption signature; The first encryption algorithm is the same as the second encryption algorithm.

3. The method according to claim 1, characterized in that The determining the uniqueness of the request identification information includes: If the request identification information exists in the historical request identification database, it is determined that the uniqueness determination fails; If the request identification information does not exist in the historical request identification database, it is determined that the uniqueness determination is passed; The historical request identification database is used to store request identification information corresponding to each historical data acquisition request.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: When the time difference between the request receiving time and the request sending time is greater than the preset time difference threshold, feeding back a request timeout prompt to the data receiving end; or, If the uniqueness of the request identification information fails to be determined, feeding back a repeat request prompt to the data receiving end; or In the case where the reference encrypted signature is inconsistent with the requested encrypted signature, a signature abnormality prompt is fed back to the data receiving end.

5. A data transmission method, characterized in that: Applied to a data receiving end, the method comprises: Sending a data acquisition request to a data sending end, so that the data sending end obtains a request receiving time corresponding to the data acquisition request; wherein the data acquisition request carries the request sending time, the request identification information of the data acquisition request, and the request encryption signature; Obtaining the ciphertext of the data to be transmitted sent by the data sending end when the data sending condition is met; Among them, the data sending conditions are met including: the time difference between the request receiving time and the request sending time is not greater than a preset time difference threshold, the uniqueness of the request identification information is determined to be passed, and the reference encryption signature generated by the data sending end is consistent with the request encryption signature.

6. The method according to claim 5, characterized in that The reference encrypted signature is generated by the data sending end by encrypting the request sending time and the request identification information using a second encryption algorithm; Accordingly, the generation process of the request encryption signature includes: Using a first encryption algorithm, encrypt the request sending time and the request identification information to generate a request encryption signature; The first encryption algorithm is the same as the second encryption algorithm.

7. A data transmission device, characterized in that: Configured at the data sending end, the device includes: A time acquisition module, used to acquire the request receiving time of the data acquisition request; wherein the data acquisition request carries the request sending time, the request identification information of the data acquisition request and the request encryption signature; A uniqueness determination module, configured to determine the uniqueness of the request identification information when the time difference between the request receiving time and the request sending time is not greater than a preset time difference threshold; A signature generation module, configured to generate a reference encrypted signature according to the request sending time and the request identification information if the determination is passed; The data sending module is used to transmit the ciphertext of the data to be transmitted to the data receiving end when the reference encryption signature is consistent with the request encryption signature.

8. A data transmission device, characterized in that: Configured at the data receiving end, the device includes: A request sending module, used to send a data acquisition request to a data sending end, so that the data sending end obtains a request receiving time corresponding to the data acquisition request; wherein the data acquisition request carries the request sending time, the request identification information of the data acquisition request and the request encryption signature; A data receiving module, used for obtaining the ciphertext of the data to be transmitted sent by the data sending end when the data sending condition is met; Among them, the data sending conditions are met including: the time difference between the request receiving time and the request sending time is not greater than a preset time difference threshold, the uniqueness of the request identification information is determined to be passed, and the reference encryption signature generated by the data sending end is consistent with the request encryption signature.

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

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