Data transmission method and device, storage medium, electronic equipment and computer program product
By obtaining environmental information at the front end of the bank system to determine the key and encryption algorithm, encrypting the data and transmitting it using HTTPS, the problem of low front-end data security is solved, and a fully encrypted channel is achieved, thus improving data security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-03-27
AI Technical Summary
The front-end security of modern banking systems is vulnerable to attacks such as XSS and CSRF, resulting in low data security.
By obtaining environmental information from the front-end page to determine the target key and encryption algorithm, the target data is encrypted and transmitted using the HTTPS protocol. In addition, an asymmetric encryption algorithm is used to exchange keys, thus constructing a fully encrypted channel.
It effectively resists man-in-the-middle attacks and cyber threats, ensures high security of front-end data, and prevents sensitive information from being obtained by attackers.
Smart Images

Figure CN121750338A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network security, and more specifically, to a data transmission method and apparatus, storage medium, electronic device, and computer program product. Background Technology
[0002] In modern banking systems, users typically interact with bank servers through web pages or mobile applications. While banking systems have robust backend security measures, frontend security is often vulnerable to attacks such as Cross-Site Scripting (XSS), Cross-Site Request Forgery (CSRF), and clickjacking. Therefore, there is an urgent need for an effective technology and system to enhance frontend security and ensure the safety of user data and transactions.
[0003] There is currently no effective solution to the problem that the front end is vulnerable to attacks and the security of front-end data in related technologies.
[0004] Therefore, it is necessary to improve the relevant technology to overcome the aforementioned defects. Summary of the Invention
[0005] This application provides a data transmission method and apparatus, a storage medium and electronic device, and a computer program product to at least address the issue of front-end vulnerability to attacks, resulting in low security of front-end data.
[0006] According to one embodiment of this application, a data transmission method is provided, comprising: when target data is obtained through a target component of a front-end page, determining a target key and a target encryption algorithm based on the current environment information of the front-end page; using the target encryption algorithm and the target key to encrypt the target data to obtain encrypted data; when a submission request is obtained through a submission component of the front-end page, transmitting the encrypted data to a server based on a communication connection with a server, wherein the submission request is used to instruct the submission of the target data to the server, and the communication connection uses a Hypertext Transfer Security Protocol (HTTP).
[0007] In an exemplary embodiment, determining the target key and target encryption algorithm based on the current environment information of the front-end page includes: determining a first security score, a second security score, a third security score, and a fourth security score corresponding to browser information, operating system information, network environment information, and device type, respectively, wherein the environment information includes: browser information, operating system information, network environment information, and device type; determining a target security score corresponding to the environment information based on the first security score, the second security score, the third security score, and the fourth security score; and determining the corresponding target key and encryption algorithm based on the target security level of the target security score, wherein the higher the security level, the longer the length of the target key corresponding to the security level, and the higher the time complexity of the corresponding encryption algorithm.
[0008] In an exemplary embodiment, determining the target security score corresponding to the environmental information based on the first security score, the second security score, the third security score, and the fourth security score includes: calculating the target security score using the following formula: Target = Base + Gate · Curvature; Base = P1 · u · v + P2 · u · (– v) + P3 · (- u) · v + P4 · (- u) · (- v); Curvature = tanh[(P1 + P2 - P3 - P4) / q]; Gate = σ(P4); u = P4 / q; v = (P2 + P3 - P1 - P4 + q) / (q + q); where Target is the target security score, P1 is the first security score, P2 is the second security score, P3 is the third security score, P4 is the fourth security score, q is a preset constant, and σ is the Sigmoid activation function.
[0009] In an exemplary embodiment, the data transmission method further includes: when the front-end page detects that a target object is performing a target operation, acquiring operation-related information of the target operation; determining a risk score based on the operation-related information using a risk assessment model, wherein the risk score reflects the operation risk of the target operation and is positively correlated with the operation risk; and determining a verification method for the target object to perform the target operation based on the risk score, wherein the verification method includes at least one of the following: password verification, facial recognition verification, fingerprint verification, SMS verification, USB key verification, and video verification.
[0010] In an exemplary embodiment, determining a risk score based on the operation-related information using a risk assessment model includes: preprocessing the operation-related information using a preprocessing layer of the risk assessment model to obtain a preprocessed feature vector; processing the preprocessed feature vector using an encoder layer of the risk assessment model to obtain a first feature vector, wherein the encoder layer includes a multi-head attention mechanism and a feedforward neural network; aggregating the first feature vector using a pooling layer of the risk assessment model to obtain a second feature vector; and processing the second feature vector using a fully connected layer of the risk assessment model to obtain the risk score.
[0011] In an exemplary embodiment, after determining the verification method for the target object to perform the target operation based on the risk score, the data transmission method further includes: if it is determined that the obtained verification information is incorrect and the target object performs verification again, increasing the risk score based on the incorrect verification information, the number of verification failures, and the operating environment information at the time of failure. The updated risk score is then used to determine the verification method for the target object to perform the target operation again.
[0012] In an exemplary embodiment, the data transmission method further includes: determining operation-related information of the target object on the front-end page, wherein the operation-related information includes operation type, operation time, operation amount, account attributes, and operation context information; determining the current scenario of the front-end page based on the environment information and the operation-related information through a scenario evaluation module, wherein the environment information includes browser information, operating system information, network environment information, and device type; and determining the content security policy of the front-end page based on the current scenario of the front-end page.
[0013] According to another embodiment of this application, a data transmission apparatus is provided, comprising: a determining module, configured to determine a target key and a target encryption algorithm based on the current environment information of the front-end page when target data is obtained through a target component of a front-end page; an encryption module, configured to encrypt the target data using the target encryption algorithm and the target key to obtain encrypted data; and a transmission module, configured to transmit the encrypted data to a server based on a communication connection with a server when a submission request is obtained through a submission component of the front-end page, wherein the submission request is used to instruct the submission of the target data to the server, and the transmission protocol used by the communication connection is Hypertext Transfer Security Protocol (HTTP).
[0014] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the steps in any of the above-described data transmission method embodiments when it is run.
[0015] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above-described data transmission method embodiments.
[0016] According to yet another embodiment of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in any of the above-described data transmission method embodiments.
[0017] This application enables the following: When a target component on the front-end page captures target data input by the user, it determines the target key and target encryption algorithm based on the current environment information of the front-end page. The target data is then encrypted using the target encryption algorithm and the target key, forming encrypted data. This effectively masks the plaintext form of the data in the front-end environment. Even if the front-end is attacked (e.g., XSS, CSRF), attackers cannot directly obtain unencrypted sensitive information. Subsequently, the encrypted data is transmitted to the server via the submission component of the front-end page using the HTTPS protocol. HTTPS, as a secure transmission protocol, utilizes SSL / TLS to provide an additional encryption layer for data transmission, ensuring that data is not eavesdropped on or tampered with by third parties during transmission. This application, based on a dual-layer protection of front-end data encryption and HTTPS transmission encryption, constructs an end-to-end encrypted channel from front-end capture to server reception, significantly reducing the security risks of data at the front-end stage, effectively resisting man-in-the-middle attacks and other network threats, thereby ensuring high security of front-end data. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0020] Figure 1 This is a hardware structure block diagram of a computer device for a data transmission method according to an embodiment of this application;
[0021] Figure 2 This is a flowchart of a data transmission method according to an embodiment of this application;
[0022] Figure 3 This is an architecture diagram of the front-end system according to an embodiment of this application;
[0023] Figure 4 This is a flowchart illustrating front-end data encryption according to an embodiment of this application;
[0024] Figure 5 This is a structural block diagram of a data transmission device according to an embodiment of this application. Detailed Implementation
[0025] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0027] To address the aforementioned technical problems, this application provides a data transmission method. The data transmission method embodiments provided in this application can be executed on a computer device or similar computing device. Taking execution on a computer device as an example... Figure 1 This is a hardware structure block diagram of a computer device for a data transmission method according to an embodiment of this application. Figure 1 As shown, a computer device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor (MPU) or programmable logic device such as a field-programmable gate array (FPGA)) and a memory 104 for storing data are also shown. The computer device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer device described above. For example, the computer device may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0028] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the data transmission method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the aforementioned data transmission method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to computer devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0029] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer equipment. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0030] This embodiment provides a data transmission method applied to the aforementioned computer device. Figure 2 This is a flowchart of a data transmission method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps S202-S206:
[0031] Step S202: If the target data is obtained through the target component of the front-end page, the target key and target encryption algorithm are determined based on the current environment information of the front-end page.
[0032] It should be noted that the target components include, but are not limited to, information input boxes on the front-end page. The environmental information includes: browser information, operating system information, network environment information, and device type.
[0033] Optionally, browser information includes, but is not limited to, browser type and version; operating system information includes, but is not limited to, operating system type and version; network environment information includes, for example, public Wi-Fi, corporate networks, mobile data, etc.; and device type includes, for example, desktop computers, laptops, smartphones, tablets, etc. It should be noted that this environmental information is crucial for assessing the security risks of the front-end page. For example, public Wi-Fi networks may be more vulnerable to attacks than home networks, and older browsers may lack the latest security features. By identifying these environmental details, the system can assess the level of security threats in the current environment.
[0034] Step S204: Encrypt the target data using the target key to obtain encrypted data.
[0035] It should be noted that when the target data is obtained through the target component on the front-end page, the target data is encrypted using the target key to prevent the obtained target data from being tampered with.
[0036] Optionally, user-input data, such as sensitive information like bank card numbers and passwords, can be encrypted using the AES-256 encryption algorithm. AES is a symmetric encryption algorithm that uses the same key for both encryption and decryption. AES-256 indicates a key length of 256 bits, which far exceeds the decryption capabilities of modern computers.
[0037] Step S206: If a submission request is obtained through the submission component of the front-end page, the encrypted data is transmitted to the server based on the communication connection with the server, wherein the submission request is used to instruct the submission of the target data to the server, and the transmission protocol used by the communication connection is Hypertext Transfer Security Protocol.
[0038] It should be noted that this application introduces HTTP Strict Transport Security (HSTS) into front-end security. HSTS mandates that browsers always use HTTPS to connect to the specified domain, thus eliminating the possibility of downgrading to HTTP connections in Man-in-the-Middle (MITM) attacks. During front-end development, HSTS header information is injected via JavaScript or HTML meta tags to ensure that every request is made via HTTPS. On the server side, HSTS instructions are automatically sent to the client by configuring the response headers of web servers such as Nginx and Apache.
[0039] In steps S202-S206 above, when the target component of the front-end page captures the target data input by the user, it determines the target key and target encryption algorithm based on the current environment information of the front-end page, and uses the target encryption algorithm and the target key to encrypt the target data, forming encrypted data. This effectively shields the plaintext form of the data in the front-end environment. Even if the front-end is attacked (such as XSS or CSRF), attackers will find it difficult to directly obtain unencrypted sensitive information. Subsequently, the encrypted data is transmitted to the server via the submission component of the front-end page using the HTTPS protocol. HTTPS, as a secure transmission protocol, uses SSL / TLS to provide an additional encryption layer for data transmission, ensuring that the data is not eavesdropped on or tampered with by third parties during transmission. This application, based on a dual-layer protection of front-end data encryption and HTTPS transmission encryption, constructs an end-to-end encrypted channel from front-end capture to server reception, significantly reducing the security risks of data at the front-end stage, effectively resisting man-in-the-middle attacks and other network threats, thereby ensuring high security of front-end data.
[0040] Optionally, the client is the entity that performs the above steps S202-S206.
[0041] In an exemplary embodiment, before encrypting the target data using the target key, if the target data is obtained through the target component of the front-end page, the data transmission method may further determine the target key through the following steps S11-S12:
[0042] Step S11: Obtain the first data sent by the server, wherein the first data is the data obtained by the server encrypting the target key using the target public key.
[0043] Step S12: Decrypt the first data using the target private key to obtain the target key, wherein the target public key and the target private key are a pair of public and private keys corresponding to an asymmetric encryption algorithm.
[0044] It should be noted that, to ensure the target key obtained by the front-end page is not intercepted during transmission, this application employs an asymmetric encryption algorithm key exchange mechanism, further strengthening the pre-encryption preparations. Specifically:
[0045] The server does not directly send the target key to the client. Instead, it encrypts the target key using a pre-negotiated target public key to form the first data. This encryption process is based on an asymmetric encryption algorithm, meaning that only the front-end system holding the target private key that matches the target public key can decrypt and obtain the real target key. In this way, even if the data is eavesdropped on by a third party during transmission, attackers cannot decrypt the target key, thus further ensuring the security of the encryption key for the front-end data.
[0046] By introducing the aforementioned asymmetric encryption key exchange step before front-end data encryption, not only is user data encrypted, but the security of the encryption key itself is also ensured, providing a higher level of data protection. This dual encryption strategy significantly improves the security of front-end data, especially in the face of complex network attacks and security threats, and can more effectively protect user privacy and transaction security.
[0047] In an exemplary embodiment, the data transmission method further includes the following steps S21-S22:
[0048] Step S21: When the front-end page is refreshed, a request instruction is sent to the server, wherein the request instruction is used to instruct the server to update the target key and return the updated target key.
[0049] Step S22: If the updated target key returned by the server is obtained, the updated target key is used to encrypt the data obtained by the target component.
[0050] It should be noted that this application is not limited to key acquisition and use during initialization; it also designs a dynamic key update mechanism to improve the security and flexibility of the entire data communication process. Specifically:
[0051] When the front-end page is refreshed or reloaded, the client automatically detects this event and sends a request to the server. This request instructs the server to update the currently used target key and return the updated key to the front-end system. Page refreshes may be due to user actions, system updates, or periodic security checks. This dynamic key update strategy prevents attackers from cracking encrypted data by analyzing keys that have remained unchanged for a long time. Upon receiving the update request from the front-end, the server generates a new target key and encrypts it using a pre-negotiated public key, ensuring its secure transmission.
[0052] After receiving the updated target key from the server, the front-end system uses this new key to encrypt subsequent data obtained through the target component, as well as to re-encrypt data not sent to the server. In this way, even if an attacker attempts to obtain the key by eavesdropping on network communications, they will likely receive an expired key, making it impossible to decrypt the updated data, thus significantly enhancing system security.
[0053] By embedding a step of dynamic key update in the data transmission method, this embodiment overcomes the security risks that fixed keys may bring. Especially in scenarios where the front-end page may change frequently or users are online for a long time, it can continuously provide robust security protection. This dynamic key update strategy, combined with front-end data encryption and HTTPS transmission encryption, builds a multi-layered protection for data security, further improving the overall security of the system and the level of protection for user data.
[0054] In an exemplary embodiment, the data transmission method further includes the following step S31:
[0055] Step S31: Determine the update frequency of the target key based on the environmental information, and send a request instruction to the server according to the update frequency, wherein the request instruction is used to instruct the server to update the target key and return the updated target key.
[0056] It's important to note that the client has a pre-defined set of rules or algorithms to parse the aforementioned environmental information and calculate or determine the target key update frequency accordingly. In high-risk or unstable network environments, such as when using public Wi-Fi or older browsers, the target key may be updated more frequently to increase the difficulty for attackers to decrypt the data. Conversely, in relatively secure environments, such as home networks or the latest browser version, the update frequency can be appropriately reduced to minimize the impact of key updates on system performance while maintaining a necessary level of security.
[0057] It should be noted that this application, through an environment-aware dynamic key update strategy, can dynamically adjust the security protection strength according to different front-end environment conditions, ensuring the timeliness and security of data encryption keys. This not only enhances the security of data transmission but also reflects a focus on user experience. By employing a flexible security strategy, it avoids performance degradation or operational complexity caused by over-protection, achieving a balance between security and efficiency. This intelligent, environment-adaptive encryption mechanism provides a more refined protection method for modern network security communications, particularly suitable for industries with extremely high data security requirements such as finance and healthcare. It effectively combats specific attacks targeting the front-end environment, providing a solid guarantee for user data and transaction security.
[0058] In an exemplary embodiment, determining the target key and target encryption algorithm based on the current environment information of the front-end page can be achieved through the following steps S41-S43:
[0059] Step S41: Determine the first security score, second security score, third security score, and fourth security score corresponding to browser information, operating system information, network environment information, and device type, respectively. The environment information includes: browser information, operating system information, network environment information, and device type.
[0060] Optionally, a security score can be assigned based on the browser's type, version, and known security vulnerability history. Newer, stable browsers without known vulnerabilities receive higher scores. Operating system security can be assessed, including the availability of real-time security updates, firewall status, and known vulnerabilities; the scoring logic is similar. A security score can be determined by analyzing network encryption (e.g., whether HTTPS is used), network stability, and security (e.g., whether it's public Wi-Fi). Devices can be scored based on their hardware security features, operating system version, and security patch status.
[0061] Optionally, a first security score, a second security score, a third security score, and a fourth security score can be determined based on preset rules. Specifically, the preset rules can be a table, where each browser's information can be used to find its corresponding security score.
[0062] Step S42: Determine the target security score corresponding to the environmental information based on the first security score, the second security score, the third security score, and the fourth security score;
[0063] Optionally, the first security score, the second security score, the third security score, and the fourth security score can be weighted and summed to obtain the target security score corresponding to the environmental information.
[0064] Step S43: Determine the target key and encryption algorithm corresponding to the target security level based on the target security score. The higher the security level, the longer the target key and the higher the time complexity of the corresponding encryption algorithm.
[0065] Optionally, the environment can be divided into multiple security levels based on security scores, each corresponding to a specific encryption strategy. Different key lengths and encryption algorithms are automatically selected for different security levels. For example, a 128-bit AES key might be used in a low-security environment, while a 256-bit AES or a more advanced encryption algorithm, such as RSA, might be used in a high-security environment. It should be noted that the system dynamically adjusts the target key and encryption algorithm based on real-time changes in environmental information to ensure that the encryption strategy always matches the current security requirements.
[0066] Through the above methods, the system can intelligently select the most suitable encryption strategy for different front-end environment conditions, thereby maximizing the protection of user data security while ensuring user experience. This dynamic encryption strategy based on environmental information scoring provides more refined and flexible protection measures for front-end security, effectively addressing ever-changing cybersecurity threats.
[0067] In an exemplary embodiment, determining the target security score corresponding to the environmental information based on the first security score, the second security score, the third security score, and the fourth security score includes: calculating the target security score using the following formula: Target = Base + Gate · Curvature; Base = P1 · u · v + P2 · u · (– v) + P3 · (- u) · v + P4 · (- u) · (- v); Curvature = tanh[(P1 + P2 - P3 - P4) / q]; Gate = σ(P4); u = P4 / q; v = (P2 + P3 - P1 - P4 + q) / (q + q); where Target is the target security score, P1 is the first security score, P2 is the second security score, P3 is the third security score, P4 is the fourth security score, q is a preset constant, and σ is the Sigmoid activation function.
[0068] It should be noted that in this embodiment, a nonlinear transformation is introduced to reflect the complex relationship between scores, specifically:
[0069] 1. Base Calculation: Using the formula Base=P1·u·v+P2·u·(–v)+P3·(–u)·v+P4·(–u)·(–v), the system first calculates a basic safety score. This calculation method considers the relationship between the four scores and adjusts the influence of each score through weights u and v, ensuring a more comprehensive environmental safety consideration.
[0070] 2. Curvature Calculation: Curvature = tanh[(P1 + P2 - P3 - P4) / q]. This part introduces a nonlinear transformation using the hyperbolic tangent (tanh) function, reflecting the nonlinear relationship between safety scores and its impact on the final score. The characteristic of the tanh function is that it can map input values to the range of -1 to 1, which helps to control the magnitude of score adjustments and avoid drastic fluctuations in the score results.
[0071] 3. Gate Calculation: Gate = σ(P4), where the Sigmoid function σ is used. The fourth security score P4 based on the device type determines the "switch" for score adjustment. The Sigmoid function maps the value of P4 to the range of 0 to 1, indicating the contribution of the device type to the final security score, thus determining the influence of the Curvature component on the score adjustment.
[0072] 4. Comprehensive Target Security Score Target: Target = Base + Gate·Curvature. This is a weighted summation process that combines the basic security score Base and Curvature through Gate to obtain the final target security score Target.
[0073] It should be noted that the above method can intelligently calculate a comprehensive score reflecting the security status of the environment, thereby making more reasonable and refined adjustments to encryption and verification strategies, effectively improving the security of user data and transactions.
[0074] In an exemplary embodiment, the data transmission method further includes the following steps S51-S53:
[0075] Step S51: If the front-end page detects that the target object is performing a target operation, obtain the operation-related information of the target operation.
[0076] It should be noted that operation-related information includes, but is not limited to, operation type, operation time, geographical location, operation amount, account attributes, and operation context information (user's behavior patterns before and after the operation), as well as the type of device used and network environment.
[0077] Step S52: Determine a risk score based on the operation-related information using a risk assessment model, wherein the risk score reflects the operational risk of the target operation and is positively correlated with the operational risk.
[0078] It should be noted that the risk assessment model is based on a large amount of historical operational data and known safety incidents, and uses machine learning algorithms to learn the correlation between various operational characteristics and risk levels. A higher risk score indicates a greater potential operational risk, and vice versa. This quantification of risk allows the system to objectively determine the degree of danger of an operation, providing a basis for the selection of subsequent verification methods.
[0079] For example, large transfers and modifications to important account information are considered high-risk operations, while checking account balances are considered low-risk operations. Collecting this information helps to comprehensively assess the potential risks of operations.
[0080] Step S53: Determine the verification method for the target object to perform the target operation based on the risk score, wherein the verification method includes at least one of the following: password verification, face verification, fingerprint verification, SMS verification, U-shield, and video verification.
[0081] For example, low-risk operations, such as checking account balances, may only require simple password verification. High-risk operations, such as large-sum fund transfers, may require multiple verifications, such as combining password verification with facial or fingerprint biometrics, or secondary confirmation via SMS verification and physical devices like USB tokens. Furthermore, in extreme cases, if the system determines an operation to be extremely high-risk, it may require video verification to confirm the operator's identity. This verification mechanism ensures the security of high-risk operations while avoiding unnecessary stringent verification for low-risk operations, thus striking an optimal balance between security and user convenience.
[0082] It should be noted that in this embodiment, by integrating a risk assessment model with dynamic verification method selection, not only is the security of front-end operations improved, but user trust and satisfaction with financial services are also enhanced. This risk-scoring-based verification mechanism demonstrates a high level of vigilance against modern cyberattacks and meticulous attention to user experience. It represents a significant innovation in front-end security technology for banking systems, and is particularly suitable for the complex and ever-changing internet finance business scenarios. It effectively combats targeted attacks and protects user assets and personal information security.
[0083] In an exemplary embodiment, determining a risk score based on the operation-related information using a risk assessment model includes: preprocessing the operation-related information using a preprocessing layer of the risk assessment model to obtain a preprocessed feature vector; processing the preprocessed feature vector using an encoder layer of the risk assessment model to obtain a first feature vector, wherein the encoder layer includes a multi-head attention mechanism and a feedforward neural network; aggregating the first feature vector using a pooling layer of the risk assessment model to obtain a second feature vector; and processing the second feature vector using a fully connected layer of the risk assessment model to obtain the risk score.
[0084] It should be noted that in this embodiment, the preprocessing layer can perform preliminary cleaning and format conversion on operation-related information, unifying diverse data into feature vector forms suitable for deep learning processing. For example, it converts text-based browser and operating system information into numerical codes, normalizes IP addresses, and standardizes operation amounts, ensuring the consistency and standardization of model input data.
[0085] The encoder layer can deeply analyze and mine the information hidden in the feature vectors. This layer uses a combination of multi-head attention mechanism and feedforward neural network. The former can capture the correlation between different features and perform weighted processing on the features, while the latter is responsible for further processing the features to make them more suitable for subsequent layers. Through the processing of this layer, the original feature vector is transformed into the first feature vector, which contains deeper information that is more sensitive to risk.
[0086] Furthermore, the pooling layer extracts the most critical portion from the first feature vector to form the second feature vector. This process helps reduce computation while maintaining the accuracy of risk assessment. Finally, the second feature vector is considered holistically in a fully connected layer and transformed into a final risk score. The score is generated through the weight matrix and activation function of the neural network, intuitively reflecting the potential risk of the operation.
[0087] In an exemplary embodiment, after determining the verification method for the target object to perform the target operation based on the risk score, the data transmission method further includes: if it is determined that the obtained verification information is incorrect and the target object performs verification again, increasing the risk score based on the incorrect verification information, the number of verification failures, and the operating environment information at the time of failure. The updated risk score is then used to determine the verification method for the target object to perform the target operation again.
[0088] It should be noted that this application designs a feedback-based verification mechanism that can dynamically adjust the risk assessment after user verification fails, thus addressing potential threats with more stringent security measures. Specifically:
[0089] After selecting an appropriate verification method based on the risk score of the target operation and requesting verification information from the target (user), if the initial verification fails, the client does not simply terminate the operation or repeat the same verification process. Instead, the client performs a thorough analysis of the current context, considering that verification failure may indicate a high-risk operational intent or potential security threat. In this case, the risk score is automatically increased. An increase in the risk score reflects increased uncertainty in the current operational environment or greater difficulty in verifying the user's identity. Subsequently, the client reassesses the security strategy of the target operation based on the updated risk score and may select a higher-level verification method. For example, if the initial verification method is only password input, the updated verification method may be upgraded to multi-factor authentication including biometrics, such as fingerprint or facial scanning, or even confirmation via SMS verification code or physical USB key.
[0090] Optionally, to respond to verification failure events, the system employs a rule-based scoring mechanism, as follows: First, for each erroneous verification message, the system presets a base score increase based on its type (e.g., incorrect password, device misidentification) and severity. Second, the number of verification failures serves as a crucial indicator; its increase exponentially raises the risk score. This means that the first failure may only slightly increase the score, while multiple consecutive failures will significantly increase it, reflecting potential malicious attacks. Finally, operational environment information at the time of failure, such as abnormal IP addresses, uncommon device types, or unstable network connections, is converted into risk factors and added to the base score increase and the number of failures. The system calculates an increment based on these factors and adds it to the current risk score, generating an updated risk score. This dynamic scoring adjustment mechanism intelligently identifies abnormal behavior and reacts quickly, effectively enhancing the front-end security defense capabilities of the banking system. Especially when facing complex and ever-changing network attacks, it can more accurately adjust verification methods to protect user data and transaction security.
[0091] In an exemplary embodiment, the data transmission method further includes the following steps S61-S63:
[0092] Step S61: Determine the operation-related information of the target object on the front-end page, wherein the operation-related information includes operation type, operation time, operation amount, account attributes and operation context information.
[0093] Step S62: The scene currently in which the front-end page is located is determined by the scene evaluation module based on the environmental information and the operation-related information.
[0094] Step S63: Determine the content security policy of the front-end page based on the current scenario of the front-end page.
[0095] In this embodiment, by analyzing the environmental information and user operation patterns of the front-end page, the content security policy (CSP) is dynamically adjusted to adapt to different usage scenarios and enhance security. First, the system collects environmental information, such as browser version, operating system type, network conditions, and device attributes, as well as details of user operations, including operation frequency, type, and time. Next, the scenario assessment module integrates this information to identify the current scenario, such as performing sensitive operations on a public network or browsing regular content on a secure private network. Finally, based on the characteristics of the scenario, the system intelligently adjusts the CSP, restricting the loading and execution of insecure resources while ensuring that legitimate operations are not affected, achieving precise protection.
[0096] This mechanism ensures dynamic adjustment of the CSP through real-time analysis of the environment and behavior, effectively addressing front-end security challenges in different scenarios. It provides an additional layer of protection, especially for scenarios that may increase the attack surface, such as using older browsers or operating in insecure network environments. Through scenario-aware CSP adjustments, the system enhances its ability to resist common front-end attacks such as XSS and CSRF, while also reducing interference with normal user activities, thus improving both security and user experience.
[0097] Obviously, the embodiments described above are merely some embodiments of the present invention, and not all embodiments. To better understand the above data transmission method, the process is described below in conjunction with embodiments, but this is not intended to limit the technical solutions of the embodiments of the present invention. Specifically:
[0098] This application aims to enhance user security and overall experience when using banking services by constructing a comprehensive technical solution that integrates banking system and front-end security. The system mainly includes a front-end data encryption module, a multi-layered security protection mechanism, and an automated content security policy configuration module. These modules work collaboratively through data transmission, security analysis, and behavior monitoring to achieve comprehensive front-end security protection.
[0099] like Figure 3 As shown, the architecture of the entire system can be divided into the following main parts:
[0100] 1) Front-end module: This includes the user interface (UI) and all front-end components that interact with the user, such as input forms, buttons, validation controls, etc.
[0101] 2) Security Analysis Module: This includes front-end encryption mechanisms and intrusion detection systems (IDS).
[0102] It should be noted that the front-end data encryption module aims to protect the security of user data before it is transmitted to the front end. The overall encryption process is as follows: a) Key generation: The server generates a random key, which is then securely transmitted to the client using RSA encryption. b) Data encryption: Before submission, user-input data is encrypted using the AES-256 algorithm. c) Decryption: After receiving the encrypted data, the server decrypts it using the private key stored on the server, and then performs subsequent processing.
[0103] 3) Data transmission module: including front-end encryption, HTTPS transmission protocol and HSTS protocol integration.
[0104] 4) Authentication module: Dynamic multi-factor authentication system, used to identify high-risk operations and trigger additional authentication steps.
[0105] It should be noted that the dynamic multi-factor authentication system automatically adjusts the verification steps based on the risk level of the user's actions. The specific implementation steps are as follows:
[0106] a) Risk assessment: Assess the risks of user operations, such as high-risk operations like abnormal logins and fund transfers.
[0107] b) Verification Strategy Generation: Generate a multi-factor verification strategy adapted to the current risk level based on the assessment results. Low-risk operations only require a password, while high-risk operations require additional verification steps, such as SMS verification codes or biometric identification.
[0108] c) Verification execution: The system executes the corresponding verification steps according to the generated strategy, and allows the user to proceed to the next step after passing the verification.
[0109] Optionally, this application utilizes a deep neural network model to learn from historical user behavior data to predict the probability of risk in future operations. This approach can capture more complex behavioral patterns and has higher accuracy than traditional statistical models. The steps are as follows: a) Feature extraction: First, features are extracted from massive historical operation records, including but not limited to operation frequency, amount, and rate of change of login IP address. b) Model training: A deep learning model is trained using a labeled dataset. Common models include convolutional neural networks (CNN), recurrent neural networks (RNN), or long short-term memory (LSTM) networks. c) Risk scoring: For each user operation, the model outputs a risk score; the higher the score, the more suspicious the operation.
[0110] 5) Automated Content Security Policy Module: Used to automatically configure and manage Content Security Policy (CSP) to prevent cross-site scripting (XSS) and other injection attacks.
[0111] It's important to note that this module is responsible for automatically configuring and managing Content Security Policies (CSP) to prevent cross-site scripting (XSS) and data injection attacks. Unlike traditional one-size-fits-all CSP policies, this automated configuration module can customize CSP policies based on application characteristics and usage scenarios, ensuring that legitimate access is neither overly restricted nor potential threats are tolerated. The automated configuration module incorporates intelligent algorithms that can learn and identify normal user activity and potential malicious behavior, thereby intelligently determining when to loosen or tighten CSP policies for more granular security control. The specific implementation steps are as follows:
[0112] a) Policy Template Library: The system has multiple pre-set security policy templates, covering CSP configurations for different scenarios.
[0113] b) Automated configuration: Based on the prediction results of the machine learning model, the system automatically selects the appropriate CSP template for configuration according to different application scenarios and the current system status, and dynamically adjusts the strategy to deal with new security threats.
[0114] c) Security monitoring: Real-time monitoring of content loading and policy execution. If a potential threat or policy conflict is detected, the system will automatically adjust the CSP configuration or prompt the administrator to intervene.
[0115] It should be noted that, Figure 4 The diagram illustrates the front-end data encryption process, which includes: 1) User inputs data; 2) The system calls the encryption algorithm to encrypt the data; 3) The encrypted data is transmitted to the server via HTTPS; 4) The server decrypts the data and performs subsequent processing.
[0116] It should be noted that the dynamic multi-factor verification process of this application is as follows: 1) The user attempts to perform a sensitive operation; 2) The system conducts a risk assessment; 3) A verification strategy is generated based on the risk level; 4) The verification steps are executed. If the operation passes, it is allowed; otherwise, it is rejected or re-verification is required.
[0117] It should be noted that this application has the following application scenarios:
[0118] Online banking transactions: Protect user data security when conducting transactions on the bank's official website or mobile application, and prevent the leakage of sensitive information.
[0119] Account Management: When users manage their account information, a multi-layered protection mechanism is used to ensure account security and prevent hijacking by attackers.
[0120] Funds transfer: When conducting large-scale fund transfers or other high-risk operations, the system will enhance security through a dynamic multi-factor verification mechanism.
[0121] It should be noted that this application has the following technical effects:
[0122] 1) Front-end data encryption and multi-layered security protection: A data encryption mechanism is introduced into the front-end system, especially during user data input, using encryption algorithms such as AES-256. This innovation achieves end-to-end protection of data from input to transmission, enhancing the overall security of the system and ensuring that even if the front-end system is attacked, user data cannot be easily decrypted.
[0123] 2) Automated Content Security Policy (CSP) Configuration: The automated content security policy (CSP) configuration module reduces the possibility of manual configuration errors and can dynamically adjust policies to cope with ever-changing security threats, effectively preventing cross-site scripting (XSS) and data injection attacks, and improving the overall security protection level of the front end.
[0124] 3) Multi-layered application of strict transport security protocols: In addition to traditional HTTPS encryption, strict transport security protocols (HSTS) are introduced into the front-end security to ensure that all communication is conducted through encrypted channels. Furthermore, front-end encryption mechanisms before data transmission further enhance security during the transmission process.
[0125] Through the above description of the embodiments, those skilled in the art can clearly understand that the data transmission method according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the data transmission method described in the various embodiments of this application.
[0126] This embodiment also provides a data transmission device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the data transmission device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0127] Figure 5 This is a structural block diagram of a data transmission apparatus according to an embodiment of this application, such as... Figure 5 As shown, the data transmission device 50 includes:
[0128] The determination module 502 is used to determine the target key and the target encryption algorithm based on the current environment information of the front-end page when the target data is obtained through the target component of the front-end page.
[0129] The encryption module 504 is used to encrypt the target data using the target encryption algorithm and the target key to obtain encrypted data.
[0130] The transmission module 506 is used to transmit the encrypted data to the server based on the communication connection with the server when a submission request is obtained through the submission component of the front-end page. The submission request is used to instruct the submission of the target data to the server, and the transmission protocol used by the communication connection is Hypertext Transfer Security Protocol.
[0131] The aforementioned data transmission device 50, when the target component of the front-end page captures the target data input by the user, determines the target key and target encryption algorithm based on the current environment information of the front-end page, and encrypts the target data using the target encryption algorithm and the target key to form encrypted data. This effectively shields the plaintext form of the data in the front-end environment. Even if the front-end is attacked (such as XSS or CSRF), attackers will find it difficult to directly obtain unencrypted sensitive information. Subsequently, the encrypted data is transmitted to the server via the submission component of the front-end page using the HTTPS protocol. HTTPS, as a secure transmission protocol, uses SSL / TLS to provide an additional encryption layer for data transmission, ensuring that the data is not eavesdropped on or tampered with by third parties during transmission. This application, based on the dual protection of front-end data encryption and HTTPS transmission encryption, constructs an end-to-end encrypted channel from front-end capture to server reception, significantly reducing the security risks of data at the front-end stage, effectively resisting man-in-the-middle attacks and other network threats, thereby ensuring high security of front-end data.
[0132] In an exemplary embodiment, the determining module 502 is further configured to determine a first security score, a second security score, a third security score, and a fourth security score corresponding to browser information, operating system information, network environment information, and device type, respectively, wherein the environment information includes: browser information, operating system information, network environment information, and device type; determine a target security score corresponding to the environment information based on the first security score, the second security score, the third security score, and the fourth security score; and determine the corresponding target key and encryption algorithm based on the target security level at which the target security score is located, wherein the higher the security level, the longer the length of the target key corresponding to the security level, and the higher the time complexity of the corresponding encryption algorithm.
[0133] In an exemplary embodiment, the determining module 502 is further configured to calculate the target security score using the following formula: Target = Base + Gate · Curvature; Base = P1 · u · v + P2 · u · (– v) + P3 · (- u) · v + P4 · (- u) · (- v); Curvature = tanh[(P1 + P2 - P3 - P4) / q]; Gate = σ(P4); u = P4 / q; v = (P2 + P3 - P1 - P4 + q) / (q + q); where Target is the target security score, P1 is the first security score, P2 is the second security score, P3 is the third security score, P4 is the fourth security score, q is a preset constant, and σ is the Sigmoid activation function.
[0134] In an exemplary embodiment, the device further includes a processing module, configured to, when the front-end page detects that a target object is performing a target operation, acquire operation-related information of the target operation. A risk score is determined based on the operation-related information using a risk assessment model, wherein the risk score reflects the operation risk of the target operation and is positively correlated with the operation risk. A verification method for the target object to perform the target operation is determined based on the risk score, wherein the verification method includes at least one of the following: password verification, facial recognition verification, fingerprint verification, SMS verification, USB key verification, and video verification.
[0135] In an exemplary embodiment, the processing module is further configured to preprocess the operation-related information through the preprocessing layer of the risk assessment model to obtain a preprocessed feature vector; process the preprocessed feature vector through the encoder layer of the risk assessment model to obtain a first feature vector, wherein the encoder layer includes a multi-head attention mechanism and a feedforward neural network; aggregate the first feature vector through the pooling layer of the risk assessment model to obtain a second feature vector; and process the second feature vector through the fully connected layer of the risk assessment model to obtain the risk score.
[0136] In an exemplary embodiment, the processing module is further configured to, after determining the verification method for the target object to perform the target operation based on the risk score, increase the risk score based on the erroneous verification information, the number of verification failures, and the operating environment information at the time of failure, if it is determined that the obtained verification information is incorrect and the target object performs verification again. The updated risk score is then used to determine the verification method for the target object to perform the target operation again.
[0137] In an exemplary embodiment, the processing module is further configured to determine operation-related information of the target object on the front-end page, wherein the operation-related information includes operation type, operation time, operation amount, account attributes, and operation context information; determine the current scenario of the front-end page based on the environment information and the operation-related information through the scenario evaluation module, wherein the environment information includes browser information, operating system information, network environment information, and device type; and determine the content security policy of the front-end page based on the current scenario of the front-end page.
[0138] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0139] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described data transmission method embodiments when it is run.
[0140] Optionally, in this embodiment, the storage medium can be configured to store program code for performing the following steps S1-S3:
[0141] Step S1: If the target data is obtained through the target component of the front-end page, determine the target key and target encryption algorithm based on the current environment information of the front-end page.
[0142] Step S2: Using the target encryption algorithm, encrypt the target data according to the target key to obtain the encrypted data.
[0143] Step S3: If a submission request is obtained through the submission component of the front-end page, the encrypted data is transmitted to the server based on the communication connection with the server. The submission request is used to instruct the submission of the target data to the server, and the transmission protocol used by the communication connection is Hypertext Transfer Security Protocol.
[0144] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0145] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described data transmission method embodiments.
[0146] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0147] Optionally, in this embodiment, the processor can be configured to perform the following steps S1-S3 via a computer program:
[0148] Step S1: If the target data is obtained through the target component of the front-end page, determine the target key and target encryption algorithm based on the current environment information of the front-end page.
[0149] Step S2: Using the target encryption algorithm, encrypt the target data according to the target key to obtain the encrypted data.
[0150] Step S3: If a submission request is obtained through the submission component of the front-end page, the encrypted data is transmitted to the server based on the communication connection with the server. The submission request is used to instruct the submission of the target data to the server, and the transmission protocol used by the communication connection is Hypertext Transfer Security Protocol.
[0151] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described data transmission method embodiments.
[0152] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above-described data transmission method embodiments.
[0153] Embodiments of this application also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above-described data transmission method embodiments.
[0154] Optionally, in this embodiment, the processor can be configured to perform the following steps S1-S3 via a computer program:
[0155] Step S1: If the target data is obtained through the target component of the front-end page, determine the target key and target encryption algorithm based on the current environment information of the front-end page.
[0156] Step S2: Using the target encryption algorithm, encrypt the target data according to the target key to obtain the encrypted data.
[0157] Step S3: If a submission request is obtained through the submission component of the front-end page, the encrypted data is transmitted to the server based on the communication connection with the server. The submission request is used to instruct the submission of the target data to the server, and the transmission protocol used by the communication connection is Hypertext Transfer Security Protocol.
[0158] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0159] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0160] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A data transmission method, characterized in that, include: When the target data is obtained through the target component of the front-end page, the target key and target encryption algorithm are determined based on the current environment information of the front-end page. Using the target encryption algorithm, the target data is encrypted according to the target key to obtain encrypted data; When a submission request is obtained through the submission component of the front-end page, the encrypted data is transmitted to the server based on the communication connection with the server. The submission request is used to instruct the submission of the target data to the server, and the transmission protocol used by the communication connection is Hypertext Transfer Security Protocol.
2. The data transmission method according to claim 1, characterized in that, The target key and target encryption algorithm are determined based on the current environment information of the front-end page, including: The browser information, operating system information, network environment information, and device type are respectively determined to obtain a first security score, a second security score, a third security score, and a fourth security score, wherein the environment information includes: browser information, operating system information, network environment information, and device type; The target safety score corresponding to the environmental information is determined based on the first safety score, the second safety score, the third safety score, and the fourth safety score. The target key and encryption algorithm are determined based on the target security level of the target security score. The higher the security level, the longer the target key and the higher the time complexity of the corresponding encryption algorithm.
3. The data transmission method according to claim 2, characterized in that, Determining the target security score corresponding to the environmental information based on the first security score, the second security score, the third security score, and the fourth security score includes: The target security score is calculated using the following formula: Target=Base+Gate·Curvature; Base=P1·u·v+P2·u·(–v)+P3·(-u)·v+P4·(-u)·(-v); Curvature=tanh[(P1+P2-P3-P4) / q];Gate=σ(P4); u=P4 / q; v=(P2+P3-P1-P4+q) / (q+q); Wherein, Target is the target security score, P1 is the first security score, P2 is the second security score, P3 is the third security score, P4 is the fourth security score, q is a preset constant, and σ is the Sigmoid activation function.
4. The data transmission method according to claim 1, characterized in that, The data transmission method further includes: When the front-end page detects that the target object is performing a target operation, the operation-related information of the target operation is obtained; A risk score is determined based on the operation-related information using a risk assessment model, wherein the risk score reflects the operational risk of the target operation and is positively correlated with the operational risk. The verification method for the target object to perform the target operation is determined based on the risk score, wherein the verification method includes at least one of the following: password verification, face verification, fingerprint verification, SMS verification, USB key, and video verification.
5. The data transmission method according to claim 4, characterized in that, A risk score is determined based on the operational information using a risk assessment model, including: The operation-related information is preprocessed through the preprocessing layer of the risk assessment model to obtain a preprocessed feature vector. The preprocessed feature vector is processed by the encoder layer of the risk assessment model to obtain a first feature vector, wherein the encoder layer includes a multi-head attention mechanism and a feedforward neural network. The first feature vector is aggregated through the pooling layer of the risk assessment model to obtain the second feature vector; The risk score is obtained by processing the second feature vector through the fully connected layer of the risk assessment model.
6. The data transmission method according to claim 4, characterized in that, After determining the verification method for the target object to perform the target operation based on the risk score, the data transmission method further includes: If the obtained verification information is determined to be incorrect and the target object is verified again, the risk score is increased based on the incorrect verification information, the number of verification failures, and the operating environment information at the time of failure. The verification method for the target object to perform the target operation is determined again based on the updated risk score.
7. The data transmission method according to claim 1, characterized in that, The data transmission method further includes: Determine the operation-related information of the target object on the front-end page, wherein the operation-related information includes operation type, operation time, operation amount, account attributes and operation context information; The scene evaluation module determines the current scene of the front-end page based on the environmental information and the operation-related information. The environmental information includes: browser information, operating system information, network environment information, and device type. The content security policy of the front-end page is determined based on the current scenario of the front-end page.
8. A data transmission device, characterized in that, include: The determination module is used to determine the target key and target encryption algorithm based on the current environment information of the front-end page when the target data is obtained through the target component of the front-end page. An encryption module is used to encrypt the target data using the target encryption algorithm and the target key to obtain encrypted data; The transmission module is used to transmit the encrypted data to the server based on the communication connection with the server when a submission request is obtained through the submission component of the front-end page. The submission request is used to instruct the submission of the target data to the server, and the transmission protocol used by the communication connection is Hypertext Transfer Security Protocol.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the data transmission method as described in any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the data transmission method as described in any one of claims 1 to 7 through the computer program.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the data transmission method as described in any one of claims 1 to 7.