Network data transmission method, device and equipment based on UMS protocol and medium
Connecting terminal devices to the network adapter through USB interface and UMS protocol solves the problem that the device cannot directly connect to the Internet and realizes convenient network connection and data transmission.
Patent Information
- Application Number
- CN202411659657.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-19
AI Technical Summary
Many embedded or industrial devices cannot be directly connected to the Internet through an Ethernet interface or wireless communication module due to hardware or software limitations, and existing network adapters are difficult to compatible with these special devices.
The terminal device is connected to the network adapter through the USB interface, and the UMS protocol is used to realize data transmission between the terminal device and the target network, creating a virtual network interface to negotiate the establishment of a data transmission channel.
Network connection and data transmission can be realized without the need for terminal equipment to have an Ethernet interface or wireless communication module, improving the convenience of network connection and data transmission.
Smart Images

Figure CN119520506A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a network data transmission method, device, electronics and medium based on the UMS protocol. Background Art
[0002] With the popularization of the Internet, the demand for devices to access the Internet is increasing. However, many devices, especially some embedded devices or industrial devices, cannot be directly connected to the Internet through Ethernet interfaces or wireless communication modules due to hardware or software limitations. At present, most network adapters on the market use standard network card drivers, which are difficult to be compatible with some special devices. The above problems need to be solved urgently. Summary of the invention
[0003] The purpose of the present invention is to solve one of the technical problems existing in the prior art to at least a certain extent.
[0004] To this end, one purpose of an embodiment of the present invention is to provide a network data transmission method based on the UMS protocol, which connects a terminal device to a target network through a USB interface, and realizes data transmission between the terminal device and the target network through the UMS protocol, thereby improving the convenience of network connection and data transmission.
[0005] Another object of an embodiment of the present invention is to provide a network data transmission system based on the UMS protocol.
[0006] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present invention include:
[0007] On the one hand, an embodiment of the present invention provides a network data transmission method based on the UMS protocol, which is applied to a terminal device, wherein the terminal device is connected to a network adapter via a USB interface, and the network adapter is communicatively connected to a target network. The network data transmission method comprises the following steps:
[0008] Accessing a virtual storage device of a network adapter through a UMS protocol, and obtaining a network configuration driver and a network configuration file stored in the virtual storage device;
[0009] Install the network configuration driver, and perform network configuration according to the network configuration file, thereby creating a virtual network interface, so that the virtual network interface negotiates with the network adapter to establish a data transmission channel through the USB interface and the UMS protocol;
[0010] Sending the request data to the network adapter through the virtual network interface, so that the network adapter uploads the request data to the target network;
[0011] The response data of the target network returned by the network adapter is received through the virtual network interface.
[0012] Furthermore, in one embodiment of the present invention, the network data transmission method further includes the following steps:
[0013] When the communication between the virtual network interface and the network adapter is interrupted, receiving a network interruption alarm sent by the network adapter through the USB interface;
[0014] The data transmission channel is established by re-negotiating with the network adapter based on the USB interface and the USM protocol through the virtual network interface.
[0015] Furthermore, in one embodiment of the present invention, the network data transmission method further includes the following steps:
[0016] Receiving network status indication information of the target network sent by the network adapter through the virtual network interface;
[0017] The network configuration is adjusted according to the network status indication information, thereby adjusting the data sending frequency of the virtual network interface.
[0018] On the other hand, an embodiment of the present invention provides a network data transmission method based on the UMS protocol, which is applied to a network adapter, wherein a terminal device is connected to the network adapter via a USB interface, and the network adapter is communicatively connected to a target network. The network data transmission method comprises the following steps:
[0019] In response to the access request of the terminal device, the network configuration driver and the network configuration file stored in the virtual storage device are returned to the terminal device through the UMS protocol, so that the terminal device installs the network configuration driver and performs network configuration according to the network configuration file, thereby creating a virtual network interface;
[0020] Establishing a data transmission channel through negotiation with the virtual network interface via the USB interface and the UMS protocol;
[0021] Receiving request data sent by the virtual network interface, and uploading the request data to the target network;
[0022] Receive response data sent by the target network, and return the response data to the virtual network interface.
[0023] Furthermore, in one embodiment of the present invention, the network data transmission method further includes the following steps:
[0024] When communication with the virtual network interface is interrupted, a network interruption alarm is sent to the terminal device through the USB interface;
[0025] The data transmission channel is established by re-negotiating with the virtual network interface through the USB interface and the UMS protocol.
[0026] Furthermore, in one embodiment of the present invention, the network data transmission method further includes the following steps:
[0027] Monitoring the network status of the target network and generating network status indication information;
[0028] The network status indication information is sent to the virtual network interface, so that the terminal device adjusts the network configuration according to the network status indication information, and further adjusts the data sending frequency of the virtual network interface.
[0029] On the other hand, an embodiment of the present invention provides a network data transmission system based on the UMS protocol, which is applied to a terminal device, wherein the terminal device is connected to a network adapter via a USB interface, and the network adapter is communicatively connected to a target network. The network data transmission system includes:
[0030] A configuration data request module, used to access the virtual storage device of the network adapter through the UMS protocol, and obtain the network configuration driver and network configuration file stored in the virtual storage device;
[0031] A network interface creation module, used to install the network configuration driver, and perform network configuration according to the network configuration file, and then create a virtual network interface, so that the virtual network interface negotiates with the network adapter to establish a data transmission channel through the USB interface and the UMS protocol;
[0032] A data sending module, used for sending the request data to the network adapter through the virtual network interface, so that the network adapter uploads the request data to the target network;
[0033] The data receiving module is used to receive the response data of the target network returned by the network adapter through the virtual network interface.
[0034] On the other hand, an embodiment of the present invention provides a network data transmission system based on the UMS protocol, which is applied to a network adapter, a terminal device is connected to the network adapter via a USB interface, and the network adapter is communicatively connected with a target network. The network data transmission system includes:
[0035] a configuration data returning module, configured to return the network configuration driver and the network configuration file stored in the virtual storage device to the terminal device through the UMS protocol in response to the access request of the terminal device, so that the terminal device installs the network configuration driver and performs network configuration according to the network configuration file, thereby creating a virtual network interface;
[0036] A transmission channel establishing module, used for negotiating with the virtual network interface to establish a data transmission channel through the USB interface and the UMS protocol;
[0037] A first data forwarding module, configured to receive request data sent by the virtual network interface and upload the request data to the target network;
[0038] The second data forwarding module is used to receive the response data sent by the target network and return the response data to the virtual network interface.
[0039] On the other hand, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the network data transmission method based on the UMS protocol as described above is realized.
[0040] On the other hand, an embodiment of the present invention further provides a storage medium, which is a computer-readable storage medium used for computer-readable storage, and the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the network data transmission method based on the UMS protocol as described above.
[0041] The advantages and beneficial effects of the present invention will be partly given in the following description, partly become apparent from the following description, or be understood through the practice of the present invention:
[0042] The terminal device of the embodiment of the present invention is connected to the network adapter through the USB interface, the network adapter is connected to the target network, the terminal device accesses the virtual storage device of the network adapter through the UMS protocol, and obtains the network configuration driver and network configuration file stored in the virtual storage device, the terminal device installs the network configuration driver, and performs network configuration according to the network configuration file, and then creates a virtual network interface, so that the virtual network interface negotiates with the network adapter to establish a data transmission channel through the USB interface and the UMS protocol, the terminal device sends the request data to the network adapter through the virtual network interface, so that the network adapter uploads the request data to the target network, and the terminal device receives the response data of the target network returned by the network adapter through the virtual network interface. The embodiment of the present invention connects the terminal device to the target network through the USB interface, and realizes the data transmission between the terminal device and the target network through the UMS protocol, and the network connection and data transmission of the terminal device can be realized without the terminal device having an Ethernet interface or a wireless communication module, thereby improving the convenience of network connection and data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solution in the embodiments of the present invention, the following introduction is made to the drawings required for use in the embodiments of the present invention. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solution of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0044] Figure 1 A flowchart of a method for network data transmission based on the UMS protocol provided by an embodiment of the present invention;
[0045] Figure 2 Another step flow chart of the network data transmission method based on the UMS protocol provided by an embodiment of the present invention;
[0046] Figure 3 Another step flow chart of the network data transmission method based on the UMS protocol provided by an embodiment of the present invention;
[0047] Figure 4 Another step flow chart of the network data transmission method based on the UMS protocol provided by an embodiment of the present invention;
[0048] Figure 5 Another step flow chart of the network data transmission method based on the UMS protocol provided by an embodiment of the present invention;
[0049] Figure 6 Another step flow chart of the network data transmission method based on the UMS protocol provided by an embodiment of the present invention;
[0050] Figure 7 A schematic diagram of a structure of a network data transmission system based on the UMS protocol provided by an embodiment of the present invention;
[0051] Figure 8 Another structural diagram of a network data transmission system based on the UMS protocol provided by an embodiment of the present invention;
[0052] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention;
[0053] Fig.10 A schematic diagram of the structure of a storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limitations on the present application. It should be noted that, although the functional module division is performed in the system schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order from the module division in the system schematic diagram or the flow chart. For the step numbers in the following embodiments, they are only set for the convenience of explanation, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0055] In the description of the present invention, the meaning of "a plurality" is two or more. If there is a description of the first or the second, it is only for the purpose of distinguishing the technical features, and it cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features. In addition, unless otherwise defined, all technical and scientific terms used in this document have the same meaning as those commonly understood by technicians in the technical field of this application. The terms used in this document are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0056] The network data transmission method based on the UMS protocol provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a set-top box, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the network data transmission method based on the UMS protocol, etc., but is not limited to the above forms.
[0057] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0058] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0059] like Figure 1 FIG. 1 is a flowchart of a method for transmitting network data based on the UMS protocol according to an embodiment of the present invention. Figure 1The embodiment of the present invention provides a network data transmission method based on the UMS protocol, which is applied to a terminal device. The terminal device is connected to a network adapter via a USB interface. The network adapter is connected to a target network for communication. The network data transmission method includes the following steps:
[0060] S101, accessing a virtual storage device of a network adapter through a UMS protocol, and obtaining a network configuration driver and a network configuration file stored in the virtual storage device;
[0061] S102, installing a network configuration driver, and performing network configuration according to a network configuration file, thereby creating a virtual network interface, so that the virtual network interface negotiates with a network adapter to establish a data transmission channel through a USB interface and a UMS protocol;
[0062] S103, sending the request data to the network adapter through the virtual network interface, so that the network adapter uploads the request data to the target network;
[0063] S104: Receive response data of the target network returned by the network adapter through the virtual network interface.
[0064] Specifically, the embodiment of the present invention connects the terminal device to the target network through the USB interface, and implements data transmission between the terminal device and the target network through the UMS protocol. The specific process is as follows:
[0065] 1) Device connection: Connect the terminal device that needs to access the Internet to the network adapter through the USB interface, and the network adapter is also connected to the router or the Internet through the network port.
[0066] 2) Protocol configuration: The network adapter configures the USB UMS protocol so that the terminal device can identify and connect to the network adapter.
[0067] 3) Virtual storage device creation: Create a virtual storage device on the network adapter, which contains the driver and configuration files for network configuration.
[0068] 4) Driver installation: The terminal device accesses the virtual storage device through the USB UMS protocol and installs the necessary driver.
[0069] 5) Network interface creation: After the driver is installed, a virtual network interface is created on the terminal device, which communicates with the network adapter via USB.
[0070] 6) Data transmission: The network request of the terminal device is transmitted to the router or the Internet through the network adapter, and the response data is transmitted back to the terminal device.
[0071] It can be appreciated that the embodiment of the present invention connects the terminal device to the target network through the USB interface, and realizes data transmission between the terminal device and the target network through the UMS protocol. The network connection and data transmission of the terminal device can be realized without the terminal device having an Ethernet interface or a wireless communication module, thereby improving the convenience of network connection and data transmission.
[0072] like Figure 2 FIG. 1 is another flow chart of the steps of the network data transmission method based on the UMS protocol provided by an embodiment of the present invention, referring to FIG. Figure 2 As an optional implementation, the network data transmission method further includes the following steps:
[0073] S201, when the communication between the virtual network interface and the network adapter is interrupted, receiving a network interruption alarm sent by the network adapter through the USB interface;
[0074] S202: re-negotiate with the network adapter to establish a data transmission channel through the virtual network interface based on the USB interface and the USM protocol.
[0075] Specifically, the communication connection status with the virtual network interface is monitored in real time through the network adapter, and a network interruption alarm is sent to the terminal device through the USB interface when the communication is interrupted; the virtual network interface of the terminal device renegotiates with the network adapter through the USB interface and the USM protocol to establish a data transmission channel.
[0076] like Figure 3 FIG. 1 is another flow chart of the steps of the network data transmission method based on the UMS protocol provided by an embodiment of the present invention, referring to FIG. Figure 3 As an optional implementation, the network data transmission method further includes the following steps:
[0077] S301, receiving network status indication information of a target network sent by a network adapter through a virtual network interface;
[0078] S302: Adjust the network configuration according to the network status indication information, and then adjust the data sending frequency of the virtual network interface.
[0079] Specifically, the network status of the target network (router or the Internet) is monitored in real time through a network adapter, and network status indication information is generated and sent to the virtual network interface of the terminal device; the terminal device adjusts the network configuration according to the network status indication information, and then adjusts the data sending frequency of the virtual network interface to adapt to the network status of the target network.
[0080] like Figure 4 FIG. 1 is another flow chart of the steps of the network data transmission method based on the UMS protocol provided by an embodiment of the present invention, referring to FIG. Figure 4The embodiment of the present invention provides a network data transmission method based on the UMS protocol, which is applied to a network adapter. The terminal device is connected to the network adapter through a USB interface. The network adapter is connected to the target network for communication. The network data transmission method includes the following steps:
[0081] S401, in response to an access request from a terminal device, returning a network configuration driver and a network configuration file stored in a virtual storage device to the terminal device through a UMS protocol, so that the terminal device installs the network configuration driver and performs network configuration according to the network configuration file, thereby creating a virtual network interface;
[0082] S402, establishing a data transmission channel through negotiation with the virtual network interface via the USB interface and the UMS protocol;
[0083] S403, receiving the request data sent by the virtual network interface, and uploading the request data to the target network;
[0084] S404: Receive response data sent by the target network, and return the response data to the virtual network interface.
[0085] Specifically, the terminal device is connected to the network adapter via a USB data cable to ensure that the network adapter can recognize the device; the USB UMS protocol is enabled on the network adapter, and a virtual storage device containing a driver and a configuration file is created; the terminal device accesses the virtual storage device via the USB connection and installs the driver; after the driver is installed, a virtual network interface is created on the terminal device; the network request of the terminal device is transmitted to the router or the Internet through the network adapter, and the response data is transmitted back to the terminal device; the network adapter monitors the network connection status in real time to ensure the stability and security of the connection.
[0086] It can be appreciated that the embodiment of the present invention connects the terminal device to the target network through the USB interface, and realizes data transmission between the terminal device and the target network through the UMS protocol. The network connection and data transmission of the terminal device can be realized without the terminal device having an Ethernet interface or a wireless communication module, thereby improving the convenience of network connection and data transmission.
[0087] like Figure 5 FIG. 1 is another flow chart of the steps of the network data transmission method based on the UMS protocol provided by an embodiment of the present invention, referring to FIG. Figure 5 As an optional implementation, the network data transmission method further includes the following steps:
[0088] S501, when the communication with the virtual network interface is interrupted, a network interruption alarm is sent to the terminal device through the USB interface;
[0089] S502: Re-negotiate with the virtual network interface to establish a data transmission channel through the USB interface and the UMS protocol.
[0090] Specifically, the communication connection status with the virtual network interface is monitored in real time through the network adapter, and a network interruption alarm is sent to the terminal device through the USB interface when the communication is interrupted; the virtual network interface of the terminal device renegotiates with the network adapter through the USB interface and the USM protocol to establish a data transmission channel.
[0091] like Figure 6 FIG. 1 is another flow chart of the steps of the network data transmission method based on the UMS protocol provided by an embodiment of the present invention, referring to FIG. Figure 6 As an optional implementation, the network data transmission method further includes the following steps:
[0092] S601, monitoring the network status of the target network and generating network status indication information;
[0093] S602: Send network status indication information to the virtual network interface, so that the terminal device adjusts the network configuration according to the network status indication information, and further adjusts the data sending frequency of the virtual network interface.
[0094] Specifically, the network status of the target network (router or the Internet) is monitored in real time through a network adapter, and network status indication information is generated and sent to the virtual network interface of the terminal device; the terminal device adjusts the network configuration according to the network status indication information, and then adjusts the data sending frequency of the virtual network interface to adapt to the network status of the target network.
[0095] The method steps of the embodiment of the present invention are described above. Compared with the prior art, the embodiment of the present invention also has the following advantages:
[0096] 1) Wide range of device applicability: The present invention is applicable to a variety of terminal devices, including embedded devices, industrial devices, and special-purpose devices, which usually lack standard network interfaces.
[0097] 2) Simplified network configuration: The terminal device only needs to connect to the network adapter through the USB interface and install a simple driver to achieve network connection, which greatly simplifies the network configuration process. Users do not need to have professional network knowledge to complete the network access of the device.
[0098] 3) Efficient and stable network connection: Data is transmitted through the USB interface and UMS protocol, with high data transmission rate and stability, which can meet general network access requirements. Especially in industrial environments, stable network connection is crucial for the normal operation of equipment, and the present invention has obvious advantages in this regard.
[0099] 4) Cost-effectiveness: Compared with traditional network adapters, the present invention does not require additional hardware modification or complex equipment upgrades. Only a network adapter supporting a USB interface and UMS protocol is required to realize the device's Internet access function, which is highly cost-effective.
[0100] like Figure 7 FIG. 1 is a schematic diagram of a network data transmission system based on the UMS protocol provided by an embodiment of the present invention. Figure 7 The embodiment of the present invention provides a network data transmission system based on the UMS protocol, which is applied to a terminal device. The terminal device is connected to a network adapter via a USB interface. The network adapter is connected to a target network for communication. The network data transmission system includes:
[0101] A configuration data request module is used to access the virtual storage device of the network adapter through the UMS protocol and obtain the network configuration driver and network configuration file stored in the virtual storage device;
[0102] The network interface creation module is used to install the network configuration driver and perform network configuration according to the network configuration file, thereby creating a virtual network interface, so that the virtual network interface negotiates with the network adapter to establish a data transmission channel through the USB interface and the UMS protocol;
[0103] A data sending module, used to send the request data to the network adapter through the virtual network interface, so that the network adapter uploads the request data to the target network;
[0104] The data receiving module is used to receive the response data of the target network returned by the network adapter through the virtual network interface.
[0105] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0106] like Figure 8 FIG. 1 is another schematic diagram of a network data transmission system based on the UMS protocol provided by an embodiment of the present invention. Figure 8 The embodiment of the present invention provides a network data transmission system based on the UMS protocol, which is applied to a network adapter. The terminal device is connected to the network adapter through a USB interface. The network adapter is connected to the target network for communication. The network data transmission system includes:
[0107] A configuration data return module, used to respond to an access request from a terminal device and return the network configuration driver and network configuration file stored in the virtual storage device to the terminal device through the UMS protocol, so that the terminal device installs the network configuration driver and performs network configuration according to the network configuration file, thereby creating a virtual network interface;
[0108] The transmission channel establishment module is used to negotiate with the virtual network interface to establish a data transmission channel through the USB interface and the UMS protocol;
[0109] A first data forwarding module, used for receiving request data sent by the virtual network interface, and uploading the request data to the target network;
[0110] The second data forwarding module is used to receive the response data sent by the target network and return the response data to the virtual network interface.
[0111] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0112] The embodiment of the present invention also provides an electronic device, the electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the program is executed by the processor, the above-mentioned network data transmission method based on the UMS protocol is realized. The electronic device may be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.
[0113] like Fig. 9 FIG. 1 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention, referring to FIG. Fig. 9 , an embodiment of the present invention provides an electronic device, including:
[0114] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention;
[0115] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the network data transmission method based on the UMS protocol of the embodiment of the present invention;
[0116] Input / output interface 903, used to implement information input and output;
[0117] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0118] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0119] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0120] like Fig.10 FIG. 1 is a schematic diagram of a storage medium according to an embodiment of the present invention. Fig.10 The embodiment of the present invention further provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs 1001, and the one or more programs 1001 can be executed by one or more processors to implement the above-mentioned network data transmission method based on the UMS protocol.
[0121] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0122] The embodiment of the present invention also discloses a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes Figure 1 Or the method shown in 4.
[0123] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the above-mentioned boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0124] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified to the contrary, one or more of the above-mentioned functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0125] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0126] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0127] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the above-mentioned program is printed, since the above-mentioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or processing in other suitable ways as necessary, and then stored in a computer memory.
[0128] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0129] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0130] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0131] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A network data transmission method based on the UMS protocol, characterized in that: Applied to a terminal device, the terminal device is connected to a network adapter via a USB interface, the network adapter is communicatively connected to a target network, and the network data transmission method comprises the following steps: Accessing a virtual storage device of a network adapter through a UMS protocol, and obtaining a network configuration driver and a network configuration file stored in the virtual storage device; Install the network configuration driver, and perform network configuration according to the network configuration file, thereby creating a virtual network interface, so that the virtual network interface negotiates with the network adapter to establish a data transmission channel through the USB interface and the UMS protocol; Sending the request data to the network adapter through the virtual network interface, so that the network adapter uploads the request data to the target network; The response data of the target network returned by the network adapter is received through the virtual network interface.
2. A network data transmission method based on the UMS protocol according to claim 1, characterized in that: The network data transmission method further comprises the following steps: When the communication between the virtual network interface and the network adapter is interrupted, receiving a network interruption alarm sent by the network adapter through the USB interface; The data transmission channel is established by re-negotiating with the network adapter based on the USB interface and the USM protocol through the virtual network interface.
3. The network data transmission method based on the UMS protocol according to claim 1, characterized in that: The network data transmission method further comprises the following steps: Receiving network status indication information of the target network sent by the network adapter through the virtual network interface; The network configuration is adjusted according to the network status indication information, thereby adjusting the data sending frequency of the virtual network interface.
4. A network data transmission method based on the UMS protocol, characterized in that: Applied to a network adapter, a terminal device is connected to the network adapter via a USB interface, the network adapter is communicatively connected with a target network, and the network data transmission method comprises the following steps: In response to the access request of the terminal device, the network configuration driver and the network configuration file stored in the virtual storage device are returned to the terminal device through the UMS protocol, so that the terminal device installs the network configuration driver and performs network configuration according to the network configuration file, thereby creating a virtual network interface; Establishing a data transmission channel through negotiation with the virtual network interface via the USB interface and the UMS protocol; Receiving request data sent by the virtual network interface, and uploading the request data to the target network; Receive response data sent by the target network, and return the response data to the virtual network interface.
5. A network data transmission method based on UMS protocol according to claim 4, characterized in that: The network data transmission method further comprises the following steps: When communication with the virtual network interface is interrupted, a network interruption alarm is sent to the terminal device through the USB interface; The data transmission channel is re-negotiated with the virtual network interface through the USB interface and the UMS protocol.
6. A network data transmission method based on UMS protocol according to claim 4, characterized in that: The network data transmission method further comprises the following steps: Monitoring the network status of the target network and generating network status indication information; The network status indication information is sent to the virtual network interface, so that the terminal device adjusts the network configuration according to the network status indication information, and further adjusts the data sending frequency of the virtual network interface.
7. A network data transmission system based on the UMS protocol, characterized in that: Applied to a terminal device, the terminal device is connected to a network adapter via a USB interface, the network adapter is communicatively connected to a target network, and the network data transmission system comprises: A configuration data request module, used to access the virtual storage device of the network adapter through the UMS protocol, and obtain the network configuration driver and network configuration file stored in the virtual storage device; A network interface creation module, used to install the network configuration driver, and perform network configuration according to the network configuration file, and then create a virtual network interface, so that the virtual network interface negotiates with the network adapter to establish a data transmission channel through the USB interface and the UMS protocol; A data sending module, used for sending the request data to the network adapter through the virtual network interface, so that the network adapter uploads the request data to the target network; The data receiving module is used to receive the response data of the target network returned by the network adapter through the virtual network interface.
8. A network data transmission system based on the UMS protocol, characterized in that: Applied to a network adapter, a terminal device is connected to the network adapter via a USB interface, the network adapter is communicatively connected with a target network, and the network data transmission system comprises: a configuration data returning module, configured to return the network configuration driver and the network configuration file stored in the virtual storage device to the terminal device through the UMS protocol in response to the access request of the terminal device, so that the terminal device installs the network configuration driver and performs network configuration according to the network configuration file, thereby creating a virtual network interface; A transmission channel establishing module, used for negotiating with the virtual network interface to establish a data transmission channel through the USB interface and the UMS protocol; A first data forwarding module, configured to receive request data sent by the virtual network interface and upload the request data to the target network; The second data forwarding module is used to receive the response data sent by the target network and return the response data to the virtual network interface.
9. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the network data transmission method based on the UMS protocol as described in any one of claims 1 to 6 are realized.
10. A storage medium, the storage medium being a computer-readable storage medium, used for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the network data transmission method based on the UMS protocol as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Data transmission method and device of terminal equipment with Androild platform
CN102981990A
Method for transmitting data, storage, and network adapter
CN105978817A
Interface device and system for virtualizing mass storage
CN110888599A
Network configuration method, host server, equipment and storage medium
CN115567383A
Network communication method and device, electronic equipment and nonvolatile storage medium
CN117692711A