WO2016070370A1 - Method for mobile terminal and web terminal interconnection based on two-dimensional code and network adaptation - Google Patents

Method for mobile terminal and web terminal interconnection based on two-dimensional code and network adaptation Download PDF

Info

Publication number
WO2016070370A1
WO2016070370A1 PCT/CN2014/090417 CN2014090417W WO2016070370A1 WO 2016070370 A1 WO2016070370 A1 WO 2016070370A1 CN 2014090417 W CN2014090417 W CN 2014090417W WO 2016070370 A1 WO2016070370 A1 WO 2016070370A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
web
mobile terminal
file
server
Prior art date
Application number
PCT/CN2014/090417
Other languages
French (fr)
Chinese (zh)
Inventor
姜天鹏
Original Assignee
北京安奇智联科技有限公司
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 北京安奇智联科技有限公司 filed Critical 北京安奇智联科技有限公司
Priority to PCT/CN2014/090417 priority Critical patent/WO2016070370A1/en
Publication of WO2016070370A1 publication Critical patent/WO2016070370A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present invention generally relates to the field of mobile communications, and in particular to a method and system for interconnecting between a mobile terminal and a web terminal to enable interactive communication.
  • a conventional method of transferring files between a mobile electronic device and a personal computer uses a data cable to connect a personal computer to an electronic device, or a network transfer method such as a network disk.
  • a network transfer method such as a network disk.
  • these methods are very time consuming and cumbersome, and the user experience is very bad.
  • the way of the data line makes the user need to prepare additional hardware, which is inconvenient for the user.
  • many additional drivers are required to implement more complex functions than transferring files.
  • the network transfer mode such as the network disk requires the user to be in an environment with a good network condition. If the network condition is poor and the file size that the user needs to transmit interactively is large, it is difficult to achieve a good transmission effect.
  • WiFi technology can provide transmission between mobile electronic devices and personal computers and higher transmission speeds.
  • an access point AP
  • the access point acts as a wireless network relay between the mobile electronic device and the personal computer, and the personal computer and the mobile device must be connected to the wireless network relay at the same time to achieve interconnection.
  • AP access point
  • Short-range near-field communication technologies such as Bluetooth technology are now increasingly being used to transfer files between mobile electronic devices.
  • Bluetooth technology typically does not provide high speed file transfers.
  • personal computers are usually not equipped with Bluetooth modules, making bidirectional connection communication impossible.
  • connection in the step f is an http long connection.
  • the server verifies whether the connection is still maintained by transmitting a heartbeat signal to the mobile terminal and the web terminal.
  • the server when the server does not receive the heartbeat response signal fed back by the mobile terminal or the web terminal for more than a certain number of times, the server disconnects the connection between the mobile terminal and the web terminal.
  • the method further comprises the steps of: h) issuing, by the web terminal, a request for transmitting a file to the server, selecting a category of the transmitted file; i) the server side requests the mobile terminal for summary information of all files in the selected category; j) sends summary information of the file category acquired from the mobile terminal to the web terminal; k) selects that it wants to transmit a file to the server to send a request to transmit the file; l) the server queries a network status identifier, and establishes a connection between the mobile terminal and the web terminal according to the identification of the network status identifier, The network status identifier identifies that the web terminal and the mobile terminal are in different networks, and transmits the file through the relay of the server; when the network status identifier identifies that the web terminal and the mobile terminal are in the same network, Web terminal and A direct connection is established between the mobile terminals to transfer files.
  • the method when the file is transferred from the mobile terminal to the web terminal by the relay of the server, the method further comprises the steps of: l1) opening a web upload service at the server; Transmitting a file to be transmitted on the mobile terminal to a server, generating an address of the file on the server; l3) transmitting the generated file address to the web terminal; and l) receiving the web terminal access Address, download the file.
  • the method when the file is transmitted from the mobile terminal to the web terminal by establishing a direct connection between the web terminal and the mobile terminal, the method further includes the following steps: The mobile terminal automatically starts a web service, generates a file address for the file requested by the web terminal, and sends a file address to the web terminal; and 13) the web terminal accesses the address to download The requested file.
  • the method when the file is transferred from the web terminal to the mobile terminal by the relay of the server, the method further comprises the steps of: l1) opening a web upload service at the server; The address of the web upload service is sent to the web terminal; 13) the web terminal uploads the file to be transferred to the address; and l4) the server forwards the uploaded file to the mobile terminal.
  • the method when the file is transmitted from the web terminal to the mobile terminal by establishing a direct connection between the web terminal and the mobile terminal, the method further includes the following steps: The mobile terminal automatically starts a web upload service; l2) sends the address of the web upload service to the web terminal; and the web terminal accesses the address to upload the requested file.
  • the file is divided into a plurality of file segments for transmission.
  • a user can implement a file interconnect transmission scheme that is reliable, high speed, stable, and has a better user interaction experience between the mobile electronic device and the personal computer.
  • FIG. 1a and 1b schematically illustrate a connection between a mobile terminal and a web terminal in accordance with the present invention
  • FIG. 1a and 1b schematically illustrate a connection between a mobile terminal and a web terminal in accordance with the present invention
  • FIG. 1a and 1b schematically illustrate a connection between a mobile terminal and a web terminal in accordance with the present invention
  • FIG. 1a and 1b schematically illustrate a connection between a mobile terminal and a web terminal in accordance with the present invention
  • Fig. 2 schematically shows an interaction flow diagram for interconnection between a mobile terminal and a web terminal by means of a server side in accordance with the present invention.
  • FIG. 3a schematically illustrates a connection interface of an exemplary mobile terminal 110 in accordance with one embodiment of the present invention.
  • FIG. 3b schematically illustrates a connection presentation interface of an exemplary web terminal 120 in accordance with one embodiment of the present invention.
  • FIG. 4 shows a flow diagram of a method for a user to transfer files located on the mobile terminal 110 via the web terminal 120 via the server side 130.
  • FIGS. 5a and 5b schematically illustrate an exemplary file summary interface, respectively, in accordance with one embodiment of the present invention.
  • FIG. 6 shows a flow chart of a method for a user to transfer a file to a mobile terminal 110 via a server terminal 130 via a web terminal 120.
  • FIG. 1a and 1b schematically show a system block diagram of interconnection between a mobile terminal and a web terminal by means of a server side in accordance with the present invention.
  • 1a schematically shows a system block diagram for interconnection between a mobile terminal and a web terminal by means of a server side according to the present invention
  • FIG. 1b shows a system block diagram including a specific architecture and composition of the server side.
  • system 100 includes at least one mobile terminal 110, at least one web terminal 120, and a remotely located server side 130 for enabling interconnection between mobile terminal 110 and web terminal 120 for interactive communication. .
  • the mobile terminal 110 and the web terminal 120 are respectively connected to the server side 130 through the first network 140, and the mobile terminal 110 and the web terminal 120 are connected to each other through the second network 150.
  • FIG. 1 shows only one mobile terminal 110 and one web terminal 120.
  • system 100 can include more mobile terminals 110 and/or more web terminals 120.
  • each mobile terminal 110 has a unique web terminal 120 that uniquely corresponds to it.
  • the mobile terminal 110 and the web terminal 120 can communicate bidirectionally with the server side 130 via any type of first network 140, respectively.
  • the first network 140 is, for example, selected from a local area network ("LAN") such as an intranet and a wide area network ("WAN") such as the Internet.
  • the first network 140 can be configured to support the transmission of information using a plurality of protocol setting formats. Additionally, the first network 140 can be a public network, a private network, or a combination thereof.
  • the first network 140 can also be implemented using any one or more types of physical media, including wired communication paths and wireless communication paths associated with multiple service providers. Wireless communication methods such as WiFi or WLAN, GPRS, cellular networks, such as GSM networks, 3G networks, LTE networks, or CDMA networks.
  • a direct network connection can also be established between the mobile terminal 110 and the web terminal 120, and two-way communication is performed through the second network 150.
  • the protocol mode adopted by the second network 150 is, for example, a manner in which http polling is combined with WebSocket direct connection.
  • the mobile terminal 110 can be a smart phone, a personal digital assistant (PDA), a tablet, a multi-function mobile terminal, or any other mobile device that includes computing functionality and data communication capabilities.
  • the mobile terminal 110 includes an app interface application 111 (as shown in FIG. 1b), such as a custom application (app) for two-way communication with web-enabled applications.
  • the web terminal 120 can be any terminal device that supports a web protocol, such as a desktop computer, a laptop computer, a notebook computer, a tablet computer, a game console, a smart TV, and the like.
  • the web terminal 120 includes a web interface 121 (shown in Figure 1b), such as a web browser.
  • the respective web terminal 120 includes a browser application for requesting, parsing, displaying, executing a web page, and executing an application included in the web page.
  • Browser application 128 may be any application that allows a user to search, browse, and/or use resources (eg, web pages and web services) identified by a URL (Uniform Resource Locator) or URI (Uniform Resource Identifier).
  • URL Uniform Resource Locator
  • URI Uniform Resource Identifier
  • URL is used herein to mean the network address or location of a document.
  • document refers to any document or content in any format that can be used by a web browser or other application, including but not limited to: word processing documents, spreadsheet documents, presentation documents, drawings, web pages, text, images. , audio, video, etc.
  • the mobile terminal 110 includes one or more computing devices that can receive input from a user and can present an output, such that the mobile terminal 110 also includes an I/O interface (Input/Output Interface) 112, which can receive one or more inputs and present an output.
  • the input interface can include one or more of a camera, a touchpad, a touch screen, a stylus, and a microphone.
  • an output can be presented through the output interface to output a user's control operation instructions or feedback information from other users, and the like.
  • the output interface includes one or more of a display screen, one or more speakers, and a tactile interface.
  • Figure 1b shows a system block diagram containing the specific architecture and composition of the server side.
  • the server side 130 includes a two-dimensional code module 131, a network access module 132, a network status identifier 133, and an address generation module 134.
  • the two-dimensional code module 131 is configured to generate a two-dimensional code for scanning by the mobile terminal 110.
  • the two-dimensional code contains a Universally Unique Identifier (UUID), which is a unique identification code.
  • UUID Universally Unique Identifier
  • the mobile terminal 110 connects to the server side 130 by scanning the UUID of the two-dimensional code table to request acquisition of a unique connection address and session.
  • the network access module 132 is configured to determine the network connection status of the mobile terminal 110 and the web terminal 120 after the corresponding mobile terminal 110 scans the two-dimensional code, so as to perform appropriate connection between the mobile terminal 110 and the web terminal 120 for different network connection conditions.
  • the connections are made to establish a connection between the mobile terminal 110 and the web terminal 120.
  • the established connection is an http long connection.
  • the connection can continuously send multiple data packets. If there is no data packet transmission during the connection hold period, in order to ensure that the two terminals remain connected, the detection data packet (ie, heartbeat packet) is sent within a predetermined interval, the mobile terminal 110 and the web. A detection packet needs to be sent between the terminals 120 to maintain the connection.
  • the network access module 132 obtains the network status that the mobile terminal 110 and the web terminal 120 are respectively connected to the server end 130, and determines whether the network connection of the mobile terminal 110 and the web terminal 120 are under the same network.
  • the same network according to the present invention means that the same network segment can be directly connected under the same router without going through the external network.
  • the network status indicator 133 is set to a different state depending on whether it is in the same local area network. For example, if it is in the same network, an identifier, such as the number 1, is set in the network status indicator 133; if not in the same network, the identifier is not set in the network status indicator 133, or another different identifier is set, for example The number is 0.
  • the network access module 132 periodically acquires the network status of each of the mobile terminal 110 and the web terminal 120 connected to the server to determine whether the network connection of the mobile terminal 110 and the web terminal 120 is under the same local area network. Whether the status changes and updates the network status indicator 133 for the changed network status.
  • the frequency of the periodic acquisition may be, for example, once every 30 seconds.
  • the periodically transmitted signal is also called "heart"
  • the signal may also be used to detect whether the mobile terminal 110 and the web terminal 120 are still connected to the server side 130. For example, when the heartbeat response signal fed back by the mobile terminal 110 or the web terminal 120 is not received more than a certain number of times, the server side 130 can determine that the mobile terminal 110 or the web terminal 120 has disconnected from the server side 130.
  • the network status indicator 133 is used to store an identification of the adaptive connection between the mobile terminal 110 and the web terminal 120 due to different network connection conditions. For example, the mobile terminal 110 and the web terminal 120 are in the same network, and an identifier is set in the network status identifier 133; if not in the same network, another different identifier is set.
  • the address generation module 134 is configured to generate a file address that needs to be transferred between the mobile terminal 110 and the web terminal 120. After the connection is established between the mobile terminal 110 and the web terminal 120 in accordance with the method of the present invention, the user may select to upload a file to the web terminal 120 via the mobile terminal 110 or download the file from the web terminal 120 to the mobile terminal 110. When the user issues such a request to move the file, the address generation module 134 generates a network-based address, such as a URL, for the transmitted file, to the mobile terminal 110 or web terminal 120 that needs to download the file, the mobile terminal 110 and the web terminal 120. Simply access the address to download the file to transfer the file.
  • a network-based address such as a URL
  • FIG. 2 shows a flow chart of a method for a user to interact with the web terminal 120 via the server terminal 130 via the mobile terminal 110. as shown in picture 2,
  • the user sends a connection request to the server side 130 via the web terminal 120.
  • the user can send a connection request by launching a browser on the web terminal 120 and entering address information of www.****.cc in the browser address bar.
  • the server 130 sends the QR code information to the web terminal 120 in response to the connection request sent by the web terminal 120, and presents the two-dimensional code information on the web terminal 120 in step 220.
  • the two-dimensional code information includes a universal unique identification code (UUID), and the UUID is a unique identification code.
  • UUID universal unique identification code
  • the mobile terminal 110 connects to the server side 130 by scanning the UUID of the two-dimensional code table to request acquisition of a unique connection address and session.
  • the user scans the two-dimensional code information on the web terminal 120 through the mobile terminal 110.
  • scanning is performed by a camera carried on the mobile terminal 110.
  • the user activates the app software on the mobile terminal 110, and the app software prompts the user to scan the two-dimensional code to implement the connection.
  • the mobile terminal 110 and the web terminal 120 initiate a connection request to the server side in steps 230a and 230b, respectively, and transmit their own network connection status to the server side 130.
  • the network connection status is a network connection to the server end.
  • the server side 130 determines whether the network connection of the mobile terminal 110 and the web terminal 120 is under the same local area network by acquiring the network status of the mobile terminal 110 and the web terminal 120 respectively connected to the server, and whether the network connection is in the same local area network.
  • the network status indicator sets a different status. For example, if it is in the same network, an identifier, such as the number 1, is set in the network status indicator 133; if not in the same network, the identifier is not set in the network status indicator 133, or another different identifier is set, for example The number is 0.
  • the server side 130 transmits a connection establishment permission to the mobile terminal 110 and the web terminal 120 in steps 240a and 240b, respectively, thereby establishing a connection between the mobile terminal 110 and the web terminal 120.
  • a http long connection is established.
  • FIG. 3a schematically illustrates a connection interface of an exemplary mobile terminal 110 in accordance with one embodiment of the present invention.
  • the presentation interface of the mobile terminal 110 is divided into an item column 301 located at the top of the interface and a file example column 302 located below the item column 301.
  • files that can be synchronously transferred are schematically classified into items such as "photograph”, “gallery”, “music”, “video”, “document”, and the like, and the user can switch between different items.
  • items are merely exemplary, and new items can be added or reduced according to different needs.
  • the files belonging to the item will be displayed according to different sorting methods such as time and file size, preferably by thumbnail, file name, file icon, and the like.
  • the statistical information of the file to be synchronously transmitted by the mobile terminal 110 is sent to the server 130, and then the information is forwarded to the web terminal 120 via the server 130 in step 255.
  • the synchronization statistics information includes the number of files to be transferred by the synchronous connection, the file type, and the number of files of each category.
  • Some basic information of the mobile terminal 110 such as an operating system model, mobile phone user basic information, a version model, and the like, may also be included.
  • FIG. 3b schematically illustrates a connection presentation interface of an exemplary web terminal 120 in accordance with one embodiment of the present invention.
  • the navigation bar 303 located on the left side of the interface and the file statistics field 304 located on the right side of the navigation bar 303 are divided.
  • files that can be synchronously transmitted are schematically classified into "photograph”, “gallery”, “music”, “video”, “document”, “sms", “folder”, “application”, and the like. Project, users can switch between different projects.
  • the number of various files is displayed in the file statistics column 304 according to the type of the file. For example, the exemplary music icon 305a in Figure 3b, and the number of music (39) icons 305b below it.
  • some basic information of the transmitted mobile terminal 110 such as the storage capacity information of the mobile terminal 110 presented at 306 below in the file statistics column 304, may also be presented to facilitate the user managing the mobile terminal 110 through the web terminal 120.
  • the disconnection can be achieved by closing the web interface of the web terminal 120 (e.g., a browser) or by closing either or both of the app.
  • the server 130 may also pass to the mobile terminal 110 and the web terminal. 120 sends a heartbeat signal to verify if the connection is still maintained. For example, when the heartbeat response signal fed back by the mobile terminal 110 or the web terminal 120 is not received for a certain number of times, the server 130 can determine that the mobile terminal 110 or the web terminal 120 has disconnected from the server end 130. The server side 130 can then disconnect the connection between the mobile terminal 110 and the web terminal 120.
  • the server 130 determines that the mobile terminal 110 or the web terminal 120 has disconnected from the server 130, the server 130 sends a command to the web terminal 120, and the web terminal 120 returns to the initial unconnected state, for example, The page state of the QR code.
  • the server side 130 also simultaneously sends a command to the mobile terminal 110 such that the mobile terminal 110 also returns to the initially unconnected state. That is, when the server side 130 detects that any one of the mobile terminal 110 or the web terminal 120 is disconnected, the other party is immediately disconnected at the same time to ensure the security of the information.
  • the server end 120 can simultaneously detect the mobile terminal when detecting the heartbeat signal. 110 or mobile network cell condition in which web terminal 120 is located.
  • the mobile terminal 110 or the web may be determined.
  • Terminal 120 has left the other party for a physical distance. In order to ensure the security of file transfer, it may be set to disconnect the connection between the mobile terminal 110 and the web terminal 120 after leaving a certain distance.
  • FIG. 4 shows a flow diagram of a method for a user to transfer files located on the mobile terminal 110 via the web terminal 120 via the server side 130. As shown in Figure 4,
  • the user issues a request to transfer the file to the server 130 via the web terminal 120.
  • the user may first select the category in which the file type to be transferred is located. For example, “photo”, “picture”, “music”, “video” or “document” and so on.
  • the server side 130 requests the mobile terminal 110 for summary information for all files in the selected category, including but not limited to file thumbnails, file information, file screenshots, and the like.
  • the summary information of the acquired file category is then sent to the web terminal 120 in step 415.
  • the summary information of all files in the selected category is transmitted in a compressed or encrypted manner.
  • the server side 130 when the user first requests a category of a certain transmission file, the server side 130 requests the mobile terminal 110 for summary information of all files in the selected category. These summary information can then be cached in the web terminal 120, such as in the browser cache of the web terminal 120. When the user selects the category again, there is no need to transfer from the mobile terminal 110 again, but directly from the cache until the web terminal 120 and the mobile terminal 110 are disconnected. According to an embodiment of the present invention, when the web terminal 120 and the mobile terminal 110 are disconnected, the cached file summary information is cleared.
  • Figures 5a and 5b schematically illustrate an exemplary file summary interface, respectively, in accordance with one embodiment of the present invention.
  • Figure 5a shows the file summary information of the music file
  • Figure 5b shows the file summary information of the video file.
  • the server side 130 requests the mobile terminal 110 for summary information of all files in the selected category, the summary information including the name of the file, music. Duration, music file type, creation time, and more.
  • the server side 130 requests the mobile terminal 110 for summary information of all files in the selected category, the summary information including the name and video of the file.
  • step 420 the user selects a file that he wants to download, to the server. End 130 sends a request to transmit the file.
  • the server side 130 queries the network status identifier to establish a connection between the mobile terminal 110 and the web terminal 120 based on the identification of the network status identifier. Specifically, when the network status identifier identifies that the web terminal 120 and the mobile terminal 110 are under different networks, the file may be transferred by the relay of the server end 130, and the steps 430a-445a are performed.
  • the web upload service is turned on at the server side 130.
  • the file to be transferred on the mobile terminal 110 is uploaded to the server side 130, and the address (url) of the file is generated on the server side 130.
  • the file to be transferred on the mobile terminal 110 can be transferred in blocks, and each time a file segment is transmitted, the file address of the corresponding file segment is generated.
  • the generated file address is sent to the web terminal 120.
  • the address of each file fragment is sent to the web terminal 120 by this.
  • web terminal 120 accesses the received address and downloads the file.
  • the file can be transferred by establishing a direct connection between the web terminal 120 and the mobile terminal 110, and proceeds to steps 430b-440b.
  • the direct connection avoids the relay of the server side 130, improving the transmission speed and transmission efficiency.
  • the mobile terminal 110 automatically launches a web service that generates a file address (url) for the file requested by the web terminal 120.
  • the file address is sent to the web terminal 120.
  • the web terminal 120 accesses the address to download the requested file.
  • FIG. 6 shows a flow chart of a method for a user to transfer a file to a mobile terminal 110 via a server terminal 130 via a web terminal 120. As shown in Figure 6,
  • the user issues a request to transfer the file to the server 130 via the web terminal 120.
  • the user may first select the category in which the file type to be transferred is located. For example, “photo”, “picture”, “music”, “video” or “document” and so on.
  • the server side 130 requests the mobile terminal 110 for summary information for all files in the selected category, including but not limited to file thumbnails, file information, file screenshots, and the like.
  • the summary information of the acquired file category is then sent to the web terminal 120 in step 615.
  • the summary information of all files in the selected category is transmitted in a compressed or encrypted manner.
  • the server 130 when a user first requests a category of a transfer file At the time, the server 130 requests the mobile terminal 110 for summary information of all files in the selected category. These summary information can then be cached in the web terminal 120, such as in the browser cache of the web terminal 120. When the user selects the category again, there is no need to transfer from the mobile terminal 110 again, but directly from the cache until the web terminal 120 and the mobile terminal 110 are disconnected. When the web terminal 120 and the mobile terminal 110 are disconnected, the cached file summary information is cleared.
  • the user selects a file that is intended to be transmitted to the mobile terminal 110 and sends a request to the server 130 to transfer the file.
  • transferring files to the mobile terminal 110 can take a variety of approaches. One way is shown in Figures 5a and 5b. As shown in Figures 5a and 5b, the user can select a file to be transferred to the mobile terminal 110 by clicking the "Add Music” button 501 or the "Add Computer Video” button 502 in the upper left corner. Alternatively, the transfer of the file to the mobile terminal 110 can also be triggered by directly dragging the file under the item page of the corresponding type.
  • the server side 130 queries the network status identifier to establish a connection between the mobile terminal 110 and the web terminal 120 based on the identification of the network status identifier.
  • the file may be transferred by the relay of the server end 130, and the process proceeds to steps 630a-645a.
  • the web upload service is started on the server side 130.
  • the address of the web upload service is sent to the web terminal 120.
  • the web terminal 120 uploads the file to be transmitted to the server 130 first, and then forwards the uploaded file to the mobile terminal 110 through the server 130 in step 645a.
  • the files to be transferred on the web terminal 120 may be transferred in blocks, and each time a file segment is transmitted, that is, the web file upload address of the corresponding file segment is generated on the server side 130.
  • the file can be transferred by establishing a direct connection between the web terminal 120 and the mobile terminal 110, and proceeds to steps 630b-640b.
  • the direct connection avoids the relay of the server side 130, improves the transmission speed and transmission efficiency, and saves network resources.
  • the mobile terminal 120 in step 630b, the mobile terminal 120 automatically launches a web upload service to generate a file upload address (url) for the requested file.
  • the generated file upload address is sent to the web terminal 110.
  • the web terminal 120 accesses the web upload address to upload the requested file.
  • a user can implement a file interconnect transmission scheme that is reliable, high speed, stable, and has a better user interaction experience between the mobile electronic device and the personal computer.
  • a software module is implemented using a computer program product comprising a computer readable medium containing computer program code executable by a computer processor for performing any or all of the steps, operations described. Or process.
  • Embodiments of the invention may also relate to apparatus for performing the operations herein.
  • the apparatus may be specially constructed for the required purposes, and/or it may comprise a general purpose computing device that is selectively activated or reconfigured by a computer program stored in a computer.
  • Such computer programs can be stored in a non-transitory tangible computer readable storage medium or any type of medium suitable for storing electronic instructions that can be coupled to a computer system bus.
  • any computing system referred to in this specification can include a single processor or can be an architecture involving multiple processors for increased computing power.
  • Embodiments of the invention may also relate to products produced by the computing processes described herein.
  • Such products may include information derived from a computing process, wherein the information is stored in a non-transitory tangible computer readable storage medium and may include any implementation of a computer program product or other data combination described herein.

Abstract

Provided in the present invention is a method for mobile terminal and web terminal interconnection based on two-dimensional code and network adaptation, comprising the following steps: a) a connection request is sent to a server by a web terminal; b) the server sends two-dimensional code information to the web terminal; c) the two-dimensional code information is scanned by a mobile terminal; d) in response to the two-dimensional code scanning operation, the mobile terminal and the web terminal respectively send to the server their respective network connection statuses; e) the server acquires the network statuses of the respective connection of the mobile terminal and the web terminal to the server, determines whether the network connections of the mobile terminal and of the web terminal are located in the same local area network, and on the basis of whether same are in the same local area network, sets the network status identifier to different statuses; f) the server respectively sends to the mobile terminal and the web terminal permission to establish a connection, and establishes a connection between the mobile terminal and the web terminal; and g) the mobile terminal sends to the server statistical information of files to be transferred synchronously, and forwards same to the web terminal via the server.

Description

基于二维码和网络适配的移动终端和web终端互连的方法Method for interconnecting mobile terminal and web terminal based on two-dimensional code and network adaptation 技术领域Technical field
本发明总体上涉及移动通信领域,特别地,涉及一种在移动终端和web终端之间进行互连以实现交互通信的方法和系统。The present invention generally relates to the field of mobile communications, and in particular to a method and system for interconnecting between a mobile terminal and a web terminal to enable interactive communication.
背景技术Background technique
目前,例如移动电话、平板电脑、移动媒体播放器的移动电子设备已经在人们日常生活中越来越流行使用。移动设备已经有逐渐取代传统个人电脑的趋势,成为个人信息的存储中心。然而,个人电脑在很多应用领域中,凭借其大幅的显示屏幕、便利的输入方式以及更为多样的软件和操作系统仍然有其不可替代的作用。因此人们在日常生活中,经常需要在移动设备和个人电脑之间进行信息的传递、同步和交互。Currently, mobile electronic devices such as mobile phones, tablets, and mobile media players have become increasingly popular in people's daily lives. Mobile devices have gradually replaced traditional PCs and become the storage center for personal information. However, personal computers still have an irreplaceable role in many applications, with their large display screens, convenient input methods, and a wider variety of software and operating systems. Therefore, in daily life, people often need to transfer, synchronize and interact with information between mobile devices and personal computers.
传统的在移动电子设备和个人电脑之间传输文件的方法例如使用数据线将个人电脑与电子设备连接,或者通过网盘等网络中转方式。但这些方法是非常耗时且十分麻烦的,用户的体验十分不好。例如,数据线的方式使得用户需要额外准备硬件,为用户带来不便。另外,很多时候需要额外安装驱动程序才能实现除了传输文件之外的其他更为复杂的功能。网盘等网络中转方式需要用户处在网络状况较好的环境中,如果网络状况较差且用户需要交互传输的文件体积较大,就难以实现良好的传输效果。A conventional method of transferring files between a mobile electronic device and a personal computer, for example, uses a data cable to connect a personal computer to an electronic device, or a network transfer method such as a network disk. But these methods are very time consuming and cumbersome, and the user experience is very bad. For example, the way of the data line makes the user need to prepare additional hardware, which is inconvenient for the user. In addition, many additional drivers are required to implement more complex functions than transferring files. The network transfer mode such as the network disk requires the user to be in an environment with a good network condition. If the network condition is poor and the file size that the user needs to transmit interactively is large, it is difficult to achieve a good transmission effect.
此外,WiFi技术可以提供移动电子设备和个人电脑之间的传输和较高的传输速度。然而,在以往常规的用WiFi技术实现文件传输的方案中,通常需要接入点(AP)。接入点用作在移动电子设备和个人电脑之间的无线网络中继,个人电脑和移动设备必须同时连接到该无线网络中继上才能实现互连。在由AP为主导形成的网络中,如果断开AP,那会破坏整个网络,同时也会破坏移动设备和个人电脑之间的连接。In addition, WiFi technology can provide transmission between mobile electronic devices and personal computers and higher transmission speeds. However, in the conventional scheme of implementing file transmission using WiFi technology, an access point (AP) is usually required. The access point acts as a wireless network relay between the mobile electronic device and the personal computer, and the personal computer and the mobile device must be connected to the wireless network relay at the same time to achieve interconnection. In a network dominated by APs, if the AP is disconnected, it will destroy the entire network and also damage the connection between the mobile device and the personal computer.
蓝牙技术等短距离近场通信技术现在也已经越来越多被用来实现在移动电子设备之间传输文件。然而,蓝牙技术通常无法提供高速的文件传输。另外,个人电脑通常并不是都配备有蓝牙模块,从而使得双向连接通信无法实现。 Short-range near-field communication technologies such as Bluetooth technology are now increasingly being used to transfer files between mobile electronic devices. However, Bluetooth technology typically does not provide high speed file transfers. In addition, personal computers are usually not equipped with Bluetooth modules, making bidirectional connection communication impossible.
因此,需要一种在移动电子设备和个人电脑之间实现可靠、高速、相对较长传输距离的互连方案,从而解决现有技术中的上述问题。Therefore, there is a need for an interconnection scheme that achieves a reliable, high speed, relatively long transmission distance between a mobile electronic device and a personal computer, thereby solving the above problems in the prior art.
发明内容Summary of the invention
本发明的目的在于提供一种用于基于二维码和网络适配的移动终端和web终端互连的方法,所述移动终端和web终端借助位于云端的服务器进行互连,所述方法包括以下步骤:a)由所述web终端向所述服务器发出连接请求;b)所述服务器向所述web终端发送二维码信息;c)通过所述移动终端扫描所述二维码信息;d)响应于所述扫描二维码的操作,所述移动终端和所述web终端分别向所述服务器发送自身的网络连接状况;e)所述服务器获取所述移动终端和所述web终端各自连接到服务器的网络状况,判断所述移动终端和所述web终端的网络连接是否处于同一局域网下,并针对是否处于同一局域网络将网络状况标志符设置不同的状态;f)所述服务器分别向所述移动终端和所述web终端发送连接建立许可,在所述移动终端和所述web终端之间建立连接;和g)所述移动终端将要进行同步传送的文件的统计信息发送至所述服务器,经所述服务器转发至所述web终端。It is an object of the present invention to provide a method for interconnecting a mobile terminal and a web terminal based on a two-dimensional code and network adaptation, the mobile terminal and the web terminal being interconnected by means of a server located in the cloud, the method comprising the following Step: a) issuing, by the web terminal, a connection request to the server; b) the server transmitting two-dimensional code information to the web terminal; c) scanning the two-dimensional code information by the mobile terminal; d) Responding to the operation of scanning the two-dimensional code, the mobile terminal and the web terminal respectively send their own network connection status to the server; e) the server acquires that the mobile terminal and the web terminal are each connected to a network status of the server, determining whether the network connection between the mobile terminal and the web terminal is in the same local area network, and setting different network status identifiers for the same local area network; f) the server separately The mobile terminal and the web terminal send a connection establishment permission to establish a connection between the mobile terminal and the web terminal; and g) the mobile terminal is about to enter Statistics transmitted in synchronization file to said server via the web server is forwarded to the terminal.
优选地,所述步骤f中的连接为http长连接。Preferably, the connection in the step f is an http long connection.
优选地,所述服务器通过向所述移动终端和所述web终端发送心跳信号来检验是否仍然保持连接。Preferably, the server verifies whether the connection is still maintained by transmitting a heartbeat signal to the mobile terminal and the web terminal.
优选地,当所述服务器未接收到移动终端或所述web终端反馈的心跳响应信号超过一定的次数,服务器断开所述移动终端和所述web终端之间的连接。Preferably, when the server does not receive the heartbeat response signal fed back by the mobile terminal or the web terminal for more than a certain number of times, the server disconnects the connection between the mobile terminal and the web terminal.
优选地,当在所述移动终端上和所述web终端之间传送文件时,还包括下列步骤:h)通过所述web终端向所述服务器发出传送文件的请求,选择所传送文件的类别;i)所述服务器端向所述移动终端请求所选类别下全部文件的摘要信息;j)将从所述移动终端获取的文件类别的摘要信息发送至所述web终端;k)选择想要传送的文件,向所述服务器发送传送该文件的请求;l)所述服务器查询网络状况标识符,根据网络状况标识符的标识情况建立所述移动终端和所述web终端之间的连接,当所述网络状况标识符标识出web终端和移动终端处于不同网络下时,通过所述服务器的中转来传送文件;当所述网络状况标识符标识出web终端和移动终端处于相同网络下时,在所述web终端和 所述移动终端之间建立直连来传送文件。Preferably, when the file is transferred between the mobile terminal and the web terminal, the method further comprises the steps of: h) issuing, by the web terminal, a request for transmitting a file to the server, selecting a category of the transmitted file; i) the server side requests the mobile terminal for summary information of all files in the selected category; j) sends summary information of the file category acquired from the mobile terminal to the web terminal; k) selects that it wants to transmit a file to the server to send a request to transmit the file; l) the server queries a network status identifier, and establishes a connection between the mobile terminal and the web terminal according to the identification of the network status identifier, The network status identifier identifies that the web terminal and the mobile terminal are in different networks, and transmits the file through the relay of the server; when the network status identifier identifies that the web terminal and the mobile terminal are in the same network, Web terminal and A direct connection is established between the mobile terminals to transfer files.
优选地,在所述步骤l中,当通过所述服务器的中转从所述移动终端向所述web终端传送文件时,进一步包括如下步骤:l1)在所述服务器开启web上传服务;l2)将所述移动终端上要传送的文件上传至服务器,在所述服务器上生成该文件的地址;l3)将所生成的文件地址发送给所述web终端;和l4)所述web终端访问所收到的地址,下载所述文件。Preferably, in the step 1, when the file is transferred from the mobile terminal to the web terminal by the relay of the server, the method further comprises the steps of: l1) opening a web upload service at the server; Transmitting a file to be transmitted on the mobile terminal to a server, generating an address of the file on the server; l3) transmitting the generated file address to the web terminal; and l) receiving the web terminal access Address, download the file.
优选地,在所述步骤l中,当通过在所述web终端和所述移动终端之间建立直连来从所述移动终端向所述web终端传送文件时,进一步包括如下步骤:l1)所述移动终端自动启动一个web服务,为所述web终端所请求传送的文件时生成一个文件地址;l2)发送该文件地址给所述web终端;和l3)所述web终端访问该地址以下载得到所请求的文件。Preferably, in the step 1, when the file is transmitted from the mobile terminal to the web terminal by establishing a direct connection between the web terminal and the mobile terminal, the method further includes the following steps: The mobile terminal automatically starts a web service, generates a file address for the file requested by the web terminal, and sends a file address to the web terminal; and 13) the web terminal accesses the address to download The requested file.
优选地,在所述步骤l中,当通过所述服务器的中转从所述web终端向所述移动终端传送文件时,进一步包括如下步骤:l1)在所述服务器开启web上传服务;l2)将web上传服务的地址发送至所述web终端;l3)所述web终端将要传送的文件上传至所述地址;和l4)所述服务器将上传的所述文件转发至所述移动终端。Preferably, in the step 1, when the file is transferred from the web terminal to the mobile terminal by the relay of the server, the method further comprises the steps of: l1) opening a web upload service at the server; The address of the web upload service is sent to the web terminal; 13) the web terminal uploads the file to be transferred to the address; and l4) the server forwards the uploaded file to the mobile terminal.
优选地,在所述步骤l中,当通过在所述web终端和所述移动终端之间建立直连来从所述web终端向所述移动终端传送文件时,进一步包括如下步骤:l1)所述移动终端自动启动一个web上传服务;l2)将所述web上传服务的地址发送至所述web终端;l3)所述web终端访问该地址以上传得到所请求的文件。Preferably, in the step 1, when the file is transmitted from the web terminal to the mobile terminal by establishing a direct connection between the web terminal and the mobile terminal, the method further includes the following steps: The mobile terminal automatically starts a web upload service; l2) sends the address of the web upload service to the web terminal; and the web terminal accesses the address to upload the requested file.
优选地,所述文件分为多个文件片段进行传送。Preferably, the file is divided into a plurality of file segments for transmission.
根据本发明的方法和系统,用户可以在移动电子设备和个人电脑之间实现可靠、高速、稳定、用户交互体验更好的文件互连传送方案。According to the method and system of the present invention, a user can implement a file interconnect transmission scheme that is reliable, high speed, stable, and has a better user interaction experience between the mobile electronic device and the personal computer.
应当理解,前述大体的描述和后续详尽的描述均为示例性说明和解释,并不应当用作对本发明所要求保护内容的限制。It is to be understood that the foregoing general descriptions
附图说明DRAWINGS
参考随附的附图,本发明更多的目的、功能和优点将通过本发明实施方式的如下描述得以阐明,其中:Further objects, features, and advantages of the present invention will be made apparent by the following description of the embodiments of the invention.
图1a和图1b示意性示出根据本发明的在移动终端和web终端之间 借助服务器端进行互连的系统框图。1a and 1b schematically illustrate a connection between a mobile terminal and a web terminal in accordance with the present invention A block diagram of the system interconnected by the server.
图2示意性示出了根据本发明的在移动终端和web终端之间借助服务器端进行互连的交互流程图。Fig. 2 schematically shows an interaction flow diagram for interconnection between a mobile terminal and a web terminal by means of a server side in accordance with the present invention.
图3a示意性地示出了根据本发明一个实施例的示例性移动终端110的连接界面。FIG. 3a schematically illustrates a connection interface of an exemplary mobile terminal 110 in accordance with one embodiment of the present invention.
图3b示意性地示出了根据本发明一个实施例的示例性web终端120的连接呈现界面。FIG. 3b schematically illustrates a connection presentation interface of an exemplary web terminal 120 in accordance with one embodiment of the present invention.
图4示出了用户通过web终端120借助服务器端130传输位于移动终端110上的文件的方法流程图。4 shows a flow diagram of a method for a user to transfer files located on the mobile terminal 110 via the web terminal 120 via the server side 130.
图5a和图5b分别示意性地示出了根据本发明一个实施例的示例性文件摘要界面。Figures 5a and 5b schematically illustrate an exemplary file summary interface, respectively, in accordance with one embodiment of the present invention.
图6示出了用户通过web终端120借助服务器端130向移动终端110传送文件的方法流程图。FIG. 6 shows a flow chart of a method for a user to transfer a file to a mobile terminal 110 via a server terminal 130 via a web terminal 120.
具体实施方式detailed description
通过参考示范性实施例,本发明的目的和功能以及用于实现这些目的和功能的方法将得以阐明。然而,本发明并不受限于以下所公开的示范性实施例;可以通过不同形式来对其加以实现。说明书的实质仅仅是帮助相关领域技术人员综合理解本发明的具体细节。Objects and functions of the present invention, and methods for achieving the objects and functions will be clarified by referring to the exemplary embodiments. However, the invention is not limited to the exemplary embodiments disclosed below; it can be implemented in various forms. The essence of the description is merely to assist those skilled in the relevant art to understand the specific details of the invention.
在下文中,将参考附图描述本发明的实施例。在附图中,相同的附图标记代表相同或类似的部件,或者相同或类似的步骤。Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the figures, the same reference numerals are used to refer to the same or similar parts, or the same or similar steps.
系统概述System Overview
图1a和图1b示意性示出根据本发明的在移动终端和web终端之间借助服务器端进行互连的系统框图。其中图1a示意性示出根据本发明的在移动终端和web终端之间借助服务器端进行互连的系统框图,图1b示出了包含服务器端的具体架构和组成的系统框图。如图1a所示,系统100包括至少一个移动终端110、至少一个web终端120,以及用于实现在移动终端110和web终端120之间进行互连以实现交互式通信的位于远程的服务器端130。移动终端110和web终端120分别通过第一网络140与服务器端130连接,移动终端110和web终端120彼此之间通过第二网络150连接。出于示意性的目的,图1仅示出了一个移动终端110和一个web终端120。然而,可以理解的是在其他实施 方式中,系统100可以包括更多的移动终端110和/或更多的web终端120。在根据本发明的一个实施方式中,当系统100具有多个移动终端110和多个web终端120时,每个移动终端110都有唯一的web终端120与其唯一相对应。1a and 1b schematically show a system block diagram of interconnection between a mobile terminal and a web terminal by means of a server side in accordance with the present invention. 1a schematically shows a system block diagram for interconnection between a mobile terminal and a web terminal by means of a server side according to the present invention, and FIG. 1b shows a system block diagram including a specific architecture and composition of the server side. As shown in FIG. 1a, system 100 includes at least one mobile terminal 110, at least one web terminal 120, and a remotely located server side 130 for enabling interconnection between mobile terminal 110 and web terminal 120 for interactive communication. . The mobile terminal 110 and the web terminal 120 are respectively connected to the server side 130 through the first network 140, and the mobile terminal 110 and the web terminal 120 are connected to each other through the second network 150. For illustrative purposes, FIG. 1 shows only one mobile terminal 110 and one web terminal 120. However, it can be understood that in other implementations In the approach, system 100 can include more mobile terminals 110 and/or more web terminals 120. In one embodiment in accordance with the present invention, when system 100 has multiple mobile terminals 110 and multiple web terminals 120, each mobile terminal 110 has a unique web terminal 120 that uniquely corresponds to it.
移动终端110和web终端120可分别经过任意类型的第一网络140与服务器端130之间进行双向通信。所述第一网络140例如选自诸如内联网之类的局域网(“LAN”)和诸如互联网之类的广域网(“WAN”)。第一网络140可被配置为支持利用多种协议设置格式的信息的传输。另外,第一网络140可以是公共网络、专用网络或其组合。第一网络140还可以利用任何一种或多种类型的物理介质来实现,其中包括与多个服务提供商相关联的有线通信路径和无线通信路径。无线通信方式例如WiFi或WLAN、GPRS、蜂窝网络,例如GSM网络、3G网络、LTE网络或CDMA网络。The mobile terminal 110 and the web terminal 120 can communicate bidirectionally with the server side 130 via any type of first network 140, respectively. The first network 140 is, for example, selected from a local area network ("LAN") such as an intranet and a wide area network ("WAN") such as the Internet. The first network 140 can be configured to support the transmission of information using a plurality of protocol setting formats. Additionally, the first network 140 can be a public network, a private network, or a combination thereof. The first network 140 can also be implemented using any one or more types of physical media, including wired communication paths and wireless communication paths associated with multiple service providers. Wireless communication methods such as WiFi or WLAN, GPRS, cellular networks, such as GSM networks, 3G networks, LTE networks, or CDMA networks.
移动终端110和web终端120之间也可以之间建立直接的网络连接,通过第二网络150进行双向通信。所述第二网络150采用的协议方式例如是http轮询结合WebSocket直连的方式。A direct network connection can also be established between the mobile terminal 110 and the web terminal 120, and two-way communication is performed through the second network 150. The protocol mode adopted by the second network 150 is, for example, a manner in which http polling is combined with WebSocket direct connection.
移动终端110可以是智能电话、个人数字助理(PDA)、平板电脑、多功能移动终端或者包括计算功能和数据通信能力的任何其他移动设备。移动终端110包括app接口应用111(如图1b所示),例如定制应用(app),用于与具备web能力的应用进行双向通信。The mobile terminal 110 can be a smart phone, a personal digital assistant (PDA), a tablet, a multi-function mobile terminal, or any other mobile device that includes computing functionality and data communication capabilities. The mobile terminal 110 includes an app interface application 111 (as shown in FIG. 1b), such as a custom application (app) for two-way communication with web-enabled applications.
web终端120可以是台式计算机、膝上型计算机、笔记本电脑、平板电脑、游戏机、智能电视等任何支持web协议的终端设备。web终端120包括web接口121(如图1b所示),例如web浏览器。在一些实施例中,相应web终端120包括用于请求、解析、显示、执行网页以及执行包括在网页中的应用的浏览器应用。浏览器应用128可以是允许用户搜索、浏览和/或使用URL(统一资源定位符)或URI(统一资源标识符)所识别的资源(例如,网页和web服务)的任何应用。“URL”在本文用来意指文档的网络地址或位置。在该情形下,“文档”指可以由web浏览器或其他应用使用的任何格式的任何文档或内容,包括但不限于:字处理文档、电子表格文档、演示文档、绘图、网页、文本、图像、音频、视频等。The web terminal 120 can be any terminal device that supports a web protocol, such as a desktop computer, a laptop computer, a notebook computer, a tablet computer, a game console, a smart TV, and the like. The web terminal 120 includes a web interface 121 (shown in Figure 1b), such as a web browser. In some embodiments, the respective web terminal 120 includes a browser application for requesting, parsing, displaying, executing a web page, and executing an application included in the web page. Browser application 128 may be any application that allows a user to search, browse, and/or use resources (eg, web pages and web services) identified by a URL (Uniform Resource Locator) or URI (Uniform Resource Identifier). "URL" is used herein to mean the network address or location of a document. In this context, "document" refers to any document or content in any format that can be used by a web browser or other application, including but not limited to: word processing documents, spreadsheet documents, presentation documents, drawings, web pages, text, images. , audio, video, etc.
移动终端110包括一个或多个计算设备,该一个或多个计算设备可以从用户接收输入,并可呈现输出,因此移动终端110还包括I/O接口 (输入/输出接口)112,可接收一个或多个输入并呈现输出。例如,输入接口可包括摄像头、触摸板、触摸屏、触屏笔、麦克风中的一个或多个。另外,通过输出接口可呈现输出,以输出用户的控制操作指令或来自其他用户的反馈信息等。输出接口包括显示屏、一个或多个扬声器和触觉接口中的一个或多个。The mobile terminal 110 includes one or more computing devices that can receive input from a user and can present an output, such that the mobile terminal 110 also includes an I/O interface (Input/Output Interface) 112, which can receive one or more inputs and present an output. For example, the input interface can include one or more of a camera, a touchpad, a touch screen, a stylus, and a microphone. In addition, an output can be presented through the output interface to output a user's control operation instructions or feedback information from other users, and the like. The output interface includes one or more of a display screen, one or more speakers, and a tactile interface.
图1b示出了包含服务器端的具体架构和组成的系统框图。如图1b所示,服务器端130包括二维码模块131、网络接入模块132、网络状况标志符133和地址生成模块134。Figure 1b shows a system block diagram containing the specific architecture and composition of the server side. As shown in FIG. 1b, the server side 130 includes a two-dimensional code module 131, a network access module 132, a network status identifier 133, and an address generation module 134.
二维码模块131用于生成供移动终端110扫描的二维码。根据本发明的一个实施例,二维码包含了通用唯一识别码(UUID),UUID是唯一标识码。移动终端110通过扫描该二维码表应的UUID连接到服务器端130以请求获取唯一的连接地址和会话(session)。The two-dimensional code module 131 is configured to generate a two-dimensional code for scanning by the mobile terminal 110. According to one embodiment of the invention, the two-dimensional code contains a Universally Unique Identifier (UUID), which is a unique identification code. The mobile terminal 110 connects to the server side 130 by scanning the UUID of the two-dimensional code table to request acquisition of a unique connection address and session.
网络接入模块132用于相应移动终端110扫描二维码成功后判断移动终端110和web终端120各自的网络连接状况,以针对不同的网络连接状况进行移动终端110和web终端120之间的适配性连接,从而建立移动终端110和web终端120之间的连接。优选地,所建立的连接为http长连接。该连接可以连续发送多个数据包,在连接保持期间,如果没有数据包发送,为了确保两个终端保持连接,会在规定间隔时间内发送检测数据包(即心跳包),移动终端110和web终端120之间需要发送检测数据包以维持此连接。The network access module 132 is configured to determine the network connection status of the mobile terminal 110 and the web terminal 120 after the corresponding mobile terminal 110 scans the two-dimensional code, so as to perform appropriate connection between the mobile terminal 110 and the web terminal 120 for different network connection conditions. The connections are made to establish a connection between the mobile terminal 110 and the web terminal 120. Preferably, the established connection is an http long connection. The connection can continuously send multiple data packets. If there is no data packet transmission during the connection hold period, in order to ensure that the two terminals remain connected, the detection data packet (ie, heartbeat packet) is sent within a predetermined interval, the mobile terminal 110 and the web. A detection packet needs to be sent between the terminals 120 to maintain the connection.
具体地,网络接入模块132获取移动终端110和web终端120各自连接到服务器端130的网络状态,判断移动终端110和web终端120的网络连接是否处于同一网络下。根据本发明的同一网络是指在同一个路由器下同一网段能直接连接,而不需要经过外网。Specifically, the network access module 132 obtains the network status that the mobile terminal 110 and the web terminal 120 are respectively connected to the server end 130, and determines whether the network connection of the mobile terminal 110 and the web terminal 120 are under the same network. The same network according to the present invention means that the same network segment can be directly connected under the same router without going through the external network.
并针对是否处于同一局域网络将网络状况标志符133设置不同的状态。例如,若处于同一网络内,则在网络状况标志符133中设置一标识,例如数字1;若不处于同一网络,则不在网络状况标志符133中设置标识,或者设置另一不同的标识,例如数字0。The network status indicator 133 is set to a different state depending on whether it is in the same local area network. For example, if it is in the same network, an identifier, such as the number 1, is set in the network status indicator 133; if not in the same network, the identifier is not set in the network status indicator 133, or another different identifier is set, for example The number is 0.
根据本发明的一个实施例,网络接入模块132会定期地获取移动终端110和web终端120各自连接到服务器的网络状态,以判断移动终端110和web终端120的网络连接是否处于同一局域网下的状态是否发生变化,并针对变化了的网络状态更新网络状况标志符133。所述定期获取的频率例如可以是每30秒一次。该定期发送的信号也被称为“心 跳信号”,该信号还可以用来检测移动终端110和web终端120是否仍连接到服务器端130。例如当未接收到移动终端110或web终端120反馈的心跳响应信号超过一定的次数,服务器端130即可判断移动终端110或web终端120已经断开与服务器端130的连接。According to an embodiment of the present invention, the network access module 132 periodically acquires the network status of each of the mobile terminal 110 and the web terminal 120 connected to the server to determine whether the network connection of the mobile terminal 110 and the web terminal 120 is under the same local area network. Whether the status changes and updates the network status indicator 133 for the changed network status. The frequency of the periodic acquisition may be, for example, once every 30 seconds. The periodically transmitted signal is also called "heart" The signal may also be used to detect whether the mobile terminal 110 and the web terminal 120 are still connected to the server side 130. For example, when the heartbeat response signal fed back by the mobile terminal 110 or the web terminal 120 is not received more than a certain number of times, the server side 130 can determine that the mobile terminal 110 or the web terminal 120 has disconnected from the server side 130.
网络状况标志符133用于存储移动终端110和web终端120之间由于不同的网络连接状况而产生适配性连接的标识。例如,移动终端110和web终端120处于同一网络内,网络状况标志符133中设置一标识;若不处于同一网络,则设置另一不同的标识。The network status indicator 133 is used to store an identification of the adaptive connection between the mobile terminal 110 and the web terminal 120 due to different network connection conditions. For example, the mobile terminal 110 and the web terminal 120 are in the same network, and an identifier is set in the network status identifier 133; if not in the same network, another different identifier is set.
地址生成模块134,用于生成需要在移动终端110和web终端120之间传送的文件地址。当移动终端110和web终端120之间根据本发明的方法建立了连接之后,用户可以选择通过移动终端110上传文件至Web终端120,或者从Web终端120下载文件到移动终端110上。当用户发出此类移动文件的请求时,地址生成模块134为所传送的文件生成基于网络的地址,例如URL,传送给需要下载文件的移动终端110或web终端120,移动终端110和web终端120只需访问该地址即可下载到该文件,从而实现文件的传送。The address generation module 134 is configured to generate a file address that needs to be transferred between the mobile terminal 110 and the web terminal 120. After the connection is established between the mobile terminal 110 and the web terminal 120 in accordance with the method of the present invention, the user may select to upload a file to the web terminal 120 via the mobile terminal 110 or download the file from the web terminal 120 to the mobile terminal 110. When the user issues such a request to move the file, the address generation module 134 generates a network-based address, such as a URL, for the transmitted file, to the mobile terminal 110 or web terminal 120 that needs to download the file, the mobile terminal 110 and the web terminal 120. Simply access the address to download the file to transfer the file.
交互方式interactive mode
图2示出了用户通过移动终端110借助服务器端130与web终端120进行交互连接的方法流程图。如图2所示,2 shows a flow chart of a method for a user to interact with the web terminal 120 via the server terminal 130 via the mobile terminal 110. as shown in picture 2,
在步骤205,用户通过web终端120向服务器端130发出连接请求。具体地,用户可以通过启动web终端120上的浏览器,并在浏览器地址栏中输入www.****.cc的地址信息来发送连接请求。At step 205, the user sends a connection request to the server side 130 via the web terminal 120. Specifically, the user can send a connection request by launching a browser on the web terminal 120 and entering address information of www.****.cc in the browser address bar.
接着,在步骤210,服务器端130会应web终端120发出的连接请求发送二维码信息给web终端120,并在步骤220中在web终端120上呈现该二维码信息。所述二维码信息包含了通用唯一识别码(UUID),UUID是唯一标识码。移动终端110通过扫描该二维码表应的UUID连接到服务器端130以请求获取唯一的连接地址和会话(session)。Next, in step 210, the server 130 sends the QR code information to the web terminal 120 in response to the connection request sent by the web terminal 120, and presents the two-dimensional code information on the web terminal 120 in step 220. The two-dimensional code information includes a universal unique identification code (UUID), and the UUID is a unique identification code. The mobile terminal 110 connects to the server side 130 by scanning the UUID of the two-dimensional code table to request acquisition of a unique connection address and session.
接下来,在步骤225,用户通过移动终端110扫描web终端120上的二维码信息。例如,通过移动终端110上带有的摄像头进行扫描。具体地,用户启动移动终端110上的app软件,app软件会提示用户扫描二维码从而实现连接。 Next, at step 225, the user scans the two-dimensional code information on the web terminal 120 through the mobile terminal 110. For example, scanning is performed by a camera carried on the mobile terminal 110. Specifically, the user activates the app software on the mobile terminal 110, and the app software prompts the user to scan the two-dimensional code to implement the connection.
接着,响应于用户扫描二维码的操作,移动终端110和web终端120分别在步骤230a和步骤230b向服务器端发起连接请求,并将自身的网络连接状况发送给服务器端130。具体的,所述网络连接状况为通过何种网络连接至服务器端。Next, in response to the user's operation of scanning the two-dimensional code, the mobile terminal 110 and the web terminal 120 initiate a connection request to the server side in steps 230a and 230b, respectively, and transmit their own network connection status to the server side 130. Specifically, the network connection status is a network connection to the server end.
在步骤235,服务器端130通过获取的移动终端110和web终端120各自连接到服务器的网络状况,判断移动终端110和web终端120的网络连接是否处于同一局域网下,并针对是否处于同一局域网络将网络状况标志符设置不同的状态。例如,若处于同一网络内,则在网络状况标志符133中设置一标识,例如数字1;若不处于同一网络,则不在网络状况标志符133中设置标识,或者设置另一不同的标识,例如数字0。In step 235, the server side 130 determines whether the network connection of the mobile terminal 110 and the web terminal 120 is under the same local area network by acquiring the network status of the mobile terminal 110 and the web terminal 120 respectively connected to the server, and whether the network connection is in the same local area network. The network status indicator sets a different status. For example, if it is in the same network, an identifier, such as the number 1, is set in the network status indicator 133; if not in the same network, the identifier is not set in the network status indicator 133, or another different identifier is set, for example The number is 0.
接着,服务器端130分别在步骤240a和步骤240b向移动终端110和web终端120发送连接建立许可,从而在移动终端110和web终端120之间建立连接。优选地,建立http长连接。Next, the server side 130 transmits a connection establishment permission to the mobile terminal 110 and the web terminal 120 in steps 240a and 240b, respectively, thereby establishing a connection between the mobile terminal 110 and the web terminal 120. Preferably, a http long connection is established.
接着,在步骤245,在移动终端110呈现连接后的界面。图3a示意性地示出了根据本发明一个实施例的示例性移动终端110的连接界面。如图3a所示,移动终端110的呈现界面中,分为位于界面顶部的项目栏301和位于项目栏301下方的文件示例栏302。在项目栏301中,将可以同步传输的文件示意性地分为“照片”、“图库”、“音乐”、“视频”、“文档”等项目,用户可以在不同项目之间进行切换。本领域技术人员可以理解的是,上述项目仅仅是示例性的,可以根据不同需求增加或减少新的项目。在每个选中的项目下,会按照时间、文件大小等不同的分类排序方式对属于该项目的文件进行展示,优选以缩略图、文件名、文件图标等方式进行展示。Next, at step 245, the connected interface is presented at the mobile terminal 110. FIG. 3a schematically illustrates a connection interface of an exemplary mobile terminal 110 in accordance with one embodiment of the present invention. As shown in FIG. 3a, the presentation interface of the mobile terminal 110 is divided into an item column 301 located at the top of the interface and a file example column 302 located below the item column 301. In the item column 301, files that can be synchronously transferred are schematically classified into items such as "photograph", "gallery", "music", "video", "document", and the like, and the user can switch between different items. Those skilled in the art can understand that the above items are merely exemplary, and new items can be added or reduced according to different needs. Under each selected item, the files belonging to the item will be displayed according to different sorting methods such as time and file size, preferably by thumbnail, file name, file icon, and the like.
接着,在步骤250,将移动终端110要进行同步传送的文件的统计信息发送至服务器端130,再在步骤255中经服务器端130将这些信息转发至web终端120。优选地,所述同步统计信息包括要进行同步连接传送的文件数目、文件种类、每个种类各自的文件数目。还可以包括移动终端110的一些基本信息,如操作系统型号、手机用户基本信息、版本型号等等。Next, in step 250, the statistical information of the file to be synchronously transmitted by the mobile terminal 110 is sent to the server 130, and then the information is forwarded to the web terminal 120 via the server 130 in step 255. Preferably, the synchronization statistics information includes the number of files to be transferred by the synchronous connection, the file type, and the number of files of each category. Some basic information of the mobile terminal 110, such as an operating system model, mobile phone user basic information, a version model, and the like, may also be included.
接着在步骤260,在web终端120呈现连接后的界面,并同时呈现经服务器端130转发的同步统计信息。图3b示意性地示出了根据本发明一个实施例的示例性web终端120的连接呈现界面。如图3b所示, 在web终端120的呈现界面中,分为位于界面左侧的导航栏303和位于导航栏303右侧的文件统计栏304。在导航栏303中,将可以同步传输的文件示意性地分为“照片”、“图库”、“音乐”、“视频”、“文档”、“短信”、“文件夹”、“应用”等项目,用户可以在不同项目之间进行切换。还可以增加“主页”项目以浏览总体的文件统计信息。本领域技术人员可以理解的是,上述项目仅仅是示例性的,可以根据不同需求增加或减少新的项目。在“主页”项目下,在文件统计栏304中会按照文件的类型展示各种文件的数量。例如图3b中示例性的音乐图标305a,以及其下方的音乐数量(39)图标305b。另外,还可以呈现所传送的移动终端110的一些基本信息,例如在文件统计栏304中下方的306处呈现的移动终端110的存储容量信息,以便于用户通过web终端120管理移动终端110。Next, at step 260, the connected interface is presented at the web terminal 120, and the synchronization statistics forwarded by the server 130 are simultaneously presented. FIG. 3b schematically illustrates a connection presentation interface of an exemplary web terminal 120 in accordance with one embodiment of the present invention. As shown in Figure 3b, In the presentation interface of the web terminal 120, the navigation bar 303 located on the left side of the interface and the file statistics field 304 located on the right side of the navigation bar 303 are divided. In the navigation bar 303, files that can be synchronously transmitted are schematically classified into "photograph", "gallery", "music", "video", "document", "sms", "folder", "application", and the like. Project, users can switch between different projects. You can also add a Home page item to view overall file statistics. Those skilled in the art can understand that the above items are merely exemplary, and new items can be added or reduced according to different needs. Under the "Home" item, the number of various files is displayed in the file statistics column 304 according to the type of the file. For example, the exemplary music icon 305a in Figure 3b, and the number of music (39) icons 305b below it. In addition, some basic information of the transmitted mobile terminal 110, such as the storage capacity information of the mobile terminal 110 presented at 306 below in the file statistics column 304, may also be presented to facilitate the user managing the mobile terminal 110 through the web terminal 120.
当用户需要将web终端120和移动终端110断开连接时,可以通过关闭web终端120的web接口(例如浏览器)或者关闭app应用任意一者或二者来实现断开。When the user needs to disconnect the web terminal 120 and the mobile terminal 110, the disconnection can be achieved by closing the web interface of the web terminal 120 (e.g., a browser) or by closing either or both of the app.
根据本发明的另一实施例,当用户未主动断开连接时,或者用户断开移动终端110或web终端120任意一者的网络连接时,服务器端130也可以通过向移动终端110和web终端120发送心跳信号来检验是否仍然保持连接。例如,当未接收到移动终端110或web终端120反馈的心跳响应信号超过一定的次数,服务器端130即可判断移动终端110或web终端120已经断开与服务器端130的连接。服务器端130于是可以断开移动终端110和web终端120之间的连接。具体地,当服务器端130判断出移动终端110或web终端120已经断开与服务器端130的连接后,服务器端130向web终端120发送命令,web终端120返回到初始未连接的状态,例如,呈现二维码的页面状态。服务器端130同时还向移动终端110发送命令,使得移动终端110也返回至初始未连接的状态。也即,当服务器端130检测到移动终端110或web终端120其中任意一者断开连接时,会立即同时断开另一者,以确保信息的安全。According to another embodiment of the present invention, when the user does not actively disconnect, or the user disconnects the network connection of any of the mobile terminal 110 or the web terminal 120, the server 130 may also pass to the mobile terminal 110 and the web terminal. 120 sends a heartbeat signal to verify if the connection is still maintained. For example, when the heartbeat response signal fed back by the mobile terminal 110 or the web terminal 120 is not received for a certain number of times, the server 130 can determine that the mobile terminal 110 or the web terminal 120 has disconnected from the server end 130. The server side 130 can then disconnect the connection between the mobile terminal 110 and the web terminal 120. Specifically, when the server 130 determines that the mobile terminal 110 or the web terminal 120 has disconnected from the server 130, the server 130 sends a command to the web terminal 120, and the web terminal 120 returns to the initial unconnected state, for example, The page state of the QR code. The server side 130 also simultaneously sends a command to the mobile terminal 110 such that the mobile terminal 110 also returns to the initially unconnected state. That is, when the server side 130 detects that any one of the mobile terminal 110 or the web terminal 120 is disconnected, the other party is immediately disconnected at the same time to ensure the security of the information.
根据本发明的一个实施例,当移动终端110或web终端120以移动网络方式(例如GPRS、3G、4G等)连接到服务器端130时,服务器端120可以在检测心跳信号时,同时检测移动终端110或web终端120所处的移动网络小区状况。当移动终端110或web终端120其中任意一者所连接的小区发生切换时,可以判断出移动终端110或web 终端120已经离开另一者一段物理距离。为了确保文件传送的安全性,可以设定在移动终端110和web终端120两者离开特定的距离后,断开两者之间的连接。According to an embodiment of the present invention, when the mobile terminal 110 or the web terminal 120 is connected to the server side 130 in a mobile network manner (for example, GPRS, 3G, 4G, etc.), the server end 120 can simultaneously detect the mobile terminal when detecting the heartbeat signal. 110 or mobile network cell condition in which web terminal 120 is located. When the cell connected by any one of the mobile terminal 110 or the web terminal 120 is switched, the mobile terminal 110 or the web may be determined. Terminal 120 has left the other party for a physical distance. In order to ensure the security of file transfer, it may be set to disconnect the connection between the mobile terminal 110 and the web terminal 120 after leaving a certain distance.
文件传输方式File transfer method
图4示出了用户通过web终端120借助服务器端130传输位于移动终端110上的文件的方法流程图。如图4所示,4 shows a flow diagram of a method for a user to transfer files located on the mobile terminal 110 via the web terminal 120 via the server side 130. As shown in Figure 4,
在步骤405,用户通过web终端120向服务器端130发出传送文件的请求。根据本发明的一个实施例,用户可以首先选择要传送的文件类型所在的类别。例如“照片”、“图片”、“音乐”、“视频”或者“文档”等等。At step 405, the user issues a request to transfer the file to the server 130 via the web terminal 120. According to an embodiment of the present invention, the user may first select the category in which the file type to be transferred is located. For example, "photo", "picture", "music", "video" or "document" and so on.
在步骤410,基于用户的选择请求,服务器端130向移动终端110请求所选类别下全部文件的摘要信息,所述摘要信息包括但不限于文件缩略图、文件信息、文件截图等等。然后,在步骤415中将所获取的文件类别的摘要信息发送至web终端120。优选地,以压缩或加密的方式传送所选类别下全部文件的摘要信息。At step 410, based on the user's selection request, the server side 130 requests the mobile terminal 110 for summary information for all files in the selected category, including but not limited to file thumbnails, file information, file screenshots, and the like. The summary information of the acquired file category is then sent to the web terminal 120 in step 415. Preferably, the summary information of all files in the selected category is transmitted in a compressed or encrypted manner.
根据本发明的一个实施例,当用户首次请求某个传送文件的类别时,服务器端130会向移动终端110请求所选类别下全部文件的摘要信息。之后,这些摘要信息可以缓存在web终端120中,例如保存在web终端120的浏览器缓存中。之后用户再次选择该类别时,就无需再次从移动终端110传送,而是直接从缓存中调取,直到web终端120和移动终端110之间断开为止。根据本发明的一个实施例,当web终端120和移动终端110之间断开后,所缓存的文件摘要信息会被清除。According to an embodiment of the present invention, when the user first requests a category of a certain transmission file, the server side 130 requests the mobile terminal 110 for summary information of all files in the selected category. These summary information can then be cached in the web terminal 120, such as in the browser cache of the web terminal 120. When the user selects the category again, there is no need to transfer from the mobile terminal 110 again, but directly from the cache until the web terminal 120 and the mobile terminal 110 are disconnected. According to an embodiment of the present invention, when the web terminal 120 and the mobile terminal 110 are disconnected, the cached file summary information is cleared.
图5a和图5b分别示意性地示出了根据本发明一个实施例的示例性文件摘要界面。其中图5a显示的是音乐文件的文件摘要信息,图5b显示的视频文件的文件摘要信息。如图5a所示,当用户在web终端120选择的文件类别是“音乐”时,服务器端130向移动终端110请求所选类别下全部文件的摘要信息,所述摘要信息包括文件的名称、音乐时长、音乐文件类型、创建时间等等。如图5b所示,当用户在web终端120选择的文件类别是“视频”时,服务器端130向移动终端110请求所选类别下全部文件的摘要信息,所述摘要信息包括文件的名称和视频中某一帧的截图。Figures 5a and 5b schematically illustrate an exemplary file summary interface, respectively, in accordance with one embodiment of the present invention. Figure 5a shows the file summary information of the music file, and Figure 5b shows the file summary information of the video file. As shown in FIG. 5a, when the file category selected by the user at the web terminal 120 is "music", the server side 130 requests the mobile terminal 110 for summary information of all files in the selected category, the summary information including the name of the file, music. Duration, music file type, creation time, and more. As shown in FIG. 5b, when the file category selected by the user at the web terminal 120 is "video", the server side 130 requests the mobile terminal 110 for summary information of all files in the selected category, the summary information including the name and video of the file. A screenshot of a frame in .
回到图4,在步骤420,用户选择某个想要下载的文件,向服务器 端130发送传送该文件的请求。Returning to Figure 4, in step 420, the user selects a file that he wants to download, to the server. End 130 sends a request to transmit the file.
接着在步骤425,服务器端130查询网络状况标识符,根据网络状况标识符的标识情况建立移动终端110和web终端120之间的连接。具体地,当网络状况标识符标识出web终端120和移动终端110处于不同网络下时,可以通过服务器端130的中转来传送文件,进入步骤430a-445a。在步骤430a,在服务器端130开启web上传服务。在步骤435a,将移动终端110上要传送的文件上传至服务器端130,在服务器端130上生成该文件的地址(url)。优选地,可以将移动终端110上要传送的文件分块传送,每传送一个文件片段,即生成相应文件片段的文件地址。在步骤440a中,将所生成的文件地址发送给web终端120。优选地,当移动终端110传送的文件以分块的形式传送时,将每一个文件片段的地址以此发给web终端120。在步骤445a,web终端120访问收到的地址,下载文件。Next at step 425, the server side 130 queries the network status identifier to establish a connection between the mobile terminal 110 and the web terminal 120 based on the identification of the network status identifier. Specifically, when the network status identifier identifies that the web terminal 120 and the mobile terminal 110 are under different networks, the file may be transferred by the relay of the server end 130, and the steps 430a-445a are performed. At step 430a, the web upload service is turned on at the server side 130. In step 435a, the file to be transferred on the mobile terminal 110 is uploaded to the server side 130, and the address (url) of the file is generated on the server side 130. Preferably, the file to be transferred on the mobile terminal 110 can be transferred in blocks, and each time a file segment is transmitted, the file address of the corresponding file segment is generated. In step 440a, the generated file address is sent to the web terminal 120. Preferably, when the files transmitted by the mobile terminal 110 are transmitted in chunks, the address of each file fragment is sent to the web terminal 120 by this. At step 445a, web terminal 120 accesses the received address and downloads the file.
当网络状况标识符标识出web终端120和移动终端110处于同一网络下时,可以通过建立web终端120和移动终端110之间的直连来传送文件,此时进入步骤430b-440b。直连的方式避免了服务器端130的中转,提高了传送速度和传送效率。在直连的情况下,在步骤430b,移动终端110会自动启动一个web服务,为web终端120所请求传送的文件时生成一个文件地址(url)。在步骤435b中,发送该文件地址给web终端120。接着在步骤440b中,web终端120访问该地址以下载得到所请求的文件。When the network status identifier identifies that the web terminal 120 and the mobile terminal 110 are in the same network, the file can be transferred by establishing a direct connection between the web terminal 120 and the mobile terminal 110, and proceeds to steps 430b-440b. The direct connection avoids the relay of the server side 130, improving the transmission speed and transmission efficiency. In the case of direct connection, in step 430b, the mobile terminal 110 automatically launches a web service that generates a file address (url) for the file requested by the web terminal 120. In step 435b, the file address is sent to the web terminal 120. Next in step 440b, the web terminal 120 accesses the address to download the requested file.
图6示出了用户通过web终端120借助服务器端130向移动终端110传送文件的方法流程图。如图6所示,FIG. 6 shows a flow chart of a method for a user to transfer a file to a mobile terminal 110 via a server terminal 130 via a web terminal 120. As shown in Figure 6,
在步骤605,用户通过web终端120向服务器端130发出传送文件的请求。根据本发明的一个实施例,用户可以首先选择要传送的文件类型所在的类别。例如“照片”、“图片”、“音乐”、“视频”或者“文档”等等。At step 605, the user issues a request to transfer the file to the server 130 via the web terminal 120. According to an embodiment of the present invention, the user may first select the category in which the file type to be transferred is located. For example, "photo", "picture", "music", "video" or "document" and so on.
在步骤610,基于用户的选择请求,服务器端130向移动终端110请求所选类别下全部文件的摘要信息,所述摘要信息包括但不限于文件缩略图、文件信息、文件截图等等。然后,在步骤615中将所获取的文件类别的摘要信息发送至web终端120。优选地,以压缩或加密的方式传送所选类别下全部文件的摘要信息。At step 610, based on the user's selection request, the server side 130 requests the mobile terminal 110 for summary information for all files in the selected category, including but not limited to file thumbnails, file information, file screenshots, and the like. The summary information of the acquired file category is then sent to the web terminal 120 in step 615. Preferably, the summary information of all files in the selected category is transmitted in a compressed or encrypted manner.
根据本发明的一个实施例,当用户首次请求某个传送文件的类别 时,服务器端130会向移动终端110请求所选类别下全部文件的摘要信息。之后,这些摘要信息可以缓存在web终端120中,例如保存在web终端120的浏览器缓存中。之后用户再次选择该类别时,就无需再次从移动终端110传送,而是直接从缓存中调取,直到web终端120和移动终端110之间断开为止。当web终端120和移动终端110之间断开后,所缓存的文件摘要信息会被清除。According to an embodiment of the present invention, when a user first requests a category of a transfer file At the time, the server 130 requests the mobile terminal 110 for summary information of all files in the selected category. These summary information can then be cached in the web terminal 120, such as in the browser cache of the web terminal 120. When the user selects the category again, there is no need to transfer from the mobile terminal 110 again, but directly from the cache until the web terminal 120 and the mobile terminal 110 are disconnected. When the web terminal 120 and the mobile terminal 110 are disconnected, the cached file summary information is cleared.
在步骤620,用户选择某个想要传送至移动终端110的文件,向服务器端130发送传送该文件的请求。根据本发明的一个实施例,向移动终端110传送文件可以采取多种方式。图5a和图5b示出了其中一种方式。如图5a和图5b所示,用户可以通过点击左上角的“添加音乐”按钮501或“添加电脑视频”按钮502来选择要传送至移动终端110的文件。或者,也可以通过直接将文件拖曳到相应类型的项目页面下,从而触发文件向移动终端110的传送。At step 620, the user selects a file that is intended to be transmitted to the mobile terminal 110 and sends a request to the server 130 to transfer the file. According to one embodiment of the invention, transferring files to the mobile terminal 110 can take a variety of approaches. One way is shown in Figures 5a and 5b. As shown in Figures 5a and 5b, the user can select a file to be transferred to the mobile terminal 110 by clicking the "Add Music" button 501 or the "Add Computer Video" button 502 in the upper left corner. Alternatively, the transfer of the file to the mobile terminal 110 can also be triggered by directly dragging the file under the item page of the corresponding type.
接着在步骤625,服务器端130查询网络状况标识符,根据网络状况标识符的标识情况建立移动终端110和web终端120之间的连接。具体地,当网络状况标识符标识出web终端120和移动终端110处于不同网络下时,可以通过服务器端130的中转来传送文件,进入步骤630a-645a。此时,在步骤630a,在服务器端130开启web上传服务。在步骤635a,将web上传服务的地址发送给web终端120。在步骤640a,web终端120将要传送的文件先上传至服务器端130,再在步骤645a中通过服务器端130将上传的文件转发至移动终端110。优选地,可以将web终端120上要传送的文件分块传送,每传送一个文件片段,即在服务器端130生成相应文件片段的web文件上传地址。Next at step 625, the server side 130 queries the network status identifier to establish a connection between the mobile terminal 110 and the web terminal 120 based on the identification of the network status identifier. Specifically, when the network status identifier identifies that the web terminal 120 and the mobile terminal 110 are under different networks, the file may be transferred by the relay of the server end 130, and the process proceeds to steps 630a-645a. At this time, in step 630a, the web upload service is started on the server side 130. At step 635a, the address of the web upload service is sent to the web terminal 120. In step 640a, the web terminal 120 uploads the file to be transmitted to the server 130 first, and then forwards the uploaded file to the mobile terminal 110 through the server 130 in step 645a. Preferably, the files to be transferred on the web terminal 120 may be transferred in blocks, and each time a file segment is transmitted, that is, the web file upload address of the corresponding file segment is generated on the server side 130.
当网络状况标识符标识出web终端120和移动终端110处于同一网络下时,可以通过建立web终端120和移动终端110之间的直连来传送文件,进入步骤630b-640b。直连的方式避免了服务器端130的中转,提高了传送速度和传送效率,节省了网络资源。在直连的情况下,在步骤630b,移动终端120会自动启动一个web上传服务,为所请求传送的文件时生成一个文件上传地址(url)。在步骤635b中,将所生成的文件上传地址发送给web终端110。在步骤640b中,web终端120访问该web上传地址以上传得到所请求的文件。When the network status identifier identifies that the web terminal 120 and the mobile terminal 110 are in the same network, the file can be transferred by establishing a direct connection between the web terminal 120 and the mobile terminal 110, and proceeds to steps 630b-640b. The direct connection avoids the relay of the server side 130, improves the transmission speed and transmission efficiency, and saves network resources. In the case of direct connection, in step 630b, the mobile terminal 120 automatically launches a web upload service to generate a file upload address (url) for the requested file. In step 635b, the generated file upload address is sent to the web terminal 110. In step 640b, the web terminal 120 accesses the web upload address to upload the requested file.
根据本发明的方法和系统,用户可以在移动电子设备和个人电脑之间实现可靠、高速、稳定、用户交互体验更好的文件互连传送方案。 According to the method and system of the present invention, a user can implement a file interconnect transmission scheme that is reliable, high speed, stable, and has a better user interaction experience between the mobile electronic device and the personal computer.
本领域技术人员可以理解,根据以上公开,可以进行多种修改和变化。本说明书的某些部分在对信息的操作的算法和符号表示方面描述了本发明的实施方式。这些算法描述和表示是数据处理领域的技术人员用于向本领域其他技术人员有效地传达其工作所通常使用的。在功能、计算或者逻辑上描述的这些操作被理解为由计算机程序或者等效电路、微代码等来实现。另外,已经多次证明,将这些操作布置为模块是方便的,而不会丧失普遍性。所描述的操作及其相关联的模块可以实现为软件、固件、硬件或者其任意组合。Those skilled in the art will appreciate that many modifications and variations are possible in light of the above disclosure. Some portions of the specification describe embodiments of the invention in terms of algorithms and symbolic representations of operations on information. These algorithmic descriptions and representations are typically used by those skilled in the data processing arts and are used to effectively convey their work to those skilled in the art. These operations described functionally, computationally or logically are understood to be implemented by computer programs or equivalent circuits, microcode, and the like. In addition, it has been proven many times that it is convenient to arrange these operations as modules without loss of generality. The described operations and their associated modules can be implemented in software, firmware, hardware, or any combination thereof.
在此描述的任何步骤、操作或者过程可以利用一个或多个硬件或者软件模块单独或者与其他设备组合来执行或者实现。在一个实施方式中,软件模块利用计算机程序产品实现,计算机程序产品包括包含计算机程序代码的计算机可读介质,计算机程序代码可以由计算机处理器执行,用于执行所描述的任何或者全部步骤、操作或者过程。Any of the steps, operations, or processes described herein may be performed or implemented using one or more hardware or software modules, alone or in combination with other devices. In one embodiment, a software module is implemented using a computer program product comprising a computer readable medium containing computer program code executable by a computer processor for performing any or all of the steps, operations described. Or process.
本发明的实施方式还可以涉及用于执行此处的操作的装置。该装置可以用于所需要的目的而特别地构造,和/或其可以包括选择性地激活或者由存储在计算机中的计算机程序重新配置的通用计算设备。这样的计算机程序可以存储在非暂时有形计算机可读存储介质或者适于存储电子指令的任何类型的介质中,其可以耦接至计算机系统总线。另外,本说明书中提到的任何计算系统可以包括单个处理器,或者可以是采用多个处理器涉及的架构以用于增加计算能力。Embodiments of the invention may also relate to apparatus for performing the operations herein. The apparatus may be specially constructed for the required purposes, and/or it may comprise a general purpose computing device that is selectively activated or reconfigured by a computer program stored in a computer. Such computer programs can be stored in a non-transitory tangible computer readable storage medium or any type of medium suitable for storing electronic instructions that can be coupled to a computer system bus. Additionally, any computing system referred to in this specification can include a single processor or can be an architecture involving multiple processors for increased computing power.
本发明的实施方式还可以涉及由在此描述的计算过程产生的产品。这样的产品可以包括计算过程所得到的信息,其中,信息存储在非暂时有形计算机可读存储介质中,并且可以包括计算机程序产品或者在此描述的其他数据组合的任何实施方式。Embodiments of the invention may also relate to products produced by the computing processes described herein. Such products may include information derived from a computing process, wherein the information is stored in a non-transitory tangible computer readable storage medium and may include any implementation of a computer program product or other data combination described herein.
结合这里披露的本发明的说明和实践,本发明的其他实施例对于本领域技术人员都是易于想到和理解的。说明和实施例仅被认为是示例性的,本发明的真正范围和主旨均由权利要求所限定。 Other embodiments of the invention will be apparent to those skilled in the <RTIgt; The description and the examples are to be considered as illustrative only, and the true scope and spirit of the invention are defined by the claims.

Claims (10)

  1. 一种用于基于二维码和网络适配的移动终端和web终端互连的方法,所述移动终端和web终端借助位于云端的服务器进行互连,所述方法,包括以下步骤:A method for interconnecting a mobile terminal and a web terminal based on a two-dimensional code and a network adaptation, the mobile terminal and the web terminal being interconnected by means of a server located in the cloud, the method comprising the steps of:
    a)由所述web终端向所述服务器发出连接请求;a) issuing, by the web terminal, a connection request to the server;
    b)所述服务器向所述web终端发送二维码信息;b) the server sends two-dimensional code information to the web terminal;
    c)通过所述移动终端扫描所述二维码信息;c) scanning the two-dimensional code information by the mobile terminal;
    d)响应于所述扫描二维码的操作,所述移动终端和所述web终端分别向所述服务器发送自身的网络连接状况;d) in response to the operation of scanning the two-dimensional code, the mobile terminal and the web terminal respectively send their own network connection status to the server;
    e)所述服务器获取所述移动终端和所述web终端各自连接到服务器的网络状况,判断所述移动终端和所述web终端的网络连接是否处于同一局域网下,并针对是否处于同一局域网络将网络状况标志符设置不同的状态;e) the server acquires a network status of each of the mobile terminal and the web terminal connected to the server, and determines whether the network connection between the mobile terminal and the web terminal is under the same local area network, and whether the network connection is in the same local area network The network status indicator sets different states;
    f)所述服务器分别向所述移动终端和所述web终端发送连接建立许可,在所述移动终端和所述web终端之间建立连接;f) the server respectively sends a connection establishment permission to the mobile terminal and the web terminal, establishing a connection between the mobile terminal and the web terminal;
    g)所述移动终端将要进行同步传送的文件的统计信息发送至所述服务器,经所述服务器转发至所述web终端。g) The mobile terminal sends statistical information of the file to be synchronously transmitted to the server, and forwards to the web terminal via the server.
  2. 如权利要求1所述的方法,其中所述步骤f中的连接为http长连接。The method of claim 1 wherein said connection in step f is an http long connection.
  3. 如权利要求1所述的方法,其中所述服务器通过向所述移动终端和所述web终端发送心跳信号来检验是否仍然保持连接。The method of claim 1 wherein said server verifies whether the connection is still maintained by transmitting a heartbeat signal to said mobile terminal and said web terminal.
  4. 如权利要求1所述的方法,其中当所述服务器未接收到移动终端或所述web终端反馈的心跳响应信号超过一定的次数,服务器断开所述移动终端和所述web终端之间的连接。The method of claim 1, wherein the server disconnects the connection between the mobile terminal and the web terminal when the server does not receive the heartbeat response signal fed back by the mobile terminal or the web terminal for more than a certain number of times .
  5. 如权利要求1所述的方法,其中当在所述移动终端上和所述web终端之间传送文件时,还包括下列步骤,The method of claim 1, wherein when the file is transferred between the mobile terminal and the web terminal, the following steps are further included,
    h)通过所述web终端向所述服务器发出传送文件的请求,选择所传送文件的类别;h) issuing, by the web terminal, a request for transmitting a file to the server, selecting a category of the transmitted file;
    i)所述服务器端向所述移动终端请求所选类别下全部文件的摘要信息;i) the server side requests, from the mobile terminal, summary information of all files in the selected category;
    j)将从所述移动终端获取的文件类别的摘要信息发送至所述web 终端;j) transmitting summary information of a file category acquired from the mobile terminal to the web terminal;
    k)选择想要传送的文件,向所述服务器发送传送该文件的请求;k) selecting a file to be transferred, and sending a request to the server to transmit the file;
    l)所述服务器查询网络状况标识符,根据网络状况标识符的标识情况建立所述移动终端和所述web终端之间的连接,当所述网络状况标识符标识出web终端和移动终端处于不同网络下时,通过所述服务器的中转来传送文件;当所述网络状况标识符标识出web终端和移动终端处于相同网络下时,在所述web终端和所述移动终端之间建立直连来传送文件。l) the server queries a network status identifier, establishing a connection between the mobile terminal and the web terminal according to the identification status of the network status identifier, when the network status identifier identifies that the web terminal and the mobile terminal are different When the network is under, the file is transferred by the relay of the server; when the network status identifier identifies that the web terminal and the mobile terminal are under the same network, a direct connection is established between the web terminal and the mobile terminal. transfer files.
  6. 如权利要求5所述的方法,其中在所述步骤l中,当通过所述服务器的中转从所述移动终端向所述web终端传送文件时,进一步包括如下步骤:The method of claim 5, wherein in said step 1, when transferring a file from said mobile terminal to said web terminal by relaying said server, further comprising the steps of:
    l1)在所述服务器开启web上传服务;L1) opening a web upload service on the server;
    l2)将所述移动终端上要传送的文件上传至服务器,在所述服务器上生成该文件的地址;l) uploading a file to be transmitted on the mobile terminal to a server, and generating an address of the file on the server;
    l3)将所生成的文件地址发送给所述web终端;l) sending the generated file address to the web terminal;
    l4)所述web终端访问所收到的地址,下载所述文件。L4) The web terminal accesses the received address and downloads the file.
  7. 如权利要求5所述的方法,其中在所述步骤l中,当通过在所述web终端和所述移动终端之间建立直连来从所述移动终端向所述web终端传送文件时,进一步包括如下步骤:The method of claim 5, wherein in said step 1, when a file is transferred from said mobile terminal to said web terminal by establishing a direct connection between said web terminal and said mobile terminal, further Including the following steps:
    l1)所述移动终端自动启动一个web服务,为所述web终端所请求传送的文件时生成一个文件地址;L1) The mobile terminal automatically starts a web service, and generates a file address when the file requested by the web terminal is transmitted;
    l2)发送该文件地址给所述web终端;L2) sending the file address to the web terminal;
    l3)所述web终端访问该地址以下载得到所请求的文件。L3) The web terminal accesses the address to download the requested file.
  8. 如权利要求5所述的方法,其中在所述步骤l中,当通过所述服务器的中转从所述web终端向所述移动终端传送文件时,进一步包括如下步骤:The method of claim 5, wherein in said step 1, when transferring a file from said web terminal to said mobile terminal by relaying said server, further comprising the steps of:
    l1)在所述服务器开启web上传服务;L1) opening a web upload service on the server;
    l2)将web上传服务的地址发送至所述web终端;L2) sending an address of the web upload service to the web terminal;
    l3)所述web终端将要传送的文件上传至所述地址;L3) the web terminal uploads a file to be transmitted to the address;
    l4)所述服务器将上传的所述文件转发至所述移动终端。L4) The server forwards the uploaded file to the mobile terminal.
  9. 如权利要求5所述的方法,其中在所述步骤l中,当通过在所述web终端和所述移动终端之间建立直连来从所述web终端向所述移 动终端传送文件时,进一步包括如下步骤:The method of claim 5, wherein in said step 1, moving from said web terminal to said moving by establishing a direct connection between said web terminal and said mobile terminal When the terminal transmits the file, the method further includes the following steps:
    l1)所述移动终端自动启动一个web上传服务;L1) the mobile terminal automatically starts a web upload service;
    l2)将所述web上传服务的地址发送至所述web终端;l) sending an address of the web upload service to the web terminal;
    l3)所述web终端访问该地址以上传得到所请求的文件。L3) The web terminal accesses the address to upload the requested file.
  10. 如权利要求5所述的方法,其中所述文件分为多个文件片段进行传送。 The method of claim 5 wherein said file is divided into a plurality of file segments for transmission.
PCT/CN2014/090417 2014-11-06 2014-11-06 Method for mobile terminal and web terminal interconnection based on two-dimensional code and network adaptation WO2016070370A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/090417 WO2016070370A1 (en) 2014-11-06 2014-11-06 Method for mobile terminal and web terminal interconnection based on two-dimensional code and network adaptation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/090417 WO2016070370A1 (en) 2014-11-06 2014-11-06 Method for mobile terminal and web terminal interconnection based on two-dimensional code and network adaptation

Publications (1)

Publication Number Publication Date
WO2016070370A1 true WO2016070370A1 (en) 2016-05-12

Family

ID=55908387

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/090417 WO2016070370A1 (en) 2014-11-06 2014-11-06 Method for mobile terminal and web terminal interconnection based on two-dimensional code and network adaptation

Country Status (1)

Country Link
WO (1) WO2016070370A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2476156A1 (en) * 2003-07-30 2005-01-30 J2X Technologies Inc. System, computer product and method for enabling wireless data synchronization
CN101605138A (en) * 2009-07-14 2009-12-16 中兴通讯股份有限公司 Document transmission method and terminal
CN101902826A (en) * 2010-06-30 2010-12-01 北京乔讯科技有限公司 Method and system for establishing data connection
US20110264622A1 (en) * 2002-11-05 2011-10-27 Microsoft Corporation User-input scheduling of synchronization operation on a mobile device based on user activity
CN102238523A (en) * 2010-04-20 2011-11-09 苏州彭华信息技术有限公司 Mobile phone information content backup/recovery method
CN102238524A (en) * 2010-04-20 2011-11-09 苏州彭华信息技术有限公司 Mobile phone information content backup/recovery system
CN103001948A (en) * 2012-11-09 2013-03-27 传聚互动(北京)科技有限公司 Method and system for controlling computer terminal by handheld device through scan codes

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110264622A1 (en) * 2002-11-05 2011-10-27 Microsoft Corporation User-input scheduling of synchronization operation on a mobile device based on user activity
CA2476156A1 (en) * 2003-07-30 2005-01-30 J2X Technologies Inc. System, computer product and method for enabling wireless data synchronization
CN101605138A (en) * 2009-07-14 2009-12-16 中兴通讯股份有限公司 Document transmission method and terminal
CN102238523A (en) * 2010-04-20 2011-11-09 苏州彭华信息技术有限公司 Mobile phone information content backup/recovery method
CN102238524A (en) * 2010-04-20 2011-11-09 苏州彭华信息技术有限公司 Mobile phone information content backup/recovery system
CN101902826A (en) * 2010-06-30 2010-12-01 北京乔讯科技有限公司 Method and system for establishing data connection
CN103001948A (en) * 2012-11-09 2013-03-27 传聚互动(北京)科技有限公司 Method and system for controlling computer terminal by handheld device through scan codes

Similar Documents

Publication Publication Date Title
US8904030B2 (en) Automatic multimedia upload for publishing data and multimedia content
US9438697B2 (en) User interface content state synchronization across devices
WO2015062512A1 (en) Content sharing method and apparatus
KR20150013860A (en) Clientless cloud computing
JP5990845B2 (en) Method, terminal device, and content sharing system for sharing media content
JP5891559B2 (en) Instant messaging method, terminal, server and system
WO2021027610A1 (en) Communication protocol switching method, apparatus and system
US20170237791A1 (en) User interface content state synchronization across devices
CN104333598A (en) Two-dimension code and network adaption based mobile terminal and web terminal interconnection method
WO2013174265A1 (en) Data transmission method and device
KR20210052599A (en) Image sharing method and electronic device
WO2022156606A1 (en) Information processing method and apparatus, and electronic device
CN104394200A (en) A method for performing simultaneous preview and display between a mobile device and a web terminal
WO2018084033A1 (en) Shared device, operation control program, and operation control method
JP2023518163A (en) Data sharing methods, electronic devices and systems
CN104320491A (en) Method for synchronous display between mobile device and web terminal
US10218796B2 (en) Communication apparatus and control method for service discovery processing
WO2016070373A1 (en) Method for implementing synchronous preview display between mobile terminal and web terminal
WO2017063350A1 (en) Data operation control method and system thereof, and user terminal
WO2024017113A1 (en) Data synchronization method and apparatus, and electronic device
US20150145947A1 (en) Apparatus, system, and method of managing terminals, and recording medium
WO2016070370A1 (en) Method for mobile terminal and web terminal interconnection based on two-dimensional code and network adaptation
WO2014180436A1 (en) Inter-terminal communication method, and terminal
US20150052190A1 (en) Information processing system, information processing method, server, and control method and control program of server
WO2016070371A1 (en) Method for mobile terminal and web terminal interconnection and streaming and streaming media playback

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14905436

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 05/09/2017)

122 Ep: pct application non-entry in european phase

Ref document number: 14905436

Country of ref document: EP

Kind code of ref document: A1