CN111698682A - Data transmission method based on public WiFi network environment, server and storage medium - Google Patents

Data transmission method based on public WiFi network environment, server and storage medium Download PDF

Info

Publication number
CN111698682A
CN111698682A CN202010536703.1A CN202010536703A CN111698682A CN 111698682 A CN111698682 A CN 111698682A CN 202010536703 A CN202010536703 A CN 202010536703A CN 111698682 A CN111698682 A CN 111698682A
Authority
CN
China
Prior art keywords
data
wifi network
client
transmitted
network environment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010536703.1A
Other languages
Chinese (zh)
Inventor
宋德洪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tiandu Iot Information Technology Co ltd
Original Assignee
Shenzhen Tiandu Iot Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tiandu Iot Information Technology Co ltd filed Critical Shenzhen Tiandu Iot Information Technology Co ltd
Priority to CN202010536703.1A priority Critical patent/CN111698682A/en
Publication of CN111698682A publication Critical patent/CN111698682A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Abstract

The invention discloses a data transmission method based on a public WiFi network environment, which is applied to a server and comprises the steps of receiving a network connection request which is sent by a first client and carries an appointed identification, judging whether the network environment of a WiFi network corresponding to the appointed identification is safe or not, and executing connection between the first client and the WiFi network corresponding to the appointed identification when the judgment result is safe; when the judgment result is that the WiFi network connection is not safe, a reminding interface is displayed to the first client side, and whether the WiFi network connection is continuously executed or not is confirmed; when the first client confirms to continue to execute WiFi network connection, monitoring a data transmission request carrying data to be transmitted sent by the first client in real time, encrypting the data to be transmitted by using a preset encryption algorithm to obtain target data, and transmitting the target data to a second client. The invention can improve the safety of data transmission in the public WiFi network environment.

Description

Data transmission method based on public WiFi network environment, server and storage medium
Technical Field
The invention relates to the technical field of data processing, in particular to a data transmission method, a server and a storage medium based on a public WiFi network environment.
Background
At present, in many public WiFi network environments open to the outside, people can directly connect to a mobile device without passwords, but in such a network environment, the security is weaker for operations performed on the mobile device, and lawless persons can acquire various information of the mobile device by using the WiFi network, for example, in the process of data transmission of a mobile phone or a computer, once the network environment is insecure, the situation that data is stolen may occur at any time. Therefore, how to improve the security of data transmission in the public WiFi network environment becomes a technical problem that needs to be solved urgently.
Disclosure of Invention
The invention mainly aims to provide a data transmission method, a server and a storage medium based on a public WiFi network environment, and aims to solve the technical problem of improving the safety of data transmission in the public WiFi network environment.
In order to achieve the above object, the present invention provides a data transmission method based on a public WiFi network environment, which is applied to a server, and the method includes:
a judging step: receiving a network connection request which is sent by a first client and carries an appointed identification, judging whether the network environment of a WiFi network corresponding to the appointed identification is safe or not, and executing connection between the first client and the WiFi network corresponding to the appointed identification when the judgment result is safe;
a reminding step: when the judgment result is that the WiFi network connection is not safe, a reminding interface is displayed to the first client side, and whether the WiFi network connection is continuously executed or not is confirmed; and
a transmission step: when the first client confirms to continue to execute WiFi network connection, monitoring a data transmission request carrying data to be transmitted sent by the first client in real time, encrypting the data to be transmitted by using a preset encryption algorithm to obtain target data, and transmitting the target data to a second client.
Preferably, the determining whether the WiFi network corresponding to the designated identifier is secure includes:
pre-creating a preset identifier corresponding to a WiFi network with a safe network environment in a database; and
and when a network connection request sent by the first client is received, judging whether a preset identifier consistent with the specified identifier exists in the database, and if so, judging the network environment safety of the WiFi network corresponding to the specified identifier.
Preferably, the encrypting the data to be transmitted by using a preset encryption algorithm to obtain target data includes:
recognizing the character digit number of each data unit in the data to be transmitted, and converting the data to be transmitted into a character string;
acquiring an interception point of the character string, and dividing the character string into a plurality of sections of data to be transmitted; and
and encrypting each section of the sub data to be transmitted by using the public key of the second client, and assembling each section of the encrypted sub data to be transmitted according to a preset rule to obtain the target data.
Preferably, the method further comprises the step of decrypting:
when the second client receives the target data, decrypting the target data by using a private key corresponding to the public key to obtain each decrypted data unit; and
and splicing each data unit to form the data to be transmitted before being encrypted.
Preferably, the preset identifier in the database can be manually added or deleted, and the preset identifier in the database is updated in real time.
In order to achieve the above object, the present invention further provides a server, including a memory and a processor, where the memory stores a data transmission program based on a public WiFi network environment, and the data transmission program based on the public WiFi network environment implements the following steps when executed by the processor:
a judging step: receiving a network connection request which is sent by a first client and carries an appointed identification, judging whether the network environment of a WiFi network corresponding to the appointed identification is safe or not, and executing connection between the first client and the WiFi network corresponding to the appointed identification when the judgment result is safe;
a reminding step: when the judgment result is that the WiFi network connection is not safe, a reminding interface is displayed to the first client side, and whether the WiFi network connection is continuously executed or not is confirmed; and
a transmission step: when the first client confirms to continue to execute WiFi network connection, monitoring a data transmission request carrying data to be transmitted sent by the first client in real time, encrypting the data to be transmitted by using a preset encryption algorithm to obtain target data, and transmitting the target data to a second client.
Preferably, the determining whether the WiFi network corresponding to the designated identifier is secure includes:
pre-creating a preset identifier corresponding to a WiFi network with a safe network environment in a database; and
and when a network connection request sent by the first client is received, judging whether a preset identifier consistent with the specified identifier exists in the database, and if so, judging the network environment safety of the WiFi network corresponding to the specified identifier.
Preferably, the encrypting the data to be transmitted by using a preset encryption algorithm to obtain target data includes:
recognizing the character digit number of each data unit in the data to be transmitted, and converting the data to be transmitted into a character string;
acquiring an interception point of the character string, and dividing the character string into a plurality of sections of data to be transmitted; and
and encrypting each section of the sub data to be transmitted by using the public key of the second client, and assembling each section of the encrypted sub data to be transmitted according to a preset rule to obtain the target data.
Preferably, the data transmission program based on the public WiFi network environment when executed by the processor further implements the steps of:
the data transmission program based on the public WiFi network environment further realizes the following steps when being executed by the processor:
when the second client receives the target data, decrypting the target data by using a private key corresponding to the public key to obtain each decrypted data unit; and
and splicing each data unit to form the data to be transmitted before being encrypted.
To achieve the above object, the present invention further provides a computer readable storage medium having stored thereon a data transmission program based on a public WiFi network environment, the data transmission program based on the public WiFi network environment being executable by one or more processors to implement the steps of the data transmission method based on the public WiFi network environment as described above.
The data transmission method, the server and the storage medium based on the public WiFi network environment judge whether the network environment of the WiFi network corresponding to the specified identification is safe or not by receiving a network connection request which is sent by a first client and carries the specified identification, and execute connection between the first client and the WiFi network corresponding to the specified identification when the judgment result is safe; when the judgment result is that the WiFi network connection is not safe, a reminding interface is displayed to the first client side, and whether the WiFi network connection is continuously executed or not is confirmed; when the first client confirms to continue to execute WiFi network connection, monitoring a data transmission request carrying data to be transmitted sent by the first client in real time, encrypting the data to be transmitted by using a preset encryption algorithm to obtain target data, and transmitting the target data to a second client. The invention can improve the safety of data transmission in the public WiFi network environment.
Drawings
FIG. 1 is a diagram of an application environment of a server according to a preferred embodiment of the present invention;
FIG. 2 is a block diagram of a preferred embodiment of a data transmission process based on the public WiFi network environment of FIG. 1;
fig. 3 is a flowchart illustrating a data transmission method based on a WiFi network environment according to a preferred embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical embodiments and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, the technical embodiments of the present invention may be combined with each other, but it must be based on the realization of those skilled in the art, and when the combination of the technical embodiments contradicts each other or cannot be realized, such combination of the technical embodiments should be considered to be absent and not within the protection scope of the present invention.
The invention provides a server 1.
The server 1 includes, but is not limited to, a memory 11, a processor 12, and a network interface 13.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the server 1, for example a hard disk of the server 1. The memory 11 may also be an external storage device of the server 1 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the server 1.
Further, the memory 11 may also include both an internal storage unit of the server 1 and an external storage device. The memory 11 may be used not only to store application software installed in the server 1 and various kinds of data, such as codes of the data transmission program 10 based on the public WiFi network environment, etc., but also to temporarily store data that has been output or will be output.
The processor 12 may be, in some embodiments, a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip for executing program codes stored in the memory 11 or Processing data, such as executing the data transmission program 10 based on the public WiFi network environment.
The network interface 13 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), typically used to establish a communication link between the server and other electronic devices.
The first client and the second client can be desktop computers, notebooks, tablet computers, mobile phones and the like.
The network may be the internet, a cloud network, a wireless fidelity (Wi-Fi) network, a Personal Area Network (PAN), a Local Area Network (LAN), and/or a Metropolitan Area Network (MAN). Various devices in the network environment may be configured to connect to the communication network according to various wired and wireless communication protocols. Examples of such wired and wireless communication protocols may include, but are not limited to, at least one of: transmission control protocol and internet protocol (TCP/IP), User Datagram Protocol (UDP), hypertext transfer protocol (HTTP), File Transfer Protocol (FTP), ZigBee, EDGE, IEEE 802.11, optical fidelity (Li-Fi), 802.16, IEEE 802.11s, IEEE 802.11g, multi-hop communications, wireless Access Points (APs), device-to-device communications, cellular communication protocol, and/or BlueTooth (BlueTooth) communication protocol, or a combination thereof.
Optionally, the server 1 may further comprise a user interface, the user interface may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further comprise a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is used for displaying information processed in the server 1 and for displaying a visualized user interface.
While fig. 1 shows only a server 1 with components 11-13 and a data transfer program 10 based on a public WiFi network environment, those skilled in the art will appreciate that the structure shown in fig. 1 does not constitute a limitation of the server 1 and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
In the present embodiment, the data transmission program 10 based on the public WiFi network environment of fig. 1, when executed by the processor 12, implements the following steps:
a judging step: receiving a network connection request which is sent by a first client and carries an appointed identification, judging whether the network environment of a WiFi network corresponding to the appointed identification is safe or not, and executing connection between the first client and the WiFi network corresponding to the appointed identification when the judgment result is safe;
a reminding step: when the judgment result is that the WiFi network connection is not safe, a reminding interface is displayed to the first client side, and whether the WiFi network connection is continuously executed or not is confirmed; and
a transmission step: when the first client confirms to continue to execute WiFi network connection, monitoring a data transmission request carrying data to be transmitted sent by the first client in real time, encrypting the data to be transmitted by using a preset encryption algorithm to obtain target data, and transmitting the target data to a second client.
In another embodiment, the program further performs the steps of:
the preset identification in the database can be manually added or deleted, and the preset identification in the database is updated in real time.
For detailed description of the above steps, please refer to the following description of fig. 2 regarding a schematic diagram of program modules of an embodiment of a data transmission program 10 based on a public WiFi network environment and fig. 3 regarding a schematic diagram of a method flow of an embodiment of a data transmission method based on a public WiFi network environment.
Referring to fig. 2, a schematic diagram of program modules of an embodiment of the data transmission program 10 based on the public WiFi network environment in fig. 1 is shown. The data transmission program 10 based on the public WiFi network environment is divided into a plurality of modules, which are stored in the memory 11 and executed by the processor 12, to complete the present invention. The modules referred to herein are referred to as a series of computer program instruction segments capable of performing specified functions.
In this embodiment, the data transmission program 10 based on the public WiFi network environment includes a determining module 110, a reminding module 120, and a transmitting module 130.
The determining module 110 is configured to receive a network connection request carrying an assigned identifier sent by a first client, determine whether a network environment of a WiFi network corresponding to the assigned identifier is safe, and execute connecting the first client and the WiFi network corresponding to the assigned identifier if the determination result is safe.
At present, in many public WiFi network environments open to the outside, people can directly connect to a mobile device without passwords, but in such a network environment, the security is weaker for operations performed on the mobile device, and lawless persons can acquire various information of the mobile device by using the WiFi network, for example, in the process of data transmission of a mobile phone or a computer, once the network environment is insecure, the situation that data is stolen may occur at any time. Therefore, in order to prevent a user from directly connecting a mobile device using a WiFi network without a password, which may cause a security risk to user data, in this embodiment, when the server 1 receives a network connection request carrying a specific identifier (for example, a name "xxx" of WiFi) sent by a first client (a data sending end, for example, a mobile phone or a computer), it is first determined whether a network environment of the WiFi network corresponding to the specific identifier is secure, and when the determination result is secure, the first client and the WiFi network corresponding to the specific identifier are connected.
The specific process for judging whether the WiFi network corresponding to the designated identifier is safely included comprises the following steps:
by pre-creating a preset identifier corresponding to the WiFi network with safe network environment in the database, the preset identifier in the database can be manually added or deleted, and the preset identifier in the database is updated in real time.
When a network connection request sent by a first client is received, judging whether a preset identifier consistent with the specified identifier exists in the database, and if so, indicating that the network environment of the WiFi network corresponding to the specified identifier is safe.
And the reminding module 120 is configured to display a reminding interface to the first client if the determination result is that the WiFi network connection is not performed, and determine whether to continue to be performed.
In this embodiment, when the determination result is unsafe, a prompting interface is displayed to the first client (a data sending end, such as a mobile phone or a computer) to prompt the user that a risk problem may exist in the current WiFi network, so that the user can select whether to continue to execute WiFi network connection.
The first monitoring module 130 is configured to monitor, in real time, a data transmission request carrying data to be transmitted sent by the first client when the first client confirms to continue to execute WiFi network connection, encrypt, by using a preset encryption algorithm, the data to be transmitted to obtain target data, and transmit the target data to the second client.
When the first client (a data sending end, such as a mobile phone or a computer) confirms to continue to execute the WiFi network connection on the display reminding interface, the data to be transmitted by the user is protected, and the data is prevented from being stolen in the transmission process. Therefore, in this embodiment, the server 1 performs encryption processing on the data to be transmitted by using a preset encryption algorithm to obtain target data by monitoring a data transmission request carrying the data to be transmitted sent by the first client in real time, and transmits the target data to the second client (a data receiving end, such as a mobile phone or a computer).
Specifically, the data to be transmitted is converted into a character string by identifying the number of character bits corresponding to each data unit in the data to be transmitted, an interception point of the character string is obtained, the character string is divided into a plurality of sections of sub data to be transmitted, each section of sub data to be transmitted is encrypted by using a public key of a second client, and each section of encrypted sub data to be transmitted is assembled according to a preset rule to obtain target data.
The encryption algorithm adopts rsa asymmetric encryption algorithm, and the asymmetric encryption algorithm is a secret key secret method. In another embodiment, the data to be transmitted may also be encrypted by an encryption algorithm such as a hash algorithm. Asymmetric encryption algorithms require two keys: public keys (public keys for short) and private keys (private keys for short). The public key and the private key are a pair, and if data is encrypted by the public key, the data can be decrypted only by the corresponding private key. This algorithm is called asymmetric encryption algorithm because two different keys are used for encryption and decryption. The basic process of realizing confidential information exchange by the asymmetric encryption algorithm is as follows: the first party generates a pair of secret keys and discloses the public keys, and other roles (the second party) needing to send information to the first party encrypt the confidential information by using the secret keys (the public keys of the first party) and then send the encrypted confidential information to the first party; the first party decrypts the encrypted information by using the private key of the first party. The method is characterized in that when the party A wants to reply to the party B, the opposite is true, the public key of the party B is used for encrypting data, and similarly, the party B uses the private key of the party B for decrypting.
Since different data units (i.e. characters) in a computer system occupy different numbers of character bits, the number of character bits of different data units needs to be identified.
Such as special characters
Figure BDA0002537311330000091
Occupying 4 character bit numbers in the computer system; chinese and Chinese punctuation mark occupy 3 character bit numbers; special characters
Figure BDA0002537311330000101
Occupying 2 character bit numbers; english and English punctuation marks occupy 1 character bit number.
And converting the data to be transmitted into character strings after respectively outputting the character bit numbers of all the data units of the data to be transmitted. Because of the characteristic of rsa asymmetric encryption algorithm, a 1024-bit public key can only encrypt data units corresponding to 117-bit character bits, and when the data amount exceeds 117-bit character bits, the encryption program will throw exception. Therefore, the character string corresponding to the data to be transmitted needs to be segmented, the character string is divided into a plurality of segments by obtaining the interception point of the character string (every 117 bits are used as the interception point), each segment of data to be transmitted is encrypted by using the public key of the second client, and each segment of encrypted data to be transmitted is assembled according to the preset rule to obtain the target data.
The preset rules are "[ encrypt Text1, encrypt Text2,. ], encrypt Text ]", and "encrypt Text" represent a piece of data to be transmitted.
In another embodiment, the program further executes a decryption module:
when the second client receives the target data, decrypting the target data by using a private key corresponding to the public key to obtain each decrypted data unit; and
and splicing each data unit to form the data to be transmitted before being encrypted.
In this embodiment, when the second client receives the target data, traversing the target data [ encrypt Text1, encrypt Text2,.. and encrypt Text ], after being encrypted in segments, taking out each element in the array, decrypting the target data by using a private key corresponding to the public key to obtain each decrypted data unit, and splicing each data unit to form to-be-transmitted data before being unencrypted.
In addition, the invention also provides a data transmission method based on the public WiFi network environment. Fig. 3 is a schematic method flow diagram of an embodiment of the data transmission method based on the public WiFi network environment according to the present invention. The processor 12 of the server 1 implements the following steps of the data transmission method based on the public WiFi network environment when executing the data transmission program 10 based on the public WiFi network environment stored in the memory 11:
s110, receiving a network connection request which is sent by a first client and carries an appointed identification, judging whether the network environment of the WiFi network corresponding to the appointed identification is safe, and executing connection between the first client and the WiFi network corresponding to the appointed identification when the judgment result is safe.
At present, in many public WiFi network environments open to the outside, people can directly connect to a mobile device without passwords, but in such a network environment, the security is weaker for operations performed on the mobile device, and lawless persons can acquire various information of the mobile device by using the WiFi network, for example, in the process of data transmission of a mobile phone or a computer, once the network environment is insecure, the situation that data is stolen may occur at any time. Therefore, in order to prevent a user from directly connecting a mobile device using a WiFi network without a password, which may cause a security risk to user data, in this embodiment, when the server 1 receives a network connection request carrying a specific identifier (for example, a name "xxx" of WiFi) sent by a first client (a data sending end, for example, a mobile phone or a computer), it is first determined whether a network environment of the WiFi network corresponding to the specific identifier is secure, and when the determination result is secure, the first client and the WiFi network corresponding to the specific identifier are connected.
The specific process for judging whether the WiFi network corresponding to the designated identifier is safely included comprises the following steps:
by pre-creating a preset identifier corresponding to the WiFi network with safe network environment in the database, the preset identifier in the database can be manually added or deleted, and the preset identifier in the database is updated in real time.
When a network connection request sent by a first client is received, judging whether a preset identifier consistent with the specified identifier exists in the database, and if so, indicating that the network environment of the WiFi network corresponding to the specified identifier is safe.
And S120, when the judgment result is that the WiFi network connection is not safe, displaying a reminding interface to the first client side, and determining whether the WiFi network connection is continuously executed.
In this embodiment, when the determination result is unsafe, a prompting interface is displayed to the first client (a data sending end, such as a mobile phone or a computer) to prompt the user that a risk problem may exist in the current WiFi network, so that the user can select whether to continue to execute WiFi network connection.
S130, when the first client confirms to continue to execute WiFi network connection, monitoring a data transmission request which is sent by the first client and carries data to be transmitted in real time, encrypting the data to be transmitted by using a preset encryption algorithm to obtain target data, and transmitting the target data to a second client.
When the first client (a data sending end, such as a mobile phone or a computer) confirms to continue to execute the WiFi network connection on the display reminding interface, the data to be transmitted by the user is protected, and the data is prevented from being stolen in the transmission process. Therefore, in this embodiment, the server 1 performs encryption processing on the data to be transmitted by using a preset encryption algorithm to obtain target data by monitoring a data transmission request carrying the data to be transmitted sent by the first client in real time, and transmits the target data to the second client (a data receiving end, such as a mobile phone or a computer).
Specifically, the data to be transmitted is converted into a character string by identifying the number of character bits corresponding to each data unit in the data to be transmitted, an interception point of the character string is obtained, the character string is divided into a plurality of sections of sub data to be transmitted, each section of sub data to be transmitted is encrypted by using a public key of a second client, and each section of encrypted sub data to be transmitted is assembled according to a preset rule to obtain target data.
The encryption algorithm adopts rsa asymmetric encryption algorithm, and the asymmetric encryption algorithm is a secret key secret method. In another embodiment, the data to be transmitted may also be encrypted by an encryption algorithm such as a hash algorithm. Asymmetric encryption algorithms require two keys: public keys (public keys for short) and private keys (private keys for short). The public key and the private key are a pair, and if data is encrypted by the public key, the data can be decrypted only by the corresponding private key. This algorithm is called asymmetric encryption algorithm because two different keys are used for encryption and decryption. The basic process of realizing confidential information exchange by the asymmetric encryption algorithm is as follows: the first party generates a pair of secret keys and discloses the public keys, and other roles (the second party) needing to send information to the first party encrypt the confidential information by using the secret keys (the public keys of the first party) and then send the encrypted confidential information to the first party; the first party decrypts the encrypted information by using the private key of the first party. The method is characterized in that when the party A wants to reply to the party B, the opposite is true, the public key of the party B is used for encrypting data, and similarly, the party B uses the private key of the party B for decrypting.
Since different data units (i.e. characters) in a computer system occupy different numbers of character bits, the number of character bits of different data units needs to be identified.
Such as special characters
Figure BDA0002537311330000121
Occupying 4 character bit numbers in the computer system; chinese and Chinese punctuation mark occupy 3 character bit numbers; special characters
Figure BDA0002537311330000131
Occupying 2 character bit numbers; english and English punctuation marks occupy 1 character bit number.
And converting the data to be transmitted into character strings after respectively outputting the character bit numbers of all the data units of the data to be transmitted. Because of the characteristic of rsa asymmetric encryption algorithm, a 1024-bit public key can only encrypt data units corresponding to 117-bit character bits, and when the data amount exceeds 117-bit character bits, the encryption program will throw exception. Therefore, the character string corresponding to the data to be transmitted needs to be segmented, the character string is divided into a plurality of segments by obtaining the interception point of the character string (every 117 bits are used as the interception point), each segment of data to be transmitted is encrypted by using the public key of the second client, and each segment of encrypted data to be transmitted is assembled according to the preset rule to obtain the target data.
The preset rules are "[ encrypt Text1, encrypt Text2,. ], encrypt Text ]", and "encrypt Text" represent a piece of data to be transmitted.
In another embodiment, the method further comprises the steps of:
when the second client receives the target data, decrypting the target data by using a private key corresponding to the public key to obtain each decrypted data unit; and
and splicing each data unit to form the data to be transmitted before being encrypted.
In this embodiment, when the second client receives the target data, traversing the target data [ encrypt Text1, encrypt Text2,.. and encrypt Text ], after being encrypted in segments, taking out each element in the array, decrypting the target data by using a private key corresponding to the public key to obtain each decrypted data unit, and splicing each data unit to form to-be-transmitted data before being unencrypted.
In addition, the embodiment of the present invention further provides a computer-readable storage medium, which may be any one of or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a portable compact disc read only memory (CD-ROM), a USB memory, and the like. The computer-readable storage medium includes a data transmission program 10 based on the public WiFi network environment, and the specific implementation of the computer-readable storage medium of the present invention is substantially the same as the specific implementation of the data transmission method based on the public WiFi network environment and the server 1, and will not be described herein again.
It should be noted that the sequence of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description of the embodiments of the present invention is for illustrative purposes only and does not represent the merits of the embodiments. Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical embodiments of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A data transmission method based on a public WiFi network environment is applied to a server and is characterized by comprising the following steps:
a judging step: receiving a network connection request which is sent by a first client and carries an appointed identification, judging whether the network environment of a WiFi network corresponding to the appointed identification is safe or not, and executing connection between the first client and the WiFi network corresponding to the appointed identification when the judgment result is safe;
a reminding step: when the judgment result is that the WiFi network connection is not safe, a reminding interface is displayed to the first client side, and whether the WiFi network connection is continuously executed or not is confirmed; and
a transmission step: when the first client confirms to continue to execute WiFi network connection, monitoring a data transmission request carrying data to be transmitted sent by the first client in real time, encrypting the data to be transmitted by using a preset encryption algorithm to obtain target data, and transmitting the target data to a second client.
2. The data transmission method based on the public WiFi network environment as claimed in claim 1, wherein the determining whether the WiFi network corresponding to the designated identity is secure includes:
pre-creating a preset identifier corresponding to a WiFi network with a safe network environment in a database; and
and when a network connection request sent by the first client is received, judging whether a preset identifier consistent with the specified identifier exists in the database, and if so, judging the network environment safety of the WiFi network corresponding to the specified identifier.
3. The data transmission method based on the public WiFi network environment of claim 1, wherein the encrypting the data to be transmitted by using the preset encryption algorithm to obtain the target data includes:
recognizing the character digit number of each data unit in the data to be transmitted, and converting the data to be transmitted into a character string;
acquiring an interception point of the character string, and dividing the character string into a plurality of sections of data to be transmitted; and
and encrypting each section of the sub data to be transmitted by using the public key of the second client, and assembling each section of the encrypted sub data to be transmitted according to a preset rule to obtain the target data.
4. The public WiFi network environment based data transmission method of claim 3 further comprising the decryption step of:
when the second client receives the target data, decrypting the target data by using a private key corresponding to the public key to obtain each decrypted data unit; and
and splicing each data unit to form the data to be transmitted before being encrypted.
5. The public WiFi network environment based data transmission method as claimed in claim 1, wherein the preset id in the database can be manually added or deleted, and the preset id in the database is updated in real time.
6. A server, comprising a memory and a processor, wherein the memory stores a data transmission program based on a public WiFi network environment, and wherein the data transmission program based on the public WiFi network environment when executed by the processor implements the steps of:
a judging step: receiving a network connection request which is sent by a first client and carries an appointed identification, judging whether the network environment of a WiFi network corresponding to the appointed identification is safe or not, and executing connection between the first client and the WiFi network corresponding to the appointed identification when the judgment result is safe;
a reminding step: when the judgment result is that the WiFi network connection is not safe, a reminding interface is displayed to the first client side, and whether the WiFi network connection is continuously executed or not is confirmed; and
a transmission step: when the first client confirms to continue to execute WiFi network connection, monitoring a data transmission request carrying data to be transmitted sent by the first client in real time, encrypting the data to be transmitted by using a preset encryption algorithm to obtain target data, and transmitting the target data to a second client.
7. The server of claim 6, wherein the determining whether the WiFi network corresponding to the specified identity is secure comprises:
pre-creating a preset identifier corresponding to a WiFi network with a safe network environment in a database; and
and when a network connection request sent by the first client is received, judging whether a preset identifier consistent with the specified identifier exists in the database, and if so, judging the network environment safety of the WiFi network corresponding to the specified identifier.
8. The server according to claim 6, wherein the encrypting the data to be transmitted by using a preset encryption algorithm to obtain target data comprises:
recognizing the character digit number of each data unit in the data to be transmitted, and converting the data to be transmitted into a character string;
acquiring an interception point of the character string, and dividing the character string into a plurality of sections of data to be transmitted; and
and encrypting each section of the sub data to be transmitted by using the public key of the second client, and assembling each section of the encrypted sub data to be transmitted according to a preset rule to obtain the target data.
9. The server of claim 6, wherein the public WiFi network environment based data transmission program when executed by the processor further performs the steps of:
when the second client receives the target data, decrypting the target data by using a private key corresponding to the public key to obtain each decrypted data unit; and
and splicing each data unit to form the data to be transmitted before being encrypted.
10. A computer-readable storage medium, wherein the computer-readable storage medium has stored thereon a data transmission program based on a public WiFi network environment, the data transmission program based on the public WiFi network environment being executable by one or more processors to implement the steps of the data transmission method based on the public WiFi network environment according to any one of claims 1-5.
CN202010536703.1A 2020-06-12 2020-06-12 Data transmission method based on public WiFi network environment, server and storage medium Pending CN111698682A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010536703.1A CN111698682A (en) 2020-06-12 2020-06-12 Data transmission method based on public WiFi network environment, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010536703.1A CN111698682A (en) 2020-06-12 2020-06-12 Data transmission method based on public WiFi network environment, server and storage medium

Publications (1)

Publication Number Publication Date
CN111698682A true CN111698682A (en) 2020-09-22

Family

ID=72480783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010536703.1A Pending CN111698682A (en) 2020-06-12 2020-06-12 Data transmission method based on public WiFi network environment, server and storage medium

Country Status (1)

Country Link
CN (1) CN111698682A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992417A (en) * 2021-10-28 2022-01-28 深圳永安在线科技有限公司 Dynamic anti-fraud identification method and device based on dynamic signature verification and related equipment
CN116828474A (en) * 2023-08-30 2023-09-29 北京绿色苹果技术有限公司 WiFi implementation method, system and medium based on environmental security

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197674A (en) * 2007-12-10 2008-06-11 华为技术有限公司 Encrypted communication method, server and encrypted communication system
CN107548064A (en) * 2016-06-29 2018-01-05 上海连尚网络科技有限公司 For the method and apparatus for the security information for providing WAP
CN109831311A (en) * 2019-03-21 2019-05-31 深圳市网心科技有限公司 A kind of server validation method, system, user terminal and readable storage medium storing program for executing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197674A (en) * 2007-12-10 2008-06-11 华为技术有限公司 Encrypted communication method, server and encrypted communication system
CN107548064A (en) * 2016-06-29 2018-01-05 上海连尚网络科技有限公司 For the method and apparatus for the security information for providing WAP
CN109831311A (en) * 2019-03-21 2019-05-31 深圳市网心科技有限公司 A kind of server validation method, system, user terminal and readable storage medium storing program for executing

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992417A (en) * 2021-10-28 2022-01-28 深圳永安在线科技有限公司 Dynamic anti-fraud identification method and device based on dynamic signature verification and related equipment
CN116828474A (en) * 2023-08-30 2023-09-29 北京绿色苹果技术有限公司 WiFi implementation method, system and medium based on environmental security
CN116828474B (en) * 2023-08-30 2023-11-14 北京绿色苹果技术有限公司 WiFi implementation method, system and medium based on environmental security

Similar Documents

Publication Publication Date Title
CN109862041B (en) Digital identity authentication method, equipment, device, system and storage medium
EP3420677B1 (en) System and method for service assisted mobile pairing of password-less computer login
US10972908B2 (en) Wireless network connection method, apparatus, and system
US8953491B2 (en) System and method for providing wireless network configuration information
US10924289B2 (en) Public-private key pair account login and key manager
US20100332841A1 (en) Authentication Method and System
KR20180117715A (en) Method and system for user authentication with improved security
KR101744747B1 (en) Mobile terminal, terminal and method for authentication using security cookie
CN113259133B (en) Encryption communication method, equipment and storage medium based on HTTP protocol
KR20130131682A (en) Method for web service user authentication
JP5206992B2 (en) Authentication system, authentication device, terminal device, authentication method, and program
WO2019127863A1 (en) Key saving device and method, key obtaining device and method, and computer readable storage medium
JP2009124311A (en) Mutual authentication system, mutual authentication method, and program
CN111698682A (en) Data transmission method based on public WiFi network environment, server and storage medium
CA3066701A1 (en) Controlling access to data
JP2022093492A (en) Data extraction system, data extraction method, registration device, and program
CN113434882A (en) Communication protection method and device of application program, computer equipment and storage medium
CN111488570B (en) Authentication method and authentication system
US20150156173A1 (en) Communication system utilizing fingerprint information and use thereof
KR102171377B1 (en) Method of login control
CN111291414A (en) Data storage method and device, computer device and storage medium
JP6325654B2 (en) Network service providing apparatus, network service providing method, and program
KR20150080977A (en) User security authentication system in internet and method thereof
KR20190007336A (en) Method and apparatus for generating end-to-end security channel, and method and apparatus for transmitting/receiving secure information using security channel
JP2023532976A (en) Method and system for verification of user identity

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200922

WD01 Invention patent application deemed withdrawn after publication