CN105812402B - File transmission method and device based on Internet of things - Google Patents

File transmission method and device based on Internet of things Download PDF

Info

Publication number
CN105812402B
CN105812402B CN201410837173.9A CN201410837173A CN105812402B CN 105812402 B CN105812402 B CN 105812402B CN 201410837173 A CN201410837173 A CN 201410837173A CN 105812402 B CN105812402 B CN 105812402B
Authority
CN
China
Prior art keywords
file
server
network access
account
user terminal
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
CN201410837173.9A
Other languages
Chinese (zh)
Other versions
CN105812402A (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 CN201410837173.9A priority Critical patent/CN105812402B/en
Publication of CN105812402A publication Critical patent/CN105812402A/en
Application granted granted Critical
Publication of CN105812402B publication Critical patent/CN105812402B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a file transmission method and device based on the Internet of things, and the method comprises the following steps: receiving a login request which is sent by network access equipment and carries an equipment account and an equipment password, and establishing a first long connecting channel with the network access equipment after login authorization is completed; receiving and storing a first file uploaded by a user terminal; generating a first index identifier corresponding to the stored first file and returning the first index identifier to the user terminal; receiving a first file transmission request which is sent by a user terminal and carries an equipment account and a first index identifier; sending a first file transmission request to network access equipment through a first long connecting channel corresponding to the equipment account; receiving a downloading request which is sent by network access equipment and carries a first index identifier; and inquiring a first file corresponding to the first index identification and transmitting the first file to the network access equipment. The file transmission method and device based on the Internet of things provided by the invention overcome the problem that the file cannot be directly transmitted without a public network address.

Description

File transmission method and device based on Internet of things
Technical Field
The invention relates to the technical field of Internet of things, in particular to a file transmission method and device based on the Internet of things.
Background
The Internet of things is an important component of a new generation of information technology, and The English name of The Internet of things is 'The Internet of things', which means The Internet with connected objects. The core and foundation of the internet of things is still the internet, which is an extended and expanded network on the basis of the internet, and the internet of things enables the internet based on the user terminal to be extended and expanded to information exchange and communication between articles. Through the Internet of things, a user can remotely control network access equipment in a home through a control terminal such as a mobile phone and the like so as to realize remote control.
The network access equipment and the user terminal can have two modes based on the internet of things, including directly accessing to a public network and connecting to the public network through an intranet. Nodes in the public network can freely access each other. In the current implementation scheme of the internet of things, the network access equipment is required to be directly accessed to a public network and has a public network address, so that the user terminal can find the network access equipment through the public network address of the network access equipment and communicate with the network access equipment to realize control over the network access equipment. Similarly, if the network access device needs to connect and communicate with the user terminal, the user terminal is also required to directly access the public network and have a public network address, and the network access device can connect and communicate with the user terminal through the public network address of the user terminal.
However, the resources of the public network address are limited, and it is too costly and impractical to allocate the public network address to each network access device and each user terminal. It is reasonable that the network access device and the user terminal are both accessed to the public network through their own gateways, and the network access device and the user terminal are respectively located in their own internal networks. Therefore, how to find the other party and communicate between the network access equipment and the user terminal becomes a difficult problem, and the file transmission between the network access equipment and the user terminal is difficult to realize.
Disclosure of Invention
Therefore, it is necessary to provide a method and an apparatus for transmitting a file based on the internet of things, aiming at the problem that file transmission is difficult to realize because the existing network access device and the user terminal are respectively located in respective internal networks.
A file transmission method based on the Internet of things comprises the following steps:
receiving a login request which is sent by network access equipment and carries an equipment account and an equipment password, and establishing a first long connecting channel with the network access equipment after login authorization is completed;
receiving and storing a first file uploaded by a user terminal;
generating a first index identifier corresponding to the stored first file and returning the first index identifier to the user terminal;
receiving a first file transmission request which is sent by the user terminal and carries an equipment account and the first index identifier;
sending the first file transmission request to the network access equipment through the first long connecting channel corresponding to the equipment account;
receiving a downloading request which is sent by the network access equipment in response to the first file transmission request and carries the first index identifier;
and inquiring the first file corresponding to the first index identifier according to the downloading request and transmitting the first file to the network access equipment.
An internet of things-based file transfer device, the device comprising:
the login processing module is used for receiving a login request which is sent by the network access equipment and carries an equipment account and an equipment password, and establishing a first long connecting channel with the network access equipment after login authorization is completed;
the file processing module is used for receiving and storing a first file uploaded by a user terminal; generating a first index identifier corresponding to the stored first file and returning the first index identifier to the user terminal;
the file transmission request processing module is used for receiving a first file transmission request which is sent by the user terminal and carries the equipment account and the first index identifier; sending the first file transmission request to the network access equipment through the first long connecting channel corresponding to the equipment account;
a download request processing module, configured to receive a download request that is sent by the network access device in response to the first file transmission request and carries the first index identifier; and inquiring the first file corresponding to the first index identifier according to the downloading request and transmitting the first file to the network access equipment.
According to the file transmission method and device based on the Internet of things, login authorization is carried out according to the login request actively initiated by the network access equipment, and the communication position of the network access equipment in the network can be obtained while the safety is guaranteed. The first long connecting channel between the network access equipment and the network access equipment is established, so that the effectiveness of communication between the network access equipment and the network access equipment can be maintained, and the network access equipment is prevented from being incapable of communicating due to the change of the network position. The uploading of the first file is initiated by the user terminal actively, so that the communication position of the user terminal in the network can be obtained, and the first index identification is returned to the user terminal. And through the first long connection channel, the first file transmission request initiated by the user terminal can be directly sent to the network access equipment, so that the network access equipment responds to download the first file. Therefore, no matter whether the network access equipment is directly connected to the public network or not and how the internal network environment changes, the network access equipment can be found, and the user terminal can transmit the first file to the network access equipment.
A file transmission method based on the Internet of things comprises the following steps:
uploading the first file to a server for storage so as to generate a first index identifier corresponding to the stored first file;
receiving the first index identification returned by the server;
sending a first file transmission request carrying a device account and the first index identifier to the server, so that the server transmits the first file transmission request through a first long connection channel between network access devices corresponding to the device account, and the network access devices download the first file corresponding to the first index identifier from the server in response to the first file transmission request.
An internet of things-based file transfer device, the device comprising:
the uploading module is used for uploading the first file to a server for storage so as to generate a first index identifier corresponding to the stored first file;
a receiving module, configured to receive the first index identifier returned by the server;
a sending module, configured to send a first file transmission request carrying a device account and the first index identifier to the server, so that the server transmits the first file transmission request through a first long connection channel between network access devices corresponding to the device account, and the network access devices download the first file corresponding to the first index identifier from the server in response to the first file transmission request.
According to the file transmission method and device based on the Internet of things, the first file is actively uploaded to the server for storage, and the first file transmission request is actively initiated to the server, so that the server can also communicate with the local. And a first long connection channel is maintained between the server and the network access device, so that the server can communicate with the network access device through the first long connection channel to transmit the first file transmission request to the network access device. The network access device may respond to the first file transfer request to download the first file, enabling transfer of the first file to the network access device via the server. Therefore, no matter whether the network access equipment is directly connected to the public network or not and how the internal network environment changes, the server can find the network access equipment, and the user terminal can transmit the first file to the network access equipment.
A file transmission method based on the Internet of things comprises the following steps:
after a user terminal sends a first file transmission request carrying a device account to a server, receiving the first file transmission request sent by the server through a first long connecting channel corresponding to the device account;
responding to the first file transmission request, and downloading a first file corresponding to a first index identifier carried by the first file transmission request from the server; and the first index identification is generated according to a first file stored in the server uploaded by the user terminal.
An internet of things-based file transfer device, the device comprising:
the receiving unit is used for receiving a first file transmission request sent by the server through a first long connecting channel according to the equipment account after the user terminal sends the first file transmission request carrying the equipment account to the server;
the downloading unit is used for responding to the first file transmission request, and downloading a first file corresponding to a first index identifier carried by the first file transmission request from the server; and the first index identification is generated according to a first file stored in the server uploaded by the user terminal.
According to the file transmission method and device based on the Internet of things, the first long connecting channel is maintained with the server, so that the server can communicate with the local through the first long connecting channel when the first file transmission request is sent to the server by the user terminal, the first file is downloaded from the server after the first file transmission request is received locally and responses are made, and the first file is uploaded to the server by the user terminal and stored in the server. Therefore, no matter whether the local terminal is connected to the public network or not and how the network environment of the local intranet changes, the server can find the receiver of the file transmission, and the first file transmitted by the user terminal through the server is received.
Drawings
FIG. 1 is an environmental diagram of an Internet of things based file transfer system in one embodiment;
FIG. 2 is a schematic diagram of an internal structure of the server in FIG. 1 according to one embodiment;
FIG. 3 is an environmental diagram of a file transfer system based on the Internet of things in another embodiment;
FIG. 4 is a diagram illustrating an internal structure of the UE in FIG. 1 according to an embodiment;
fig. 5 is a schematic internal structure diagram of the network access device in fig. 1 in one embodiment;
FIG. 6 is a schematic flow chart illustrating a method for transmitting a file based on the Internet of things in one embodiment;
FIG. 7 is a flowchart illustrating steps for transmitting a second file to a user terminal in accordance with a second file transmission request from a network access device, in one embodiment;
FIG. 8 is a flowchart illustrating steps of a user terminal acquiring sound and/or images to form a first file in one embodiment;
fig. 9 is a flowchart illustrating a step of sending a first file transmission request to a network access device through a first long connection channel corresponding to a device account in an embodiment;
fig. 10 is a schematic flowchart of a file transmission method based on the internet of things in another embodiment;
FIG. 11 is a flowchart illustrating the steps of receiving a second file transmitted by a network access device in one embodiment;
FIG. 12 is a flowchart illustrating a method for transferring files based on the Internet of things according to still another embodiment;
FIG. 13 is a flowchart illustrating steps for transferring a second file to a user terminal in one embodiment;
FIG. 14 is a flowchart illustrating the steps of the network access device collecting sound and/or images to form a second file in one embodiment;
FIG. 15 is a block diagram of an embodiment of an Internet of things-based file transfer device;
fig. 16 is a block diagram showing a configuration of a file transfer apparatus based on the internet of things according to another embodiment;
fig. 17 is a block diagram showing a configuration of a file transfer apparatus based on the internet of things according to still another embodiment;
FIG. 18 is a block diagram of an Internet of things-based file transfer device in one embodiment;
fig. 19 is a block diagram showing a configuration of a file transfer apparatus based on the internet of things according to another embodiment;
fig. 20 is a block diagram showing a configuration of a file transfer apparatus based on the internet of things in still another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, in one embodiment, an internet of things based file transfer system 100 is provided that includes a server 102, at least one user terminal 104, and at least one network access device 106. The server 102 is configured to provide support for services of the internet of things, and may be implemented by using a single server, or may include multiple servers, where each server implements a part of functions.
In one embodiment, the internal structure of the server 102 in fig. 1 is shown in fig. 2, and the server 102 includes a processor, a storage medium, a memory, and a network interface connected by a system bus. The storage medium of the server 102 stores an operating system, a database, and a file transmission device based on the internet of things, which is used to implement a file transmission method based on the internet of things. The processor of the server 102 is configured to execute a method of file transfer based on the internet of things. The server 102 has a public network address. In another embodiment, as shown in FIG. 3, server 102 includes a message server and a file storage server.
In one embodiment, the internal structure of the user terminal 104 in fig. 1 is as shown in fig. 4, and the user terminal 104 is connected to the public network through its gateway, and can be connected to the server 102 according to the public network address of the server 102. A public network refers to a network that can be directly connected to the internet without the need for a router or switch, and nodes connected to the public network can be directly accessed by other nodes in the internet. The intranet is a sub-network that needs to be connected to the internet through a router or a switch, and nodes in the intranet share a public network address, and the nodes in the intranet are difficult to be actively discovered by other nodes in the internet.
The user terminal 104 includes a processor, a storage medium, a memory, a network interface, a display screen, and an input device connected by a system bus. The storage medium of the user terminal 104 stores an operating system and a file transmission device based on the internet of things, and the file transmission device based on the internet of things is used for realizing a file transmission method based on the internet of things. The processor of the user terminal 104 is configured to execute a method of file transfer based on the internet of things. The user terminal 104 is directly oriented to a user, and may be a desktop computer or a mobile terminal, such as a smart phone, a tablet computer, a PDA (personal digital assistant), and the like.
The network access device 106 in fig. 1 refers to a device that can access and be controlled through the internet of things. The network access device 106 is distinct from the user terminal 104. Network access device 106 may connect to the public network through a gateway and may connect to server 102 based on the public network address of server 102. The internal structure of the network access device 106 in one embodiment is shown in fig. 5. The network access device 106 includes a control chip, a storage medium, and a work function mechanism. The control chip has a network connection function, and the storage medium stores a file transmission device based on the Internet of things and is used for realizing a file transmission method based on the Internet of things. The network access device 106 may be a network camera, a smart tv, a printer, etc. The working function mechanism of the network camera at least has the function of capturing images, and the working function mechanism of the intelligent television at least has the functions of receiving television program signals and playing television programs, and so on.
As shown in fig. 6, in an embodiment, a file transmission method based on the internet of things is provided, and this embodiment is exemplified by applying the method to the server 102 in fig. 1. The method specifically comprises the following steps:
step 602, receiving a login request carrying a device account and a device password from a network access device, and establishing a first long connection channel with the network access device after completing login authorization.
The device account refers to a character string that can uniquely identify a network access device, and may include at least one of numbers, letters, and symbols, for example, the device account may be "123456789". The device account may adopt a serial number or a Media Access Control (MAC) address of the network Access device, and may be generated by a device manufacturer in a custom coding manner. The equipment account can be solidified in the network access equipment by a manufacturer of the network access equipment and read when needed; the device account number may also be obtained by server registration.
The device password corresponds to the device account, is a basis for authentication by the server, and may include at least one of a number, a letter, and a symbol, for example, the device password may be "abcdefg". The device password may be generated randomly or may be a default string. The equipment password can be solidified in the network access equipment by a generator of the network access equipment and read when needed; the device password can also be obtained together when the server registers the device account. The server can modify the device password of the network access device according to the request of the user terminal and inform the network access device to update the device password stored in the network access device.
The server correspondingly stores the equipment account and the equipment password of the network access equipment, and correspondingly records the type identifiers which respectively represent the stored account and the stored password as the equipment account and the equipment password of the network access equipment. For example, a device account and a device password of the network access device stored by the server may be as shown in table one, where device is a type identifier, and indicates that the corresponding account and password are the device account and the device password of the network access device, respectively; the mobile is another type of identifier, which indicates that the corresponding account and password are the terminal account and the terminal password, respectively.
Table one:
account number Cipher code Type (B)
123456789 abcdefg device
987654321 dkgssd mobile
The network access equipment is internally provided with a public network address of the server, or is internally provided with a server domain name which can inquire the public network address, so that the network access equipment can immediately send a login request to the server according to the public network address of the server after being electrified, or the network access equipment can automatically trigger to send the login request to the server at a predefined time point, or the network access equipment can trigger to send the login request to the server according to the public network address of the server after detecting a login operation instruction triggered by a user. The login request carries a device account and a device password which are built in the network access device.
After receiving a login request sent by the network access equipment, the server verifies the equipment account and the equipment password in the login request according to the equipment account and the equipment password which are correspondingly recorded on the server to realize authentication, and if the verification is passed, the login authorization of the network access equipment is completed. And then a first long connecting channel is established between the server and the network access equipment. The first long connection channel corresponds to the device account.
The network access device is to maintain the first long connection channel with the server. The concept of long connections is in contrast to short connections, which are very short requests and responses, such as downloading a web page to a website or submitting an order to a website. However, the long connection is different, and the long connection requires that the network access device and the server always maintain a connection state, so that the server can be issued to the network access device in time when any information needs to be notified to the network access device.
And step 604, receiving and storing the first file uploaded by the user terminal.
Specifically, the user terminal may upload the first file to be transmitted to the network access device to the server for storage according to the public network address of the server. If the server comprises a message server and a file storage server, the first file is stored on the file storage server. The description of the first in the first document is used to distinguish from the following second document, and the description of the first and second documents does not limit the occurrence order.
The user terminal can provide a user interaction interface, and the first file is selected according to a file selection instruction triggered by a user acting on the user interaction interface, so that the first file is uploaded to the server for storage automatically or after an uploading confirmation instruction triggered by the user is received. The first file may be a plain text file or a multimedia file. The multimedia file may be, for example, a file including audio data, video data, and pictures, or a file in which at least one of audio data, video data, and pictures is formed together with text information.
In one embodiment, the user terminal may detect a file size of the first file, and upload the first file to the server if the file size is greater than a preset threshold; and if the first file is smaller than the preset threshold value, generating a message comprising the first file and transmitting the message to the network access equipment through the server. In this embodiment, if the first file to be transmitted is very small, the first file may be directly added to the message and transmitted to the network access device through the server, which is more efficient.
Step 606, generating a first index identifier corresponding to the stored first file and returning the first index identifier to the user terminal.
Specifically, after storing a first file, the server correspondingly generates and records a first index identifier for identifying a storage location of the first file. The description of the first index identifications herein is used to distinguish from the second index identification described below. The information of the first index identification and the storage location of the first file in the database may be represented by a key and a corresponding value, respectively.
The user terminal carries a source address when uploading the first file, so that the server can determine the position of the user terminal in the network according to the source address, and then returns the generated first index identifier to the user terminal. Or in an embodiment, the server may receive a login request carrying a terminal account and a terminal password from the user terminal in advance, and accordingly, after the login authorization is completed, a second long connection channel with the user terminal is established. The second long connection channel is corresponding to the terminal account. The user terminal may carry the terminal account when uploading the first file, so that in step 606, the server may return the generated first index identifier to the user terminal through the second long connection channel corresponding to the terminal account.
Step 608, a first file transmission request carrying the device account and the first index identifier and sent by the user terminal is received.
Specifically, after acquiring the first index identifier, the user terminal automatically or in response to a request trigger instruction triggered by the user, sends a first file transmission request carrying the device account and the first index identifier to the server. The server has a public network address, and the user terminal can be connected with the server for communication at any time according to the public network address of the server. If the server comprises a message server and a file storage server, the message server receives a first file transmission request which is sent by the user terminal and carries the equipment account and the first index identifier.
The first file transfer request is a message having a message type identifier indicating that the message is a file transfer request. The description of the first file transfer request is used to distinguish from the second file transfer request described below, and the first and second descriptions do not limit the order of occurrence.
Step 610, a first file transmission request is sent to the network access device through a first long connection channel corresponding to the device account.
Specifically, the first long connection channel corresponding to the device account is a first long connection channel between the network access device corresponding to the device account and the server. The server can be connected and communicated with the corresponding network access equipment at any time through the first long connecting channel. If the server comprises a message server and a file storage server, the message server can send a first file transmission request to the network access device through a first long connection channel corresponding to the device account.
In an embodiment, a server stores an association relationship between a device account and a terminal account, and after receiving a first file transmission request sent by a user terminal, the server checks whether the device account and the terminal account carried in the first file transmission request have an association relationship, if so, step 610 is executed, and if not, no action is taken or a notification without access permission is returned to the user terminal. The user terminal corresponding to the terminal account in the association relationship has the authority to release the association relationship, and after the association relationship is released, other user terminals can establish a new association relationship.
Step 612, receiving a download request with a first index identifier sent by the network access device in response to the first file transmission request.
Specifically, after receiving the first file transmission request, the network access device may automatically send a download request carrying the first index identifier to the server in response to the first file transmission request, and receive the download request by the server.
In an embodiment, after receiving the first file transfer request, the network access device may trigger a prompt operation in response to the first file transfer request, and send a download request carrying the first index identifier to the server after receiving the user confirmation instruction, and receive the download request by the server.
For example, after receiving the first file transmission request, the network access device may prompt that the first file transmission request is received in a form of voice broadcast, flashing of an indicator light, and the like, so as to wait for a user to further confirm. After receiving a user confirmation instruction, for example, after the user clicks a download confirmation button on the network access device, or confirms a download operation in a voice control manner, the network access device sends a download request carrying the first index identifier to the server.
In one embodiment, the network access device starts timing after triggering the prompt operation, and cancels the prompt operation or triggers to send a download request carrying the first index identifier to the server according to a predefined policy when the timing reaches a preset time and no user confirmation instruction is detected. In this embodiment, after the prompt operation is performed, if the user does not timely perform the processing, the processing may be performed according to a predefined policy, and the response may be made to the first file transmission request in time.
Step 614, according to the download request, querying a first file corresponding to the first index identifier and transmitting the first file to the network access device.
Specifically, the server responds after receiving the download request, queries a first file corresponding to the first index identifier, and transmits the queried first file to the network access device if the queried first file is received; if not, the feedback message of transmission failure can be fed back to the user terminal.
According to the file transmission method based on the Internet of things, login authorization is carried out according to the login request actively initiated by the network access equipment, so that the communication position of the network access equipment in the network can be obtained while the safety is ensured. The first long connecting channel between the network access equipment and the network access equipment is established, so that the effectiveness of communication between the network access equipment and the network access equipment can be maintained, and the network access equipment is prevented from being incapable of communicating due to the change of the network position. The uploading of the first file is initiated by the user terminal actively, so that the communication position of the user terminal in the network can be obtained, and the first index identification is returned to the user terminal. And through the first long connection channel, the first file transmission request initiated by the user terminal can be directly sent to the network access equipment, so that the network access equipment responds to download the first file. Therefore, no matter whether the network access equipment is directly connected to the public network or not and how the internal network environment changes, the network access equipment can be found, and the user terminal can transmit the first file to the network access equipment.
As shown in fig. 7, in an embodiment, the file transmission method based on the internet of things further includes a step of transmitting a second file to the user terminal according to a second file transmission request from the network access device, and specifically includes the following steps:
step 702, receiving a login request carrying a terminal account and a terminal password sent by a user terminal, and establishing a second long connection channel with the user terminal after completing login authorization.
Specifically, the terminal account refers to a character string that can identify a user terminal, and may include at least one of numbers, letters, and symbols. If the user terminal is a mobile phone, the terminal account may be a mobile phone number, or the terminal account may also be an account of the user in the social network, such as an instant messaging account.
The interactive capability of the user terminal is stronger than that of the network access equipment, the user terminal can provide a user interactive interface, and the user interactive interface provides a terminal account input box and a terminal password input box, so that the user terminal can acquire information input by the user in the terminal account input box as a terminal account, use the information input in the terminal password input box as a terminal password, and trigger to send a login request carrying the terminal account and the terminal password to the server after receiving a login trigger instruction triggered by the user.
The user terminal is internally provided with a public network address of the server, or is internally provided with a server domain name which can inquire the public network address, so that the user terminal can be connected and communicated with the server at any time according to the public network address.
The server correspondingly stores the terminal account and the terminal password and correspondingly records type identifications which respectively represent the stored account and the stored password as the terminal account and the terminal password. For example, "mobile" in the above table one indicates that the corresponding account is a terminal account and the corresponding password is a terminal password.
After receiving a login request sent by a user terminal, the server verifies the terminal account and the terminal password in the login request according to the terminal account and the terminal password which are correspondingly recorded on the server to realize authentication, and if the verification is passed, the login authorization of the user terminal is completed. Then a second long connection channel is established and maintained between the server and the user terminal. The second long connection channel is corresponding to the terminal account. Step 702 may precede or follow step 602.
And step 704, receiving and storing the second file uploaded by the network access equipment.
Specifically, the network access device may upload the second file to be transmitted to the user terminal to the server for storage according to the public network address of the server. And if the server comprises a message server and a file storage server, storing the second file on the file storage server.
Step 706, generating a second index identifier corresponding to the stored second file and returning the second index identifier to the network access device.
Specifically, after the server stores the second file, a second index identifier for identifying a storage location of the second file is correspondingly generated and recorded. The information in the database that the second index identifies the storage location of the second file may be represented by a key and a corresponding value, respectively. The network access device carries a source address when uploading the second file, so that the server can determine the position of the network access device in the network according to the source address, and return the generated second index identifier to the network access device. The server may also return the generated second index identifier to the network access device through the first long connection channel.
Step 708, receiving a second file transmission request carrying the terminal account and the second index identifier sent by the network access device.
Specifically, after acquiring the second index identifier, the network access device automatically or in response to a request trigger instruction triggered by a user, sends a second file transmission request carrying the terminal account and the second index identifier to the server. The server has a public network address, and the network access equipment can be connected with the server for communication at any time according to the public network address of the server. And if the server comprises an information server and a file storage server, the information server receives a second file transmission request which is sent by the network access equipment and carries the terminal account and a second index identifier. The second file transfer request is a message having a message type identifier indicating that the message is a file transfer request.
Step 710, sending a second file transmission request to the user terminal through a second long connection channel corresponding to the terminal account.
Specifically, the second long connection channel corresponding to the terminal account is the second long connection channel between the user terminal corresponding to the terminal account and the server. The server can be connected and communicated with the corresponding user terminal at any time through the second long connecting channel. And if the server comprises a message server and a file storage server, the message server can send a second file transmission request to the user terminal through a second long connecting channel corresponding to the terminal account.
Step 712, receiving a download request with the second index identifier sent by the user terminal in response to the second file transmission request.
Specifically, after receiving the second file transmission request, the user terminal may automatically send a download request carrying the second index identifier to the server in response to the second file transmission request, and receive the download request by the server.
In an embodiment, after receiving the second file transmission request, the user terminal may trigger a prompt operation in response to the second file transmission request, and send a download request carrying the second index identifier to the server after receiving the user confirmation instruction, and receive the download request by the server.
In one embodiment, the user terminal starts timing after triggering the prompt operation, and cancels the prompt operation or triggers to send a download request carrying the second index identifier to the server according to a predefined policy when the timing reaches a preset time and no user confirmation instruction is detected.
And 714, inquiring a second file corresponding to the second index identifier according to the downloading request and transmitting the second file to the user terminal.
Specifically, the server responds after receiving the download request, queries a second file corresponding to the second index identifier, and transmits the queried second file to the user terminal if the queried second file is received; if not, the feedback message of transmission failure can be fed back to the network access equipment.
In this embodiment, the user terminal and the network access device can realize bidirectional file transmission by using the server, and the method is suitable for various scenes needing bidirectional file transmission.
In one embodiment, the first file is a multimedia file; the first file is generated according to sound and/or images collected by the user terminal. For example, the first file may be a voice message file, a video file, or the like. Referring to fig. 8, the detailed steps of the user terminal collecting sound and/or images to form the first file are specifically described as follows:
step 802, detecting a recording trigger instruction.
The recording trigger instruction refers to an instruction for triggering a recording operation, and the recording trigger instruction can be triggered by pressing a mechanical key on the user terminal or clicking a specific control in a user interaction interface provided by the user terminal.
And step 804, starting to collect the environmental sound and/or image according to the recording trigger instruction, and stopping collecting until a preset time length or a recording end instruction is detected.
Specifically, the environmental sound and/or image here refers to sound and/or image in the environment where the user terminal is located, and the specific user terminal may collect the environmental sound through a microphone of the user terminal and collect the image through a camera of the user terminal. The preset time period may be any time period, for example, 5 to 10 seconds. If the trigger action of the recording trigger instruction is continuous pressing, the trigger action of the recording end instruction may be stop pressing. Or one click of the specific control is used for triggering a recording triggering instruction, and the other click is used for triggering a recording ending instruction.
Step 806, generating a first file from the captured sound and/or image.
Specifically, the collected data of the sound may be formed into audio data, and the audio data may be used as a first file; the data of the collected image can be formed into video data, and the video data is used as a first file; the audio data may also be incorporated into the video data at respective time stamps to form a first file.
In the embodiment, the user terminal can acquire multimedia data in real time to form a multimedia file and transmit the multimedia file to the network access equipment, so that an interaction mode between the user terminal and the network access equipment is increased.
In one embodiment, the second file is a multimedia file; the second file is generated according to the sound and/or image collected by the network access equipment. The network access device in this embodiment may adopt the above steps 802 to 806 to capture sound and/or image to generate the second file.
As shown in fig. 9, in an embodiment, the step 610 specifically includes the following steps:
step 902, detecting whether the device account corresponds to an online state. If so, go to step 904, otherwise go to step 906.
Specifically, the online status indicates that the network access device is in an effective login status after logging in the server, and the corresponding network access device has various rights after logging in corresponding to the online status. The server can detect whether the device account corresponds to the online state by detecting whether a first long connection channel between the server and the network access device corresponding to the device account is valid.
Step 904, a first file transmission request is transmitted to the network access device through a first long connection channel between the network access devices corresponding to the device account.
Specifically, after detecting that the device account corresponds to the online state, the server may directly transmit the first file transmission request to the network access device through the first long connection channel.
Step 906, caching the first file transmission request until the online state corresponding to the device account is detected, and transmitting the cached first file transmission request to the network access device through a first long connection channel between the device account and the network access device corresponding to the device account.
Specifically, if it is detected that the device account does not correspond to the online state, the server may first cache the first file transmission request, and continue to detect until it is detected that the device account corresponds to the online state, and then transmit the cached first file transmission request to the network access device.
For example, the server may maintain an offline message table in which the cached first file transfer request is recorded. The offline message table may be represented as shown in table two:
table two:
sender (Account number) Receiver (Account number) Time of day Message type Parameter(s)
123456789 123abcde 2014/10/1016:39 File transfer request Index identifier 1
987654321 123abcde 2014/10/1017:50 File transfer request Index identification 2
Referring to the second table, if the device account corresponding to the network access device is "123 abcde", after the server detects that the device account "123 abcde" corresponds to the offline state, the server stores the file transmission request as the device account corresponding to the offline message in the offline message table shown in the second table. And after the server continues to detect the online state corresponding to the equipment account number '123 abcde', extracting the offline message corresponding to the equipment account number from the offline message table, and transmitting the extracted offline message to the network access equipment. The extracted offline message includes the first file transfer request.
In this embodiment, the file transmission request may be prevented from being lost by detecting the online status of the network access device and sending the first file transmission request only when the online status of the network access device is detected.
In one embodiment, there are two ways for the network access device or the ue to maintain a long connection channel with the server, the first way is to maintain a TCP (Transmission Control Protocol) connection with the server, and the second way is to periodically send a heartbeat packet to the server. The TCP connection itself is a connection-oriented protocol that can be maintained once the three-way handshake is completed. The heartbeat packet sent by the network access equipment or the user terminal at regular time can maintain the online state of the network access equipment or the user terminal, and the network address of the network access equipment or the user terminal can be reported at regular time, so that the server can communicate with the network access equipment or the user terminal at any time. And because the current router NAT (network address translation) module has communication limitation, only when a certain node a in the intranet sends a message to another node B outside the intranet within a period of time, the message from the other node B to the node a in the intranet is allowed, which is called NAT traversal. Therefore, the timed heartbeat packet sending can maintain the NAT traversal state between the network access equipment and the server, so that the server can communicate with the network access equipment at any time.
As shown in fig. 10, in an embodiment, another file transmission method based on the internet of things is provided, and this embodiment is illustrated by applying the method to the user terminal 104 in fig. 1. The method specifically comprises the following steps:
step 1002, uploading the first file to a server for storage, so as to generate a first index identifier corresponding to the stored first file.
Specifically, the user terminal may upload the first file to be transmitted to the network access device to the server for storage according to the public network address of the server. If the server comprises a message server and a file storage server, the first file is stored on the file storage server.
The user terminal can provide a user interaction interface, and the first file is selected according to a file selection instruction triggered by a user acting on the user interaction interface, so that the first file is uploaded to the server for storage automatically or after an uploading confirmation instruction triggered by the user is received. The first file may be a plain text file or a multimedia file. The multimedia file may be, for example, a file including audio data, video data, and pictures, or a file in which at least one of audio data, video data, and pictures is formed together with text information.
In one embodiment, the user terminal may detect a file size of the first file, and upload the first file to the server if the file size is greater than a preset threshold; and if the first file is smaller than the preset threshold value, generating a message comprising the first file and transmitting the message to the network access equipment through the server.
After the server stores the first file, a first index identifier for identifying the storage location of the first file is correspondingly generated and recorded. The information in the database that the first index identifies the storage location of the first file may be represented by a key and a corresponding value, respectively.
Before step 1002, the network access device may send a login request carrying a device account and a device password to the server, so that the server completes login authorization and establishes a first long connection channel between the network access device and the server. The user terminal can also send a login request carrying a terminal account and a terminal password to the server so that the server completes login authorization and a second long connection channel between the user terminal and the server is established.
Step 1004, receiving the first index identifier returned by the server.
The user terminal carries a source address when uploading the first file, so that the server can determine the position of the user terminal in the network according to the source address, and then returns the generated first index identifier to the user terminal. Or in an embodiment, the server may receive a login request carrying a terminal account and a terminal password from the user terminal in advance, and accordingly, after the login authorization is completed, a second long connection channel with the user terminal is established. The second long connection channel is corresponding to the terminal account. The user terminal may carry the terminal account when uploading the first file, so that in step 1004, the server may return the generated first index identifier to the user terminal through the second long connection channel corresponding to the terminal account.
Step 1006, sending a first file transmission request carrying the device account and the first index identifier to the server, so that the server transmits the first file transmission request through a first long connection channel between the network access devices corresponding to the device account, and the network access devices download the first file corresponding to the first index identifier from the server in response to the first file transmission request.
Specifically, after acquiring the first index identifier, the user terminal automatically or in response to a request trigger instruction triggered by the user, sends a first file transmission request carrying the device account and the first index identifier to the server. The server has a public network address, and the user terminal can be connected with the server for communication at any time according to the public network address of the server. If the server comprises a message server and a file storage server, the message server receives a first file transmission request which is sent by the user terminal and carries the equipment account and the first index identifier. The first file transfer request is a message having a message type identifier indicating that the message is a file transfer request.
The first long connection channel corresponding to the device account is a first long connection channel between the network access device corresponding to the device account and the server. The server can be connected and communicated with the corresponding network access equipment at any time through the first long connecting channel. If the server comprises a message server and a file storage server, the message server can send a first file transmission request to the network access device through a first long connection channel corresponding to the device account.
In an embodiment, a server stores an association relationship between a device account and a terminal account, and after receiving a first file transmission request sent by a user terminal, the server checks whether the device account and the terminal account carried in the first file transmission request have an association relationship, if so, step 610 is executed, and if not, no action is taken or a notification without access permission is returned to the user terminal. The user terminal corresponding to the terminal account in the association relationship has the authority to release the association relationship, and after the association relationship is released, other user terminals can establish a new association relationship.
After receiving the first file transmission request, the network access device may automatically send a download request carrying the first index identifier to the server in response to the first file transmission request, and receive the download request by the server.
In an embodiment, after receiving the first file transfer request, the network access device may trigger a prompt operation in response to the first file transfer request, and send a download request carrying the first index identifier to the server after receiving the user confirmation instruction, and receive the download request by the server.
In one embodiment, the network access device starts timing after triggering the prompt operation, and cancels the prompt operation or triggers to send a download request carrying the first index identifier to the server according to a predefined policy when the timing reaches a preset time and no user confirmation instruction is detected.
The server responds after receiving the downloading request, inquires a first file corresponding to the first index identifier, and transmits the inquired first file to the network access equipment if the inquired first file is inquired; if not, the feedback message of transmission failure can be fed back to the user terminal.
According to the file transmission method based on the Internet of things, the first file is actively uploaded to the server for storage, and the first file transmission request is actively initiated to the server, so that the server can also communicate with the local. And a first long connection channel is maintained between the server and the network access device, so that the server can communicate with the network access device through the first long connection channel to transmit the first file transmission request to the network access device. The network access device may respond to the first file transfer request to download the first file, enabling transfer of the first file to the network access device via the server. Therefore, no matter whether the network access equipment is directly connected to the public network or not and how the network environment of the internal network of the network access equipment changes, the server can find the network access equipment, and the user terminal can transmit the first file to the network access equipment.
As shown in fig. 11, in an embodiment, the file transmission method based on the internet of things further includes a step of receiving a second file transmitted by the network access device, and specifically includes the following steps:
step 1102, after the network access device sends the second file transmission request carrying the terminal account to the server, receiving the second file transmission request sent by the server through the second long connection channel corresponding to the terminal account.
Specifically, the network access device may upload the second file to be transmitted to the user terminal to the server for storage according to the public network address of the server. And if the server comprises a message server and a file storage server, storing the second file on the file storage server.
After the server stores the second file, a second index identifier for identifying the storage location of the second file is correspondingly generated and recorded. The information in the database that the second index identifies the storage location of the second file may be represented by a key and a corresponding value, respectively. The network access device carries a source address when uploading the second file, so that the server can determine the position of the network access device in the network according to the source address, and return the generated second index identifier to the network access device. The server may also return the generated second index identifier to the network access device through the first long connection channel.
After the network access device acquires the second index identifier, the network access device automatically or in response to a request triggering instruction triggered by a user sends a second file transmission request carrying the terminal account and the second index identifier to the server. The server has a public network address, and the network access equipment can be connected with the server for communication at any time according to the public network address of the server. And if the server comprises an information server and a file storage server, the information server receives a second file transmission request which is sent by the network access equipment and carries the terminal account and a second index identifier. The second file transfer request is a message having a message type identifier indicating that the message is a file transfer request.
And the second long connection channel corresponding to the terminal account is the second long connection channel between the user terminal corresponding to the terminal account and the server. The server can be connected and communicated with the corresponding user terminal at any time through the second long connecting channel. And if the server comprises a message server and a file storage server, the message server can send a second file transmission request to the user terminal through a second long connecting channel corresponding to the terminal account.
Step 1104, responding to the second file transmission request, so as to download a second file corresponding to a second index identifier carried by the second file transmission request from the server; and the second index identification is generated according to a second file which is uploaded to the server by the network access equipment.
Specifically, the user terminal sends a download request carrying a second index identifier to the server in response to the second file transmission request, and receives a second file corresponding to the second index identifier, which is queried and returned by the server according to the download request.
After receiving the second file transmission request, the user terminal may respond to the second file transmission request, automatically send a download request carrying the second index identifier to the server, and receive the download request by the server. In an embodiment, after receiving the second file transmission request, the user terminal may trigger a prompt operation in response to the second file transmission request, and send a download request carrying the second index identifier to the server after receiving the user confirmation instruction, and receive the download request by the server. In one embodiment, the user terminal starts timing after triggering the prompt operation, and cancels the prompt operation or triggers to send a download request carrying the second index identifier to the server according to a predefined policy when the timing reaches a preset time and no user confirmation instruction is detected.
The server responds after receiving the downloading request, inquires a second file corresponding to the second index identifier, and transmits the inquired second file to the user terminal if the inquired second file is inquired; if not, the feedback message of transmission failure can be fed back to the network access equipment.
In this embodiment, the user terminal and the network access device can realize bidirectional file transmission by using the server, and the method is suitable for various scenes needing bidirectional file transmission.
In one embodiment, the first file is a multimedia file; the first file is generated according to sound and/or images collected by the user terminal. For example, the first file may be a voice message file, a video file, or the like. Referring to fig. 8, the detailed steps of the user terminal collecting sound and/or images to form the first file are specifically described as follows:
step 802, detecting a recording trigger instruction.
The recording trigger instruction refers to an instruction for triggering a recording operation, and the recording trigger instruction can be triggered by pressing a mechanical key on the user terminal or clicking a specific control in a user interaction interface provided by the user terminal.
And step 804, starting to collect the environmental sound and/or image according to the recording trigger instruction, and stopping collecting until a preset time length or a recording end instruction is detected.
Specifically, the environmental sound and/or image here refers to sound and/or image in the environment where the user terminal is located, and the specific user terminal may collect the environmental sound through a microphone of the user terminal and collect the image through a camera of the user terminal. The preset time period may be any time period, for example, 5 to 10 seconds. If the trigger action of the recording trigger instruction is continuous pressing, the trigger action of the recording end instruction may be stop pressing. Or one click of the specific control is used for triggering a recording triggering instruction, and the other click is used for triggering a recording ending instruction.
Step 806, generating a first file from the captured sound and/or image.
Specifically, the collected data of the sound may be formed into audio data, and the audio data may be used as a first file; the data of the collected image can be formed into video data, and the video data is used as a first file; the audio data may also be incorporated into the video data at respective time stamps to form a first file.
In the embodiment, the user terminal can acquire multimedia data in real time to form a multimedia file and transmit the multimedia file to the network access equipment, so that an interaction mode between the user terminal and the network access equipment is increased.
In an embodiment, in step 1006, the step of enabling the server to transmit the first file transmission request through the first long connection channel between the network access devices corresponding to the device account specifically includes: enabling the server to detect whether the equipment account corresponds to an online state; if so, transmitting a first file transmission request to the network access equipment through a first long connecting channel between the server and the network access equipment corresponding to the equipment account; and if not, caching the first file transmission request until the online state corresponding to the equipment account is detected, and transmitting the cached first file transmission request to the network access equipment through a first long connecting channel between the server and the network access equipment corresponding to the equipment account.
Specifically, after detecting that the device account corresponds to the online state, the server may directly transmit the first file transmission request to the network access device through the first long connection channel. If it is detected that the device account does not correspond to the online state, the server may first cache the first file transmission request, and continue to detect until the device account does correspond to the online state, and then transmit the cached first file transmission request to the network access device. The server may maintain an offline message table in which the cached first file transfer request is recorded. And when the server continues to detect the online state corresponding to the equipment account, extracting the offline message corresponding to the equipment account from the offline message table, and transmitting the extracted offline message to the network access equipment. The extracted offline message includes the first file transfer request.
In this embodiment, the file transmission request may be prevented from being lost by detecting the online status of the network access device and sending the first file transmission request only when the online status of the network access device is detected.
In one embodiment, the network access device or the user terminal maintains a long connection channel with the server in two ways, the first way is to maintain a TCP connection with the server, and the second way is to periodically send heartbeat packets to the server. The TCP connection itself is a connection-oriented protocol that can be maintained once the three-way handshake is completed. The heartbeat packet sent by the network access equipment or the user terminal at regular time can maintain the online state of the network access equipment or the user terminal, and the network address of the network access equipment or the user terminal can be reported at regular time, so that the server can communicate with the network access equipment or the user terminal at any time. And because the current router NAT module has communication limitation, only in a period of time after a certain node A in the internal network sends a message to another node B outside the internal network, the message from the other node B to the node A in the internal network is allowed, which is called NAT traversal. Therefore, the timed heartbeat packet sending can maintain the NAT traversal state between the network access equipment and the server, so that the server can communicate with the network access equipment at any time.
As shown in fig. 12, in one embodiment, another file transmission method based on the internet of things is provided, and the embodiment itself is illustrated by applying the method to the network access device 106 in fig. 1. The method specifically comprises the following steps:
step 1202, after the user terminal sends the first file transmission request carrying the device account to the server, the first file transmission request sent by the server through the first long connection channel corresponding to the device account is received.
Specifically, the user terminal may upload the first file to be transmitted to the network access device to the server for storage according to the public network address of the server. If the server comprises a message server and a file storage server, the first file is stored on the file storage server.
The user terminal can provide a user interaction interface, and the first file is selected according to a file selection instruction triggered by a user acting on the user interaction interface, so that the first file is uploaded to the server for storage automatically or after an uploading confirmation instruction triggered by the user is received. The first file may be a plain text file or a multimedia file. The multimedia file may be, for example, a file including audio data, video data, and pictures, or a file in which at least one of audio data, video data, and pictures is formed together with text information.
In one embodiment, the user terminal may detect a file size of the first file, and upload the first file to the server if the file size is greater than a preset threshold; and if the first file is smaller than the preset threshold value, generating a message comprising the first file and transmitting the message to the network access equipment through the server.
Before step 1202, the network access device may send a login request carrying a device account and a device password to the server, so that the server completes login authorization and establishes a first long connection channel between the network access device and the server. The user terminal can also send a login request carrying a terminal account and a terminal password to the server so that the server completes login authorization and a second long connection channel between the user terminal and the server is established.
After the server stores the first file, a first index identifier for identifying the storage location of the first file is correspondingly generated and recorded. The information in the database that the first index identifies the storage location of the first file may be represented by a key and a corresponding value, respectively.
The user terminal carries a source address when uploading the first file, so that the server can determine the position of the user terminal in the network according to the source address, and then returns the generated first index identifier to the user terminal. Or in an embodiment, the server may receive a login request carrying a terminal account and a terminal password from the user terminal in advance, and accordingly, after the login authorization is completed, a second long connection channel with the user terminal is established. The second long connection channel is corresponding to the terminal account. The user terminal can carry the terminal account number when uploading the first file, so that the server can return the generated first index identification to the user terminal through the second long connecting channel corresponding to the terminal account number.
After acquiring the first index identifier, the user terminal automatically or in response to a request trigger instruction triggered by the user, so as to send a first file transmission request carrying the equipment account and the first index identifier to the server. The server has a public network address, and the user terminal can be connected with the server for communication at any time according to the public network address of the server. If the server comprises a message server and a file storage server, the message server receives a first file transmission request which is sent by the user terminal and carries the equipment account and the first index identifier. The first file transfer request is a message having a message type identifier indicating that the message is a file transfer request.
The first long connection channel corresponding to the device account is a first long connection channel between the network access device corresponding to the device account and the server. The server can be connected and communicated with the corresponding network access equipment at any time through the first long connecting channel. If the server comprises a message server and a file storage server, the message server can send a first file transmission request to the network access device through a first long connection channel corresponding to the device account.
In an embodiment, a server stores an association relationship between a device account and a terminal account, and after receiving a first file transmission request sent by a user terminal, the server checks whether the device account and the terminal account carried in the first file transmission request have an association relationship, if so, step 610 is executed, and if not, no action is taken or a notification without access permission is returned to the user terminal. The user terminal corresponding to the terminal account in the association relationship has the authority to release the association relationship, and after the association relationship is released, other user terminals can establish a new association relationship.
Step 1204, responding to the first file transmission request, downloading a first file corresponding to the first index identifier carried by the first file transmission request from the server; the first index identification is generated according to a first file which is uploaded to a server by a user terminal and stored.
Specifically, after receiving the first file transmission request, the network access device may automatically send a download request carrying the first index identifier to the server in response to the first file transmission request, and receive the download request by the server.
In an embodiment, after receiving the first file transfer request, the network access device may trigger a prompt operation in response to the first file transfer request, and send a download request carrying the first index identifier to the server after receiving the user confirmation instruction, and receive the download request by the server.
In one embodiment, the network access device starts timing after triggering the prompt operation, and cancels the prompt operation or triggers to send a download request carrying the first index identifier to the server according to a predefined policy when the timing reaches a preset time and no user confirmation instruction is detected.
The server responds after receiving the downloading request, inquires a first file corresponding to the first index identifier, and transmits the inquired first file to the network access equipment if the inquired first file is inquired; if not, the feedback message of transmission failure can be fed back to the user terminal.
According to the file transmission method based on the Internet of things, the first long connecting channel is maintained with the server, so that the server can communicate with the local through the first long connecting channel when the user terminal sends the first file transmission request to the server, the first file is downloaded from the server after the first file transmission request is locally received and responds, and the first file is uploaded to the server by the user terminal and stored in the server. Therefore, no matter whether the local terminal is connected to the public network or not and how the network environment of the local intranet changes, the server can find the receiver of the file transmission, and the first file transmitted by the user terminal through the server is received.
As shown in fig. 13, in an embodiment, the file transmission method based on the internet of things further includes a step of transmitting a second file to the user terminal, and specifically includes the following steps:
step 1302, uploading the second file to a server for storage, so as to generate a second index identifier corresponding to the stored second file.
Specifically, the network access device may upload the second file to be transmitted to the user terminal to the server for storage according to the public network address of the server. And if the server comprises a message server and a file storage server, storing the second file on the file storage server.
After the server stores the second file, a second index identifier for identifying the storage location of the second file is correspondingly generated and recorded. The information in the database that the second index identifies the storage location of the second file may be represented by a key and a corresponding value, respectively.
And 1304, receiving a second index identifier returned by the server.
The network access device carries a source address when uploading the second file, so that the server can determine the position of the network access device in the network according to the source address, and return the generated second index identifier to the network access device. The server may also return the generated second index identifier to the network access device through the first long connection channel.
Step 1306, sending a second file transmission request carrying the terminal account and the second index identifier to the server, so that the server transmits the second file transmission request through a second long connection channel between the user terminals corresponding to the terminal account, and the user terminals download a second file corresponding to the second index identifier from the server in response to the second file transmission request.
After the network access device acquires the second index identifier, the network access device automatically or in response to a request triggering instruction triggered by a user sends a second file transmission request carrying the terminal account and the second index identifier to the server. The server has a public network address, and the network access equipment can be connected with the server for communication at any time according to the public network address of the server. And if the server comprises an information server and a file storage server, the information server receives a second file transmission request which is sent by the network access equipment and carries the terminal account and a second index identifier. The second file transfer request is a message having a message type identifier indicating that the message is a file transfer request.
And the second long connection channel corresponding to the terminal account is the second long connection channel between the user terminal corresponding to the terminal account and the server. The server can be connected and communicated with the corresponding user terminal at any time through the second long connecting channel. And if the server comprises a message server and a file storage server, the message server can send a second file transmission request to the user terminal through a second long connecting channel corresponding to the terminal account.
And the user terminal responds to the second file transmission request and sends a downloading request carrying a second index identifier to the server, and receives a second file corresponding to the second index identifier which is inquired and returned by the server according to the downloading request.
After receiving the second file transmission request, the user terminal may respond to the second file transmission request, automatically send a download request carrying the second index identifier to the server, and receive the download request by the server. In an embodiment, after receiving the second file transmission request, the user terminal may trigger a prompt operation in response to the second file transmission request, and send a download request carrying the second index identifier to the server after receiving the user confirmation instruction, and receive the download request by the server. In one embodiment, the user terminal starts timing after triggering the prompt operation, and cancels the prompt operation or triggers to send a download request carrying the second index identifier to the server according to a predefined policy when the timing reaches a preset time and no user confirmation instruction is detected.
The server responds after receiving the downloading request, inquires a second file corresponding to the second index identifier, and transmits the inquired second file to the user terminal if the inquired second file is inquired; if not, the feedback message of transmission failure can be fed back to the network access equipment.
In this embodiment, the user terminal and the network access device can realize bidirectional file transmission by using the server, and the method is suitable for various scenes needing bidirectional file transmission.
In one embodiment, the first file is a multimedia file; the first file is generated according to sound and/or images collected by the user terminal. For example, the first file may be a voice message file, a video file, or the like. Specifically, the user terminal detects a recording trigger instruction; the user terminal starts to collect environmental sounds and/or images according to the recording trigger instruction until a preset time length or until a recording finishing instruction is detected, and stops collecting; and the user terminal generates a first file according to the collected sound and/or image.
In one embodiment, the second file is a multimedia file; the second file is generated according to the sound and/or image collected by the network access equipment. Referring to fig. 14, the following describes in detail the detailed steps of the network access device collecting sound and/or images to form the second file:
step 1402, detecting a recording trigger instruction.
The recording trigger instruction refers to an instruction for triggering a recording operation, and the recording trigger instruction can be triggered by pressing a mechanical key on the network access equipment.
Step 1404, starting to collect the environmental sound and/or image according to the recording trigger instruction, and stopping collection until a preset time length or a recording end instruction is detected.
Specifically, the environmental sound and/or image here refers to sound and/or image in an environment where the network access device is located, and specifically, the network access device may collect the environmental sound through a microphone of the network access device and collect the image through a camera of the network access device. The preset time period may be any time period, for example, 5 to 10 seconds. If the trigger action of the recording trigger instruction is continuous pressing, the trigger action of the recording end instruction may be stop pressing.
Step 1406 generates a first file from the captured sound and/or image.
Specifically, the collected data of the sound may be formed into audio data, and the audio data may be used as a first file; the data of the collected image can be formed into video data, and the video data is used as a first file; the audio data may also be incorporated into the video data at respective time stamps to form a first file.
In this embodiment, the network access device can acquire multimedia data in real time to form a multimedia file and transmit the multimedia file to the user terminal, thereby increasing the interaction mode between the user terminal and the network access device.
In an embodiment, the step 1202 of receiving a first file transmission request sent by a server through a first long connection channel corresponding to a device account specifically includes: after detecting that the equipment account number corresponds to the online state, the server receives a first file transmission request sent by the server through a first long connecting channel corresponding to the equipment account number; or after the server detects that the device account does not correspond to the online state and caches the first file transmission request, receiving the cached first file transmission request sent by the server through a first long connection channel corresponding to the device account when the server continues to detect until the device account corresponds to the online state.
Specifically, after detecting that the device account corresponds to the online state, the server may directly transmit the first file transmission request to the network access device through the first long connection channel. If it is detected that the device account does not correspond to the online state, the server may first cache the first file transmission request, and continue to detect until the device account does correspond to the online state, and then transmit the cached first file transmission request to the network access device. The server may maintain an offline message table in which the cached first file transfer request is recorded.
In this embodiment, the file transmission request may be prevented from being lost by detecting the online status of the network access device and sending the first file transmission request only when the online status of the network access device is detected.
In one embodiment, the network access device or the user terminal maintains a long connection channel with the server in two ways, the first way is to maintain a TCP connection with the server, and the second way is to periodically send heartbeat packets to the server. The TCP connection itself is a connection-oriented protocol that can be maintained once the three-way handshake is completed. The heartbeat packet sent by the network access equipment or the user terminal at regular time can maintain the online state of the network access equipment or the user terminal, and the network address of the network access equipment or the user terminal can be reported at regular time, so that the server can communicate with the network access equipment or the user terminal at any time. And because the current router NAT module has communication limitation, only in a period of time after a certain node A in the internal network sends a message to another node B outside the internal network, the message from the other node B to the node A in the internal network is allowed, which is called NAT traversal. Therefore, the timed heartbeat packet sending can maintain the NAT traversal state between the network access equipment and the server, so that the server can communicate with the network access equipment at any time.
As shown in fig. 15, in an embodiment, there is provided an internet-of-things-based file transmission apparatus 1500 having a function of implementing the internet-of-things-based file transmission method described above and applicable to any embodiment of the server 102. This file transmission device 1500 based on the internet of things includes: a login processing module 1502, a file processing module 1504, a file transfer request processing module 1506, and a download request processing module 1508. The modules included in the internet-of-things-based file transfer device 1500 may be deployed on one or more entity servers.
The login processing module 1502 is configured to receive a login request sent by a network access device and carrying a device account and a device password, and accordingly establish a first long connection channel with the network access device after login authorization is completed.
The file processing module 1504 is used for receiving and storing a first file uploaded by a user terminal; and generating a first index identifier corresponding to the stored first file and returning the first index identifier to the user terminal.
The file transmission request processing module 1506 is configured to receive a first file transmission request that carries an equipment account and a first index identifier and is sent by a user terminal; and sending a first file transmission request to the network access equipment through a first long connecting channel corresponding to the equipment account.
A download request processing module 1508, configured to receive a download request with a first index identifier sent by a network access device in response to a first file transmission request; and according to the downloading request, inquiring a first file corresponding to the first index identifier and transmitting the first file to the network access equipment.
In an embodiment, the login processing module 1502 is further configured to receive a login request sent by the user terminal and carrying a terminal account and a terminal password, so as to establish a second long connection channel with the user terminal after completing login authorization.
The file processing module 1504 is further configured to receive and store a second file uploaded by the network access device; and generating a second index identifier corresponding to the stored second file and returning the second index identifier to the network access equipment.
The file transmission request processing module 1506 is further configured to receive a second file transmission request carrying the terminal account and the second index identifier and sent by the network access device; and sending a second file transmission request to the user terminal through a second long connecting channel corresponding to the terminal account.
The download request processing module 1508 is further configured to receive a download request with a second index identifier sent by the user terminal in response to the second file transmission request; and according to the downloading request, inquiring a second file corresponding to the second index identifier and transmitting the second file to the user terminal.
In one embodiment, the first file is a multimedia file; the first file is generated according to sound and/or images collected by the user terminal.
In one embodiment, the second file is a multimedia file; and the file is generated according to the sound and/or image collected by the network access equipment.
In one embodiment, the file transmission request processing module 1506 is further configured to detect whether the device account corresponds to an online status; if so, transmitting a first file transmission request to the network access equipment through a first long connecting channel between the network access equipment corresponding to the equipment account; and if not, caching the first file transmission request until the online state corresponding to the equipment account is detected, and transmitting the cached first file transmission request to the network access equipment through a first long connecting channel between the equipment account and the network access equipment corresponding to the equipment account.
The file transmission apparatus 1500 based on the internet of things performs login authorization according to a login request actively initiated by the network access device, so that the communication position of the network access device in the network can be known while the security is ensured. The first long connecting channel between the network access equipment and the network access equipment is established, so that the effectiveness of communication between the network access equipment and the network access equipment can be maintained, and the network access equipment is prevented from being incapable of communicating due to the change of the network position. The uploading of the first file is initiated by the user terminal actively, so that the communication position of the user terminal in the network can be obtained, and the first index identification is returned to the user terminal. And through the first long connection channel, the first file transmission request initiated by the user terminal can be directly sent to the network access equipment, so that the network access equipment responds to download the first file. Therefore, no matter whether the network access equipment is directly connected to the public network or not and how the internal network environment changes, the network access equipment can be found, and the user terminal can transmit the first file to the network access equipment.
As shown in fig. 16, in an embodiment, another file transmission apparatus 1600 based on the internet of things is provided, which has a function of implementing the file transmission method based on the internet of things applicable to the various embodiments of the user terminal 104. This file transfer device 1600 based on thing networking includes: an upload module 1602, a receive module 1604, and a transmit module 1606.
An uploading module 1602, configured to upload the first file to a server for storage, so as to generate a first index identifier corresponding to the stored first file.
The receiving module 1604 is configured to receive the first index identifier returned by the server.
A sending module 1606, configured to send a first file transmission request carrying the device account and the first index identifier to the server, so that the server transmits the first file transmission request through a first long connection channel between network access devices corresponding to the device account, and the network access devices download the first file corresponding to the first index identifier from the server in response to the first file transmission request.
As shown in fig. 17, in one embodiment, the internet of things based file transfer device 1600 further comprises a download module 1608.
The receiving module 1604 is further configured to receive a second file transmission request sent by the server through a second long connection channel corresponding to the terminal account after the network access device sends the second file transmission request carrying the terminal account to the server.
The downloading module 1608 is configured to respond to the second file transmission request, so as to download, from the server, a second file corresponding to the second index identifier carried in the second file transmission request; and the second index identification is generated according to a second file which is uploaded to the server by the network access equipment.
As shown in fig. 18, in an embodiment, the first file is a multimedia file, and the internet of things based file transmission apparatus 1600 further includes an acquisition module 1610 configured to detect a recording triggering instruction; starting to collect environmental sounds and/or images according to the recording trigger instruction until a preset time length or stopping collection until a recording end instruction is detected; a first file is generated from the captured sound and/or image.
In one embodiment, the sending module 1606 is further configured to enable the server to detect whether the device account corresponds to an online status; if so, transmitting a first file transmission request to the network access equipment through a first long connecting channel between the server and the network access equipment corresponding to the equipment account; and if not, caching the first file transmission request until the online state corresponding to the equipment account is detected, and transmitting the cached first file transmission request to the network access equipment through a first long connecting channel between the server and the network access equipment corresponding to the equipment account.
The file transmission device 1600 based on the internet of things actively uploads the first file to the server for storage, and actively initiates a first file transmission request to the server, so that the server can also communicate with the local. And a first long connection channel is maintained between the server and the network access device, so that the server can communicate with the network access device through the first long connection channel to transmit the first file transmission request to the network access device. The network access device may respond to the first file transfer request to download the first file, enabling transfer of the first file to the network access device via the server. Therefore, no matter whether the network access equipment is directly connected to the public network or not and how the internal network environment changes, the server can find the network access equipment, and the user terminal can transmit the first file to the network access equipment.
As shown in fig. 19, in an embodiment, an internet of things based file transmission apparatus 1900 is provided, which has a function of implementing the internet of things based file transmission method applicable to each embodiment of the network access device 106. The internet-of-things-based file transmission device 1900 includes a receiving unit 1902 and a downloading unit 1904.
The receiving unit 1902 is configured to receive, after the user terminal sends the first file transmission request carrying the device account to the server, the first file transmission request sent by the server through the first long connection channel according to the device account.
A downloading unit 1904, configured to respond to the first file transmission request, download, from the server, the first file corresponding to the first index identifier carried in the first file transmission request; the first index identification is generated according to a first file which is uploaded to a server by a user terminal and stored.
As shown in fig. 20, in an embodiment, the internet of things based file transfer device 1900 further includes an uploading unit 1906 and a sending unit 1908.
An uploading unit 1906, configured to upload the second file to the server for storage, so as to generate a second index identifier corresponding to the stored second file.
The receiving unit 1902 is further configured to receive a second index identifier returned by the server.
A sending unit 1908, configured to send a second file transmission request carrying the terminal account and the second index identifier to the server, so that the server transmits the second file transmission request through a second long connection channel between the user terminals corresponding to the terminal account, and the user terminals download, from the server, a second file corresponding to the second index identifier in response to the second file transmission request.
In one embodiment, the first file is a multimedia file; the first file is generated according to sound and/or images collected by the user terminal.
In one embodiment, the second file is a multimedia file; the second file is generated according to the sound and/or image collected by the network access equipment.
In an embodiment, the receiving unit 1902 is further configured to receive, after the server detects that the device account corresponds to the online status, a first file transmission request sent by the server through a first long connection channel corresponding to the device account; or, the receiving unit 1902 is further configured to receive, after detecting that the device account does not correspond to the online status and caches the first file transmission request, the cached first file transmission request sent by the server through the first long connection channel corresponding to the device account when the server continues to detect until the device account corresponds to the online status.
The file transmission apparatus 1900 based on the internet of things maintains a first long connection channel with the server, so that when the user terminal sends a first file transmission request to the server, the server can communicate with the local through the first long connection channel, so that the local receives the first file transmission request and responds to download a first file from the server, where the first file is uploaded to the server by the user terminal for storage. Therefore, no matter whether the local terminal is connected to the public network or not and how the network environment of the local intranet changes, the server can find the receiver of the file transmission, and the first file transmitted by the user terminal through the server is received.
In an embodiment, the downloading unit 1904 is further configured to, in response to the first file transmission request, automatically download, from the server, the first file corresponding to the first index identifier carried in the first file transmission request; alternatively, the downloading unit 1904 is further configured to trigger a prompt operation in response to the first file transmission request, and download the first file corresponding to the first index identifier from the server after receiving the user confirmation instruction.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (16)

1. An internet of things-based file transfer method, executed by a server, the method comprising:
receiving a login request which is sent by a network access device according to a built-in public network address of the server and carries a device account and a device password, and establishing and maintaining a first long connecting channel between the network access device and the network access device after login authorization is completed, wherein the first long connecting channel corresponds to the device account;
receiving and storing a first file carrying a terminal account number uploaded by a user terminal when the file size of the first file is detected to be larger than a preset threshold value, wherein the user terminal and the network access equipment are respectively positioned in respective internal networks, and the first file is at least one of a voice message file and a video file acquired by the user terminal;
generating a first index identifier corresponding to the stored first file and returning the first index identifier to the user terminal;
receiving a first file transmission request which is sent by the user terminal and carries an equipment account and the first index identifier;
receiving a message which is generated by a user terminal and comprises a terminal account and a first file when the file size of the first file is detected to be smaller than a preset threshold value, and transmitting the message to the network access equipment through the first long connecting channel corresponding to the equipment account;
when the device account number of the network access device corresponds to the online state, sending the first file transmission request to the network access device through the first long connection channel corresponding to the device account number, and when the device account number of the network access device does not correspond to the online state, caching the first file transmission request until the device account number corresponds to the online state, and transmitting the cached first file transmission request to the network access device through the first long connection channel corresponding to the device account number;
receiving a downloading request which is sent by the network access equipment in response to the first file transmission request and carries the first index identifier; and inquiring the first file corresponding to the first index identifier according to the downloading request and transmitting the first file to the network access equipment.
2. The method of claim 1, further comprising:
receiving a login request which is sent by a user terminal and carries a terminal account and a terminal password, and establishing and maintaining a second long connecting channel with the user terminal after login authorization is completed;
receiving and storing a second file uploaded by network access equipment, wherein the second file is generated according to at least one of sound and images collected by the network access equipment;
generating a second index identifier corresponding to the stored second file and returning the second index identifier to the network access equipment;
receiving a second file transmission request which is sent by the network access equipment and carries a terminal account and the second index identifier;
sending the second file transmission request to the user terminal through the second long connecting channel corresponding to the terminal account;
receiving a downloading request which is sent by the user terminal in response to the second file transmission request and carries the second index identifier;
and inquiring the second file corresponding to the second index identifier according to the downloading request and transmitting the second file to the user terminal.
3. A file transmission method based on the Internet of things is executed by a user terminal, and the method comprises the following steps:
when the file size of a first file is detected to be larger than a preset threshold value, uploading the first file carrying the terminal account of the user terminal to a server for storage so as to generate a first index identifier corresponding to the stored first file; the first file is at least one of a voice message file and a video file acquired by the user terminal;
receiving the first index identification returned by the server;
sending a first file transmission request carrying a device account and the first index identifier to the server, so that the server transmits the first file transmission request through a first long connection channel between network access devices corresponding to the device account when the device account of the network access device corresponds to an online state, caches the first file transmission request when the device account of the network access device does not correspond to the online state, transmits the cached first file transmission request to the network access device through the first long connection channel corresponding to the device account until the device account corresponds to the online state, and makes the network access device download the first file corresponding to the first index identifier from the server in response to the first file transmission request;
when the file size of a first file is detected to be smaller than a preset threshold value, sending a message which comprises a terminal account number and the first file to the server, so that the server transmits the message through a first long connecting channel between network access devices corresponding to the device account number;
the user terminal and the network access equipment are respectively positioned in respective internal networks; the first long connection channel is established after the server receives a login request which is sent by the network access equipment according to a built-in public network address of the server and carries an equipment account and an equipment password, and login authorization is completed according to the login request, and the first long connection channel corresponds to the equipment account.
4. The method of claim 3, further comprising:
after the network access equipment sends a second file transmission request carrying a terminal account to the server, receiving the second file transmission request sent by the server through a second long connection channel corresponding to the terminal account;
responding to the second file transmission request, and downloading a second file corresponding to a second index identifier carried by the second file transmission request from the server; the second index mark is generated according to a second file stored in the server and uploaded by the network access equipment, and the second file is generated according to at least one of sound and images collected by the network access equipment.
5. The method of claim 3, further comprising:
detecting a recording trigger instruction;
starting to collect environmental sounds and/or images according to the recording trigger instruction, and stopping collection until a preset time length or a recording end instruction is detected;
and generating the first file according to the collected sound and/or image.
6. An internet of things-based file transfer method, which is executed by a network access device, comprises the following steps:
according to a built-in public network address of a server, sending a login request carrying an equipment account and an equipment password to the server, so that the server establishes and maintains a first long connecting channel between the server and the network access equipment after completing login authorization according to the login request, wherein the first long connecting channel corresponds to the equipment account;
when a user terminal detects that the size of a first file is larger than a preset threshold value, uploading the first file carrying a terminal account to a server, acquiring a first index identifier corresponding to the first file returned by the server, sending a first file transmission request carrying an equipment account to the server, and receiving the first file transmission request sent by the server through a first long connection channel corresponding to the equipment account when the equipment account of the network access equipment is in a corresponding online state, wherein the user terminal and the network access equipment are respectively in respective internal networks, and the first file is at least one of a voice message file and a video file acquired by the user terminal;
responding to the first file transmission request, and downloading a first file corresponding to a first index identifier carried by the first file transmission request from the server; the first index identification is generated according to a first file stored in the server and uploaded by the user terminal;
and after the user terminal uploads a message which is generated when the file size of the first file is smaller than a preset threshold value and comprises a terminal account and the first file to the server, receiving the message sent by the server through a first long connecting channel corresponding to the equipment account.
7. The method of claim 6, further comprising:
uploading a second file to a server for storage so as to generate a second index identifier corresponding to the stored second file, wherein the second file is generated according to at least one of sound and images collected by the network access equipment;
receiving the second index identification returned by the server;
and sending a second file transmission request carrying a terminal account and the second index identifier to the server, so that the server transmits the second file transmission request through a second long connection channel between user terminals corresponding to the terminal account, and the user terminals respond to the second file transmission request and download the second file corresponding to the second index identifier from the server.
8. The method according to claim 6, wherein the first file is generated according to the sound and/or image collected by the user terminal after starting to collect the environmental sound and/or image until a preset time period or until a recording end instruction is detected.
9. The method of claim 6, further comprising:
when the server detects that the equipment account does not correspond to the online state and caches the first file transmission request, receiving the cached first file transmission request sent by the server through a first long connecting channel corresponding to the equipment account when the server continues to detect until the equipment account corresponds to the online state.
10. A file transmission device based on the Internet of things is characterized in that the device comprises:
the login processing module is used for receiving a login request which is sent by the network access equipment according to a public network address of a built-in server and carries an equipment account and an equipment password, and establishing and maintaining a first long connecting channel between the network access equipment and the first long connecting channel after login authorization is completed, wherein the first long connecting channel corresponds to the equipment account;
the file processing module is used for receiving and storing a first file carrying a terminal account and uploaded by a user terminal when the file size of the first file is detected to be larger than a preset threshold value; generating a first index identifier corresponding to a stored first file, returning the first index identifier to the user terminal, and receiving a first file transmission request which is sent by the user terminal and carries an equipment account and the first index identifier; the file size detection module is also used for receiving a message which is generated by the user terminal and comprises a terminal account and the first file when detecting that the file size of the first file is smaller than a preset threshold value; the first file is at least one of a voice message file and a video file acquired by a user terminal, and the user terminal and the network access equipment are respectively positioned in respective internal networks;
a file transmission request processing module, configured to send the first file transmission request to the network access device through the first long connection channel corresponding to the device account when the device account of the network access device corresponds to an online state, and cache the first file transmission request when the device account of the network access device does not correspond to the online state, until the device account corresponds to the online state, transmit the cached first file transmission request to the network access device through the first long connection channel corresponding to the device account; the network access device is further configured to transmit the message to the network access device through the first long connection channel corresponding to the device account;
a download request processing module, configured to receive a download request that is sent by the network access device in response to the first file transmission request and carries the first index identifier; and inquiring the first file corresponding to the first index identifier according to the downloading request and transmitting the first file to the network access equipment.
11. A file transmission device based on the Internet of things is characterized in that the device comprises:
the uploading module is used for uploading the first file carrying the terminal account of the user terminal to a server for storage when the file size of the first file is detected to be larger than a preset threshold value so as to generate a first index identifier corresponding to the stored first file; the first file is at least one of a voice message file and a video file acquired by the user terminal;
a receiving module, configured to receive the first index identifier returned by the server;
a sending module, configured to send a first file transmission request carrying a device account and the first index identifier to the server, so that when the device account of the network access device is in the online state, transmitting the first file transmission request through a first long connecting channel between network access devices corresponding to the device account, when the equipment account number of the network access equipment does not correspond to the online state, caching the first file transmission request until the equipment account number corresponds to the online state, transmitting the cached first file transmission request to the network access device through the first long connection channel corresponding to the device account, and causing the network access device to download the first file corresponding to the first index identification from the server in response to the first file transmission request; or when detecting that the file size of a first file is smaller than a preset threshold value, sending a generated message comprising a terminal account and the first file to the server, so that the server transmits the message to the network access device through the first long connection channel corresponding to the device account; the user terminal and the network access equipment are respectively positioned in respective internal networks; the first long connection channel is established after the server receives a login request which is sent by the network access equipment according to a built-in public network address of the server and carries an equipment account and an equipment password, and login authorization is completed according to the login request, and the first long connection channel corresponds to the equipment account.
12. A file transmission device based on the Internet of things is characterized in that the device comprises:
the login request module is used for sending a login request carrying an equipment account and an equipment password to a server according to a built-in public network address of the server so that the server establishes and maintains a first long connecting channel between the server and the network access equipment after completing login authorization according to the login request, wherein the first long connecting channel corresponds to the equipment account;
a receiving unit, configured to upload a first file carrying a terminal account to the server when a user terminal detects that a file size of the first file is larger than a preset threshold, acquire a first index identifier corresponding to the first file returned by the server, after sending a first file transmission request carrying a device account to the server, receiving a corresponding online state of the server in the device account of the network access device, the first file transmission request is sent through a first long connection channel according to the equipment account number, or, after the user terminal uploads a message including a terminal account and the first file generated when the file size of the first file is detected to be smaller than a preset threshold value to the server, receiving the message sent by the server through a first long connection channel corresponding to the equipment account; the user terminal and the network access equipment are respectively positioned in respective internal networks, and the first file is at least one of a voice message file and a video file acquired by the user terminal;
the downloading unit is used for responding to the first file transmission request, and downloading a first file corresponding to a first index identifier carried by the first file transmission request from the server; and the first index identification is generated according to a first file stored in the server uploaded by the user terminal.
13. A server comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 2.
14. A user terminal comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 3 to 5.
15. A network access device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method of any one of claims 6 to 9.
16. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 9.
CN201410837173.9A 2014-12-29 2014-12-29 File transmission method and device based on Internet of things Active CN105812402B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410837173.9A CN105812402B (en) 2014-12-29 2014-12-29 File transmission method and device based on Internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410837173.9A CN105812402B (en) 2014-12-29 2014-12-29 File transmission method and device based on Internet of things

Publications (2)

Publication Number Publication Date
CN105812402A CN105812402A (en) 2016-07-27
CN105812402B true CN105812402B (en) 2020-04-03

Family

ID=56980774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410837173.9A Active CN105812402B (en) 2014-12-29 2014-12-29 File transmission method and device based on Internet of things

Country Status (1)

Country Link
CN (1) CN105812402B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109150927B (en) * 2017-06-15 2022-01-11 北京京东尚科信息技术有限公司 File issuing method and device for file storage system
CN107104889B (en) * 2017-07-06 2020-12-04 青岛海信移动通信技术股份有限公司 Draft mail synchronization method, draft mail synchronization device and draft mail synchronization terminal based on IMAP protocol
CN107682153A (en) * 2017-11-07 2018-02-09 歌尔股份有限公司 Method for network access, password method for remote updating, internet of things equipment and system
CN109922163B (en) * 2017-12-13 2022-05-03 中国电信股份有限公司 Message sending method, Internet of things access gateway and Internet of things system
CN109561159B (en) * 2018-12-28 2021-08-31 厦门熵基生物识别信息技术有限公司 Data processing method and system based on Websocket long connection
CN110099065A (en) * 2019-05-10 2019-08-06 北京百度网讯科技有限公司 Internet of things equipment and authentication method, Cloud Server, processing equipment, readable medium
CN111193780B (en) * 2019-12-17 2021-11-30 国电南瑞科技股份有限公司 Modularized Internet of things platform data transmission system
CN113051622B (en) * 2021-03-11 2023-05-12 杭州趣链科技有限公司 Index construction method, device, equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7546337B1 (en) * 2000-05-18 2009-06-09 Aol Llc, A Delaware Limited Liability Company Transferring files
CN101150484B (en) * 2006-09-21 2012-05-02 周伟 Method and system for remotely playing slide photos by using computer background
CN101964785A (en) * 2010-09-19 2011-02-02 中兴通讯股份有限公司 Method, terminal and system for transmitting file between SIP (Session Initiation Protocol) terminals in NAT (Network Address Translation) network
CN102821057A (en) * 2011-06-09 2012-12-12 腾讯科技(深圳)有限公司 File sending method, device and system
CN104168081B (en) * 2013-05-20 2018-09-07 腾讯科技(深圳)有限公司 A kind of document transmission method and device
CN103428672A (en) * 2013-08-19 2013-12-04 宇龙计算机通信科技(深圳)有限公司 Method and device for transmitting data

Also Published As

Publication number Publication date
CN105812402A (en) 2016-07-27

Similar Documents

Publication Publication Date Title
CN105812402B (en) File transmission method and device based on Internet of things
CN105656680B (en) Network camera control method and device
US10650119B2 (en) Multimedia data processing method, apparatus, system, and storage medium
JP2006221602A (en) Access information relay device, network equipment, access information management device, resource management device and access management system
RU2593272C2 (en) Information processing device and method of controlling said device
CN101651548A (en) Remote starting method and system for equipment
KR20140118014A (en) Method for authenticating client
JP2011524677A (en) Method for providing end device access to services, and end device and mobile terminal implementing such method
US20130111009A1 (en) Method and System for Indirectly Establishing a Unique Communication Channel Between a Plurality of Devices
CN104348848B (en) Manage method, terminal device and the server of picture
JP5122587B2 (en) Connection control method, connection control server device, connection control client device, connection control system, and program
CN100433681C (en) Controlling system and method of house intellectual network
CN103179186A (en) Communication system, network storage, server, and communication method
CN105812422B (en) File transmission method and device based on Internet of things
CN101146103A (en) A method fro realizing stable secure protection of broadband access device
CN104168302A (en) Device control realizing method, device control realizing system and proxy gateway
JP4779328B2 (en) Image distribution system
KR102435756B1 (en) Device group control system and method for controlling the same
JP5565063B2 (en) Information acquisition system, information acquisition method, and information acquisition program
US9794241B2 (en) System and method for connecting to security device by means of peer-to-peer (P2P) relay demon
JP6317630B2 (en) Tunnel connection device, tunnel termination device, connection control method, and program
JP4528105B2 (en) Network device setting method using dynamic DNS service, dynamic DNS service server, program, and network device connection method
JP6783272B2 (en) Control system and control method
KR102476347B1 (en) CCTV management system including live video sharing function and method of video sharing using the same
JP5843325B2 (en) Wireless LAN management method and system

Legal Events

Date Code Title Description
C06 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