Data transmission method and device, electronic equipment and storage medium
By establishing an encrypted communication channel on the mobile terminal to transmit data, data leakage and high cost problems during data transmission in public wireless networks are solved, and safe and efficient data transmission is achieved.
Patent Information
- Application Number
- CN202411753028.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-18
AI Technical Summary
Existing mobile terminals are prone to data leakage or high data network traffic costs during data transmission.
By determining that the wireless network connected to the mobile terminal belongs to the public network, an encrypted communication channel is established with the server based on the mobile data network connected to the mobile terminal itself, and the transmission data is encrypted according to the usage policy of the encrypted communication channel, and then the confidential data is obtained and transmitted through the encrypted communication channel is transmitted.
When connecting to a public wireless network, confidential data is transmitted through encrypted communication channels established by the mobile data network, avoiding data leakage and reducing the cost of data network traffic.
Smart Images

Figure CN119854779A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automobile technology, and in particular to a data transmission method, device, electronic equipment and storage medium. Background Art
[0002] With the popularization of mobile Internet, the scenarios in which people use electronic devices for Internet data transmission are also increasing. There are usually two ways to transmit data, one is to transmit through wireless network (Wireless Fidelity, WiFi), and the other is to transmit through the data network of mobile devices. The difference between the two is that the data network needs to consume the data traffic of the mobile device itself, while the wireless network does not need to consume the data traffic of the mobile device itself. With the increasingly perfect configuration of wireless networks, wireless networks are usually set up in public places such as shopping malls, railway stations, airports, etc., making public WiFi a common way to surf the Internet in people's daily lives. However, the security of the public WiFi environment is difficult to be effectively guaranteed. When user data is transmitted through the public WiFi network, it is very easy to be stolen or tampered with at the public WiFi routing node, especially data related to sensitive information such as personal privacy and commercial secrets; if the user disables the public WiFi and uses the mobile terminal's own data network to transmit data, although this method will avoid the leakage of public WiFi data, it will greatly increase the cost of the user's use of data network traffic. It can be seen that there are problems of data leakage or high data network traffic cost when the existing mobile terminal performs data transmission. Summary of the invention
[0003] The present application provides a data transmission method, device, electronic device and storage medium to solve the problem of data leakage or high data network traffic cost when performing data transmission on existing mobile terminals.
[0004] In a first aspect, the present application provides a data transmission method, comprising:
[0005] Determine the wireless network to which the mobile terminal is connected;
[0006] In the case where the wireless network belongs to a public network, establishing an encrypted communication channel with a server based on the mobile data network to which the mobile terminal itself is connected;
[0007] Based on the usage policy of the encrypted communication channel, encrypt the data to be transmitted of the mobile terminal to obtain confidential data corresponding to the data to be transmitted;
[0008] The confidential data is transmitted to the server through the encrypted communication channel.
[0009] Optionally, establishing an encrypted communication channel with a server based on a mobile data network to which the mobile terminal itself is connected includes:
[0010] Based on the mobile data network, obtaining identity authentication information corresponding to the mobile terminal and certificate information corresponding to the server;
[0011] Perform two-way authentication based on the identity authentication information and the certificate information to obtain an authentication result;
[0012] When the authentication result is a passed authentication result, the encrypted communication channel is established.
[0013] Optionally, encrypting the data to be transmitted of the mobile terminal based on the usage policy of the encrypted communication channel to obtain confidential data corresponding to the data to be transmitted includes:
[0014] Acquire the data to be transmitted;
[0015] Determine the data type of the data to be transmitted;
[0016] In the case that the data type belongs to the confidential data type preset in the usage policy, the data to be transmitted is encrypted according to the encryption algorithm preset in the usage policy to obtain the confidential data.
[0017] Optionally, after determining the data type of the data to be transmitted, the method further includes:
[0018] In the case where the data type does not belong to the confidential data type preset in the usage policy, determining a routing node corresponding to the wireless network;
[0019] The data to be transmitted is transmitted to the server through the routing node.
[0020] Optionally, encrypting the data to be transmitted according to an encryption algorithm preset in the usage policy to obtain the confidential data includes:
[0021] Based on the encryption algorithm, obtaining a data source identifier corresponding to the data to be transmitted;
[0022] Determining the confidentiality level of the data to be transmitted according to the data source identifier;
[0023] Obtaining a target confidentiality level range corresponding to the mobile terminal, and determining whether the confidentiality level falls within the target confidentiality level range;
[0024] When the confidentiality level is within the target confidentiality level range, the data to be transmitted is encrypted to obtain the confidential data.
[0025] Optionally, the obtaining a target confidentiality level range corresponding to the mobile terminal includes:
[0026] Acquiring user configuration information of the mobile terminal;
[0027] In a case where the user configuration information includes a preset confidentiality level range, extracting the preset confidentiality level range from the user configuration information;
[0028] The preset confidentiality level range is determined as the target confidentiality level range.
[0029] Optionally, after acquiring the user configuration information of the mobile terminal, the method further includes:
[0030] In a case where the user configuration information does not include the preset confidentiality level range, obtaining network status information corresponding to the mobile data network;
[0031] Based on the network status information, the target confidentiality level range is determined.
[0032] Optionally, determining the target confidentiality level range based on the network status information includes:
[0033] Extracting signal strength information and data flow information from the network status information;
[0034] The target confidentiality level range is determined using the signal strength information and the data flow information.
[0035] Optionally, after determining the wireless network to which the mobile terminal is connected, the method further includes:
[0036] Acquire wireless network characteristic information corresponding to the wireless network;
[0037] Determine whether the wireless network belongs to the public network according to the wireless network characteristic information.
[0038] In a second aspect, the present application provides a data transmission device, characterized in that it includes:
[0039] A determination module, used to determine a wireless network to which the mobile terminal is connected;
[0040] A channel establishment module, used for establishing an encrypted communication channel with a server based on a mobile data network connected to the mobile terminal itself when the wireless network belongs to a public network;
[0041] An encryption module, used to encrypt the data to be transmitted of the mobile terminal based on the usage policy of the encrypted communication channel to obtain confidential data corresponding to the data to be transmitted;
[0042] A transmission module is used to transmit the confidential data to the server through the encrypted communication channel.
[0043] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0044] Memory, used to store computer programs;
[0045] The processor is used to implement the data transmission method described in any one of the first aspects when executing the program stored in the memory.
[0046] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the data transmission method as described in any one of the first aspects is implemented.
[0047] The embodiment of the present application determines the wireless network connected to the mobile terminal, and when the wireless network belongs to a public network, establishes an encrypted communication channel with the server based on the mobile data network connected to the mobile terminal itself, and encrypts the data to be transmitted of the mobile terminal based on the usage policy of the encrypted communication channel, obtains the confidential data corresponding to the data to be transmitted, and then transmits the confidential data to the server through the encrypted communication channel; thereby, when connecting to a public wireless network, the confidential data can be transmitted through the encrypted communication channel established by the mobile data network, which solves the problem of data leakage or high data network traffic cost when the existing mobile terminal performs data transmission, and can reduce the usage cost of data network traffic while avoiding data leakage. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A flowchart of a data transmission method provided in an embodiment of the present application;
[0049] Figure 2 Another schematic diagram of a data transmission method provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0053] At present, mobile terminals use two methods for data transmission, namely, WiFi network transmission and the mobile terminal's own data network transmission. In specific application scenarios, when performing data transmission, the mobile terminal can only choose one of the two methods, WiFi network transmission and the mobile terminal's own data network transmission, to perform the transmission alone. At this time, if WiFi network transmission is selected, and the current WiFi network is a public network, there will be a problem of easy data leakage. If the mobile terminal's own data network transmission is selected, more data traffic will be caused, and the data traffic needs to be purchased by the user, which will result in a high cost of use. That is, if the mobile terminal in the existing related technology uses a WiFi network to transmit data, there will be a problem of easy data leakage, and if data network transmission is selected, there will be a problem of high cost of use.
[0054] In order to solve the problem of easy data leakage if the mobile terminal in the existing related technology adopts the WiFi network to transmit data, and the problem of high usage cost if the data network transmission is selected, the present application provides a data transmission method, device, electronic device and storage medium, by determining the wireless network connected to the mobile terminal, when the wireless network belongs to a public network, based on the mobile data network connected to the mobile terminal itself, an encrypted communication channel is established with the server, and based on the use strategy of the encrypted communication channel, the data to be transmitted of the mobile terminal is encrypted to obtain the confidential data corresponding to the data to be transmitted, and then the confidential data is transmitted to the server through the encrypted communication channel; therefore, when connecting to a public wireless network, the confidential data can be transmitted using the encrypted communication channel established by the mobile data network, which solves the problem of data leakage or high data network traffic cost when the existing mobile terminal performs data transmission, and while avoiding data leakage, the use cost of data network traffic can also be reduced.
[0055] Figure 1A flow chart of a data transmission method provided for an embodiment of the present application. The method can be applied to one or more electronic devices such as a mobile terminal, a client, and a server. In addition, the execution subject of the method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned electronic devices. For example, a single electronic device can execute the method, or a plurality of electronic devices can cooperate with each other to execute the method. When the above-mentioned execution subject is software, the method can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0056] like Figure 1 As shown, a data transmission method provided in an embodiment of the present application may specifically include the following steps:
[0057] Step S110: Determine the wireless network to which the mobile terminal is connected.
[0058] The mobile terminal may be a mobile device with mobile data network capabilities and wireless network capabilities, such as a mobile phone, a tablet, etc., and the wireless network to which the mobile terminal is connected may be a WiFi network or a wireless local area network, etc.
[0059] Specifically, the specific method for determining the wireless network connected to the mobile terminal may be to obtain the network connection configuration information of the mobile terminal, and extract the wireless network connection status from the network connection configuration information, wherein the wireless network connection status indicates whether the mobile terminal is currently connected to the wireless network, and the wireless network connection status may be connected to the wireless network or not connected to the wireless network, and when the wireless network connection status is connected to the wireless network, the wireless network connected to the mobile terminal is determined. Of course, the above is only an example for illustration, and adaptive adjustments may be made during specific implementation, and this embodiment does not specifically limit this.
[0060] Step S120: In the case where the wireless network belongs to a public network, an encrypted communication channel is established with the server based on the mobile data network to which the mobile terminal itself is connected.
[0061] Specifically, after determining the wireless network to which the mobile terminal is connected, it can be determined whether the wireless network belongs to a public network. A public network can refer to a public wireless network or a wireless network that can be connected and used without identity authentication or password, etc. If the wireless network to which the mobile terminal is connected belongs to a public network, it means that the wireless network can be connected arbitrarily, that is, its data transmission security is low and data leakage is prone to occur. At this time, an encrypted communication channel can be established with the server based on the mobile data network to which the mobile terminal itself is connected, wherein the mobile data network means that the mobile terminal itself has a data network corresponding to the mobile network operator, such as the China Unicom data network, the China Telecom data network, etc., and the server can represent the network operation server corresponding to the mobile data network, and the encrypted communication channel is the encrypted channel between the mobile terminal and the server. In addition, if the wireless network does not belong to a public network, it means that the wireless network has a certain degree of security, and at this time the wireless network can be used for data transmission without the need to perform subsequent steps.
[0062] Step S130: Encrypt the data to be transmitted of the mobile terminal based on the usage policy of the encrypted communication channel to obtain confidential data corresponding to the data to be transmitted;
[0063] Specifically, after establishing an encrypted communication channel between the mobile terminal and the server, the data to be transmitted of the mobile terminal can be encrypted based on the usage policy of the encrypted communication channel to obtain confidential data corresponding to the data to be transmitted, wherein the usage policy of the encrypted communication channel can indicate the specific data transmission strategy of the encrypted communication channel, such as limiting the data type of data transmitted by the encrypted communication channel, limiting the usage time of data transmitted by the encrypted communication channel, or limiting the transmission conditions of data transmitted by the encrypted communication channel, etc. That is, after the mobile terminal determines the data to be transmitted, it can determine whether the data to be transmitted complies with the usage policy of the encrypted communication channel. If it does not comply with the usage policy of the encrypted communication channel, it can be transmitted using a wireless network. If the data to be transmitted complies with the usage policy of the encrypted communication channel, it can be encrypted to obtain confidential data corresponding to the data to be transmitted. The specific encryption method can use a pre-configured encryption algorithm or encryption model to encrypt the data to be transmitted, and this embodiment does not make specific limitations on this. The confidential data can represent the data obtained after the encryption of the data to be transmitted is completed.
[0064] Step S140: Transmit confidential data to the server via an encrypted communication channel.
[0065] Specifically, after obtaining the confidential data, the confidential data can be transmitted to the server through an encrypted communication channel, thereby encrypting the data to be transmitted that complies with the usage policy of the encrypted communication channel and then transmitting the obtained confidential data through the encrypted communication channel, thus avoiding the problem of data leakage caused by transmission through a wireless network belonging to a public network; and for other data to be transmitted that does not comply with the usage policy of the encrypted communication channel, the wireless network is used for transmission, which can avoid the leakage of confidential data while also transmitting other data through the wireless network, thus reducing the cost of using data network traffic.
[0066] It can be seen that this embodiment determines the wireless network connected to the mobile terminal. When the wireless network belongs to a public network, an encrypted communication channel is established with the server based on the mobile data network connected to the mobile terminal itself, and based on the usage policy of the encrypted communication channel, the data to be transmitted of the mobile terminal is encrypted to obtain confidential data corresponding to the data to be transmitted, and then the confidential data is transmitted to the server through the encrypted communication channel; thus, when connecting to a public wireless network, the confidential data can be transmitted using the encrypted communication channel established by the mobile data network, which solves the problem of data leakage or high data network traffic cost when the existing mobile terminal performs data transmission. While avoiding data leakage, the cost of using data network traffic can also be reduced.
[0067] In an optional embodiment of the present application, step S120 establishes an encrypted communication channel with the server based on the mobile data network to which the mobile terminal itself is connected, and may specifically include the following steps: based on the mobile data network, obtaining identity authentication information corresponding to the mobile terminal and certificate information corresponding to the server; performing two-way authentication based on the identity authentication information and the certificate information to obtain an authentication result; when the authentication result is a passed authentication result, establishing an encrypted communication channel.
[0068] In this embodiment, when it is determined that the wireless network belongs to a public network, the identity authentication information corresponding to the mobile terminal and the certificate information corresponding to the server can be obtained based on the mobile data network, wherein the identity authentication information can represent information that can authenticate the identity of the mobile terminal, such as International Mobile Equipment Identity (IMEI) information, Subscriber Identity Module (SIM) information, etc., and the certificate information can represent digital certificate information for identity authentication and encrypted communication by the server; then, bidirectional authentication can be performed based on the identity authentication information and the certificate information to obtain an authentication result, and the bidirectional authentication can represent the use of the identity authentication information to determine the identity authenticity of the mobile terminal, and the use of the certificate information to determine the identity authenticity of the server, thereby playing a role in bidirectionally authenticating the identity authenticity of the mobile terminal and the server, so that the authentication result can represent the result after bidirectional authentication of the mobile terminal and the server, that is, the authentication result can be an authentication failure result or an authentication success result, wherein the authentication failure result indicates that the identity authentication of either the mobile terminal or the server fails, and the authentication success result indicates that the identity authentication of both the mobile terminal and the server passes; then, if the authentication result is an authentication success result, an encrypted communication channel can be established between the mobile terminal and the server.
[0069] It can be seen that in the process of establishing an encrypted communication channel, this embodiment will first verify the identities of both the mobile terminal and the server, and only when the identity authentication of both parties is passed, will the encrypted communication channel between the mobile terminal and the server be established, thereby ensuring the legality and accuracy of the establishment of the encrypted communication channel.
[0070] like Figure 2 As shown, in an optional embodiment of the present application, step S130 encrypts the data to be transmitted of the mobile terminal based on the usage policy of the encrypted communication channel to obtain confidential data corresponding to the data to be transmitted, which may specifically include the following steps:
[0071] Step S131: Obtain data to be transmitted;
[0072] Step S132: Determine the data type of the data to be transmitted;
[0073] Step S133: When the data type belongs to the confidential data type preset in the usage policy, the data to be transmitted is encrypted according to the encryption algorithm preset in the usage policy to obtain confidential data.
[0074] After establishing an encrypted communication channel, this embodiment can obtain data to be transmitted, and the data to be transmitted can represent data that needs to be transmitted in the mobile terminal. Then, the data type of the data to be transmitted can be determined. The data to be transmitted can represent the specific type of the data to be transmitted, such as data source type, data attribute type, etc. Then, it can be determined whether the data type belongs to the confidential data type preset in the usage policy. The confidential data type can be a pre-configured data type that needs to be transmitted using an encrypted communication channel. That is, when the data type belongs to the confidential data type preset in the usage policy, it means that the current data to be transmitted belongs to the data type that needs to be transmitted using an encrypted communication channel. At this time, the data to be transmitted can be encrypted according to the encryption algorithm preset in the usage policy to obtain confidential data.
[0075] Specifically, the method for encrypting the data to be transmitted of the mobile terminal to obtain the confidential data corresponding to the data to be transmitted can be to use a pre-examined encryption algorithm for encryption, such as the Advanced Encryption Standard-256-bit (AES-256) algorithm. The specific encryption process is to use a secure random number generator to generate a 256-bit key, which will be used to encrypt and decrypt data, and convert the encrypted data to be transmitted into a format data suitable for encryption processing, such as a byte array. Then, the AES-256 encryption algorithm and the generated key can be used to encrypt the converted format data to obtain the confidential data. When the original data needs to be accessed, the recipient can use the same key and the AES-256 algorithm to decrypt the confidential data, thereby restoring the original data.
[0076] like Figure 2 As shown, in an optional embodiment of the present application, after determining the data type of the data to be transmitted, the following steps may be specifically included:
[0077] Step S134: when the data type does not belong to the confidential data type preset in the usage policy, determining a routing node corresponding to the wireless network;
[0078] Step S135: Transmit the data to be transmitted to the server through the routing node.
[0079] In this embodiment, after determining the data type of the data to be transmitted, if the data type does not belong to the confidential data type preset in the usage policy, that is, the data type is a non-confidential data type, it means that the current data to be transmitted does not belong to the data type that needs to be transmitted using an encrypted communication channel. At this time, the routing node corresponding to the wireless network can be determined. The routing node can refer to a node device responsible for forwarding data in the wireless network. The routing node plays a role in determining the path of the data from the source to the destination. Then, the data to be transmitted can be transmitted to the server through the routing node, thereby transmitting the data to be transmitted to the server through the wireless network.
[0080] Specifically, this embodiment classifies the data to be transmitted according to the data type of the data to be transmitted, encrypts the data to be transmitted that belongs to the confidential data type and then transmits it through an encrypted communication channel, while the data to be transmitted that does not belong to the confidential data type is transmitted through the routing nodes of the wireless network. Transmitting confidential data through the encrypted communication channel can improve the security of the data to be transmitted, and transmitting the data to be transmitted through the wireless network can reduce the cost of data transmission for users, which solves the problem of data leakage or high data network traffic cost when the existing mobile terminal performs data transmission. While avoiding data leakage, the cost of using data network traffic can also be reduced.
[0081] In an optional embodiment of the present application, the data to be transmitted is encrypted according to the encryption algorithm preset in the usage strategy to obtain confidential data, which may specifically include the following steps: based on the encryption algorithm, obtaining a data source identifier corresponding to the data to be transmitted; determining the confidentiality level corresponding to the data to be transmitted based on the data source identifier; obtaining the target confidentiality level range corresponding to the mobile terminal, and determining whether the confidentiality level falls within the target confidentiality level range; if the confidentiality level falls within the target confidentiality level range, encrypting the data to be transmitted to obtain confidential data.
[0082] In this embodiment, when it is determined that the data type belongs to the confidential data type preset in the usage policy, the data source identifier corresponding to the data to be transmitted can be obtained based on the encryption algorithm, and the data source identifier can represent an identifier used to mark the source of the data to be transmitted; then, the confidentiality level corresponding to the data to be transmitted can be determined based on the data source identifier, and the confidentiality level represents a level used to identify different confidentiality levels. The specific correspondence between the data to be transmitted and the confidentiality level can be pre-configured or analyzed in real time, and this embodiment does not make specific restrictions on this; then, the target confidentiality level range corresponding to the mobile terminal can be obtained, and it can be determined whether the confidentiality level belongs to the target confidentiality level range, wherein the target confidentiality level range represents the confidentiality level range corresponding to the current mobile terminal that needs to be transmitted through an encrypted communication channel, that is, when the confidentiality level does not belong to the target confidentiality level range, it means that the current data to be transmitted does not need to be transmitted through an encrypted communication channel. At this time, the data to be transmitted can be transmitted through a wireless network, and when the confidentiality level belongs to the target confidentiality level range, it means that the current data to be transmitted needs to be transmitted through an encrypted communication channel. At this time, the data to be transmitted can be encrypted to obtain confidential data, so as to perform the subsequent step of transmitting the confidential data to the server through the encrypted communication channel.
[0083] Specifically, this embodiment plays the role of judging whether it is necessary to transmit the data to be transmitted through an encrypted communication channel by judging whether the confidentiality level corresponding to the data to be transmitted falls within the target confidentiality level range. Therefore, under different states of the mobile terminal or different needs of the user, the target confidentiality level range can be adaptively adjusted, and the data to be transmitted of different confidentiality levels can be adjusted to be transmitted through the encrypted communication channel. That is, the effect of adaptively adjusting the amount of data to be transmitted through the encrypted communication channel and the wireless network is achieved through the target confidentiality level range, which can further avoid data leakage and reduce the cost of using data network traffic.
[0084] In one example, a data source identifier corresponding to the data to be transmitted is obtained based on an encryption algorithm, for example, a data source identifier A corresponding to the data A to be transmitted is obtained, the data source identifier A indicates that the data source of the data A to be transmitted is application X, and a data source identifier B corresponding to the data B to be transmitted is obtained, the data source identifier B indicates that the data source of the data B to be transmitted is application Y; then the confidentiality level corresponding to the data to be transmitted can be determined based on the data source identifier, such as based on a pre-configured correspondence between the data source identifier and the confidentiality level, determining that the confidentiality level corresponding to the data source identifier A is P1, that is, the confidentiality level corresponding to the data A to be transmitted is P1, and determining that the confidentiality level corresponding to the data source identifier B is P3, that is, the confidentiality level corresponding to the data B to be transmitted is P3; thereby obtaining the target confidentiality level range corresponding to the mobile terminal, if the target confidentiality level range is P0-P2, then it can be determined that the confidentiality level P1 of the data A to be transmitted is within the target confidentiality level range, and the data A to be transmitted can be encrypted to obtain confidential data, while the confidentiality level P3 of the data B to be transmitted does not fall within the target confidentiality level range, and the data B to be transmitted can be transmitted via a wireless network. Of course, the above is only an example to illustrate the effect. Adaptive adjustment can be made during specific implementation, and this embodiment does not make specific limitations on this.
[0085] In an optional embodiment of the present application, obtaining a target confidentiality level range corresponding to a mobile terminal may specifically include the following steps: obtaining user configuration information of the mobile terminal; when the user configuration information contains a preset confidentiality level range, extracting the preset confidentiality level range from the user configuration information; and determining the preset confidentiality level range as the target confidentiality level range.
[0086] In the process of obtaining the target confidentiality level range corresponding to the mobile terminal, the present embodiment can first obtain the user configuration information of the mobile terminal, and the user configuration information can represent the information used to pre-configure the confidentiality level range; then it can be determined whether the user configuration information contains a preset confidentiality level range. When the user configuration information contains the preset confidentiality level range, it means that the user has pre-configured the confidentiality level range, and the preset confidentiality level range represents the confidentiality level range pre-configured by the user. At this time, the preset confidentiality level range can be extracted from the user configuration information, and the preset confidentiality level range is determined as the target confidentiality level range.
[0087] Specifically, in this embodiment, the user can pre-configure a preset confidentiality level range to generate user configuration information, so that the user can select different confidentiality level ranges for encrypted communication channel transmission according to needs, which can effectively improve the flexibility of encrypted communication channel transmission.
[0088] In an optional embodiment of the present application, after obtaining the user configuration information of the mobile terminal, the following steps may be specifically included: when the user configuration information does not contain a preset confidentiality level range, obtaining network status information corresponding to the mobile data network; and determining a target confidentiality level range based on the network status information.
[0089] After obtaining the user configuration information of the mobile terminal, this embodiment determines that the user configuration information does not contain a preset confidentiality level range. At this time, the network status information corresponding to the mobile data network can be obtained. The network status information represents the status information of the mobile data network corresponding to the current mobile device, such as signal strength, traffic usage and other information. Therefore, based on the network status information, the target confidentiality level range can be determined. The specific determination method can be to determine the confidentiality level range corresponding to the network status information as the target confidentiality level range through the correspondence between the pre-configured network status information and the confidentiality level range. Other determination methods can also be used. This embodiment does not make specific limitations on this.
[0090] In this embodiment, network status information can be used to determine different target confidentiality level ranges based on different network status information of the mobile device in different states, so that the target confidentiality level range can match the current network status information of the mobile device. For example, when the network status information of the mobile device is poor, a higher level and smaller range of target confidentiality level range can be determined to reduce the proportion of data transmitted through the encrypted communication channel, thereby avoiding the problem of high delay and low efficiency caused by the need to transmit a large amount of data through the encrypted communication channel when the network status information is poor. Conversely, when the network status information of the mobile device is good, a lower level and larger range of target confidentiality level range can be determined to increase the proportion of data transmitted through the encrypted communication channel, thereby avoiding the problem of data leakage caused by the transmission of a large amount of data through the wireless network.
[0091] In an optional embodiment of the present application, determining the target confidentiality level range may specifically include the following steps: extracting signal strength information and data flow information from network status information; and using the signal strength information and data flow information to determine the target confidentiality level range.
[0092] In the process of determining the target confidentiality level range based on the network status information, the present embodiment can extract signal strength information and data flow information from the network status information. The signal strength information can indicate the strength of the mobile data network signal to which the current mobile device itself is connected, and the data flow information can indicate the remaining flow of the mobile data network to which the current mobile device itself is connected. The signal strength information and the data flow information can then be used to determine the target confidentiality level range. The specific determination method can be to determine the signal strength interval to which the signal strength information belongs, and to determine the flow interval to which the data flow information belongs, and determine the confidentiality level range corresponding to the signal strength interval and the flow interval as the target confidentiality level range according to the pre-configured correspondence.
[0093] In one example, the signal strength information is extracted from the network status information as signal strength C and the data flow information is flow D. The signal strength interval corresponding to the signal strength C is the signal strength interval N, and the flow interval corresponding to the flow D is the flow strength interval M. According to the pre-configured correspondence, the confidentiality level range corresponding to the signal strength interval N and the flow interval M is determined as P0-P2. At this time, the confidentiality level range P0-P2 can be determined as the target confidentiality level range. Of course, the above is only an example for illustration, and adaptive adjustments can be made during specific implementation, and this embodiment does not make specific limitations on this.
[0094] In an optional embodiment of the present application, after determining the wireless network to which the mobile terminal is connected, the following steps may be specifically included: obtaining wireless network characteristic information corresponding to the wireless network; and determining whether the wireless network belongs to a public network based on the wireless network characteristic information.
[0095] In this embodiment, after determining the wireless network to which the mobile terminal is connected, wireless network characteristic information corresponding to the wireless network can be obtained. The wireless network characteristic information can be used to represent the attribute characteristics of the current wireless network. For example, the wireless network characteristic information can include a public feature for indicating whether the wireless network is public, a password feature for indicating whether the wireless network requires a password connection, a verification feature for indicating whether the wireless network requires a verified connection, etc.; then, based on the wireless network characteristic information, it can be determined whether the wireless network belongs to a public network.
[0096] Specifically, the process of determining whether a wireless network belongs to a public network based on wireless network feature information can be to extract public features, password features and verification features from the wireless network feature information, and determine whether the public feature is a network public feature, determine whether the password feature is a feature without a password set, and determine whether the verification feature is a feature without a verification set, and only determine that the wireless network belongs to a public network when the public feature is a network public feature, the password feature is a feature without a password set, and the verification feature is a feature without a verification set, and determine that the wireless network does not belong to a public network when the public feature is not a network public feature, the password feature is not a feature without a password set, or the verification feature is not a feature without a verification set. Of course, the above is only an example for illustration, and adaptive adjustment can be made during specific implementation. This embodiment does not make specific limitations on this.
[0097] like Figure 3 As shown, the present application also discloses an embodiment, providing a data transmission device, including:
[0098] A determination module 310, configured to determine a wireless network to which the mobile terminal is connected;
[0099] A channel establishment module 320 is used to establish an encrypted communication channel with a server based on a mobile data network to which the mobile terminal itself is connected when the wireless network belongs to a public network;
[0100] The encryption module 330 is used to encrypt the data to be transmitted of the mobile terminal based on the use policy of the encrypted communication channel to obtain confidential data corresponding to the data to be transmitted;
[0101] The transmission module 340 is used to transmit the confidential data to the server through the encrypted communication channel.
[0102] In an optional embodiment of the present application, the channel establishment module 320 may include:
[0103] A first acquisition unit, configured to acquire identity authentication information corresponding to the mobile terminal and certificate information corresponding to the server based on the mobile data network;
[0104] A two-way authentication unit, used to perform two-way authentication based on the identity authentication information and the certificate information to obtain an authentication result;
[0105] A channel establishing unit is used to establish the encrypted communication channel when the authentication result is a passed authentication result.
[0106] In an optional embodiment of the present application, the encryption module 330 may include:
[0107] A second acquiring unit, used to acquire the data to be transmitted;
[0108] A first determining unit, configured to determine a data type of the data to be transmitted;
[0109] The encryption unit is used to encrypt the data to be transmitted according to the encryption algorithm preset in the usage policy to obtain the confidential data when the data type belongs to the confidential data type preset in the usage policy.
[0110] In an optional embodiment of the present application, the encryption module 330 may further include:
[0111] A second determining unit, configured to determine a routing node corresponding to the wireless network when the data type does not belong to a confidential data type preset in the usage policy;
[0112] The first transmission unit is used to transmit the data to be transmitted to the server through the routing node.
[0113] In an optional embodiment of the present application, the encryption unit includes:
[0114] A first acquisition subunit, configured to acquire a data source identifier corresponding to the data to be transmitted based on the encryption algorithm;
[0115] A first determining subunit, configured to determine a confidentiality level corresponding to the data to be transmitted according to the data source identifier;
[0116] A second determining subunit is used to obtain a target confidentiality level range corresponding to the mobile terminal, and determine whether the confidentiality level falls within the target confidentiality level range;
[0117] The encryption subunit is used to encrypt the data to be transmitted to obtain the confidential data when the confidentiality level falls within the target confidentiality level range.
[0118] In an optional embodiment of the present application, the second determining subunit may include:
[0119] A second acquisition subunit, used to acquire user configuration information of the mobile terminal;
[0120] an extraction subunit, configured to extract the preset confidentiality level range from the user configuration information when the user configuration information includes the preset confidentiality level range;
[0121] The third determining subunit is configured to determine the preset confidentiality level range as the target confidentiality level range.
[0122] In an optional embodiment of the present application, the second determining subunit may further include:
[0123] A third acquisition subunit is used to obtain network status information corresponding to the mobile data network when the user configuration information does not contain the preset confidentiality level range;
[0124] The fourth determining subunit is used to determine the target confidentiality level range based on the network status information.
[0125] In an optional embodiment of the present application, the fourth determining subunit may include:
[0126] An extraction subunit, used to extract signal strength information and data flow information from the network status information;
[0127] The fifth determining subunit is used to determine the target confidentiality level range by using the signal strength information and the data flow information.
[0128] In an optional embodiment of the present application, the data transmission device may further include:
[0129] An acquisition module, used to acquire wireless network characteristic information corresponding to the wireless network;
[0130] The public network determination module is used to determine whether the wireless network belongs to the public network according to the wireless network characteristic information.
[0131] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0132] like Figure 3 As shown, an embodiment of the present application provides an electronic device, including a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340.
[0133] Memory 330, for storing computer programs;
[0134] In one embodiment of the present application, the processor 310, when executing the program stored in the memory 330, implements the data transmission method provided by any of the aforementioned method embodiments, by determining the wireless network to which the mobile terminal is connected, and when the wireless network belongs to a public network, an encrypted communication channel is established with the server based on the mobile data network to which the mobile terminal itself is connected, and based on the usage policy of the encrypted communication channel, the data to be transmitted of the mobile terminal is encrypted to obtain confidential data corresponding to the data to be transmitted, and then the confidential data is transmitted to the server through the encrypted communication channel; thereby, when connecting to a public wireless network, the confidential data can be transmitted using the encrypted communication channel established by the mobile data network, which solves the problem of data leakage or high data network traffic cost when the existing mobile terminal performs data transmission, and while avoiding data leakage, the cost of using data network traffic can also be reduced.
[0135] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data transmission method provided in any of the aforementioned method embodiments are implemented, by determining the wireless network connected to the mobile terminal, and in the case that the wireless network belongs to a public network, based on the mobile data network connected to the mobile terminal itself, an encrypted communication channel is established with the server, and based on the use policy of the encrypted communication channel, the data to be transmitted of the mobile terminal is encrypted to obtain confidential data corresponding to the data to be transmitted, and then the confidential data is transmitted to the server through the encrypted communication channel; thereby, when connecting to a public wireless network, the confidential data can be transmitted using the encrypted communication channel established by the mobile data network, which solves the problem of data leakage or high data network traffic cost when the existing mobile terminal performs data transmission, and while avoiding data leakage, the cost of using data network traffic can also be reduced.
[0136] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0137] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0138] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0139] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A data transmission method, characterized in that: include: Determine the wireless network to which the mobile terminal is connected; In the case where the wireless network belongs to a public network, establishing an encrypted communication channel with a server based on the mobile data network to which the mobile terminal itself is connected; Based on the usage policy of the encrypted communication channel, encrypt the data to be transmitted of the mobile terminal to obtain confidential data corresponding to the data to be transmitted; The confidential data is transmitted to the server through the encrypted communication channel.
2. The data transmission method according to claim 1, characterized in that: The step of establishing an encrypted communication channel with a server based on a mobile data network connected to the mobile terminal itself includes: Based on the mobile data network, obtaining identity authentication information corresponding to the mobile terminal and certificate information corresponding to the server; Perform two-way authentication based on the identity authentication information and the certificate information to obtain an authentication result; When the authentication result is a passed authentication result, the encrypted communication channel is established.
3. The data transmission method according to claim 1, characterized in that: The method of encrypting the data to be transmitted of the mobile terminal based on the usage policy of the encrypted communication channel to obtain confidential data corresponding to the data to be transmitted includes: Acquire the data to be transmitted; Determine the data type of the data to be transmitted; In the case where the data type belongs to the confidential data type preset in the usage policy, the data to be transmitted is encrypted according to the encryption algorithm preset in the usage policy to obtain the confidential data.
4. The data transmission method according to claim 3, characterized in that: After determining the data type of the data to be transmitted, the method further includes: In the case where the data type does not belong to the confidential data type preset in the usage policy, determining a routing node corresponding to the wireless network; The data to be transmitted is transmitted to the server through the routing node.
5. The data transmission method according to claim 3, characterized in that: The step of encrypting the data to be transmitted according to the encryption algorithm preset in the use policy to obtain the confidential data includes: Based on the encryption algorithm, obtaining a data source identifier corresponding to the data to be transmitted; Determining the confidentiality level of the data to be transmitted according to the data source identifier; Obtaining a target confidentiality level range corresponding to the mobile terminal, and determining whether the confidentiality level falls within the target confidentiality level range; When the confidentiality level is within the target confidentiality level range, the data to be transmitted is encrypted to obtain the confidential data.
6. The data transmission method according to claim 5, characterized in that: The obtaining of a target confidentiality level range corresponding to the mobile terminal includes: Acquiring user configuration information of the mobile terminal; In a case where the user configuration information includes a preset confidentiality level range, extracting the preset confidentiality level range from the user configuration information; The preset confidentiality level range is determined as the target confidentiality level range.
7. The data transmission method according to claim 6, characterized in that: After obtaining the user configuration information of the mobile terminal, the method further includes: In a case where the user configuration information does not include the preset confidentiality level range, obtaining network status information corresponding to the mobile data network; Based on the network status information, the target confidentiality level range is determined.
8. The data transmission method according to claim 7, characterized in that: The determining the target confidentiality level range based on the network status information includes: Extracting signal strength information and data flow information from the network status information; The target confidentiality level range is determined using the signal strength information and the data flow information.
9. The data transmission method according to claim 1, characterized in that: After determining the wireless network to which the mobile terminal is connected, the method further includes: Acquire wireless network characteristic information corresponding to the wireless network; Determine whether the wireless network belongs to the public network according to the wireless network characteristic information.
10. A data transmission device, characterized in that: include: A determination module, used to determine a wireless network to which the mobile terminal is connected; A channel establishment module, used for establishing an encrypted communication channel with a server based on a mobile data network connected to the mobile terminal itself when the wireless network belongs to a public network; An encryption module, used to encrypt the data to be transmitted of the mobile terminal based on the usage policy of the encrypted communication channel to obtain confidential data corresponding to the data to be transmitted; The encrypted transmission module is used to transmit the confidential data to the server through the encrypted communication channel.
11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, used to implement the data transmission method described in any one of claims 1 to 9 when executing a program stored in a memory.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 9 is implemented.