Data processing method and device, electronic equipment and storage medium

By using public key encryption and private key decryption technology between the terminal and the server, encrypted ciphertext is generated to verify the integrity of buried point data, and the problem of difficulty in time detection and prevention of tampering during data transmission is solved, and the problem of difficulty in time detection and prevention of tampering is achieved. Secure transmission and accuracy of data.

CN119420542APending Publication Date: 2025-02-11SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411552126.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The prior art is difficult to detect and prevent tampering of buried point data in a timely manner during data transmission, resulting in inaccurate business data indicators.

Method used

The terminal receives the public key sent by the server, generates an encrypted cipher based on the public key and buried data packets, and sends the encrypted message and buried data packets to the server. The server uses the private key to decrypt the encrypted cipher text to Verify data integrity.

Benefits of technology

It realizes timely detection of data tampering during data transmission, improves the security and reliability of buried point data, and ensures the accuracy of business data indicators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420542A_ABST
    Figure CN119420542A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data processing method and device, electronic equipment and a computer readable storage medium, and relates to the technical field of data processing.The method comprises the steps that a public key sent by a server side is received; determining an encrypted ciphertext based on the public key and the buried point data message; and sending the encrypted message and the buried point data message to the server, the encrypted message being used for verifying the buried point data message. Therefore, if the buried point data message is tampered in the process of being transmitted to the server side, the server side can detect and find the tampered buried point data message in time, so that the data security of the buried point data message is improved, and the data reliability is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of data processing technology, and in particular to a data processing method, device, electronic device, and computer-readable storage medium. Background Art

[0002] The quality of the tracking data determines the quality of the business data indicators. Only with real tracking data, through data cleaning, calculation and analysis, can we get the real business data indicators. If the tracking data is maliciously forged before data transmission, then after the tracking data is uploaded to the server, it will bring great security risks to the subsequent server data analysis, resulting in wrong business data indicators.

[0003] In the related art, a method of directly encrypting the buried data is usually adopted. However, the encrypted buried data may be tampered with during the transmission process, and it is difficult for the server to detect such tampering in time. Summary of the invention

[0004] The present disclosure proposes a data processing method, device, electronic device and storage medium, aiming to solve one of the technical problems in the related art at least to a certain extent.

[0005] In a first aspect, an embodiment of the present disclosure provides a data processing method, which is executed by a terminal and includes:

[0006] Receive the public key sent by the server;

[0007] Determine the encrypted ciphertext based on the public key and the buried point data message;

[0008] The encrypted message and the embedded point data message are sent to the server, wherein the encrypted message is used to verify the embedded point data message.

[0009] In a second aspect, an embodiment of the present disclosure provides a data processing method, which is executed by a server and includes:

[0010] Send the public key to the terminal;

[0011] Receiving the encrypted message and the embedded point data message sent by the terminal;

[0012] Decrypting the encrypted ciphertext based on a private key corresponding to the public key to obtain a first summary;

[0013] Based on the first summary, the buried data message is verified to obtain a verification result.

[0014] In a third aspect, an embodiment of the present disclosure provides a data processing device, which is configured in a terminal and includes:

[0015] A first receiving module, used to receive the public key sent by the server;

[0016] A determination module, used to determine the encrypted ciphertext based on the public key and the buried point data message;

[0017] The first sending module is used to send the encrypted message and the embedded data message to the server, wherein the encrypted message is used to verify the embedded data message.

[0018] In a fourth aspect, an embodiment of the present disclosure provides a data processing device, which is configured on a server side and includes:

[0019] A second sending module, used for sending a public key to a terminal;

[0020] A second receiving module is used to receive the encrypted message and the embedded point data message sent by the terminal;

[0021] a decryption module, configured to decrypt the encrypted ciphertext based on a private key corresponding to the public key to obtain a first summary;

[0022] A verification module is used to verify the buried data message based on the first summary to obtain a verification result.

[0023] In a fifth aspect, an embodiment of the present disclosure further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program implements the steps in the above-mentioned data processing method when executed by the processor.

[0024] In a sixth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned data processing method are implemented.

[0025] In a seventh aspect, the embodiments of the present disclosure further provide a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various optional implementations described in the embodiments of the present disclosure.

[0026] In the disclosed embodiment, the terminal first receives the public key sent by the server, and then determines the encrypted ciphertext based on the public key and the buried data message, and then sends the encrypted message and the buried data message to the server, wherein the encrypted message is used to verify the buried data message. Thus, if the buried data message is tampered with during transmission to the server, the server can detect and discover it in a timely manner, thereby improving the data security of the buried data message and ensuring the reliability of the data. The encrypted message is used to verify whether the buried data message has been tampered with during transmission. Since the encrypted message is generated based on the public key and the buried data message, if the data is tampered with, the corresponding relationship between the encrypted message and the buried data message will be destroyed, and the server can find that the buried data message has been tampered with.

[0027] In the disclosed embodiment, the server first sends a public key to the terminal, then receives the encrypted message and the buried data message sent by the terminal, and then decrypts the encrypted ciphertext based on the private key corresponding to the public key to obtain a first summary, and then verifies the buried data message based on the first summary to obtain a verification result. Thus, the server sends the public key to the terminal, so that the terminal can use the public key to encrypt the buried data message. In this way, during the data transmission process, even if it is intercepted by a third party, the message content cannot be interpreted due to the lack of the corresponding private key, thereby ensuring the confidentiality of the data. The server uses the private key corresponding to the public key to decrypt the encrypted ciphertext, and only the correct private key can successfully decrypt and obtain the original data. By obtaining the first summary of the decrypted ciphertext and verifying the buried data message based on this, it is possible to accurately determine whether the data has been tampered with during the transmission process.

[0028] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0030] Figure 1 is a flowchart of a data processing method provided by the first embodiment of the present disclosure;

[0031] Figure 2 is a flowchart of a data processing method provided by the second embodiment of the present disclosure;

[0032] Figure 3 is a flowchart of a data processing method provided in the third embodiment of the present disclosure;

[0033] Figure 4 is a flowchart of a data processing method provided in the fourth embodiment of the present disclosure;

[0034] Figure 5 is a schematic diagram of the interaction between a mobile terminal and a server provided in an embodiment of the present disclosure;

[0035] Figure 6 is a structural schematic diagram of a data processing device provided by an embodiment of the present disclosure;

[0036] Figure 7 is a structural schematic diagram of another data processing device provided by an embodiment of the present disclosure;

[0037] Figure 8 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0038] Some embodiments of the present disclosure will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. Various changes, modifications and equivalents of the methods, devices and / or systems described herein will become apparent after understanding the present disclosure. For example, the order of operations described herein is merely an example and is not limited to those orders set forth herein, but can be changed as becomes apparent after understanding the present disclosure, except for operations that must be performed in a specific order. In addition, for clarity and brevity, descriptions of features known in the art may be omitted.

[0039] The embodiments described in some embodiments of the present disclosure below do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0040] Among them, it should be noted that the executor of the data processing method of this embodiment can be a data processing device, which can be implemented by software and / or hardware, such as computers, mobile phones, wearable devices, laptops, tablet computers, car computers, tablet computers, smart TVs and other types of terminals, or it can also be a server, which is not limited here.

[0041] It should be noted that the description order of the following embodiments is not intended to limit the priority order of the embodiments.

[0042] Figure 1 It is a flowchart of a method for processing data provided according to the first embodiment of the present disclosure.

[0043] In the first embodiment of the present disclosure, the method for processing data executed by taking the “terminal” as the execution subject is described, and no limitation is made here.

[0044] like Figure 1 As shown, the method includes:

[0045] Step 101, receiving the public key sent by the server.

[0046] Among them, the public key is the key used in the asymmetric encryption system. In asymmetric encryption, the key is divided into a pair of public key and private key. The public key is a key that can be made public and distributed to all parties who need to communicate securely with the key owner.

[0047] In the disclosed embodiment, the server may send the public key to the terminal after generating the public key. The terminal may receive the public key sent by the server. Thereafter, the terminal may use the public key to process the information to be encrypted.

[0048] The server may be a terminal in a computer network that provides services to a client. When a client (such as a browser in a terminal) sends a request to the server, the server receives the request, processes it, and then returns a corresponding result.

[0049] As a possible implementation, after receiving the public key, the terminal can store it in a local secure storage area for subsequent use, wherein the storage method can be a variable in memory, a file in a file system, or a dedicated key storage library, which is not limited here.

[0050] As another possible implementation manner, after receiving the public key, the terminal may store the public key in an Android shared object file SO dynamic library in the data channel software development kit SDK.

[0051] Among them, the data channel software development kit (SDK) is a set of tools provided to developers to implement specific data channel related functions. The data channel SDK can provide a unified point-of-use data collection method for each application. Therefore, multiple types of applications can perform data collection operations through a unified interface. In addition, the data channel SDK can update the collected data to the local collection library and store it in a key-value format. This storage method has efficient retrieval performance, which is convenient for developers to quickly obtain the corresponding value based on a specific key.

[0052] Among them, Android Shared Object (SO) files are an executable and linking format (ELF) file, usually written in C or C++, and then compiled into binary form for loading and execution by the Android system. It should be noted that since it is very difficult to decompile the binary code of SO dynamic libraries, developers can put some core codes in SO dynamic libraries to improve the security of the code.

[0053] In the disclosed embodiment, storing the public key in the SO dynamic library can increase the difficulty of maliciously obtaining the public key, ensure the secure storage of the public key file, and thus improve the security of the overall system. For example, in applications involving sensitive data transmission, ensuring the secure storage of the public key can prevent attackers from forging public keys to conduct man-in-the-middle attacks. As a result, the public key can be better protected from unauthorized access. Even if the terminal device is infected by malware, it is difficult for the attacker to easily extract the public key from the SO dynamic library.

[0054] In addition, since SO dynamic libraries are usually written in C or C++, they have high execution efficiency. In some scenarios with high performance requirements, storing public keys in SO dynamic libraries may reduce the performance overhead when reading and using public keys. For example, in applications that frequently perform encrypted communications, fast access to public keys can improve communication efficiency.

[0055] Step 102, determine the encrypted ciphertext based on the public key and the buried data message.

[0056] Among them, the embedded data message can be the data collected by the monitoring points pre-set in the software system, such as user behavior data (such as user click operations, page browsing, sliding and other behaviors), application performance data (such as page loading time, response time, error information), device information (such as the device model used by the user, operating system version, screen resolution), etc., which are not limited here.

[0057] The encrypted ciphertext is obtained by public key encryption, and the server can verify the embedded data message through the encrypted ciphertext.

[0058] As an implementation method, the terminal can first perform digest encryption on the buried point data message to obtain summary information, and then the terminal can use the public key to asymmetrically encrypt the summary information to obtain encrypted ciphertext.

[0059] Step 103, sending the encrypted message and the embedded data message to the server, wherein the encrypted message is used to verify the embedded data message.

[0060] As a possible implementation method, encrypted messages and embedded data messages can be sent to the server based on the Hypertext Transfer Protocol (HTTPS).

[0061] It is understandable that data transmission via HTTPS can prevent data from being stolen or tampered with during transmission.

[0062] It should be noted that the server has a private key file corresponding to the public key, so after receiving the encrypted message, it can decrypt the encrypted message. For example, the server can decrypt the encrypted ciphertext to obtain summary information 1 corresponding to the buried data message, and then encrypt the summary of the buried data message to obtain summary information 2 corresponding to the buried data message. The server can verify the buried data message by comparing whether summary information 1 and summary information 2 are consistent. If the buried data message is tampered with or intercepted and forged during the data transmission process, the server will fail the verification.

[0063] In the disclosed embodiment, the terminal first receives the public key sent by the server, and then determines the encrypted ciphertext based on the public key and the buried data message, and then sends the encrypted message and the buried data message to the server, wherein the encrypted message is used to verify the buried data message. Thus, if the buried data message is tampered with during transmission to the server, the server can detect and discover it in a timely manner, thereby improving the data security of the buried data message and ensuring the reliability of the data. The encrypted message is used to verify whether the buried data message has been tampered with during transmission. Since the encrypted message is generated based on the public key and the buried data message, if the data is tampered with, the corresponding relationship between the encrypted message and the buried data message will be destroyed, and the server can find that the buried data message has been tampered with.

[0064] Figure 2 It is a flowchart of a data processing method provided according to the second embodiment of the present disclosure.

[0065] In the second embodiment of the present disclosure, the method for processing data executed by taking "terminal" as the execution subject is described, and no limitation is made here.

[0066] like Figure 2 As shown, the method includes:

[0067] Step 201, receiving the public key sent by the server.

[0068] It should be noted that the specific implementation of step 201 can refer to the above embodiment and will not be described in detail here.

[0069] Step 202: encrypt the buried point data message based on the message digest algorithm version 5 MD5 to obtain a first digest.

[0070] Among them, the first summary can be a summary obtained by the terminal encrypting the buried data message based on the MD5 algorithm.

[0071] Among them, MD5 (Message Digest Algorithm 5) is a cryptographic hash function. It generates a fixed-length (128-bit) hash value after a series of complex operations on input data of any length. This process is irreversible, that is, the original input data cannot be deduced from the hash value. For the same input data, the MD5 algorithm always generates the same hash value. If the input data has not changed, the hash value calculated each time is consistent. For example, if MD5 is calculated for the same file multiple times, as long as the file content has not changed, the hash value obtained will always be the same.

[0072] Specifically, the terminal may perform digest encryption on the buried point data message by using the MD5 algorithm, and use the encrypted 128-bit hash value as the first digest.

[0073] Step 203: Asymmetrically encrypt the first summary based on the public key to obtain an encrypted ciphertext.

[0074] Among them, asymmetric encryption is an encryption method that uses a pair of keys, namely a public key and a private key. The public key can be distributed publicly and used to encrypt data, while the private key is kept secretly by the owner and used to decrypt data encrypted with the public key.

[0075] In the disclosed embodiment, the terminal can encrypt the first summary using the public key sent by the server to the terminal, and only the server with the corresponding private key can decrypt it. Through the encryption operation of the public key, the first summary can be converted into encrypted ciphertext, so that even if it is intercepted by a third party during the transmission process, its content cannot be easily understood.

[0076] It should be noted that asymmetric encryption provides higher security. The public distribution of public keys does not affect the confidentiality of data, because attackers cannot decrypt without private keys. Even if the public key is leaked, attackers cannot deduce the private key from the public key, and thus cannot decrypt the encrypted ciphertext.

[0077] In the disclosed embodiment, the first summary is usually information obtained by processing a buried data message, and asymmetric encryption of the first summary can prevent the first summary from being tampered with or leaked, thereby ensuring the accuracy of subsequent data verification and analysis.

[0078] For example, during the data transmission and storage process, if the first summary is maliciously modified, it may cause the server to verify the data message incorrectly, affecting data analysis and decision-making. By encrypting the first summary, this can be effectively prevented.

[0079] It is understandable that after receiving the encrypted ciphertext, the server can use the private key to decrypt it to obtain the first summary. If the decrypted first summary is consistent with the summary recalculated from the buried data message, it can be determined that the data has not been tampered with during transmission, ensuring the integrity of the data.

[0080] Step 204, add the encrypted message to the authentication header of the Hypertext Transfer Protocol Secure HTTPS request, and add the embedded data message to the request body of the HTTPS request.

[0081] The authentication header is an HTTP header field used to transmit authentication information. The authentication header can provide the authentication information of the client in the terminal to the server so that the server can determine whether the client has the right to access a specific resource. In the disclosed embodiment, the encrypted message can be added to the authentication header of the HTTPS request, that is, the authentication parameter (Authorization).

[0082] Among them, the request body includes specific request content, and the specific request content in the embodiment of the present disclosure is a buried data message.

[0083] Step 205: Initiate an HTTPS request to the server.

[0084] Specifically, the terminal can transmit the encrypted ciphertext in the authentication header and the embedded data message in the request body to the server by sending an HTTPS request to the server.

[0085] In the disclosed embodiment, the terminal first receives the public key sent by the server, and then encrypts the buried data message based on the fifth version of the message digest algorithm MD5 to obtain the first digest, and then asymmetrically encrypts the first digest based on the public key to obtain the encrypted ciphertext, and then adds the encrypted message to the authentication header of the Hypertext Transfer Protocol HTTPS request, and adds the buried data message to the request body of the HTTPS request, and finally initiates an HTTPS request to the server. Thus, after the terminal receives the public key sent by the server, it asymmetrically encrypts the first digest. Asymmetric encryption has high security because the public key can be publicly distributed, while the private key is only held by the server. Even if the encrypted ciphertext is intercepted during the transmission process, it cannot be decrypted to obtain the original first digest without the private key. Since the encrypted message is added to the authentication header of the HTTPS request, the buried data message is added to the request body, and the request is initiated through the HTTPS protocol. The HTTPS protocol further enhances the security of data during transmission by encrypting the entire communication channel, which can prevent data from being eavesdropped, tampered with and forged, and provides all-round security for data transmission.

[0086] Figure 3It is a flowchart of a data processing method provided according to the third embodiment of the present disclosure.

[0087] In the third embodiment of the present disclosure, the method for processing data executed by the "server" will be described as an execution subject, and no limitation is made here.

[0088] like Figure 3 As shown, the method includes:

[0089] Step 301: Send a public key to a terminal.

[0090] Among them, the public key is the key used in the asymmetric encryption system. In asymmetric encryption, the key is divided into a pair of public key and private key. The public key is a key that can be made public and distributed to all parties who need to communicate securely with the key owner.

[0091] In the disclosed embodiment, the server may send the public key to the terminal after generating the public key, and the terminal may receive the public key sent by the server.

[0092] As a possible implementation method, the server can first generate a public key file and a private key file. The server can generate the public and private key files through a cryptography library.

[0093] For example, in some programming languages, you can use the Open Secure Sockets Layer (OpenSSL) or other encryption libraries to generate a key pair for an asymmetric encryption algorithm and store it in a file to form a public key file and a private key file.

[0094] Furthermore, after generating the public and private key files, the server can send the public key to the terminal through a pre-established communication channel. This communication process can be performed using network protocols such as HTTP (Hypertext Transfer Protocol) and WebSocket.

[0095] Optionally, when sending the public key, the server may encode the public key in a specific data format, such as Base64 encoding, so as to maintain the readability and correctness of the data during network transmission, which is not limited here.

[0096] Step 302: Receive the encrypted message and embedded data message sent by the terminal.

[0097] Among them, the relevant descriptions of encrypted messages and embedded data messages can refer to the above embodiments and will not be repeated here.

[0098] Optionally, the server may first receive the HTTPS request sent by the terminal, and then determine the embedded data message contained in the request body of the HTTPS request and the encrypted message contained in the authentication header.

[0099] Optionally, the server can receive the encrypted message and the embedded data message sent by the terminal through a specified communication channel. For example, in a dedicated data analysis system, the terminal can send the encrypted message and the embedded data message to the server according to a predetermined protocol, and the corresponding interface of the server is responsible for receiving the data and performing subsequent processing.

[0100] It should be noted that in actual applications, the most appropriate method can be selected according to specific application scenarios and requirements to ensure accurate reception and processing of data.

[0101] As an implementation method, the server can first receive the HTTPS request sent by the terminal. HTTPS is a secure communication protocol that can ensure the security and integrity of data during transmission. In this case, the server parses the HTTPS request and can determine the embedded data message contained in the request body and the encrypted message contained in the authentication header.

[0102] For example, when a user is using a web-based application, the terminal sends data to the server through an HTTPS request. After receiving the request, the server can extract the required embedded data message and encrypted message from the structure of the request for subsequent verification and analysis.

[0103] Step 303: decrypt the encrypted ciphertext based on the private key corresponding to the public key to obtain a first summary.

[0104] Among them, the first summary is the summary obtained by the terminal encrypting the summary of the buried data message.

[0105] Among them, the private key is a key that appears in pairs with the public key in an asymmetric encryption system. The public key is used to encrypt data, while the private key is used to decrypt data encrypted with the public key. In this process, the server uses the private key corresponding to the public key previously sent to the terminal to decrypt the encrypted ciphertext sent by the terminal.

[0106] In the disclosed embodiment, the terminal encrypts the first summary using the public key provided by the server, generates an encrypted ciphertext and sends it to the server. After receiving the encrypted ciphertext, the server can use its own private key to perform a decryption operation to restore the first summary.

[0107] Step 304: Based on the first summary, the buried data message is verified to obtain a verification result.

[0108] The verification result may be a verification result of whether the embedded data message is credible data.

[0109] If the embedded data message is credible data, it means that the embedded data message has not been tampered with and is not maliciously forged data. If the embedded data message is untrustworthy data, it means that the embedded data message may have been tampered with and may be maliciously forged data.

[0110] Specifically, after receiving the buried data message, the server can use the same hash algorithm (the algorithm used to generate the first digest) to calculate the buried data message to obtain a second digest. Then the server can verify the buried data message by comparing the first digest with the second digest to obtain a verification result.

[0111] In the disclosed embodiment, the server first sends a public key to the terminal, then receives the encrypted message and the buried data message sent by the terminal, and then decrypts the encrypted ciphertext based on the private key corresponding to the public key to obtain a first summary, and then verifies the buried data message based on the first summary to obtain a verification result. Thus, the server sends the public key to the terminal, so that the terminal can use the public key to encrypt the buried data message. In this way, during the data transmission process, even if it is intercepted by a third party, the message content cannot be interpreted due to the lack of the corresponding private key, thereby ensuring the confidentiality of the data. The server uses the private key corresponding to the public key to decrypt the encrypted ciphertext, and only the correct private key can successfully decrypt and obtain the original data. By obtaining the first summary of the decrypted ciphertext and verifying the buried data message based on this, it is possible to accurately determine whether the data has been tampered with during the transmission process.

[0112] Figure 4 It is a flowchart of a data processing method provided according to the fourth embodiment of the present disclosure.

[0113] In the fourth embodiment of the present disclosure, the method for processing data executed by the "server" will be described as an execution subject, and no limitation is made here.

[0114] like Figure 4 As shown, the method includes:

[0115] Step 401: Send a public key to a terminal.

[0116] Step 402, receiving the encrypted message and embedded data message sent by the terminal.

[0117] Step 403: decrypt the encrypted ciphertext based on the private key corresponding to the public key to obtain a first summary.

[0118] It should be noted that the specific implementation of steps 401-403 can refer to the above embodiment and will not be described in detail here.

[0119] Step 404: Based on MD5, encrypt the summary of the buried data message to obtain a second summary.

[0120] Among them, the second summary can be the summary obtained by the server encrypting the buried data message based on the MD5 algorithm.

[0121] It is understandable that the first summary is the summary value generated when the terminal processes the buried data message through the MD5 algorithm. After receiving the buried data message, the server also uses the same hash algorithm (MD5 algorithm) to calculate the buried data message to obtain the second summary. This ensures that the server and the terminal use the same calculation method to facilitate the subsequent accurate comparison of the first summary and the second summary.

[0122] It should be noted that the specific implementation of step 404 may also refer to the description of digest encryption in the above embodiment, which will not be described in detail here.

[0123] Step 405, when the first digest and the second digest are the same, determine that the verification result is: the embedded data message is credible data.

[0124] Specifically, the server can compare the first digest with the second digest. If the two digests are exactly the same, it means that the embedded data message has not been tampered with during the transmission process and maintains its integrity.

[0125] Optionally, the server may use a bit operation or a comparison function to compare the first digest and the second digest bit by bit, and if all bits are the same, the two digest values ​​are considered to be the same.

[0126] It is understandable that when the first digest and the second digest are the same, the server can determine that the buried data message is credible data. Under normal circumstances, if the buried data message has not been tampered with, the digest value calculated using the same hash algorithm should be the same. In this way, the data can be effectively prevented from being maliciously tampered with or forged, thereby improving the security and reliability of the data.

[0127] Furthermore, if the server determines that the buried data message is credible data, it can further analyze, store or perform other processing operations on the buried data message. For example, the buried data message can be stored in a database for subsequent data analysis and report generation.

[0128] Among them, trusted data refers to data that has not been maliciously tampered with and has integrity, security and reliability.

[0129] Optionally, the server may analyze and process the embedded data message when determining that the embedded data message is credible data.

[0130] It is understandable that credible data ensures the correctness of the analysis and decision-making based on these data. When the server determines that the embedded data message is credible data, it can analyze it based on the embedded data message. If the data is not credible, the analysis based on this data may produce wrong results, which in turn affects the accuracy of the decision. Reliable data ensures the correctness of the analysis and decision-making based on this data.

[0131] For example, the server can parse the data message and extract key information, such as user behavior, device information, timestamp, etc. For example, for an e-commerce application's data message, the server can parse the user's browsing behavior, adding to the shopping cart, purchasing behavior, etc., as well as the device model and operating system version used by the user, which are not limited here.

[0132] For example, the server can also analyze the user's stay time and jump path on different pages through the embedded data packets, and then optimize the application's page layout and navigation design to improve the user experience. If a page takes too long to load, the server can analyze the embedded data packets to find out the cause of the slow loading and optimize it.

[0133] It should be noted that the above examples are only for illustrative purposes and are not intended to limit the present disclosure.

[0134] Step 406, when the first digest and the second digest are different, determine that the verification result is: the embedded data message is not credible data.

[0135] Optionally, the server may discard the embedded data message if it determines that the embedded data message is not credible data.

[0136] It should be noted that when the first digest and the second digest are different, it means that the buried data message is likely to be tampered with or have other problems during transmission, resulting in its integrity being destroyed. Since the generation of the digest is usually based on a specific hash algorithm, any slight change to the data will cause a large change in the digest value. Therefore, if the two digests are inconsistent, it means that the buried data message may have been changed.

[0137] Unreliable data may cause serious problems in subsequent analysis and processing. If decisions are made based on unreliable data, it may lead to wrong conclusions and actions, affecting the normal operation of the business.

[0138] For example, in data analysis, if tampered data messages are used, incorrect user behavior patterns may be derived, thereby misleading the direction of product optimization; in the financial field, if transaction data is unreliable, it may lead to incorrect settlement and risk assessment.

[0139] Therefore, when the server determines that the embedded data message is untrusted data, it can discard the embedded data message, thereby avoiding the negative impact that may be caused by untrusted data. If untrusted data is retained, it may occupy storage space, interfere with data analysis results, and even pose a threat to the security of the system. For example, if maliciously tampered data is retained and mixed with normal data for analysis, it may lead to wrong decisions or security vulnerabilities being exploited.

[0140] In the disclosed embodiment, the server first sends a public key to the terminal, then receives the encrypted message and the buried data message sent by the terminal, and then decrypts the encrypted ciphertext based on the private key corresponding to the public key to obtain a first summary, and then encrypts the buried data message based on MD5 to obtain a second summary, and then, when the first summary and the second summary are the same, the verification result is determined to be: the buried data message is credible data, and when the first summary and the second summary are different, the verification result is determined to be: the buried data message is untrustworthy data. Thus, by decrypting the encrypted ciphertext to obtain the first summary and encrypting the buried data message to obtain the second summary, and comparing whether the two are the same, it is possible to effectively detect whether the data has been tampered with. If the data is maliciously modified during transmission, the two summaries will be inconsistent and thus identified as untrustworthy data. The server can accurately determine the credibility of the buried data message. Only when the two summaries are the same, the data is considered credible, which provides a reliable basis for subsequent data analysis and business decisions.

[0141] Figure 5 is a schematic diagram of the interaction between a mobile terminal and a server provided in an embodiment of the present disclosure. Figure 5 As shown, the terminal is an Android mobile terminal. After the server generates the public and private key files, it sends the public key files to the mobile terminal, which stores them in the SO library of the data channel SDK. The public key file is then used to encrypt the MD5 summary of the buried data message, and then the encrypted characters (that is, the encrypted message) are added to the HTTP Header. Then, an HTTPS request can be initiated to send the encrypted characters and the buried data message to the server. The server decrypts the Header parameters based on the private key, and then verifies the buried data message.

[0142] In order to better implement the data processing method of the present disclosure, the present disclosure also provides a data processing device based on the above data processing method. The meanings of the terms are the same as those in the above data processing method, and the specific implementation details can refer to the description in the method embodiment.

[0143] See also Figure 6 , Figure 6: is a schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure. The data processing device 600 is configured in a terminal, and the device includes:

[0144] The first receiving module 610 is used to receive the public key sent by the server;

[0145] A determination module 620, configured to determine an encrypted ciphertext based on the public key and the buried data message;

[0146] The first sending module 630 is used to send the encrypted message and the embedded data message to the server, wherein the encrypted message is used to verify the embedded data message.

[0147] Optionally, determine the module, specifically for:

[0148] Based on the message digest algorithm version 5 MD5, the buried point data message is digest-encrypted to obtain a first digest;

[0149] Based on the public key, the first summary is asymmetrically encrypted to obtain an encrypted ciphertext.

[0150] Optionally, the first receiving module is further used for:

[0151] The public key is stored in the Android shared object file SO dynamic library in the data channel software development kit SDK.

[0152] Optionally, the first sending module is specifically configured to:

[0153] Add the encrypted message to the authentication header of the Hypertext Transfer Protocol Secure HTTPS request, and add the embedded data message to the request body of the HTTPS request;

[0154] Initiate the HTTPS request to the server.

[0155] In the disclosed embodiment, the terminal first receives the public key sent by the server, and then determines the encrypted ciphertext based on the public key and the buried data message, and then sends the encrypted message and the buried data message to the server, wherein the encrypted message is used to verify the buried data message. Thus, if the buried data message is tampered with during transmission to the server, the server can detect and discover it in a timely manner, thereby improving the data security of the buried data message and ensuring the reliability of the data. The encrypted message is used to verify whether the buried data message has been tampered with during transmission. Since the encrypted message is generated based on the public key and the buried data message, if the data is tampered with, the corresponding relationship between the encrypted message and the buried data message will be destroyed, and the server can find that the buried data message has been tampered with.

[0156] See also Figure 7 , Figure 7 : is a structural diagram of a data processing device provided in an embodiment of the present disclosure. The data processing device 700 is configured on a server side, and the device includes:

[0157] The second sending module 710 is used to send the public key to the terminal;

[0158] The second receiving module 720 is used to receive the encrypted message and the embedded point data message sent by the terminal;

[0159] A decryption module 730, configured to decrypt the encrypted ciphertext based on a private key corresponding to the public key to obtain a first summary;

[0160] The verification module 740 is used to verify the buried data message based on the first summary to obtain a verification result.

[0161] Optionally, the second receiving module is specifically configured to:

[0162] Receiving an HTTPS request sent by the terminal;

[0163] Determine the embedded data message contained in the request body of the HTTPS request and the encrypted message contained in the authentication header.

[0164] Optional, verification module, specifically used for:

[0165] Based on MD5, the buried point data message is digest-encrypted to obtain a second digest;

[0166] In the case where the first digest and the second digest are the same, determining the verification result is: the buried data message is credible data;

[0167] When the first digest and the second digest are different, the verification result is determined to be: the buried data message is not credible data.

[0168] Optionally, the validation module is also used to:

[0169] When it is determined that the buried data message is credible data, analyzing and processing the buried data message;

[0170] Alternatively, when it is determined that the embedded data message is not trusted data, the embedded data message is discarded.

[0171] In the disclosed embodiment, the server first sends a public key to the terminal, then receives the encrypted message and the buried data message sent by the terminal, and then decrypts the encrypted ciphertext based on the private key corresponding to the public key to obtain a first summary, and then verifies the buried data message based on the first summary to obtain a verification result. Thus, the server sends the public key to the terminal, so that the terminal can use the public key to encrypt the buried data message. In this way, during the data transmission process, even if it is intercepted by a third party, the message content cannot be interpreted due to the lack of the corresponding private key, thereby ensuring the confidentiality of the data. The server uses the private key corresponding to the public key to decrypt the encrypted ciphertext, and only the correct private key can successfully decrypt and obtain the original data. By obtaining the first summary of the decrypted ciphertext and verifying the buried data message based on this, it is possible to accurately determine whether the data has been tampered with during the transmission process.

[0172] In addition, the present disclosure also provides an electronic device, such as Figure 8 As shown, it shows a schematic diagram of the structure of the electronic device involved in the present disclosure, specifically:

[0173] The electronic device may include components such as a processor 801 with one or more processing cores, a memory 802 with one or more computer-readable storage media, a power supply 803, and an input unit 804. Those skilled in the art will appreciate that Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0174] The processor 801 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 802 and calling data stored in the memory 802, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 801.

[0175] The memory 802 can be used to store software programs and modules. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.

[0176] The electronic device also includes a power supply 803 for supplying power to each component. Preferably, the power supply 803 can be logically connected to the processor 801 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 803 can also include any components such as one or more DC or AC power supplies, recharging systems, power supply device debugging circuits, power converters or inverters, and power status indicators.

[0177] The electronic device may further include an input unit 804, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0178] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 801 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 802 according to the following instructions, and the processor 801 will run the application programs stored in the memory 802, thereby implementing the steps in any data processing method provided in the embodiments of the present disclosure.

[0179] In the disclosed embodiment, the terminal first receives the public key sent by the server, and then determines the encrypted ciphertext based on the public key and the buried data message, and then sends the encrypted message and the buried data message to the server, wherein the encrypted message is used to verify the buried data message. Thus, if the buried data message is tampered with during transmission to the server, the server can detect and discover it in a timely manner, thereby improving the data security of the buried data message and ensuring the reliability of the data. The encrypted message is used to verify whether the buried data message has been tampered with during transmission. Since the encrypted message is generated based on the public key and the buried data message, if the data is tampered with, the corresponding relationship between the encrypted message and the buried data message will be destroyed, and the server can find that the buried data message has been tampered with.

[0180] In the disclosed embodiment, the server first sends a public key to the terminal, then receives the encrypted message and the buried data message sent by the terminal, and then decrypts the encrypted ciphertext based on the private key corresponding to the public key to obtain a first summary, and then verifies the buried data message based on the first summary to obtain a verification result. Thus, the server sends the public key to the terminal, so that the terminal can use the public key to encrypt the buried data message. In this way, during the data transmission process, even if it is intercepted by a third party, the message content cannot be interpreted due to the lack of the corresponding private key, thereby ensuring the confidentiality of the data. The server uses the private key corresponding to the public key to decrypt the encrypted ciphertext, and only the correct private key can successfully decrypt and obtain the original data. By obtaining the first summary of the decrypted ciphertext and verifying the buried data message based on this, it is possible to accurately determine whether the data has been tampered with during the transmission process.

[0181] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0182] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0183] To this end, the present disclosure provides a computer-readable storage medium, on which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any data processing method provided by the present disclosure.

[0184] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0185] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0186] Since the instructions stored in the computer-readable storage medium can execute the steps in any data processing method provided in the present disclosure, the beneficial effects that can be achieved by any data processing method provided in the present disclosure can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0187] The above is a detailed introduction to a data processing method, device, electronic device and computer-readable storage medium provided by the present disclosure. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A data processing method, characterized in that: Executed by a terminal, the method includes: Receive the public key sent by the server; Determine the encrypted ciphertext based on the public key and the buried point data message; The encrypted message and the embedded point data message are sent to the server, wherein the encrypted message is used to verify the embedded point data message.

2. The method according to claim 1, characterized in that The step of determining the encrypted ciphertext based on the public key and the buried point data message includes: Performing digest encryption on the buried point data message based on the message digest algorithm version 5 MD5 to obtain a first digest; Based on the public key, the first summary is asymmetrically encrypted to obtain an encrypted ciphertext.

3. The method according to claim 1, characterized in that After receiving the public key sent by the server, the method further includes: The public key is stored in the Android shared object file SO dynamic library in the data channel software development kit SDK.

4. The method according to claim 1, characterized in that: The step of sending the encrypted message and the embedded point data message to the server includes: Add the encrypted message to the authentication header of the Hypertext Transfer Protocol Secure HTTPS request, and add the embedded data message to the request body of the HTTPS request; Initiate the HTTPS request to the server.

5. A data processing method, characterized in that: Executed by the server, the method includes: Send the public key to the terminal; Receiving the encrypted message and the embedded point data message sent by the terminal; Decrypting the encrypted ciphertext based on a private key corresponding to the public key to obtain a first summary; Based on the first summary, the buried data message is verified to obtain a verification result.

6. The method according to claim 5, characterized in that The receiving of the encrypted message and the embedded point data message sent by the terminal includes: Receiving an HTTPS request sent by the terminal; Determine the embedded data message contained in the request body of the HTTPS request and the encrypted message contained in the authentication header.

7. The method according to claim 5, characterized in that The verifying the buried data message based on the first summary to obtain a verification result includes: Based on MD5, the buried point data message is digest-encrypted to obtain a second digest; In the case where the first digest and the second digest are the same, determining the verification result is: the buried data message is credible data; When the first digest and the second digest are different, the verification result is determined to be: the buried data message is not credible data.

8. The method according to claim 7, characterized in that After verifying the buried data message based on the first summary to obtain a verification result, the method further includes: When it is determined that the buried data message is credible data, analyzing and processing the buried data message; or, In the case where it is determined that the embedded data message is not credible data, the embedded data message is discarded.

9. A data processing device, characterized in that: The device is configured in a terminal and includes: A first receiving module, used to receive the public key sent by the server; A determination module, used to determine the encrypted ciphertext based on the public key and the buried point data message; The first sending module is used to send the encrypted message and the embedded data message to the server, wherein the encrypted message is used to verify the embedded data message.

10. A data processing device, characterized in that: Configured at the server, the device includes: A second sending module, used for sending a public key to a terminal; A second receiving module is used to receive the encrypted message and the embedded point data message sent by the terminal; a decryption module, configured to decrypt the encrypted ciphertext based on a private key corresponding to the public key to obtain a first summary; A verification module is used to verify the buried data message based on the first summary to obtain a verification result.

11. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the method according to any one of claims 1 to 4 or 5 to 8 when executing the computer program.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 4 or 5 to 8 are implemented.