CN113572823A - File transmission system and transmission method and electronic equipment - Google Patents

File transmission system and transmission method and electronic equipment Download PDF

Info

Publication number
CN113572823A
CN113572823A CN202110765630.8A CN202110765630A CN113572823A CN 113572823 A CN113572823 A CN 113572823A CN 202110765630 A CN202110765630 A CN 202110765630A CN 113572823 A CN113572823 A CN 113572823A
Authority
CN
China
Prior art keywords
module
wireless connection
equipment
file
file transmission
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
CN202110765630.8A
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202110765630.8A priority Critical patent/CN113572823A/en
Publication of CN113572823A publication Critical patent/CN113572823A/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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a file transmission system, a file transmission method and electronic equipment, and belongs to the technical field of electronic equipment. The file transfer system includes: a first device and a second device; the first device comprises a first file transmission module and a first wireless connection module which are connected with each other; the second device comprises a second file transmission module and a second wireless connection module which are connected with each other; the first wireless connection module is in wireless communication with the second wireless connection module, and the first file transmission module is in wireless communication with the second file transmission module; when the first equipment detects that the second equipment is located within a first preset range of the first equipment, the first wireless connection module and the second wireless connection module establish Wi-Fi Direct communication connection, under the condition that the first wireless connection module is connected with the second wireless connection module, the first file transmission module packages and converts files to be transmitted into input and output streams and sends the input and output streams to the second file transmission module, and the second file transmission module converts the input and output streams into files to be transmitted.

Description

File transmission system and transmission method and electronic equipment
Technical Field
The application belongs to the technical field of communication, and particularly relates to a file transmission system, a file transmission method and electronic equipment.
Background
Along with the development of mobile equipment, the functions of the mobile equipment are more and more, the mobile equipment gradually replaces other tools to be used, the living habits of people are greatly changed, the mobile interconnection becomes the focus of the times, and people can share data files anytime and anywhere. File transfer between mobile devices is gaining increasing attention as a way of mobile data sharing, particularly for the transfer of large amounts of data.
However, data transmission is often limited by traffic usage, in some examples, files are transmitted through bluetooth interconnection, but the bluetooth interconnection has low device connection efficiency, and both transmission rate and transmission distance have great limitations. In another example, files are sent over a Wi-Fi environment, but the mobile device is not in a Wi-Fi environment at all times, such that file transfers are limited.
Disclosure of Invention
The embodiment of the application provides a file transmission system, a file transmission method and electronic equipment, and can solve the problem that the existing file transmission mode cannot meet the requirements of a user on stable and rapid file transmission.
In a first aspect, a file transfer system is provided, including: a first device and a second device;
the first device comprises a first file transmission module and a first wireless connection module, and the first file transmission module is connected with the first wireless connection module; the second device comprises a second file transmission module and a second wireless connection module, the second file transmission module is connected with the second wireless connection module, the first wireless connection module is in wireless communication with the second wireless connection module, and the first file transmission module is in wireless communication with the second file transmission module;
under the condition that the first equipment detects that the second equipment is located within a first preset range of the first equipment, the first wireless connection module and the second wireless connection module establish Wi-Fi Direct communication connection, under the condition that the first wireless connection module is connected with the second wireless connection module, the first file transmission module packages and converts a file to be transmitted into an input output stream and sends the input output stream to the second file transmission module, and the second file transmission module converts the input output stream into the file to be transmitted.
In a second aspect, a file transfer method is provided, which is applied to a first device, and includes:
under the condition that it is detected that second equipment is located within a first preset range of the first equipment, a first wireless connection module of the first equipment and a second wireless connection module of the second equipment establish Wi-Fi Direct communication connection;
a first file transmission module of the first electronic equipment encapsulates a file to be transmitted and converts the file to be transmitted into an input output stream;
and under the condition that the first wireless connection module and the second wireless connection module are connected with each other, the first file transmission module sends the input/output stream to a second file transmission module of the second equipment.
In a third aspect, an electronic device applied to a second device is provided, including:
the second wireless connection module of the second equipment and the first wireless connection module of the first equipment establish Wi-Fi Direct communication connection;
under the condition that the second wireless connection module is connected with the first wireless connection module, the second file transmission module of the second device receives the input/output stream sent by the first file transmission module of the first device;
and the second file transmission module converts the input and output streams into files to be transmitted.
In a fourth aspect, an electronic device is provided, which comprises a processor, a memory, and a program or instructions stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the method according to the second aspect, or which when executed by the processor, implements the steps of the method according to the third aspect.
In a fifth aspect, there is provided a readable storage medium on which a program or instructions are stored, which program or instructions, when executed by a processor, implement the steps of the method according to the second aspect, or which program or instructions, when executed by a processor, implement the steps of the method according to the third aspect.
In a sixth aspect, the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the second aspect, or the processor is configured to execute a program or instructions to implement the method according to the third aspect.
The embodiment of the application discloses a file transmission system, which comprises first equipment and second equipment, wherein the first equipment comprises a first file transmission module and a first wireless connection module, the first file transmission module is connected with the first wireless connection module, the second equipment comprises a second file transmission module and a second wireless connection module, the second file transmission module is connected with the second wireless connection module, the first wireless connection module is in wireless communication with the second wireless connection module, the first file transmission module is in wireless communication with the second file transmission module, the first wireless connection module and the second wireless connection module establish Wi-Fi Direct communication connection when the first equipment detects that the second equipment is located in a first preset range of the first equipment, the first file transmission module encapsulates a file to be transmitted and converts the file to be transmitted into an input output stream under the condition that the first wireless connection module is connected with the second wireless connection module, and the input and output streams are converted into files to be transmitted by the second file transmission module. According to the embodiment of the application, file transmission between the devices is carried out through the Wi-Fi Direct technology, when the two devices are close to each other, a user does not need to manually click for searching or connecting, connection can be automatically matched and established, connection time is shortened, the Wi-Fi Direct technology is adopted for transmission, transmission rate is improved, and user experience is enhanced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic diagram of a file transfer system provided by one embodiment of the present application;
FIG. 2 is a flow chart of a file transfer method provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of an electronic device provided by an embodiment of the present application;
fig. 4 is a hardware structure diagram of an electronic device according to an embodiment of the present application.
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 some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
A file transmission system, a file transmission method, and an electronic device provided in the embodiments of the present application are described in detail below with reference to fig. 1 to 4 through specific embodiments and application scenarios thereof.
Fig. 1 is a file transfer system according to an embodiment of the present disclosure. As shown in fig. 1, the file transfer system may include: a first device and a second device.
Specifically, the first device comprises a first file transmission module and a first wireless connection module, wherein the first file transmission module is connected with the first wireless connection module; the second equipment comprises a second file transmission module and a second wireless connection module, the second file transmission module is connected with the second wireless connection module, the first wireless connection module is in wireless communication with the second wireless connection module, and the first file transmission module is in wireless communication with the second file transmission module.
The first file transmission module packages and converts a file to be transmitted into an input output stream and sends the input output stream to the second file transmission module under the condition that the first equipment detects that the second equipment is located within a first preset range of the first equipment.
It should be noted that the first device may be a device that sends a file or a device that receives a file, and the second device may be a device that sends a file or a device that receives a file. The number of the first device and the second device may be one or more.
The first device and the second device may be mobile electronic devices or non-mobile electronic devices. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
For example, the first device and the second device may be a mobile phone, a bracelet, or the like, and if the first device and the second device are mobile phones, the mobile phone may further include other modules, such as a Central Processing Unit (CPU), a battery, a camera, a display screen, or the like.
The embodiment of the application discloses a file transmission system, which comprises first equipment and second equipment, wherein the first equipment comprises a first file transmission module and a first wireless connection module, the first file transmission module is connected with the first wireless connection module, the second equipment comprises a second file transmission module and a second wireless connection module, the second file transmission module is connected with the second wireless connection module, the first wireless connection module is in wireless communication with the second wireless connection module, the first file transmission module is in wireless communication with the second file transmission module, the first wireless connection module and the second wireless connection module establish Wi-Fi Direct communication connection when the first equipment detects that the second equipment is located in a first preset range of the first equipment, the first file transmission module encapsulates a file to be transmitted and converts the file to be transmitted into an input output stream under the condition that the first wireless connection module is connected with the second wireless connection module, and the input and output streams are converted into files to be transmitted by the second file transmission module. According to the embodiment of the application, file transmission between the devices is carried out through the Wi-Fi Direct technology, when the two devices are close to each other, a user does not need to manually click for searching or connecting, connection can be automatically matched and established, connection time is shortened, the Wi-Fi Direct technology is adopted for transmission, transmission rate is improved, and user experience is enhanced.
In one possible embodiment of the present application, the first device includes a human-computer interaction module, and the human-computer interaction module is electrically connected to the first file transmission module and the first wireless connection module, respectively.
The human-computer interaction module is used for providing an entrance for user operation, and can provide an operation interface and information display for a user. The information may include file selection information, menu button information, storage path information, device information, connection state information, file content information, transmission progress information, and the like.
Optionally, the second device may also include a human-computer interaction module.
In a possible implementation manner of the present application, the first device may include a first obtaining module, where the first obtaining module is configured to obtain Mac addresses (local area network addresses) of all devices within a second preset range of the first device.
The second device may include a second obtaining module, and the second obtaining module is configured to obtain Mac addresses of all devices within a second preset range of the second device.
In this embodiment, the device may acquire the Mac address of the other device within a certain range through the acquisition module, store the Mac address, and directly connect the device when a subsequent Mac address with a corresponding address is close, without manually clicking search, connection, and the like by a user, thereby greatly shortening connection time and improving user experience.
The embodiment of the application also provides a file transmission method, as shown in fig. 2. The file transfer method is applied to the first device, and may include the contents shown in step S201 to step S203.
In step S201, when it is detected that the second device is located within a first preset range of the first device, the first wireless connection module of the first device establishes a Wi-Fi Direct communication connection with the second wireless connection module of the second device.
That is, in a case where the second device is close to the first device, the first wireless connection module of the first device establishes a Wi-Fi Direct communication connection with the second wireless connection module of the second device.
In step S202, the first file transmission module encapsulates the file to be transmitted and converts the file into an input output stream.
In step S203, the first file transmission module sends the input/output stream to a second file transmission module of the second device when the first wireless connection module and the second wireless connection module are connected to each other.
In the embodiment of the application, firstly, under the condition that it is detected that the second device is located within a first preset range of the first device, the first wireless connection module of the first device establishes Wi-Fi Direct communication connection with the second wireless connection module of the second device, the first file transmission module encapsulates a file to be transmitted and converts the file into an input output stream, and under the condition that the first wireless connection module is connected with the second wireless connection module, the first file transmission module sends the input output stream to the second file transmission module of the second device. In the embodiment, file transmission between the devices is carried out through the Wi-Fi Direct technology, when the two devices approach, a user does not need to manually click for searching or connecting, connection can be automatically matched and established, connection time is shortened, transmission speed is improved by adopting the Wi-Fi Direct technology for transmission, and user experience is enhanced.
It should be noted that, there is no sequence between step S201 and step S202, and the steps may be performed simultaneously or first, and this embodiment is not limited in this embodiment.
In a possible embodiment of the present application, in a case that it is detected that the second device is located within the first preset range of the first device, before the first wireless connection module of the first device establishes the Wi-Fi Direct communication connection with the second wireless connection module of the second device, the file transmission method may further include the following steps.
And acquiring Mac addresses of all devices in a second preset range of the first device, and creating NdefMessage data according to the Mac addresses.
In this embodiment, any device may acquire a Mac address of another device within a moving range, and create NdefMessage Data according to the Mac address, where the NdefMessage Data is information in an NDEF (NFC Data Exchange Format) Format and is used for Data information transfer between devices. And the subsequent Mac with the corresponding address can be directly connected without manually clicking search, connection and the like by a user, so that the connection time is greatly shortened, and the user experience is improved.
In one possible implementation of the present application, the establishing, by the first wireless connection module of the first device, a Wi-Fi Direct communication connection with the second wireless connection module of the second device may include the following steps.
Under the condition of receiving a connection request sent by the second equipment, analyzing NdefMessage data of the second equipment, and acquiring a Mac address of the second equipment; searching equipment information of the second equipment corresponding to the Mac address according to the Mac address of the second equipment, and acquiring equipment parameters of the second equipment, wherein the Mac address of the second equipment is carried in a connection request sent by the second equipment; and receiving the connection request sent by the second equipment according to the equipment parameters of the second equipment, and connecting with the second equipment.
That is, the first device may create NdefMessage data according to a Mac address of the first device, and when the second device approaches, send the created NdefMessage data to the second device through a point-to-point function, the second device parses the NdefMessage data to obtain the Mac address of the first device, and then switches to the Wi-Fi Direct connection portion to perform connection, that is, send a connection request to the first device.
The searching can comprise two states of scanning and monitoring, the two states are switched back and forth to discover other equipment, the scanning stage continuously sends a detection request to actively scan, the detection request from other equipment is not processed in the scanning state, and the detection request is monitored and responded in the monitoring state.
In this embodiment, in the Wi-Fi Direct connection process, connection can be initiated only by one device reading information of the other Wi-Fi Direct device, so that sending of NdefMessage data is not required to be performed by both devices, and meanwhile, the NdefMessage data is not required to be sent every moment, so that sending of the NdefMessage data is completed by callback in implementation of point-to-point transmission of Wi-Fi Direct information, the first device calls for sending the NdefMessage data after file selection, the second device does not need to call, and the other device directly reads the NdefMessage data of the other device when the first device approaches.
In one possible embodiment of the present application, the first file transmission module encapsulates and converts a file to be transmitted into an input output stream, which may include the following steps.
Acquiring a Uniform Resource Identifier (URI) of a file to be transmitted; establishing a socket according to the URI; the first file transmission module encapsulates a file to be transmitted and converts the file to an input output stream; the first file transmission module interfaces the input and output streams with the socket.
The file URI refers to a Transmission Control Protocol (TPC) Protocol that is used to establish Socket communication. The file URI is used to identify a string of names of certain internet resources, and to identify a specific protocol that allows a user to interact with any resource, including local resources and internet resources. The file URI represents a file to be transmitted, and the device can acquire various information such as a path, a file name, and a file size of the file according to the file URI.
In this embodiment, Socket communication based on TCP encapsulates and converts transmission file data, so as to realize file transmission and improve transmission rate and distance.
In one possible embodiment of the present application, in a case where the first wireless connection module and the second wireless connection module are connected to each other, the sending, by the first file transfer module, the input/output stream to the second file transfer module of the second device may include: under the condition that the first wireless connection module and the second wireless connection module are connected with each other, the first file transmission module sends the input/output stream to the second file transmission module of the second device through the socket.
In the embodiment, the file transmission process does not need to use a network, the user is not limited in flow, zero-flow sharing is achieved, the user does not need to manually click search, connection and the like, the connection time is greatly shortened, and the user experience is improved.
The embodiment of the application also provides a file transmission method. The file transfer method is applied to the second device, and may include the following steps.
The method comprises the steps that a second wireless connection module of second equipment and a first wireless connection module of first equipment establish Wi-Fi Direct communication connection; under the condition that the second wireless connection module is connected with the first wireless connection module, a second file transmission module of the second equipment receives an input/output stream sent by a first file transmission module of the first equipment; and the second file transmission module converts the input and output streams into files to be transmitted.
In the embodiment, file transmission between the devices is carried out through the Wi-Fi Direct technology, when the two devices approach, a user does not need to manually click for searching or connecting, connection can be automatically matched and established, connection time is shortened, transmission speed is improved by adopting the Wi-Fi Direct technology for transmission, and user experience is enhanced.
In one possible implementation of the present application, before the second wireless connection module of the second device establishes the Wi-Fi Direct communication connection with the first wireless connection module of the first device, the method may further include: acquiring Mac addresses of all devices in a second preset range of the second device; NdefMessage data is created from the Mac address.
In one possible implementation of the present application, the establishing, by the second wireless connection module of the second device, a Wi-Fi Direct communication connection with the first wireless connection module of the first device may include the following steps.
Reading NdefMessage data of the first device by a second wireless connection module of the second device; analyzing the NdefMessage data to obtain a Mac address of the first device; searching the equipment information of the first equipment corresponding to the Mac address to obtain the equipment parameters of the first equipment; and determining the first equipment as a connection object according to the equipment parameters of the first equipment, and sending a connection request to the first equipment.
In this embodiment of the application, a new NdefMessag may be called in the process of receiving a file by the second device, an NdefMessage message is created, and after the point-to-point approach, the set NdefMessage message is sent out, and the flag indicating that the data transmission is successful is obtained, so that the data transmission is successful. The method is added with the execution of the search of the Wi-Fi Direct equipment as a node for converting from point to the Wi-Fi Direct, the monitoring process is used for informing the operation execution state in the connection process of the Wi-Fi Direct and returning equipment information and the like, and is mainly used for monitoring the success and failure states of the equipment search and connection, acquiring an equipment list, performing equipment matching at the moment, initiating connection, and an application can acquire the address of the opposite side at the moment and establishing Socket communication.
The second device can check the content of the received file, determine whether the file is completely transmitted, and if the file is not completely transmitted, send information to the first device to require retransmission until the transmission is completed; if the transmission is completed, the retransmission is not initiated. In a possible embodiment of the present application, in a case that the second wireless connection module and the first wireless connection module are connected to each other, the receiving, by the second file transfer module of the second device, the input and output streams sent by the first file transfer module of the first device may include: and under the condition that the second wireless connection module is connected with the first wireless connection module, the second file transmission module is butted with the input output stream of the first file transmission module of the first device through the socket input output stream.
Optionally, as shown in fig. 3, an electronic device 300 is further provided in this embodiment of the present application, and includes a processor 301, a memory 302, and a program or an instruction stored in the memory 302 and capable of being executed on the processor 301, where the program or the instruction is executed by the processor 301 to implement each process of the file transmission method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
Figure 4 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present application,
the electronic device 100 includes, but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and the like.
Those skilled in the art will appreciate that the electronic device 100 may further comprise a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 4 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The radio frequency unit 101, that is, the first wireless connection module in this embodiment of the application, is configured to establish a Wi-Fi Direct communication connection with a second wireless connection module of a second device when the first device detects that the second device is located within a first preset range of the first device.
The rf unit 101, i.e. the first file transmission module in this embodiment, is configured to encapsulate and convert a transmission file into an input and output stream.
The radio frequency unit 101, i.e. the first file transmission module in this embodiment of the present application, is configured to send the input and output streams to a second file transmission module of the second device.
In the embodiment of the application, firstly, under the condition that the first device detects that the second device is located within a first preset range of a first audit, a first wireless connection module of the first device and a second wireless connection module of the second device establish Wi-Fi Direct communication connection, a first file transmission module of the first device encapsulates a file to be transmitted and converts the file to be transmitted into an input output stream, and then under the condition that the first wireless connection module is connected with the second wireless connection module, the first file transmission module sends the input output stream to a second file transmission module of the second device. In the embodiment, file transmission between the devices is carried out through the Wi-Fi Direct technology, when the two devices approach, a user does not need to manually click for searching or connecting, connection can be automatically matched and established, connection time is shortened, transmission speed is improved by adopting the Wi-Fi Direct technology for transmission, and user experience is enhanced.
It should be understood that, in the embodiment of the present application, the input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, and the Graphics Processing Unit 1041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 107 includes a touch panel 1071 and other input devices 1072. The touch panel 1071 is also referred to as a touch screen. The touch panel 1071 may include two parts of a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 109 may be used to store software programs as well as various data including, but not limited to, application programs and an operating system. The processor 110 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the file transmission method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the file transmission method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
The embodiment of the present application further provides a processing device, where the processing device is configured to execute each process of the foregoing file transmission method embodiment, and can achieve the same technical effect, and for avoiding repetition, details are not repeated here.
It should be noted that, in this document, 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 like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (13)

1. A file transfer system, comprising: a first device and a second device;
the first device comprises a first file transmission module and a first wireless connection module, and the first file transmission module is connected with the first wireless connection module; the second device comprises a second file transmission module and a second wireless connection module, the second file transmission module is connected with the second wireless connection module, the first wireless connection module is in wireless communication with the second wireless connection module, and the first file transmission module is in wireless communication with the second file transmission module;
under the condition that the first equipment detects that the second equipment is located within a first preset range of the first equipment, the first wireless connection module and the second wireless connection module establish Wi-Fi Direct communication connection, under the condition that the first wireless connection module is connected with the second wireless connection module, the first file transmission module packages and converts a file to be transmitted into an input output stream and sends the input output stream to the second file transmission module, and the second file transmission module converts the input output stream into the file to be transmitted.
2. The system of claim 1, wherein the first device comprises a human-computer interaction module electrically connected to the first file transmission module and the first wireless connection module, respectively.
3. The system according to claim 1, wherein the first device comprises a first obtaining module, and the first obtaining module is configured to obtain Mac addresses of all devices within a second preset range of the first device;
the second device comprises a second obtaining module, and the second obtaining module is used for obtaining Mac addresses of all devices in a second preset range of the second device.
4. A file transmission method is applied to first equipment and is characterized by comprising the following steps:
under the condition that it is detected that second equipment is located within a first preset range of the first equipment, a first wireless connection module of the first equipment and a second wireless connection module of the second equipment establish Wi-Fi Direct communication connection;
a first file transmission module of the first electronic equipment encapsulates a file to be transmitted and converts the file to be transmitted into an input output stream;
and under the condition that the first wireless connection module and the second wireless connection module are connected with each other, the first file transmission module sends the input/output stream to a second file transmission module of the second equipment.
5. The method according to claim 4, wherein before the first wireless connection module of the first device establishes the Wi-Fi Direct communication connection with the second wireless connection module of the second device in a case that it is detected that the second device is located within the first preset range of the first device, the method further comprises:
acquiring Mac addresses of all devices in a second preset range of the first device;
and creating NdefMessage data according to the Mac address.
6. The method of claim 5, wherein the establishing a Wi-Fi Direct communication connection between a first wireless connection module of the first device and a second wireless connection module of the second device comprises:
under the condition of receiving a connection request sent by the second equipment, analyzing NdefMessage data of the second equipment, and acquiring a Mac address of the second equipment;
searching device information of the second device corresponding to the Mac address according to the Mac address of the second device, and acquiring device parameters of the second device, wherein the Mac address of the second device is carried in a connection request sent by the second device;
and receiving the connection request sent by the second equipment according to the equipment parameters of the second equipment, and connecting with the second equipment.
7. The method according to claim 4, wherein the first file transmission module encapsulates and converts the file to be transmitted into an input output stream, comprising:
acquiring a Uniform Resource Identifier (URI) of a file to be transmitted;
establishing a socket according to the URI;
the first file transmission module encapsulates the file to be transmitted and converts the file to be transmitted into an input output stream;
the first file transfer module interfaces the input and output streams with the socket.
8. The method of claim 7, wherein the sending the input output stream to a second file transfer module of the second device by the first file transfer module with the first wireless connection module and the second wireless connection module connected to each other comprises:
and under the condition that the first wireless connection module is connected with the second wireless connection module, the first file transmission module sends the input/output stream to a second file transmission module of the second equipment through the socket.
9. A file transmission method is applied to second equipment and is characterized by comprising the following steps:
the second wireless connection module of the second equipment and the first wireless connection module of the first equipment establish Wi-Fi Direct communication connection;
under the condition that the second wireless connection module is connected with the first wireless connection module, the second file transmission module of the second device receives the input/output stream sent by the first file transmission module of the first device;
and the second file transmission module converts the input and output streams into files to be transmitted.
10. The method of claim 9, wherein before the second wireless connection module of the second device establishes a Wi-Fi Direct communication connection with the first wireless connection module of the first device, the method further comprises:
acquiring Mac addresses of all devices in a second preset range of the second device;
and creating NdefMessage data according to the Mac address.
11. The method of claim 10, wherein the establishing the Wi-Fi Direct communication connection between the second wireless connection module of the second device and the first wireless connection module of the first device comprises:
a second wireless connection module of the second device reads NdefMessage data of the first device;
analyzing the NdefMessage data to obtain a Mac address of the first equipment;
searching equipment information of first equipment corresponding to the Mac address to acquire equipment parameters of the first equipment;
and determining the first equipment as a connection object according to the equipment parameters of the first equipment, and sending a connection request to the first equipment.
12. The method of claim 9, wherein the receiving, by the second file transfer module of the second device and with the second wireless connection module and the first wireless connection module connected to each other, the input and output streams sent by the first file transfer module of the first device comprises:
and under the condition that the second wireless connection module is connected with the first wireless connection module, the second file transmission module is in butt joint with the input output stream of the first file transmission module of the first equipment through the socket input output stream.
13. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the method according to any one of claims 4 to 8 or the processor implementing the steps of the method according to any one of claims 9 to 12.
CN202110765630.8A 2021-07-07 2021-07-07 File transmission system and transmission method and electronic equipment Pending CN113572823A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110765630.8A CN113572823A (en) 2021-07-07 2021-07-07 File transmission system and transmission method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110765630.8A CN113572823A (en) 2021-07-07 2021-07-07 File transmission system and transmission method and electronic equipment

Publications (1)

Publication Number Publication Date
CN113572823A true CN113572823A (en) 2021-10-29

Family

ID=78163869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110765630.8A Pending CN113572823A (en) 2021-07-07 2021-07-07 File transmission system and transmission method and electronic equipment

Country Status (1)

Country Link
CN (1) CN113572823A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103431872A (en) * 2013-08-12 2013-12-11 杭州电子科技大学 Heart sound transmission and management system based on NFC (Near Field Communication) and Bluetooth
KR20140020179A (en) * 2012-08-08 2014-02-18 삼성전자주식회사 Apparatus and method for connecting service reflected in user intent
CN103961084A (en) * 2014-04-04 2014-08-06 杭州电子科技大学 Portable uterine contraction pressure monitoring system based NFC and bluetooth
US20140347433A1 (en) * 2013-05-23 2014-11-27 Qualcomm Incorporated Establishing and controlling audio and voice back channels of a wi-fi display connection
CN106454766A (en) * 2016-09-27 2017-02-22 盐城工学院 Real-time cooperation data sharing system based on Android system and Wi-Fi Direct
CN109862526A (en) * 2019-01-28 2019-06-07 平安科技(深圳)有限公司 Document transmission method, device, computer equipment and storage medium
CN110035133A (en) * 2018-01-12 2019-07-19 珠海全志科技股份有限公司 The method and apparatus of peer device IP address is obtained in Android WiFi-Direct connection
CN111867148A (en) * 2019-04-30 2020-10-30 青岛海信移动通信技术股份有限公司 Method and equipment for establishing equipment connection and data transmission

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140020179A (en) * 2012-08-08 2014-02-18 삼성전자주식회사 Apparatus and method for connecting service reflected in user intent
US20140347433A1 (en) * 2013-05-23 2014-11-27 Qualcomm Incorporated Establishing and controlling audio and voice back channels of a wi-fi display connection
CN103431872A (en) * 2013-08-12 2013-12-11 杭州电子科技大学 Heart sound transmission and management system based on NFC (Near Field Communication) and Bluetooth
CN103961084A (en) * 2014-04-04 2014-08-06 杭州电子科技大学 Portable uterine contraction pressure monitoring system based NFC and bluetooth
CN106454766A (en) * 2016-09-27 2017-02-22 盐城工学院 Real-time cooperation data sharing system based on Android system and Wi-Fi Direct
CN110035133A (en) * 2018-01-12 2019-07-19 珠海全志科技股份有限公司 The method and apparatus of peer device IP address is obtained in Android WiFi-Direct connection
CN109862526A (en) * 2019-01-28 2019-06-07 平安科技(深圳)有限公司 Document transmission method, device, computer equipment and storage medium
CN111867148A (en) * 2019-04-30 2020-10-30 青岛海信移动通信技术股份有限公司 Method and equipment for establishing equipment connection and data transmission

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
CHARLES CHAN: "WI-FI&WI-FI Direct 简介及实现", Retrieved from the Internet <URL:https://blog.zeerd.com/wifi-and-wifi-direct/> *
RYO KANAOKA; YOSHITO TOBE: "Design of a data transfer system on smartphones using Wi-Fi direct and accelerometers", 2014 IEEE 3RD GLOBAL CONFERENCE ON CONSUMER ELECTRONICS (GCCE), pages 71 - 75 *
SANKALP SUNIL; ADWITIYA MUKHOPADHYAY; CHANDAN GUJJAR: "Multi-group message communication on android smartphones via WiFi direct", 2017 INTERNATIONAL CONFERENCE ON ADVANCES IN COMPUTING, COMMUNICATIONS AND INFORMATICS (ICACCI), pages 994 - 999 *
王鹃, 唐西铭, 王勇等: "一种基于手机令牌和NFC技术的身份认证系统", 武汉大学学报, pages 403 - 410 *

Similar Documents

Publication Publication Date Title
CN110032512B (en) Debugging method of small program, related equipment and terminal
CN105100141B (en) Multimedia content network sharing method, apparatus and system
EP3051772B1 (en) Method and apparatus for accessing network
CN113285866B (en) Information sending method and device and electronic equipment
CN111970188B (en) Capability forwarding method and device
CN112511412B (en) Information sending method and device, electronic equipment and readable storage medium
CN112346751B (en) Application program installation method and device, electronic equipment and storage medium
CN103513950A (en) Multi-screen adapter, multi-screen display system and input method of multi-screen adapter
CN111866824A (en) Method and equipment for establishing communication connection and data transmission
CN112749074B (en) Test case recommending method and device
CN103491067A (en) Multimedia interaction system and method
WO2018145574A1 (en) Information processing method and device, terminal, server and storage medium
CN104219299B (en) Data transmission method and device
CN111338971B (en) Application testing method and device, electronic equipment and storage medium
WO2023088198A1 (en) Network connection method and apparatus, and electronic device
WO2023046105A1 (en) Message sending method and apparatus and electronic device
US20090216864A1 (en) Methods, apparatuses, and computer program products, for automatically finding configuration settings for services
CN113572823A (en) File transmission system and transmission method and electronic equipment
CN114417201A (en) Message processing method and device, computer equipment and storage medium
CN113824627A (en) Group chat message display method and device, electronic equipment and storage medium
US20130122896A1 (en) Method and device for providing communication to user equipment
CN103941961A (en) Prompting method, device and facility for application updating
CN104580070A (en) Method, device and system for confirming network conversations
CN114268653B (en) Equipment calling method, device, equipment, medium and product
CN111787587B (en) Data transmission method and device and electronic equipment

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