A method and device for seamless switching between wired and wireless connections of an external storage device

By configuring the WebDAV server and client on the external storage device, and automatically switching wired and wireless connection modes combined with USB interface operation, the problem of manual switching in the existing technology is solved, sensingless switching is achieved, and user experience is improved.

CN116506969BActive Publication Date: 2025-07-22IGRS ENG LAB(SHENZHEN) LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310475578.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2025-07-22
Estimated Expiration
2043-04-28

AI Technical Summary

Technical Problem

Existing external storage devices need to be manually operated when switching wired and wireless connections, which is not convenient enough to use.

Method used

Configure the WebDAV server on the external storage device, and set up the WebDAV client on the computing device. By parsing the WebDAV configuration file, you can automatically switch the wired direct connection mode and wireless connection mode in combination with USB interface operation.

Benefits of technology

It realizes automatic switch between wired and wireless connections of external storage devices, improves user experience and avoids the hassle of manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116506969B_ABST
    Figure CN116506969B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for seamless switching between wired and wireless connections of an external storage device. A WebDAV server is configured on the external storage device, and a WebDAV client is provided on a computing device for accessing the external storage device. The method includes: when the external storage device is connected to the computing device in a wired manner, the computing device reads the WebDAV configuration file on the external storage device and obtains local area network connection information by parsing the WebDAV configuration file; obtaining the current connection mode of the external storage device and the plugging in or unplugging operation of the external storage device on the USB interface of the computing device; automatically switching between the wired direct connection mode and the wireless connection mode according to the current connection mode and the plugging in or unplugging operation. The present invention realizes seamless switching between the direct connection and wireless connection of the external storage device, and the user does not need to perform other operations, which is convenient to use and improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of external storage devices, and particularly to an external storage device and a method for seamlessly switching between wired and wireless connections thereof. Background Art

[0002] Due to the increasing amount of electronic document materials, it has become a trend to use external storage devices to store these electronic document materials.

[0003] A mobile hard disk is a commonly used external storage device. However, a mobile hard disk is generally connected to a computing device through a USB cable, which is not very convenient to use. For this reason, Network Attached Storage (NAS) devices are currently more and more widely used. NAS devices can be connected to a computing device through a network cable or through WIFI wirelessly. However, when a NAS device is wirelessly connected to a computing device, if the user feels that the transmission speed is slow and wants to connect through a wired connection by inserting a network cable, in the case of not disconnecting the wireless connection, the wireless connection will still be used and will not automatically switch to the wired connection; in addition, after pulling out the network cable, manual wireless connection is required, and it cannot automatically switch from wired direct connection to wireless connection, which is not very convenient to use.

[0004] In view of this, it is necessary to improve the existing external storage devices to achieve seamless switching between wired and wireless connections and improve the convenience of use. Summary of the Invention

[0005] In view of the above defects, the technical problem to be solved by the present invention is to provide a method and device for seamless switching between wired and wireless connections of an external storage device, so as to solve the problem that the wired and wireless connection switching of the existing external storage device requires manual operation and is not convenient to use.

[0006] Therefore, the method for seamless switching between wired and wireless connections of the external storage device provided by the present invention is configured with a WebDAV server on the external storage device, and a WebDAV client is provided on the computing device for accessing the external storage device. The method includes the following steps:

[0007] When the external storage device is connected to the computing device by a wired method, the computing device reads the WebDAV configuration file on the external storage device and obtains the local area network connection information by parsing the WebDAV configuration file;

[0008] Obtain the current connection mode of the external storage device and the access or removal operation of the external storage device on the USB interface of the computing device;

[0009] According to the current connection mode and the access or removal operation, automatically switch between the wired direct connection mode and the wireless connection mode, specifically:

[0010] The current connection mode is the wireless connection mode. In response to the access operation of the external storage device, the LAN connection of the external storage device is automatically disconnected. When the current connection mode is the wired direct connection mode, in response to the removal operation of the external storage device, the WebDAV client is automatically started, and the WebDAV server of the external storage device is connected using the LAN connection information, and the external storage device is registered in the LAN.

[0011] In the above technical method, preferably, the WebDAV configuration file contains the LAN connection information, including the IP address, port number, username, and password.

[0012] In the above technical method, preferably, the WebDAV configuration file is an XML file and can be accessed and parsed through the standard WebDAV protocol.

[0013] In the above technical method, preferably, after the external storage device is inserted into the USB interface of the computing device, the computing device automatically assigns a USB port number and a unique storage device ID to the external storage device, and obtains the unique attributes of the external storage device through the USB port number and the storage device ID.

[0014] In the above technical method, preferably, the method for obtaining the current connection mode of the external storage device is as follows:

[0015] Based on the access operation of the external storage device on the USB interface of the computing device, it is obtained that the current connection mode of the external storage device is the wired direct connection mode;

[0016] The LAN device list is queried. Based on the existence of a device with the same unique attributes as the external storage device in the device list, it is obtained that the current connection mode of the external storage device is the wireless connection mode.

[0017] The present invention also provides a device for seamless switching between wired and wireless connections of an external storage device, including:

[0018] A WebDAV server, which is set on the external storage device;

[0019] A WebDAV client, which is set on the computing device;

[0020] A first acquisition device, which is set on the computing device and is used to read the WebDAV configuration file on the external storage device and obtain the LAN connection information by parsing the WebDAV configuration file;

[0021] A second acquisition device, which is set on the computing device and is used to obtain the access or removal operation of the external storage device on the USB interface of the computing device;

[0022] A third acquisition device, which is set on a computing device and is used to acquire the current connection mode of an external storage device;

[0023] An automatic switching device, which is set on a computing device and is used to automatically switch between a wired direct connection mode and a wireless connection mode according to the current connection mode and the operation. Specifically:

[0024] When the current connection mode is the wireless connection mode, in response to the access operation of the external storage device, the local area network connection of the external storage device is automatically disconnected; when the current connection mode is the wired direct connection mode, in response to the unplugging operation of the external storage device, the WebDAV client is automatically started, and the WebDAV server of the external storage device is connected by using the local area network connection information, and the external storage device is registered in the local area network.

[0025] In the above technical device, preferably, the WebDAV configuration file contains the local area network connection information, including the IP address, port number, user name and password.

[0026] In the above technical device, preferably, the WebDAV configuration file is an XML file and can be accessed and parsed through the standard WebDAV protocol.

[0027] In the above technical device, preferably, the third acquisition device obtains that the current connection mode of the external storage device is the wired direct connection mode according to the access operation of the external storage device on the USB interface of the computing device.

[0028] In the above technical device, preferably, the third acquisition device queries the local area network device list, and obtains that the current connection mode of the external storage device is the wireless connection mode according to the existence of a device with the same unique attribute as the external storage device in the device list.

[0029] As can be seen from the above technical solutions, the method and device for seamless switching between wired and wireless connections of an external storage device provided by the present invention solve the problem that the wired and wireless connections of an external storage device in the prior art need to be manually switched, which is inconvenient to use. Compared with the prior art, the present invention has the following beneficial effects:

[0030] When the current connection mode is the wireless connection mode, in response to the access operation of the external storage device, the local area network connection of the external storage device is automatically disconnected; when the current connection mode is the wired direct connection mode, in response to the unplugging operation of the external storage device, the WebDAV client is automatically started, and the WebDAV server of the external storage device is connected by using the local area network connection information, so as to realize the seamless automatic switching between the wired and wireless connections of the external storage device, without the need for manual operation by the user to switch, which is convenient to use and improves the user experience. Description of the Drawings

[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce and explain the drawings required for describing the embodiments of the present invention or the prior art. Obviously, the drawings in the following description are only partial embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0032] Figure 1 It is a flowchart of the method for seamless switching between wired and wireless connections of an external storage device provided by the present invention;

[0033] Figure 2 It is a flowchart of Specific Embodiment 1 in the present invention;

[0034] Figure 3 It is a flowchart of Specific Embodiment 2 in the present invention;

[0035] Figure 4 It is a schematic diagram of the interface of a computing device in the wired direct connection mode of the present invention;

[0036] Figure 5 It is a schematic diagram of the interface of a computing device in the wireless connection mode of the present invention. Specific Embodiments

[0037] The following will clearly and completely describe the technical solutions of the embodiments of the present invention with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0038] In order to more clearly explain and illustrate the technical solutions and implementation manners of the present invention, the following introduces several preferred specific embodiments for implementing the technical solutions of the present invention.

[0039] It should be noted that the orientation words such as "inside, outside", "front, back", and "left, right" in this article are expressed based on the product usage state as the reference object. Obviously, the use of the corresponding orientation words does not limit the protection scope of this solution.

[0040] In the present invention, a WebDAV server is configured on the external storage device, and a WebDAV client is provided on the computing device for accessing the external storage device. The WebDAV client can connect to the WebDAV server, register the external storage device in the local area network as a virtual network disk for use, and access the external storage device through the local area network.

[0041] WebDAV is an open-source project on GitHub, implemented in the Go language. It is not only cross-platform but also supports the ARM architecture, allowing the deployment of a WebDAV server on embedded devices.

[0042] Please refer to Figure 1 , Figure 1 which is a flowchart of a method for seamless switching between wired and wireless connections of an external storage device provided by the present invention.

[0043] As Figure 1 shown, a method for seamless switching between wired and wireless connections of an external storage device provided by the present invention includes the following steps:

[0044] Step 110, when the external storage device is connected to the computing device by a wired method, the cable of the wired connection of the computing device reads the WebDAV configuration file on the external storage device, and obtains the local area network connection information by parsing the WebDAV configuration file.

[0045] Among them, the wired method can use a USB cable for connection. After the external storage device is connected to the computing device, an external disk is created on the computing device for access. At this time, the connection mode of the external storage device is the wired direct connection mode, as Figure 4 shown.

[0046] The current connection mode of the external storage device as the wired direct connection mode can be obtained according to the access operation of the external storage device on the USB interface of the computing device.

[0047] After inserting the external storage device into the USB interface of the computing device, the computing device will automatically assign a USB port number and a unique storage device ID to the external storage device. Through the USB port number and the storage device ID, the computing device can obtain the device information of the external storage device, including unique attributes (such as MAC address).

[0048] The WebDAV configuration file on the external storage device contains local area network connection information (parameters required for connecting to the local area network), such as IP address, port number, username, and password, etc. The WebDAV configuration file can be an XML file and can be accessed and parsed through the standard WebDAV protocol.

[0049] After the computing device is connected by a wireless method, it can use the local area network connection information to connect to the WebDAV server of the external storage device and register the external storage device in the local area network for use as a virtual network disk, as Figure 5 shown.

[0050] Step 120, obtain the current connection mode of the external storage device and the access or removal operation of the external storage device on the USB interface of the computing device.

[0051] Step 130: Automatically switch between the wired direct connection mode and the wireless connection mode according to the current connection mode of the external storage device and the insertion or removal operation of the external storage device on the USB interface of the computing device. Specifically:

[0052] When the current connection mode of the external storage device is the wireless connection mode, the computing device responds to the insertion operation of the external storage device (insertion into the USB interface), automatically disconnects the local area network connection of the external storage device, and realizes the automatic switch from the wired direct connection mode to the wireless connection mode.

[0053] When the current connection mode of the external storage device is the wired direct connection mode, in response to the removal operation of the external storage device, automatically start the WebDAV client, and use the local area network connection information to connect to the WebDAV server of the external storage device, and register the external storage device in the local area network.

[0054] The method for obtaining that the external storage device is in the wireless connection mode is as follows:

[0055] Query the local area network device list on the computing device, and obtain whether the current connection module of the external storage device is in the wireless connection mode according to whether there is a device with the same unique attribute as the external storage device in the device list. If there is a device with the same unique attribute as the external storage device in the device list, then the current connection module of the external storage device is in the wireless connection mode.

[0056] The following will be described in detail through two specific embodiments.

[0057] Specific Embodiment 1.

[0058] As Figure 2 shown, the application scenario of this Specific Embodiment 1 is: The external storage device is connected to the computing device in the wireless connection mode and works in the wireless connection mode. At this time, the external storage device is connected to the computing device through a USB cable, then the wireless connection mode is automatically disconnected and switched to the wired direct connection mode.

[0059] Step 1: Connect the external storage device to the computing device through a USB cable.

[0060] Step 2: Determine whether the external storage device has a wireless connection mode. If so, automatically disconnect the local area network connection of the external storage device to realize the automatic switch from the wireless connection mode to the wired direct connection mode; if there is no wireless connection mode, the external storage device uses the current wired direct connection mode and is used as a USB disk.

[0061] Specific Embodiment 2.

[0062] As Figure 3As shown in the figure, the application scenario of the second specific embodiment is as follows: An external storage device is connected to a computing device via a USB cable. At this time, when the external storage device is unplugged from the USB interface of the computing device, it automatically switches to the wireless connection mode.

[0063] Step 1: Unplug the external storage device from the USB interface of the computing device.

[0064] Step 2: In response to the unplugging operation of the USB interface, the computing device automatically starts the WebDAV client.

[0065] Step 3: The computing device uses the WiFi wireless connection method to connect to the WebDAV server of the external storage device using the local area network connection information, and registers the external storage device in the local area network as a virtual network disk, realizing the switching from the wired direct connection mode to the wireless connection mode.

[0066] Based on the above method, the present invention also provides a device for seamless switching between the wired and wireless connections of an external storage device, including:

[0067] A WebDAV server, which is set on the external storage device;

[0068] A WebDAV client, which is set on the computing device;

[0069] A first acquisition device, which is set on the computing device and is used to read the WebDAV configuration file on the external storage device and obtain the local area network connection information by parsing the WebDAV configuration file;

[0070] A second acquisition device, which is set on the computing device and is used to acquire the access or unplugging operation of the external storage device on the USB interface of the computing device;

[0071] A third acquisition device, which is set on the computing device and is used to acquire the current connection mode of the external storage device;

[0072] An automatic switching device, which is set on the computing device and is used to automatically switch between the wired direct connection mode and the wireless connection mode according to the current connection mode and the operation. Specifically:

[0073] When the current connection mode is the wireless connection mode, in response to the access operation of the external storage device, the local area network connection of the external storage device is automatically disconnected; when the current connection mode is the wired direct connection mode, in response to the unplugging operation of the external storage device, the WebDAV client is automatically started, and the WebDAV server of the external storage device is connected using the local area network connection information, and the external storage device is registered in the local area network.

[0074] Based on the descriptions of the above specific embodiments, the method and device for seamless switching between wired and wireless connections of the external storage device provided by the present invention have the following advantages compared with the prior art:

[0075] First, according to the current connection mode of the external storage device and the insertion or removal operation of the external storage device on the USB interface of the computing device, the wired direct connection mode and the wireless connection mode are automatically switched, realizing seamless switching between the direct connection and wireless connection of the external storage device. Users do not need to perform other operations, which is convenient to use and improves the user experience.

[0076] Second, a WebDAV server is configured on the external storage device, and a WebDAV client is provided on the computing device for accessing the external storage device. In the wired direct connection mode, when the external storage device is removed, the WebDAV client is automatically started, and the WebDAV server of the external storage device is connected using the local area network connection information, registering the external storage device in the local area network for use as a virtual internal Xiang disk. The implementation method is simple and does not require complex programming design.

[0077] Third, when the external storage device is connected to the computing device by wire, the computing device reads the WebDAV configuration file on the external storage device and obtains the local area network connection information by parsing the WebDAV configuration file. The technical implementation is simple and convenient.

[0078] Fourth, by querying the local area network device list and based on the existence of a device with the same unique attribute as the external storage device in the device list, it is determined that the current connection mode of the external storage device is the wireless connection mode. The identification method is simple and accurate.

[0079] Finally, it should also be noted that the terms "including", "comprising" or any other variant thereof used in this article are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.

[0080] The present invention is not limited to the above best implementation mode. Anyone should know that structural changes made under the inspiration of the present invention, as long as they have the same or similar technical solutions as the present invention, fall within the protection scope of the present invention.

Claims

1. A method for seamless switching between wired and wireless connections of an external storage device, characterized in that, An external storage device is configured with a WebDAV server, and a computing device for accessing the external storage device is provided with a WebDAV client. The method includes the following steps: When the external storage device is connected to the computing device by a wired method, the computing device reads the WebDAV configuration file on the external storage device and obtains local area network connection information by parsing the WebDAV configuration file; Obtain the current connection mode of the external storage device and the plugging in or unplugging operation of the external storage device on the USB interface of the computing device; According to the current connection mode and the plugging in or unplugging operation, automatically switch between the wired direct connection mode and the wireless connection mode. Specifically: When the current connection mode is the wireless connection mode, in response to the plugging in operation of the external storage device, automatically disconnect the local area network connection of the external storage device; when the current connection mode is the wired direct connection mode, in response to the unplugging operation of the external storage device, automatically start the WebDAV client and use the local area network connection information to connect to the WebDAV server of the external storage device, and register the external storage device in the local area network.

2. The method according to claim 1, characterized in that The WebDAV configuration file contains the local area network connection information, including the IP address, port number, username, and password.

3. The method according to claim 2, wherein The WebDAV configuration file is an XML file and can be accessed and parsed through the standard WebDAV protocol.

4. The method according to claim 1, wherein After the external storage device is inserted into the USB interface of the computing device, the computing device automatically assigns a USB port number and a unique storage device ID to the external storage device, and obtains the unique attributes of the external storage device through the USB port number and the storage device ID.

5. The method according to claim 4, characterized in that, The method for obtaining the current connection mode of the external storage device is: According to the plugging in operation of the external storage device on the USB interface of the computing device, obtain that the current connection mode of the external storage device is the wired direct connection mode; Query the local area network device list, and according to the existence of a device with the same unique attributes as the external storage device in the device list, obtain that the current connection mode of the external storage device is the wireless connection mode.

6. A device for seamless switching between wired and wireless connections of an external storage device, characterized in that, Including: A WebDAV server, set on the external storage device; A WebDAV client, set on the computing device; A first obtaining device, set on the computing device, for reading the WebDAV configuration file on the external storage device and obtaining local area network connection information by parsing the WebDAV configuration file; A second obtaining device, set on the computing device, for obtaining the plugging in or unplugging operation of the external storage device on the USB interface of the computing device; A third obtaining device, set on the computing device, for obtaining the current connection mode of the external storage device; An automatic switching device, set on the computing device, for automatically switching between the wired direct connection mode and the wireless connection mode according to the current connection mode and the plugging in or unplugging operation. Specifically: The current connection mode is the wireless connection mode. In response to the access operation of the external storage device, the local area network connection of the external storage device is automatically disconnected; when the current connection mode is the wired direct connection mode, in response to the unplugging operation of the external storage device, the WebDAV client is automatically started, and the WebDAV server of the external storage device is connected using the local area network connection information, and the external storage device is registered in the local area network.

7. The device according to claim 6, characterized in that, The WebDAV configuration file contains the local area network connection information, including the IP address, port number, username, and password.

8. The device according to claim 6, characterized in that The WebDAV configuration file is an XML file and can be accessed and parsed through the standard WebDAV protocol.

9. The device according to claim 6, wherein The third acquisition device obtains that the current connection mode of the external storage device is the wired direct connection mode according to the access operation of the external storage device on the USB interface of the computing device.

10. The device according to claim 6, characterized in that, The third acquisition device queries the local area network device list and obtains that the current connection mode of the external storage device is the wireless connection mode according to the existence of a device with the same unique attribute as the external storage device in the device list.

Citation Information

Patent Citations

  • Switching system and method

    CN102611727A

  • Mobile terminal and charging switching control method

    CN106549445A