CN108243481B - File transmission method and device - Google Patents

File transmission method and device Download PDF

Info

Publication number
CN108243481B
CN108243481B CN201810054347.2A CN201810054347A CN108243481B CN 108243481 B CN108243481 B CN 108243481B CN 201810054347 A CN201810054347 A CN 201810054347A CN 108243481 B CN108243481 B CN 108243481B
Authority
CN
China
Prior art keywords
access information
local area
area network
wireless local
sending
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.)
Active
Application number
CN201810054347.2A
Other languages
Chinese (zh)
Other versions
CN108243481A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810054347.2A priority Critical patent/CN108243481B/en
Publication of CN108243481A publication Critical patent/CN108243481A/en
Application granted granted Critical
Publication of CN108243481B publication Critical patent/CN108243481B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B11/00Transmission systems employing sonic, ultrasonic or infrasonic waves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Abstract

The invention relates to a file transmission method and device, and relates to the technical field of wireless communication. The method comprises the following steps: acquiring access information of a wireless local area network hotspot in sending equipment; generating an audio signal containing the access information and playing the audio signal; after establishing wireless local area network connection between the audio signal and receiving equipment, sending a file to the receiving equipment through the wireless local area network connection; in the process, the matching and connection operation of the two devices is not required to be manually executed by a user, so that the connection establishment process is simplified, the connection establishment time is shortened, and the file transmission efficiency is improved.

Description

File transmission method and device
Technical Field
The present invention relates to the field of wireless communications technologies, and in particular, to a file transmission method and apparatus.
Background
With the continuous development of mobile communication devices, file transmission between different mobile communication devices (such as mobile phones) has become a common scene in daily work and life.
In the related art, when the distance between two mobile communication devices is short, the two mobile communication devices can perform direct communication in a short-range wireless communication manner such as bluetooth, so as to transfer files between the two mobile communication devices. For example, taking communication through bluetooth as an example, users corresponding to two mobile communication devices respectively open bluetooth functions in their respective mobile communication devices to scan surrounding bluetooth devices, the users manually select an opposite device from a scanned device list to initiate matching, after matching is successful and bluetooth connection is established, a sender user selects a file to be sent from the corresponding mobile communication device and clicks to send, and a mobile communication device corresponding to a receiver user receives the file through bluetooth connection.
However, in the related art, before the file is transmitted through the bluetooth function, the user needs to manually perform the bluetooth matching operation, the matching procedure is complicated, and much matching time is consumed, which results in low efficiency of file transmission.
Disclosure of Invention
The embodiment of the invention provides a file transmission method and a file transmission device, which can be used for solving the problem of low file transmission efficiency in the related technology, and the technical scheme is as follows:
in one aspect, a file transfer method is provided, where the file transfer method is used in a sending device, and the method includes:
acquiring access information of a wireless local area network hotspot in the sending equipment, wherein the access information comprises a hotspot identification and an access password;
generating an audio signal containing the access information;
playing the audio signal, wherein the audio signal is used for receiving equipment to access a wireless local area network hotspot;
and after establishing wireless local area network connection between the audio signal and the receiving equipment, sending a file to the receiving equipment through the wireless local area network connection.
In another aspect, a file transmission method is provided, which is used in a receiving device, and includes:
collecting audio signals played by sending equipment;
analyzing and obtaining access information of a wireless local area network hotspot in the sending equipment from the audio signal, wherein the access information comprises a hotspot identification and an access password;
accessing the wireless local area network hotspot according to the access information to establish wireless local area network connection with the sending equipment;
and receiving the file sent by the sending equipment through the wireless local area network connection.
In still another aspect, a file transfer apparatus is provided, which is used in a sending device, and includes:
the access information acquisition module is used for acquiring access information of a wireless local area network hotspot in the sending equipment, wherein the access information comprises a hotspot identification and an access password;
the audio signal generating module is used for generating an audio signal containing the access information;
the playing module is used for playing the audio signal, and the audio signal is used for receiving equipment to access a wireless local area network hotspot;
and the sending module is used for sending a file to the receiving equipment through the wireless local area network connection after establishing the wireless local area network connection between the audio signal and the receiving equipment.
In still another aspect, there is provided a file transfer apparatus for use in a receiving device, the apparatus including:
the acquisition module is used for acquiring the audio signal played by the sending equipment;
the analysis module is used for analyzing and obtaining access information of a wireless local area network hotspot in the sending equipment from the audio signal, wherein the access information comprises a hotspot identifier and an access password;
the access module is used for accessing the wireless local area network hotspot according to the access information so as to establish wireless local area network connection with the sending equipment;
and the receiving module is used for receiving the file sent by the sending equipment through the wireless local area network connection.
In yet another aspect, a computer device is provided, comprising a processor and a memory, wherein at least one instruction, at least one program, set of codes, or set of instructions is stored in the memory, and is loaded and executed by the processor to implement the above file transfer method.
In yet another aspect, a computer-readable storage medium is provided, having stored therein at least one instruction, at least one program, set of codes, or set of instructions that is loaded and executed by a processor to implement the above-described file transfer method.
The technical scheme provided by the invention can have the following beneficial effects:
the method comprises the steps that the sending equipment acquires access information of a wireless local area network hotspot in the sending equipment, generates an audio signal containing the access information and plays the audio signal; after the wireless local area network connection between the sending equipment and the receiving equipment is established, sending a file to the receiving equipment through the wireless local area network connection; in the process, the matching and connection operation of the two devices is not required to be manually executed by a user, so that the connection establishment process is simplified, the connection establishment time is shortened, and the file transmission efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a block diagram of a file transfer system according to an exemplary embodiment;
FIG. 2 is a schematic flow diagram illustrating a file transfer according to an exemplary embodiment;
FIG. 3 is a schematic flow diagram illustrating another file transfer according to an example embodiment;
FIG. 4 is a flow diagram illustrating a file transfer method in accordance with an exemplary embodiment;
FIG. 5 is a diagram illustrating a file sending operation according to the embodiment shown in FIG. 4;
FIG. 6 is a schematic diagram of the encoding and decoding of the Solomon encoding algorithm according to the embodiment shown in FIG. 4;
FIG. 7 is a schematic diagram of another file sending operation according to the embodiment shown in FIG. 4;
FIG. 8 is a pitch frequency table according to the embodiment of FIG. 4;
FIG. 9 is a table of odd-numbered and even-numbered character correspondences according to the embodiment shown in FIG. 4;
FIG. 10 is a table of character-frequency codes according to the embodiment shown in FIG. 4;
fig. 11 is a schematic flowchart of playing access information by the sending device according to the embodiment shown in fig. 4;
FIG. 12 is a flow chart of audio information generation according to the embodiment shown in FIG. 4;
fig. 13 is a schematic diagram of access information recovery according to the embodiment shown in fig. 4;
fig. 14 is a schematic flow chart of a receiving device parsing access information according to the embodiment shown in fig. 4;
FIG. 15 is a schematic diagram of a file transfer according to the embodiment shown in FIG. 4;
FIG. 16 is a flowchart illustrating a file transfer in accordance with an exemplary embodiment;
fig. 17 is a block diagram showing a configuration of a file transfer apparatus according to an exemplary embodiment;
fig. 18 is a block diagram showing the construction of a file transfer apparatus according to an exemplary embodiment;
FIG. 19 is a block diagram illustrating the structure of a computer device according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Reference is now made to fig. 1, which is a block diagram illustrating a file transfer system in accordance with an exemplary embodiment. As shown in fig. 1, the file transfer system includes a transmitting device 110 and a receiving device 120.
The sending device 110 is a computer device having a WLAN (Wireless Local Area network) hotspot function, for example, the sending device 110 may be a mobile communication terminal such as a smart phone, a tablet computer, an e-book reader, or the sending device 110 may also be an intelligent wearable device such as a smart watch, a smart band, or smart glasses, or the sending device 110 may also be a personal computer such as a notebook computer or a desktop personal computer installed with a Wireless network card.
The receiving device 120 may be a computer device having a wireless local area network access function, for example, the sending device 110 may be a mobile communication terminal such as a smart phone, a tablet computer, and an electronic book reader, or the sending device 110 may also be an intelligent wearable device such as a smart watch, a smart band, or smart glasses, or the sending device 110 may also be a personal computer such as a notebook computer or a desktop personal computer installed with a wireless network card.
Wherein the sending device 110 and the receiving device 120 may be the same type of computer device, for example, the sending device 110 and the receiving device 120 may both be smart phones.
Alternatively, the sending device 110 and the receiving device 120 may be different types of computer devices, for example, the sending device 110 may be a smartphone and the receiving device 120 may be a tablet computer or the like.
In addition, the sending device 110 also has a sound playing function, for example, a speaker assembly is included in the sending device 110.
The receiving device 120 also has a sound collection function, for example, a microphone assembly is included in the receiving device 120.
With respect to the wide application of bluetooth, infrared and NFC (Near Field Communication), acoustic Communication is generally ignored by people, and in fact can be used as an excellent way of handshaking Communication, and one device can interact with nearby devices without any connection or matching.
When a certain device A starts the wireless local area network hotspot function, a nearby device B supporting the wireless local area network protocol can access the device A and access the network through the device A. In this process, device a acts as a wireless access point, acting like a router or home gateway.
Based on the characteristics of the sound wave communication and the wireless local area network hot spot function, an embodiment of the present invention provides a scheme for quickly performing file transmission between two devices, and the scheme may be as shown in fig. 2 and fig. 3.
FIG. 2 is a schematic diagram illustrating a flow of file transfers, according to an example embodiment. As shown in fig. 2, in the file transfer process, the steps executed by the sending device side may include:
step 21, obtaining access information of the wireless local area network hotspot in the sending equipment.
The access information comprises a hotspot identification and an access password; the hotspot identification may be an SSID (Service Set Identifier) of the wireless local area network hotspot.
Step 22, generating an audio signal containing the access information.
And step 23, playing an audio signal, wherein the audio signal is used for accessing the receiving equipment to the wireless local area network hotspot.
And 24, after establishing the wireless local area network connection with the receiving equipment based on the audio signal, sending a file to the receiving equipment through the wireless local area network connection.
The wireless local area network connection is established when the receiving equipment accesses the wireless local area network hotspot according to the access information carried in the audio signal.
FIG. 3 is a schematic flow diagram illustrating another file transfer according to an example embodiment. As shown in fig. 3, in the file transmission process, the steps executed by the receiving device side may include:
and step 31, collecting the audio signal played by the sending equipment.
And step 32, analyzing and obtaining the access information of the wireless local area network hotspot in the sending equipment from the audio signal.
And step 33, accessing the wireless local area network hotspot according to the access information to establish wireless local area network connection with the sending equipment.
And step 34, receiving the file sent by the sending device through the wireless local area network connection.
According to the scheme shown in fig. 2 and fig. 3, a wireless local area network hotspot is established on the side of the sending device, the sending device plays the identification and the password of the wireless local area network hotspot through audio, the receiving device acquires the audio played by the sending device, obtains the identification and the password of the wireless local area network hotspot through analysis of the audio, accesses the wireless local area network hotspot according to the identification and the password of the wireless local area network hotspot to establish wireless local area network connection between the sending device and the receiving device, and transmits files through the wireless local area network connection between the sending device and the receiving device.
According to the embodiment of the invention, a fast, stable and zero-flow file transmission scheme can be realized on the basis of sound wave communication, namely, file transmission can be realized among a plurality of devices under the condition of no communication channel connection such as the Internet, Bluetooth and infrared rays, the flow resources of a sending device and a receiving device are not consumed, complicated matching steps such as Bluetooth connection are not required, wireless local area network connection is directly established among sound wave communication trigger devices, and file transmission is carried out.
The schemes shown in fig. 2 and 3 may be implemented by third-party Applications (APP) installed in the transmitting device and the receiving device, respectively.
FIG. 4 is a flow diagram illustrating a file transfer method in accordance with an exemplary embodiment. The file transfer method can be applied to file transfer in a short distance in the file transfer system shown in fig. 1. As shown in fig. 4, the file transfer method may include the following steps:
step 401, a sending device obtains access information of a wireless local area network hotspot in the sending device.
The access information comprises a hotspot identification and an access password; the hotspot identification may be an SSID of a wireless local area network hotspot, and the hotspot identification and the access password may be an SSID and an access password of a wireless local area network hotspot function preset in the sending device by the user.
Optionally, when receiving the instruction to send the file, the sending device obtains access information of a wireless local area network hotspot in the sending device.
In the embodiment of the present invention, when a file needs to be sent to the sending device, a user corresponding to the sending device may execute an operation of sending a certain specified file in the sending device to send an instruction to send the file, and at this time, after receiving the instruction, the sending device may obtain access information such as an SSID and an access password of a wireless local area network hotspot in the sending device.
Referring to fig. 5, which shows a file sending operation diagram according to an embodiment of the present invention, as shown in fig. 5, a user a corresponding to a sending device a needs to send a file 1 in the sending device a to a receiving device B, the user a operates the sending device a to display a file selection interface, and selects the file 1 in the file selection interface 50, the sending device a pops out a sending method selection box 51 in the selection interface 50, and after the user a selects a file fast transmission option 51a in the sending method selection box 51, the sending device a may acquire an SSID and an access password of a wireless local area network hotspot in the sending device a as access information.
In the embodiment of the present invention, when acquiring the access information, the sending device may determine whether the wlan hotspot function in the sending device is turned on, and if the wlan hotspot function in the sending device is turned on, directly acquire the access information of the wlan hotspot function; if the wireless local area network hotspot function in the sending device is not started, the sending device may start the wireless local area network hotspot function.
When the wireless local area network hotspot function is started, the sending device can judge whether the permission (such as a super user permission or a root permission) for automatically starting the wireless local area network hotspot function exists, and if the permission exists, the sending device automatically starts the wireless local area network hotspot function; if the wireless local area network hotspot function is not automatically started, the sending equipment can display a guide interface to guide a user to start the wireless local area network hotspot function; after the wireless local area network hotspot function is started, the sending equipment acquires access information of the wireless local area network hotspot function.
In the whole process of the scheme shown in the embodiment of the invention, the audio transmission of the access information of the wireless local area network hotspot and the digital decoding of the audio information are key steps. The embodiment of the invention can generate audio information from the original data (namely the access information) through a specific algorithm, then convert the audio information into sound waves by playing the audio information, send the access information to the nearby receiving equipment, record the audio information after the nearby receiving equipment receives the specially processed audio information, and restore the audio data into the original data through a corresponding decoding algorithm. The sound wave transmission process of the access information is described in the following steps.
Step 402, the sending device encodes the access information according to a preset encoding mode to obtain encoded access information.
Optionally, when the access information is encoded according to a preset encoding mode and the encoded access information is obtained, the sending device converts the access information into hexadecimal data; and coding the hexadecimal data according to a Reed-Solomon coding algorithm to obtain coded information.
Reed-solomon codes (also called solomon codes) are channel codes for forward error correction, which is a technique for controlling transmission errors in a unidirectional communication system by transmitting additional information along with data for error recovery to improve the data transmission success rate, which is effective for polynomials generated by correcting oversampled data.
The scheme shown in the embodiment of the invention carries out the Solomon coding on the transmitted data, reduces the error rate of the transmitted data, and prevents the audio information from being interfered by external sound when being played or data transmission errors caused by the difference of equipment.
In the embodiment of the present invention, the original data (i.e., the access information) may be represented as a positive integer, which includes a hotspot name (i.e., SSID) and a password. Since the solomon code is a fixed-length code and each codeword is a hexadecimal number, in the embodiment of the present invention, the original data is first converted into 16-ary data, and after the original data is converted into hexadecimal, an eight-bit hexadecimal number can be obtained. The embodiment of the invention positions the original data to one int number, greatly improves the success rate of sound wave transmission and identification, and simultaneously reduces the complexity of the Solomon code.
Since the solomon code is a forward error correcting channel code, the coding process first redundancies the polynomial at multiple points and then transmits or stores it. When the receiving device correctly receives enough points, the original polynomial can be recovered through the inverse processing (i.e., decoding) of the solomon code.
Please refer to fig. 6, which illustrates a schematic coding/decoding diagram of a solomon coding algorithm according to an embodiment of the present invention. As shown in fig. 6, assuming the source code is 123ABCD, after encryption with the solomon code, the resulting redundancy plus source code is 123ABCDFEDCBA9The underlined part is the redundancy code. After transmission, a 3-bit error code is generated, and the data received by the receiving end becomes 12CAB7DFEECBA9, (error code is underlined), which can restore the data to 123 abcdfeedcba 9 after solomon decoding, and the receiving device can correctly process the result (the above coding is only an example, and is not a true calculation result).
In step 403, the transmitting device generates audio signals with signal frequencies corresponding to the characters in the encoded access information according to the character-frequency encoding table.
The character-frequency encoding table contains the corresponding relation between characters and frequencies.
Optionally, before generating an audio signal whose signal frequency corresponds to each character in the encoded access information according to the character-frequency coding table, the sending device acquires an audio playing mode, where the audio playing mode includes a mute playing mode or a non-mute playing mode, and acquires the character-frequency coding table corresponding to the audio playing mode.
When the audio playing mode is mute playing, in the obtained character-frequency coding table, the frequency corresponding to each character is out of the range of sound frequency which can be heard by human ears (also called ultrasonic frequency or infrasound level rate); when the audio playing mode is non-silent playing, the frequency corresponding to each character is within the range of sound frequency which can be heard by human ears.
In the embodiment of the present invention, the audio signal played by the sending device may be set to be an audio signal that can be heard by human ears (i.e., the frequency of the audio signal is between 20Hz and 20KHz), or may be set to be an audio signal that cannot be heard by human ears (i.e., the frequency of the audio signal is less than 20Hz or greater than 20KHz), so as to meet the requirements of various scenes.
For example, taking the interface shown in fig. 5 as an example, please refer to fig. 7, which shows another file sending operation diagram according to the embodiment of the present invention, as shown in fig. 7, in the embodiment of the invention, the user a corresponding to the sending device a selects the file 1 in the file selection interface 50, and after selecting the file fast-forward option 51a in the transmission mode selection box 51, the transmission apparatus a pops up the play mode selection box 52 in the file selection interface 50, the play mode selection box 52 includes a mute play option 52a and a non-mute play option 52b, when the user a selects the mute play option 52a, the transmitting device a acquires a character-frequency code table containing frequencies corresponding to outside the range of sound frequencies that can be heard by the human ear, whereas, when the user selects the unmuted playback 52b, the transmitting apparatus a acquires a character-frequency code table containing frequencies corresponding to within a range of sound frequencies that can be heard by the human ear.
For example, taking the selection of the user corresponding to the sending device as "non-silent playing" (i.e. sounds audible to human ears) as an example, please refer to fig. 8, which shows a pitch frequency table according to an embodiment of the present invention. In the embodiment of the invention, 32 sound frequencies in the range of 20-20KHz can be intercepted on the pitch frequency table as 32 codes to be corresponding. In which the frequency of sound audible to human ears can be divided into bass, midrange and treble, in the embodiment of the present invention, 32 frequencies of the treble part +33 to +64 can be selected as the frequencies in the character-frequency coding table.
In another possible implementation, if the user's selection corresponding to the sending device is "mute-to-play" (i.e. the sound that is not heard by human ears), 32 tones may be intercepted at frequencies above 20KHz as the frequencies in the character-frequency encoding table.
Optionally, the character-frequency encoding table includes a first encoding table and a second encoding table, where a frequency corresponding to the first encoding table is higher than a frequency corresponding to the second encoding table, or a frequency corresponding to the first encoding table is lower than a frequency corresponding to the second encoding table, and when an audio signal whose signal frequency corresponds to the encoded access information is generated according to the character-frequency encoding table, the transmitting device generates a first audio sub-signal corresponding to an odd-bit character in the encoded access information according to the first encoding table; generating a second audio sub-signal corresponding to even-numbered characters in the coded access information according to a second coding table; and a cross-combination of the first audio sub-signal and the second audio sub-signal is obtained as the audio signal.
In order to improve the success rate of audio identification, the embodiment of the invention adopts an odd-even high-low frequency audio coding algorithm to convert any section of transmission data into audio signals with alternate high and low frequencies so as to improve the anti-interference capability.
For example, please refer to fig. 9, which shows a table of odd-numbered and even-numbered character correspondences according to an embodiment of the present invention. As shown in fig. 9, in the access information after encoding, even bits directly correspond to sixteen numbers and letters from 0 to f, and odd bits correspond to sixteen letters from g to v. According to the parity high/low frequency coding table, the transmission data 0123 abcdfeedcba 9 (original data less than 8 bits, previously supplemented with 0) can be coded into: 0h2iarctfudibq 9.
Referring to fig. 10, which shows a character-frequency encoding table according to an embodiment of the present invention, where 0 to 9 and a to v of the character-frequency encoding table respectively correspond to one frequency of 32 frequencies, according to the character-frequency encoding table shown in fig. 10, the audio frequency (in Hz) of each bit in 0h2iarctfudibq9 can be obtained as shown in table 1 below.
Data of 0 h 2 i a r c t
Frequency of 1760.0 4698.6 1975.5 4978.0 3136.0 8372.0 3520.0 9397.3
Data of f u d i b q 9
Frequency of 4186.0 9956.1 3729.3 4978.0 3322.4 7902.1 2960.0
TABLE 1
After the frequency corresponding to each character is obtained through the processing of the above-mentioned steps, corresponding PCM (Pulse Code Modulation) audio data, that is, the audio signal, is generated through the following formula:
Figure BDA0001553281880000101
wherein x is a subscript of the sample, if the number of samples is 4096, the value of x is 0 to 4095, y is a value of a frequency to be generated, for example, 1760.0Hz in table 1 above, and S is a sampling frequency of the transmitting device, generally 44.1 KHz.
Step 404, the sending device plays the audio signal, and the receiving device collects the audio signal played by the sending device.
After the sending device obtains the Audio signal (i.e., the PCM Audio data), the Audio signal may be input to an Audio manager (e.g., Audio Track), and the Audio manager controls a speaker in the sending device to play, so that the receiving device collects the Audio signal.
Please refer to fig. 11, which illustrates a flowchart of playing access information by a sending device according to an embodiment of the present invention. As shown in fig. 11, after the user selects a file in the sending device and clicks on sending (for example, selects a file fast-forwarding option in the interface shown in fig. 5), the sending device creates a wireless local area network hotspot, generates an audio by using a hotspot name and a password, and plays the generated audio through a speaker.
In order to avoid that the peripheral device, other than the receiving device, also having the audio signal collecting function collects the audio signal played by the sending device, in the embodiment of the present invention, a precondition may be set for the step of collecting the audio signal played by the sending device by the receiving device, for example, when the receiving device is in a certain specified state (for example, a certain interface is displayed) or a certain specified operation is received (for example, a certain button in a screen is touched), the step of collecting the audio signal played by the sending device is executed.
For example, in the process of acquiring the audio signal played by the sending device, when the receiving device displays the designated plane, the receiving device acquires the audio signal played by the sending device.
Taking the sending device as the sending device a as an example, when the user B corresponding to the receiving device B wants to receive the file 1, before the sending device a plays the audio signal, the user B may open a designated interface in the receiving device B, where the designated interface may be a certain interface in a designated application program, or may be any interface in the designated application program, and when the sending device a plays the audio signal, the receiving device B may collect the audio signal.
In step 405, the receiving device extracts frequency data of the audio signal.
In an embodiment of the present invention, the receiving device may extract the frequency data from the audio signal by means of fourier transform.
Step 406, the receiving device processes the frequency data according to the character-frequency coding table, to obtain the coded access information, where the character-frequency coding table includes the corresponding relationship between the characters and the frequencies.
For example, when the transmitting device performs encoding according to the character relationship correspondence table and the character-frequency encoding table shown in fig. 9 and 10 to obtain the audio signal, the receiving device may perform inverse encoding according to the character relationship correspondence table and the character-frequency encoding table shown in fig. 9 and 10 to obtain the encoded access information.
Step 407, the receiving device decodes the encoded access information according to a preset encoding mode to obtain the access information.
Optionally, when the encoded access information is decoded according to a preset encoding mode and the access information is obtained, the receiving device decodes the encoded access information according to a reed-solomon encoding algorithm to obtain hexadecimal data, and converts the hexadecimal data into the access information.
Referring to fig. 12 and fig. 13, fig. 12 shows a flow chart of audio information generation according to an embodiment of the present invention, and fig. 13 shows a schematic diagram of access information restoration according to an embodiment of the present invention.
As shown in fig. 12, when transmitting access information, the transmitting device first obtains original data of the access information, performs 16-ary conversion on the original data, performs solomon encoding on the data after 16-ary conversion, performs audio conversion on the encoded access information obtained by encoding, obtains an audio signal (i.e., PCM audio data), and plays sound according to the PCM audio data.
As shown in fig. 13, the receiving device side performs PCM decoding on the sound recorded by the microphone, digitizes the sound to obtain PCM audio data, analyzes the audio data by fourier transform to finally obtain frequency data of the sound, further converts the frequency data into hexadecimal data, such as 12CAB7DFEECBA9, according to the above character relationship correspondence table and character-frequency coding table, and then decodes the hexadecimal data by solomon to obtain original data (i.e., access information), such as 123 ABCD.
Step 408, the receiving device accesses the wireless local area network hotspot according to the access information to establish a wireless local area network connection between the sending device and the receiving device.
Please refer to fig. 14, which illustrates a flowchart of a receiving device parsing access information according to an embodiment of the present invention. As shown in fig. 14, after the user operates the receiving device to enter the receiving page (i.e., the above-mentioned designated interface), the receiving device starts to monitor the audio, digitizes the monitored audio to obtain the hexadecimal data, and finally obtains the hotspot name and the password (i.e., the access information) by decoding the hexadecimal data.
The above steps 402 to 408 are processes in which the transmitting device and the receiving device establish a connection through sound waves, and first, the transmitting device establishes a wireless local area network hotspot, and generates and plays audio according to a hotspot name and a password; and after the receiving equipment receives the audio, the audio is digitized, the hotspot name and the password are obtained, and the hotspot created by the equipment is sent through the hotspot name and password connection.
Step 409, after the wireless local area network connection between the sending equipment and the receiving equipment is established, the sending equipment sends a file to the receiving equipment through the wireless local area network connection; and the receiving equipment receives the file sent by the sending equipment through the wireless local area network connection.
Optionally, after the wireless local area network connection between the sending device and the receiving device is established, when the file is sent to the receiving device through the wireless local area network connection, the sending device establishes a socket interface connection corresponding to the file based on the wireless local area network connection, and sends the file to the receiving device through the socket interface connection.
Please refer to fig. 15, which illustrates a file transfer diagram according to an embodiment of the present invention. As shown in fig. 15, after the two processes of generating and decoding the audio data, the mobile phone correctly receives the hotspot name and the password, and then connects the hotspots. And after the hotspot connection is successful, a Socket connected with the sending and receiving ends can be established under WiFi for file transmission.
In summary, in the method according to the embodiment of the present invention, the sending device obtains the access information of the wireless local area network hotspot in the sending device, generates the audio signal containing the access information, and plays the audio signal; after the wireless local area network connection between the sending equipment and the receiving equipment is established, sending a file to the receiving equipment through the wireless local area network connection; in the process, the matching and connection operation of the two devices is not required to be manually executed by a user, so that the connection establishment process is simplified, the connection establishment time is shortened, and the file transmission efficiency is improved.
In addition, according to the scheme shown in the embodiment of the invention, the sending equipment encodes the access information through the Solomon coding algorithm, the encoded access information is converted into the audio signal, and the receiving equipment decodes according to the Solomon coding algorithm to obtain the access information, so that the error rate of transmission data is reduced, and the transmission accuracy of the access information is improved.
In addition, according to the scheme shown in the embodiment of the invention, when the sending equipment converts the coded access information into the audio signals, each character in the coded access information is converted into the audio signals with alternate frequencies according to the parity bits, so that the anti-interference capability is improved.
FIG. 16 is a flow diagram illustrating a file transfer according to an example embodiment. Taking the transmission of a certain game installation file between a sending device and a receiving device as an example, as shown in fig. 16, a transmitting end (i.e., the sending device) first establishes a wireless local area network hotspot, and sends a hotspot name and a password through sound waves in the manner shown in steps 402 to 404 in fig. 4, and a receiving end (i.e., the receiving device) receives sound waves and extracts the hotspot name and the password in the manner shown in steps 404 to 407 in fig. 4, and connects the hotspot according to the extracted hotspot name and password; the receiving end requests the transmitting end to send the file, the transmitting end sends the game installation file to the receiving end through the hotspot connection, and the receiving end receives the game installation file.
The scheme shown by the embodiment of the invention can solve the following problems:
1) the problems that the network speed is limited when the file is forwarded through the server, the transmission speed is unstable, a large amount of network flow is consumed when a large file is transmitted, and the cost is high can be solved.
2) When can solving through bluetooth/infrared ray mode transmission, transmission distance is short (the biggest transmission distance of general infrared ray is only 4 meters, the biggest transmission distance of bluetooth is 10 meters), unsatisfied long distance data transmission, and still can receive the influence of the different angles of equipment (for example the infrared emitter that the red line required equipment aligns each other), the signal is unstable, and bluetooth/infrared ray's connection matching process is complicated, all need artifical the intervention from discovering equipment to the successful whole process of matching, the flow is loaded down with trivial details, transmission rate is slow (the fastest transmission rate of red line is 4Mbps, bluetooth 4.0's biggest transmission rate is 24Mbps, has unsatisfied daily file transmission demand under here).
3) The problem that the transmission distance is only a few centimeters when NFC is used for transmission, most daily requirements are not met, and the maximum transmission rate of 424kbit/s cannot be used for transmitting large files can be solved.
The embodiment of the invention is based on the sound wave communication technology and realizes the rapid transmission of the file. The transmission flow of the embodiment of the invention is simple, and the program automatically connects and completes the transmission task only by clicking the sending button by the sending end, thereby greatly simplifying the complicated matching process; the scheme of the embodiment of the invention finally carries out file transmission based on the WIFI of the hot spot, the transmission distance is long, and the equipment can be continuously connected within a distance of 100 meters; the transmission rate of the scheme of the embodiment of the invention is high, theoretically, the transmission rate can reach 250Mbps, namely about 31 MB/s, 1GB large files only need 3 minutes after transmission is finished, and the daily large file transmission requirement is completely met; the embodiment of the invention directly transmits the files among the devices without consuming network flow.
The embodiment of the invention creates a brand-new file transmission mode by using the numbers and the sound waves, brings novel and fun experience to users, and solves the problems of large file transmission flow consumption, short transmission distance, low transmission speed and the like.
Fig. 17 is a block diagram illustrating a configuration of a file transfer apparatus according to an exemplary embodiment. The file transfer apparatus may be used in a sending device to perform all or part of the steps performed by the sending device in the embodiment corresponding to fig. 4. The file transfer apparatus may include:
an access information obtaining module 1701, configured to obtain access information of a wireless local area network hotspot in the sending device, where the access information includes a hotspot identifier and an access password;
an audio signal generating module 1702, configured to generate an audio signal containing the access information;
a playing module 1703, configured to play the audio signal, where the audio signal is used for a receiving device to access a wireless local area network hotspot;
a sending module 1704, configured to send a file to a receiving device through a wireless local area network connection after establishing the wireless local area network connection with the receiving device based on the audio signal.
Optionally, the audio signal generating module 1702 is specifically configured to,
coding the access information according to a preset coding mode to obtain coded access information;
and generating an audio signal with signal frequency corresponding to each character in the coded access information according to a character-frequency coding table, wherein the character-frequency coding table comprises the corresponding relation between the characters and the frequencies.
Optionally, when the access information is encoded according to a preset encoding manner to obtain encoded access information, the audio signal generating module 1702 is specifically configured to,
converting the access information into hexadecimal data;
and coding the hexadecimal data according to a Reed-Solomon coding algorithm to obtain coded access information.
Optionally, the character-frequency encoding table includes a first encoding table and a second encoding table, and when an audio signal with a signal frequency corresponding to the encoded access information is generated according to the character-frequency encoding table, the audio signal generating module 1702 is specifically configured to,
generating a first audio sub-signal corresponding to an odd-bit character in the coded access information according to the first coding table;
generating a second audio sub-signal corresponding to even-numbered characters in the coded access information according to the second coding table;
-obtaining a cross-combination of the first audio sub-signal and the second audio sub-signal as the audio signal.
Optionally, before generating the audio signal with a signal frequency corresponding to each character in the encoded access information according to a character-frequency encoding table, the audio signal generating module 1702 is further configured to,
acquiring an audio playing mode, wherein the audio playing mode comprises mute playing or non-mute playing;
and acquiring a character-frequency coding table corresponding to the audio playing mode.
Optionally, the sending module 1704 is specifically configured to,
establishing socket interface connection corresponding to the file based on the wireless local area network connection;
and sending the file to the receiving equipment through the socket interface connection.
Optionally, the access information obtaining module 1701 is specifically configured to,
and when receiving an instruction for sending the file, acquiring access information of a wireless local area network hotspot in the sending equipment.
In summary, the apparatus according to the embodiment of the present invention obtains the access information of the wireless local area network hotspot in the sending device, generates the audio signal including the access information, and plays the audio signal; after the wireless local area network connection between the sending equipment and the receiving equipment is established, sending a file to the receiving equipment through the wireless local area network connection; in the process, the matching and connection operation of the two devices is not required to be manually executed by a user, so that the connection establishment process is simplified, the connection establishment time is shortened, and the file transmission efficiency is improved.
In addition, according to the scheme provided by the embodiment of the invention, the access information is coded by a Solomon coding algorithm, and the coded access information is converted into an audio signal, so that the error rate of transmission data is reduced, and the transmission accuracy of the access information is improved.
In addition, according to the scheme of the embodiment of the invention, when the coded access information is converted into the audio signal, each character in the coded access information is converted into the audio signal with alternate frequencies according to the parity bits, so that the anti-interference capability is improved.
Fig. 18 is a block diagram showing a configuration of a file transfer apparatus according to an exemplary embodiment. The file transmission apparatus may be used in a receiving device to perform all or part of the steps performed by the receiving device in the corresponding embodiment of fig. 4. The file transfer apparatus may include:
an acquisition module 1801, configured to acquire an audio signal played by a sending device;
an analyzing module 1802, configured to analyze the audio signal to obtain access information of a wireless local area network hotspot in the sending device, where the access information includes a hotspot identifier and an access password;
an access module 1803, configured to access the wireless local area network hotspot according to the access information, so as to establish a wireless local area network connection with the sending device;
a receiving module 1804, configured to receive a file sent by the sending device through the wireless local area network connection.
Optionally, the parsing module 1802 is specifically configured to,
extracting frequency data of the audio signal;
processing the frequency data according to a character-frequency coding table to obtain coded access information, wherein the character-frequency coding table comprises a corresponding relation between characters and frequencies;
and decoding the coded access information according to a preset coding mode to obtain the access information.
Optionally, when the encoded access information is decoded according to a preset encoding manner to obtain the access information, the parsing module 1802 is specifically configured to,
decoding the coded access information according to a Reed-Solomon coding algorithm to obtain hexadecimal data;
and converting the hexadecimal data into the access information.
Optionally, the collecting module 1801 is specifically configured to,
and when the receiving equipment displays the indication boundary, acquiring the audio signal played by the sending equipment.
In summary, in the apparatus according to the embodiment of the present invention, the receiving device collects the audio signal played by the sending device, extracts the access information from the audio signal, accesses the wireless local area network hotspot in the sending device according to the access information to establish a wireless local area network connection with the sending device, and receives the file sent by the sending device through the wireless local area network connection; in the process, the matching and connection operation of the two devices is not required to be manually executed by a user, so that the connection establishment process is simplified, the connection establishment time is shortened, and the file transmission efficiency is improved.
FIG. 19 is a block diagram illustrating the architecture of a computer device 1900 according to an example embodiment. The computer device 1900 may be a user terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a laptop computer, or a desktop computer.
Generally, computer device 1900 includes: a processor 1901 and a memory 1902.
The processor 1901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 1901 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1901 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 1901 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
The memory 1902 may include one or more computer-readable storage media, which may be non-transitory. The memory 1902 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1902 is used to store at least one instruction for execution by processor 1901 to implement steps performed by a sending device or a receiving device in a file transfer method provided by method embodiments of the present application.
In some embodiments, computer device 1900 may also optionally include: a peripheral interface 1903 and at least one peripheral. The processor 1901, memory 1902, and peripheral interface 1903 may be connected by bus or signal lines. Various peripheral devices may be connected to peripheral interface 1903 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1904, a touch screen display 1905, a camera 1906, an audio circuit 1907, a positioning component 1908, and a power supply 1909.
The peripheral interface 1903 may be used to connect at least one peripheral associated with an I/O (Input/Output) to the processor 1901 and the memory 1902. In some embodiments, the processor 1901, memory 1902, and peripherals interface 1903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1901, the memory 1902, and the peripheral interface 1903 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 1904 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1904 communicates with a communication network and other communication devices via electromagnetic signals. The rf circuit 1904 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1904 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 1904 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1905 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1905 is a touch display screen, the display screen 1905 also has the ability to capture touch signals on or above the surface of the display screen 1905. The touch signal may be input to the processor 1901 as a control signal for processing. At this point, the display 1905 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, display 1905 may be one, providing the front panel of computer device 1900; in other embodiments, display 1905 may be at least two, each disposed on a different surface of computer device 1900 or in a folded design; in still other embodiments, display 1905 may be a flexible display disposed on a curved surface or on a folding surface of computer device 1900. Even more, the display 1905 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display 1905 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or the like.
The camera assembly 1906 is used to capture images or video. Optionally, camera assembly 1906 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera head assembly 1906 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuitry 1907 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals into the processor 1901 for processing, or inputting the electric signals into the radio frequency circuit 1904 for realizing voice communication. The microphones may be multiple and placed at different locations on the computer device 1900 for stereo sound capture or noise reduction purposes. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1901 or the radio frequency circuitry 1904 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 1907 may also include a headphone jack.
The Location component 1908 is used to locate the current geographic Location of the computer device 1900 for navigation or LBS (Location Based Service). The Positioning component 1908 may be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
Power supply 1909 is used to provide power to the various components in computer device 1900. The power source 1909 can be alternating current, direct current, disposable batteries, or rechargeable batteries. When power supply 1909 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, computer device 1900 also includes one or more sensors 1910. The one or more sensors 1910 include, but are not limited to: acceleration sensor 1911, gyro sensor 1912, pressure sensor 1913, fingerprint sensor 1914, optical sensor 1915, and proximity sensor 1916.
The acceleration sensor 1911 may detect the magnitude of acceleration on three coordinate axes of the coordinate system established with the computer apparatus 1900. For example, the acceleration sensor 1911 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 1901 may control the touch screen 1905 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1911. The acceleration sensor 1911 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1912 may detect a body direction and a rotation angle of the computer device 1900, and the gyro sensor 1912 may cooperate with the acceleration sensor 1911 to acquire a 3D motion of the user with respect to the computer device 1900. From the data collected by the gyro sensor 1912, the processor 1901 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 1913 may be disposed on a side bezel of computer device 1900 and/or on a lower layer of touch display 1905. When the pressure sensor 1913 is disposed on the side frame of the computer device 1900, the user can detect a holding signal of the computer device 1900, and the processor 1901 can perform right-left hand recognition or quick operation based on the holding signal collected by the pressure sensor 1913. When the pressure sensor 1913 is disposed at the lower layer of the touch display 1905, the processor 1901 controls the operability control on the UI interface according to the pressure operation of the user on the touch display 1905. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1914 is configured to collect a fingerprint of the user, and the processor 1901 identifies the user according to the fingerprint collected by the fingerprint sensor 1914, or the fingerprint sensor 1914 identifies the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 1901 authorizes the user to perform relevant sensitive operations including unlocking a screen, viewing encrypted information, downloading software, paying for, and changing settings, etc. Fingerprint sensor 1914 may be disposed on the front, back, or side of computer device 1900. When a physical button or vendor Logo is provided on computer device 1900, fingerprint sensor 1914 may be integrated with the physical button or vendor Logo.
The optical sensor 1915 is used to collect the ambient light intensity. In one embodiment, the processor 1901 may control the display brightness of the touch screen 1905 based on the ambient light intensity collected by the optical sensor 1915. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1905 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1905 is turned down. In another embodiment, the processor 1901 may also dynamically adjust the shooting parameters of the camera assembly 1906 according to the intensity of the ambient light collected by the optical sensor 1915.
Proximity sensor 1916, also known as a distance sensor, is typically disposed on the front panel of computer device 1900. Proximity sensor 1916 is used to capture the distance between the user and the front of computer device 1900. In one embodiment, the touch display 1905 is controlled by the processor 1901 to switch from a bright screen state to a dark screen state when the proximity sensor 1916 detects that the distance between the user and the front of the computer device 1900 is gradually decreasing; when the proximity sensor 1916 detects that the distance between the user and the front of the computer device 1900 gradually becomes larger, the touch display 1905 is controlled by the processor 1901 to switch from the breath-screen state to the bright-screen state.
Those skilled in the art will appreciate that the architecture shown in FIG. 19 is not intended to be limiting of computer device 1900 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In an exemplary embodiment, a non-transitory computer readable storage medium including instructions, such as a memory including at least one instruction, at least one program, set of codes, or set of instructions, executable by a processor to perform all or part of the steps performed by the transmitting device or the receiving device in the method illustrated in the embodiment of fig. 4 is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (13)

1. A file transfer method, for use in a sending device, the method comprising:
acquiring access information of a wireless local area network hotspot in the sending equipment, wherein the access information comprises a hotspot identification and an access password;
coding the access information according to a preset coding mode to obtain coded access information;
acquiring an audio playing mode, wherein the audio playing mode comprises mute playing or non-mute playing;
acquiring a character-frequency coding table corresponding to the audio playing mode, wherein the character-frequency coding table comprises a corresponding relation between characters and frequencies, and the frequencies in the character-frequency coding table corresponding to the mute playing mode are frequencies of sounds which cannot be heard by human ears;
generating audio signals with signal frequencies corresponding to all characters in the coded access information according to the character-frequency coding table;
playing the audio signal, wherein the audio signal is used for receiving equipment to access a wireless local area network hotspot;
and after establishing wireless local area network connection between the audio signal and the receiving equipment, sending a file to the receiving equipment through the wireless local area network connection.
2. The method of claim 1, wherein the encoding the access information according to a preset encoding manner to obtain the encoded access information comprises:
converting the access information into hexadecimal data;
and coding the hexadecimal data according to a Reed-Solomon coding algorithm to obtain coded access information.
3. The method of claim 1, wherein the character-frequency encoding table comprises a first encoding table and a second encoding table, and the generating the audio signal with the signal frequency corresponding to each character in the encoded access information according to the character-frequency encoding table comprises:
generating a first audio sub-signal corresponding to an odd-bit character in the coded access information according to the first coding table;
generating a second audio sub-signal corresponding to even-numbered characters in the coded access information according to the second coding table;
-obtaining a cross-combination of the first audio sub-signal and the second audio sub-signal as an audio signal.
4. The method according to any one of claims 1 to 3, wherein the obtaining access information of a wireless local area network hotspot in the sending device comprises:
and when receiving an instruction for sending the file, acquiring access information of a wireless local area network hotspot in the sending equipment.
5. A file transfer method for use in a receiving device, the method comprising:
acquiring an audio signal played by a sending device, wherein the audio signal is generated according to a character-frequency coding table corresponding to an audio playing mode of the sending device, the audio playing mode comprises mute playing or non-mute playing, the character-frequency coding table comprises a corresponding relation between characters and frequencies, and the frequencies in the character-frequency coding table corresponding to the mute playing mode are frequencies of sounds which cannot be heard by human ears;
analyzing and obtaining access information of a wireless local area network hotspot in the sending equipment from the audio signal, wherein the access information comprises a hotspot identification and an access password;
accessing the wireless local area network hotspot according to the access information to establish wireless local area network connection with the sending equipment;
and receiving the file sent by the sending equipment through the wireless local area network connection.
6. The method of claim 5, wherein the parsing the audio signal to obtain the access information of the wireless local area network hotspot in the sending device comprises:
extracting frequency data of the audio signal;
processing the frequency data according to a character-frequency coding table to obtain coded access information, wherein the character-frequency coding table comprises a corresponding relation between characters and frequencies;
and decoding the coded access information according to a preset coding mode to obtain the access information.
7. The method of claim 5 or 6, wherein the capturing the audio signal played by the sending device comprises:
and when the receiving equipment displays the indication boundary, acquiring the audio signal played by the sending equipment.
8. A file transfer apparatus used in a transmission device, the apparatus comprising:
the access information acquisition module is used for acquiring access information of a wireless local area network hotspot in the sending equipment, wherein the access information comprises a hotspot identification and an access password;
the audio signal generation module is used for coding the access information according to a preset coding mode to obtain coded access information; acquiring an audio playing mode, wherein the audio playing mode comprises mute playing or non-mute playing; acquiring a character-frequency coding table corresponding to the audio playing mode, wherein the character-frequency coding table comprises a corresponding relation between characters and frequencies, and the frequencies in the character-frequency coding table corresponding to the mute playing mode are frequencies of sounds which cannot be heard by human ears; generating audio signals with signal frequencies corresponding to all characters in the coded access information according to the character-frequency coding table;
the playing module is used for playing the audio signal, and the audio signal is used for receiving equipment to access a wireless local area network hotspot;
and the sending module is used for sending a file to the receiving equipment through the wireless local area network connection after establishing the wireless local area network connection between the audio signal and the receiving equipment.
9. A file transfer apparatus for use in a receiving device, the apparatus comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an audio signal played by a sending device, the audio signal is generated according to a character-frequency coding table corresponding to an audio playing mode of the sending device, the audio playing mode comprises mute playing or non-mute playing, the character-frequency coding table comprises a corresponding relation between characters and frequencies, and the frequencies in the character-frequency coding table corresponding to the mute playing mode are frequencies of sounds which cannot be heard by human ears;
the analysis module is used for analyzing and obtaining access information of a wireless local area network hotspot in the sending equipment from the audio signal, wherein the access information comprises a hotspot identifier and an access password;
the access module is used for accessing the wireless local area network hotspot according to the access information so as to establish wireless local area network connection with the sending equipment;
and the receiving module is used for receiving the file sent by the sending equipment through the wireless local area network connection.
10. A computer device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by the processor to implement the file transfer method of any of claims 1 to 4.
11. A computer device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by the processor to implement the file transfer method according to any one of claims 5 to 7.
12. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the file transfer method according to any one of claims 1 to 4.
13. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the file transfer method according to any one of claims 5 to 7.
CN201810054347.2A 2018-01-19 2018-01-19 File transmission method and device Active CN108243481B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810054347.2A CN108243481B (en) 2018-01-19 2018-01-19 File transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810054347.2A CN108243481B (en) 2018-01-19 2018-01-19 File transmission method and device

Publications (2)

Publication Number Publication Date
CN108243481A CN108243481A (en) 2018-07-03
CN108243481B true CN108243481B (en) 2021-02-23

Family

ID=62699555

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810054347.2A Active CN108243481B (en) 2018-01-19 2018-01-19 File transmission method and device

Country Status (1)

Country Link
CN (1) CN108243481B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109302698A (en) * 2018-08-27 2019-02-01 优视科技新加坡有限公司 Near-field Data moving method and its device
CN109451594A (en) * 2018-11-12 2019-03-08 北京旷视科技有限公司 Data transmission method, device and storage medium
CN110049480A (en) * 2019-05-23 2019-07-23 深圳云里物里科技股份有限公司 A kind of authentication method and relevant apparatus of bluetooth equipment
CN111465005A (en) * 2020-03-30 2020-07-28 维沃移动通信有限公司 Hotspot sharing method and electronic equipment
CN113849241A (en) * 2020-06-10 2021-12-28 Oppo(重庆)智能科技有限公司 Audio playing control method, intelligent watch and device with storage function
CN112073888A (en) * 2020-08-06 2020-12-11 深圳市天视通技术有限公司 Audio testing method, system, electronic equipment and storage medium
CN111970558A (en) * 2020-10-19 2020-11-20 深圳乐播科技有限公司 Screen projection method, device, equipment and storage medium based on sound wave communication
CN113873447A (en) * 2021-09-26 2021-12-31 展讯通信(天津)有限公司 Fast transmission method and device, electronic equipment and storage medium
CN115297108B (en) * 2022-08-11 2023-08-25 青岛美迪康数字工程有限公司 Diagnosis and treatment quality control file transmission method and device based on piano syllables

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136197A (en) * 2007-10-16 2008-03-05 得理微电子(上海)有限公司 Digital reverberation processor based on time-varying delay-line
CN103166681A (en) * 2013-03-13 2013-06-19 北京搜狗科技发展有限公司 Information transmission method and system in short-distance scene
CN104717601A (en) * 2014-08-22 2015-06-17 深圳市智美达科技有限公司 Wireless network login method and system of wireless monitoring device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778561B (en) * 2012-10-23 2017-12-01 腾讯科技(深圳)有限公司 A kind of social interaction method and system
US20150041534A1 (en) * 2013-08-07 2015-02-12 1 Oak Technologies, LLC Electronic payment transponder
CN104158597B (en) * 2014-07-23 2016-07-06 深圳市揽胜科技有限公司 A kind of WIFI network product that configures is connected to the method and system of router
CN104796888A (en) * 2015-03-19 2015-07-22 北京宇音天下科技有限公司 Method for connecting WI-FI network by intelligent hardware terminal based on sound waves and system for realizing same
CN105722183A (en) * 2016-03-18 2016-06-29 深圳市轱辘软件开发有限公司 Sharing method and apparatus for Wi-Fi (wireless fidelity) link information
CN106304078A (en) * 2016-08-12 2017-01-04 美的智慧家居科技有限公司 The method and apparatus of home appliance access network
CN106411849A (en) * 2016-08-30 2017-02-15 王竞 Network access information sharing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136197A (en) * 2007-10-16 2008-03-05 得理微电子(上海)有限公司 Digital reverberation processor based on time-varying delay-line
CN103166681A (en) * 2013-03-13 2013-06-19 北京搜狗科技发展有限公司 Information transmission method and system in short-distance scene
CN104717601A (en) * 2014-08-22 2015-06-17 深圳市智美达科技有限公司 Wireless network login method and system of wireless monitoring device

Also Published As

Publication number Publication date
CN108243481A (en) 2018-07-03

Similar Documents

Publication Publication Date Title
CN108243481B (en) File transmission method and device
CN110138937B (en) Call method, device and system
CN108401124B (en) Video recording method and device
CN108833963B (en) Method, computer device, readable storage medium and system for displaying interface picture
CN108966008B (en) Live video playback method and device
CN108093268B (en) Live broadcast method and device
CN110022489B (en) Video playing method, device and storage medium
CN104967900A (en) Video generating method and video generating device
CN108965757B (en) Video recording method, device, terminal and storage medium
CN111373713B (en) Message transmission method and device
WO2017181365A1 (en) Earphone channel control method, related apparatus, and system
CN110996305A (en) Method, device, electronic equipment and medium for connecting Bluetooth equipment
CN108134736B (en) Group establishing method and device
CN109726064B (en) Method, device and system for simulating abnormal operation of client and storage medium
US20130231065A1 (en) Communication apparatus, communication method, and computer readable recording medium
CN110149491B (en) Video encoding method, video decoding method, terminal and storage medium
CN108632718B (en) Audio sharing method and system
CN112911337B (en) Method and device for configuring video cover pictures of terminal equipment
CN110827830B (en) Voiceprint recognition method, voiceprint recognition device, terminal and storage medium based on voice data
CN110113669B (en) Method and device for acquiring video data, electronic equipment and storage medium
CN113516991A (en) Audio playing and equipment management method and device based on group session
CN109714628B (en) Method, device, equipment, storage medium and system for playing audio and video
CN112153404B (en) Code rate adjusting method, code rate detecting method, code rate adjusting device, code rate detecting device, code rate adjusting equipment and storage medium
CN110708582B (en) Synchronous playing method, device, electronic equipment and medium
CN110913213B (en) Method, device and system for evaluating and processing video quality

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
GR01 Patent grant
GR01 Patent grant