CN113271324A - File transmission method and device, electronic equipment and readable storage medium - Google Patents

File transmission method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113271324A
CN113271324A CN202010095209.6A CN202010095209A CN113271324A CN 113271324 A CN113271324 A CN 113271324A CN 202010095209 A CN202010095209 A CN 202010095209A CN 113271324 A CN113271324 A CN 113271324A
Authority
CN
China
Prior art keywords
communication connection
equipment
password
information
encrypted information
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
CN202010095209.6A
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.)
Oneplus Technology Shenzhen Co Ltd
Original Assignee
Oneplus Technology Shenzhen 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 Oneplus Technology Shenzhen Co Ltd filed Critical Oneplus Technology Shenzhen Co Ltd
Priority to CN202010095209.6A priority Critical patent/CN113271324A/en
Priority to PCT/CN2021/075987 priority patent/WO2021160084A1/en
Publication of CN113271324A publication Critical patent/CN113271324A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The application provides a file transmission method, a file transmission device, electronic equipment and a readable storage medium, and relates to the technical field of communication. First, a first password stored by first equipment is acquired through first communication connection with the first equipment. And then encrypting first information comprising a second password and connection parameters of second communication connection according to the first password, and sending the obtained first encrypted information to the first equipment through the first communication connection so as to establish second communication connection with the first equipment. The power consumption of the first communication connection is lower than a first preset value, and the transmission speed of the second communication connection is higher than a second preset value. And finally, encrypting second information comprising the target file according to the second password, and sending the obtained second encrypted information to the first equipment through a second communication connection so that the first equipment obtains the target file. Therefore, information leakage can be avoided by transmitting the encrypted connection parameters of the second communication connection and the target file.

Description

File transmission method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a file transmission method, an apparatus, an electronic device, and a readable storage medium.
Background
At present, when two electronic devices transmit files, generally, one electronic device directly obtains connection parameters from the other electronic device, then establishes a communication connection between the two electronic devices based on the connection parameters, and finally transmits the files through the communication connection. In the process, potential safety hazards exist in the transmission of the connection parameters and the files.
Disclosure of Invention
In view of the above, an object of the present application is to provide a file transmission method, device, electronic device and readable storage medium.
In order to achieve the above purpose, the embodiments of the present application employ the following technical solutions:
in a first aspect, an embodiment of the present application provides a file transmission method, which is applied to an electronic device, and the method includes:
establishing a first communication connection with a first device, and acquiring a first password stored by the first device through the first communication connection;
encrypting first information according to the first password to obtain first encrypted information, and sending the first encrypted information to the first equipment through the first communication connection so as to establish a second communication connection with the first equipment, wherein the first information comprises a second password and connection parameters of the second communication connection, the power consumption of the first communication connection is lower than a first preset value, and the transmission speed of the second communication connection is higher than a second preset value;
and encrypting second information according to the second password to obtain second encrypted information, and sending the second encrypted information to the first equipment through the second communication connection, so that the first equipment decrypts the second encrypted information according to the second password to obtain a target file in the second information.
In a second aspect, an embodiment of the present application provides a file transmission method, which is applied to a sending device and a receiving device, and the method includes:
the sending equipment and the receiving equipment establish first communication connection, and a first password stored by the receiving equipment is acquired through the first communication connection;
the sending equipment encrypts first information according to the first password to obtain first encrypted information, and sends the first encrypted information to the receiving equipment through the first communication connection, wherein the first information comprises a second password and connection parameters of second communication connection, the power consumption of the first communication connection is lower than a first preset value, and the transmission speed of the second communication connection is higher than a second preset value;
the receiving equipment establishes a second communication connection with the sending equipment according to the connection parameters of the second communication connection;
and the sending equipment encrypts second information according to the second password to obtain second encrypted information, and sends the second encrypted information to the receiving equipment through the second communication connection, so that the receiving equipment decrypts the second encrypted information according to the second password to obtain a target file in the second information.
In a third aspect, an embodiment of the present application provides a file transmission apparatus, which is applied to an electronic device, and the apparatus includes:
the first communication module is used for establishing first communication connection with first equipment and acquiring a first password stored by the first equipment through the first communication connection;
the first encryption module is used for encrypting first information according to the first password to obtain first encrypted information, and sending the first encrypted information to the first equipment through the first communication connection so as to establish second communication connection with the first equipment, wherein the first information comprises a second password and connection parameters of the second communication connection, the power consumption of the first communication connection is lower than a first preset value, and the transmission speed of the second communication connection is higher than a second preset value;
and the second encryption module is used for encrypting second information according to the second password to obtain second encrypted information, and sending the second encrypted information to the first equipment through the second communication connection, so that the first equipment decrypts the second encrypted information according to the second password to obtain a target file in the second information.
In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the file transmission method described in any one of the foregoing embodiments.
In a fifth aspect, the present application provides a readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the file transmission method according to any one of the foregoing embodiments.
According to the file transmission method, the file transmission device, the electronic equipment and the readable storage medium, first communication connection is established with the first equipment, and then the first password stored in the first equipment is obtained through the first communication connection. And then encrypting first information comprising a second password and connection parameters of second communication connection according to the first password to obtain first encrypted information, and sending the first encrypted information to the first equipment through the first communication connection so as to establish second communication connection with the first equipment. The power consumption of the first communication connection is lower than a first preset value, and the transmission speed of the second communication connection is higher than a second preset value. And finally, encrypting second information comprising the target file according to the second password to obtain second encrypted information, and sending the second encrypted information to the first equipment through the second communication connection, so that the first equipment decrypts the second encrypted information according to the second password to obtain the target file. Therefore, various passwords and second communication connection parameters can be transmitted through the first communication connection with lower power consumption, and the encrypted target file is transmitted through the second communication connection with higher transmission speed, so that the possibility of information leakage is reduced, and the transmission efficiency of the target file is ensured.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a block schematic diagram of an electronic device provided in an embodiment of the present application;
FIG. 2 is a flowchart illustrating a file transfer method according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of the sub-steps included in step S110 of FIG. 2;
fig. 4 is a second flowchart of a file transfer method according to an embodiment of the present application;
fig. 5 is a third schematic flowchart of a file transmission method according to an embodiment of the present application;
FIG. 6 is a block diagram of a document transportation device according to an embodiment of the present application;
fig. 7 is a second block diagram of a document transmission device according to an embodiment of the present application.
Icon: 100-an electronic device; 110-a memory; 120-a processor; 130-a communication unit; 200-a file transfer device; 210-a first communication module; 220-a first encryption module; 230-a second encryption module; 250-a broadcast module; 260-a second communication module; 270-a first decryption module; 280-second decryption module.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Referring to fig. 1, fig. 1 is a block diagram of an electronic device 100 according to an embodiment of the present disclosure. The electronic device 100 may be, but is not limited to, a smart phone, a Personal Computer (PC), and the like. One electronic device 100 may serve as both a transmitting device and a receiving device. The electronic device 100 includes a memory 110, a processor 120, and a communication unit 130. The elements of the memory 110, the processor 120 and the communication unit 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
The memory 110 is used to store programs or data. The Memory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 120 is used to read/write data or programs stored in the memory 110 and perform corresponding functions. For example, the memory 110 stores a file transfer device 200, and the file transfer device 200 includes at least one software functional module which can be stored in the memory 110 in the form of software or firmware (firmware). The processor 120 executes various functional applications and data processing by executing software programs and modules stored in the memory 110, such as the file transfer device 200 in the embodiment of the present application, so as to implement the file transfer method in the embodiment of the present application.
The communication unit 130 is used for establishing a communication connection between the electronic apparatus 100 and another communication terminal via a network, and for transceiving data via the network.
It should be understood that the structure shown in fig. 1 is only a schematic structural diagram of the electronic device 100, and the electronic device 100 may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Referring to fig. 2, fig. 2 is a flowchart illustrating a file transmission method according to an embodiment of the present disclosure. The method is applied to the electronic device 100. The following describes the specific flow of the file transfer method in detail.
Step S110, establishing a first communication connection with a first device, and obtaining a first password stored in the first device through the first communication connection.
Step S120, encrypt first information according to the first password to obtain first encrypted information, and send the first encrypted information to the first device through the first communication connection, so as to establish a second communication connection with the first device.
The first information comprises a second password and connection parameters of a second communication connection, the power consumption of the first communication connection is lower than a first preset value, and the transmission speed of the second communication connection is higher than a second preset value.
Step S130, encrypting second information according to the second password to obtain second encrypted information, and sending the second encrypted information to the first device through the second communication connection, so that the first device decrypts the second encrypted information according to the second password to obtain a target file in the second information.
In this embodiment, when the electronic device 100 needs to send a file to a first device, a first communication connection may be established with the first device, and then a first password stored in the first device may be obtained from the first device. Here, the electronic device 100 serves as a file transmitting device, and the first device serves as a file receiving device. Then, the electronic device 100 encrypts second information according to the first password to obtain second encrypted information, and sends the second encrypted information to the first device through the first communication connection. The second information includes connection parameters of the electronic device 100 related to the second communication connection, for example, if the second communication connection is a WiFi (Wireless Fidelity) connection, the second information may include a WiFi name and a WiFi password.
Wherein the power consumption of the first communication connection is lower than a first preset value, and the transmission speed of the second communication connection is higher than a second preset value. The first preset value and the second preset value can be set according to actual requirements. Optionally, the first Communication connection may be, but is not limited to, a Communication connection based on BLE (Bluetooth Low Energy), LTE Direct, NFC (Near Field Communication), iBeacon, and the like, which have features of Low power consumption and high scanning speed; the second communication connection may be, but is not limited to, a WiFi connection.
After receiving the first encrypted information through the first communication connection, the first device may decrypt the first encrypted information according to the first password to obtain first information including connection parameters of a second communication connection. The first device may establish a second communication connection with the electronic device 100 according to the connection parameters of the second communication connection. Optionally, the first device may send a connection request for establishing the second communication connection to the electronic device 100 according to the connection parameters of the second communication connection, where the connection request may include a WiFi password; the electronic device 100 determines that the WiFi password in the connection request is the same as the WiFi password of itself through comparison, and then establishes a second communication connection with the first device.
Optionally, in an implementation manner of this embodiment, the first password and the password used in decrypting the first encrypted information are symmetric passwords. That is, the electronic device 100 encrypts the first information using the first password to obtain first encrypted information; and the first equipment decrypts the first encrypted information by using the first password to obtain the first information.
Optionally, in another implementation manner of this embodiment, the first password is a public key, and the password used when decrypting the first encrypted information is a private key corresponding to the public key. That is to say, the electronic device 100 obtains a public key of a first device from the first device, then encrypts the first information by using the public key, and sends the encrypted first encrypted information to the first device, where the electronic device 100 does not obtain a private key corresponding to a first password as the public key from the first device; the first device decrypts the first encrypted information using a private key corresponding to a third password that is a public key, thereby obtaining the first information.
Optionally, after receiving the first encryption information, the first device may display a prompt message for prompting a user whether to receive a file. If the first device receives an operation that the user confirms to receive the file, the second communication connection can be established with the electronic device 100 according to the connection parameters of the second communication connection.
In this embodiment, the first information may further include a second password, where the second password is used to encrypt a file to be transmitted subsequently. Optionally, the first information may further include file description information of a target file to be transmitted. The first device may display the file description information after obtaining the first information, so that a user may determine whether to receive a file. Optionally, the file description information may include, but is not limited to, the total number of target files (e.g., 10 files), the total size of the target files (e.g., 10M), and the like.
The electronic device 100 may encrypt the second information according to the second password to obtain second encrypted information. The second information may include a target file to be sent, preview data of the target file to be sent, and the like. After determining that the second communication connection is established with the first device, the electronic device 100 may send the second encrypted information to the first device through the second communication connection. And after receiving the second encrypted information, the first device decrypts the second encrypted information according to the second password to obtain second information. Thus, the target file can be transmitted in an encrypted manner.
Optionally, the second password and the password used for decrypting the second encrypted information are symmetric passwords. That is, the electronic device 100 encrypts second information by using the second password to obtain second encrypted information; and the first equipment decrypts the second encrypted information by using the second password to obtain the second information.
Therefore, various passwords and connection parameters of the second communication connection can be transmitted by using the first communication connection with lower power consumption, and files needing to be transmitted are transmitted by using the second communication connection with higher transmission speed, so that the power consumption of the first equipment for establishing the first communication connection is reduced, and the file transmission speed is ensured. Since both the connection parameters and the file of the second communication connection are encrypted, the possibility of disclosure can also be reduced.
In this embodiment, if the first communication connection is an NFC-based communication connection, when the electronic device 100 is close to a device that needs to receive a file, it may be determined that the device is the first device, and a first communication connection is established with the first device.
In this embodiment, please refer to fig. 3 when the first communication connection is a connection that needs to be established according to a broadcast packet, and fig. 3 is a flowchart illustrating sub-steps included in step S110 in fig. 2. Step S110 may include substeps S111 to substep S115.
And a substep S111 of obtaining at least one broadcast packet by scanning and obtaining a signal strength of each broadcast packet.
In this embodiment, the electronic device 100 may perform scanning for devices supporting the first communication connection according to a certain frequency, so as to obtain at least one broadcast packet, and simultaneously obtain the signal strength of each broadcast packet. The Signal Strength may be RSSI (Received Signal Strength Indication). The scanning speed corresponding to the first communication connection is higher than a third preset value, and the third preset value can be set according to actual requirements, for example, the third preset value is the scanning speed corresponding to the second communication connection. Thus, broadcast packet scanning can be performed at a high scanning speed, and a target file can be transmitted at a high transmission speed.
After the first communication connection function is started, the device supporting the first communication connection transmits a broadcast packet related to the connection parameters of the first communication connection according to a certain frequency. The connection parameters of the first communication connection are determined by the actual connection method. For example, if the first communication connection is a bluetooth connection, after the device turns on a bluetooth function, the device may send a BLE broadcast packet according to a certain frequency, where the BLE broadcast packet may include connection parameters of the first communication connection, and the connection parameters of the first communication connection may include Media Access Control (MAC) address information of the device.
And a substep S112, selecting an alternative broadcast packet with the service identifier as the preset service identifier from the at least one broadcast packet.
In this embodiment, after obtaining the broadcast packets through scanning, the service identifier in each broadcast packet including the service identifier may be compared with the preset service identifier to determine whether the service identifier in each broadcast packet including the service identifier is the same as the preset service identifier. If the broadcast packet is the same as the candidate broadcast packet, the broadcast packet is used as the candidate broadcast packet. The service identifier represents a certain service supported by the device, and if the service is different, the service identifier is different. The preset service identifier may also be included in the electronic device 100.
The alternative broadcast packet may further include a device identifier of the scanned device, a device name, and a connection parameter of the first communication connection. The device Identifier represents a Unique Identifier of the electronic device 100, and may be generated by a GUID (global uniform Identifier) algorithm; the device name may be a name set by a user.
And a substep S113, sorting the device names corresponding to the screened alternative broadcast packets according to the signal intensity of each alternative broadcast packet to obtain a scanning list.
And a substep S114 of displaying the scan list and regarding the scanned device corresponding to the received selection operation as the first device.
After the alternative broadcast packets are determined, sorting the device names corresponding to the screened alternative broadcast packets according to the signal intensity corresponding to each alternative broadcast packet, so as to obtain a scanning list. If the scan list includes the same device name, the device identifiers corresponding to the same device name are different. And then, displaying the scanning list so that a user can determine a certain scanned device as a first device according to the scanning list. Alternatively, the device names in the scan list may be arranged in descending order of signal strength, so that the device name of the scanned device that is most likely to be determined by the user as the first device may be displayed in the most preferred position, thereby facilitating the user to quickly select the first device.
Substep S115, establishing a first communication connection with the first device according to the connection parameter of the first communication connection in the broadcast packet of the first device.
In this embodiment, if the scanning is still continued after the scan list is obtained, it can be determined whether to update the obtained scan list according to the newly obtained broadcast packet. And if the scanning list needs to be updated, updating the obtained scanning list according to the newly obtained broadcast packet and the corresponding signal strength.
When a new broadcast packet is obtained, it may be first determined whether the new broadcast packet includes a service identifier and whether the included service identifier is the preset service identifier. If the new broadcast packet does not include the service identifier, or the service identifier in the new broadcast packet is not the preset service identifier, it is determined that there is no newly added scanned device, and the obtained scanning list does not need to be updated.
If the service identifier in the new broadcast packet is the preset service identifier, determining whether the device identifier included in the new broadcast packet is the device identifier corresponding to the device name in the obtained scan list. If yes, determining that no new scanned equipment exists, and not updating the obtained scanning list.
If not, determining that a new scanned device exists, and adding the device name of the new scanned device to the obtained scan list according to the signal intensity corresponding to the new scanned device. For example, the device names in the obtained scan list are sorted from high to low according to the signal strength, and it is assumed that the obtained scan list includes the following contents: device 1, device 2, device 3; if the signal strength corresponding to the newly added scanned device 4 is between the signal strengths of the devices 1 and 2, the device name of the scanned device 4 may be recorded between the devices 1 and 2, and the original sequence is not modified, so as to obtain a scan list in which the device names are sequenced as the devices 1, 4, 2, and 3.
And if the scanning list comprises the device names of the scanned devices which are not scanned for the continuous preset times, deleting the device names of the scanned devices which are not scanned for the continuous preset times from the scanning list. Thus, inclusion of useless device names in the scan list can be avoided. The preset times can be set according to actual requirements, for example, set to 3 times.
Referring to fig. 4, fig. 4 is a second schematic flow chart of a file transmission method according to an embodiment of the present application. The method may further include steps S150 to S190.
Step S150, a broadcast packet is transmitted.
In this embodiment, when the electronic device 100 is used as a file receiving device and the second device is used as a file transmitting device, the electronic device 100 may transmit the broadcast packet according to a certain frequency after the function of the first communication connection is turned on. The broadcast packet may include a service identifier, a device identifier, and a connection parameter of the first communication connection. The service identifier in the broadcast packet may be a preset service identifier. Optionally, the broadcast packet may further include a device name. The power consumption of the first communication connection is lower than the first preset value, so that the power consumption of the electronic device 100 serving as a file receiving device for transmitting the broadcast packet can be ensured to be low, and the power consumption of the electronic device 100 for establishing the first communication connection is reduced. That is, this approach may reduce power consumption used by the electronic device 100 to maintain a state discovered by a second device.
Step S160, when a connection request sent by a second device according to the connection parameter of the first communication connection is received, establishing a first communication connection with the second device, so that the second device obtains a third password stored in the electronic device 100 through the first communication connection.
Step S170, after receiving third encrypted information obtained by encrypting the third information according to the third password and sent by the second device through the first communication connection, decrypting the third encrypted information according to the third password to obtain third information in the third encrypted information, and prompting a user whether to receive a file.
Optionally, in an implementation manner of this embodiment, the third password and the password used in decrypting the third encrypted information are symmetric passwords. In another implementation manner of this embodiment, the third password is a public key, that is, the third encrypted information is obtained by the second device encrypting the third information by using the third password as a public key, and at this time, the electronic device 100 may decrypt the third encrypted information according to a private key corresponding to the third password, so as to obtain the third information. The electronic device 100 may store a digital certificate using public encryption technology in advance, and use a public key of the digital certificate as the third password. Wherein the third information may include a fourth password and connection parameters of the second communication connection. Optionally, the third information may further include file description information of the target file to be transmitted.
Step S180, if receiving an operation of the user to confirm to receive the file, establishing a second communication connection with the second device according to the connection parameter of the second communication connection.
Step S190, receiving fourth encrypted information obtained by encrypting fourth information according to the fourth password, which is sent by the second device through the second communication connection, and decrypting the fourth encrypted information according to the fourth password to obtain a target file in the fourth information.
For the description of step S150 to step S190, reference may be made to the above detailed description of step S110 to step S130, which is not repeated herein.
Referring to fig. 5, fig. 5 is a third schematic flow chart of a file transmission method according to an embodiment of the present application. The method is applied to the sending equipment and the receiving equipment. The following describes a flow of a file transfer method applied to a transmitting device and a receiving device.
Step S210, the sending device establishes a first communication connection with the receiving device, and obtains a first password stored in the receiving device through the first communication connection.
Step S220, the sending device encrypts first information according to the first password to obtain first encrypted information, and sends the first encrypted information to the receiving device through the first communication connection.
The first information comprises a second password and connection parameters of a second communication connection, the power consumption of the first communication connection is lower than a first preset value, and the transmission speed of the second communication connection is higher than a second preset value.
Step S230, the receiving device establishes a second communication connection with the sending device according to the connection parameter of the second communication connection.
Step S240, the sending device encrypts second information according to the second password to obtain second encrypted information, and sends the second encrypted information to the receiving device through the second communication connection, so that the receiving device decrypts the second encrypted information according to the second password to obtain the target file in the second information.
For the description of the file transmission method applied to the sending device and the receiving device, reference may be made to the above detailed description of the file transmission method applied to the electronic device 100, which is not repeated herein.
In order to execute the corresponding steps in the above embodiments and various possible manners, an implementation manner of the file transfer device 200 is given below, and optionally, the file transfer device 200 may adopt the device structure of the electronic device 100 shown in fig. 1. Further, referring to fig. 6, fig. 6 is a block diagram of a file transfer device 200 according to an embodiment of the present disclosure. The file transmission apparatus 200 is applied to the electronic device 100. It should be noted that the basic principle and the generated technical effects of the file transmission device 200 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and corresponding contents in the above embodiments may be referred to. The file transfer apparatus 200 may include: a first communication module 210, a first encryption module 220, and a second encryption module 230.
The first communication module 210 is configured to establish a first communication connection with a first device, and obtain a first password stored in the first device through the first communication connection.
The first encryption module 220 is configured to encrypt first information according to the first password to obtain first encrypted information, and send the first encrypted information to the first device through the first communication connection, so as to establish a second communication connection with the first device. The first information comprises a second password and connection parameters of a second communication connection, the power consumption of the first communication connection is lower than a first preset value, and the transmission speed of the second communication connection is higher than a second preset value.
The second encryption module 230 is configured to encrypt second information according to the second password to obtain second encrypted information, and send the second encrypted information to the first device through the second communication connection, so that the first device decrypts the second encrypted information according to the second password to obtain a target file in the second information.
Referring to fig. 7, fig. 7 is a second block diagram of a file transfer device 200 according to an embodiment of the present application. The file transfer apparatus 200 may further include: a broadcasting module 250, a second communication module 260, a first decryption module 270, and a second decryption module 280.
The broadcasting module 250 is configured to send a broadcast packet. The broadcast packet includes a service identifier, a device identifier, and a connection parameter of the first communication connection.
The second communication module 260 is configured to, when a connection request sent by a second device according to the connection parameters of the first communication connection is received, establish a first communication connection with the second device, so that the second device obtains a third password stored in the electronic device 100 through the first communication connection.
The first decryption module 270 is configured to, after receiving third encrypted information sent by the second device through the first communication connection, decrypt the third encrypted information according to the third password, obtain third information in the third encrypted information, and prompt a user whether to receive a file. And the third information comprises a fourth password and connection parameters of the second communication connection.
The second communication module 260 is further configured to establish a second communication connection with the second device according to the connection parameter of the second communication connection when receiving an operation of confirming to receive a file by a user.
The second decryption module 280 is configured to receive fourth encrypted information, which is obtained by encrypting fourth information according to the fourth password and is sent by the second device through the second communication connection, and decrypt the fourth encrypted information according to the fourth password to obtain a target file in the fourth information.
Alternatively, the modules may be stored in the memory 110 shown in fig. 1 in the form of software or Firmware (Firmware) or be fixed in an Operating System (OS) of the electronic device 100, and may be executed by the processor 120 in fig. 1. Meanwhile, data, codes of programs, and the like required to execute the above-described modules may be stored in the memory 110.
An embodiment of the present application further provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the file transmission method described in the above is implemented.
In summary, the present application provides a file transmission method, a file transmission device, an electronic device, and a readable storage medium. First, a first communication connection is established with a first device, and then a first password stored by the first device is acquired through the first communication connection. And then encrypting first information comprising a second password and connection parameters of second communication connection according to the first password to obtain first encrypted information, and sending the first encrypted information to the first equipment through the first communication connection so as to establish second communication connection with the first equipment. The power consumption of the first communication connection is lower than a first preset value, and the transmission speed of the second communication connection is higher than a second preset value. And finally, encrypting second information comprising the target file according to the second password to obtain second encrypted information, and sending the second encrypted information to the first equipment through the second communication connection, so that the first equipment decrypts the second encrypted information according to the second password to obtain the target file. Therefore, various passwords and second communication connection parameters can be transmitted through the first communication connection with lower power consumption, and the encrypted target file is transmitted through the second communication connection with higher transmission speed, so that the possibility of information leakage is reduced, and the transmission efficiency of the target file is ensured.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A file transmission method is applied to electronic equipment, and the method comprises the following steps:
establishing a first communication connection with a first device, and acquiring a first password stored by the first device through the first communication connection;
encrypting first information according to the first password to obtain first encrypted information, and sending the first encrypted information to the first equipment through the first communication connection so as to establish a second communication connection with the first equipment, wherein the first information comprises a second password and connection parameters of the second communication connection, the power consumption of the first communication connection is lower than a first preset value, and the transmission speed of the second communication connection is higher than a second preset value;
and encrypting second information according to the second password to obtain second encrypted information, and sending the second encrypted information to the first equipment through the second communication connection, so that the first equipment decrypts the second encrypted information according to the second password to obtain a target file in the second information.
2. The method of claim 1, wherein establishing the first communication connection with the first device comprises:
obtaining at least one broadcast packet through scanning, and obtaining the signal strength of each broadcast packet, wherein the scanning speed corresponding to the first communication connection is higher than a third preset value;
screening an alternative broadcast packet with a service identifier as a preset service identifier from the at least one broadcast packet, wherein the alternative broadcast packet comprises the service identifier, the device name and the connection parameter of the first communication connection of the scanned device;
sorting the device names corresponding to the screened alternative broadcast packets according to the signal intensity of each alternative broadcast packet to obtain a scanning list;
displaying the scanning list, and taking the scanned equipment corresponding to the received selection operation as the first equipment;
and establishing a first communication connection with the first equipment according to the connection parameter of the first communication connection in the broadcast packet of the first equipment.
3. The method of claim 2, wherein establishing the first communication connection with the first device further comprises:
when a new broadcast packet is obtained by continuing scanning, judging whether a newly added scanned device exists or not, and judging whether the scanning list comprises the device name of the scanned device which is not scanned for the continuous preset times or not, wherein the broadcast packet of the newly added scanned device comprises the preset service identification;
if the newly added scanned equipment exists, adding the equipment name of the newly added scanned equipment into the scanning list according to the signal intensity corresponding to the newly added scanned equipment;
and if the scanning list comprises the device names of the scanned devices which are not scanned for the continuous preset times, deleting the device names of the scanned devices which are not scanned for the continuous preset times from the scanning list.
4. The method of claim 1, further comprising:
sending a broadcast packet, wherein the broadcast packet comprises a service identifier, a device identifier and a connection parameter of a first communication connection;
when a connection request sent by second equipment according to the connection parameters of the first communication connection is received, establishing a first communication connection with the second equipment so that the second equipment can acquire a third password stored by the electronic equipment through the first communication connection;
after third encrypted information which is sent by the second device through the first communication connection and obtained by encrypting the third information according to the third password is received, decrypting the third encrypted information according to the third password to obtain third information in the third encrypted information, and prompting a user whether to receive a file, wherein the third information comprises a fourth password and connection parameters of a second communication connection;
if receiving an operation that a user confirms to receive a file, establishing a second communication connection with the second equipment according to the connection parameters of the second communication connection;
and receiving fourth encrypted information which is obtained by encrypting fourth information according to the fourth password and is sent by the second device through the second communication connection, and decrypting the fourth encrypted information according to the fourth password to obtain a target file in the fourth information.
5. The method according to claim 4, wherein the third password is a public key, the third encrypted information is obtained by the second device encrypting the third information by using the third password as the public key, and the decrypting the third encrypted information according to the third password comprises:
and decrypting the third encrypted information according to a private key corresponding to the third password.
6. A file transmission method is applied to a sending device and a receiving device, and comprises the following steps:
the sending equipment and the receiving equipment establish first communication connection, and a first password stored by the receiving equipment is acquired through the first communication connection;
the sending equipment encrypts first information according to the first password to obtain first encrypted information, and sends the first encrypted information to the receiving equipment through the first communication connection, wherein the first information comprises a second password and connection parameters of second communication connection, the power consumption of the first communication connection is lower than a first preset value, and the transmission speed of the second communication connection is higher than a second preset value;
the receiving equipment establishes a second communication connection with the sending equipment according to the connection parameters of the second communication connection;
and the sending equipment encrypts second information according to the second password to obtain second encrypted information, and sends the second encrypted information to the receiving equipment through the second communication connection, so that the receiving equipment decrypts the second encrypted information according to the second password to obtain a target file in the second information.
7. A file transmission device is applied to electronic equipment, and the device comprises:
the first communication module is used for establishing first communication connection with first equipment and acquiring a first password stored by the first equipment through the first communication connection;
the first encryption module is used for encrypting first information according to the first password to obtain first encrypted information, and sending the first encrypted information to the first equipment through the first communication connection so as to establish second communication connection with the first equipment, wherein the first information comprises a second password and connection parameters of the second communication connection, the power consumption of the first communication connection is lower than a first preset value, and the transmission speed of the second communication connection is higher than a second preset value;
and the second encryption module is used for encrypting second information according to the second password to obtain second encrypted information, and sending the second encrypted information to the first equipment through the second communication connection, so that the first equipment decrypts the second encrypted information according to the second password to obtain a target file in the second information.
8. The apparatus of claim 7, further comprising:
the system comprises a broadcast module, a service module and a communication module, wherein the broadcast module is used for sending a broadcast packet, and the broadcast packet comprises a service identifier, an equipment identifier and connection parameters of first communication connection;
the second communication module is used for establishing first communication connection with second equipment when receiving a connection request sent by the second equipment according to the connection parameters of the first communication connection, so that the second equipment can acquire a third password stored in the electronic equipment through the first communication connection;
the first decryption module is used for decrypting the third encrypted information according to the third password after receiving the third encrypted information which is sent by the second device through the first communication connection and is obtained by encrypting the third information according to the third password, obtaining the third information in the third encrypted information, and prompting a user whether to receive a file, wherein the third information comprises a fourth password and connection parameters of a second communication connection;
the second communication module is further configured to establish a second communication connection with the second device according to the connection parameters of the second communication connection when receiving an operation of confirming to receive a file by a user;
and the second decryption module is used for receiving fourth encrypted information which is sent by the second device through the second communication connection and is obtained by encrypting fourth information according to the fourth password, and decrypting the fourth encrypted information according to the fourth password to obtain a target file in the fourth information.
9. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to implement the file transfer method of any one of claims 1 to 5.
10. A readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing a file transfer method according to any one of claims 1 to 5.
CN202010095209.6A 2020-02-14 2020-02-14 File transmission method and device, electronic equipment and readable storage medium Pending CN113271324A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010095209.6A CN113271324A (en) 2020-02-14 2020-02-14 File transmission method and device, electronic equipment and readable storage medium
PCT/CN2021/075987 WO2021160084A1 (en) 2020-02-14 2021-02-08 File transmission method and apparatus, electronic device, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010095209.6A CN113271324A (en) 2020-02-14 2020-02-14 File transmission method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113271324A true CN113271324A (en) 2021-08-17

Family

ID=77227373

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010095209.6A Pending CN113271324A (en) 2020-02-14 2020-02-14 File transmission method and device, electronic equipment and readable storage medium

Country Status (2)

Country Link
CN (1) CN113271324A (en)
WO (1) WO2021160084A1 (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1333351A1 (en) * 2002-01-31 2003-08-06 Culture. Com. Technology (Macau) Ltd. System and method for electronic file transmission
CN101056171A (en) * 2006-06-20 2007-10-17 华为技术有限公司 An encryption communication method and device
CN101222521A (en) * 2008-01-21 2008-07-16 中兴通讯股份有限公司 File transfer method based on conversation launching protocol
CN101631305A (en) * 2009-07-28 2010-01-20 交通银行股份有限公司 Encryption method and system
CN102412875A (en) * 2011-12-26 2012-04-11 中兴通讯股份有限公司 File sending and receiving method and device as well as file transmission method and system
CN102682506A (en) * 2012-05-25 2012-09-19 北京华大信安科技有限公司 Intelligent Bluetooth door access control method and device based on symmetric cryptographic technique
JP2014075014A (en) * 2012-10-04 2014-04-24 Digital Arts Inc Electronic file transmission system, program and transmission method of electronic file
CN105357666A (en) * 2014-08-20 2016-02-24 中兴通讯股份有限公司 WIFI (Wireless Fidelity) password sharing method and terminals
CN105376708A (en) * 2015-10-09 2016-03-02 广东欧珀移动通信有限公司 A connecting method and system allowing a Bluetooth apparatus to select a target apparatus
CN105472038A (en) * 2016-01-07 2016-04-06 腾讯科技(深圳)有限公司 Control method, control apparatus and control system for file transmission
CN105554062A (en) * 2015-11-30 2016-05-04 东莞酷派软件技术有限公司 Method, associated device and system of file transmission
WO2018049759A1 (en) * 2016-09-13 2018-03-22 广州视睿电子科技有限公司 File transmission method and system
CN108462953A (en) * 2018-03-30 2018-08-28 北京金山安全软件有限公司 File transmission method and device, electronic equipment and storage medium
CN109862549A (en) * 2019-03-28 2019-06-07 南昌黑鲨科技有限公司 Bluetooth connecting method, device, readable storage medium storing program for executing and mobile device
CN110278080A (en) * 2019-07-11 2019-09-24 珠海格力电器股份有限公司 Method, system and the computer readable storage medium of data transmission

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107148016A (en) * 2017-04-20 2017-09-08 宇龙计算机通信科技(深圳)有限公司 Terminal connection method, device and electronic equipment
CN109803249A (en) * 2019-02-25 2019-05-24 努比亚技术有限公司 A kind of WIFI network sharing method, terminal and computer readable storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1333351A1 (en) * 2002-01-31 2003-08-06 Culture. Com. Technology (Macau) Ltd. System and method for electronic file transmission
CN101056171A (en) * 2006-06-20 2007-10-17 华为技术有限公司 An encryption communication method and device
CN101222521A (en) * 2008-01-21 2008-07-16 中兴通讯股份有限公司 File transfer method based on conversation launching protocol
CN101631305A (en) * 2009-07-28 2010-01-20 交通银行股份有限公司 Encryption method and system
CN102412875A (en) * 2011-12-26 2012-04-11 中兴通讯股份有限公司 File sending and receiving method and device as well as file transmission method and system
CN102682506A (en) * 2012-05-25 2012-09-19 北京华大信安科技有限公司 Intelligent Bluetooth door access control method and device based on symmetric cryptographic technique
JP2014075014A (en) * 2012-10-04 2014-04-24 Digital Arts Inc Electronic file transmission system, program and transmission method of electronic file
CN105357666A (en) * 2014-08-20 2016-02-24 中兴通讯股份有限公司 WIFI (Wireless Fidelity) password sharing method and terminals
CN105376708A (en) * 2015-10-09 2016-03-02 广东欧珀移动通信有限公司 A connecting method and system allowing a Bluetooth apparatus to select a target apparatus
CN105554062A (en) * 2015-11-30 2016-05-04 东莞酷派软件技术有限公司 Method, associated device and system of file transmission
CN105472038A (en) * 2016-01-07 2016-04-06 腾讯科技(深圳)有限公司 Control method, control apparatus and control system for file transmission
WO2018049759A1 (en) * 2016-09-13 2018-03-22 广州视睿电子科技有限公司 File transmission method and system
CN108462953A (en) * 2018-03-30 2018-08-28 北京金山安全软件有限公司 File transmission method and device, electronic equipment and storage medium
CN109862549A (en) * 2019-03-28 2019-06-07 南昌黑鲨科技有限公司 Bluetooth connecting method, device, readable storage medium storing program for executing and mobile device
CN110278080A (en) * 2019-07-11 2019-09-24 珠海格力电器股份有限公司 Method, system and the computer readable storage medium of data transmission

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李秀广: "文件加密传输系统的设计与JAVA实现", 《科技创新导报》 *
马捷等: "基于近场通信的WiFi传输连接方案", 《计算机工程》 *

Also Published As

Publication number Publication date
WO2021160084A1 (en) 2021-08-19

Similar Documents

Publication Publication Date Title
CN106162602B (en) Method and device for downloading configuration file of group device
US11025611B2 (en) Method and apparatus of constructing secure infra-structure for using embedded universal integrated circuit card
US9571464B2 (en) Network-enabled device provisioning
KR102082854B1 (en) Methods, servers, and systems for downloading updated profiles
WO2015081882A1 (en) Method and apparatus for downloading operator document
US11265962B2 (en) Communication device and computer programs for communication device establishing a wireless connection with an external device in a state in which another wireless connection has been established with another external device
US20020147819A1 (en) Method of wireless LAN parameter setting by direct contact or proximity connection between communication devices
CN110557305B (en) Method, equipment and computer readable storage medium for accessing wireless router
CN102739642A (en) Permitting access to a network
CN101997906B (en) Communication system, management apparatus, user apparatus and method of controlling same
CN111246539A (en) Networking binding method of intelligent household appliance, intelligent household appliance and user terminal
EP3537652B1 (en) Method for securely controlling smart home appliance and terminal device
CN112219384B (en) Method and apparatus for installing and managing configuration files using a messaging service
CN102739643A (en) Permitting access to a network
KR20170115609A (en) a remote subscription management method of the eUICC,
EP2874422A1 (en) Simplified Wi-Fi setup
CN104507141A (en) File receiving method for client side and receiver client side
CN106465107A (en) Authorization method and apparatus for management of embedded universal integrated circuit card
US11844007B2 (en) Ecosystem-based wireless network setup
CN111726801B (en) Network security control method
JP5721183B2 (en) Wireless LAN communication system, wireless LAN base unit, communication connection establishment method, and program
JP7196533B2 (en) Communication device and computer program for the communication device
CN104507176A (en) File sending method for client side and sender client side
US20160044028A1 (en) Message authentication
CN113271324A (en) File transmission method and device, electronic equipment and readable storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210817

RJ01 Rejection of invention patent application after publication